home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fonts 1
/
freshfonts1.bin
/
programs
/
amiga
/
pastex
/
macros
/
latex2e
/
inputs
/
doc.sty
< prev
next >
Wrap
Text File
|
1994-06-14
|
29KB
|
755 lines
%%
%% This is file `doc.sty', generated
%% on <1994/6/14> with the docstrip utility (2.2h).
%%
%% The original source files were:
%%
%% doc.dtx (with options: `package')
%%
%% Copyright 1994 the LaTeX3 project and the individual authors.
%% All rights reserved. For further copyright information see the file
%% legal.txt, and any other copyright indicated in this file.
%%
%% This file is part of the LaTeX2e system.
%% ----------------------------------------
%%
%% This system is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%%
%%
%% IMPORTANT NOTICE:
%%
%% For error reports in case of UNCHANGED versions see bugs.txt.
%%
%% Please do not request updates from us directly. Distribution is
%% done through Mail-Servers and TeX organizations.
%%
%% You are not allowed to change this file.
%%
%% You are allowed to distribute this file under the condition that
%% it is distributed together with all files mentioned in manifest.txt.
%%
%% If you receive only some of these files from someone, complain!
%%
%% You are NOT ALLOWED to distribute this file alone. You are NOT
%% ALLOWED to take money for the distribution or use of either this
%% file or a changed version, except for a nominal charge for copying
%% etc.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{doc}
[1994/06/09 v1.9r
Standard LaTeX documentation package (FMi)]
%% \CharacterTable
%% {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
%% 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
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
%% Package `doc' to use with LaTeX 2e
%% Copyright (C) 1989-1994 Frank Mittelbach, all rights reserved.
\@ifundefined{macro@cnt}{}{\endinput}
\catcode`\^^A=14
\def\macrocode{\macro@code
\frenchspacing \@vobeyspaces
\xmacro@code}
\def\macro@code{%
\topsep \MacrocodeTopsep
\@beginparpenalty \predisplaypenalty
\if@inlabel\leavevmode\fi
\trivlist \parskip \z@ \item[]%
\macro@font
\leftskip\@totalleftmargin \advance\leftskip\MacroIndent
\rightskip\z@ \parindent\z@ \parfillskip\@flushglue
\blank@linefalse \def\par{\ifblank@line
\leavevmode\fi
\blank@linetrue\@@par
\penalty\interlinepenalty}
\obeylines
\let\do\do@noligs \verbatim@nolig@list
\let\do\@makeother \dospecials
\global\@newlistfalse
\global\@minipagefalse
\ifcodeline@index
\everypar{\global\advance\c@CodelineNo\@ne
\llap{\theCodelineNo\ \hskip\@totalleftmargin}%
\check@module}%
\else \everypar{\check@module}%
\fi
\init@crossref}
\newif\ifblank@line
\def\endmacrocode{%
\ifpm@module \endgroup \pm@modulefalse \fi
\everypar{}%
\global\@inlabelfalse
\endtrivlist
\close@crossref}
\@ifundefined{MacroFont}{%
\def\MacroFont{\math@fontsfalse\reset@font\small\ttfamily}%
}{}
\@ifundefined{AltMacroFont}{%
\def\AltMacroFont{\math@fontsfalse\small
\reset@font\slshape\ttfamily}%
}{}
\let\macro@font=\MacroFont
\def\check@module{%
\ifcheck@modules
\ifpm@module \endgroup \pm@modulefalse \fi
\expandafter\futurelet\expandafter\next\expandafter\ch@percent
\fi}
\newif\ifpm@module
\def\DontCheckModules{\check@modulesfalse}
\def\CheckModules{\check@modulestrue}
\newif\ifcheck@modules \check@modulestrue
\def\ch@percent{%
\if \percentchar\next
\expandafter\check@angle
\fi}
\def\check@angle#1{\futurelet\next\ch@angle}
\begingroup
\catcode`\<\active
\gdef\ch@angle{\ifx<\next
\expandafter\ch@plus@etc
\else \percentchar \fi}
\gdef\ch@plus@etc<{\futurelet\next\check@plus@etc}
\endgroup
\def\check@plus@etc{%
\if +\next
\let\next\pm@module
\else\if -\next
\let\next\pm@module
\else\if *\next
\let\next\star@module
\else\if /\next
\let\next\slash@module
\else
\let\next\pm@module
\fi\fi\fi\fi
\next}
\begingroup
\catcode`\~=\active
\lccode`\~=`\>
\lowercase{\gdef\pm@module#1~}{\pm@moduletrue
\Module{#1}\begingroup
\advance\guard@level\@ne
\ifnum\guard@level>\c@StandardModuleDepth\AltMacroFont\fi
}
\lowercase{\gdef\star@module#1~}{%
\Module{#1}%
\global \advance \guard@level\@ne
\ifnum \guard@level>\c@StandardModuleDepth
\global\let\macro@font=\AltMacroFont \macro@font
\fi}
\catcode`\>=\active
\gdef\slash@module#1>{%
\Module{#1}%
\global \advance \guard@level\m@ne
\ifnum \guard@level=\c@StandardModuleDepth
\global\let\macro@font\MacroFont \macro@font
\fi
}
\endgroup
\newcounter{StandardModuleDepth}
\newcount \guard@level
\@ifundefined{Module}{%
\def\Module#1{\mod@math@codes$\langle\mathsf{#1}\rangle$}
}{}
\def\mod@math@codes{\mathcode`\|="226A \mathcode`\&="2026}
\newskip\MacrocodeTopsep \MacrocodeTopsep = 3pt plus 1.2pt minus 1pt
\newdimen\MacroIndent
\settowidth\MacroIndent{\rmfamily\scriptsize 00\ }
\@namedef{macrocode*}{\macro@code\sxmacro@code}
\expandafter\let\csname endmacrocode*\endcsname = \endmacrocode
\catcode`\!=\catcode`\% ^^A In this section there must not be
^^A any exclamation marks.
^^A
\begingroup
\catcode`\|=\z@ \catcode`\[=\@ne \catcode`\]=\tw@
\catcode`\{=12 \catcode`\}=12
\catcode`\%=12 \catcode`\ =\active \catcode`\\=\active
!% \end{macrocode*}
! Next follows the actual definition of |\macro@code|;
! notice the
! use of the new escape character. We manage to get the argument
! surrounded by the string |\end{macrocode}|, but at the end
! however, in spite of the actual characters used during the
! definition of
! this macro, |\end| with the argument |{macrocode}|
! will be executed, to ensure a balanced environment.
! \begin{macrocode*}
|gdef|xmacro@code#1% \end{macrocode}[#1|end[macrocode]]
!% \end{macrocode*}
! \begin{macro}{\sxmacro@code}
! The definition of |\sxmacro@code| is completely analogous,
! only
! here a slightly different terminating string will be used.
! Note that the space is not active in this environment.
! \begin{macrocode}
|catcode`| =12
|gdef|sxmacro@code#1% \end{macrocode*}[#1|end[macrocode*]]
!% \end{macrocode}
! because the |\catcode| changes have been made local by
! commencing a
! new group, there now follows the matching |\endgroup|
! in a rather
! unusual style of writing.
! \begin{macrocode}
|endgroup
!% \end{macrocode}
\catcode`\!=12
\def\DescribeMacro{\leavevmode\@bsphack
\begingroup\MakePrivateLetters\Describe@Macro}
\def\Describe@Macro#1{\endgroup
\marginpar{\raggedleft\PrintDescribeMacro{#1}}%
\SpecialUsageIndex{#1}\@esphack\ignorespaces}
\def\DescribeEnv{\leavevmode\@bsphack\begingroup\MakePrivateLetters
\Describe@Env}
\def\Describe@Env#1{\endgroup
\marginpar{\raggedleft\PrintDescribeEnv{#1}}%
\SpecialEnvIndex{#1}\@esphack\ignorespaces}
\reversemarginpar
\setlength\marginparpush{0pt} \setlength\marginparwidth{8pc}
{\catcode`\|=\z@ \catcode`\\=12
|gdef|bslash{\}}
\def\verbatim{\@beginparpenalty \predisplaypenalty \@verbatim
\MacroFont \frenchspacing \@vobeyspaces \@xverbatim}
\@namedef{verbatim*}{\@beginparpenalty \predisplaypenalty \@verbatim
\MacroFont \@sxverbatim}
\def\@verba