summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/robustindex/robustmanual.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/robustindex/robustmanual.tex')
-rw-r--r--Master/texmf-dist/doc/latex/robustindex/robustmanual.tex105
1 files changed, 105 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/robustindex/robustmanual.tex b/Master/texmf-dist/doc/latex/robustindex/robustmanual.tex
new file mode 100644
index 00000000000..df3a549df5f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/robustindex/robustmanual.tex
@@ -0,0 +1,105 @@
+% robustmanual.tex
+\documentclass{article}
+\usepackage{makeidx}
+\usepackage{robustindex}
+\usepackage[hyperindex=false]{hyperref}
+
+\title {Manual of robustindex package}
+
+\author{Wilberd van der Kallen\index{Wilberd}}
+\date{2017}
+
+\makeindex % obligatory with robustindex
+
+\begin{document}
+
+\maketitle
+
+\section*{Introduction}
+
+\index{discussion|(}
+
+Amazingly often a third party changes the page numbers without rerunning
+makeindex. We therefore want to have an index in which the page numbers automatically synchronise with the document.
+
+The package \texttt{robustindex} achieves this
+by invoking the \verb|\pageref| mechanism on automatically generated labels
+of the form \verb|ind.2|, \verb|ind.4|, \dots.
+
+Only after adding/deleting/modifying an \verb|\index{|\textit{entry}\verb|}|
+command, or after changing the order of \verb|\index{|\textit{entry}\verb|}|
+commands, does one have to rerun makeindex. (How would you change the order? By moving a block of text that contains
+an \verb!\index! command.)
+
+Make sure to run makeindex at least once after the last change to the \verb!\index! commands.
+Keep an eye on the \TeX\ log file. It often contains a warning that you need to rerun \LaTeX\ or makeindex.
+
+\section*{Standard usage}
+Put
+$$
+\verb!\usepackage{makeidx}!
+$$
+$$
+\verb!\usepackage{robustindex}!
+$$
+$$\verb!\makeindex!$$
+in your preamble.
+If you use the hyperref package, go against their advice and put
+$$\verb!\usepackage{robustindex}! $$
+\emph{after} the hyperref declaration, \emph{or}
+turn off \verb!hyperindex! as in
+$$
+\verb!\usepackage[plainpages=false,hyperindex=false]{hyperref}!.
+$$
+
+That should be all. (You may have to trash old auxiliary files.)
+
+You can now use \index{alpha}\index{gamma|textbf}
+$$\verb!\index{alpha}!$$
+$$\verb?\index{alpha!see beta}?$$
+$$\verb!\index{gamma|textbf}!$$
+$$\verb!\index{ampersand@\&|textbf}!$$
+in the usual manner.
+\index{ampersand@\&|textbf}
+
+See \url{https://en.wikibooks.org/wiki/LaTeX/Indexing}.\\
+
+
+
+The symbol \verb!|! has a special meaning inside an \verb!\index! command and cannot be escaped.
+To get \verb!|! as output use the \LaTeX\ command \verb!\vert!.
+
+
+We also have a command \verb!\gobblepageref!
+used as in
+$$\verb?\index{alpha!see also gamma\gobblepageref}?$$
+\index{alpha!see also gamma\gobblepageref}
+
+\subsection*{Page ranges}
+Some features of makeindex had to be repurposed.
+In particular, \emph{implicit} page ranges are no longer supported.
+
+
+If you want a page range in the index you have to use
+the \emph{explicit} page range mechanism of makeindex as in
+$$\verb!\index{discussion|(}!$$% used above
+
+%\index{discussion}% inside range, hence would be suppressed.
+
+%\index{discussion|blah}% inside range, hence would be suppressed.
+
+
+
+
+on the first page of the range, followed by
+$$\verb!\index{discussion|)}!$$\index{discussion|)}on the last page of the range.\\
+
+\subsection*{Table of contents}
+If there is a table of contents and you want the index listed in it, put the command
+$$\verb!\indexincontents!$$
+somewhere before the \verb!\printindex!.
+\index{alpha!see beta}
+
+We now use $\verb!\printindex!$ to get an index (on a new page).
+\printindex
+\end{document}