% \CheckSum{893} % \iffalse %<*driver> \documentclass{ltxdoc} \usepackage{xdoc2} \makeatletter \NewMacroEnvironment{templatetype}{\XD@grab@harmless\relax}{1}% {\MacroFont#1\ \normalfont type}% {\XDMainIndex{\LevelSorted{#1}{\texttt{#1} template type}}}% {{#1}{\texttt{#1} template type}}% {}% \NewMacroEnvironment*{template}{% \XD@grab@harmless\relax\XD@grab@harmless\relax }{2}% {\XDParToMargin{\MacroFont #1\textnormal{\slash}#2 \normalfont template}}% {\XDMainIndex{ \LevelSorted{#1}{\texttt{#1} template type}% \LevelSorted{#2}{\texttt{#2} template}% }}% {{#1/#2}{\texttt{#1}\slash\texttt{#2} template}}% {\def\XD@template@sort{% \LevelSorted{#1}{\texttt{#1} template type}% \LevelSorted{#2}{\texttt{#2} template}% }}% \NewMacroEnvironment*{instance}{% \XD@grab@harmless\relax\XD@grab@harmless\relax }{2}% {\XDParToMargin{\MacroFont #1\textnormal{\slash}#2 \normalfont instance}}% {\XDMainIndex{ \LevelSorted{#1}{\texttt{#1} template type}% \LevelSorted{#2}{\texttt{#2} instance}% }}% {{#1/#2}{\texttt{#1}\slash\texttt{#2} instance}}% {}% \NewMacroEnvironment*{collectioninstance}{% \XD@grab@harmless\relax\XD@grab@harmless\relax\XD@grab@harmless\relax }{3}% {\XDParToMargin{\MacroFont #2\textnormal{\slash}#3 \normalfont instance (\texttt{#1} collection)}}% {\XDMainIndex{ \LevelSorted{#2}{\texttt{#2} template type}% \LevelSorted{#3}{\texttt{#3} instance}% \LevelSorted{#1}{\texttt{#1} collection}% }}% {{#2/#3/#1}% {\texttt{#2}\slash\texttt{#3} instance (\texttt{#1} collection)}}% {}% \@namedef{XD@harmless\string\break}{% \toks@=\expandafter{\the\toks@ \protect\nolinebreak[3]}% \XD@harmless@ } \newcommand\keyvalitem[2]{% \item[#1 (#2)% \IndexEntry{\XD@template@sort \LevelSorted{#1}{\textit{#1} keyval (#2)}% }{usage}{\thepage}% ]% } \newcommand{\xrefoff}{\scan@allowedfalse} \newcommand{\xrefon}{\scan@allowedtrue} \makeatother \newenvironment{syntax}{% \let\\=\break \list{}{% \setlength\topsep{\medskipamount}% \setlength\partopsep{0pt}% \setlength\itemsep{0pt plus 1pt}% \setlength\parsep{\itemsep}% \setlength\leftmargin{3em}% \setlength\listparindent{1em}% \setlength\itemindent{-2em}% \setlength\labelwidth{0pt}% \setlength\labelsep{0pt}% \csname @endparpenalty\endcsname=500 \def\makelabel##1{\mbox{\meta{##1}${}\longrightarrow{}$}}% }% \addtolength\rightskip{0pt plus 1fil}% \linepenalty=300% }{\endlist} \newcommand\branch{\({}\mid{}\)\ignorespaces} \DeclareRobustCommand{\package}[1]{\textsf{#1}} \DeclareRobustCommand{\program}[1]{\textsf{#1}} \DeclareRobustCommand\LaTeXplus{\LaTeXe$*$} \DoNotIndex{\addvspace,\@backslashchar,\begin,\begingroup,\bgroup} \DoNotIndex{\csname,\DeclareInstance,\DeclareOption} \DoNotIndex{\DeclareTemplate,\DeclareTemplateType,\def} \DoNotIndex{\DoParameterAssignments,\edef,\egroup,\@eha} \DoNotIndex{\@empty,\end,\endcsname,\endgroup,\endinput,\expandafter} \DoNotIndex{\@firstofone,\@firstoftwo,\global,\@gobble,\hb@xt@,\hfil} \DoNotIndex{\hsize,\hspace,\IfNoValueTF,\@ifpackageloaded} \DoNotIndex{\@ifpackagewith,\@ifundefined,\ignorespaces,\@input@} \DoNotIndex{\jobname,\leftskip,\let,\MessageBreak,\@namedef,\@ne} \DoNotIndex{\NeedsTeXFormat,\newcommand,\nobreak,\@nobreakfalse} \DoNotIndex{\nopagebreak,\normalsize,\NoValue,\number,\outer} \DoNotIndex{\p@,\PackageError,\PackageInfo,\PackageWarningNoLine} \DoNotIndex{\pagestyle,\par,\parfillskip,\parindent,\parskip} \DoNotIndex{\@plus,\ProcessOptions,\protect,\protected@edef} \DoNotIndex{\providecommand,\ProvidesPackage,\relax,\renewcommand} \DoNotIndex{\RequirePackage,\rightskip,\romannumeral,\@secondoftwo} \DoNotIndex{\small,\space,\textbf,\thispagestyle,\thr@@,\tw@} \DoNotIndex{\vadjust,\vspace,\z@,\z@skip} \DoNotIndex{\iffalse,\ifnum,\ifx,\else,\fi} % \fi \fi \DoNotIndexBy{@} \DoNotIndexBy{DI@} \CodelineIndex \EnableCrossrefs \RecordChanges \setcounter{IndexColumns}{2} \setcounter{StandardModuleDepth}{2} \begin{document} \DocInput{docindex.dtx} \PrintChanges \PrintIndex \end{document} % % \fi % % \title{The \package{docindex} package} % \author{Lars Hellstr\"om} % \date{8 July 2003} % \maketitle % % \begin{abstract} % The \package{docindex} package implements template-based formatting % of indices and lists of changes\slash glossaries. In addition to this, % the control structures employed also provide for a couple of new % features, such as automatic collapsing of trivial index levels. % \end{abstract} % % \tableofcontents % % % \section{Introduction} % % In automatically generated indices with multi-level entries, such as the % list of changes of a \package{doc} document, it often happens that some % entries are uniquely identified by their primary level sort keys, % although there are sort keys and text for additional levels. If then % the formatting is designed for entries that are uniquely identified % only when their secondary or tertiary sort keys are considered, one % ends up with a couple of entries that look rather peculiar (building % a tree which never branches) and usually take up much more space than % they need to. The remedy for this is of course to make the formatting % smart enough to recognise this situation when it occurs and flexible % enough to format the text is a more suitable manner. % % An example of this is that if a document contains the index % entries\footnote{I'm using the default \program{makeindex} % metacharacters in these examples, but the style file provided for % this package actually uses the same metacharacters as those style files % provided by the \package{doc} package---hence the `\package{doc}' % in `\package{docindex}'. } % \begin{quote} % |\index{Bernoulli!Jacob}\index{Bernoulli!Johann}| % \end{quote} % then it is probably reasonable to format this as % \begin{quote} % Bernoulli,\\ % \vadjust{}\quad Jacob\\ % \vadjust{}\quad Johann % \end{quote} % but if the index entries instead were % \begin{quote} % |\index{Jacobi!Carl}\index{Bernoulli!Jacob}| % \end{quote} % then it is probably better to format this as % \begin{quote} % Bernoulli, Jacob\\ % Jacobi, Carl % \end{quote} % than as % \begin{quote} % Bernoulli,\\ % \vadjust{}\quad Jacob\\ % Jacobi,\\ % \vadjust{}\quad Carl % \end{quote} % % The \program{makeindex} program has some features in this direction, % but they only allow dependence on the previous item in the index, not % the next item, which is what you need to know when deciding whether % `Jacob' should go on the same line as `Bernoulli'. Therefore % \package{docindex} pretty much ignores these features in % \program{makeindex} and instead sees to that each command that is to % typeset an index item knows what kind of items were before and after it. % % Another reason for writing this package was to try out the template % mechanisms as provided by the \LaTeXplus\ \package{template} % package.\footnote{\LaTeXplus\ is the name of the \LaTeX\ version after % \LaTeXe. Rather than being a completely different kernel\slash format, % \LaTeXplus\ is (will be) implemented as a collection of \LaTeXe\ % packages which replace parts of the kernel. More information and % package code can be found on the \LaTeX-project website~^^A % \cite{LaTeX-project}.} My impression is that this experiment turned % out strikingly well. I have always found the more layout-oriented % aspects of \TeX\ programming a bit cumbersome, but the separation of % layout details from control structures that becomes natural when % employing template mechanisms seems to have made it much easier. I'm % not sure why this is so, but it could be as simple as that the layout % settings are no longer diluted in the control structures. In any % case, I would recommend people creating new \LaTeXe\ packages to % employ template mechanisms in at least the initial development % versions of the package, for the following reasons: (i) it reduces the % work of updating the package for \LaTeXplus, (ii) it furthers the % development of \LaTeXplus, and (iii) it might actually become a % better package. % % A third reason for writing the \package{docindex} package was to get % the \LaTeX\ document ``back in control'' of how the index is formatted. % Certainly it is the document which has the final say about what % the command in the \texttt{.ind} file actually do, but the traditional % \program{makeindex} style files that are used place severe restrictions % on the formatting of the index simply because they control where the % commands are put. \package{docindex} tries to reduce these % restrictions by making all texts in the index arguments of commands. % Certainly there is a lot more that could be done in this direction---in % particular, the (page) numbers in the index could be coded as a % |\do|-type list rather than as an explicitly comma-separated list as is % done now---but what is in \package{docindex} at the moment seems to % satisfy all my current needs. % % % \section{Usage} % % \subsection{Straightforward usage} % % To make use of the \package{docindex} package in formatting the index % and list of changes of a \package{doc}-type \LaTeX\ document, you must % do the following: % \begin{enumerate} % \item Load the \package{docindex} package (or probably % rather the \package{docidx2e} package---see below). % \item Make sure that the index entries does not use any commands, % such as |\verb|, that rely on changing catcodes or otherwise % need to be executed before the entire entry text has been % tokenized. % \item Generate the \texttt{.ind} and \texttt{.gls} files using % \texttt{docindex.ist} as style file for \program{make\-index}. % \end{enumerate} % (Item~2 may seem like a monumental task if one considers what the % indices of \package{doc} documents traditionally looks like---there's % a |\verb| for every macro name in the index---but it is really not % that bad. \package{docindex} loads the \package{xdoc} package~^^A % \cite{xdoc} which redefines \texttt{macro}, the cross-referencing % mechanism, etc.\ so that the index entries generated by these no % longer uses |\verb|. What is left for you to deal with are merely % the possible uses of |\verb| in explicit |\index| or |\SortIndex| % commands.) % % What advantages are there then for the normal user in having % \package{docindex} formatting the index and list of changes, as % opposed to using the default mechanisms in the \package{doc} package? % I can only think of two: the index or list of changes may be typeset in % a single column and the same \program{makeindex} style file can be % used for both index and list of changes. Neither advantage is % significant. Instead the advantage of \package{docindex} lies in that % it becomes much simpler to change the formatting, which is rather an % advantage for advanced users which have special needs, and % in particular one can do this without having to supply e.g.\ extra % \program{makeindex} style files. % % Another important point is that what you will want to use is probably % not the \LaTeXplus\ \package{docindex} package, but the ``downgraded'' % \LaTeXe\ version \package{docidx2e}, as the former uses the % \package{galley2} package which currently wrecks pretty much all % justification in all existing document classes. \package{docidx2e} % provides the same features as \package{docindex}, but configuring it % is somewhat more cumbersome since \package{template} won't do most of % the coding for you. It is however rather straightforward to convert % a definition using the \package{docindex} package to something which % achieves the same results with the \package{docidx2e} package. % % % \subsection{Multiple indices} % % The \package{docindex} package makes it comparatively simple to % include several indices in the same document: all one has to do is % use an instance or template of type \texttt{docindex} for each index % one wishes to typeset. The syntax for using such an instance is % \begin{quote} % |\UseInstance{docindex}|\marg{instance}\marg{prologue}^^A % \marg{epilogue} % \end{quote} % The \meta{prologue} and \meta{epilogue} are texts which will be % printed just before and after the index, respectively, and either may % be empty. The text for the index itself is read from another file, % the name and extentsion of which are specified by the instance. The % \texttt{std} template prints the \meta{prologue} and \meta{epilogue} % in one-column mode, whereas the index itself can be printed in one- or % multicolumn mode (the default is three columns). % % The \package{doc} commands |\PrintIndex| and |\PrintGlossary| are % redefined to be % \begin{quote} % |\UseInstance{docindex}{index}{\index@prologue}{}| % \end{quote} % and % \begin{quote} % |\UseInstance{docindex}{changes}{\glossary@prologue}{}| % \end{quote} % respectively. The \texttt{index} and \texttt{changes} instances of % type \texttt{docindex} give the same formatting as the \package{doc} % defaults. (The \package{docidx2e} definitions even use the % \package{doc} package parameters where applicable, but in % \package{docindex} it is much simpler to redefine the instance from % scratch.) % % The format of the sorted index files (\texttt{.ind}, \texttt{.gls}, % etc.) that a \texttt{docindex} instance inputs is rather complicated % and I would suggest that the generation of these files is left to the % \program{makeindex} program, but the complete syntax is described in % Subsection~\ref{Ssec:ist}. The syntax of the unsorted index files % (\texttt{.idx}, \texttt{.glo}, etc.) is simpler; there are only a few % things that are different from the index files of the \package{doc} % package. % % The foremost difference is that the index entries should begin not % with |\indexentry| or |\glossaryentry|, but with |\docindexentry|. The % \package{xdoc} package provides hooks with which one can change these % texts in entries generated using the |\index| and |\glossary| commands % (as well as higher-level commands built on these, such as the % |\SortIndex| and |\changes| commands) and \package{docindex} will use % these hooks unless it gets passed the \describeoption{oldkeywords} % \texttt{oldkeywords} option. If you are creating a third unsorted % index file then you will have to make sure that the command for writing % to that file uses |\docindexentry| in the right place. % % The other difference concerns the composite page numbers. The string % which separates the parts of a composite page number is not a % hyphen `|-|', but the string `|\+|'. (The |\+| command is locally % defined for the typesetting of each index by the \texttt{docindex} % template being used, and the default is to typeset a hyphen.) Again % the \package{xdoc} package provides a hook for this, and this hook is % used by \package{docindex} unless it gets passed the % \texttt{oldkeywords} option. % % It also deserves to be listed which the metacharacters are that are % the same as in \package{doc} indices. The level separator is `|>|', % the sort~key\slash item~text separator is `|=|', and the quote % character is `|!|'. All other \program{makeindex} metacharacter % parameters have their default values. % % % % \subsection{Configuration} % % Configuration of the layout provided by the \package{docindex} % package is primarily done by redefining the \texttt{index} and % \texttt{changes} instances of type \texttt{docindex}, since these are % the instances that are used by the |\PrintIndex| and |\PrintChanges| % commands. % % The index in the \texttt{source2e.tex} file (the main driver for the % \LaTeXe\ source) differs from the default in three respects: it is set % in two columns rather than three, there is no seperator character % between the parts of a composite page number, and the pagestyle is set % to \texttt{docindex} during the index. This is set up by the % redefinition %\begin{verbatim} %\DeclareInstance{docindex}{index}{std}{ % columns=2, page-compositor={}, pagestyle=docindex %} %\end{verbatim} % (There are however also some changes of parameters related to % linebreaking; more on that in connection to configuration of the % \texttt{changes} instance below.) % % Another kind of modification can be found in the \package{tclldoc} % package~\cite{tclldoc}. Here the primary level in the index is used for % names of procedures and variables, whereas the secondary level for the % namespace of the same (the same name may have different definitions % in different namespaces). If there is only one namespace for a given % name then it is probably overkill to format them as two different % index items, but better to join them. This can be achieved through % the redefinition %\begin{verbatim} %\DeclareInstance{docindex}{index}{std}{% % item1=fixed-r1a, item2=aloneaccept2 %}% %\end{verbatim} % An item handled by the \texttt{fixed-r1a} instance (of type % \texttt{indexitem}) always tries to join with the following item but % rejects to join with the preceeding one. An item handled by the % \texttt{aloneaccept2} instance accepts to join with the preceeding % item if neither that nor the following item is a secondary level item. % Thus an item for a name will join with the following item for a % namespace if there is only one such item. As the reader no doubt % realises, this also solves the problem with the Bernoullis that was % described in the introduction. % % \pagebreak[1] % % As for configuring the list of changes formatting, it is instructive % to start by considering its default definition: %\begin{verbatim} %\DeclareInstance{docindex}{changes}{std}{ % file-extension = gls, % item2 = fixed-r2a-nocomma, % item3 = fixed-a3r, % columns = 2, % letter-format = , % letter-skip = 0pt %} %\end{verbatim} % In the list of changes a secondary level item (which contains the name % of the macro or whatever which was changed) is joined with the % following tertiary level item (which details the change that was made). % There are two columns and letter groups are not given any special % formatting. % % The definition of \texttt{changes} that would be used for % \texttt{source2e.tex} differs from the above in only one keyval, % namely \textit{body-setup}, but that contains quite a lot of material. % To begin with there is the default |\small| which selects the font. % Then there is a |\makeatletter| which is needed because some |\changes| % entries in the \LaTeX\ sources include commands (e.g.~|\TeX|) that % (when written to file) expand to other commands whose names include the % |@| character. If these are to be tokenized correctly, |@| must be a % letter when the \texttt{.gls} file is being inputted. Last, but not % least, there is a modification of the linebreaking parameters: %\begin{verbatim} %\UseTemplate{linebreak}{TeX}{ %\end{verbatim} % The file \texttt{source2e.tex} explicitly sets \textit{hbadness} and % \textit{hfuzz} to make \TeX\ shut up about over- and underfull hboxes. %\begin{verbatim} % hbadness=10000, hfuzz=\maxdimen, %\end{verbatim} % In addition to this, there are a couple of parameters that are set by % the \texttt{multicols} environment to values quite different from the % defaults of the \texttt{TeX} template and thus must be set too. Here % they are shown with their default values. The value of % \textit{emergency\-stretch} could probably be increased. %\begin{verbatim} % pretolerance=-1, tolerance=9999, emergencystretch=8pt %} %\end{verbatim} % Summing that up, we arrive at the following definition of the % \texttt{changes} instance for \texttt{source2e.tex}. %\begin{verbatim} %\DeclareInstance{docindex}{changes}{std}{ % file-extension = gls, % item2 = fixed-r2a-nocomma, % item3 = fixed-a3r, % columns = 2, % letter-format = , % letter-skip = 0pt, % body-setup = \small\makeatletter % \UseTemplate{linebreak}{TeX}{ % hbadness=10000, hfuzz=\maxdimen, % pretolerance=-1, tolerance=9999, emergencystretch=8pt % } %} %\end{verbatim} % % Another example can be found in the \package{fisource} % package\footnote{It should probably rather be made a document class, % but I haven't found it that necessary to change that aspect of it.}^^A % ~(v\,2.10 or later), which sets up formatting for the \program{fontinst} % source. There the list of changes should be set in one column, with % items from the tertiary level being joined with their parent % secondary level items iff the tertiary item is the only one having % that particular parent item. This is achieved through the definition %\begin{verbatim} %\DeclareInstance{docindex}{changes}{std}{% % file-extension = gls, % item2 = fixed-r2a-nocomma, % item3 = aloneaccept3, % columns = 1, % letter-format = {}, % letter-skip = 0pt % } %\end{verbatim} % where the difference to the default definition is in the values for % the \textit{item3} and \textit{columns} keys. % % For details on what they various keys mean, see the declaration of % the \texttt{std} template of type \texttt{docindex} on % page~\pageref{docindex:std}. % % With the \package{docidx2e} package, configuration follows the same % logic, even though it is much more technical as one has to define % the instances without the help of a template. The default instance % definitions for the \package{docidx2e} package are the % \begin{quote} % |\@namedef{TP@I{}{docindex}{index}}#1#2{|\dots|}|\\ % |\@namedef{TP@I{}{docindex}{changes}}#1#2{|\dots|}| % \end{quote} % that begin on pages~\pageref{p:index-instance} % and~\pageref{p:changes-instance} respectively. % % % % % % \StopEventually{ % % \begin{thebibliography}{9} % \bibitem{xindex} % Achim Blumensath: \textit{The \package{xindex} package}; % \textsc{http:}/\slash % \texttt{www-mgi.\nolinebreak[3]informatik.\nolinebreak[3]^^A % rwth-aachen.de}\slash \texttt{\textasciitilde blume}/. % \bibitem{makeindex-paper} % Pehong Chen, Michael A. Harrison: % \textit{Index Preparation and Processing}, % Software: practice \& experience, vol. \textbf{19}, no. 9 (1988), % 897--915; % Computer Science Tech. Report 87/347, University of California, % Berkeley, March 1987; % \textsc{ctan:}\discretionary{}{}{\thinspace}\texttt{indexing}^^A % \slash\texttt{makeindex}\slash\texttt{paper}\slash % \texttt{ind.tex}. % \bibitem{tclldoc} % Lars Hellstr\"om: % \textit{The \package{tclldoc} package and class}, % v\,2.20 or newer; % \textsc{ctan}:\discretionary{}{}{\thinspace}\texttt{macros}\slash % \texttt{latex}\slash \texttt{contrib}\slash % \texttt{tclldoc}\slash \texttt{tclldoc.dtx}. % Note: At the time of writing, this has not yet been uploaded % to CTAN. % \bibitem{xdoc} % Lars Hellstr\"om: % \textit{The \package{xdoc} package --- experimental % reimplementations of features from \package{doc}, % second~prototype}, 2000--2003; % \textsc{ctan}:\discretionary{}{}{\thinspace}\texttt{macros}\slash % \texttt{latex}\slash \texttt{contrib}\slash \texttt{xdoc}\slash % \texttt{xdoc2.dtx}. % \bibitem{xindy} % Roger Kehr: % \textit{\program{xindy} --- A Flexible Indexing System}; % \textsc{ctan}:\discretionary{}{}{\thinspace}\texttt{indexing}^^A % \slash\texttt{xindy}/. % \bibitem{LaTeX-project} % The \LaTeX3 Project: \textit{The \LaTeX\ Project Home Page}; % \textsc{http:}/\slash\texttt{www.latex-project.org}/. % \bibitem{multicol} % Frank Mittelbach: \textit{An environment for multicolumn output}; % \textsc{ctan}:\discretionary{}{}{\thinspace}\texttt{macros}\slash % \texttt{latex}\slash \texttt{required}\slash \texttt{tools}\slash % \texttt{multicol.dtx}. % \bibitem{doc} % Frank Mittelbach, B.~Hamilton Kelly, Andrew Mills, Dave Love, and % Joachim \mbox{Schrod}: \textit{The \package{doc} and % \package{shortvrb} Packages}, The \LaTeX3 Project; ^^A , 1993~ff. % \textsc{ctan}:\discretionary{}{}{\thinspace}\texttt{macros}\slash % \texttt{latex}\slash \texttt{base}\slash \texttt{doc.dtx}. % \end{thebibliography} % } % % % % % \section{Implementation} % % \subsection{\package{docstrip} modules} % % This file contains a number of \package{docstrip} module directives, % and many of these guard code that is not going to be used. In part % this mirrors the development of the code (and may get cleared up % eventually), but most of this duplication has to do with making the % code work in many different set-ups (some of which involve other % packages whose interface is rapidly changing). % % The modules which control \LaTeX\ code are: % \begin{description} % \item[\textsf{pkg}] % Main guard for code that is to end up in some \LaTeX\ package. % \item[\textsf{template}] % Guard for code which uses features of the \package{template} % package. This code will end up in the \package{docindex} package, % whereas the equivalent code which avoids using templates ends up % in the \package{docidx2e} package. % \item[\textsf{default}] % This code protects the default values for template keys. The % syntax for this is changing, so the default values are currently % being assigned in the template bodies instead. % \end{description} % % The modules which control \program{makeindex} style files are: % \begin{description} % \item[\textsf{ist}] % Code for the main style file \texttt{docindex.ist}. % \item[\textsf{idx}] % Code for a style file which is like the main one, but the input % parameters are set to the same values as in the standard \LaTeX\ % \texttt{gind.ist}. % \item[\textsf{glo}] % Code for a style file which is like the main one, but the input % parameters are set to the same values as in the standard \LaTeX\ % \texttt{gglo.ist}. % \end{description} % % % \subsection{Initial stuff} % % \begin{macrocode} %<*pkg> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage % % \end{macrocode} % \label{p:changes-instance} % \begin{macrocode} %<*!template> \@namedef{TP@I{}{docindex}{changes}}#1#2{% \begingroup \@letinstance\DI@indexitem@i{indexitem}{fixed1}% \@letinstance\DI@indexitem@ii{indexitem}{fixed-r2a-nocomma}% \@letinstance\DI@indexitem@iii{indexitem}{fixed-a3r}% \columnsep=10pt% \parskip=0pt plus 1pt% \def\DI@letter@skip{\z@skip}% \let\DI@letter@format\@gobble \def\+{-}% \IfFileExists{\jobname.gls}{% \ifnum \c@GlossaryColumns>\@ne \begin{multicols}{\c@GlossaryColumns}[#1][\GlossaryMin]% \else \enough@room{\GlossaryMin}% #1\par \addvspace\multicolsep \fi \small \makeatletter \@nobreakfalse \DI@ind@setup \input{\jobname.gls}% \DI@item@nojoin \ifnum \c@GlossaryColumns>\@ne \end{multicols}% \else \enough@room\postmulticols \addvspace\multicolsep \fi \normalsize #2\par }{\typeout{No file \jobname.gls.}} \endgroup } % % \end{macrocode} % \end{instance} % % \begin{macro}{\PrintIndex} % \begin{macro}{\PrintChanges} % The |\PrintIndex| and |\PrintChanges| commands are redefined to use % the respective instances of template type \texttt{docindex}. % \begin{macrocode} \renewcommand\PrintIndex{% \UseInstance{docindex}{index}{\index@prologue}{}% \global\let\PrintIndex\@empty } \renewcommand\PrintChanges{% \UseInstance{docindex}{changes}{\glossary@prologue}{}% \global\let\PrintChanges\@empty } % % \end{macrocode} % \end{macro}\end{macro} % % % \section{Notes and acknowledgements} % % The exact descriptions of the parameters of the \program{makeindex} % program is the paper \cite{makeindex-paper} by Chen and Harrison, but % I have seen claims that there are parameters not listed there % (presumably becuase they were added after this paper was written). % \texttt{docindex.ist} does not change any such undocumented % parameter, however. % % There are other index sorting programs than \package{makeindex} % around, such as for example \program{x\r{\i}ndy}~\cite{xindy}. % Should someone create index style files for such systems that are % equivalent (or superior, for that matter) to \texttt{docindex.ist} % then I would be happy to add them to the \package{docindex} % distribution. % % Most of the actual layout parameter settings used by the % \package{docindex} package are not of my design, but copied from % various other \LaTeX\ packages such as~\cite{multicol,doc} (mainly by % Frank Mittelbach). I have however tried to sort out which parameters % are actually in force under the various conditions---something which % turned out to be less obvious than I originally suspected. % % The idea to have the \texttt{docindex} type templates input the sorted % index file (rather than simply setting up the formatting of it as was % the case in v\,0.03) was taken from the \package{xindex} % package~\cite{xindex} by Achim Blumensath. % % \hbadness=10000 % % \Finale % % \endinput