home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / texmf / inputs / latex / unpacked / doc.sty < prev    next >
Text File  |  1995-06-21  |  30KB  |  797 lines

  1. %% 
  2. %% This is file `doc.sty', generated 
  3. %% on <1995/6/21> with the docstrip utility (2.2i).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% doc.dtx  (with options: `package')
  8. %% 
  9. %% 
  10. %% This is a generated file. 
  11. %% 
  12. %% Copyright 1993-1995 the LaTeX3 project and any individual authors 
  13. %% listed elsewhere in this file. All rights reserved. 
  14. %% 
  15. %% For further copyright information see the file legal.txt, and any 
  16. %% other copyright notices in this file. 
  17. %% 
  18. %% This file is part of the LaTeX2e system. 
  19. %% ---------------------------------------- 
  20. %% This system is distributed in the hope that it will be useful, 
  21. %% but WITHOUT ANY WARRANTY; without even the implied warranty of 
  22. %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
  23. %% 
  24. %% For error reports concerning UNCHANGED versions of this file no more 
  25. %% than one year old, see bugs.txt. 
  26. %% 
  27. %% Please do not request updates from us directly. Primary 
  28. %% distribution is through the CTAN archives. 
  29. %% 
  30. %% 
  31. %% IMPORTANT COPYRIGHT NOTICE: 
  32. %% 
  33. %% You are NOT ALLOWED to distribute this file alone. 
  34. %% 
  35. %% You are allowed to distribute this file under the condition that it is 
  36. %% distributed together with all the files listed in manifest.txt. 
  37. %% 
  38. %% If you receive only some of these files from someone, complain! 
  39. %% 
  40. %% Permission is granted to copy this file to another file with a clearly 
  41. %% different name and to customize the declarations in that copy to serve 
  42. %% the needs of your installation, provided that you comply with 
  43. %% the conditions in the file legal.txt. 
  44. %% 
  45. %% However, NO PERMISSION is granted to generate or to distribute a 
  46. %% modified version of this file under its original name. 
  47. %% 
  48. %% You are NOT ALLOWED to change this file. 
  49. %% 
  50. %% 
  51. %% MODIFICATION ADVICE: 
  52. %% 
  53. %% If you want to customize this file, it is best to make a copy of the 
  54. %% source file(s) from which it was produced. Use a different name for 
  55. %% your copy(ies) and modify the copy(ies); this will ensure that your 
  56. %% modifications do not get overwritten when you install a new release of 
  57. %% the standard system. You should also ensure that your modified source 
  58. %% file does not generate any modified file with the same name as a 
  59. %% standard file. You can then easily distribute your modifications by 
  60. %% distributing the modified and renamed copy of the source file, taking 
  61. %% care to observe the conditions in legal.txt; this will ensure that 
  62. %% other users can safely use your modifications. 
  63. %% 
  64. %% You will also need to produce your own, suitably named, .ins file to 
  65. %% control the generation of files from your source file; this file 
  66. %% should contain your own preambles for the files it generates, not 
  67. %% those in the standard .ins files. 
  68. %% 
  69. %% The names of the source files used are shown above. 
  70. %% 
  71. %% 
  72. %% 
  73. \NeedsTeXFormat{LaTeX2e}
  74.  \ProvidesPackage{doc}
  75.   [1995/05/26 v1.9t
  76.    Standard LaTeX documentation package (FMi)]
  77. %% \CharacterTable
  78. %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  79. %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  80. %%   Digits        \0\1\2\3\4\5\6\7\8\9
  81. %%   Exclamation   \!     Double quote  \"     Hash (number) \#
  82. %%   Dollar        \$     Percent       \%     Ampersand     \&
  83. %%   Acute accent  \'     Left paren    \(     Right paren   \)
  84. %%   Asterisk      \*     Plus          \+     Comma         \,
  85. %%   Minus         \-     Point         \.     Solidus       \/
  86. %%   Colon         \:     Semicolon     \;     Less than     \<
  87. %%   Equals        \=     Greater than  \>     Question mark \?
  88. %%   Commercial at \@     Left bracket  \[     Backslash     \\
  89. %%   Right bracket \]     Circumflex    \^     Underscore    \_
  90. %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
  91. %%   Right brace   \}     Tilde         \~}
  92. %%
  93. %% Package `doc' to use with LaTeX 2e
  94. %% Copyright (C) 1989-1995 Frank Mittelbach, all rights reserved.
  95. \@ifundefined{macro@cnt}{}{\endinput}
  96. \catcode`\^^A=14
  97. \def\macrocode{\macro@code
  98.    \frenchspacing \@vobeyspaces
  99.    \xmacro@code}
  100. \def\macro@code{%
  101.    \topsep \MacrocodeTopsep
  102.    \@beginparpenalty \predisplaypenalty
  103.    \if@inlabel\leavevmode\fi
  104.    \trivlist \parskip \z@ \item[]%
  105.    \macro@font
  106.    \leftskip\@totalleftmargin \advance\leftskip\MacroIndent
  107.    \rightskip\z@ \parindent\z@ \parfillskip\@flushglue
  108.    \blank@linefalse \def\par{\ifblank@line
  109.                              \leavevmode\fi
  110.                              \blank@linetrue\@@par
  111.                              \penalty\interlinepenalty}
  112.    \obeylines
  113.    \let\do\do@noligs \verbatim@nolig@list
  114.    \let\do\@makeother \dospecials
  115.    \global\@newlistfalse
  116.    \global\@minipagefalse
  117.    \ifcodeline@index
  118.      \everypar{\global\advance\c@CodelineNo\@ne
  119.                \llap{\theCodelineNo\ \hskip\@totalleftmargin}%
  120.                \check@module}%
  121.    \else \everypar{\check@module}%
  122.    \fi
  123.    \init@crossref}
  124. \newif\ifblank@line
  125. \def\endmacrocode{%
  126.                  \ifpm@module \endgroup \pm@modulefalse \fi
  127.                  \everypar{}%
  128.                  \global\@inlabelfalse
  129.                  \endtrivlist
  130.                  \close@crossref}
  131. \@ifundefined{MacroFont}{%
  132.     \def\MacroFont{\fontencoding\encodingdefault
  133.                    \fontfamily\ttdefault
  134.                    \fontseries\mddefault
  135.                    \fontshape\updefault
  136.                    \small}%
  137.   }{}
  138. \@ifundefined{AltMacroFont}{%
  139.     \def\AltMacroFont{\fontencoding\encodingdefault
  140.                       \fontfamily\ttdefault
  141.                       \fontseries\mddefault
  142.                       \fontshape\sldefault
  143.                       \small
  144.                       }%
  145.   }{}
  146. \let\macro@font=\MacroFont
  147. \def\check@module{%
  148.   \ifcheck@modules
  149.     \ifpm@module \endgroup \pm@modulefalse \fi
  150.     \expandafter\futurelet\expandafter\next\expandafter\ch@percent
  151.   \fi}
  152. \newif\ifpm@module
  153. \def\DontCheckModules{\check@modulesfalse}
  154. \def\CheckModules{\check@modulestrue}
  155. \newif\ifcheck@modules  \check@modulestrue
  156. \def\ch@percent{%
  157.   \if \percentchar\next
  158.     \expandafter\check@angle
  159.   \fi}
  160. \def\check@angle#1{\futurelet\next\ch@angle}
  161. \begingroup
  162. \catcode`\<\active
  163. \gdef\ch@angle{\ifx<\next
  164.     \expandafter\ch@plus@etc
  165.   \else \percentchar \fi}
  166. \gdef\ch@plus@etc<{\futurelet\next\check@plus@etc}
  167. \endgroup
  168. \def\check@plus@etc{%
  169.     \if +\next
  170.       \let\next\pm@module
  171.     \else\if -\next
  172.       \let\next\pm@module
  173.     \else\if *\next
  174.       \let\next\star@module
  175.     \else\if /\next
  176.       \let\next\slash@module
  177.     \else
  178.       \let\next\pm@module
  179.     \fi\fi\fi\fi
  180.     \next}
  181. \begingroup
  182. \catcode`\~=\active
  183. \lccode`\~=`\>
  184. \lowercase{\gdef\pm@module#1~}{\pm@moduletrue
  185.    \Module{#1}\begingroup
  186.      \advance\guard@level\@ne
  187.      \ifnum\guard@level>\c@StandardModuleDepth\AltMacroFont\fi
  188. }
  189. \lowercase{\gdef\star@module#1~}{%
  190.   \Module{#1}%
  191.   \global \advance \guard@level\@ne
  192.   \ifnum \guard@level>\c@StandardModuleDepth
  193.     \global\let\macro@font=\AltMacroFont \macro@font
  194.   \fi}
  195. \catcode`\>=\active
  196. \gdef\slash@module#1>{%
  197.   \Module{#1}%
  198.   \global \advance \guard@level\m@ne
  199.   \ifnum \guard@level=\c@StandardModuleDepth
  200.     \global\let\macro@font\MacroFont  \macro@font
  201.   \fi
  202. }
  203. \endgroup
  204. \newcounter{StandardModuleDepth}
  205. \newcount \guard@level
  206. \@ifundefined{Module}{%
  207.       \def\Module#1{\mod@math@codes$\langle\mathsf{#1}\rangle$}
  208.   }{}
  209. \def\mod@math@codes{\mathcode`\|="226A \mathcode`\&="2026}
  210. \newskip\MacrocodeTopsep \MacrocodeTopsep = 3pt plus 1.2pt minus 1pt
  211. \newdimen\MacroIndent
  212. \settowidth\MacroIndent{\rmfamily\scriptsize 00\ }
  213. \@namedef{macrocode*}{\macro@code\sxmacro@code}
  214. \expandafter\let\csname endmacrocode*\endcsname = \endmacrocode
  215. \catcode`\!=\catcode`\%   ^^A In this section there must not be
  216.                               ^^A any exclamation marks.
  217.                               ^^A
  218. \begingroup
  219. \catcode`\|=\z@ \catcode`\[=\@ne \catcode`\]=\tw@
  220. \catcode`\{=12 \catcode`\}=12
  221. \catcode`\%=12 \catcode`\ =\active \catcode`\\=\active
  222. !%    \end{macrocode*}
  223. !    Next follows the actual definition of  |\macro@code|;
  224. !    notice the
  225. !    use of the new escape character.  We manage to get the argument
  226. !    surrounded by the string |\end{macrocode}|, but at the end
  227. !    however, in spite of the actual characters used during the
  228. !    definition of
  229. !    this macro, |\end| with the argument |{macrocode}|
  230. !    will be executed, to ensure a balanced environment.
  231. !    \begin{macrocode*}
  232. |gdef|xmacro@code#1%    \end{macrocode}[#1|end[macrocode]]
  233. !%    \end{macrocode*}
  234. ! \begin{macro}{\sxmacro@code}
  235. !    The definition of |\sxmacro@code| is completely analogous,
  236. !    only
  237. !    here a slightly different terminating string will be used.
  238. !    Note that the space is not active in this environment.
  239. !    \begin{macrocode}
  240. |catcode`| =12
  241. |gdef|sxmacro@code#1%    \end{macrocode*}[#1|end[macrocode*]]
  242. !%    \end{macrocode}
  243. !    because the |\catcode| changes have been made local by
  244. !    commencing a
  245. !    new group, there now follows the matching |\endgroup|
  246. !    in a rather
  247. !    unusual style of writing.
  248. !    \begin{macrocode}
  249. |endgroup
  250. !%    \end{macrocode}
  251. \catcode`\!=12
  252. \def\DescribeMacro{\leavevmode\@bsphack
  253.    \begingroup\MakePrivateLetters\Describe@Macro}
  254. \def\Describe@Macro#1{\endgroup
  255.               \marginpar{\raggedleft\PrintDescribeMacro{#1}}%
  256.               \SpecialUsageIndex{#1}\@esphack\ignorespaces}
  257. \def\DescribeEnv{\leavevmode\@bsphack\begingroup\MakePrivateLetters
  258.   \Describe@Env}
  259. \def\Describe@Env#1{\endgroup
  260.               \marginpar{\raggedleft\PrintDescribeEnv{#1}}%
  261.               \SpecialEnvIndex{#1}\@esphack\ignorespaces}
  262. \reversemarginpar
  263. \setlength\marginparpush{0pt}  \setlength\marginparwidth{8pc}
  264. {\catcode`\|=\z@ \catcode`\\=12
  265. |gdef|bslash{\}}
  266. \def\verbatim{\@beginparpenalty \predisplaypenalty \@verbatim
  267.               \MacroFont \frenchspacing \@vobeyspaces \@xverbatim}
  268. \@namedef{verbatim*}{\@beginparpenalty \predisplaypenalty \@verbatim
  269.               \MacroFont \@sxverbatim}
  270. \def\@verbatim{\trivlist \item[]\if@minipage\else\vskip\parskip\fi
  271.       \leftskip\@totalleftmargin\rightskip\z@
  272.       \parindent\z@\parfillskip\@flushglue\parskip\z@
  273.       \@@par
  274.       \@tempswafalse
  275.  \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par
  276.           \penalty\interlinepenalty
  277.    \check@percent}%
  278.  \obeylines
  279.  \let\do\do@noligs \verbatim@nolig@list
  280.  \let\do\@makeother \dospecials}
  281. {\catcode`\%=12
  282.  \long\gdef\check@percent#1{\ifx #1%\let\next\@empty \else
  283.                                     \let\next=#1\fi \next}}
  284. \def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi
  285.   \bgroup \let\do\do@noligs \verbatim@nolig@list
  286.     \ttfamily \verb@eol@error \let\do\@makeother \dospecials
  287.     \@ifstar{\@sverb}{\@vobeyspaces \frenchspacing \@sverb}}
  288. \let\verb@balance@group\@empty
  289.  
  290. \def\verb@egroup{\global\let\verb@balance@group\@empty\egroup}
  291.  
  292. \begingroup
  293.   \obeylines%
  294.   \gdef\verb@eol@error{\obeylines%
  295.     \def^^M{\verb@egroup\@latex@error{%
  296.            Text for \noexpand\verb command ended by end of line}\@ehc}}%
  297. \endgroup
  298. \def\@sverb#1{%
  299.   \catcode`#1\active  \lccode`\~`#1%
  300.   \gdef\verb@balance@group{\verb@egroup
  301.      \@latex@error{Illegal use of \noexpand\verb command}\@ehc}%
  302.   \aftergroup\verb@balance@group
  303.   \lowercase{\let~\verb@egroup}}
  304. \def\verbatim@nolig@list{\do\`\do\<\do\>\do\,\do\'\do\-}
  305. \def\do@noligs#1{%
  306.   \catcode`#1\active
  307.   \begingroup
  308.      \lccode`\~=`#1\relax
  309.      \lowercase{\endgroup\def~{\leavevmode\kern\z@\char`#1}}}
  310. \newcount\macro@cnt \macro@cnt=0
  311. \def\macro{\begingroup
  312.    \catcode`\\12
  313.    \MakePrivateLetters \m@cro@ \iftrue}
  314. \def\environment{\begingroup
  315.    \catcode`\\12
  316.    \MakePrivateLetters \m@cro@ \iffalse}
  317. \long\def\m@cro@#1#2{\endgroup \topsep\MacroTopsep \trivlist
  318.    \edef\saved@macroname{\string#2}%
  319.   \def\makelabel##1{\llap{##1}}%
  320.   \if@inlabel
  321.     \let\@tempa\@empty \count@\macro@cnt
  322.     \loop \ifnum\count@>\z@
  323.       \edef\@tempa{\@tempa\hbox{\strut}}\advance\count@\m@ne \repeat
  324.     \edef\makelabel##1{\llap{\vtop to\baselineskip
  325.                                {\@tempa\hbox{##1}\vss}}}%
  326.     \advance \macro@cnt \@ne
  327.   \else  \macro@cnt\@ne  \fi
  328.   \edef\@tempa{\noexpand\item[%
  329.      #1%
  330.        \noexpand\PrintMacroName
  331.      \else
  332.        \noexpand\PrintEnvName
  333.      \fi
  334.      {\string#2}]}%
  335.   \@tempa
  336.   {\advance\c@CodelineNo\@ne
  337.    #1%
  338.       \SpecialMainIndex{#2}\nobreak
  339.       \DoNotIndex{#2}%
  340.    \else
  341.       \SpecialMainEnvIndex{#2}\nobreak
  342.    \fi
  343.    }%
  344.   \ignorespaces}
  345. \let\endmacro \endtrivlist
  346. \let\endenvironment\endmacro
  347. \newskip\MacroTopsep     \MacroTopsep = 7pt plus 2pt minus 2pt
  348. \@ifundefined{PrintMacroName}
  349.    {\def\PrintMacroName#1{\strut \MacroFont \string #1\ }}{}
  350. \@ifundefined{PrintDescribeMacro}
  351.    {\def\PrintDescribeMacro#1{\strut \MacroFont \string #1\ }}{}
  352. \@ifundefined{PrintDescribeEnv}
  353.    {\def\PrintDescribeEnv#1{\strut \MacroFont #1\ }}{}
  354. \@ifundefined{PrintEnvName}
  355.    {\def\PrintEnvName#1{\strut \MacroFont #1\ }}{}
  356. \begingroup
  357. \catcode`\~\active
  358. \gdef\SpecialEscapechar#1{%
  359.     \begingroup
  360.      \uccode`\~`#1%
  361.      \uppercase{\gdef\active@escape@char{~}}%
  362.      \escapechar\m@ne  \xdef\special@escape@char{\string#1}%
  363.    \endgroup}
  364. \endgroup
  365. \begingroup   \catcode`\|=\z@  \catcode`\\=\active
  366. |gdef|init@crossref{|catcode`|\|active   |let\|bslash
  367.     |MakePrivateLetters
  368.     |catcode|expandafter`|special@escape@char|active
  369.     |expandafter|let|active@escape@char|scan@macro}
  370. |endgroup
  371. \SpecialEscapechar{\\}
  372. \@ifundefined{MakePrivateLetters}
  373.     {\let\MakePrivateLetters\makeatletter}{}
  374. \def\close@crossref{\SpecialEscapechar\\}
  375. \def\scan@macro{%
  376.    \special@escape@char
  377.    \step@checksum
  378.    \ifscan@allowed
  379.       \let\macro@namepart\@empty
  380.       \def\next{\futurelet\next\macro@switch}%
  381.    \else \let\next\@empty \fi
  382.    \next}
  383. \newif\ifscan@allowed    \scan@allowedtrue
  384. \def\DisableCrossrefs{\@bsphack\scan@allowedfalse\@esphack}
  385. \def\EnableCrossrefs{\@bsphack\scan@allowedtrue
  386.                      \def\DisableCrossrefs{\@bsphack\@esphack}\@esphack}
  387. \def\macro@switch{\ifcat\noexpand\next a%
  388.      \let\next\macro@name
  389.      \else \let\next\short@macro  \fi
  390.    \next}
  391. \def\short@macro#1{\begingroup
  392.    \catcode`\&=11  \uccode`\&=\expandafter`\string#1%
  393.    \uppercase{\def\macro@namepart{&}}%
  394.    \endgroup
  395.    \ifnot@excluded
  396.      \produce@index{#1}\fi
  397.     \scan@allowedfalse#1%
  398.     \scan@allowedtrue }
  399. \def\produce@index#1{%
  400.   \if\noexpand#1\special@escape@char
  401.      \scan@allowedfalse \it@is@a\special@escape@char \else
  402.      \if\noexpand#1\bslash \it@is@a\bslash \else
  403.        \if\noexpand#1\space \it@is@a\space \else
  404.          \ifx#1\par
  405.          \it@is@a\space \else
  406.          \ifx#1\relax \else
  407.            \if\noexpand#1\bgroup \LeftBraceIndex \else
  408.              \if\noexpand#1\egroup \RightBraceIndex \else
  409.                \if\noexpand#1\percentchar \PercentIndex \else
  410.                  \it@is@a{\string#1}%
  411.        \fi \fi \fi \fi \fi \fi \fi \fi}
  412. \def\macro@name#1{\edef\macro@namepart{\macro@namepart#1}%
  413.      \futurelet\next\more@macroname}
  414. \def\more@macroname{\ifcat\noexpand\next a%
  415.      \let\next\macro@name
  416.      \else \let\next\macro@finish \fi
  417.      \next}
  418. \def\macro@finish{%
  419.   \macro@namepart
  420.   \ifnot@excluded
  421.      \edef\@tempa{\noexpand\SpecialIndex{\bslash\macro@namepart}}%
  422.      \@tempa  \fi}
  423. \def\DoNotIndex{\begingroup \MakePrivateLetters
  424.     \catcode`\\12
  425.     \do@not@index}
  426. \long\def\do@not@index#1{%
  427.     \endgroup
  428.     \addto@hook\index@excludelist{#1,}}
  429. \long\def\addto@hook#1#2{#1\expandafter{\the#1#2}}
  430. \newtoks\index@excludelist
  431. \index@excludelist{}
  432. \begingroup
  433. \catcode`\|=0%
  434. \catcode`\\=12
  435. |gdef|ifnot@excluded{|expandafter
  436.      |expanded@notin|expandafter{|expandafter
  437.      \|macro@namepart,}{|the|index@excludelist}}
  438. |endgroup
  439. \def\expanded@notin#1#2{%
  440.  \def\in@@##1#1##2##3\in@@{%
  441.   \ifx\expanded@notin##2}%
  442.  \expandafter\in@@#2#1\expanded@notin\in@@}
  443. \@ifundefined{actualchar}{\def\actualchar{=}}{}
  444. \@ifundefined{quotechar}{\def\quotechar{!}}{}
  445. \@ifundefined{levelchar}{\def\levelchar{>}}{}
  446. \@ifundefined{encapchar}{\def\encapchar{|}}{}
  447. \@ifundefined{verbatimchar}{\def\verbatimchar{+}}{}
  448. \def\SpecialIndex#1{\@bsphack\special@index{\expandafter\@gobble
  449.                                       \string#1\actualchar
  450.       \string\verb\quotechar*\verbatimchar\string#1\verbatimchar}%
  451.     \@esphack}
  452.  
  453. \def\SpecialMainIndex#1{\@bsphack\special@index{\expandafter\@gobble
  454.                                         \string#1\actualchar
  455.                                         \string\verb
  456.                                         \quotechar*\verbatimchar
  457.                                         \string#1\verbatimchar
  458.                                         \encapchar main}%
  459.                         \@esphack}
  460. \def\SpecialMainEnvIndex#1{\@bsphack\special@index{%
  461.                                       #1\actualchar
  462.                                       {\string\ttfamily\space#1}
  463.                                          (environment)%
  464.                                       \encapchar main}%
  465.     \index{environments:\levelchar{\protect\ttfamily#1}\encapchar
  466.            main}\@esphack}
  467. \def\SpecialUsageIndex#1{\@bsphack\index{\expandafter\@gobble\string#1%
  468.     \actualchar\string\verb\quotechar*\verbatimchar
  469.     \string#1\verbatimchar
  470.     \encapchar usage}\@esphack}
  471. \def\SpecialEnvIndex#1{\@bsphack
  472.     \index{#1\actualchar{\protect\ttfamily#1}
  473.            (environment)\encapchar usage}%
  474.     \index{environments:\levelchar{\protect\ttfamily#1}\encapchar
  475.            usage}\@esphack}
  476. \def\SortIndex#1#2{\index{#1\actualchar#2}}
  477. \def\it@is@a#1{\special@index{\quotechar #1\actualchar
  478.                           \string\verb\quotechar*\verbatimchar
  479.                           \quotechar\bslash\quotechar#1\verbatimchar}}
  480. \@ifundefined{LeftBraceIndex}{\def\LeftBraceIndex{%
  481.    \special@index{\bgroup\actualchar\string\verb\quotechar*\verbatimchar
  482.           \quotechar\bslash{\verbatimchar\string\iffalse}\string\fi}}}{}
  483.  
  484. \@ifundefined{RightBraceIndex}{\def\RightBraceIndex{%
  485.  \special@index{\egroup\actualchar\string\iffalse{\string\fi\string\verb
  486.            \quotechar*\verbatimchar\quotechar\bslash}\verbatimchar}}}{}
  487. \@ifundefined{PercentIndex}
  488.   {\def\PercentIndex{\it@is@a\percentchar}}{}
  489. \def\OldMakeindex{\def\PercentIndex{%
  490.     \special@index{\quotechar\percentchar\actualchar\string\verb
  491.            \quotechar*\verbatimchar\quotechar\bslash
  492.            \percentchar\percentchar\verbatimchar}}}
  493. {\catcode`\%=12 \gdef\percentchar{%}}
  494. \newif\ifhave@multicol
  495. \IfFileExists{multicol.sty}{\have@multicoltrue
  496.                             \RequirePackage{multicol}%
  497.                            }{}
  498.  
  499. \newdimen\IndexMin         \IndexMin       = 80pt
  500. \newcount\c@IndexColumns   \c@IndexColumns = 3
  501. \ifhave@multicol
  502.   \renewenvironment{theindex}
  503.     {\begin{multicols}\c@IndexColumns[\index@prologue][\IndexMin]%
  504.       \IndexParms \let\item\@idxitem \ignorespaces}%
  505.     {\end{multicols}}
  506. \else
  507.   \typeout{Can't find multicol.sty -- will use normal index layout if
  508.      necessary.}
  509.   \def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
  510.     \columnseprule \z@  \columnsep 35\p@
  511.     \twocolumn[\index@prologue]%
  512.     \IndexParms \let\item\@idxitem \ignorespaces}
  513.   \def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi}
  514. \fi
  515. \long\def\IndexPrologue#1{\@bsphack\def\index@prologue{#1}\@esphack}
  516. \@ifundefined{index@prologue}
  517.      {\def\index@prologue{\section*{Index}%
  518.                  \markboth{Index}{Index}%
  519.                  The italic numbers denote the pages where the
  520.                  corresponding entry is described,
  521.                  numbers underlined point to the definition,
  522.                  all others indicate the places where it is used.
  523.                  }}{}
  524. \@ifundefined{IndexParms}
  525.     {\def\IndexParms{%
  526.        \parindent \z@
  527.        \columnsep 15pt
  528.        \parskip 0pt plus 1pt
  529.        \rightskip 15pt
  530.        \mathsurround \z@
  531.        \parfillskip=-15pt
  532.         \small
  533.        \def\@idxitem{\par\hangindent 30pt}%
  534.        \def\subitem{\@idxitem\hspace*{15pt}}%
  535.        \def\subsubitem{\@idxitem\hspace*{25pt}}%
  536.        \def\indexspace{\par\vspace{10pt plus 2pt minus 3pt}}%
  537.       }}{}
  538. \def\efill{\hfill\nopagebreak}%
  539. \def\dotfill{\leaders\hbox to.6em{\hss .\hss}\hskip\z@ plus  1fill}%
  540. \def\dotfil{\leaders\hbox to.6em{\hss .\hss}\hfil}%
  541. \def\pfill{\unskip~\dotfill\penalty500\strut\nobreak
  542.                \dotfil~\ignorespaces}%
  543. \def\*{\leavevmode\lower.8ex\hbox{$\,\widetilde{\ }\,$}}
  544. \@ifundefined{main}{\def\main#1{\underline{#1}}}{}
  545. \@ifundefined{usage}{\def\usage#1{\textit{#1}}}{}
  546. \def\PrintIndex{\@input@{\jobname.ind}}
  547. \def\printindex{\typeout{\string\printindex\space is obsolete!}%
  548.                 \typeout{Please use \string\PrintIndex\space
  549.                          if you are a macro implementor^^J
  550.                          or get a newer version of the documented
  551.                          software if you are a user}%
  552.                 \PrintIndex}
  553. \def\changes{\@bsphack\begingroup\@sanitize
  554.    \catcode`\\\z@ \catcode`\ 10 \MakePercentIgnore
  555.    \changes@}
  556. \def\changes@#1#2#3{%
  557.   \def\protect##1{\string##1\space}%
  558.   \edef\@tempa{\noexpand\glossary{#1\levelchar
  559.                                  \expandafter\@gobble
  560.                                  \saved@macroname\actualchar
  561.                                  \string\verb\quotechar*%
  562.                                  \verbatimchar\saved@macroname
  563.                                  \verbatimchar:\levelchar #3}}%
  564.   \@tempa\endgroup\@esphack}
  565. \def\saved@macroname{"General"}
  566. \let\RecordChanges\makeglossary
  567. \newdimen\GlossaryMin         \GlossaryMin       = 80pt
  568. \newcount\c@GlossaryColumns   \c@GlossaryColumns = 2
  569. \ifhave@multicol
  570.   \newenvironment{theglossary}{%
  571.     \begin{multicols}\c@GlossaryColumns
  572.                      [\glossary@prologue][\GlossaryMin]%
  573.     \GlossaryParms \let\item\@idxitem \ignorespaces}%
  574.    {\end{multicols}}
  575. \else
  576.   \newenvironment{theglossary}{%
  577.       \@restonecoltrue\if@twocolumn\@restonecolfalse\fi
  578.       \columnseprule \z@  \columnsep 35\p@
  579.       \twocolumn[\glossary@prologue]%
  580.       \GlossaryParms \let\item\@idxitem \ignorespaces}
  581.     {\if@restonecol\onecolumn\else\clearpage\fi}
  582. \fi
  583. \long\def\GlossaryPrologue#1{\@bsphack
  584.                              \def\glossary@prologue{#1}%
  585.                              \@esphack}
  586. \@ifundefined{glossary@prologue}
  587.      {\def\glossary@prologue{\section*{{Change History}}%
  588.                  \markboth{{Change History}}{{Change History}}%
  589.                  }}{}
  590. \@ifundefined{GlossaryParms}{\let\GlossaryParms\IndexParms}{}
  591. \def\PrintChanges{\@input@{\jobname.gls}}
  592. \long\def\StopEventually#1{\@bsphack\gdef\Finale{#1%
  593.               \check@checksum}%
  594.            \init@checksum
  595.            \@esphack}
  596. \def\OnlyDescription{\@bsphack\long\def\StopEventually##1{%
  597.            ##1\endinput}\@esphack}
  598. \let\Finale\relax
  599. \begingroup
  600. \obeyspaces%
  601. \catcode`\^^M\active%
  602. \gdef\meta{\begingroup\obeyspaces\catcode`\^^M\active%
  603. \let^^M\do@space\let \do@space%
  604. \def\-{\egroup\discretionary{-}{}{}\hbox\bgroup\itshape}%
  605. \m@ta}%
  606. \endgroup
  607. \def\m@ta#1{\leavevmode\hbox\bgroup$\langle$\itshape#1\/$\rangle$\egroup
  608.     \endgroup}
  609. \def\do@space{\egroup\space
  610.     \hbox\bgroup\itshape\futurelet\next\sp@ce}
  611. \def\sp@ce{\ifx\next\do@space\expandafter\sp@@ce\fi}
  612. \def\sp@@ce#1{\futurelet\next\sp@ce}
  613. \def\IndexInput#1{%
  614.      \begingroup \macro@code
  615.    \frenchspacing \@vobeyspaces
  616.      \input{#1}\endmacrocode
  617.      \endgroup}
  618. \def\maketitle{\par
  619.       \begingroup \def \thefootnote {\fnsymbol {footnote}}%
  620.       \setcounter {footnote}\z@
  621.       \def\@makefnmark{\hbox to\z@{$\m@th^{\@thefnmark}$\hss}}%
  622.       \long\def\@makefntext##1{\parindent 1em\noindent
  623.             \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}%
  624.       \if@twocolumn \twocolumn [\@maketitle ]%
  625.       \else \newpage \global \@topnum \z@ \@maketitle \fi
  626.        \thispagestyle{titlepage}\@thanks \endgroup
  627.       \setcounter {footnote}\z@
  628.       \gdef\@date{\today}\gdef\@thanks{}%
  629.       \gdef\@author{}\gdef\@title{}}
  630. \@ifundefined{ps@titlepage}
  631.     {\let\ps@titlepage=\ps@plain}{}
  632. \def\MakeShortVerb#1{%
  633.   \expandafter\ifx\csname cc\string#1\endcsname\relax
  634.     \typeout{*** Made \expandafter\@gobble\string#1\space a short
  635.              reference for \string\verb \on@line\space ***}%
  636.     \add@special{#1}%
  637.     \expandafter
  638.     \xdef\csname cc\string#1\endcsname{\the\catcode`#1}%
  639.     \begingroup
  640.       \catcode`\~\active  \lccode`\~`#1%
  641.       \lowercase{%
  642.       \global\expandafter\let
  643.          \csname ac\string#1\endcsname~%
  644.       \gdef~{\verb~}}%
  645.     \endgroup
  646.     \global\catcode`#1\active
  647.   \else
  648.     \typeout{*** \expandafter\@gobble\string#1\space is already a
  649.              short reference for \string\verb \on@line\space ***}%
  650.   \fi}
  651. \def\DeleteShortVerb#1{%
  652.   \expandafter\ifx\csname cc\string#1\endcsname\relax
  653.   \else
  654.     \typeout{*** Deleted \expandafter\@gobble\string#1\space as short
  655.              reference for \string\verb \on@line\space ***}%
  656.     \rem@special{#1}%
  657.     \global\catcode`#1\csname cc\string#1\endcsname
  658.     \global \expandafter\let \csname cc\string#1\endcsname \relax
  659.     \ifnum\catcode`#1=\active
  660.       \begingroup
  661.         \catcode`\~\active   \lccode`\~`#1%
  662.         \lowercase{%
  663.           \global\expandafter\let\expandafter~%
  664.           \csname ac\string#1\endcsname}%
  665.       \endgroup \fi \fi}
  666. \def\add@special#1{%
  667.   \rem@special{#1}%
  668.   \expandafter\gdef\expandafter\dospecials\expandafter
  669.     {\dospecials \do #1}%
  670.   \expandafter\gdef\expandafter\@sanitize\expandafter
  671.     {\@sanitize \@makeother #1}}
  672. \def\rem@special#1{%
  673.   \def\do##1{%
  674.     \ifnum`#1=`##1 \else \noexpand\do\noexpand##1\fi}%
  675.   \xdef\dospecials{\dospecials}%
  676.   \begingroup
  677.     \def\@makeother##1{%
  678.       \ifnum`#1=`##1 \else \noexpand\@makeother\noexpand##1\fi}%
  679.     \xdef\@sanitize{\@sanitize}%
  680.   \endgroup}
  681. \def\MakeShortverb{\typeout{*** Switch to \noexpand\MakeShortVerb
  682.                          syntax, this is obsolete ***}\MakeShortVerb}
  683. \def\DeleteShortverb{\typeout{*** Switch to \noexpand\DeleteShortVerb
  684.                          syntax, this is obsolete ***}\DeleteShortVerb}
  685. \def\init@checksum{\relax
  686.     \global\bslash@cnt\z@}
  687. \def\check@checksum{\relax
  688.      \ifnum\check@sum=\z@
  689.        \typeout{**********************************}%
  690.        \typeout{* This macro file has no checksum!}%
  691.        \typeout{* The checksum should be \the\bslash@cnt!}%
  692.        \typeout{**********************************}%
  693.      \else
  694.        \ifnum\check@sum=\bslash@cnt
  695.          \typeout{*******************}%
  696.          \typeout{* Checksum passed *}%
  697.          \typeout{*******************}%
  698.        \else
  699.          \PackageError{doc}{Checksum not passed
  700.                     (\the\check@sum<>\the\bslash@cnt)}%
  701.           {The file currently documented seems to be wrong.^^J%
  702.            Try to get a correct version.}%
  703.        \fi
  704.      \fi
  705.      \global\check@sum\z@}
  706. \newcount\check@sum           \check@sum  = \z@
  707. \newcount\bslash@cnt          \bslash@cnt = \z@
  708. \def\CheckSum#1{\@bsphack\global\check@sum#1\relax\@esphack}
  709. \def\step@checksum{\global\advance\bslash@cnt\@ne}
  710. \def\CharacterTable{\begingroup \CharTableChanges \character@table}
  711. \begingroup
  712.   \catcode`\~=11
  713.   \gdef\character@table#1{\def\used~table{#1}%
  714.       \ifx\used~table\default~table
  715.            \typeout{***************************}%
  716.            \typeout{* Character table correct *}%
  717.            \typeout{***************************}%
  718.       \else
  719.          \PackageError{doc}{Character table corrupted}
  720.                            {\the\wrong@table}
  721.          \show\default~table
  722.          \show\used~table
  723.       \fi
  724.       \endgroup}
  725.   \global\let\CharTableChanges\@empty
  726.   \makeatother
  727.   \gdef\default~table
  728.      {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  729.       Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  730.       Digits        \0\1\2\3\4\5\6\7\8\9
  731.       Exclamation   \!     Double quote  \"     Hash (number) \#
  732.       Dollar        \$     Percent       \%     Ampersand     \&
  733.       Acute accent  \'     Left paren    \(     Right paren   \)
  734.       Asterisk      \*     Plus          \+     Comma         \,
  735.       Minus         \-     Point         \.     Solidus       \/
  736.       Colon         \:     Semicolon     \;     Less than     \<
  737.       Equals        \=     Greater than  \>     Question mark \?
  738.       Commercial at \@     Left bracket  \[     Backslash     \\
  739.       Right bracket \]     Circumflex    \^     Underscore    \_
  740.       Grave accent  \`     Left brace    \{     Vertical bar  \|
  741.       Right brace   \}     Tilde         \~}
  742. \endgroup
  743.   \newhelp\wrong@table{Some of the ASCII characters are corrupted.^^J
  744.             I now \string\show\space you both tables for comparison.}
  745. \newif\ifcodeline@index \codeline@indexfalse
  746. \let\CodelineNumbered\codeline@indextrue
  747. \def\codeline@wrindex#1{\if@filesw
  748.         \immediate\write\@indexfile
  749.             {\string\indexentry{#1}%
  750.             {\number\c@CodelineNo}}\fi}
  751. \let\special@index = \@gobble
  752. \def\CodelineIndex{\makeindex
  753.                    \codeline@indextrue
  754.                    \let\special@index\codeline@wrindex}
  755. \def\PageIndex{\makeindex
  756.                \codeline@indexfalse
  757.                \let\special@index\index}
  758. \newcount\c@CodelineNo  \c@CodelineNo\z@
  759. \@ifundefined{theCodelineNo}
  760.   {\ifx\selectfont\undefined
  761.      \def\theCodelineNo{\rmfamily\scriptsize\arabic{CodelineNo}}%
  762.    \else
  763.      \def\theCodelineNo{\reset@font\scriptsize\arabic{CodelineNo}}%
  764.    \fi}
  765.   {}
  766.        \tolerance=1000\relax
  767. { \catcode`\"=12
  768.   \global\mathcode`\\="705C \global\mathcode`\@="7040 }
  769. \@ifundefined{DocstyleParms}{}{}
  770. \DocstyleParms     \let\DocstyleParms\relax
  771. \@ifundefined{AmSTeX}
  772.    {\def\AmSTeX{\leavevmode\hbox{$\mathcal A\kern-.2em\lower.376ex%
  773.         \hbox{$\mathcal M$}\kern-.2em\mathcal S$-\TeX}}}{}
  774. \@ifundefined{BibTeX}
  775.    {\def\BibTeX{{\rmfamily B\kern-.05em%
  776.     \textsc{i\kern-.025em b}\kern-.08em%
  777.     T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}}{}
  778. \@ifundefined{SliTeX}
  779.    {\def\SliTeX{{\rmfamily S\kern-.06emL\kern-.18em\raise.32ex\hbox
  780.                 {\scshape i}\kern -.03em\TeX}}}{}
  781. \@ifundefined{PlainTeX}{\def\PlainTeX{\textsc{Plain}\kern2pt\TeX}}{}
  782. \@ifundefined{Web}{\def\Web{\textsc{Web}}}{}
  783. \def\MakePercentIgnore{\catcode`\%9\relax}
  784. \def\MakePercentComment{\catcode`\%14\relax}
  785. \def\DocInput#1{\MakePercentIgnore\input{#1}\MakePercentComment}
  786. \def\GetFileInfo#1{%
  787.   \def\filename{#1}%
  788.   \def\@tempb##1 ##2 ##3\relax##4\relax{%
  789.     \def\filedate{##1}%
  790.     \def\fileversion{##2}
  791.     \def\fileinfo{##3}}%
  792.   \edef\@tempa{\csname ver@#1\endcsname}%
  793.   \expandafter\@tempb\@tempa\relax? ? \relax\relax}
  794. \endinput
  795. %% 
  796. %% End of file `doc.sty'.
  797.