diff options
author | Karl Berry <karl@freefriends.org> | 2017-10-02 21:58:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-10-02 21:58:27 +0000 |
commit | b05bbbaa1cd9b63551731cdd1577f90225da2079 (patch) | |
tree | b00d557f9bddbf3a303b45572fce477b6484804d /Master/texmf-dist/doc/latex/robustindex | |
parent | f3d0235a07baa8c6f8430bddcaa95ba3ad6de5ee (diff) |
robustindex (1oct17)
git-svn-id: svn://tug.org/texlive/trunk@45452 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/robustindex')
-rw-r--r-- | Master/texmf-dist/doc/latex/robustindex/multisample.pdf | bin | 187903 -> 162769 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/robustindex/multisample.tex | 167 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/robustindex/robustmanual.pdf | bin | 109222 -> 121079 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/robustindex/robustmanual.tex | 58 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/robustindex/robustsample.pdf | bin | 178667 -> 177607 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/robustindex/robustsample.tex | 13 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/robustindex/stind.html | 2 |
7 files changed, 86 insertions, 154 deletions
diff --git a/Master/texmf-dist/doc/latex/robustindex/multisample.pdf b/Master/texmf-dist/doc/latex/robustindex/multisample.pdf Binary files differindex e4a1084a034..c5cdebbcb64 100644 --- a/Master/texmf-dist/doc/latex/robustindex/multisample.pdf +++ b/Master/texmf-dist/doc/latex/robustindex/multisample.pdf diff --git a/Master/texmf-dist/doc/latex/robustindex/multisample.tex b/Master/texmf-dist/doc/latex/robustindex/multisample.tex index 39e57112dff..545d19f8149 100644 --- a/Master/texmf-dist/doc/latex/robustindex/multisample.tex +++ b/Master/texmf-dist/doc/latex/robustindex/multisample.tex @@ -1,22 +1,22 @@ -% multisample.tex +% multisample.tex 2017/09/29 \documentclass{book} \usepackage{makeidx} \usepackage[multind]{robustindex} -\usepackage{robustglossary} \usepackage[plainpages=false,hyperindex=false]{hyperref} \title {A file with several indexes} -\author{Wilberd van der Kallen\index{Wilberd}} +\author{Wilberd van der Kallen\index{wilberd@Wilberd}} \date{2017} \makeindex % obligatory with robustindex \makeglossary % obligatory with robustglossary \begin{document} - +%\renewcommand{\indexcapstyle}[1]{\par\vskip1em plus.5em minus.3em\textbf{\uppercase{#1}}} \renewcommand\thepage{\roman{page}} +\index{zz@z} \setindex{b1} @@ -35,7 +35,11 @@ \addcontentsline{toc}{chapter}{Preface} \markboth{Preface}{Preface} This file illustrates some features of the \verb!robustindex! package with option \verb!multind!. This option - supports multiple indexes, albeit in a plain style only. + supports multiple indexes. We require that +the argument to an \verb!\index! command starts with at least two lower case +letters or with the symbol \verb!<!. So use \verb!\index{new york@New York}! instead of \verb!\index{New York}!, \verb!\index{za@z}! +instead of \verb!\index{z}!. + Although this is not a book, we have chosen the book style for illustration. Let us say we want to use four indexes. First we choose tags to identify them. @@ -46,8 +50,7 @@ Thus \verb!\setindex{main}! tells \LaTeX\ that the active index is now the index before, then a new index with that tag is created. The tag \verb|main| is always known and the index with tag \verb|main| becomes active at the \verb|\begin{document}|. The \verb!\index! command and -the \verb|\printindex| commands write to/from the active index. -This is all you need to know about the option \verb!multind!.\\ +the \verb|\printindex| commands write to/from the active index.\\ If you wish you may use \verb!\sindex[bis]{!\emph{entry}\verb!}! as shorthand for\\ @@ -76,12 +79,9 @@ a repeat in the index.\setindex{a1}\index{other term!cited twice on same page} That is inherent in our method. Indeed we had to disable the implicit page range formation of makeindex. -Of course the index file {\it filename}.\texttt{ind} -may be edited to remedy such flaws, but our hacking has made this file pretty unreadable. -Use the option \verb!multind! only if you are willing to keep the indexes simple. Even without editing the index file -one may create complicated effects like the page ranges on -page \pageref{range}, which use several fonts in their page numbers. -That is bad style, but it is possible. Note that if you open a page range you must close +The index file {\it filename}.\texttt{ind} has become quite unreadable. Do not edit it. +Use the option \verb!multind! only if you are willing to keep the indexes standard. +Note that if you open a page range you must close it again with the same index active as when you opened the range. We have hacked various mechanisms of makeindex. @@ -124,8 +124,9 @@ because of the roman page numbers in the beginning. \usepackage{makeidx} \usepackage[multind]{robustindex} +\usepackage[plainpages=false,hyperindex=false]{hyperref} ... -...\author{Wilberd van der Kallen\index{Wilberd}} +...\author{Wilberd van der Kallen\index{wilberd@Wilberd}} ... \makeindex % obligatory with robustindex @@ -141,21 +142,20 @@ because of the roman page numbers in the beginning. \setindex{a1}\index{alpha!see beta} % on page 5 \index{alpha!see also gamma\gobblepageref} % on page 5 ... -... \indexincontents % before the index. \setindex{main} \printindex - -\renewcommand{\indexname}{Index bis} -.... +... +\renewcommand{\indexcapstyle}[1]{\indexspace\textsc{#1}\par} +\renewcommand{\indexname}{Index with headings} +\setindex{main} +\printindex \end{document} \end{verbatim} -\index{c1int@as! t@is} +\index{as! t@is} -\index{998b@998} - -\index{997b@tris} +\index{tris} \setindex{main}\index{alpha} @@ -163,12 +163,12 @@ because of the roman page numbers in the beginning. \setindex{bis}\index{bis} -\setindex{main}\index{hier@vardelta} +\setindex{main}\index{delta!vardelta} + -%\setindex{main}\index{hier@animal!than@fish} -\setindex{main}\index{hier@animal!than@fish} +\setindex{main}\index{animal!than@fish} -\setindex{main}\index{hier@animal!ruminant!cow} +\setindex{main}\index{animal!ruminant!cow} \setindex{main}\index{time!here@now} @@ -195,7 +195,7 @@ With option \verb!multind! the package supports multiple indexes. But one still latex \emph{filename}.tex, makeindex \emph{filename}, latex \emph{filename}.tex. \index{page range|)textit}% -%\setindex{b1}\index{page range!risky@this $\vert$is$\vert$ complicated|texttt} + \sindex[b1]{page range!risky@this $\vert$is$\vert$ complicated|texttt} % @@ -204,58 +204,7 @@ latex \emph{filename}.tex, makeindex \emph{filename}, latex \emph{filename}.tex. % \index{simpler!page range|)}% \index{simplest page range|)}% -% Let us pretend this page explains $\mathrm{Ext}^i_B(M,N)$. -\glossary{$\mathrm{Ext}^i_B(M,N)$&Ext group in the category $\mathcal C_B$} - -% Let us pretend this page explains $H^0(X,\mathcal L)$. -\glossary{$H^0(X,\mathcal L)$&the sections of the vector bundle -$\mathcal L|_X$ over $X$} - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% Our glossary entries are given in the format -% \glossaryentry{$B$&Borel subgroup}{page number} -% which would be generated by \glossary{$B$&Borel subgroup} -% and written into the filename.glo file. -% So the & separates the formula from its explanation. -% We assume the explanation fits on the line. -% -% Our implementation: - -\def\itemamp#1{% - \mbox{% - \hbox to 10em{% - #1% the formula - \hss - }% - }% - #2% its explanation -}% - -\def\glossaryentry#1#2{% - {\itemamp #1{\unskip, #2}% - }\par -}% - -\newenvironment{theglossary}{\parindent0pt\parskip0pt}{} - -\chapter*{Glossary of Notations} - -\begin{theglossary}\addcontentsline{toc}{chapter}{Glossary of Notations} - -% Now we copy from filename.glo, making changes as appropriate. -% In this example we just changed the order of the entries. - -\glossaryentry{$H^0(X,\mathcal L)$&the sections of the vector bundle $\mathcal -L -|_X$ over $X$}{\glopageref{4}} -\glossaryentry{$\mathrm{Ext}^i_B(M,N)$&Ext group in the category $\mathcal -C_B$} -{\glopageref{2}} - -\end{theglossary} % If you want the index in the table of contents, you may do % @@ -267,9 +216,8 @@ C_B$} \indexincontents % before \printindex -\let\oldpage\newpage -%\def\newpage{\relax} + \renewcommand{\indexname}{Index} \setindex{main} @@ -283,65 +231,14 @@ C_B$} \setindex{a1} \printindex + \renewcommand{\indexname}{Index with tag b1} \setindex{b1} \printindex -\chapter*{Indexes get plain layout}\addcontentsline{toc}{chapter}{Indexes get plain layout} -Our option \verb!multind! breaks yet another mechanisms of makeindex. -Recall that \verb!robustindex! breaks automatic page ranges. The option \verb!multind! prevents -makeindex from inserting - \verb!\indexspace! commands at appropriate points in the index file. -This makes the layout of an index more plain. -Let us compare the index produced by \verb!\robustmanual.tex! with the same index produced -after the package -\verb!robustindex! is called with the option \verb!multind!. -Curiously the order changes a little too. -To get them in the same order replace \verb!\index{Wilberd}! with \verb!\index{wilberd@Wilberd}!. - -\renewcommand{\indexname}{First without option } -\begin{theindex} - - \item alpha, 1 - \subitem see also gamma - \subitem see beta, 2 - \item \&, {\textbf2} - - \indexspace - - \item discussion, 1--2 - - \indexspace - - \item gamma, {\textbf2} - - \indexspace - - \item Wilberd, 1 - -\end{theindex} -\renewcommand{\indexname}{Next with option \texttt {multind} } +\renewcommand{\indexcapstyle}[1]{\indexspace\textsc{#1}\par} +\renewcommand{\indexname}{Index with headings} \setindex{main} -\begin{theindex} - -\item Wilberd, 1 - - - \item alpha, 1 - \subitem see also gamma - \subitem see beta, 2 - \item \&, {\textbf2} - - - \item discussion, 1--2 - - - - \item gamma, {\textbf2} - - - -\end{theindex} - +\printindex \end{document} diff --git a/Master/texmf-dist/doc/latex/robustindex/robustmanual.pdf b/Master/texmf-dist/doc/latex/robustindex/robustmanual.pdf Binary files differindex fedb495a1a2..831f9eb5204 100644 --- a/Master/texmf-dist/doc/latex/robustindex/robustmanual.pdf +++ b/Master/texmf-dist/doc/latex/robustindex/robustmanual.pdf diff --git a/Master/texmf-dist/doc/latex/robustindex/robustmanual.tex b/Master/texmf-dist/doc/latex/robustindex/robustmanual.tex index 9f1b76b1595..103733c2580 100644 --- a/Master/texmf-dist/doc/latex/robustindex/robustmanual.tex +++ b/Master/texmf-dist/doc/latex/robustindex/robustmanual.tex @@ -1,12 +1,12 @@ -% robustmanual.tex +% robustmanual.tex 2017/09/29 \documentclass{article} \usepackage{makeidx} -\usepackage{robustindex} +\usepackage[multind]{robustindex} \usepackage[hyperindex=false]{hyperref} \title {Manual of robustindex package} -\author{Wilberd van der Kallen\index{Wilberd}} +\author{Wilberd van der Kallen\index{wilberd@Wilberd}} \date{2017} \makeindex % obligatory with robustindex @@ -84,10 +84,6 @@ 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. - @@ -101,11 +97,21 @@ somewhere before the \verb!\printindex!. \index{alpha!see beta} Before discussing the \verb|multind| option we now use $\verb!\printindex!$ to get an index (on a new page). + \printindex \section*{The \texttt{multind} option} The \verb!multind! option provides -support for multiple indexes, albeit in a plain index style. +support for multiple indexes. For the package to function properly we now require that +the argument to an \verb!\index! command starts with at least two lower case +letters or with the symbol \verb!<!. +So use \verb!\index{new york@New York}! instead of \verb!\index{New York}!, \verb!\index{za@z}! +instead of \verb!\index{z}!. + +If you have an entry that should go before the letter a, then start the argument of \verb!\index! with \verb!<!, +as in \index{<@$<$ comes before alphabet}\verb!\index{<@$<$ comes before alphabet}!. + + Suppose the preamble contains \verb!\usepackage[multind]{robustindex}!. Let us say we want to use four indexes. First we choose tags to identify them. @@ -119,12 +125,21 @@ Thus \verb!\setindex{bis}! tells \LaTeX\ that the active index is now the index If a tag has not been encountered before, then a new index with that tag is created. The \verb!\index! command and -the \verb|\printindex| commands write to/from the active index. -This is all you need to know about option \verb!multind!.\\ +the \verb|\printindex| commands write to/from the active index. All indexes are hidden in one +big index file and \LaTeX\ knows how to find the active index in there. + +If you wish you may use \verb!\sindex[bis]{!\emph{entry}\verb!}! as shorthand for\\ + +\hspace{5em} \verb!\setindex{bis}\index{!\emph{entry}\verb!}!\\ + +and \verb!\sindex{!\emph{entry}\verb!}! as shorthand for\\ + + \hspace{5em} \verb!\setindex{main}\index{!\emph{entry}\verb!}!.\\ + -To see how option \verb!multind! may be used, you may also compare the file -\verb|multisample.tex| with the output after +The compilation sequence does not change. That is the main point of all our hacking. +For instance, the file \verb!multisample.tex! produces multiple indexes and is processed like this latex multisample.tex @@ -134,7 +149,26 @@ latex multisample.tex latex multisample.tex +\subsection*{Embellishment} +One may embellish an index with headings, like this. +\verb!\setindex{main}! + +\verb!\renewcommand{\indexname}{Embellished Index}! + +\verb!\renewcommand{\indexcapstyle}[1]{\indexspace\textsc{#1}\par}!% + +\verb!\printindex! \\ + +\noindent This gives + +\setindex{main} + +\renewcommand{\indexname}{Embellished Index} + +\renewcommand{\indexcapstyle}[1]{\indexspace\textsc{#1}\par}% + +\printindex \end{document} diff --git a/Master/texmf-dist/doc/latex/robustindex/robustsample.pdf b/Master/texmf-dist/doc/latex/robustindex/robustsample.pdf Binary files differindex ce25c5da10d..94ebf5e57e0 100644 --- a/Master/texmf-dist/doc/latex/robustindex/robustsample.pdf +++ b/Master/texmf-dist/doc/latex/robustindex/robustsample.pdf diff --git a/Master/texmf-dist/doc/latex/robustindex/robustsample.tex b/Master/texmf-dist/doc/latex/robustindex/robustsample.tex index 14cf57ea1ec..437b9854cc5 100644 --- a/Master/texmf-dist/doc/latex/robustindex/robustsample.tex +++ b/Master/texmf-dist/doc/latex/robustindex/robustsample.tex @@ -1,4 +1,4 @@ -% robustsample.tex +% robustsample.tex 2017/09/29 \documentclass{book} \usepackage{makeidx} @@ -59,11 +59,6 @@ Indeed we had to disable the implicit page range formation of makeindex. \glossary{$H^0(X,\mathcal L)$&the sections of the vector bundle $\mathcal L|_X$ over $X$} -Of course the index file {\it filename}.\texttt{ind} -may be edited to remedy such flaws. Such editing will actually be the -recommended way to achieve more complicated effects like the page ranges on -page \pageref{range}, which also use several fonts in their page numbers. -That is actually bad style, but this file just illustrates features. Traditionally page ranges and fonts for page numbers could be done with the encapsulating construction of makeindex, but that construction is broken by our @@ -73,6 +68,11 @@ package. We have restored encapsulating to some extent, sufficient for common practice, but our rules are more naive than those of makeindex. +Thus it becomes possible +to have a page range as on +page \pageref{range}, which has several fonts in its page numbers. +That is actually bad style, but this file just illustrates features. + See the file \verb|robustsample.tex| for details. Subentries are still supported. We illustrate this in @@ -153,6 +153,7 @@ because of the roman page numbers in the beginning. \usepackage{makeidx} \usepackage{robustindex} +\usepackage[plainpages=false,hyperindex=false]{hyperref} ... ...\author{Wilberd van der Kallen\index{Wilberd}} ... diff --git a/Master/texmf-dist/doc/latex/robustindex/stind.html b/Master/texmf-dist/doc/latex/robustindex/stind.html index 601a1f8291e..91cf56ee78c 100644 --- a/Master/texmf-dist/doc/latex/robustindex/stind.html +++ b/Master/texmf-dist/doc/latex/robustindex/stind.html @@ -14,7 +14,7 @@ without rerunning makeindex. (Yes, it happened also to my 1993 book.) <P>It is much nicer to have an index that adapts itself to all changes but the adding/deleting/rearranging of \index commands. <P>Our package -<A HREF="robustindex.sty">robustindex.sty</A> +<A HREF="robustindex.sty">robustindex.sty</A> (version 2017/09/28) achieves this with the \pageref mechanism. <P> Here is our <A HREF="robustmanual.pdf">Manual for the robustindex package</A>. |