summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.tex')
-rw-r--r--Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.tex74
1 files changed, 74 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.tex b/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.tex
new file mode 100644
index 00000000000..e71809385a4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.tex
@@ -0,0 +1,74 @@
+%
+% This file demonstrates indexing with the `makeidx' package.
+% This file is processed as follows:
+%
+% latex file
+% bibtex file
+% latex file
+% makeindex file
+% latex file
+%
+% Note that the file name suffix may be omitted. It's `latex file'
+% and not `latex file.tex'.
+%
+\documentclass[a4paper]{article}
+\usepackage[T1]{fontenc}
+\usepackage[american]{babel}
+\usepackage{csquotes}
+%
+% We set the `indexing' package option (`indexing' is similar to
+% `indexing=true') to enable indexing in both citations and the
+% bibliography. It is rather unusual to add bibliography entries to
+% the index so you will normally use `indexing=cite' instead. The
+% only reason we're indexing the bibliography in this example is to
+% get a larger index. For a change, let's also use the `authortitle'
+% style in this example.
+\usepackage[indexing,style=authortitle]{biblatex}
+\bibliography{biblatex-examples}
+%
+% The `makeidx' package provides indexing facilities on a fairly
+% basic level. It is highly advisable to use the `index' package
+% instead, even if you do not need the additional facilities
+% provided by this package, such as multiple indexes. The reason is
+% that the \index command defined by this package is more robust
+% than the basic command provided by `makeidx'.
+\usepackage{makeidx}
+% We need to enable indexing globally by way of \makeindex.
+% Otherwise, no index is created at all, regardless of the
+% `indexing' option of biblatex.
+\makeindex
+%
+% Note that biblatex uses makeindex's `actual' operator to pass the
+% `indexsorttitle' field to makeindex. The default character used
+% is '@'. If the makeindex style uses a different character, i.e.,
+% if the .ist file contains a line like this
+%
+% actual '='
+%
+% you need to redefine \actualoperator accordingly:
+%
+% \renewcommand*{\actualoperator}{=}
+%
+\begin{document}
+
+\section*{Indexing with the \texttt{makeidx} package}
+
+% We add the contents of the entire bib file to the bibliography.
+% Note that \nocite does not add anything to the index on its own.
+\nocite{*}
+
+% We cite a few items. These citations will be added to the index.
+\cite{piccato,gaonkar,malinowski,coleridge,gerhardt,cicero}
+
+% We also add an explicit index entry.
+\index{Example entry}
+
+\clearpage
+
+% We print the printbibliography...
+\printbibliography
+% ...and the index
+\raggedright
+\printindex
+
+\end{document}