| 1 |
% |
| 2 |
% This file demonstrates indexing with the 'makeidx' package. |
| 3 |
% This file is processed as follows: |
| 4 |
% |
| 5 |
% latex file |
| 6 |
% bibtex/biber file |
| 7 |
% latex file |
| 8 |
% makeindex file |
| 9 |
% latex file |
| 10 |
% |
| 11 |
% Note that the file name suffix may be omitted. It's 'latex file' |
| 12 |
% and not 'latex file.tex'. |
| 13 |
% |
| 14 |
\documentclass[a4paper]{article} |
| 15 |
\usepackage[T1]{fontenc} |
| 16 |
\usepackage[utf8]{inputenc} |
| 17 |
\usepackage[american]{babel} |
| 18 |
\usepackage{csquotes} |
| 19 |
% |
| 20 |
% We set the 'indexing' package option ('indexing' is similar to |
| 21 |
% 'indexing=true') to enable indexing in both citations and the |
| 22 |
% bibliography. It is rather unusual to add bibliography entries to |
| 23 |
% the index so you will normally use 'indexing=cite' instead. The |
| 24 |
% only reason we're indexing the bibliography in this example is to |
| 25 |
% get a larger index. For a change, let's also use the 'authortitle' |
| 26 |
% style in this example. |
| 27 |
\usepackage[indexing,style=authortitle,backend=biber]{biblatex} |
| 28 |
\addbibresource{biblatex-examples.bib} |
| 29 |
% |
| 30 |
% The 'makeidx' package provides indexing facilities on a fairly |
| 31 |
% basic level. It is highly advisable to use the 'index' package |
| 32 |
% instead, even if you do not need the additional facilities |
| 33 |
% provided by this package, such as multiple indexes. The reason is |
| 34 |
% that the \index command defined by this package is more robust |
| 35 |
% than the basic command provided by 'makeidx'. |
| 36 |
\usepackage{makeidx} |
| 37 |
% We need to enable indexing globally by way of \makeindex. |
| 38 |
% Otherwise, no index is created at all, regardless of the |
| 39 |
% 'indexing' option of biblatex. |
| 40 |
\makeindex |
| 41 |
% |
| 42 |
% Note that biblatex uses makeindex's 'actual' operator to pass the |
| 43 |
% 'indexsorttitle' field to makeindex. The default character used |
| 44 |
% is '@'. If the makeindex style uses a different character, i.e., |
| 45 |
% if the .ist file contains a line like this |
| 46 |
% |
| 47 |
% actual '=' |
| 48 |
% |
| 49 |
% you need to redefine \actualoperator accordingly: |
| 50 |
% |
| 51 |
% \renewcommand*{\actualoperator}{=} |
| 52 |
% |
| 53 |
\begin{document} |
| 54 |
|
| 55 |
\section*{Indexing with the \texttt{makeidx} package} |
| 56 |
|
| 57 |
% We add the contents of the entire bib file to the bibliography. |
| 58 |
% Note that \nocite does not add anything to the index on its own. |
| 59 |
\nocite{*} |
| 60 |
|
| 61 |
% We cite a few items. These citations will be added to the index. |
| 62 |
\cite{piccato,gaonkar,malinowski,coleridge,gerhardt,cicero} |
| 63 |
|
| 64 |
% We also add an explicit index entry. |
| 65 |
\index{Example entry} |
| 66 |
|
| 67 |
\clearpage |
| 68 |
|
| 69 |
% We print the printbibliography... |
| 70 |
\printbibliography |
| 71 |
% ...and the index |
| 72 |
\raggedright |
| 73 |
\printindex |
| 74 |
|
| 75 |
\end{document} |