summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-ms/doc/examples/20-indexing-single-ms.tex
blob: 71918e5b533e5e16e09a647156f3ab2efa8584cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
%
% This file demonstrates indexing with the 'makeidx' package.
% This file is processed as follows:
%
%   latex        file
%   bibtex/biber 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[utf8]{inputenc}
\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,backend=biber]{biblatex-ms}
\addbibresource{biblatex-examples.bib}
%
% 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}