diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/xdoc/docidx2e.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/xdoc/docidx2e.sty | 361 |
1 files changed, 361 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/xdoc/docidx2e.sty b/Master/texmf-dist/tex/latex/xdoc/docidx2e.sty new file mode 100644 index 00000000000..bc18077a954 --- /dev/null +++ b/Master/texmf-dist/tex/latex/xdoc/docidx2e.sty @@ -0,0 +1,361 @@ +%% +%% This is file `docidx2e.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% docindex.dtx (with options: `pkg') +%% +%% This file may be distributed and/or modified under the conditions +%% of the LaTeX Project Public License, either version 1.2 of this +%% license or (at your option) any later version. The latest version +%% of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% This file may only be distributed together with a copy of the source +%% file from which it was generated. You may distribute that source file +%% without this generated file. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage + {docidx2e} + [2001/04/11 v1.00 doc index formatting package] +\RequirePackage{multicol} +\RequirePackage{xdoc2}[2001/03/26] +\DeclareOption{oldkeywords}{} +\DeclareOption{usedocindexps}{} +\ProcessOptions\relax +\newcommand\indexitem{% + \relax + \expandafter\DI@indexitem \expandafter{\DI@last@level}% +}% +\def\DI@indexitem#1#2#3#4{% + \edef\DI@last@level{\number#2\expandafter}% + \ifnum #4=9 + \expandafter\expandafter \expandafter\DI@indexitem@ + \fi + \csname DI@indexitem@\romannumeral#2\expandafter\endcsname + {#1}{#4}{#3}\NoValue +} +\def\DI@indexitem@#1#2#3#4#5#6#7{#1{#2}{#7}{#4}{#6}} +\def\DI@last@level{0} +\@ifundefined{indexnewletter}{}{% + \PackageInfo + {docidx2e} + {Command \protect\indexnewletter\space redefined} +} +\outer\def\indexnewletter#1#2#3{% + \DI@item@nojoin + \ifnum #1=\z@ \vspace{\DI@letter@skip}\fi + \DI@letter@format{#2}% + \def\DI@last@level{0}% + \let\DI@item@join\@firstofone + \let\DI@item@nojoin\@empty +} +\@ifpackagewith + {docidx2e} + {oldkeywords}{}{ + \edef\XD@index@keyword{\@backslashchar xdocindexentry} + \let\XD@glossary@keyword\XD@index@keyword + \def\XD@page@compositor{\@backslashchar +} +} +\def\DI@ind@setup{\bgroup + \def\docindexguard##1{\egroup}% + \def\begin##1{% + \egroup + \PackageWarningNoLine + {docidx2e}% + {Ignoring old style index file} + \endinput + }% +} +\@ifpackageloaded{template}{ + \PackageWarningNoLine{docidx2e}{The docidx2e package is only meant% + \MessageBreak for use when LaTeX2e* packages like + template\MessageBreak are not available.} +}{} +\def\@letinstance#1#2#3{% + \expandafter\let \expandafter#1% + \csname TP@I% + {\expandafter\expandafter \expandafter\@firstoftwo + \csname TP@T{#2}\endcsname}% + {#2}{#3}% + \endcsname + \ifx \relax#1% + \expandafter\let \expandafter#1\csname TP@I{}{#2}{#3}\endcsname + \fi +} +\providecommand*\UseInstance[2]{% + \@letinstance\@tempa{#1}{#2}% + \ifx \relax\@tempa + \PackageError{docidx2e}{Instance #2 of type #1 undefined}\@eha + \else + \expandafter\@tempa + \fi +} +\@namedef{TP@T{justification}}{{}{0}} +\@namedef{TP@I{}{justification}{indexitem1}}{% + \leftskip=30\p@ + \rightskip=15\p@ + \parindent=-30\p@ + \parfillskip=-\rightskip +} +\@namedef{TP@I{}{justification}{indexitem2}}{% + \leftskip=30\p@ + \rightskip=15\p@ + \parindent=-15\p@ + \parfillskip=-\rightskip +} +\@namedef{TP@I{}{justification}{indexitem3}}{% + \leftskip=30\p@ + \rightskip=15\p@ + \parindent=-5\p@ + \parfillskip=-\rightskip +} +\@namedef{TP@T{indexitem}}{{}{4}} +\let\DI@item@join=\@firstofone +\let\DI@item@nojoin=\@empty +\@namedef{TP@I{}{indexitem}{fixed1}}#1#2#3#4{% + \@letinstance\DI@item@justification{justification}{indexitem1}% + \DI@item@nojoin + \DI@item@justification + \ifx \NoValue#4% + #3\nobreak\hfil\nopagebreak[2]% + \else + #3\pfill#4% + \fi + \let\DI@item@join\@firstofone + \let\DI@item@nojoin\@empty + \par +} +\@namedef{TP@I{}{indexitem}{fixed2}}#1#2#3#4{% + \@letinstance\DI@item@justification{justification}{indexitem2}% + \DI@item@nojoin + \DI@item@justification + \ifx \NoValue#4% + #3\nobreak\hfil\nopagebreak[2]% + \else + #3\pfill#4% + \fi + \let\DI@item@join\@firstofone + \let\DI@item@nojoin\@empty + \par +} +\@namedef{TP@I{}{indexitem}{fixed3}}#1#2#3#4{% + \@letinstance\DI@item@justification{justification}{indexitem3}% + \DI@item@nojoin + \DI@item@justification + \ifx \NoValue#4% + #3\nobreak\hfil\nopagebreak[2]% + \else + #3\pfill#4% + \fi + \let\DI@item@join\@firstofone + \let\DI@item@nojoin\@empty + \par +} +\@namedef{TP@I{}{indexitem}{fixed-r1a}}#1#2#3#4{% + \@letinstance\DI@item@justification{justification}{indexitem1}% + \DI@item@nojoin + \DI@item@justification + \ifx \NoValue#4% + #3% + \def\DI@item@join##1{, }% + \def\DI@item@nojoin{\nobreak\hfil\nopagebreak[4]\par}% + \else + #3\pfill#4\par + \let\DI@item@join\@firstofone + \let\DI@item@nojoin\@empty + \fi + \ignorespaces +} +\@namedef{TP@I{}{indexitem}{fixed-r2a-nocomma}}#1#2#3#4{% + \@letinstance\DI@item@justification{justification}{indexitem2}% + \DI@item@nojoin + \DI@item@justification + \ifx \NoValue#4% + #3% + \def\DI@item@join##1{ }% + \def\DI@item@nojoin{\nobreak\hfil\nopagebreak[4]\par}% + \else + #3\pfill#4\par + \let\DI@item@join\@firstofone + \let\DI@item@nojoin\@empty + \fi + \ignorespaces +} +\@namedef{TP@I{}{indexitem}{fixed-a3r}}#1#2#3#4{% + \@letinstance\DI@item@justification{justification}{indexitem3}% + \DI@item@join{\DI@item@justification}% + \ifx \NoValue#4% + #3\hfil\nopagebreak[2]% + \else + #3\pfill#4% + \fi + \let\DI@item@join\@firstofone + \let\DI@item@nojoin\@empty + \par +} +\@namedef{TP@I{}{indexitem}{aloneaccept2}}#1#2#3#4{% + \@letinstance\DI@item@justification{justification}{indexitem2}% + \ifnum #1=\tw@ + \DI@item@nojoin \DI@item@justification + \else\ifnum #2=\tw@ + \DI@item@nojoin \DI@item@justification + \else + \DI@item@join{\DI@item@justification}% + \fi\fi + \ifx \NoValue#4% + #3\nobreak\hfil\vadjust{}% + \else + #3\pfill #4% + \fi + \let\DI@item@join\@firstofone + \let\DI@item@nojoin\@empty + \par +} +\@namedef{TP@I{}{indexitem}{aloneaccept3}}#1#2#3#4{% + \@letinstance\DI@item@justification{justification}{indexitem3}% + \ifnum #1=\thr@@ + \DI@item@nojoin \DI@item@justification + \else\ifnum #2=\thr@@ + \DI@item@nojoin \DI@item@justification + \else + \DI@item@join{\DI@item@justification}% + \fi\fi + \ifx \NoValue#4% + #3\nobreak\hfil\vadjust{}% + \else + #3\pfill #4% + \fi + \let\DI@item@join\@firstofone + \let\DI@item@nojoin\@empty + \par +} +\@namedef{TP@T{docindex}}{{}{2}} +\@ifpackagewith{docidx2e}{usedocindexps}{% + \@namedef{TP@I{}{docindex}{index}}#1#2{% + \begingroup + \@letinstance\DI@indexitem@i{indexitem}{fixed1}% + \@letinstance\DI@indexitem@ii{indexitem}{fixed2}% + \@letinstance\DI@indexitem@iii{indexitem}{fixed3}% + \columnsep=10pt% + \parskip=0pt plus 1pt% + \def\DI@letter@skip{10pt plus 2pt minus 3pt}% + \def\DI@letter@format##1{% + \par + \hb@xt@\hsize{\hfil\textbf{##1}\hfil}% + \nopagebreak + }% + \def\+{-}% + \IfFileExists{\jobname.ind}{% + \ifnum \c@IndexColumns>\@ne + \begin{multicols}{\c@IndexColumns}[#1][\IndexMin]% + \else + \enough@room{\IndexMin}% + #1\par + \addvspace\multicolsep + \fi + \pagestyle{docindex}% + \small + \@nobreakfalse + \DI@ind@setup + \input{\jobname.ind}% + \DI@item@nojoin + \thispagestyle{docindex} + \ifnum \c@IndexColumns>\@ne + \end{multicols}% + \else + \enough@room\postmulticols + \addvspace\multicolsep + \fi + \normalsize #2\par + }{\typeout{No file \jobname.ind.}}% + \endgroup + } +}{% + \@namedef{TP@I{}{docindex}{index}}#1#2{% + \begingroup + \@letinstance\DI@indexitem@i{indexitem}{fixed1}% + \@letinstance\DI@indexitem@ii{indexitem}{fixed2}% + \@letinstance\DI@indexitem@iii{indexitem}{fixed3}% + \columnsep=10pt% + \parskip=0pt plus 1pt% + \def\DI@letter@skip{10pt plus 2pt minus 3pt}% + \def\DI@letter@format##1{% + \par + \hb@xt@\hsize{\hfil\textbf{##1}\hfil}% + \nopagebreak + }% + \def\+{-}% + \IfFileExists{\jobname.ind}{% + \ifnum \c@IndexColumns>\@ne + \begin{multicols}{\c@IndexColumns}[#1][\IndexMin]% + \else + \enough@room{\IndexMin}% + #1\par + \addvspace\multicolsep + \fi + \small + \@nobreakfalse + \DI@ind@setup + \input{\jobname.ind}% + \DI@item@nojoin + \ifnum \c@IndexColumns>\@ne + \end{multicols}% + \else + \enough@room\postmulticols + \addvspace\multicolsep + \fi + \normalsize #2\par + }{\typeout{No file \jobname.ind.}}% + \endgroup + } +} +\@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 +} +\renewcommand\PrintIndex{% + \UseInstance{docindex}{index}{\index@prologue}{}% + \global\let\PrintIndex\@empty +} +\renewcommand\PrintChanges{% + \UseInstance{docindex}{changes}{\glossary@prologue}{}% + \global\let\PrintChanges\@empty +} +\endinput +%% +%% End of file `docidx2e.sty'. |