home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / useful / dist / text / tex / pastex / macros / latex / nfss2 / doc.sty < prev    next >
Text File  |  1993-08-05  |  27KB  |  704 lines

  1. %% 
  2. %% This is file `doc.sty', generated 
  3. %% on <1993/2/23> with the docstrip utility (2.1b).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% doc.doc  (with options: `style')
  8. %% 
  9. %% Copyright (C) 1989-1993 by Frank Mittelbach. All rights reserved. 
  10. %%
  11. %% This file is part of the NFSS2 package.
  12. %% 
  13. %% IMPORTANT NOTICE: 
  14. %% 
  15. %% You are not allowed to change this file.
  16. %%
  17. %% This file is distributed with NFSS2 until the newest release of the
  18. %% DOC package is available.
  19. %%
  20. %% NFSS2 installation routines need doc.sty 1.7o or later. If you
  21. %% already got a newer release delete this copy. 
  22. %%
  23.  
  24. \def\fileversion{v1.7o}
  25. \def\filedate{93/05/15}
  26. \def\docdate {93/05/15}
  27.  
  28. %% \CharacterTable
  29. %%  {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
  30. %%   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
  31. %%   Digits        \0\1\2\3\4\5\6\7\8\9
  32. %%   Exclamation   \!     Double quote  \"     Hash (number) \#
  33. %%   Dollar        \$     Percent       \%     Ampersand     \&
  34. %%   Acute accent  \'     Left paren    \(     Right paren   \)
  35. %%   Asterisk      \*     Plus          \+     Comma         \,
  36. %%   Minus         \-     Point         \.     Solidus       \/
  37. %%   Colon         \:     Semicolon     \;     Less than     \<
  38. %%   Equals        \=     Greater than  \>     Question mark \?
  39. %%   Commercial at \@     Left bracket  \[     Backslash     \\
  40. %%   Right bracket \]     Circumflex    \^     Underscore    \_
  41. %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
  42. %%   Right brace   \}     Tilde         \~}
  43. %%
  44.  
  45. %% Copyright (C) 1989-1993 Frank Mittelbach, all rights reserved.
  46. \@ifundefined{macro@cnt}{}{\endinput} \typeout{Style-Option: `doc'
  47. \fileversion \@spaces\space\space <\filedate> (FMi)} \typeout{English
  48.    Documentation \@spaces\@spaces\space <\docdate> (DLo, FMi, RMCS)}
  49. \catcode`\^^A=14
  50. \def\macrocode{\macro@code
  51.    \frenchspacing \@vobeyspaces
  52.    \xmacro@code}
  53. \def\macro@code{%
  54.    \topsep \MacrocodeTopsep
  55.    \@beginparpenalty \predisplaypenalty
  56.    \trivlist \parskip \z@ \item[]%
  57.    \macro@font
  58.    \leftskip\@totalleftmargin \advance\leftskip\MacroIndent
  59.    \rightskip\z@ \parindent\z@ \parfillskip\@flushglue
  60.    \blank@linefalse \def\par{\ifblank@line
  61.                              \leavevmode\fi
  62.                              \blank@linetrue\@@par
  63.                              \penalty\interlinepenalty}
  64.    \obeylines \let\do\@makeother \catcode`\`\active \@noligs \dospecials
  65.    \global\@newlistfalse
  66.    \global\@minipagefalse
  67.    \ifcodeline@index
  68.      \everypar{\global\advance\c@CodelineNo\@ne
  69.                \llap{\theCodelineNo\ \hskip\@totalleftmargin}%
  70.                \check@module}%
  71.    \else \everypar{\check@module}%
  72.    \fi
  73.    \init@crossref}
  74. \newif\ifblank@line
  75. \def\endmacrocode{%
  76.                  \ifpm@module \endgroup \pm@modulefalse \fi
  77.                  \everypar{}%
  78.                  \global\@inlabelfalse
  79.                  \endtrivlist
  80.                  \close@crossref}
  81. \@ifundefined{MacroFont}{%
  82.   \ifx\undefined\selectfont
  83.     \def\MacroFont{\small\tt}\else
  84.     \def\MacroFont{\math@fontsfalse\reset@font\small\tt}\fi
  85.   }{}
  86. \@ifundefined{AltMacroFont}{%
  87.   \ifx\undefined\selectfont
  88.     \def\AltMacroFont{\small\tt}\else
  89.     \def\AltMacroFont{\math@fontsfalse\small\reset@font\sl\tt}\fi
  90.   }{}
  91. \let\macro@font=\MacroFont
  92. \def\check@module{%
  93.   \ifcheck@modules
  94.     \ifpm@module \endgroup \pm@modulefalse \fi
  95.     \expandafter\futurelet\expandafter\next\expandafter\ch@percent
  96.   \fi}
  97. \newif\ifpm@module
  98. \def\DontCheckModules{\check@modulesfalse}
  99. \def\CheckModules{\check@modulestrue}
  100. \newif\ifcheck@modules  \check@modulestrue
  101. \def\ch@percent{%
  102.   \if \percentchar\next
  103.     \expandafter\check@angle
  104.   \fi}
  105. \def\check@angle#1{\futurelet\next\ch@angle}
  106. \def\ch@angle{\if<\next
  107.     \expandafter\ch@plus@etc
  108.   \else \percentchar \fi}
  109. \def\ch@plus@etc<{\futurelet\next\check@plus@etc}
  110. \def\check@plus@etc{%
  111.     \if +\next
  112.       \let\next\pm@module
  113.     \else\if -\next
  114.       \let\next\pm@module
  115.     \else\if *\next
  116.       \let\next\star@module
  117.     \else\if /\next
  118.       \let\next\slash@module
  119.     \else
  120.       \let\next\pm@module
  121.     \fi\fi\fi\fi
  122.     \next}
  123. \def\pm@module#1>{\pm@moduletrue
  124.    \Module{#1}\begingroup
  125.      \advance\guard@level\@ne
  126.      \ifnum\guard@level>\c@StandardModuleDepth\AltMacroFont\fi
  127. }
  128. \def\star@module#1>{%
  129.   \Module{#1}%
  130.   \global \advance \guard@level\@ne
  131.   \ifnum \guard@level>\c@StandardModuleDepth
  132.     \global\let\macro@font=\AltMacroFont \macro@font
  133.   \fi}
  134. \def\slash@module#1>{%
  135.   \Module{#1}%
  136.   \global \advance \guard@level\m@ne
  137.   \ifnum \guard@level=\c@StandardModuleDepth
  138.     \global\let\macro@font\MacroFont  \macro@font
  139.   \fi
  140. }
  141. \newcounter{StandardModuleDepth}
  142. \newcount \guard@level
  143. \@ifundefined{Module}{%
  144.   \ifx\undefined\selectfont
  145.     \def\Module#1{{\mod@math@codes$\fam\sffam\langle #1\rangle$}}
  146.   \else
  147.     \expandafter\ifx\csname ds@nfoldfnt\endcsname\relax
  148.       \def\Module#1{{\mod@math@codes$\langle\mathsf{#1}\rangle$}}
  149.     \else
  150.       \def\Module#1{{\mod@math@codes$\langle{\mathsf #1}\rangle$}}
  151.     \fi
  152.   \fi}{}
  153. \def\mod@math@codes{\mathcode`\|="226A \mathcode`\&="2026}
  154. \ifx\selectfont\undefined
  155. \else
  156.   \ifx\mathsf\undefined
  157.     \newmathalphabet*{\mathsf}{\sfdefault}{m}{n}\fi
  158. \fi
  159. \newskip\MacrocodeTopsep \MacrocodeTopsep = 3pt plus 1.2pt minus 1pt
  160. \newdimen\MacroIndent
  161. \settowidth\MacroIndent{\rm\scriptsize 00\ }
  162. \@namedef{macrocode*}{\macro@code\sxmacro@code}
  163. \expandafter\let\csname endmacrocode*\endcsname = \endmacrocode
  164. \catcode`\!=\catcode`\%   ^^A In this section there must not be
  165.                               ^^A any exclamation marks.
  166.                               ^^A
  167. \begingroup
  168. \catcode`\|=\z@ \catcode`\[=\@ne \catcode`\]=\tw@
  169. \catcode`\{=12 \catcode`\}=12
  170. \catcode`\%=12 \catcode`\ =\active \catcode`\\=\active
  171. !%    \end{macrocode*}
  172. !    Next follows the actual definition of  \verb+\macro@code+;
  173. !    notice the
  174. !    use of the new escape character.  We manage to get the argument
  175. !    surrounded by the string \verb+\end{macrocode}+, but at the end
  176. !    however, in spite of the actual characters used during the
  177. !    definition of
  178. !    this macro, \verb+\end+ with the argument \verb+{macrocode}+
  179. !    will be executed, to ensure a balanced environment.
  180. !    \begin{macrocode*}
  181. |gdef|xmacro@code#1%    \end{macrocode}[#1|end[macrocode]]
  182. !%    \end{macrocode*}
  183. ! \begin{macro}{\sxmacro@code}
  184. !    The definition of \verb+\sxmacro@code+ is completely analogous,
  185. !    only
  186. !    here a slightly different terminating string will be used.
  187. !    Note that the space is not active in this environment.
  188. !    \begin{macrocode}
  189. |catcode`| =12
  190. |gdef|sxmacro@code#1%    \end{macrocode*}[#1|end[macrocode*]]
  191. !%    \end{macrocode}
  192. !    because the \verb+\catcode+ changes have been made local by
  193. !    commencing a
  194. !    new group, there now follows the matching \verb+\endgroup+
  195. !    in a rather
  196. !    unusual style of writing.
  197. !    \begin{macrocode}
  198. |endgroup
  199. !%    \end{macrocode}
  200. \catcode`\!=12
  201. \def\DescribeMacro{\leavevmode\@bsphack
  202.    \begingroup\MakePrivateLetters\Describe@Macro}
  203. \def\Describe@Macro#1{\endgroup
  204.               \marginpar{\raggedleft\PrintDescribeMacro{#1}}%
  205.               \SpecialUsageIndex{#1}\@esphack\ignorespaces}
  206. \def\DescribeEnv{\leavevmode\@bsphack\begingroup\MakePrivateLetters
  207.   \Describe@Env}
  208. \def\Describe@Env#1{\endgroup
  209.               \marginpar{\raggedleft\PrintDescribeEnv{#1}}%
  210.               \SpecialEnvIndex{#1}\@esphack\ignorespaces}
  211. \reversemarginpar
  212. \setlength\marginparpush{0pt}  \setlength\marginparwidth{8pc}
  213. {\catcode`\|=\z@ \catcode`\\=12
  214. |gdef|bslash{\}}
  215. \def\verbatim{\@beginparpenalty \predisplaypenalty \@verbatim
  216.               \MacroFont \frenchspacing \@vobeyspaces \@xverbatim}
  217. \@namedef{verbatim*}{\@beginparpenalty \predisplaypenalty \@verbatim
  218.               \MacroFont \@sxverbatim}
  219. \def\@verbatim{\trivlist \item[]\if@minipage\else\vskip\parskip\fi
  220.       \leftskip\@totalleftmargin\rightskip\z@
  221.       \parindent\z@\parfillskip\@flushglue\parskip\z@
  222.       \@@par
  223.       \@tempswafalse
  224.  \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par
  225.           \penalty\interlinepenalty
  226.    \check@percent}%
  227.  \obeylines \catcode`\`\active \@noligs \let\do\@makeother
  228.  \dospecials}
  229. {\catcode`\%=12
  230.  \long\gdef\check@percent