diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-13 00:11:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-13 00:11:36 +0000 |
commit | f838b85c3a4cac820a92a9e2982572bf90b36650 (patch) | |
tree | 2a2364738927e42cc883e2697cf107091efb2e78 /Master/texmf-dist/tex | |
parent | b597e93bffc9e1e20fdcd64889c63ebdcad34aa8 (diff) |
xdoc
git-svn-id: svn://tug.org/texlive/trunk@1457 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/xdoc/docidx2e.sty | 361 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/xdoc/docindex.sty | 311 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/xdoc/xdoc2.sty | 1341 |
3 files changed, 2013 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'. diff --git a/Master/texmf-dist/tex/latex/xdoc/docindex.sty b/Master/texmf-dist/tex/latex/xdoc/docindex.sty new file mode 100644 index 00000000000..1450f812915 --- /dev/null +++ b/Master/texmf-dist/tex/latex/xdoc/docindex.sty @@ -0,0 +1,311 @@ +%% +%% This is file `docindex.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% docindex.dtx (with options: `pkg,template') +%% +%% 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 + {docindex} + [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 + {docindex} + {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 + {docindex} + {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 + {docindex}% + {Ignoring old style index file} + \endinput + }% +} +\RequirePackage{xhj,galley2} +\DeclareInstance{justification}{indexitem1}{single}{ + leftskip=30pt, rightskip=15pt, startskip=-30pt, parfillskip=-15pt, + linefillskip=0pt plus 1fil, parindent=0pt +} +\DeclareInstance{justification}{indexitem2}{single}{ + leftskip=30pt, rightskip=15pt, startskip=-15pt, parfillskip=-15pt, + linefillskip=0pt plus 1fil, parindent=0pt +} +\DeclareInstance{justification}{indexitem3}{single}{ + leftskip=30pt, rightskip=15pt, startskip=-5pt, parfillskip=-15pt, + linefillskip=0pt plus 1fil, parindent=0pt +} +\DeclareTemplateType{indexitem}{4} +\let\DI@item@join=\@firstofone +\let\DI@item@nojoin=\@empty +\DeclareTemplate{indexitem}{fixed}{4}{ + justification-setup =i{justification} \DI@item@justification, + pre-join =b + DI@prejoin@, + nofig-action =f1 + \DI@nofig, + fig-action =f2 + \DI@hasfig, + post-join =b + DI@postjoin@, + nojoin-extra =f0 + \DI@nojoin@extra, + join-extra =f0 + \DI@join@extra, + offjoin-extra =f0 + \DI@offjoin@extra +}{% + \let\ifDI@prejoin@\iffalse + \let\DI@nofig\@firstofone + \def\DI@hasfig##1##2{##1\pfill##2}% + \let\ifDI@postjoin@\iffalse + \def\DI@nojoin@extra{% + \hspace*{\justification@g}\protect\nopagebreak[2]% + }% + \def\DI@join@extra{,\space}% + \def\DI@offjoin@extra{% + \hspace*{\justification@g}\protect\nopagebreak[4]% + }% + \DoParameterAssignments + \ifDI@prejoin@ + \DI@item@join{\DI@item@justification}% + \else + \DI@item@nojoin\DI@item@justification + \fi + \let\DI@item@join\@firstofone + \let\DI@item@nojoin\@empty + \IfNoValueTF{#4}{% + \DI@nofig{#3}% + \ifDI@postjoin@ + \protected@edef\DI@item@join##1{\DI@join@extra}% + \protected@edef\DI@item@nojoin{\DI@offjoin@extra\protect\par}% + \else + \DI@nojoin@extra\par + \fi + }{% + \DI@hasfig{#3}{#4}% + \par + }% + \ignorespaces +} +\DeclareInstance{indexitem}{fixed1}{fixed} + {justification-setup = indexitem1} +\DeclareInstance{indexitem}{fixed2}{fixed} + {justification-setup = indexitem2} +\DeclareInstance{indexitem}{fixed3}{fixed} + {justification-setup = indexitem3} +\DeclareInstance{indexitem}{fixed-r1a}{fixed} + {justification-setup = indexitem1, post-join = true} +\DeclareInstance{indexitem}{fixed-r2a-nocomma}{fixed} + {justification-setup = indexitem2, + post-join = true, join-extra = {\space}} +\DeclareInstance{indexitem}{fixed-a3r}{fixed} + {justification-setup = indexitem3, pre-join = true} +\DeclareTemplate{indexitem}{aloneaccept}{4}{ + justification-setup =i{justification} \DI@item@justification, + ownlevel =C + \DI@this@level, + nofig-action =f1 + \DI@nofig, + fig-action =f2 + \DI@hasfig, + post-join =b + DI@postjoin@, + nojoin-extra =f0 + \DI@nojoin@extra, + join-extra =f0 + \DI@join@extra, + offjoin-extra =f0 + \DI@offjoin@extra +}{% + \def\DI@this@level{2}% + \let\DI@nofig\@firstofone + \def\DI@hasfig##1##2{##1\pfill##2}% + \let\ifDI@postjoin@\iffalse + \def\DI@nojoin@extra{\hspace*{\justification@g}}% + \def\DI@join@extra{,\space}% + \def\DI@offjoin@extra{\DI@nojoin@extra\protect\nopagebreak[4]}% + \DoParameterAssignments + \ifnum \DI@this@level=#1 + \DI@item@nojoin \DI@item@justification + \else\ifnum \DI@this@level=#2 + \DI@item@nojoin \DI@item@justification + \else + \DI@item@join{\DI@item@justification}% + \fi\fi + \let\DI@item@join\@firstofone + \let\DI@item@nojoin\@empty + \IfNoValueTF{#4}{% + \DI@nofig{#3}% + \ifDI@postjoin@ + \protected@edef\DI@item@join##1{\DI@join@extra}% + \protected@edef\DI@item@nojoin{\DI@offjoin@extra\protect\par}% + \else + \DI@nojoin@extra \par + \fi + }{% + \DI@hasfig{#3}{#4}% + \par + }% + \ignorespaces +} +\DeclareInstance{indexitem}{aloneaccept2}{aloneaccept} + {justification-setup = indexitem2, ownlevel = 2} +\DeclareInstance{indexitem}{aloneaccept3}{aloneaccept} + {justification-setup = indexitem3, ownlevel = 3} +\DeclareTemplateType{docindex}{2} +\DeclareTemplate{docindex}{std}{2}{ + file-name =n + \DI@file@name, + file-extension =n + \DI@file@ext, + item1 =i{indexitem} + \DI@indexitem@i, + item2 =i{indexitem} + \DI@indexitem@ii, + item3 =i{indexitem} + \DI@indexitem@iii, + reserved-height =L + \DI@reserved@height, + columns =C + \DI@columns, + column-sep =l + \columnsep, + prologue-setup =f0 + \DI@prologue@setup, + body-setup =f0 + \DI@body@setup, + epilogue-setup =f0 + \DI@epilogue@setup, + letter-skip =L + \DI@letter@skip, + letter-format =f1 + \DI@letter@format, + pagestyle =n + \DI@pagestyle, + parskip =l + \parskip, + page-compositor =f0 + \+ +}{% + \begingroup + \def\DI@file@name{\jobname}% + \def\DI@file@ext{ind}% + \@letinstance\DI@indexitem@i{indexitem}{fixed1}% + \@letinstance\DI@indexitem@ii{indexitem}{fixed2}% + \@letinstance\DI@indexitem@iii{indexitem}{fixed3}% + \def\DI@reserved@height{80pt}% + \def\DI@columns{3}% + \columnsep=10pt% + \let\DI@prologue@setup\@empty + \def\DI@body@setup{\small}% + \def\DI@epilogue@setup{\normalsize}% + \def\DI@letter@skip{10pt plus 2pt minus 3pt}% + \def\DI@letter@format##1{% + \UseInstance{justification}{center}% + \textbf{##1}\nopagebreak\par + }% + \parskip=\z@\@plus\p@ + \let\DI@pagestyle\@empty + \def\+{-}% + \DoParameterAssignments + \IfFileExists{\DI@file@name.\DI@file@ext}{% + \ifnum \DI@columns>\@ne + \begin{multicols}{\DI@columns}% + [\DI@prologue@setup #1][\DI@reserved@height]% + \else + \enough@room{\DI@reserved@height}% + \DI@prologue@setup #1\par + \addvspace\multicolsep + \fi + \ifx \DI@pagestyle\@empty \else \pagestyle{\DI@pagestyle}\fi + \DI@body@setup + \DI@ind@setup + \input{\DI@file@name.\DI@file@ext}% + \DI@item@nojoin + \ifx \DI@pagestyle\@empty \else + \expandafter\thispagestyle \expandafter{\DI@pagestyle}% + \fi + \ifnum \DI@columns>\@ne + \end{multicols}% + \else + \enough@room\postmulticols + \addvspace\multicolsep + \fi + \DI@epilogue@setup #2\par + }{\typeout{No file \DI@file@name.\DI@file@ext.}}% + \endgroup +} +\@ifpackagewith{docindex}{usedocindexps}{% + \DeclareInstance{docindex}{index}{std}{pagestyle=docindex}% +}{% + \DeclareInstance{docindex}{index}{std}{}% +} +\DeclareInstance{docindex}{changes}{std}{ + file-extension = gls, + item2 = fixed-r2a-nocomma, + item3 = fixed-a3r, + columns = 2, + letter-format = {}, + letter-skip = \z@skip +} +\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 `docindex.sty'. diff --git a/Master/texmf-dist/tex/latex/xdoc/xdoc2.sty b/Master/texmf-dist/tex/latex/xdoc/xdoc2.sty new file mode 100644 index 00000000000..40f60cfca36 --- /dev/null +++ b/Master/texmf-dist/tex/latex/xdoc/xdoc2.sty @@ -0,0 +1,1341 @@ +%% +%% This is file `xdoc2.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% xdoc2.dtx (with options: `pkg,xdoc2') +%% +%% 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}[1995/12/01] +\ProvidesPackage{xdoc2}[2003/07/06 prot2.5 doc reimplementation package] +\DeclareOption{dolayout}{% + \if@twoside + \setlength\oddsidemargin{\paperwidth} + \addtolength\oddsidemargin{-\textwidth} + \addtolength\oddsidemargin{-\evensidemargin} + \addtolength\oddsidemargin{-2in} + \fi +} +\DeclareOption{olddocinclude}{% + \PassOptionsToPackage{\CurrentOption}{xdoc2}% +} +\DeclareOption{fileispart}{% + \PassOptionsToPackage{\CurrentOption}{xdoc2}% +} +\DeclareOption{notrawchar}{% + \PassOptionsToPackage{\CurrentOption}{xdoc2}% +} +\ProcessOptions\relax +\RequirePackage{doc} +\@ifundefined{PrintChar}{}{% + \PackageInfo{xdoc2}{Redefining \protect\PrintChar}% +} +\def\PrintChar{% + \ifx \protect\@typeset@protect + \expandafter\XD@PrintChar + \else\ifx \protect\noexpand + \string\PrintChar + \expandafter\expandafter \expandafter\XD@threedignum + \else + \noexpand\PrintChar + \fi\fi +} +\edef\XD@threedignum#1{% + \string{% + \noexpand\ifnum #1<100 % + \noexpand\ifnum #1<10 0\noexpand\fi + 0% + \noexpand\fi + \noexpand\number#1% + \string}% +} +\def\XD@PrintChar#1{% + \leavevmode + \begingroup + \count@=#1\relax + \ifnum \@xxxii>\count@ + \advance \count@ 64% + \InvisibleCharPrefix + \PrintVisibleChar\count@ + \InvisibleCharSuffix + \else\ifnum 127>\count@ + \PrintVisibleChar\count@ + \else + \InvisibleCharPrefix + \ifnum 127=\count@ \PrintVisibleChar{63}\else + \@tempcnta=\count@ + \divide \count@ \sixt@@n + \@tempcntb=\count@ + \multiply \count@ \sixt@@n + \advance \@tempcnta -\count@ + \advance \@tempcntb \ifnum 9<\@tempcntb 87\else 48\fi + \advance \@tempcnta \ifnum 9<\@tempcnta 87\else 48\fi + \char\@tempcntb \char\@tempcnta + \fi + \InvisibleCharSuffix + \fi\fi + \endgroup +} +\newcommand\InvisibleCharPrefix{% + \/\em + \PrintVisibleChar{`\^}\PrintVisibleChar{`\^}% +} +\newcommand\InvisibleCharSuffix{\/} +\@ifpackagewith{xdoc2}{notrawchar}{% + \newcommand\PrintVisibleChar[1]{% + \ifcase #1% + \or\or\or\or\or\or\or\or \or\or\or\or\or\or\or\or + \or\or\or\or\or\or\or\or \or\or\or\or\or\or\or\or + % "20 + \textvisiblespace \or!\or\textquotedbl \or\#\or\textdollar + \or\%\or\&\or\textquoteright\or(\or)\or*\or+\or,\or-\or.\or/% + \or % "30 + 0\or1\or2\or3\or4\or5\or6\or7\or8\or9\or:\or;\or + \textless\or=\or\textgreater\or?% + \or % "40 + @\or A\or B\or C\or D\or E\or F\or G\or + H\or I\or J\or K\or L\or M\or N\or O% + \or % "50 + P\or Q\or R\or S\or T\or U\or V\or W\or X\or Y\or Z\or [\or + \textbackslash \or]\or\textasciicircum \or\textunderscore + \or % "60 + \textquoteleft \or a\or b\or c\or d\or e\or f\or g\or h\or + i\or j\or k\or l\or m\or n\or o% + \or % "70 + p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or z\or + \textbraceleft \or\textbar \or\textbraceright \or + \textasciitilde + \fi + }% +}{% + \newcommand\PrintVisibleChar[1]{\char #1\relax}% +} +\newcommand\Bslash{\PrintChar{92}} +\begingroup + \catcode\z@=12 + \@ifdefinable\SetHarmState{ + \gdef\SetHarmState#1#2#3{% + \begingroup + \ifx #1\BooleanTrue + \count@=#2\relax + \else + \protected@edef\@tempa{#2}% + \count@=\expandafter`\@tempa\relax + \fi + \ifx #3\BooleanTrue + \edef\@tempa{\noexpand\PrintChar{\the\count@}}% + \else + \uccode\z@=\count@ + \uppercase{\def\@tempa{^^@}}% + \fi + \global\expandafter\let + \csname XD@harmless@\the\count@ \endcsname \@tempa + \endgroup + }% + } +\endgroup +\count@=\z@ +\loop + \expandafter\xdef \csname XD@harmless@\the\count@ \endcsname + {\noexpand\PrintChar{\the\count@}}% + \advance \count@ \@ne +\ifnum 33>\count@ \repeat +\begingroup + \catcode\z@=12\relax + \@firstofone{% +\endgroup + \loop + \if \ifnum 11=\catcode\count@ 1\else \ifnum 12=\catcode\count@ + 1\else 0\fi\fi 1% + \uccode\z@=\count@ + \uppercase{\def\@tempa{^^@}}% + \else + \edef\@tempa{\noexpand\PrintChar{\the\count@}}% + \fi + \global\expandafter\let + \csname XD@harmless@\the\count@ \endcsname \@tempa + \advance \count@ \@ne + \ifnum 127>\count@ \repeat +} +\loop + \expandafter\xdef \csname XD@harmless@\the\count@ \endcsname + {\noexpand\PrintChar{\the\count@}}% +\ifnum \@cclv>\count@ + \advance \count@ \@ne +\repeat +\AtBeginDocument{% + \SetHarmState\BooleanFalse\actualchar\BooleanTrue + \SetHarmState\BooleanFalse\encapchar\BooleanTrue + \SetHarmState\BooleanFalse\levelchar\BooleanTrue + \SetHarmState\BooleanFalse\quotechar\BooleanTrue +} +\def\MakeHarmless#1#2{% + \begingroup + \toks@={}% + \escapechar=`\\% + \XD@harmless@#2\XD@harmless@ + \expandafter\endgroup \expandafter\def \expandafter#1% + \expandafter{\the\toks@}% +} +\def\XD@harmless@iii{% + \expandafter\futurelet \expandafter\@let@token + \expandafter\XD@harmless@iv \string +} +\def\XD@harmless@iv{% + \ifx \@let@token\@sptoken + \expandafter\XD@harmless@v + \else + \expandafter\XD@harmless@vi + \fi +} +\begingroup + \catcode`3=\catcode`a + \catcode`2=\catcode`a + \@firstofone{\gdef\XD@harmless@v} {% + \toks@=\expandafter{\the \expandafter\toks@ \XD@harmless@32}% + \XD@harmless@ + } +\endgroup +\def\XD@harmless@vi#1{% + \toks@=\expandafter{\the\expandafter\expandafter\expandafter\toks@ + \csname XD@harmless@\number`#1\endcsname}% + \XD@harmless@ +} +\def\XD@harmless@{\futurelet\@let@token \XD@harmless@i} +\def\XD@harmless@i{% + \ifcat \noexpand\@let@token \noexpand\XD@harmless@ + \expandafter\XD@harmless@ii + \else + \expandafter\XD@harmless@iii + \fi +} +\def\XD@harmless@ii#1{% + \@ifundefined{XD@harmless\string#1}{% + \expandafter\XD@harmless@vi \string#1% + }{\csname XD@harmless\string#1\endcsname}% +} +\expandafter\let + \csname XD@harmless\string\XD@harmless@\endcsname \@empty +\@namedef{XD@harmless\string\PrintChar}#1{% + \toks@=\expandafter{\the\expandafter\expandafter\expandafter\toks@ + \csname XD@harmless@\number#1\endcsname}% + \XD@harmless@ +} +\newcommand\SetCharProblematic[1]{% + \SetHarmState\BooleanTrue{#1}\BooleanTrue +} +\AtBeginDocument{% + \gdef\SetCharProblematic#1{% + \if@filesw + \immediate\write\@auxout{\string\SetHarmState + \string\BooleanTrue {\number#1}\string\BooleanTrue}% + \fi + }% +} +\def\@tempa#1{% + \rem@special{#1}% + \expandafter\gdef\expandafter\dospecials\expandafter + {\dospecials \do #1}% + \expandafter\gdef\expandafter\@sanitize\expandafter + {\@sanitize \@makeother #1}} +\ifx \@tempa\add@special + \def\add@special#1{% + \rem@special{#1}% + \expandafter\gdef\expandafter\dospecials\expandafter + {\dospecials \do #1}% + \expandafter\gdef\expandafter\@sanitize\expandafter + {\@sanitize \@makeother #1}% + \SetCharProblematic{`#1}% + } +\else + \PackageWarningNoLine{xdoc2}{Unfamiliar definition of + \protect\add@special;\MessageBreak the macro was not patched} +\fi +\newcommand\IndexEntry[3]{% + \@bsphack + \begingroup + \def\LevelSame##1{\levelchar##1}% + \def\LevelSorted##1##2{\levelchar##1\actualchar##2}% + \protected@edef\@tempa{#1}% + \protected@edef\@tempa{\expandafter\@gobble\@tempa\@empty}% + \@ifundefined{XD@idxencap@#2}{% + \PackageError{xdoc2}{Index entry encap `#2' unknown}\@eha + }{% + \XD@if@index{% + \csname XD@idxencap@#2\endcsname\@tempa{#3}% + }{}% + }% + \endgroup + \@esphack +} +\let\XD@if@index=\@secondoftwo +\newcommand*\levelsame{\LevelSame} +\newcommand*\levelsorted{\LevelSorted} +\def\XD@idxencap@none#1#2{% + \protected@write\@indexfile{}{\XD@index@keyword{#1}{#2}}% +} +\def\XD@idxencap@main#1#2{% + \protected@write\@indexfile{}% + {\XD@index@keyword{#1\encapchar main}{#2}}% +} +\def\XD@idxencap@usage#1#2{% + \protected@write\@indexfile{}% + {\XD@index@keyword{#1\encapchar usage}{#2}}% +} +\@ifundefined{XD@index@keyword}{% + \edef\XD@index@keyword{\@backslashchar indexentry}% +}{} +\renewcommand\CodelineIndex{% + \makeindex + \let\XD@if@index=\@firstoftwo + \codeline@indextrue + \def\TheXDIndexNumber{\thecodelineno}% +} +\renewcommand\PageIndex{% + \makeindex + \let\XD@if@index=\@firstoftwo + \codeline@indexfalse + \def\TheXDIndexNumber{\thepage}% +} +\def\TheXDIndexNumber{??} +\let\XD@operators@list\@empty +\newcommand\MakeSortKey[3]{% + \begingroup + \def\PrintChar{\string\PrintChar\XD@threedignum}% + #3% + \unrestored@protected@xdef\@gtempa{#2}% + \endgroup + \protected@edef#1{% + \expandafter\XD@operators@list \expandafter\@firstofone + \@gtempa\@empty + }% +} +\def\XD@make@operator#1{% + \begingroup + \def\PrintChar{\string\PrintChar\XD@threedignum}% + \let\protect\@gobble + \xdef\@gtempa{#1}% + \endgroup + \expandafter\edef \csname XD@operatorA@\@gtempa\endcsname + ##1\@firstofone##2\@empty{% + \expandafter\noexpand \csname XD@operatorB@\@gtempa\endcsname + \noexpand\@firstofone ##2\noexpand\@firstofone \@gtempa + \noexpand\@firstofone \relax##1\noexpand\@empty + }% + \expandafter\edef \csname XD@operatorB@\@gtempa \expandafter\endcsname + \expandafter##\expandafter1\expandafter\@firstofone \@gtempa + ##2\@firstofone##3\relax##4\@empty{% + \noexpand\ifx $##1$% + \noexpand\expandafter \noexpand\@firstoftwo + \noexpand\else + \noexpand\expandafter \noexpand\@secondoftwo + \noexpand\fi{% + ##4\noexpand\@firstofone ##2 \@gtempa + }{##4##1}% + \noexpand\@empty + }% + \toks@=\expandafter{\csname XD@operatorA@\@gtempa\endcsname}% +} +\newcommand\DoNotIndexBy[1]{% + \MakeHarmless\@tempa{#1}% + \XD@make@operator\@tempa + \expandafter\def \expandafter\XD@operators@list \expandafter{% + \the\expandafter\toks@ \XD@operators@list + }% +} +\renewcommand*\SortIndex[2]{% + \IndexEntry{\LevelSorted{#1}{#2}}{none}{\thepage}% +} +\renewcommand\SpecialIndex[1]{% + \expandafter\MakeHarmless \expandafter\@tempa + \expandafter{\string#1}% + \IndexEntry{% + \LevelSorted{% + \expandafter\XD@unbackslash \@tempa\@empty + }{\texttt{\@tempa}}% + }{none}{\TheXDIndexNumber}% +} +\renewcommand\SpecialMainIndex[1]{% + \expandafter\MakeHarmless \expandafter\@tempa + \expandafter{\string#1}% + \IndexEntry{% + \LevelSorted{% + \expandafter\XD@unbackslash \@tempa\@empty + }{\texttt{\@tempa}}% + }{main}{\TheXDIndexNumber}% +} +\renewcommand\SpecialUsageIndex[1]{% + \expandafter\MakeHarmless \expandafter\@tempa + \expandafter{\string#1}% + \IndexEntry{% + \LevelSorted{% + \expandafter\XD@unbackslash \@tempa\@empty + }{\texttt{\@tempa}}% + }{usage}{\thepage}% +} +\def\XD@unbackslash#1{% + \ifx \PrintChar#1% + \expandafter\XD@unbackslash@ + \else + \expandafter#1% + \fi +} +\def\XD@unbackslash@#1{\ifnum #1=92 \else \PrintChar{#1}\fi} +\renewcommand\SpecialMainEnvIndex[1]{% + \IndexEntry{\LevelSorted{#1}{\texttt{#1} (environment)}}{main}% + {\TheXDIndexNumber}% + \IndexEntry{\LevelSame{environments:}\LevelSorted{#1}{\texttt{#1}}}% + {main}{\TheXDIndexNumber}% +} +\renewcommand\SpecialEnvIndex[1]{% + \IndexEntry{\LevelSorted{#1}{\texttt{#1} (environment)}}{usage}% + {\thepage}% + \IndexEntry{\LevelSame{environments:}\LevelSorted{#1}{\texttt{#1}}}% + {usage}{\thepage}% +} +\def\it@is@a#1{% + \edef\@tempa{#1}% + \XD@special@index{\csname XD@harmless@\number + \expandafter`\@tempa\endcsname}% +} +\def\XD@special@index#1{% + \MakeSortKey\@tempa{#1}{}% + \IndexEntry{\LevelSorted{\@tempa}{\texttt{\Bslash#1}}}{none}% + {\TheXDIndexNumber}% +} +\renewcommand\LeftBraceIndex{\XD@special@index{\PrintChar{123}}} +\renewcommand\RightBraceIndex{\XD@special@index{\PrintChar{125}}} +\renewcommand\PercentIndex{\XD@special@index{\PrintChar{37}}} +\let\OldMakeIndex\relax +\def\@wrindex#1{% + \protected@write\@indexfile{}{\XD@index@keyword{#1}{\thepage}}% + \endgroup + \@esphack +} +\def\macro@switch{% + \ifcat\noexpand\next a% + \toks@={}% + \expandafter\macro@name + \else + \expandafter\short@macro + \fi +} +\def\scan@macro{% + \special@escape@char + \step@checksum + \ifscan@allowed + \def\next{\futurelet\next\macro@switch}% + \else \let\next\@empty \fi + \next} +\def\short@macro#1{% + \protected@edef\macro@namepart{% + \csname XD@harmless@\number`#1\endcsname + }% + \ifnot@excluded \XD@special@index{\macro@namepart}\fi + \scan@allowedfalse #1\scan@allowedtrue +} +\def\macro@name#1{% + \toks@=\expandafter{\the\expandafter\expandafter\expandafter\toks@ + \csname XD@harmless@\number`#1\endcsname}% + \futurelet\next\more@macroname} +\def\more@macroname{% + \ifcat\noexpand\next a% + \expandafter\macro@name + \else + \macro@finish + \fi +} +\def\macro@finish{% + \edef\macro@namepart{\the\toks@}% + \ifnot@excluded \XD@special@index{\macro@namepart}\fi + \macro@namepart +} +\def\XD@paren@PrintChar#1{\noexpand\PrintChar(\number#1)} +\renewcommand\DoNotIndex{% + \begingroup + \MakePrivateLetters + \catcode`\#=12\catcode`\\=12\catcode`,=12\catcode`\%=12 + \expandafter\endgroup \do@not@index +} +\begingroup + \catcode`\|=0 + \catcode`\,=12 + \catcode`\\=12 + |gdef|do@not@index#1{% + |def|@tempa{#1}% + |ifx |@empty|@tempa |else + |toks@={}% + |expandafter|XD@do@not@index |@gobble #1,\|XD@do@not@index,\% + |fi + } + |gdef|XD@do@not@index#1,\{% + |ifx |XD@do@not@index#1% + |index@excludelist=|expandafter{% + |the|expandafter|index@excludelist |the|toks@ + }% + |expandafter|@gobble + |else + |MakeHarmless|@tempa{#1}% + |begingroup + |let|PrintChar|XD@paren@PrintChar + |unrestored@protected@xdef|@gtempa{|noexpand|do|@tempa}% + |endgroup + |toks@=|expandafter{|the|expandafter|toks@ |@gtempa}% + |fi + |XD@do@not@index + } +|endgroup +\newcommand\DoNotIndexHarmless[1]{% + \begingroup + \let\PrintChar\XD@paren@PrintChar + \unrestored@protected@xdef\@gtempa{\noexpand\do#1}% + \endgroup + \index@excludelist=\expandafter{% + \the\expandafter\index@excludelist \@gtempa + }% +} +\edef\@tempa{\the\index@excludelist} +\index@excludelist{} +\ifx \@tempa\@empty \else + \def\@tempb#1,\@nil{\do@not@index{#1}} + \expandafter\@tempb \@tempa \@nil + \let\@tempa\@empty + \let\@tempb\@empty +\fi +\def\ifnot@excluded{% + \begingroup + \let\PrintChar\XD@paren@PrintChar + \edef\@tempa{\macro@namepart}% + \expandafter\endgroup \expandafter\expanded@notin + \expandafter{\expandafter\do \@tempa\do}% + {\the\index@excludelist}% +} +\newcommand\SendExternalXRefMsg[2]{% + \begingroup + \if@filesw + \let\protect\@unexpandable@protect + \immediate\write\@auxout{\@percentchar\@percentchar + ExternalXRefMsg {#1} {#2}}% + \fi + \endgroup +} +\newcommand\syncexternalxref{% + \if@filesw + \immediate\write\@auxout{\@percentchar\@percentchar + ExternalXRefSync {\the\inputlineno} {\thecodelineno}% + }% + \fi +} +\def\XD@input#1#2{% + \if@filesw + \immediate\write\@auxout{\@percentchar\@percentchar + ExternalXRefFile {begin} {#1} {#2}% + }% + \immediate\write\@auxout{\@percentchar\@percentchar + ExternalXRefSync {0} {\thecodelineno}% + }% + \fi + \input{#1}% + \if@filesw + \immediate\write\@auxout{\@percentchar\@percentchar + ExternalXRefFile {end} {#1} {#2}% + }% + \immediate\write\@auxout{\@percentchar\@percentchar + ExternalXRefSync {\the\inputlineno} {\thecodelineno}% + }% + \fi +} +\renewcommand\DocInput[1]{% + \relax + \ifnum \catcode`\%=14 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi{% + \MakePercentIgnore\XD@input{#1}{}\MakePercentComment + }{\XD@input{#1}{}}% +} +\renewcommand\IndexInput[1]{% + \begingroup + \macro@code + \frenchspacing + \@vobeyspaces + \XD@input{#1}{TeX}% + \endmacrocode + \endgroup +} +\let\IfOddPageSituation=\@secondoftwo +\if@twoside + \def\StepPageSituation{% + \global\advance \macro@cnt \@ne + \ifnum \XD@next@wrong<\macro@cnt + \global\@next\XD@next@wrong\XD@wrongs@list{}{% + \let\XD@next@wrong\maxdimen + }% + \fi + \ifnum \ifodd\c@page -\fi \@ne=% + \ifnum \XD@next@wrong=\macro@cnt -\fi \@ne + \global\let\IfOddPageSituation\@secondoftwo + \else + \global\let\IfOddPageSituation\@firstoftwo + \fi + } + \def\XD@next@wrong{-\maxdimen} + \let\XD@wrongs@list\@empty +\else + \let\StepPageSituation=\relax +\fi +\if@twoside + \def\RecordPageSituation{% + \if@filesw + \edef\@tempa{% + \string\XD@situation{\the\macro@cnt}{% + \ifodd\c@page 1\else 0\fi + }{\IfOddPageSituation{1}{0}}% + }% + \write\@auxout\expandafter{\@tempa{\ifodd\c@page 1\else 0\fi}}% + \fi + }% +\else + \let\RecordPageSituation=\relax +\fi +\if@twoside + \def\XD@situation#1#2#3#4{% + \if #2#4\else + \ifnum #1<\XD@next@wrong + \begingroup + \def\@elt##1##2##3{% + \noexpand\@elt + \ifcase + \ifx ##1\BooleanTrue 0% + \else\ifnum ##2<#1 1% + \else\ifnum ##2>#1 2% + \else 0% + \fi\fi\fi + \space + {##2}\expandafter\@secondoftwo + \or + {##2}\expandafter\@firstoftwo + \else + {#1}\noexpand\@elt{##2}\expandafter\@secondoftwo + \fi{##3\BooleanFalse}{##3\BooleanTrue}% + }% + \xdef\XD@wrongs@list{% + \expandafter\expandafter \expandafter\@elt + \expandafter\@firstoftwo \expandafter\BooleanFalse + \XD@wrongs@list \@gobble + }% + \endgroup + \else\ifnum #1>\XD@next@wrong + \def\XD@next@wrong{#1}% + \expandafter\gdef \expandafter\XD@wrongs@list + \expandafter{\XD@wrongs@list \@elt{#1}}% + \fi\fi + \fi + } + \def\XD@check@situation#1#2#3#4{% + \if #3#4\else + \PackageWarningNoLine{xdoc2}{Page breaks may have changed.% + \MessageBreak Rerun to get marginal material right}% + \let\XD@situation\@gobblefour + \fi + } + \AtBeginDocument{\global\let\XD@situation\XD@check@situation} +\else + \let\XD@situation\@gobblefour +\fi +\if@twoside + \def\XD@set@situation#1{% + \global\macro@cnt=#1\relax + \loop \ifnum \XD@next@wrong<\macro@cnt + \global\@next\XD@next@wrong\XD@wrongs@list{}{% + \let\XD@next@wrong\maxdimen + }% + \repeat + } +\else \let\XD@set@situation=\@gobble \fi +\if@twoside + \def\XD@write@situation@ckpt{% + \ifx \@elt\@wckptelt + \immediate\write\@partaux{% + \string\XD@set@situation{\the\macro@cnt}% + }% + \else + \noexpand\XD@write@situation@ckpt + \fi + } + \expandafter\def \expandafter\cl@@ckpt + \expandafter{\cl@@ckpt \XD@write@situation@ckpt} +\fi +\def\saved@macroname{{ }{\generalname}} +\newif\if@version@key@ +\@version@key@false +\newcommand*\uintver[1]{% + \if@version@key@ + \ifnum #1>9 + \ifnum #1<100 + A% + \else\ifnum #1<\@m + B% + \else\ifnum #1<\@M + C% + \else + D% + \fi\fi\fi + \fi + \fi + \expandafter\@firstofone \expandafter{\number#1}% +} +\def\changes@#1#2#3{% + \global\@version@key@true + \protected@edef\@tempa{#1}% + \global\@version@key@false + \protected@edef\@tempa{% + \noexpand\glossary{% + \@tempa\actualchar#1\levelchar + \expandafter\@firstoftwo\saved@macroname\actualchar + \expandafter\@secondoftwo\saved@macroname:\levelchar + #2\actualchar#3% + }% + }% + \@tempa + \endgroup + \@esphack +} +\def\@wrglossary#1{% + \protected@write\@glossaryfile{}% + {\XD@glossary@keyword{#1}{\thepage}}% + \endgroup + \@esphack +} +\@ifundefined{XD@glossary@keyword}{% + \edef\XD@glossary@keyword{\@backslashchar glossaryentry}% +}{} +\newcommand\definechange{% + \begingroup\@sanitize + \catcode`\\\z@ \catcode`\ 10 \MakePercentIgnore + \expandafter\endgroup \XD@definechange +} +\def\XD@definechange#1#2#3#4{\@namedef{XD@ch-#1}{{#2}{#3}{#4}}} +\newcommand*\usechange[1]{% + \@ifundefined{XD@ch-#1}{% + \PackageError{xdoc2}{Named change `#1' undefined}\@eha + }{% + \expandafter\expandafter \expandafter\XD@usechange + \csname XD@ch-#1\endcsname + }% +} +\def\XD@usechange#1#2#3{% + \def\@tempa{{ }{\generalname}}% + \ifx \@tempa\saved@macroname + \let\@tempa\@empty + \else + \protected@edef\@tempa{% + \encapchar labelednumber% + {\expandafter\@secondoftwo\saved@macroname}% + } + \fi + \global\@version@key@true + \protected@edef\@tempb{#1}% + \global\@version@key@false + \glossary{% + \@tempb\actualchar #1\levelchar + \space\actualchar\generalname:\levelchar + #2\actualchar#3\@tempa + }% +} +\newcommand*\labelednumber[2]{#2\nolinebreak[2] (#1)} +\def\XD@grab@arguments#1#2{% + \toks@={#1}% + #2\XD@endgrab +} +\def\XD@endgrab{\the\toks@} +\long\def\XD@grab@marg#1\XD@endgrab#2{% + \addto@hook\toks@{{#2}}% + #1\XD@endgrab +} +\def\XD@grab@oarg#1\XD@endgrab{% + \@ifnextchar[{\XD@grab@oarg@{#1}}{% + \addto@hook\toks@\NoValue + #1\XD@endgrab + }% +} +\long\def\XD@grab@oarg@#1[#2]{% + \addto@hook\toks@{{#2}}% + #1\XD@endgrab +} +\def\XD@grab@sarg#1#2\XD@endgrab{% + \@ifnextchar#1{% + \addto@hook\toks@\BooleanTrue + \@firstoftwo{#2\XD@endgrab}% + }{% + \addto@hook\toks@\BooleanFalse + #2\XD@endgrab + }% +} +\def\XD@grab@withprivate{% + \begingroup\MakePrivateLetters\relax\expandafter\endgroup + \XD@grab@marg +} +\def\XD@grab@asmacro{% + \begingroup + \catcode`\\=12 \MakePrivateLetters\relax + \expandafter\endgroup + \XD@grab@marg +} +\def\XD@grab@harmless#1#2\XD@endgrab#3{% + \MakeHarmless\@tempa{#3}% + #1% + \toks@=\expandafter{\the\expandafter\toks@ \expandafter{\@tempa}}% + #2\XD@endgrab +} +\def\XD@grab@harmless@oarg#1\XD@endgrab{% + \@ifnextchar[{\XD@grab@harmless@oarg@{#1}}{% + \addto@hook\toks@\NoValue + #1\XD@endgrab + }% +} +\long\def\XD@grab@harmless@oarg@#1[#2]{% + \MakeHarmless\@tempa{#2}% + \toks@=\expandafter{\the\expandafter\toks@ \expandafter{\@tempa}}% + #1\XD@endgrab +} +\def\XD@grab@harmless@asmacro{% + \begingroup + \catcode`\\=12 \MakePrivateLetters\relax + \expandafter\endgroup + \XD@grab@harmless{% + \protected@edef\@tempa{% + \expandafter\XD@unbackslash\@tempa\@empty + }% + }% +} +\def\XD@grab@harmless@cs{% + \begingroup + \MakePrivateLetters\relax + \expandafter\endgroup \XD@grab@harmless@cs@ +} +\long\def\XD@grab@harmless@cs@#1\XD@endgrab#2{% + \begingroup + \escapechar=\m@ne + \expandafter\endgroup + \expandafter\MakeHarmless \expandafter\@tempa + \expandafter{\string#2}% + \toks@=\expandafter{\the\expandafter\toks@ \expandafter{\@tempa}}% + #1\XD@endgrab +} +\def\XD@grab@harmless@withprivate{% + \begingroup\MakePrivateLetters\relax\expandafter\endgroup + \XD@grab@harmless +} +\def\XDStackItemLabels#1{% + \setbox\z@=\vbox{% + \ifdim \XD@macro@dimen=-\maxdimen + \setbox\z@=\vtop{% + \color@begingroup + \everypar={}% + #1% + \color@endgroup + }% + \kern-\ht\z@ + \unvbox\z@ + \else + \color@begingroup + \everypar={}% + \kern\XD@macro@dimen + \setbox\z@=\copy\strutbox \ht\z@=\z@ \box\z@ + #1% + \color@endgroup + \fi + \boxmaxdepth=\dp\strutbox + }% + \global\XD@macro@dimen=\ht\z@ + \vtop to\z@{\unvbox\z@ \vss}% +} +\newdimen\XD@macro@dimen +\newcommand\XDToMargin[1]{% + \hb@xt@\z@{% + \IfOddPageSituation{% + \dimen@=-\@totalleftmargin + \advance \dimen@ \labelsep + \advance \dimen@ \textwidth + \advance \dimen@ \marginparsep + \kern\dimen@ + }\hss + #1% + \IfOddPageSituation\hss{% + \dimen@=\@totalleftmargin + \advance \dimen@ -\labelsep + \advance \dimen@ \marginparsep + \kern\dimen@ + }% + }% +} +\newcommand\XDParToMargin[1]{% + \parindent=\z@ + \setbox\z@=\vbox{% + \leftskip=\z@skip + \rightskip=\z@\@plus 1fil% + \parfillskip=\z@skip + \hsize=\marginparwidth + \linepenalty=1000% + \color@begingroup + \noindent\ignorespaces #1\@@par + \color@endgroup + \expandafter}% + \expandafter\ifnum \the\prevgraf<\tw@ + \XDToMargin{#1}% + \else + \hsize=\z@ + \leftskip=\z@ \@plus \marginparwidth + \rightskip=\leftskip + \IfOddPageSituation{% + \dimen@=-\@totalleftmargin + \advance \dimen@ \labelsep + \advance \dimen@ \textwidth + \advance \dimen@ \marginparsep + \advance \leftskip \dimen@ + \advance \rightskip -\dimen@ \@minus \p@ + \advance \rightskip -\marginparwidth + \parfillskip=\z@ \@plus 1fil% + }{% + \dimen@=\@totalleftmargin + \advance \dimen@ -\labelsep + \advance \dimen@ \marginparsep + \advance \leftskip -\dimen@ \@minus \p@ + \advance \leftskip -\marginparwidth + \advance \rightskip \dimen@ + \parfillskip=\z@ \@plus -\marginparwidth% + } + \noindent\nobreak\hskip\parfillskip + \ignorespaces #1\@@par + \fi +} +\def\XD@m@cro#1#2#3#4{% + \topsep\MacroTopsep + \trivlist + \global\setbox\@labels=\hbox{% + \unhbox\@labels + \if@inlabel \else + \global\XD@macro@dimen=-\maxdimen + \StepPageSituation + \RecordPageSituation + \fi + \advance \c@codelineno \@ne + #2% + }% + \let\makelabel\XDStackItemLabels + \item[#1]% + \protected@edef\saved@macroname{#3}% + #4% + \ignorespaces +} +\newcommand\NewMacroEnvironment{% + \@ifstar\XD@NewMacroEnvironment\XD@NewMacroEnvironment@ +} +\def\XD@NewMacroEnvironment@#1#2#3#4{% + \XD@NewMacroEnvironment{#1}{#2}{#3}{\XDToMargin{#4}}% +} +\def\XD@NewMacroEnvironment#1#2#3#4#5#6#7{% + \expandafter\@ifdefinable\csname#1\endcsname{% + \expandafter\def \csname#1\expandafter\endcsname + \expandafter{\expandafter\XD@grab@arguments + \csname\@backslashchar#1\endcsname{#2}}% + \let\l@ngrel@x\relax + \expandafter\@yargdef \csname\@backslashchar#1\endcsname \@ne + {#3}{\XD@m@cro{#4}{#5}{#6}{#7}}% + \expandafter\let \csname end#1\endcsname \endtrivlist + }% +} +\newcommand\XDMainIndex[1]{\IndexEntry{#1}{main}{\TheXDIndexNumber}} +\let\macro=\relax +\let\endmacro=\relax +\NewMacroEnvironment{macro}{\XD@grab@harmless@asmacro}{1} + {\MacroFont\Bslash#1} + {\MakeSortKey\@tempa{#1}{}% + \XDMainIndex{\LevelSorted{\@tempa}{\texttt{\Bslash#1}}}} + {{#1}{\texttt{\Bslash#1}}} + {\DoNotIndexHarmless{#1}} +\let\environment=\relax +\let\endenvironment=\relax +\NewMacroEnvironment{environment}{\XD@grab@harmless@asmacro}{1} + {\MacroFont#1} + {\XDMainIndex{\LevelSorted{#1}{\texttt{#1} (environment)}}% + \XDMainIndex{% + \LevelSame{environments:}\LevelSorted{#1}{\texttt{#1}}% + }}% + {{#1}{\texttt{#1}}} + {}% +\NewMacroEnvironment{option}{\XD@grab@harmless\relax}{1} + {\MacroFont#1 \normalfont option} + {\XDMainIndex{\LevelSorted{#1}{\texttt{#1} option}}% + \XDMainIndex{% + \LevelSame{options:}\LevelSorted{#1}{\texttt{#1}}% + }}% + {{#1 option}{\texttt{#1} option}} + {}% +\NewMacroEnvironment{switch}{\XD@grab@harmless\relax}{1} + {\MacroFont#1 \normalfont switch}% + {% + \MakeSortKey\XD@last@key{#1}{}% + \XDMainIndex{% + \LevelSame{switches:}\LevelSorted{\XD@last@key}{\texttt{#1}}% + }% + \XDMainIndex{\LevelSorted{\XD@last@key}{\texttt{#1} switch}}% + \XDMainIndex{\LevelSorted{if#1}{\texttt{\Bslash if#1}}}% + \MakeSortKey\@tempa{#1false}{}% + \XDMainIndex{\LevelSorted{\@tempa}{\texttt{\Bslash#1false}}}% + \MakeSortKey\@tempa{#1true}{}% + \XDMainIndex{\LevelSorted{\@tempa}{\texttt{\Bslash#1true}}}% + }% + {{#1}{\texttt{#1} switch}} + {\DoNotIndexHarmless{if#1}% + \DoNotIndexHarmless{#1false}% + \DoNotIndexHarmless{#1true}}% +\if@twoside + \@mparswitchtrue + \normalmarginpar +\fi +\newcommand\GenericDescribePrint[1]{% + \setbox\z@=\vbox{% + \parindent=\z@ + \leftskip=\z@skip + \rightskip=\z@\@plus 1fil% + \parfillskip=\z@skip + \hsize=\marginparwidth + \linepenalty=\@m + \color@begingroup + \noindent\ignorespaces #1\@@par + \color@endgroup + \expandafter}% + \expandafter\ifnum \the\prevgraf<\tw@ + \if@twoside + \marginpar[{\raggedleft\strut #1}]{\raggedright\strut #1}% + \else + \marginpar{\raggedleft\strut#1}% + \fi + \else + \if@twoside + \marginpar[{% + \leftskip=\z@ \@plus \marginparwidth + \rightskip=\leftskip + \parfillskip=\z@ \@plus -\marginparwidth + \noindent\nobreak\hskip\parfillskip + \ignorespaces #1% + }]{% + \leftskip=\z@ \@plus \marginparwidth + \rightskip=\leftskip + \parfillskip=\z@ \@plus 1fil% + \noindent\nobreak\hskip\parfillskip + \ignorespaces #1% + }% + \else + \marginpar{% + \leftskip=\z@ \@plus \marginparwidth + \rightskip=\leftskip + \parfillskip=\z@ \@plus -\marginparwidth + \noindent\nobreak\hskip\parfillskip + \ignorespaces #1% + }% + \fi + \fi +} +\newcommand\NewDescribeCommand[4]{% + \@ifdefinable#1{% + \expandafter\def \expandafter#1\expandafter{% + \expandafter\XD@grab@arguments \csname\string#1\endcsname{#2}% + }% + \let\l@ngrel@x\relax + \expandafter\@yargdef \csname\string#1\endcsname \@ne {#3}% + {\leavevmode#4\ignorespaces}% + }% +} +\let\DescribeMacro=\relax +\NewDescribeCommand\DescribeMacro{\XD@grab@harmless@cs}{1}{% + \GenericDescribePrint{\MacroFont\Bslash#1}% + \MakeSortKey\@tempa{#1}{}% + \IndexEntry{% + \LevelSorted{\@tempa}{\texttt{\Bslash#1}}% + }{usage}{\thepage}% +} +\let\DescribeEnv=\relax +\NewDescribeCommand\DescribeEnv{% + \XD@grab@harmless@withprivate\relax +}{1}{% + \GenericDescribePrint{\MacroFont#1}% + \IndexEntry{% + \LevelSame{environments:}\LevelSorted{#1}{\texttt{#1}}% + }{usage}{\thepage}% + \IndexEntry{% + \LevelSorted{#1}{\texttt{#1} (environment)}% + }{usage}{\thepage}% +} +\NewDescribeCommand\describeoption{\XD@grab@harmless\relax}{1}{% + \GenericDescribePrint{\MacroFont#1 \normalfont option}% + \IndexEntry{% + \LevelSame{options:}\LevelSorted{#1}{\texttt{#1}}% + }{usage}{\thepage}% + \IndexEntry{% + \LevelSorted{#1}{\texttt{#1} option}% + }{usage}{\thepage}% +} +\NewDescribeCommand\describecsfamily{\XD@grab@harmless{}}{1}{% + \GenericDescribePrint{% + \MetaNormalfont\MacroFont\Bslash#1% + }% + \MakeSortKey\@tempa{#1}{\def\meta##1{(##1)}}% + \IndexEntry{% + \LevelSorted{\@tempa}{\texttt{\protect\MetaNormalfont\Bslash#1}}% + }{usage}{\thepage}% +} +\@ifpackagewith{xdoc2}{olddocinclude}{% + \@ifclassloaded{ltxdoc}{% + \renewcommand\CodelineIndex{% + \makeindex + \let\XD@if@index=\@firstoftwo + \codeline@indextrue + \def\TheXDIndexNumber{\filesep\thecodelineno}% + }% + \expandafter\def \expandafter\docincludeaux \expandafter{% + \docincludeaux + \gdef\filesep{\thepart\XD@page@compositor}% + } + \def\@docinclude#1 {% + \clearpage + \if@filesw + \immediate\write\@mainaux{\string\@input{#1.aux}}% + \fi + \@tempswatrue + \if@partsw + \@tempswafalse + \edef\@tempb{#1}% + \@for\@tempa:=\@partlist\do{% + \ifx\@tempa\@tempb\@tempswatrue\fi + }% + \fi + \if@tempswa + \let\@auxout\@partaux + \if@filesw + \immediate\openout\@partaux #1.aux + \immediate\write\@partaux{\relax}% + \fi + \part{#1.dtx}% + \if@filesw + \immediate\write\@partaux{\@percentchar\@percentchar + ExternalXRefWrap {\filesep} {}% + }% + \fi + {% + \let\ttfamily\relax + \xdef\filekey{% + \filekey, \thepart={\ttfamily\currentfile}% + }% + }% + \DocInput{#1.dtx}% + \clearpage + \@writeckpt{#1}% + \if@filesw \immediate\closeout\@partaux \fi + \else + \@nameuse{cp@#1}% + \fi + \let\@auxout\@mainaux + } + }{} +}{} +\@ifpackagewith{xdoc2}{olddocinclude}{}{% + \def\DocInclude#1{% + \ifnum\@auxout=\@partaux + \@latexerr{\string\include\space cannot be nested}{% + Your \protect\DocInclude\space will be reduced to a + \protect\DocInput.% + }% + \DocInput{#1.dtx}% + \else \@docinclude#1 \fi + }% + \def\@docinclude#1 {% + \clearpage + \if@filesw + \immediate\write\@mainaux{\string\@input{#1.aux}}% + \fi + \@tempswatrue + \if@partsw + \@tempswafalse + \edef\@tempb{#1}% + \@for\@tempa:=\@partlist\do{% + \ifx\@tempa\@tempb \@tempswatrue \fi + }% + \fi + \if@tempswa + \let\@auxout\@partaux + \if@filesw + \immediate\openout\@partaux #1.aux + \immediate\write\@partaux{\relax}% + \fi + \docincludeaux{#1.dtx}% + \DocInput{#1.dtx}% + \clearpage + \@writeckpt{#1}% + \if@filesw \immediate\closeout\@partaux \fi + \else + \deadcycles\z@ + \@nameuse{cp@#1}% + \fi + \let\@auxout\@mainaux + }% +}{} +\@ifpackagewith{xdoc2}{olddocinclude}{\iffalse}{ + \@ifpackagewith{xdoc2}{fileispart}{\iftrue}{ + \let\docincludeaux=\@gobble + \iffalse + } +} % If fileispart and not olddocinclude then + \def\docincludeaux#1{% + \MakeHarmless\currentfile{#1}% + \part{\texttt{\currentfile}}% + \pagestyle{docpart}% + \let\filedate\@empty + \let\fileversion\@empty + \let\fileinfo\@empty + \protected@xdef\filekey{% + \filekey, \thepart=\texttt{\currentfile}% + }% + \if@filesw + \immediate\write\@partaux{\@percentchar\@percentchar + ExternalXRefWrap {\thepart\XD@page@compositor} {}% + }% + \fi + }% + \@ifclassloaded{ltxdoc}{}{\@addtoreset{codelineno}{part}}% + \renewcommand\CodelineIndex{% + \makeindex + \let\XD@if@index=\@firstoftwo + \codeline@indextrue + \def\TheXDIndexNumber{\thepart\XD@page@compositor\thecodelineno}% + }% + \def\partname{File} + \def\thepart{\aalph{part}} + \expandafter\def \expandafter\IndexParms + \expandafter{\IndexParms \pagestyle{docindex}} + \PassOptionsToPackage{usedocindexps}{docindex} + \PassOptionsToPackage{usedocindexps}{docidx2e} +\fi +\@ifpackagewith{xdoc2}{olddocinclude}{}{% + \def\ps@docpart{% + \def\@oddfoot{% + File: \texttt{\currentfile}% + \ifx \filedate\@empty \else \ Date: \filedate\fi + \ifx \fileversion\@empty \else \ Version: \fileversion\fi + \hfill\thepage + }% + \if@twoside + \def\@evenfoot{% + \thepage\hfill + File: \texttt{\currentfile}% + \ifx \filedate\@empty \else \ Date: \filedate\fi + \ifx \fileversion\@empty \else \ Version: \fileversion\fi + }% + \else \let\@evenfoot\@oddfoot \fi + } + \newcommand\setfileinfo[1][]{% + \edef\@tempa{#1}% + \expandafter\XD@set@file@info \@tempa\@empty? ? \@empty\@empty + } + \def\XD@set@file@info#1 #2 #3\@empty#4\@empty{% + \def\filedate{#1}% + \def\fileversion{#2}% + \def\fileinfo{#3}% + } +}{} + \def\ps@docindex{% + \def\@oddfoot{% + \parbox{\textwidth}{% + \strut\footnotesize\raggedright + \textbf{File Key:} \filekey\@empty + }% + }% + \let\@evenfoot\@oddfoot + }% + \let\filekey\@gobble +\providecommand*\aalph[1]{\@aalph{\csname c@#1\endcsname}} +\providecommand*\@aalph[1]{% + \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or + j\or k\or l\or m\or n\or o\or p\or q\or r\or s\or + t\or u\or v\or w\or x\or y\or z\or A\or B\or C\or + D\or E\or F\or G\or H\or I\or J\or K\or L\or M\or + N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or + X\or Y\or Z\else\@ctrerr\fi +} +\providecommand*\XD@page@compositor{-} +\@ifundefined{BooleanFalse}{\def\BooleanFalse{TF}}{} +\@ifundefined{BooleanTrue}{\def\BooleanTrue{TT}}{} +\@ifundefined{NoValue}{\def\NoValue{-NoValue-}}{} +\begingroup +\obeyspaces% +\catcode`\^^M\active% +\gdef\@gtempa{\begingroup\obeyspaces\catcode`\^^M\active% +\let^^M\do@space\let \do@space% +\def\-{\egroup\discretionary{-}{}{}\hbox\bgroup\itshape}% +\m@ta}% +\endgroup +\ifx \meta\@gtempa + \@ifundefined{l@nohyphenation}{\newlanguage\l@nohyphenation}{} + \DeclareRobustCommand\meta[1]{% + \ensuremath\langle + \ifmmode \expandafter \nfss@text \fi + {% + \meta@font@select + \edef\meta@hyphen@restore + {\hyphenchar\the\font\the\hyphenchar\font}% + \hyphenchar\font\m@ne + \language\l@nohyphenation + #1\/% + \meta@hyphen@restore + }\ensuremath\rangle + } + \let\meta@font@select=\itshape +\fi +\newcommand\MetaNormalfont{\def\meta@font@select{\normalfont\itshape}} +\@namedef{XD@harmless\string\meta}#1{% + \toks@=\expandafter{\the\toks@ \meta{#1}}% + \XD@harmless@ +} +\renewcommand\check@checksum{% + \relax + \ifnum \check@sum=\z@ + \PackageInfo{doc}{This macro file has no checksum!\MessageBreak + The checksum should be \the\bslash@cnt}% + \else\ifnum \check@sum=\bslash@cnt + \typeout{*******************}% + \typeout{* Checksum passed *}% + \typeout{*******************}% + \else + \PackageError{doc}{Checksum not passed (\the\check@sum + <>\the\bslash@cnt)}{The file currently documented seems + to be wrong.\MessageBreak Try to get a correct version.}% + \fi\fi + \global\check@sum\z@ +} +\@ifundefined{c@codelineno}{}{% + \PackageInfo{xdoc2}{Overwriting codelineno counter}% +} +\let\c@codelineno=\c@CodelineNo +\let\cl@codelineno=\@empty +\let\p@codelineno=\@empty +\def\thecodelineno{\@arabic\c@codelineno} +\newcommand\PrintCodelineNo{\reset@font\scriptsize\thecodelineno} +\def\theCodelineNo{\PrintCodelineNo} +\endinput +%% +%% End of file `xdoc2.sty'. |