From 73737138494c38ab30b24873f1da7d19a34c820a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 12 Jan 2006 23:58:53 +0000 Subject: mdwtools git-svn-id: svn://tug.org/texlive/trunk@1080 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/mdwtools/at.sty | 203 ++++ Master/texmf-dist/tex/latex/mdwtools/cmtt.sty | 99 ++ Master/texmf-dist/tex/latex/mdwtools/doafter.sty | 114 +++ Master/texmf-dist/tex/latex/mdwtools/footnote.sty | 200 ++++ Master/texmf-dist/tex/latex/mdwtools/mTTcmtt.fd | 71 ++ Master/texmf-dist/tex/latex/mdwtools/mTTenc.def | 70 ++ Master/texmf-dist/tex/latex/mdwtools/mathenv.sty | 449 +++++++++ Master/texmf-dist/tex/latex/mdwtools/mdwlist.sty | 136 +++ Master/texmf-dist/tex/latex/mdwtools/mdwmath.sty | 132 +++ Master/texmf-dist/tex/latex/mdwtools/mdwtab.sty | 1077 +++++++++++++++++++++ Master/texmf-dist/tex/latex/mdwtools/sverb.sty | 358 +++++++ Master/texmf-dist/tex/latex/mdwtools/syntax.sty | 817 ++++++++++++++++ 12 files changed, 3726 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/mdwtools/at.sty create mode 100644 Master/texmf-dist/tex/latex/mdwtools/cmtt.sty create mode 100644 Master/texmf-dist/tex/latex/mdwtools/doafter.sty create mode 100644 Master/texmf-dist/tex/latex/mdwtools/footnote.sty create mode 100644 Master/texmf-dist/tex/latex/mdwtools/mTTcmtt.fd create mode 100644 Master/texmf-dist/tex/latex/mdwtools/mTTenc.def create mode 100644 Master/texmf-dist/tex/latex/mdwtools/mathenv.sty create mode 100644 Master/texmf-dist/tex/latex/mdwtools/mdwlist.sty create mode 100644 Master/texmf-dist/tex/latex/mdwtools/mdwmath.sty create mode 100644 Master/texmf-dist/tex/latex/mdwtools/mdwtab.sty create mode 100644 Master/texmf-dist/tex/latex/mdwtools/sverb.sty create mode 100644 Master/texmf-dist/tex/latex/mdwtools/syntax.sty (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/mdwtools/at.sty b/Master/texmf-dist/tex/latex/mdwtools/at.sty new file mode 100644 index 00000000000..8824a61edad --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdwtools/at.sty @@ -0,0 +1,203 @@ +%% +%% This is file `at.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% at.dtx (with options: `package') +%% +%% IMPORTANT NOTICE +%% +%% at package -- support for `@' commands' +%% Copyright (c) 1996 Mark Wooding +%% +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program 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. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; if not, write to the Free Software +%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{at} + [1996/05/02 1.3 @-command support (MDW)] +%% \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 \~} +%% +\def\atallowdigits{\let\ifat@digits\iftrue} +\def\atdisallowdigits{\let\ifat@digits\iffalse} +\DeclareOption{digits}{\atallowdigits} +\DeclareOption{nodigits}{\atdisallowdigits} +\ExecuteOptions{nodigits} +\ProcessOptions +\begingroup +\catcode`\<1 +\catcode`\>2 +\catcode`\{12 +\catcode`\}12 +\gdef\at@lb<{> +\gdef\at@rb<}> +\gdef\at@spc< > +\endgroup +\def\at@test#1\then{% + #1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi% +} +\def\at@ifcat#1{\at@test\ifcat#1\noexpand\@let@token\then} +\def\at@ifletter#1#2{% + \at@ifcat x% + {\at@ifletter@ii{#1}}% + {\at@ifcat 0% + {\at@ifletter@i{#1}{#2}}% + {#2}% + }% +} +\def\at@ifletter@i#1#2#3{% + \at@test\if% + \ifat@digits1\else0\fi% + \ifnum`#3<`0x\else\ifnum`#3>`9x\else1\fi\fi% + \then% + {\at@ifletter@ii{#1}{#3}}% + {#2#3}% +} +\def\at@ifletter@ii#1#2{\toks@\expandafter{\the\toks@#2}#1} +\def\at@read@name#1{% + \let\at@next=#1% + \toks@{}% + \futurelet\@let@token\at@rn@i% +} +\def\at@rn@i{% + \def\@tempa{\afterassignment\at@rn@iv\let\@let@token= }% + \at@ifletter% + {\futurelet\@let@token\at@rn@iii}% + {\at@ifcat\bgroup% + {\toks@\expandafter{\at@lb}\@tempa}% + {\at@ifcat\egroup% + {\toks@\expandafter{\at@rb}\@tempa}% + {\at@ifcat\at@spc% + {\toks@{ }\@tempa}% + {\at@rn@ii}% + }% + }% + }% +} +\def\at@rn@ii#1{% + \toks@\expandafter{\string#1}% + \at@rn@iv% +} +\def\at@rn@iii{% + \at@ifletter% + {\futurelet\@let@token\at@rn@iii}% + {\@ifnextchar.\at@rn@iv\at@rn@iv}% +} +\def\at@rn@iv{% + \let\@let@token\relax% + \expandafter\at@next\csname at.\the\toks@\endcsname% +} +\def\at@cmdname#1{\expandafter\at@cmdname@i\string#1\@@foo} +\def\at@cmdname@i#1.#2\@@foo{#2} +\def\at@decode#1{% + \at@test\ifx#1\relax\then{% + \PackageError{at}{Unknown @-command `@\at@cmdname#1'}{% + The @-command you typed wasn't recognised, so I've ignored it. + }% + }{% + #1% + }% +} +\def\@at{% + \def\@tempa{\at@read@name\at@decode}% + \ifmmode\ifx\Iat\not@@defined\else% + \let\@tempa\Iat% + \fi\fi% + \@tempa% +} +\def\at@buildcmd#1#2{% + \expandafter\def\csname\expandafter + \@gobble\string#1@decode\endcsname##1{#2##1}% + \edef#1{% + \noexpand\at@read@name% + \expandafter\noexpand% + \csname\expandafter\@gobble\string#1@decode\endcsname% + }% +} +\at@buildcmd\newatcommand\newcommand +\at@buildcmd\renewatcommand\renewcommand +\at@buildcmd\provideatcommand\providecommand +\at@buildcmd\atdef\def +\at@buildcmd\atshow\show +\def\atlet{% + \begingroup% + \@makeother\@% + \at@read@name\atlet@i% +} +\def\atlet@i#1{% + \def\at@temp{#1}% + \@ifnextchar=\atlet@ii{\atlet@ii=}% +} +\def\atlet@ii#1{\afterassignment\atlet@iii\global\let\at@gnext=} +\def\atlet@iii{% + \if @\noexpand\at@gnext% + \expandafter\at@read@name\expandafter\atlet@iv% + \else% + \expandafter\endgroup% + \expandafter\let\at@temp= \at@gnext% + \fi% +} +\def\atlet@iv#1{% + \expandafter\endgroup% + \expandafter\let\at@temp=#1% +} +\def\at{\ifx\protect\@typeset@protect\else\at@protect\fi\@at} +\def\at@protect\fi#1{% + \fi% + \ifx\protect\string% + \expandafter\at@protect@string% + \else% + \expandafter\at@protect@noexpand% + \fi% +} +\def\at@protect@string{@\string} +\def\at@protect@noexpand{\noexpand\@at@ @\noexpand} +\def\@at@#1{\at} +\def\aton{% + \ifnum\catcode`\@=\active\else% + \edef\atoff{\catcode`\noexpand\@\the\catcode`\@}% + \catcode`\@\active% + \lccode`\~`\@% + \lowercase{\let~\at}% + \fi% +} +\def\atoff{\catcode`\@12} +\let\makeatother\aton +\AtBeginDocument{\aton} +\expandafter\def\expandafter\dospecials\expandafter{\dospecials\do\@} +\expandafter\def\expandafter\@sanitize\expandafter{% + \@sanitize\@makeother\@} +\expandafter\chardef\csname at.@\endcsname=`\@ +\atdef*#1*{\ifmmode\mathbf{#1}\else\textbf{#1}\fi} +\atdef/#1/{\ifmmode\mathit{#1}\else\emph{#1}\fi} +\atlet i=\index +\atdef I#1{#1\index{#1}} +\endinput +%% +%% End of file `at.sty'. diff --git a/Master/texmf-dist/tex/latex/mdwtools/cmtt.sty b/Master/texmf-dist/tex/latex/mdwtools/cmtt.sty new file mode 100644 index 00000000000..54fdfb37a99 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdwtools/cmtt.sty @@ -0,0 +1,99 @@ +%% +%% This is file `cmtt.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% cmtt.dtx (with options: `sty') +%% +%% IMPORTANT NOTICE +%% +%% mdwlist package -- various list-related things +%% Copyright (c) 1996 Mark Wooding +%% +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program 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. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; if not, write to the Free Software +%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{cmtt} + [1996/05/25 1.1 Handing of the cmtt font] +%% \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 \~} +%% +\newif\ifcmtt@override +\newif\ifcmtt@dcfonts +\def\@tempa{T1}\ifx\encodingdefault\@tempa + \cmtt@dcfontstrue +\fi +\DeclareOption{override}{\cmtt@overridetrue} +\DeclareOption{t1}{\cmtt@dcfontstrue} +\DeclareOption{ot1}{\cmtt@dcfontsfalse} +\ProcessOptions +\DeclareFontEncoding{mTT}{}{} +\DeclareFontSubstitution{mTT}{cmtt}{m}{n} +\input{mTTenc.def} +\DeclareRobustCommand{\mttfamily}{% + \fontencoding{mTT}\fontfamily{\ttdefault}\selectfont% +} +\DeclareTextFontCommand{\textmtt}{\mttfamily} +\ifcmtt@override + \let\ttfamily\mttfamily +\fi +\def\mtt@setchar#1#2{% + \ifx#1#2\chardef#1`#1\else\let#1#2\fi% + \ifnum\catcode`#1=13% + \begingroup% + \lccode`\~=`#1% + \lowercase{\endgroup\let~#1}% + \fi% +} +\def\mtt@chars{% + \do\#\#% + \do\%\%% + \do\&\&% + \do\^\^% + \do\~\~% + \do\'\textquotesingl% + \do\"\textquotedbl% + \do\|\textbar% + \do\$\textdollar% + \do\_\textunderscore% + \do\{\textbraceleft% + \do\}\textbraceright% + \do\\\textbackslash% + \do\ \textvisiblespace% +} +\def\mtt@do{\let\do\mtt@setchar\mtt@chars} +\DeclareRobustCommand\mtt[1]{\textmtt{\mtt@do#1}} +\def\@tabacckludge#1{% + \expandafter\@changed@cmd\csname\string#1\endcsname\relax% +} +\let\a\@tabacckludge +\let\nbsp\nobreakspace +\endinput +%% +%% End of file `cmtt.sty'. diff --git a/Master/texmf-dist/tex/latex/mdwtools/doafter.sty b/Master/texmf-dist/tex/latex/mdwtools/doafter.sty new file mode 100644 index 00000000000..ac7e392d6ef --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdwtools/doafter.sty @@ -0,0 +1,114 @@ +%% +%% This is file `doafter.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% doafter.dtx (with options: `package,latex2e') +%% +%% IMPORTANT NOTICE +%% +%% doafter package -- insert a token really after a group +%% Copyright (c) 1996 Peter Schmitt and Mark Wooding +%% +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program 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. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; if not, write to the Free Software +%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{doafter} + [1996/05/08 1.2 Aftergroup hacking (PS/MDW)] +%% \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 \~} +%% +\let\@@aftergroup\aftergroup +\def\doafter#1{% + \def\@tempa{\@@aftergroup#1}% + \afterassignment\doafter@i\let\@let@token% +} +\def\doafter@i{% + \@let@token% + \let\aftergroup\@my@aftergroup% + \@@aftergroup\@prepare@after\@tempa% +} +\def\ag@cnt@local{0 } +\let\ag@cnt@global\ag@cnt@local +\def\@my@aftergroup{% + \begingroup% + \count@\ag@cnt@local% + \advance\count@\@ne% + \xdef\ag@cnt@global{\the\count@\space}% + \endgroup% + \let\ag@cnt@local\ag@cnt@global% + \@@aftergroup\@after@token\@@aftergroup% +} +\def\@after@token{% + \@start@after@group% + \@after@token% +} +\def\@start@after@group{% + \begingroup% + \count@\ag@cnt@global% + \clubpenalty\ag@cnt@local% + \let\@after@token\@after@token@i% +} +\def\@after@token@i{% + \advance\count@\m@ne% + \ifnum\count@=\clubpenalty% + \global\let\ag@cnt@global\ag@cnt@local% + \expandafter\@after@aftertoken\expandafter\@after@all% + \else% + \expandafter\@@aftergroup% + \fi% +} +\let\@after@all\endgroup +\def\@prepare@after{% + \ifx\ag@cnt@local\ag@cnt@global\else% + \expandafter\@prepare@after@i% + \fi% +} +\def\@prepare@after@i#1{% + \@start@after@group% + \def\@after@all{\@@aftergroup#1\endgroup}% +} +\def\@after@aftertoken#1{% + \let\bgroup\relax\let\egroup\relax% + \toks@{#1}% + \futurelet\@let@token\@after@aftertoken@i% +} +\def\@after@aftertoken@i{% + \ifcat\noexpand\@let@token{% + \@@aftergroup{% + \else\ifcat\noexpand\@let@token}% + \@@aftergroup}% + \else% + \def\@tempa##1{\@@aftergroup##1\the\toks@}% + \expandafter\expandafter\expandafter\@tempa% + \fi\fi% +} +\endinput +%% +%% End of file `doafter.sty'. diff --git a/Master/texmf-dist/tex/latex/mdwtools/footnote.sty b/Master/texmf-dist/tex/latex/mdwtools/footnote.sty new file mode 100644 index 00000000000..c35317dca07 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdwtools/footnote.sty @@ -0,0 +1,200 @@ +%% +%% This is file `footnote.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% footnote.dtx (with options: `package') +%% +%% IMPORTANT NOTICE +%% +%% footnote package -- Save footnotes around boxing environments +%% Copyright (c) 1996 Mark Wooding +%% +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program 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. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; if not, write to the Free Software +%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{footnote} + [1997/01/28 1.13 Save footnotes around boxes] +%% \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 \~} +%% +\ifx\fn@notes\@@undefined% + \newbox\fn@notes% +\fi +\newdimen\fn@width +\let\fn@colwidth\columnwidth +\newif\if@savingnotes +\def\fn@startnote{% + \hsize\fn@colwidth% + \interlinepenalty\interfootnotelinepenalty% + \reset@font\footnotesize% + \floatingpenalty\@MM% Is this right??? + \@parboxrestore% + \protected@edef\@currentlabel{\csname p@\@mpfn\endcsname\@thefnmark}% + \color@begingroup% +} +\let\fn@endnote\color@endgroup +\def\fn@fntext#1{% + \ifx\ifmeasuring@\@@undefined% + \expandafter\@secondoftwo\else\expandafter\@iden% + \fi% + {\ifmeasuring@\expandafter\@gobble\else\expandafter\@iden\fi}% + {% + \global\setbox\fn@notes\vbox{% + \unvbox\fn@notes% + \fn@startnote% + \@makefntext{% + \rule\z@\footnotesep% + \ignorespaces% + #1% + \@finalstrut\strutbox% + }% + \fn@endnote% + }% + }% +} +\def\savenotes{% + \begingroup% + \if@savingnotes\else% + \@savingnotestrue% + \let\@footnotetext\fn@fntext% + \let\@mpfootnotetext\fn@fntext% + \fn@width\columnwidth% + \let\fn@colwidth\fn@width% + \global\setbox\fn@notes\box\voidb@x% + \let\fn@thempfn\thempfn% + \let\fn@mpfn\@mpfn% + \ifx\@minipagerestore\relax\let\@minipagerestore\@empty\fi% + \expandafter\def\expandafter\@minipagerestore\expandafter{% + \@minipagerestore% + \let\thempfn\fn@thempfn% + \let\@mpfn\fn@mpfn% + }% + \fi% +} +\def\spewnotes{% + \endgroup% + \if@savingnotes\else\ifvoid\fn@notes\else\begingroup% + \let\@makefntext\@empty% + \let\@finalstrut\@gobble% + \let\rule\@gobbletwo% + \@footnotetext{\unvbox\fn@notes}% + \endgroup\fi\fi% +} +\let\endsavenotes\spewnotes +\def\fn@getmark#1#2{% + \begingroup% + \@ifnextchar[% + {\fn@getmark@i{#1}}% + {#1\fn@getmark@ii{#2}}% +} +\def\fn@getmark@i#1[#2]{% + \csname c@\@mpfn\endcsname#2% + \fn@getmark@ii% +} +\def\fn@getmark@ii#1{% + \unrestored@protected@xdef\@thefnmark{\thempfn}% + \endgroup% + #1% +} +\def\fn@startfntext{% + \setbox\z@\vbox\bgroup% + \fn@startnote% + \fn@prefntext% + \rule\z@\footnotesep% + \ignorespaces% +} +\def\fn@endfntext{% + \@finalstrut\strutbox% + \fn@postfntext% + \egroup% + \begingroup% + \let\@makefntext\@empty% + \let\@finalstrut\@gobble% + \let\rule\@gobbletwo% + \@footnotetext{\unvbox\z@}% + \endgroup% +} +\let\fn@latex@@footnote\footnote +\def\fn@footnote{footnote} +\def\footnote{% + \ifx\@currenvir\fn@footnote% + \expandafter\@firstoftwo% + \else% + \expandafter\@secondoftwo% + \fi% + {\fn@getmark{\stepcounter\@mpfn}% + {\leavevmode\unskip\@footnotemark\fn@startfntext}}% + {\fn@latex@@footnote}% +} +\let\endfootnote\fn@endfntext +\def\fn@footnotetext{footnotetext} +\let\fn@latex@@footnotetext\footnotetext +\def\footnotetext{% + \ifx\@currenvir\fn@footnotetext% + \expandafter\@firstoftwo% + \else% + \expandafter\@secondoftwo% + \fi% + {\fn@getmark{}\fn@startfntext}% + {\fn@latex@@footnotetext}% +} +\let\endfootnotetext\endfootnote +\long\def\@tempa#1\@@#2\@@@{\def\fn@prefntext{#1}\def\fn@postfntext{#2}} +\expandafter\@tempa\@makefntext\@@\@@@ +\def\makesavenoteenv{\@ifnextchar[\fn@msne@ii\fn@msne@i} +\def\fn@msne@i#1{% + \expandafter\let\csname msne$#1\expandafter\endcsname% + \csname #1\endcsname% + \expandafter\let\csname endmsne$#1\expandafter\endcsname% + \csname end#1\endcsname% + \fn@msne@ii[#1]{msne$#1}% +} +\def\fn@msne@ii[#1]#2{% + \expandafter\edef\csname#1\endcsname{% + \noexpand\savenotes% + \expandafter\noexpand\csname#2\endcsname% + }% + \expandafter\edef\csname end#1\endcsname{% + \expandafter\noexpand\csname end#2\endcsname% + \noexpand\expandafter% + \noexpand\spewnotes% + \noexpand\if@endpe\noexpand\@endpetrue\noexpand\fi% + }% +} +\makesavenoteenv[minipage*]{minipage} +\let\fn@parbox\parbox +\def\parbox{\@ifnextchar[{\fn@parbox@i{}}{\fn@parbox@ii{}}} +\def\fn@parbox@i#1[#2]{% + \@ifnextchar[{\fn@parbox@i{#1[#2]}}{\fn@parbox@ii{#1[#2]}}% +} +\long\def\fn@parbox@ii#1#2#3{\savenotes\fn@parbox#1{#2}{#3}\spewnotes} +\endinput +%% +%% End of file `footnote.sty'. diff --git a/Master/texmf-dist/tex/latex/mdwtools/mTTcmtt.fd b/Master/texmf-dist/tex/latex/mdwtools/mTTcmtt.fd new file mode 100644 index 00000000000..b662ffbb822 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdwtools/mTTcmtt.fd @@ -0,0 +1,71 @@ +%% +%% This is file `mTTcmtt.fd', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% cmtt.dtx (with options: `fd') +%% +%% IMPORTANT NOTICE +%% +%% mdwlist package -- various list-related things +%% Copyright (c) 1996 Mark Wooding +%% +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program 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. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; if not, write to the Free Software +%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%% +\ProvidesFile{mTTcmtt.fd} + [1996/05/25 1.1 Handing of the cmtt font] +%% \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 \~} +%% +\DeclareFontFamily{mTT}{cmtt}{\hyphenchar\font\m@ne} +\DeclareFontShape{mTT}{cmtt}{m}{n}{ + <5> <6> <7> <8> cmtt8 + <9> cmtt9 + <10> <10.95> cmtt10 + <12> <14.4> <17.28> <20.74> <24.88> cmtt12 +}{} +\DeclareFontShape{mTT}{cmtt}{m}{it}{ + <5> <6> <7> <8> <9> <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> + cmitt10 +}{} +\DeclareFontShape{mTT}{cmtt}{m}{sl}{ + <5> <6> <7> <8> <9> <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> + cmsltt10 +}{} +\DeclareFontShape{mTT}{cmtt}{m}{sc}{ + <5> <6> <7> <8> <9> <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> + cmtcsc10 +}{} +\DeclareFontShape{mTT}{cmtt}{m}{ui} {<->sub * cmtt/m/it} {} +\DeclareFontShape{mTT}{cmtt}{bx}{n} {<->sub * cmtt/m/n} {} +\DeclareFontShape{mTT}{cmtt}{bx}{it} {<->sub * cmtt/m/it} {} +\DeclareFontShape{mTT}{cmtt}{bx}{ui} {<->sub * cmtt/m/it} {} +\endinput +%% +%% End of file `mTTcmtt.fd'. diff --git a/Master/texmf-dist/tex/latex/mdwtools/mTTenc.def b/Master/texmf-dist/tex/latex/mdwtools/mTTenc.def new file mode 100644 index 00000000000..c9a36a833c9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdwtools/mTTenc.def @@ -0,0 +1,70 @@ +%% +%% This is file `mTTenc.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% cmtt.dtx (with options: `def') +%% +%% IMPORTANT NOTICE +%% +%% mdwlist package -- various list-related things +%% Copyright (c) 1996 Mark Wooding +%% +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program 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. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; if not, write to the Free Software +%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%% +\ProvidesFile{mTTcmtt.def} + [1996/05/25 1.1 Handing of the cmtt font] +%% \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 \~} +%% +\def\cmtt@accent#1#2{{% + \let\@old@font\font@name% + \ifcmtt@dcfonts% + \fontencoding{T1}\selectfont% + \else% + \usefont{OT1}{cmr}{bx}{n}% + \fi% + #1{\@old@font#2}% +}} +\DeclareTextCommand{\H}{mTT}{\cmtt@accent\H} +\DeclareTextCommand{\.}{mTT}{\cmtt@accent\.} +\DeclareTextSymbol{\textbackslash}{mTT}{92} +\DeclareTextSymbol{\textbar}{mTT}{124} +\DeclareTextSymbol{\textbraceleft}{mTT}{123} +\DeclareTextSymbol{\textbraceright}{mTT}{125} +\DeclareTextSymbol{\textless}{mTT}{60} +\DeclareTextSymbol{\textgreater}{mTT}{62} +\DeclareTextSymbol{\textunderscore}{mTT}{95} +\DeclareTextSymbol{\textvisiblespace}{mTT}{32} +\DeclareTextCommand{\textellipsis}{mTT}{...} +\DeclareTextSymbol{\textquotedbl}{mTT}{34} +\DeclareTextSymbol{\textquotesingl}{mTT}{13} +\endinput +%% +%% End of file `mTTenc.def'. diff --git a/Master/texmf-dist/tex/latex/mdwtools/mathenv.sty b/Master/texmf-dist/tex/latex/mdwtools/mathenv.sty new file mode 100644 index 00000000000..469dadc0179 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdwtools/mathenv.sty @@ -0,0 +1,449 @@ +%% +%% This is file `mathenv.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% mdwtab.dtx (with options: `mathenv') +%% +%% IMPORTANT NOTICE +%% +%% mdwtab package -- another rewrite of the tabular environment, etc. +%% Copyright (c) 1996 Mark Wooding +%% +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program 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. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; if not, write to the Free Software +%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{mathenv} + [1998/04/28 1.9 Various maths environments] +%% \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 \~} +%% +%% +\newif\if@fleqn +\newif\if@leqno +\DeclareOption{fleqn}{\@fleqntrue} +\DeclareOption{leqno}{\@leqnotrue} +\ProcessOptions +\RequirePackage{mdwtab} +\newif\if@eqalast +\newskip\eqaopenskip +\newskip\eqacloseskip +\newskip\eqacolskip +\newskip\eqainskip +\newskip\splitleft +\newskip\splitright +\AtBeginDocument{% + \eqacloseskip\@centering% + \eqacolskip1.5em\@plus\@m\p@ + \eqainskip\z@% + \if@fleqn% + \eqaopenskip\mathindent% + \splitleft\mathindent\relax% + \splitright\mathindent\@minus\mathindent\relax% + \else% + \eqaopenskip\@centering% + \splitleft2.5em\@minus2.5em% + \splitright\splitleft% + \fi% + \relax% +} +\def\dsp@startouter{% + \let\dsp@end\dsp@endouter% + $$% +} +\def\dsp@endouter{$$} +\def\dsp@startinner{% + \let\dsp@end\dsp@endinner% + \if@fleqn\kern-\mathindent\fi% + \if@leqno\vtop\else\vtop\fi\bgroup% +} +\def\dsp@endinner{\egroup} +\def\dsp@start{% + \ifmmode% + \ifinner\mth@err@mdsp\fi% + \expandafter\dsp@startinner% + \else% + \ifhmode\ifinner\mth@err@hdsp\fi\fi% + \expandafter\dsp@startouter% + \fi% +} +\def\dsp@tabpause{% + \def\tab@startpause% + {\penalty\postdisplaypenalty\vskip\belowdisplayskip}% + \def\tab@endpause% + {\penalty\predisplaypenalty\vskip\abovedisplayskip}% +} +\let\eqastyle\displaystyle +\def\eqnarray{% + \eqnarray@i\eqa@eqcount% +} +\@namedef{eqnarray*}{\eqnarray@i{}} +\def\eqnarray@i#1{\@ifnextchar[{\eqnarray@ii{#1}}{\eqnarray@ii{#1}[rcl]}} +\def\eqnarray@ii#1[#2]{% + \stepcounter{equation}% + \def\@currentlabel{\p@equation\theequation}% + \let\eqa@oldnumber\eqa@number% + \def\eqa@defnumber{#1}% + \global\let\eqa@number\eqa@defnumber% + \@eqalastfalse% + \m@th% + \colset{eqnarray}% + \tab@initread% + \def\tab@tabtext{&\tabskip\z@skip}% + \tab@preamble{\tabskip\z@skip}% + \tab@readpreamble{#2@{\tabskip\eqacloseskip}}% + \dsp@tabpause% + \col@sep.5\eqainskip% + \everycr{}% + \let\\\@eqncr% + \dsp@start% + \tabskip\eqaopenskip% + \halign to\displaywidth\expandafter\bgroup% + \the\tab@preamble% + &&\eqa@lastcol\hb@xt@\z@{\hss##}\tabskip\z@\cr% +} +\def\endeqnarray{% + \eqa@eqnum% + \egroup% + \dsp@end% + \global\let\eqa@number\eqa@oldnumber% + \global\@ignoretrue% + \global\advance\c@equation\m@ne% +} +\expandafter\let\csname endeqnarray*\endcsname\endeqnarray +\colpush{eqnarray} +\coldef r{\tabcoltype{\hfil$\eqastyle}{{}$}} +\coldef c{\tabcoltype{\hfil$\eqastyle{}}{{}$\hfil}} +\coldef l{\tabcoltype{$\eqastyle{}}{$\hfil}} +\coldef x{\tabcoltype{\if@fleqn\else\hfil\fi$\eqastyle}{$\hfil}} +\collet T [tabular]T +\coldef L{\tabcoltype{\hb@xt@2em\bgroup$\eqastyle}{$\hss\egroup}} +\coldef :{\tabspctype{\tabskip\eqacolskip}} +\coldef q{\tabspctype{\quad}} +\collet > [tabular]> +\collet < [tabular]< +\collet * [tabular]* +\collet @ [tabular]@ +\colpop +\def\@eqncr{\tab@cr\eqacr@i\interdisplaylinepenalty\@M}% +\def\eqacr@i#1#2{% + \eqa@eqnum% + \noalign{\penalty#2\vskip\jot\vskip#1}% +} +\if@leqno + \def\eqa@eqpos#1{% + \hb@xt@.01\p@{}\rlap{\normalfont\normalcolor\hskip-\displaywidth#1}% + } +\else + \def\eqa@eqpos#1{\normalfont\normalcolor#1} +\fi +\def\eqa@eqnum{% + \global\let\eqa@lastcol\@eqalasttrue% + \eqa@eqnum@i% +} +\def\eqa@eqnum@i{% + \relax% + \if@eqalast% + \expandafter\eqa@eqnum@ii% + \else% + \expandafter\eqa@eqnum@iii% + \fi% +} +\def\eqa@eqnum@ii{% + \eqa@eqpos\eqa@number% + \global\let\eqa@number\eqa@defnumber% + \global\let\eqa@lastcol\eqa@@lastcol% + \cr% +} +\def\eqa@eqnum@iii{&\eqa@eqnum@i} +\def\eqa@@lastcol{\mth@err@number\setbox\z@} +\let\eqa@lastcol\eqa@@lastcol +\newcommand\eqnumber[1][\eqa@eqcount]{\gdef\eqa@number{#1}} +\def\eqa@eqcount{(\theequation)\global\advance\c@equation\@ne} +\def\nonumber{\global\let\eqa@number\@empty} +\def\eqnalign{\@ifnextchar[\eqnalign@i{\eqnalign@i[rcl]}} +\def\eqnalign@i[#1]{% + \@ifnextchar[{\eqnalign@ii{#1}}{\eqnalign@ii{#1}[c]}% +} +\def\eqnalign@ii#1[#2]{% + \let\\\eqn@cr% + \colset{eqnarray}% + \tab@initread% + \def\tab@tabtext{&\tabskip\z@skip}% + \tabskip\z@skip% + \col@sep.5\eqainskip% + \tab@readpreamble{#1}% + \everycr{}% + \if#2t\vtop\else% + \if#2b\vbox\else% + \vcenter% + \fi% + \fi% + \bgroup% + \halign\expandafter\bgroup\the\tab@preamble\cr% +} +\def\endeqnalign{% + \crcr% + \egroup% + \egroup% +} +\def\eqn@cr{\tab@cr\eqn@cr@i{}{}} +\def\eqn@cr@i#1{\cr\noalign{\vskip\jot\vskip#1}\@gobble} +\def\eqlines{\eqnarray[x]} +\let\endeqlines\endeqnarray +\expandafter\edef\csname eqlines*\endcsname{% + \expandafter\noexpand\csname eqnarray*\endcsname[x]% +} +\expandafter\let\csname endeqlines*\expandafter\endcsname + \csname endeqnarray*\endcsname +\def\spliteqn{% + \let\eqa@oldnumber\eqa@number% + \global\let\eqa@number\eqa@eqcount% + \spliteqn@i% +} +\@namedef{spliteqn*}{% + \let\eqa@oldnumber\eqa@number% + \gdef\eqa@number{}% + \spliteqn@i% +} +\def\endspliteqn{% + \hfilneg\seq@lastcr% + \egroup% + \dsp@end% + \global\let\eqa@number\eqa@oldnumber% + \global\advance\c@equation\m@ne% +} +\expandafter\let\csname endspliteqn*\endcsname\endspliteqn +\def\spliteqn@i{% + \stepcounter{equation}% + \def\@currentlabel{\p@equation\theequation}% + \if@leqno% + \global\let\seq@docr\seq@eqnocr% + \else% + \global\let\seq@docr\seq@cr% + \fi% + \global\let\seq@lastcr\seq@eqnocr% + \dsp@start% + \dsp@tabpause% + \def\\{\seq@docr}% + \seq@dosplit% + {\hb@xt@\displaywidth{% + \hskip\splitleft\hfil$\displaystyle##$% + \hfil\hskip\splitright}}% + {\hfilneg}% +} +\def\subsplit{% + \let\\\seq@cr% + \vcenter\bgroup% + \seq@dosplit{\hfil\qquad$##$\qquad\hfil}{\hfilneg\hskip-2em}% +} +\def\endsubsplit{% + \hfilneg\hskip-2em\cr% + \egroup\egroup% +} +\def\seq@dosplit#1#2{% + \halign\bgroup% + #1&&\mth@err@number\setbox\z@\hbox{##}\cr% + #2\relax% +} +\def\seq@eqnocr{% + &\omit% + \hb@xt@\z@{\hss\eqa@eqpos\eqa@number}% + \global\let\seq@docr\seq@cr% + \global\let\seq@lastcr\seq@cr% + \seq@cr% +} +\def\seq@cr{\tab@cr\seq@cr@i\interdisplaylinepenalty\@M} +\def\seq@cr@i#1#2{\cr\noalign{\penalty#2\vskip\jot\vskip#1}} +\def\genmatrix#1#2#3#4#5{% + \let\mat@style#1% + \ifx#2\scriptstyle% + \let\mat@font\scriptfont% + \else\ifx#2\scriptscriptstyle% + \let\mat@font\scriptscriptfont% + \else% + \let\mat@font\textfont% + \fi\fi% + \ifx\mat@style\scriptstyle% + \let\mat@textsize\scriptsize% + \else\ifx\mat@style\scriptscriptstyle% + \let\mat@textsize\scriptscriptsize% + \else% + \let\mat@textsize\relax% + \fi\fi% + \def\mat@left{\bgroup\mat@style\left#4#3\vcenter\bgroup}% + \toks@{\egroup#3\right#5\egroup}% + \@tempswatrue% + \ifx\mat@style\displaystyle\else\ifx\mat@style\textstyle\else% + \@tempswafalse% + \setbox\z@\hbox\bgroup$% + \toks@\expandafter{\the\toks@$\m@th\egroup\raise.75\p@\box\z@}% + \fi\fi% + \if@tempswa\ifmmode\else% + $\m@th% + \toks@\expandafter{\the\toks@$}% + \fi\fi% + \edef\mat@right{\the\toks@}% + \@ifnextchar[\genmatrix@i{\genmatrix@i[[c]}% +} +\def\genmatrix@i[#1]{% + \colset{matrix}% + \tab@initread% + \setbox\z@\hbox{$\mat@style\mskip12mu$}% + \edef\tab@tabtext{&\kern\the\wd\z@}% + \tab@readpreamble{#1}% + \if1\ifx\mat@style\scriptstyle1\else% + \ifx\mat@style\scriptscriptstyle1\else0\fi\fi% + \baselineskip\fontdimen10\mat@font\tw@% + \advance\baselineskip\fontdimen12\mat@font\tw@% + \lineskip\thr@@\fontdimen8\mat@font\thr@@% + \else% + \baselineskip\fontdimen8\mat@font\tw@% + \advance\baselineskip\fontdimen11\mat@font\tw@% + \lineskip7\fontdimen8\mat@font\thr@@% + \fi% + \lineskiplimit\lineskip% + \let\\\mat@cr% + \tabskip\z@skip% + \col@sep\z@% + \mat@left% + \halign\expandafter\bgroup\the\tab@preamble\tabskip\z@skip\cr% + \ifx\mat@font\textfont% + \omit$\mat@style\mathstrut$\cr\noalign{\kern-\baselineskip}% + \fi% +} +\def\endgenmatrix{% + \crcr% + \ifx\mat@font\textfont% + \omit$\mat@style\mathstrut$\cr\noalign{\kern-\baselineskip}% + \fi% + \egroup% + \mat@right% +} +\def\mat@cr{\tab@cr\mat@cr@i{}{}} +\def\mat@cr@i#1{\cr\noalign{\vskip#1}\@gobble} +\def\newmatrix#1#2{% + \@namedef{#1}{\genmatrix#2}% + \expandafter\let\csname end#1\endcsname\endgenmatrix% +} +\newmatrix{matrix}{{\textstyle}{\textstyle}{\,}{.}{.}} +\newmatrix{pmatrix}{{\textstyle}{\textstyle}{\,}{(}{)}} +\newmatrix{dmatrix}{{\textstyle}{\textstyle}{\,}} +\newmatrix{smatrix}{{\scriptstyle}{\scriptstyle}{}{.}{.}} +\newmatrix{spmatrix}{{\scriptstyle}{\scriptstyle}{}{(}{)}} +\newmatrix{sdmatrix}{{\scriptstyle}{\scriptstyle}{}} +\newmatrix{smatrix*}{{\scriptstyle}{\textstyle}{}{.}{.}} +\newmatrix{spmatrix*}{{\scriptstyle}{\textstyle}{}{(}{)}} +\newmatrix{sdmatrix*}{{\scriptstyle}{\textstyle}{}} +\def\script{% + \let\mat@style\scriptstyle% + \def\mat@left{\vcenter\bgroup}% + \def\mat@right{\egroup}% + \let\mat@font\scriptfont% + \let\mat@textsize\scriptsize% + \@ifnextchar[\genmatrix@i{\genmatrix@i[c]}% +} +\let\endscript\endgenmatrix +\colpush{matrix} +\coldef l{\tabcoltype{\kern\z@$\mat@style}{\m@th$\hfil}} +\coldef c{\tabcoltype{\hfil$\mat@style}{\m@th$\hfil}} +\coldef r{\tabcoltype{\hfil$\mat@style}{\m@th$}} +\coldef T#1{\tab@aligncol{#1}{\begingroup\mat@textsize}{\endgroup}} +\coldef {[}{% + \@firstoftwo{% + \ifnum\tab@columns=\z@% + \def\@tempa##1\q@delim{% + \tab@mkpreamble##1[##1\q@delim% + }% + \expandafter\@tempa% + \else% + \tab@setstate\tab@prestate% + \tab@append\tab@preamble{&}% + \expandafter\tab@mkpreamble% + \fi% + }% +} +\colpop +\def\mdw@dots#1{\ensuremath{\mathpalette\mdw@dots@i{#1}}} +\def\mdw@dots@i#1#2{% + \setbox\z@\hbox{$#1\mskip1.8mu$}% + \dimen@\wd\z@% + \setbox\z@\hbox{$#1.$}% + #2% +} +\def\vdots{% + \mdw@dots{\vbox{% + \baselineskip4\dimen@% + \lineskiplimit\z@% + \kern6\dimen@% + \copy\z@\copy\z@\box\z@% + }}% +} +\def\ddots{% + \mdw@dots{\mathinner{% + \mkern1mu% + \raise7\dimen@\vbox{\kern7\dimen@\copy\z@}% + \mkern2mu% + \raise4\dimen@\copy\z@% + \mkern2mu% + \raise\dimen@\box\z@% + \mkern1mu% + }}% +} +\def\cases{\left\{\,\array{@{}lTl@{}}} +\def\endcases{\endarray\,\right.} +\def\smcases{\left\{\smarray{@{}lTl@{}}} +\def\endsmcases{\endsmarray\,\right.} +\def\mth@error{\PackageError{mathenv}} +\def\mth@err@number{% + \mth@error{Too many `&' characters found}{% + You've put too many `&' characters in an alignment^^J% + environment (like `eqnarray' or `spliteqn') and wandered^^J% + into trouble. I've gobbled the contents of that column^^J% + and hopefully I can recover fairly easily.% + }% +} +\def\mth@err@mdsp{% + \mth@error{Can't do displays in nondisplay maths mode}{% + You're trying to start a display environment, but you're^^J% + in nondisplay maths mode. The display will appear but^^J% + don't blame me when it looks horrible.% + }% +} +\def\mth@err@hdsp{% + \mth@error{Can't do displays in LR mode}{% + You're trying to start a display environment, but you're^^J% + in LR (restricted horizontal) mode. Everything will go^^J% + totally wrong, so your best bet is to type `X', fix the^^J% + mistake and start again.% + }% +} +\endinput +%% +%% End of file `mathenv.sty'. diff --git a/Master/texmf-dist/tex/latex/mdwtools/mdwlist.sty b/Master/texmf-dist/tex/latex/mdwtools/mdwlist.sty new file mode 100644 index 00000000000..c8764bcfcd3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdwtools/mdwlist.sty @@ -0,0 +1,136 @@ +%% +%% This is file `mdwlist.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% mdwlist.dtx (with options: `package') +%% +%% IMPORTANT NOTICE +%% +%% mdwlist package -- various list-related things +%% Copyright (c) 1996 Mark Wooding +%% +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program 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. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; if not, write to the Free Software +%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{mdwlist} + [1996/05/02 1.1 Various list-related things] +%% \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 \~} +%% +\def\nextlinelabel#1{% + \sbox\z@{#1}% + \ifdim\wd\z@>\labelwidth% + \setbox\z@\vbox{\box\z@\hbox{}}% + \wd\z@\z@% + \box\z@% + \else% + \unhbox\z@% + \fi% + \hfil% +} +\def\multilinelabel#1{% + \setbox\z@\hbox{% + \parbox[t]\labelwidth{\raggedright\hskip\z@skip#1}% + }% + \dp\z@\z@% + \box\z@% + \hfil% +} +\def\pushlabel#1{{#1}\hfil} +\def\desclabelstyle#1{\def\desc@labelstyle{#1}} +\def\desclabelwidth#1{% + \setlength\labelwidth{#1}% + \leftmargin\labelwidth% + \advance\leftmargin\labelsep% +} +\def\basedescript#1{% + \list{}{% + \defaultdesc% + #1% + \itemindent\labelwidth% + \advance\itemindent\labelsep% + \advance\itemindent-\leftmargin% + \let\desc@makelabel\makelabel% + \def\makelabel##1{\desc@labelstyle{\desc@makelabel{##1}}}% + }% +} +\let\endbasedescript\endlist +\providecommand\defaultdesc{% + \desclabelstyle\pushlabel% + \def\makelabel##1{\bfseries##1}% + \labelwidth\z@% +} +\def\note{\@ifnextchar[\note@i{\note@i[Note:]}} +\def\note@i[#1]{% + \basedescript{% + \sbox\z@{\makelabel{#1}}% + \desclabelwidth{\wd\z@}% + }% + \item[\box\z@]% +} +\let\endnote\endbasedescript +\def\makecompactlist#1#2{% + \expandafter\@ifdefinable\csname#1\endcsname% + {\makecompactlist@i{#1}{#2}}% +} +\def\makecompactlist@i#1#2{% + \@ifundefined{#2}{\me@err{Environment `#2' not defined}\@ehc}{}% + \@namedef{#1}{\@compact@list{#2}}% + \expandafter\let\csname end#1\expandafter\endcsname% + \csname end#2\endcsname% +} +\def\@compact@list#1{\@testopt{\@compact@list@i{#1}}{}} +\def\@compact@list@i#1[#2]{% + \@nameuse{#1}#2% + \parskip\z@% + \itemsep\z@% +}% +\makecompactlist{itemize*}{itemize} +\makecompactlist{enumerate*}{enumerate} +\makecompactlist{description*}{description} +\def\suspend{\@dblarg\suspend@i} +\def\suspend@i[#1]#2{% + \edef\@tempa{% + \noexpand\end{#2}% + \def\expandafter\noexpand\csname resume.#1\endcsname{% + \csname c@\@listctr\endcsname\the\csname c@\@listctr\endcsname% + }% + }% + \@tempa% +} +\def\resume{\@dblarg\resume@i} +\def\resume@i[#1]#2{\@testopt{\resume@ii{#1}{#2}}{}} +\def\resume@ii#1#2[#3]{% + \begin{#2}#3% + \@ifundefined{resume.#1}{\ml@err@resume}{\@nameuse{resume.#1}}% +} +\endinput +%% +%% End of file `mdwlist.sty'. diff --git a/Master/texmf-dist/tex/latex/mdwtools/mdwmath.sty b/Master/texmf-dist/tex/latex/mdwtools/mdwmath.sty new file mode 100644 index 00000000000..f06def5f137 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdwtools/mdwmath.sty @@ -0,0 +1,132 @@ +%% +%% This is file `mdwmath.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% mdwmath.dtx (with options: `package') +%% +%% IMPORTANT NOTICE +%% +%% mdwmath package -- various nicer mathematical things +%% Copyright (c) 1996 Mark Wooding +%% +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program 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. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; if not, write to the Free Software +%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{mdwmath} + [1996/04/11 1.1 Nice mathematical things] +%% \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 \~} +%% +\newcount\sq@sqrt +\begingroup + \catcode`\|0 \catcode`\\12 + |def|sq@readrad#1"#2\#3|relax{|global|sq@sqrt"#2|relax} + |expandafter|sq@readrad|meaning|sqrtsign|relax +|endgroup +\def\sq@delim{\delimiter\sq@sqrt\relax} +\def\sqrtdel{\mathpalette\sqrtdel@i} +\def\sqrtdel@i#1#2{% + \setbox\z@\hbox{$\m@th#1#2$}% %%% Bzzzt -- uncramps the mathstyle + \ifx#1\displaystyle% + \@tempdima1ex% + \else% + \@tempdima.6\p@% + \fi% + \@tempdimb.6\p@% + \advance\@tempdimb.25\@tempdima% + \dimen@.6\p@% + \advance\dimen@\@tempdimb% + \advance\dimen@\ht\z@% + \advance\dimen@\dp\z@% + \setbox\tw@\hbox{% + $\left\sq@delim\vcenter to\dimen@{}\right.\n@space$% + }% + \@tempdima\ht\tw@% + \advance\@tempdima\dp\tw@% + \advance\@tempdima-\ht\z@% + \advance\@tempdima-\dp\z@% + \ifdim\@tempdima>\@tempdimb% + \advance\@tempdima\@tempdimb% + \@tempdimb.5\@tempdima% + \fi% + \@tempdima\ht\z@% + \advance\@tempdima\@tempdimb% + \advance\@tempdima-\ht\tw@% + {\raise\@tempdima\box\tw@\vbox{\kern\@tempdimb\box\z@}}% +} +\DeclareRobustCommand\sqrt{\@ifstar{\sqrt@i\sqrtdel}{\sqrt@i\sqrtsign}} +\def\sqrt@i#1{\@ifnextchar[{\sqrt@ii{#1}}{\sqrt@iv{#1}}} +\def\sqrt@ii#1[#2]{% + \setbox\rootbox\hbox{$\m@th\scriptscriptstyle{#2}$}% + \ifdim\wd\rootbox<6\p@% + \setbox\rootbox\hb@xt@6\p@{\hfil\unhbox\rootbox}% + \fi% + \mathpalette{\sqrt@iii{#1}}% +} +\def\sqrt@iii#1#2#3{% + \setbox\z@\hbox{$\m@th#2#1{#3}$}% + \dimen@\ht\z@% + \advance\dimen@-\dp\z@% + \dimen@.6\dimen@% + \advance\dimen@\dp\rootbox% + \mkern-3mu% + \raise\dimen@\copy\rootbox% + \mkern-10mu% + \box\z@% +} +\def\sqrt@iv#1#2{#1{#2}} +\def\root{\@ifstar{\root@i\sqrtdel}{\root@i\sqrtsign}} +\def\root@i#1#2\of{\sqrt@ii{#1}[#2]} +\DeclareMathSymbol{&}{\mathbin}{operators}{`\&} +\DeclareMathSymbol{\bitand}{\mathbin}{operators}{`\&} +\def\bitor{\mathbin\mid} +\def\dblor{\mathbin{\mid\mid}} +\def\dbland{\mathbin{\mathrel\bitand\mathrel\bitand}} +\def\bbigg{\@bbigg\mathord} +\def\bbiggl{\@bbigg\mathopen} +\def\bbiggr{\@bbigg\mathclose} +\def\bbiggm{\@bbigg\mathrel} +\def\@bbigg#1{\@ifnextchar[{\@bigg@i{#1}}{\@bigg@i{#1}[\z@]}} +\def\@bigg@i#1[#2]#3#4{#1{\bbigg@{#2}{#3}{#4}}} +\def\bbigg@#1#2#3{% + \hbox{$% + \dimen@\ht\strutbox\advance\dimen@\dp\strutbox% + \advance\dimen@#1% + \dimen@#2\dimen@% + \left#3\vcenter to\dimen@{}\right.\n@space% + $}% +} +\def\big{\bbigg@\z@\@ne} +\def\Big{\bbigg@\z@{1.5}} +\def\bigg{\bbigg@\z@\tw@} +\def\Bigg{\bbigg@\z@{2.5}} +\endinput +%% +%% End of file `mdwmath.sty'. diff --git a/Master/texmf-dist/tex/latex/mdwtools/mdwtab.sty b/Master/texmf-dist/tex/latex/mdwtools/mdwtab.sty new file mode 100644 index 00000000000..ababc58d591 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdwtools/mdwtab.sty @@ -0,0 +1,1077 @@ +%% +%% This is file `mdwtab.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% mdwtab.dtx (with options: `mdwtab') +%% footnote.dtx (with options: `macro') +%% doafter.dtx (with options: `macro') +%% +%% IMPORTANT NOTICE +%% +%% mdwtab package -- another rewrite of the tabular environment, etc. +%% Copyright (c) 1996 Mark Wooding +%% +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program 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. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; if not, write to the Free Software +%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{mdwtab} + [1998/04/28 1.9 Table typesetting with style] +%% \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 \~} +%% +%% +\newcount\tab@state +\newcount\tab@columns +\newtoks\tab@preamble +\newtoks\tab@shortline +\toksdef\tab@pretext 4 +\toksdef\tab@posttext 6 +\toksdef\tab@userpretext 8 +\newdimen\extrarowheight +\newdimen\tabextrasep +\newdimen\arrayextrasep +\newdimen\smarraycolsep +\newdimen\smarrayextrasep +\newdimen\tab@width +\newdimen\col@sep +\newdimen\tab@endheight +\newskip\tab@leftskip +\newskip\tab@rightskip +\newif\iftab@firstcol +\newif\iftab@initrule +\newif\iftab@rule +\newif\iftab@vgap +\tabextrasep\z@ +\arrayextrasep\jot +\smarraycolsep\thr@@\p@ +\smarrayextrasep\z@ +\let\tab@extrasep\tabextrasep +\let\tab@penalty\relax +\def\@maybe@unskip{\ifhmode\hskip\m@ne\lastskip\relax\fi} +\def\q@delim{\q@delim} +\chardef\tab@startstate 0 +\chardef\tab@loopstate 1 +\chardef\tab@rulestate 1 +\chardef\tab@prespcstate 2 +\chardef\tab@prestate 3 +\chardef\tab@colstate 4 +\chardef\tab@poststate 5 +\chardef\tab@postspcstate 6 +\chardef\tab@limitstate 7 +\def\tab@append#1#2{#1\expandafter{\the#1#2}} +\def\tab@prepend#1#2{% + \toks@{#2}#1\expandafter{\the\expandafter\toks@\the#1}% +} +\def\tab@commit{% + \iftab@firstcol\else% + \expandafter\tab@append\expandafter\tab@preamble% + \expandafter{\tab@tabtext}% + \fi% + \toks@\expandafter{\tab@midtext}% + \tab@preamble\expandafter{% + \the\expandafter\tab@preamble% + \the\expandafter\tab@pretext% + \the\expandafter\tab@userpretext% + \the\expandafter\toks@% + \the\tab@posttext% + }% + \tab@firstcolfalse% + \tab@pretext{}% + \tab@userpretext{}% + \tab@posttext{}% +} +\def\tab@setstate#1{% + \ifnum#1=\tab@state\else% + \def\@tempa{\tab@setstate@i{#1}}% + \@tempa% + \fi% +} +\def\tab@setstate@i#1{% + \global\advance\tab@state\@ne% + \ifnum\tab@state>\tab@limitstate% + \global\tab@state\tab@loopstate% + \fi% + \ifnum\tab@state=\tab@prespcstate% + \iftab@initrule% + \tab@initrulefalse% + \else% + \tab@looped% + \tab@commit% + \tab@append\tab@shortline{&\omit}% + \fi% + \fi% + \ifnum#1=\tab@state% + \let\@tempa\relax% + \else% + \csname tab@default@\number\tab@state\endcsname% + \fi% + \@tempa% +} +\@namedef{tab@default@2}{% + \iftab@rule% + \tab@append\tab@pretext{\hskip\col@sep}% + \fi% +} +\@namedef{tab@default@4}{% + \tab@err@misscol% + \tab@append\tab@pretext{\tab@bgroup\relax}% + \tab@append\tab@posttext{\relax\tab@egroup\hfil}% + \tab@append\tab@shortline{\hfil}% + \advance\tab@columns\@ne% +} +\@namedef{tab@default@6}{% + \tab@append\tab@posttext{\hskip\col@sep}% + \tab@ruletrue% +} +\def\tab@extracol#1#2{\tab@extracol@i#1#2\extracolsep{}\extracolsep\end} +\def\tab@extracol@i#1#2\extracolsep#3#4\extracolsep#5\end{% + \ifx @#3@% + \def\@tempa{#1{#2}}% + \else% + \def\@tempa{#1{#2\tabskip#3\relax#4}}% + \fi% + \@tempa% +} +\def\tabruletype#1{\tab@extracol\tabruletype@i{#1}}% +\def\tabruletype@i#1{% + \iftab@initrule% + \let\tab@tok\tab@pretext% + \else% + \let\tab@tok\tab@posttext% + \fi% + \ifnum\tab@state=\tab@rulestate% + \tab@append\tab@tok{\hskip\doublerulesep\begingroup#1\endgroup}% + \expandafter\tab@append\expandafter\tab@shortline\expandafter{% + \expandafter\hskip\expandafter\doublerulesep% + \expandafter\tab@ckr\expandafter{\the\tab@columns}% + {\begingroup#1\endgroup}% + }% + \else% + \tab@setstate\tab@rulestate% + \tab@append\tab@tok{\begingroup#1\endgroup}% + \expandafter\tab@append\expandafter\tab@shortline\expandafter{% + \expandafter\tab@ckr\expandafter{\the\tab@columns}% + {\begingroup#1\endgroup}% + }% + \fi% + \tab@ruletrue% +} +\def\tabspctype#1{\tab@extracol\tabspctype@i{#1}}% +\def\tabspctype@i#1{% + \tab@rulefalse% + \ifnum\tab@state>\tab@prespcstate% + \tab@setstate\tab@postspcstate% + \let\tab@tok\tab@posttext% + \else% + \tab@setstate\tab@prespcstate% + \let\tab@tok\tab@pretext% + \fi% + \tab@append\tab@tok{\begingroup#1\endgroup}% +} +\def\tabcoltype#1#2{% + \ifnum\tab@state=\tab@colstate% + \global\advance\tab@state\@ne% + \fi% + \advance\tab@columns\@ne% + \tab@setstate\tab@colstate% + \tab@append\tab@pretext{#1}% + \tab@append\tab@posttext{#2}% + \tab@append\tab@shortline{\hfil}% +} +\def\tabuserpretype#1{% + \tab@setstate\tab@prestate% + \tab@prepend\tab@userpretext{#1}% +} +\def\tabuserposttype#1{% + \tab@setstate\tab@poststate% + \tab@prepend\tab@posttext{#1}% +} +\def\tab@push#1#2{% + \toks@{{#2}}% + \expandafter\def\expandafter#1\expandafter{\the\expandafter\toks@#1}% +} +\def\tab@pop#1{\expandafter\def\expandafter#1\expandafter{\@gobble#1}} +\def\tab@head#1{\expandafter\tab@head@i#1\relax} +\def\tab@head@i#1#2\relax{#1} +\def\tab@colstack{{tabular}} +\def\colset{\colpop\colpush} +\def\colpush{\tab@push\tab@colstack} +\def\colpop{\tab@pop\tab@colstack} +\def\tab@colset{\tab@head\tab@colstack} +\def\tab@initread{% + \global\tab@state\tab@startstate% + \tab@preamble{}% + \tab@shortline{}% + \def\tab@tabtext{&}% + \def\tab@midtext{\ignorespaces####\@maybe@unskip}% + \tab@pretext{}% + \tab@userpretext{}% + \tab@posttext{}% + \let\tab@multicol\@empty% + \def\tab@startpause{\penalty\postdisplaypenalty\medskip}% + \def\tab@endpause{\penalty\predisplaypenalty\medskip}% + \tab@columns\z@% + \let\tab@looped\relax% + \tab@ruletrue% + \tab@initruletrue% + \tab@firstcoltrue% +} +\def\tab@readpreamble#1{% + \tab@doreadpream{#1}% + \iftab@initrule\global\tab@state\tab@prespcstate\fi% + \tab@setstate\tab@rulestate% + \tab@commit% +} +\def\tab@doreadpream#1{\tab@mkpreamble#1\q@delim} +\def\tab@mkpreamble{\futurelet\@let@token\tab@mkpreamble@i} +\def\tab@mkpreamble@i{% + \ifx\@let@token\@sptoken% + \expandafter\tab@mkpreamble@spc% + \else% + \expandafter\tab@mkpreamble@ii% + \fi% +} +\def\tab@mkpreamble@ii{% + \ifx\@let@token\q@delim% + \def\@tempa{\let\@let@token}% + \else% + \ifcat\bgroup\noexpand\@let@token% + \tab@err@oddgroup% + \def\@tempa##1{\tab@mkpreamble}% + \else% + \let\@tempa\tab@mkpreamble@iii% + \fi% + \fi% + \@tempa% +} +\def\tab@mkpreamble@iii#1{% + \@ifundefined{\tab@colset!col.\string#1}{% + \tab@err@undef{#1}\tab@mkpreamble% + }{% + \@nameuse{\tab@colset!col.\string#1}% + }% +} +\@namedef{tab@mkpreamble@spc} {% + \@ifundefined{\tab@colset!col. }{% + \tab@mkpreamble% + }{% + \@nameuse{\tab@colset!col. }% + }% +} +\def\coldef{\@ifnextchar[\coldef@i{\coldef@i[\tab@colset]}} +\def\coldef@i[#1]#2#3#{\coldef@ii[#1]{#2}{#3}} +\def\coldef@ii[#1]#2#3#4{% + \expandafter\def\csname#1!col.\string#2\endcsname#3{% + #4\tab@mkpreamble% + }% +} +\def\collet{\@ifnextchar[\collet@i{\collet@i[\tab@colset]}} +\def\collet@i[#1]#2{% + \@ifnextchar=% + {\collet@ii[#1]{#2}}% + {\collet@ii[#1]{#2}=}% +} +\def\collet@ii[#1]#2={% + \@ifnextchar[% + {\collet@iii[#1]{#2}}% + {\collet@iii[#1]{#2}[\tab@colset]}% +} +\def\collet@iii[#1]#2[#3]#4{% + \expandafter\let\csname#1!col.\string#2\expandafter\endcsname% + \csname#3!col.\string#4\endcsname% +} +\def\newcolumntype#1{\@ifnextchar[{\nct@i{#1}}{\nct@i#1[0]}} +\def\nct@i#1[#2]{\@ifnextchar[{\nct@ii{#1}[#2]}{\nct@iii{#1}{[#2]}}} +\def\nct@ii#1[#2][#3]{\nct@iii{#1}{[#2][#3]}} +\def\nct@iii#1#2#3{% + \expandafter\let\csname\tab@colset!col.\string#1\endcsname\relax% + \expandafter\newcommand\csname\tab@colset!col.\string#1\endcsname#2{% + \tab@deepmagic{#1}% + \tab@mkpreamble% + #3% + }% +} +\def\newcol@#1[#2]{\nct@iii{#1}{[#2]}} +\def\tab@deepmagic#1{% + \csname NC@rewrite@\string#1\endcsname\NC@find\tab@@magic@@% +} +\def\NC@find#1\tab@@magic@@{} +\colset{tabular} +\coldef l{\tabcoltype{\kern\z@\tab@bgroup}{\tab@egroup\hfil}} +\coldef c{\tabcoltype{\hfil\tab@bgroup}{\tab@egroup\hfil}} +\coldef r{\tabcoltype{\hfil\tab@bgroup}{\tab@egroup}} +\coldef T#1{\tab@aligncol{#1}{\tab@btext}{\tab@etext}} +\coldef M#1{\tab@aligncol{#1}{\tab@bmaths}{\tab@emaths}} +\def\tab@aligncol#1#2#3{% + \if#1l\tabcoltype{\kern\z@#2}{#3\hfil}\fi% + \if#1c\tabcoltype{\hfil#2}{#3\hfil}\fi% + \if#1r\tabcoltype{\hfil#2}{#3}\fi% +} +\coldef |{\tabruletype{\vrule\@width\arrayrulewidth}} +\coldef !#1{\tabruletype{#1}} +\coldef @#1{\tabspctype{#1}} +\coldef p#1{\tabcoltype% + {\savenotes\vtop\tab@bpar{#1}}% + {\tab@epar\spewnotes\hfil}} +\coldef m#1{\tabcoltype% + {\savenotes$\vcenter\tab@bpar{#1}}% + {\tab@epar$\spewnotes\hfil}} +\coldef b#1{\tabcoltype% + {\savenotes\vbox\tab@bpar{#1}}% + {\tab@epar\spewnotes\hfil}} +\coldef >#1{\tabuserpretype{#1}} +\coldef <#1{\tabuserposttype{#1}} +\coldef ##1#2{\tabcoltype{#1}{#2}} +\coldef *#1#2{% + \count@#1% + \loop\ifnum\count@>0\relax% + \tab@doreadpream{#2}% + \advance\count@\m@ne% + \repeat% +} +\def\tab@bpar#1{% + \bgroup% + \hsize#1\relax% + \@arrayparboxrestore% + \setbox\z@\vtop\bgroup + \global\@minipagetrue% + \everypar{% + \global\@minipagefalse% + \everypar{}% + }% +} +\def\tab@epar{% + \ifhmode\@maybe@unskip\par\fi% + \unskip% + \ifdim\prevdepth>-\@m\p@\ifdim\prevdepth<\dp\@arstrutbox% + \kern-\prevdepth% + \nointerlineskip% + \vtop to\dp\@arstrutbox{}% + \fi\fi% + \egroup% + \ifdim\ht\z@<\ht\@arstrutbox% + \vbox to\ht\@arstrutbox{}% + \kern-\ht\z@% + \fi% + \unvbox\z@% + \egroup% +} +\def\@mkpream#1{% + \endgroup% + \colset{tabular}% + \tab@initread% + \def\tab@multicol{\@arstrut}% + \tab@preamble{\tab@multicol}% + \def\tab@midtext{\ignorespaces\@sharp\@sharp\@maybe@unskip}% + \tab@readpreamble{#1}% + \gdef\@preamble{\the\tab@preamble}% + \let\tab@bgroup\begingroup% + \let\tab@egroup\endgroup% + \begingroup% +} +\def\showpream#1{% + \tab@initread% + \tab@readpreamble{#1}% + \showthe\tab@preamble% + \showthe\tab@shortline% +} +\def\showcol#1{% + \expandafter\show\csname\tab@colset!col.\string#1\endcsname% +} +\def\tab@array{% + \tab@width\z@% + \let\tab@bgroup\tab@bmaths% + \let\tab@egroup\tab@emaths% + \@tabarray% +} +\def\tab@btext{\begingroup} +\def\tab@bmaths{$} +\def\tab@etext{\endgroup} +\def\tab@emaths{\m@th$} +\def\array{% + \col@sep\arraycolsep% + \let\tab@extrasep\arrayextrasep% + \tab@normalstrut% + \tab@array% +} +\def\endarray{% + \crcr% + \egroup% + \tab@right% + \tab@restorehlstate% +} +\def\smarray{% + \extrarowheight\z@% + \col@sep\smarraycolsep% + \let\tab@extrasep\smarrayextrasep% + \def\tab@bmaths{$\scriptstyle}% + \def\tab@btext{\begingroup\scriptsize}% + \setbox\z@\hbox{\scriptsize\strut}% + \dimen@\ht\z@\dimen\tw@\dp\z@\tab@setstrut% + \tab@array% +} +\let\endsmarray\endarray +\providecommand\tabstyle{} +\def\@tabular#1{% + \tabstyle% + \tab@width#1% + \let\tab@bgroup\tab@btext% + \let\tab@egroup\tab@etext% + \col@sep\tabcolsep% + \let\tab@extrasep\tabextrasep% + \tab@normalstrut% + \@tabarray% +} +\def\tabular{\@tabular\z@} +\expandafter\let\csname tabular*\endcsname\@tabular +\let\endtabular\endarray +\expandafter\let\csname endtabular*\endcsname\endarray +\def\tab@setstrut{% + \setbox\@arstrutbox\hbox{% + \vrule% + \@height\arraystretch\dimen@% + \@depth\arraystretch\dimen\tw@% + \@width\z@% + }% +} +\def\tab@normalstrut{% + \dimen@\ht\strutbox\advance\dimen@\extrarowheight% + \dimen\tw@\dp\strutbox% + \tab@setstrut% +} +\let\@arrayleft\relax% +\let\@arrayright\relax% +\def\@tabarray{% + \let\@arrayleft\relax% + \let\@arrayright\relax% + \@ifnextchar[\@array{\@array[c]}% +} +\def\@array[#1]#2{% + \edef\tab@restorehlstate{% + \global\tab@endheight\the\tab@endheight% + \gdef\noexpand\tab@hlstate{\tab@hlstate}% + }% + \def\tab@hlstate{n}% + \colset{tabular}% + \tab@initread% + \def\tab@midtext{\tab@setcr\ignorespaces####\@maybe@unskip}% + \def\tab@multicol{\@arstrut\tab@startrow}% + \tab@preamble{\tab@multicol\tabskip\z@skip}% + \tab@readpreamble{#2}% + \tab@leftskip\z@skip% + \tab@rightskip\z@skip% + \tab@setposn{#1}% + \ifdim\tab@width=\z@% + \def\tab@halign{}% + \else% + \def\tab@halign{to\tab@width}% + \fi% + \lineskip\z@\baselineskip\z@% + \m@th% + \def\tabularnewline{\tab@arraycr\tab@penalty}% + \tab@setcr% + \let\par\@empty% + \everycr{}\tabskip\tab@leftskip% + \tab@left\halign\tab@halign\expandafter\bgroup% + \the\tab@preamble\tabskip\tab@rightskip\cr% +} +\def\tab@setposn#1{% + \def\tab@left{% + \savenotes% + \leavevmode\hbox\bgroup$\@arrayleft\vcenter\bgroup% + }% + \def\tab@right{% + \egroup% + \m@th\@arrayright$\egroup% + \spewnotes% + }% + \global\tab@endheight\z@% + \@tempswafalse% + \let\tab@penalty\relax% + \if#1t% + \def\tab@left{% + \savenotes% + \leavevmode\setbox\z@\hbox\bgroup$\@arrayleft\vtop\bgroup% + }% + \def\tab@right{% + \egroup% + \m@th\@arrayright$\egroup% + \tab@raisebase% + \spewnotes% + }% + \gdef\tab@hlstate{t}% + \global\tab@endheight\ht\@arstrutbox% + \else\if#1b% + \def\tab@left{% + \savenotes% + \leavevmode\setbox\z@\hbox\bgroup$\@arrayleft\vbox\bgroup% + }% + \def\tab@right{% + \egroup% + \m@th\@arrayright$\egroup% + \tab@lowerbase% + \spewnotes% + }% + \gdef\tab@hlstate{b}% + \else% + \if#1L\@tempswatrue\fi% + \if#1C\@tempswatrue\fi% + \if#1R\@tempswatrue\fi% + \fi\fi% + \if@tempswa\ifhmode% + \ifinner\tab@err@unbrh\@tempswafalse\else\par\fi% + \fi\fi% + \if@tempswa\ifmmode\tab@err@unbmm\@tempswafalse\fi\fi% + \if@tempswa\ifx\@arrayleft\relax\else% + \tab@err@unbext\@tempswafalse% + \fi\fi% + \if@tempswa% + \def\tab@left{\vskip\parskip\medskip}% + \def\tab@right{\par\@endpetrue\global\@ignoretrue}% + \tab@leftskip\@totalleftmargin% + \tab@rightskip\hsize% + \advance\tab@rightskip-\linewidth% + \advance\tab@rightskip-\@totalleftmargin% + \ifdim\tab@width=\z@% + \if#1L\else\advance\tab@leftskip\z@\@plus10000fill\fi% + \if#1R\else\advance\tab@rightskip\z@\@plus10000fill\fi% + \else% + \dimen@\linewidth% + \advance\dimen@-\tab@width% + \if#1L\advance\tab@rightskip\dimen@\fi% + \if#1R\advance\tab@leftskip\dimen@\fi% + \if#1C% + \advance\tab@leftskip.5\dimen@% + \advance\tab@rightskip.5\dimen@% + \fi% + \fi% + \def\tab@penalty{\penalty\@M}% + \tab@width\hsize% + \fi% +} +\def\tab@hlstate{n} +\def\tab@addruleheight#1{% + \if\tab@hlstate n\else% + \global\advance\tab@endheight#1\relax% + \fi% +} +\def\tab@startrow{% + \if\tab@hlstate t% + \gdef\tab@hlstate{n}% + \else\if\tab@hlstate b% + \global\tab@endheight\dp\@arstrutbox% + \fi\fi% +} +\def\tab@raisebase{% + \global\advance\tab@endheight-\ht\z@% + \raise\tab@endheight\box\z@% +} +\def\tab@lowerbase{% + \global\advance\tab@endheight-\dp\z@% + \lower\tab@endheight\box\z@% +} +\def\tabpause#{% + \noalign{\ifnum0=`}\fi% + \@parboxrestore% + \tab@startpause% + \vskip-\parskip% + \parshape\@ne\@totalleftmargin\linewidth% + \noindent% + \doafter\tabpause@i% +} +\def\tabpause@i{% + \nobreak% + \tab@endpause% + \ifnum0=`{\fi}% +} +\long\def\multicolumn#1#2#3{% + \multispan{#1}% + \begingroup% + \tab@multicol% + \tab@initread% + \tab@preamble{}% + \long\def\tab@midtext{#3}% + \let\tab@looped\tab@err@multi% + \tab@readpreamble{#2}% + \the\tab@preamble% + \endgroup% + \ignorespaces% +} +\def\ranges#1#2{% + \gdef\ranges@temp{#1}% + \begingroup% + \ranges@i#2 \q@delim% +} +\def\ranges@i{% + \@ifnextchar\q@delim\ranges@done{\afterassignment\ranges@ii\count@}% +} +\def\ranges@ii{% + \@ifnextchar-\ranges@iii{\ranges@do\count@\count@\ranges@v}% +} +\def\ranges@iii-{\afterassignment\ranges@iv\@tempcnta} +\def\ranges@iv{\ranges@do\count@\@tempcnta\ranges@v} +\def\ranges@v{% + \@ifnextchar,% + \ranges@vi% + {% + \@ifnextchar\q@delim% + \ranges@done% + {\tab@err@range\ranges@vi,}% + }% +} +\def\ranges@vi,{\afterassignment\ranges@ii\count@} +\def\ranges@do#1#2{% + \ifnum#1>#2\else% + \expandafter\endgroup% + \expandafter\ranges@temp% + \expandafter{% + \the\expandafter#1% + \expandafter}% + \expandafter{% + \the#2% + }% + \begingroup% + \fi% +} +\def\ranges@done\q@delim{\endgroup} +\def\ifinrange#1#2{% + \@tempswafalse% + \count@#1% + \ranges\ifinrange@i{#2}% + \if@tempswa% + \expandafter\@firstoftwo% + \else% + \expandafter\@secondoftwo% + \fi% +} +\def\ifinrange@i#1#2{% + \ifnum\count@<#1 \else\ifnum\count@>#2 \else\@tempswatrue\fi\fi% +} +\def\hline{% + \tab@dohline% + \noalign{\ifnum0=`}\fi% + \tab@penalty% + \futurelet\@let@token\hline@i% +} +\def\hline@i{% + \ifx\@let@token\hline% + \vskip\doublerulesep% + \tab@addruleheight\doublerulesep% + \fi% + \ifnum0=`{\fi}% +} +\def\tab@dohline{% + \multispan{\tab@columns}% + \leaders\hrule\@height\arrayrulewidth\hfil% + \tab@addruleheight\arrayrulewidth% + \cr% +} +\renewcommand\vline[1][\arrayrulewidth]{\vrule\@width#1\relax} +\def\cline#1{% + \noalign{\kern-.5\arrayrulewidth\tab@penalty}% + \omit% + \global\tab@state\@ne% + \ranges\cline@i{#1}% + \cr% + \noalign{\kern-.5\arrayrulewidth\tab@penalty}% +} +\def\cline@i#1#2{% + \ifnum#1<\tab@state\relax% + \tab@@cr% + \noalign{\kern-\arrayrulewidth\tab@penalty}% + \omit% + \global\tab@state\@ne% + \fi% + \@whilenum\tab@state<#1\do{% + \hfil\tab@@tab@omit% + \global\advance\tab@state\@ne% + }% + \ifnum\tab@state>\@ne% + \kern-\arrayrulewidth% + \fi% + \@whilenum\tab@state<#2\do{% + \tab@@span@omit% + \global\advance\tab@state\@ne% + }% + \leaders\hrule\@height\arrayrulewidth\hfill% +} +\def\tab@@cr{\cr} +\def\tab@@tab@omit{&\omit} +\def\tab@@span@omit{\span\omit} +\def\tab@checkrule#1{% + \count@#1\relax% + \expandafter\ifinrange% + \expandafter\count@% + \expandafter{\tab@xcols}% + {\tab@checkrule@i}% + {}% +} +\def\tab@checkrule@i#1{\setbox\z@\hbox{#1}\hb@xt@\wd\z@{}} +\def\vgap{% + \noalign{\nobreak}% + \omit% + \global\let\vgap@after\@empty% + \iffalse{\fi\ifnum0=`}\fi% + \@ifnextchar[\vgap@i\vgap@simple% +} +\def\vgap@i[#1]{\vgap@spec{#1}} +\def\vgap@spec#1#2{% + \gdef\tab@xcols{#1}% + \global\let\tab@ckr\tab@checkrule% + \vgap@do{#2}% +} +\def\vgap@simple#1{% + \global\let\tab@ckr\@gobble% + \vgap@do{#1}% +} +\def\vgap@do#1{% + \ifnum0=`{}\fi% + \global\tab@vgaptrue% + \the\tab@shortline% + \vrule\@height#1\@width\z@% + \global\tab@vgapfalse + \tab@addruleheight{#1}% + \cr% + \noalign{\nobreak}% + \vgap@after% +} +\def\hlx#1{\hlx@loop#1\q@delim} +\def\hlx@loop#1{% + \ifx#1\q@delim\else% + \@ifundefined{hlx@cmd@\string#1}{% + \expandafter\hlx@loop% + }{% + \csname hlx@cmd@\string#1\expandafter\endcsname% + }% + \fi% +} +\def\hlxdef#1{\@namedef{hlx@cmd@#1}} +\hlxdef h#1{% + \noalign{% + \ifx#1h% + \def\@tempa{\hline\hline\hlx@loop}% + \else% + \def\@tempa{\hline\hlx@loop#1}% + \fi% + \expandafter + }% + \@tempa% +} +\hlxdef b{\noalign{\kern-\arrayrulewidth}\hlx@loop} +\hlxdef /{% + \noalign{\ifnum0=`}\fi% + \@ifnextchar[\hlx@cmd@break@i{\hlx@cmd@break@i[0]}% +} +\def\hlx@cmd@break@i[#1]{\ifnum0=`{\fi}\pagebreak[0]\hlx@loop} +\hlxdef v{% + \noalign{\nobreak}% + \omit% + \iffalse{\fi\ifnum0=`}\fi% + \global\let\vgap@after\hlx@loop% + \@ifnextchar[\hlx@vgap@i{\hlx@vgap@ii\vgap@simple}% +} +\def\hlx@vgap@i[#1]{% + \ifx!#1!% + \def\@tempa{\hlx@vgap@ii\vgap@simple}% + \else% + \def\@tempa{\hlx@vgap@ii{\vgap@spec{#1}}}% + \fi% + \@tempa% +} +\def\hlx@vgap@ii#1{% + \@ifnextchar[{\hlx@vgap@iii{#1}}{\hlx@vgap@iii{#1}[\doublerulesep]}% +} +\def\hlx@vgap@iii#1[#2]{#1{#2}} +\hlxdef s{% + \noalign{\ifnum0=`}\fi% + \nobreak% + \@ifnextchar[\hlx@space@i{\hlx@space@i[\doublerulesep]}% +} +\def\hlx@space@i[#1]{% + \vskip#1% + \tab@addruleheight{#1}% + \ifnum0=`{\fi}% + \hlx@loop% +} +\hlxdef c#1{\cline{#1}\hlx@loop} +\hlxdef .#1\q@delim{% + \ifx @#1@\else% + \PackageWarning{mdwtab}{% + Ignoring \protect\hlx\space command characters following a + `.'\MessageBreak command% + }% + \fi% + \ignorespaces% +} +\def\@arraycr{\tab@arraycr{}} +\def\tab@arraycr#1{\tab@cr{\tab@tabcr{#1}}{}{}} +\def\tab@tabcr#1#2{% + \dimen@#2% + \advance\dimen@\tab@extrasep% + \ifdim\dimen@>\z@% + \ifvmode% + \unskip\ifdim\prevdepth>-\@m\p@\kern-\prevdepth\fi% + \nointerlineskip\expandafter\hbox% + \else% + \@maybe@unskip\expandafter\@firstofone% + \fi% + {\advance\dimen@\dp\@arstrutbox\vrule\@depth\dimen@\@width\z@}% + \fi% + \global\dimen\@ne\dimen@% + \cr% + \noalign{% + #1% + \ifdim\dimen\@ne<\z@\vskip\dimen\@ne\relax\fi% + }% + \@gobble% +} +\def\tab@setcr{\let\\\tabularnewline} +\def\tab@cr#1#2#3{% + \relax% + \iffalse{\fi\ifnum0=`}\fi% + \@ifstar{\tab@cr@i{#1}{#3}}{\tab@cr@i{#1}{#2}}% +} +\def\tab@cr@i#1#2{% + \@ifnextchar[{\tab@cr@ii{#1}{#2}}{\tab@cr@ii{#1}{#2}[\z@]}% +} +\def\tab@cr@ii#1#2[#3]{% + \ifnum0=`{}\fi% + #1{#3}{#2}% +} +\begingroup +\catcode`.=11 +\def\@tempa#1 #2 #3\@@{#1 #2} +\xdef\ver@array.sty + {1995/11/19 [mdwtab.sty \expandafter\@tempa\ver@mdwtab.sty\@@]} +\endgroup +\def\tab@error{\PackageError{mdwtab}} +\def\tab@err@misscol{% + \tab@error{Missing column type}{% + I'm lost. I was expecting something describing^^J% + the type of the current column, but you seem to^^J% + have missed it out. I've inserted a type `l'^^J% + column here in the hope that this makes sense.% + }% +} +\def\tab@err@oddgroup{% + \tab@error{Misplaced group in table preamble}{% + I've found an open brace character in your preamble^^J% + when I was expecting a specifier character. I'm^^J% + going to gobble the whole group and carry on as if^^J% + I'd never seen it.% + }% +} +\def\tab@err@undef#1{% + \tab@error{Unknown `\tab@colset' preamble character `\string#1'}{% + I don't understand what you meant by typing this^^J% + character. Anyway, I'll ignore it this time around.^^J% + Just don't you do it again.% + }% +} +\def\tab@err@unbrh{% + \tab@error{Can't use unboxed tabular in LR mode}{% + You've asked for a tabular or array environment with^^J% + `L', `C' or `R' as the position specifier, but you're^^J% + in LR (restricted horizontal) mode, so it won't work.^^J% + I'll assume you really meant `c' and soldier on.% + }% +} +\def\tab@err@unbmm{% + \tab@error{Can't use unboxed tabular in maths mode}{% + You've asked for a tabular or array environment with^^J% + `L', `C' or `R' as the position specifier, but you're^^J% + in maths mode, so it won't work. I'll pretend that^^J% + you really typed `c', and that this is all a bad dream.% + }% +} +\def\tab@err@unbext{% + \tab@error{Can't extend unboxed tabulars}{% + You're trying to use kludgy extensions (e.g.,^^J% + `delarray') on an array or tabular with `L', `C'^^J% + or `R' as the position specifier. I'll assume you^^J% + subconsciously wanted a `c' type all along.% + }% +} +\def\tab@err@multi{% + \tab@error{More than one column in a \protect\multicolumn}{% + You've put more than one column into a \string\multicolumn^^J% + descriptor. It won't work. I have no idea what^^J% + will happen, although it won't be pleasant. Hold^^J% + on tight now...% + }% +} +\def\tab@err@range{% + \tab@error{Expected `,' or `' in range list}{% + I was expecting either the end of the range list,^^J% + or a comma, followed by another range. I've^^J% + inserted a comma to try and get me back on track.^^J% + Good luck.% + }% +} +%% +%% footnote package -- Save footnotes around boxing environments +%% Copyright (c) 1996 Mark Wooding +%% +\ifx\fn@notes\@@undefined% + \newbox\fn@notes% +\fi +\newdimen\fn@width +\let\fn@colwidth\columnwidth +\newif\if@savingnotes +\def\fn@startnote{% + \hsize\fn@colwidth% + \interlinepenalty\interfootnotelinepenalty% + \reset@font\footnotesize% + \floatingpenalty\@MM% Is this right??? + \@parboxrestore% + \protected@edef\@currentlabel{\csname p@\@mpfn\endcsname\@thefnmark}% + \color@begingroup% +} +\let\fn@endnote\color@endgroup +\def\fn@fntext#1{% + \ifx\ifmeasuring@\@@undefined% + \expandafter\@secondoftwo\else\expandafter\@iden% + \fi% + {\ifmeasuring@\expandafter\@gobble\else\expandafter\@iden\fi}% + {% + \global\setbox\fn@notes\vbox{% + \unvbox\fn@notes% + \fn@startnote% + \@makefntext{% + \rule\z@\footnotesep% + \ignorespaces% + #1% + \@finalstrut\strutbox% + }% + \fn@endnote% + }% + }% +} +\def\savenotes{% + \begingroup% + \if@savingnotes\else% + \@savingnotestrue% + \let\@footnotetext\fn@fntext% + \let\@mpfootnotetext\fn@fntext% + \fn@width\columnwidth% + \let\fn@colwidth\fn@width% + \global\setbox\fn@notes\box\voidb@x% + \let\fn@thempfn\thempfn% + \let\fn@mpfn\@mpfn% + \ifx\@minipagerestore\relax\let\@minipagerestore\@empty\fi% + \expandafter\def\expandafter\@minipagerestore\expandafter{% + \@minipagerestore% + \let\thempfn\fn@thempfn% + \let\@mpfn\fn@mpfn% + }% + \fi% +} +\def\spewnotes{% + \endgroup% + \if@savingnotes\else\ifvoid\fn@notes\else\begingroup% + \let\@makefntext\@empty% + \let\@finalstrut\@gobble% + \let\rule\@gobbletwo% + \@footnotetext{\unvbox\fn@notes}% + \endgroup\fi\fi% +} +\let\endsavenotes\spewnotes +%% +%% doafter package -- insert a token really after a group +%% Copyright (c) 1996 Peter Schmitt and Mark Wooding +%% +\let\@@aftergroup\aftergroup +\def\doafter#1{% + \def\@tempa{\@@aftergroup#1}% + \afterassignment\doafter@i\let\@let@token% +} +\def\doafter@i{% + \@let@token% + \let\aftergroup\@my@aftergroup% + \@@aftergroup\@prepare@after\@tempa% +} +\def\ag@cnt@local{0 } +\let\ag@cnt@global\ag@cnt@local +\def\@my@aftergroup{% + \begingroup% + \count@\ag@cnt@local% + \advance\count@\@ne% + \xdef\ag@cnt@global{\the\count@\space}% + \endgroup% + \let\ag@cnt@local\ag@cnt@global% + \@@aftergroup\@after@token\@@aftergroup% +} +\def\@after@token{% + \@start@after@group% + \@after@token% +} +\def\@start@after@group{% + \begingroup% + \count@\ag@cnt@global% + \clubpenalty\ag@cnt@local% + \let\@after@token\@after@token@i% +} +\def\@after@token@i{% + \advance\count@\m@ne% + \ifnum\count@=\clubpenalty% + \global\let\ag@cnt@global\ag@cnt@local% + \expandafter\@after@aftertoken\expandafter\@after@all% + \else% + \expandafter\@@aftergroup% + \fi% +} +\let\@after@all\endgroup +\def\@prepare@after{% + \ifx\ag@cnt@local\ag@cnt@global\else% + \expandafter\@prepare@after@i% + \fi% +} +\def\@prepare@after@i#1{% + \@start@after@group% + \def\@after@all{\@@aftergroup#1\endgroup}% +} +\def\@after@aftertoken#1{% + \let\bgroup\relax\let\egroup\relax% + \toks@{#1}% + \futurelet\@let@token\@after@aftertoken@i% +} +\def\@after@aftertoken@i{% + \ifcat\noexpand\@let@token{% + \@@aftergroup{% + \else\ifcat\noexpand\@let@token}% + \@@aftergroup}% + \else% + \def\@tempa##1{\@@aftergroup##1\the\toks@}% + \expandafter\expandafter\expandafter\@tempa% + \fi\fi% +} +\endinput +%% +%% End of file `mdwtab.sty'. diff --git a/Master/texmf-dist/tex/latex/mdwtools/sverb.sty b/Master/texmf-dist/tex/latex/mdwtools/sverb.sty new file mode 100644 index 00000000000..ab804f59413 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdwtools/sverb.sty @@ -0,0 +1,358 @@ +%% +%% This is file `sverb.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sverb.dtx (with options: `package') +%% +%% IMPORTANT NOTICE +%% +%% sverb package -- handling of verbatim text +%% Copyright (c) 1996 Mark Wooding +%% +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program 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. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; if not, write to the Free Software +%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{sverb} + [1996/05/08 1.3 Verbatim typesetting] +%% \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 \~} +%% +\def\@cspecials{% + \begingroup% + \catcode`|0% + \catcode`<1% + \catcode`>2% + \catcode`\{12% + \catcode`\}12% + \catcode`\\12% +} +\def\sv@startlisting{% + \def\par{\@@par\penalty\interlinepenalty}% + \@@par% + \leftskip\@totalleftmargin% + \obeylines% + \@noligs% + \let\do\@makeother\dospecials% + \verbatim@font% + \frenchspacing% + \@vobeyspaces% + \settabwidth% + \catcode9\active% + \lccode`\~9\lowercase{\let~\sv@vtab}% + \lccode`\~13\lowercase{\let~\vinput@cr}% + \interlinepenalty500% +} +\newdimen\svtab +\def\settabwidth{\setbox\z@\hbox{\texttt{\space}}\svtab8\wd\z@} +\def\sv@vtab{% + \hfill\egroup% + \@tempdima\wd\z@% + \divide\@tempdima\svtab% + \multiply\@tempdima\svtab% + \advance\@tempdima\svtab% + \wd\z@\@tempdima% + \leavevmode\box\z@% + \setbox\z@\hbox\bgroup% +} +\def\verbinput#1{% + \begin{listinglist}% + \listingsize% + \sv@startlisting% + \setbox\z@\hbox\bgroup% + \input{#1}% + \sv@stripspc% + \egroup% + \ifdim\wd\z@=\z@% + \ifhmode\par\fi% + \else% + \leavevmode\box\z@\par% + \fi% + \end{listinglist}% +} +\def\vinput@cr{% + \egroup% + \leavevmode\box\z@% + \par% + \setbox\z@\hbox\bgroup% +} +\newif\if@matched +\def\matcher#1#2#3{% + \expandafter\def\csname\string#1$match\endcsname##1#2##2##3\end{% + \ifx##2\relax% + \@matchedfalse% + \else% + \@matchedtrue% + \fi% + #3{##1}% + }% + \expandafter\def\expandafter#1\expandafter##\expandafter1\expandafter{% + \csname\string#1$match\endcsname##1#2\relax\end% + }% +} +\def\sv@stripspc{% + \unpenalty% + \ifdim\lastskip=\z@\else% + \unskip\expandafter\sv@stripspc% + \fi% +} +\begingroup +\catcode`\%=12 +\gdef\sv@percent#1#2\relax + {\ifx\check@percent\@@undefined + \ifx#1\relax\def\@tempa{}\else + \def\@tempa{#1#2}\fi\else + \ifx#1\relax\def\@tempa{}\else + \ifx#1%\def\@tempa{#2}\else + \def\@tempa{#1#2}\fi\fi\fi} +\endgroup +\lccode`\~32 +\lccode`\!32 +\lowercase{% + \def\@isspaces#1{% + \ifx#1\relax% + \def\@tempb{\@tempswafalse}% + \else\ifx#1~% + \let\@tempb\@isspaces% + \else% + \def\@tempb##1\relax{}% + \fi\fi% + \@tempb% + } + \def\sv@safespc{% + \catcode32\active% + \def~{ }% + } +} +\def\sv@read#1#2#3{% + \begingroup% + \matcher\@match{#1}\sv@read@ii% + \catcode13\active% + \catcode32\active% + \@tempswafalse% + \lccode`\~13\lowercase{% + \def\sv@read@i##1~{\@match{##1}}% + }% + \def\sv@read@ii##1{% + \sv@percent##1\relax\relax% + \if@matched\@tempswafalse\fi% + \if@tempswa\else\@tempswatrue\expandafter\@isspaces\@tempa\relax\fi% + \if@tempswa% + \begingroup% + \expandafter#2\expandafter{\@tempa}% + \endgroup% + \fi% + \@tempswatrue% + \if@matched\def\@tempa{\endgroup#3}\else\let\@tempa\sv@read@i\fi% + \@tempa% + }% + \sv@read@i% +} +\begingroup +\lccode`\<=`\{ +\lccode`\>=`\} +\lccode`\|=`\\ +\lowercase{\endgroup +\def\sv@readenv#1{% + \expandafter\expandafter\expandafter% + #1\expandafter\sv@readenv@i\@currenvir\@@% +} +\def\sv@readenv@i#1\@@{{|end<#1>}{\end{#1}}} +} +\def\sv@verbline#1{% + \setbox\z@\hbox{#1\sv@stripspc}% + \ifdim\wd\z@=\z@% + \if@matched\ifhmode\par\relax\fi\else\leavevmode\par\relax\fi% + \else% + \leavevmode\box\z@\par\relax% + \fi% +} +\newdimen\listingindent +\AtBeginDocument{% + \ifdim\parindent=\z@\listingindent1em\else\listingindent\parindent\fi% +} +\ifx\listingsize\@@undefined + \let\listingsize\small +\fi +\def\listinglist{% + \list{}{% + \if@inlabel% + \leftmargin\z@% + \else% + \leftmargin\listingindent% + \fi% + \rightmargin\z@% + \labelwidth\z@% + \labelsep\z@% + \itemindent\z@% + \listparindent\z@% + \let\makelabel\relax% + \parsep\z@skip% + }% + \parfillskip\@flushglue% + \item\relax% +} +\let\endlistinglist\endlist +\def\listing{% + \listinglist% + \listingsize% + \sv@readenv\sv@listing% +} +\def\sv@listing#1#2{% + \sv@startlisting% + \sv@read{#1}\sv@verbline{\endlistinglist#2}% +} +\expandafter\def\csname listing*\endcsname{% + \listinglist% + \listingsize% + \begingroup% + \@noligs% + \def\@tempa##1{\endgroup\sv@listing{##1}{\end{listing*}}}% + \@tempa% +} +\def\sv@ignore#1#2{% + \@bsphack% + \let\do\@makeother\dospecials% + \sv@read{#1}\@gobble{\@esphack#2}% +} +\def\ignore{\sv@readenv\sv@ignore} +\def\ignoreenv#1{% + \expandafter\let\csname #1\endcsname\ignore% +} +\def\unignoreenv#1{% + \expandafter\def\csname #1\endcsname{\endgroup}% + \expandafter\def\csname end#1\endcsname% + {\begingroup\def\@currenvir{#1}}% +} +\newwrite\sv@writefile +\def\sv@write#1#2{% + \begingroup% + \@bsphack% + \let\do\@makeother\dospecials% + \sv@safespc% + \sv@read{#1}\sv@writeline{\sv@endwrite#2}% +} +\def\sv@writeline#1{% + \immediate\write\sv@writefile{#1}% +} +\def\sv@endwrite{% + \@esphack% + \endgroup% +} +\def\verbwrite#1{% + \immediate\openout\sv@writefile#1\relax% + \sv@readenv\sv@write% +} +\def\endverbwrite{\immediate\closeout\sv@writefile} +\expandafter\def\csname verbwrite*\endcsname#1#2{% + \immediate\openout\sv@writefile#2\relax% + \sv@write{#1}{\immediate\closeout\sv@writefile\end{verbwrite*}}% +} +\newcount\sv@nestcount +\def\sv@demoname{demo\number\sv@nestcount.tmp} +\def\sv@demo#1#2{% + \@ifnextchar[{\sv@demo@i{#1}{#2}}{\sv@demo@i{#1}{#2}[n]}% +} +\def\sv@demo@i#1#2[#3]#4{% + \advance\sv@nestcount by\@ne% + \immediate\openout\sv@writefile\sv@demoname\relax% + \sv@write{#1}{% + \immediate\closeout\sv@writefile% + \sv@dodemo{#2}{#3}{#4}% + }% +} +\def\demo{\sv@readenv\sv@demo} +\expandafter\def\csname demo*\endcsname#1{\sv@demo{#1}{\end{demo*}}} +\def\sv@demosmp{% + \begin{minipage}[t]{\@tempdima}% + \vskip8\p@% + \hrule\@height\z@% + \raggedright% + \vbox\bgroup% +} +\def\sv@demoemp{% + \par\unpenalty\unskip% + \egroup% + \vskip8\p@% + \hrule\@height\z@% + \end{minipage}% +} +\def\sv@dodemo#1#2#3{% + \begingroup% + \@tempdima\linewidth% + \advance\@tempdima-2em% + \hsize\@tempdima% + \if#2w% + \advance\@tempdima-2em% + \else% + \advance\@tempdima-3em% + \divide\@tempdima2% + \fi% + \par% + \setbox\z@\hbox{\strut\enspace#3\enspace\strut}% + \@tempdimb.5\dp\z@% + \advance\@tempdimb-.5\ht\z@% + \ht\z@\@tempdimb\dp\z@\@tempdimb% + \noindent\hskip1em\vtop{% + \hb@xt@\hsize{% + \hrulefill% + \raise\@tempdimb\box\z@% + \hrulefill% + }% + \nointerlineskip% + \hb@xt@\hsize{\vrule\@height5\p@\hfil\vrule\@height5\p@}% + \nointerlineskip% + \vskip-\parskip% + \noindent\hbox{}\hskip1em% + \sv@demosmp% + \catcode`\%14\relax% + \input{\sv@demoname}% + \sv@demoemp% + \if#2w% + \vskip8\p@\hrule\vskip8\p@% + \noindent\hbox{}% + \fi% + \hskip1em% + \sv@demosmp% + \listingindent\z@% + \verbinput\sv@demoname% + \sv@demoemp% + \par% + \nointerlineskip% + \hb@xt@\hsize{\vrule\@height5\p@\hfil\vrule\@height5\p@}% + \hrule% + }% + \endgroup% + \par% + \vskip\baselineskip% + #1% +} +\endinput +%% +%% End of file `sverb.sty'. diff --git a/Master/texmf-dist/tex/latex/mdwtools/syntax.sty b/Master/texmf-dist/tex/latex/mdwtools/syntax.sty new file mode 100644 index 00000000000..e1270dba470 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdwtools/syntax.sty @@ -0,0 +1,817 @@ +%% +%% This is file `syntax.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% syntax.dtx (with options: `package') +%% doafter.dtx (with options: `macro') +%% +%% IMPORTANT NOTICE +%% +%% syntax package -- typesetting syntax descriptions +%% Copyright (c) 1996 Mark Wooding +%% +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program 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. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; if not, write to the Free Software +%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{syntax} + [1996/05/17 1.9 Syntax typesetting (MDW)] +%% \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 \~} +%% +\DeclareOption{rounded}{\sd@roundtrue} +\DeclareOption{square}{\sd@roundfalse} +\DeclareOption{nounderscore}{\@uscorefalse} +\newif\ifsd@round +\newif\if@uscore\@uscoretrue +\ExecuteOptions{square} +\ProcessOptions +\def\addspecial#1{% + \remspecial{#1}% + \expandafter\def\expandafter\dospecials\expandafter{\dospecials\do#1}% + \expandafter\def\expandafter\@santize\expandafter{% + \@sanitize\@makeother#1}% +} +\def\remspecial#1{% + \def\do##1{\ifnum`#1=`##1 \else\noexpand\do\noexpand##1\fi}% + \edef\dospecials{\dospecials}% + \def\@makeother##1{\ifnum`#1=`##1 \else% + \noexpand\@makeother\noexpand##1\fi}% + \edef\@sanitize{\@sanitize}% + \def\@makeother##1{\catcode`##112}% +} +\def\underscore{% + \leavevmode% + \kern.06em% + \vbox{% + \hrule\@width.6em\@depth.4ex\@height-.34ex% + }% + \ifdim\fontdimen\@ne\font=\z@% + \kern.06em% + \fi% +} +\let\usc@builtindischyphen\- +\def\@uscore.{% + \ifmmode% + \expandafter\@firstoftwo% + \else% + \expandafter\@secondoftwo% + \fi% + \sb% + {\textunderscore\@ifnextchar_{}{\usc@builtindischyphen}}% +} +\if@uscore + \AtBeginDocument{% + \catcode`\_\active% + \begingroup% + \lccode`\~`\_% + \lowercase{\endgroup\def~{\protect\@uscore.}}% + } +\fi +\expandafter\let\csname?\string\textunderscore\endcsname\underscore +\def\shortverb#1{% + \@ifundefined{cc@\string#1}{% + \addspecial#1% + \begingroup% + \lccode`\~`#1% + \lowercase{% + \endgroup% + \expandafter\let\csname mn@\string#1\endcsname~% + \expandafter\edef\csname cc@\string#1\endcsname{% + \catcode`\noexpand#1\the\catcode`#1% + \let\noexpand~\expandafter\noexpand% + \csname mn@\string#1\endcsname% + \noexpand\remspecial\noexpand#1% + \let\csname cc@\string#1\endcsname\relax% + }% + \def~{\verb~\syn@ttspace}% + }% + \catcode`#1\active% + }{% + \PackageWarning{syntax}{Character `\expandafter\@gobble\string#1' + is already a verbatim\MessageBreak + delimiter}% + }% +} +\def\unverb#1{% + \@ifundefined{cc@\string#1}{% + \PackageWarning{syntax}{Character `\expandafter\@gobble\string#1' + is not a verbatim\MessageBreak + delimiter}% + }{% + \csname cc@\string#1\endcsname% + }% +} +\newcommand{\syntleft}{$\langle$\normalfont\itshape} +\newcommand{\syntright}{$\rangle$} +\newcommand{\ulitleft}{\normalfont\ttfamily\syn@ttspace\frenchspacing} +\newcommand{\ulitright}{} +\newcommand{\litleft}{`\bgroup\ulitleft} +\newcommand{\litright}{\ulitright\egroup'} +\def\synt#1{\mbox{\syntleft{#1\/}\syntright}} +\def\lit{\@ifstar{\lit@i\ulitleft\ulitright}{\lit@i\litleft\litright}} +\def\lit@i#1#2#3{\mbox{#1{#3\/}#2}} +\def\syn@ttspace@{\spaceskip.35em\@plus.2em\@minus.15em\relax} +\def\ttthinspace{\let\syn@ttspace\syn@ttspace@} +\def\ttthickspace{\let\syn@ttspace\@empty} +\ttthinspace +\def\readupto#1#2#3{% + \bgroup% + \verb@eol@error% + \let\do\@makeother\dospecials% + #2% + \catcode`#1\active% + \lccode`\~`#1% + \gdef\verb@balance@group{\verb@egroup% + \@latex@error{\noexpand\verb illegal in command argument}\@ehc}% + \def\@vhook{\verb@egroup#3}% + \aftergroup\verb@balance@group% + \lowercase{\let~\@vhook}% +} +\def\syn@assist#1#2#3#4#5{% + \mbox\bgroup% + \chardef\\`\\% + \chardef\>`\>% + \chardef\'`\'% + \chardef\"`\"% + \chardef\ `\ % + \def\ch##1{\char`##1}% + \def\act##1{% + \catcode`##1\active% + \begingroup% + \lccode`\~`##1% + \lowercase{\endgroup\def~}% + }% + #1% + \begingroup% + \readupto#3{% + \catcode`\\0% + \catcode`\ 10% + #2% + }{% + \/\endgroup#4\egroup#5% + }% +} +\begingroup +\catcode`\<\active +\catcode`\|\active +\catcode`\"\active +\catcode`\`\active +\gdef\syn@shorts#1#2{% + \def<{% + #1% + \syn@assist% + \syntleft% + {\act_{\@foundunderscore}}% + >% + \syntright% + {#2}% + }% + \def`{% + #1% + \syn@assist% + \litleft% + \relax% + '% + \litright% + {#2}% + }% + \def"{% + #1% + \syn@assist% + \ulitleft% + \relax% + "% + \ulitright% + {#2}% + }% + \def|{\textbar}% +} +\endgroup +\def\syntaxShortcuts#1#2{% + \syn@shorts{#1}{#2}% + \addspecial\`% + \addspecial\<% + \addspecial\|% + \addspecial\"% + \catcode`\|\active% + \catcode`\<\active% + \catcode`\"\active% + \catcode`\`\active% +} +\def\synshorts{\syntaxShortcuts\relax\relax} +\def\synshortsoff{% + \catcode`\|12% + \catcode`\<12% + \catcode`\"12% + \catcode`\`12% +} +\def\syntax#{\bgroup\syntaxShortcuts\relax\relax\let\@let@token} +\newskip\grammarparsep + \grammarparsep8\p@\@plus\p@\@minus\p@ +\newdimen\grammarindent + \grammarindent2em +\newcommand{\grammarlabel}[2]{% + \synt{#1} \hfill#2% +} +\def\gr@implitem<#1> #2 {% + \sbox\z@{\hskip\labelsep\grammarlabel{#1}{#2}}% + \strut\@@par% + \vskip-\parskip% + \vskip-\baselineskip% + \hrule\@height\z@\@depth\z@\relax% + \item[\unhbox\z@]% + \catcode`\<\active% +} +\let\gr@leftsq\[ +\let\gr@rightsq\] +\def\[{\gr@leftsq} +\def\]{\gr@rightsq} +\newenvironment{grammar}{% + \list{}{% + \labelwidth\grammarindent% + \leftmargin\grammarindent% + \advance\grammarindent\labelsep + \itemindent\z@% + \listparindent\z@% + \parsep\grammarparsep% + }% + \let\\\@normalcr + \syntaxShortcuts\relax\relax% + \def\alt{\\\llap{\textbar\quad}}% + \def\gr@setpar{% + \def\par{% + \parshape\@ne\@totalleftmargin\linewidth% + \@@par% + \catcode`\<12% + \everypar{% + \everypar{}% + \catcode`\<\active% + \gr@implitem% + }% + }% + }% + \gr@setpar% + \par% + \def\gr@endsyntdiag]{\end{syntdiag}\gr@setpar\par}% + \def\[{\@ifnextchar[{\begin{syntdiag}\@gobble}\gr@leftsq}% + \def\]{\@ifnextchar]\gr@endsyntdiag\gr@rightsq}% +}{% + \@newlistfalse% + \everypar{}% + \endlist% +} +\newskip\sdstartspace +\newskip\sdendspace +\newskip\sdmidskip +\newskip\sdtokskip +\newskip\sdfinalskip +\newdimen\sdrulewidth +\newdimen\sdcirclediam +\newdimen\sdindent +\dimendef\sd@lower\z@ +\dimendef\sd@upper\tw@ +\dimendef\sd@mid4 +\dimendef\sd@topcirc6 +\dimendef\sd@botcirc8 +\def\sd@setsize{% + \sd@mid\ht\strutbox% + \advance\sd@mid-\dp\strutbox% + \sd@mid.5\sd@mid% + \sd@upper\sdrulewidth% + \advance\sd@upper\sd@mid% + \sd@lower\sdrulewidth% + \advance\sd@lower-\sd@mid% + \sd@topcirc-.5\sdcirclediam% + \advance\sd@topcirc\sd@mid% + \sd@botcirc-.5\sdcirclediam% + \advance\sd@botcirc-\sd@mid% +} +\newcommand{\sdsize}{% + \small% +} +\newcommand{\sdlengths}{% + \setlength{\sdstartspace}{1em minus 10pt}% + \setlength{\sdendspace}{1em minus 10pt}% + \setlength{\sdmidskip}{0.5em plus 0.0001fil}% + \setlength{\sdtokskip}{0.25em plus 0.0001fil}% + \setlength{\sdfinalskip}{0.5em plus 10000fil}% + \setlength{\sdrulewidth}{0.2pt}% + \setlength{\sdcirclediam}{8pt}% + \setlength{\sdindent}{0pt}% +} +\newif\ifsd@base +\newif\ifsd@top +\newif\ifsd@toplayer +\newif\ifsd@backwards +\def\sd@err{\PackageError{syntax}} +\def\sd@arrow{% + \ht\tw@\z@% + \dp\tw@\z@% + \raise\sd@mid\box\tw@% + \egroup% +} +\def\sd@rightarr{% + \bgroup% + \setbox\tw@\hbox{\kern-6\p@\@linefnt\char'55}% + \sd@arrow% +} +\def\sd@leftarr{% + \bgroup% + \raise\sd@mid\hbox{\@linefnt\char'33\kern-6\p@}% + \sd@arrow% +} +\def\sd@uparr{% + \bgroup% + \setbox\tw@\hb@xt@\z@{\kern-\sdrulewidth\@linefnt\char'66\hss}% + \setbox\tw@\hbox{\lower10\p@\box\tw@}% + \sd@arrow% +} +\def\sd@downarr{% + \bgroup% + \setbox\tw@\hb@xt@\z@{\kern-\sdrulewidth\@linefnt\char'77\hss}% + \sd@arrow% +} +\def\sd@circ#1{% + \@getcirc\sdcirclediam% + \advance\@tempcnta#1% + \setbox\tw@\hbox{\lower\sdrulewidth% + \hbox{\@circlefnt\char\@tempcnta}}% + \wd\tw@\z@% + \leavevmode% +} +\def\sd@tlcirc{{% + \sd@circ3% + \ht\tw@\sdrulewidth% + \dp\tw@.5\sdcirclediam% + \kern-\tw@\sdrulewidth% + \raise\sd@mid\box\tw@% + \kern.5\sdcirclediam% +}} +\def\sd@trcirc{{% + \sd@circ0% + \ht\tw@\sdrulewidth% + \dp\tw@.5\sdcirclediam% + \kern.5\sdcirclediam% + \raise\sd@mid\box\tw@% +}} +\def\sd@blcirc{{% + \sd@circ2% + \ht\tw@.5\sdcirclediam% + \dp\tw@\sdrulewidth% + \kern-\tw@\sdrulewidth% + \raise\sd@mid\box\tw@% + \kern.5\sdcirclediam% +}} +\def\sd@brcirc{{% + \sd@circ1% + \ht\tw@.5\sdcirclediam% + \dp\tw@\sdrulewidth% + \kern.5\sdcirclediam% + \raise\sd@mid\box\tw@% +}} +\def\sd@llc#1{% + \hb@xt@.5\sdcirclediam{% + \sd@rule\hskip.5\sdcirclediam% + \hss% + #1% + }% +} +\def\sd@rlc#1{% + \hb@xt@.5\sdcirclediam{% + #1% + \hss% + \sd@rule\hskip.5\sdcirclediam% + }% +} +\def\sd@rule{\leaders\hrule\@height\sd@upper\@depth\sd@lower} +\def\sd@gap#1{% + \ifsd@base% + \skip@#1% + \divide\skip\z@\tw@% + \nobreak\sd@rule\hskip\skip@% + \discretionary{% + \sd@qarrow{->}% + }{% + \hbox{% + \sd@qarrow{>-}% + \sd@rule\hskip\sdstartspace% + \sd@rule\hskip3.5\p@% + }% + }{% + }% + \nobreak\sd@rule\hskip\skip@% + \else% + \sd@rule\hskip#1% + \fi% +} +\def\syntdiag{% + \syntaxShortcuts\sd@tok@i\sd@tok@ii% + \@ifnextchar[\syntdiag@i{\syntdiag@i[]}% +} +\def\syntdiag@i[#1]{% + \sdsize\sdlengths% + #1% + \sd@setsize% + \list{}{% + \leftmargin\sdindent% + \rightmargin\leftmargin% + \labelsep\z@% + \labelwidth\z@% + }% + \item[]% + \parfillskip\z@% + \noindent% + \sd@qarrow{>>-}% + \nobreak\sd@rule\hskip\sdstartspace% + \sd@basetrue% + \sloppy% + \interlinepenalty100% + \hyphenpenalty0% + \catcode`\ 9% + \catcode`\^^M9% + \def\gr@leftsq{\begin{stack}\\}% + \def\gr@rightsq{\end{stack}}% + \def\({\begin{stack}}% + \def\){\end{stack}}% + \def\<{\begin{rep}}% + \def\>{\end{rep}}% + \let\\\sd@newline% + \ignorespaces% +} +\def\endsyntdiag{% + \unskip% + \nobreak\sd@rule\hskip\sdmidskip% + \sd@rule\hskip\sdfinalskip% + \sd@qarrow{-><}% + \endlist% +} +\@namedef{syntdiag*}{% + \syntaxShortcuts\sd@tok@i\sd@tok@ii% + \@ifnextchar[\syntdiag@s@i{\syntdiag@s@i[]}% +} +\def\syntdiag@s@i[#1]{% + \@ifnextchar[{\syntdiag@s@ii{#1}}{\syntdiag@s@iii{#1}{\hbox}}% +} +\def\syntdiag@s@ii#1[#2]{\syntdiag@s@iii{#1}{\hb@xt@#2}} +\def\syntdiag@s@iii#1#2{% + \leavevmode% + #2\bgroup% + \let\@@left\left% + \let\@@right\right% + \def\left##1{\def\sd@startarr{##1}}% + \def\right##1{\def\sd@endarr{##1}}% + \left{>-}\right{->}% + \sdsize\sdlengths% + #1% + \sd@setsize% + \let\left\@@left% + \let\right\@@right% + \sd@qarrow\sd@startarr% + \sd@rule\hskip\sdmidskip% + \sd@basefalse% + \catcode`\ 9% + \catcode`\^^M9% + \ignorespaces% +} +\@namedef{endsyntdiag*}{% + \unskip% + \sd@rule\hskip\sdmidskip% + \sd@rule\hskip\sdfinalskip% + \sd@qarrow\sd@endarr% + \egroup% +} +\def\sd@qarrow#1{% + \begingroup% + \lccode`\~=`\<\lowercase{\def~{<}}% + \hbox{\csname sd@arr@#1\endcsname}% + \endgroup% +} +\@namedef{sd@arr@>>-}{\sd@rightarr\kern-.5\p@\sd@rightarr\kern-\p@} +\@namedef{sd@arr@>-}{\sd@rightarr\kern-\p@} +\@namedef{sd@arr@->}{\sd@rightarr} +\@namedef{sd@arr@-><}{\sd@rightarr\kern-\p@\sd@leftarr} +\@namedef{sd@arr@...}{$\cdots$} +\@namedef{sd@arr@-}{} +\def\sd@newline{\@ifstar{\vadjust{\penalty\@M}\sd@nl@i}\sd@nl@i} +\def\sd@nl@i{\@ifnextchar[\sd@nl@ii\sd@nl@iii} +\def\sd@nl@ii[#1]{\vspace{#1}\sd@nl@iii} +\def\sd@nl@iii{% + \nobreak\sd@rule\hskip\sdmidskip% + \sd@rule\hskip\sdfinalskip% + \kern-3\p@% + \sd@rightarr% + \newline% + \sd@rightarr% + \nobreak\sd@rule\hskip\sdstartspace% + \sd@rule\hskip3.5\p@% +} +\def\sdbox#1{% + \@tempskipa#1\relax% + \sd@gap\@tempskipa% + \setbox\z@\hbox\bgroup% + \begingroup% + \catcode`\ 10% + \catcode`\^^M5% + \synshortsoff% +} +\def\endsdbox{% + \endgroup% + \egroup% + \@tempdima\ht\z@% + \advance\@tempdima-\dp\z@% + \advance\@tempdima-\tw@\sd@mid% + \lower.5\@tempdima\box\z@% + \sd@gap\@tempskipa% +} +\def\sd@tok@i{% + \sdbox\sdtokskip% + \strut% + \space% +} +\def\sd@tok@ii{% + \space% + \endsdbox% +} +\def\tok#{% + \sdbox\sdtokskip% + \strut% + \enspace% + \syntaxShortcuts\relax\relax% + \doafter\sd@tok% +} +\def\sd@tok{% + \enspace% + \endsdbox% +} +\newcommand\stack[1][t]{% + \sd@gap\sdmidskip% + \begingroup\sd@basefalse% + \sd@toplayertrue% + \let\\\sd@stackcr% + \if#1t% + \let\@tempa\vtop% + \sd@toptrue% + \ifsd@round\llap{\sd@trcirc\kern\tw@\sdrulewidth}\fi% + \else\if#1b% + \let\@tempa\vbox% + \sd@topfalse% + \ifsd@round\llap{\sd@brcirc\kern\tw@\sdrulewidth}\fi% + \else% + \sd@err{Bad position argument passed to stack}% + {The positioning argument must be one of `t' or `b'. I% + have^^Jassumed you meant to type `t'.}% + \let\@tempa\vtop% + \fi\fi% + \@tempa\bgroup% + \offinterlineskip% + \ialign\bgroup% + ##\cr% + \setbox\z@\hbox\bgroup% + \strut% +} +\def\endstack{% + \egroup% + \ifsd@toplayer% + \sd@dostack\sd@upper\sd@lower\relax\relax% + \else% + \ifsd@round% + \ifsd@top% + \sd@dostack{\ht\z@}\sd@botcirc\sd@blcirc\sd@brcirc% + \else% + \sd@dostack{\ht\z@}\sd@botcirc\relax\relax% + \fi% + \else% + \sd@dostack{\ht\z@}\sd@lower\relax\relax% + \fi% + \fi% + \egroup% + \egroup% + \ifsd@round% + \ifsd@top + \rlap{\kern\tw@\sdrulewidth\sd@tlcirc}% + \else% + \rlap{\kern\tw@\sdrulewidth\sd@blcirc}% + \fi% + \fi% + \endgroup\sd@gap\sdmidskip% +} +\def\sd@stackcr{% + \egroup% + \ifsd@toplayer% + \ifsd@round% + \ifsd@top% + \sd@dostack\sd@topcirc{\dp\z@}\relax\relax% + \else% + \sd@dostack\sd@topcirc{\dp\z@}\sd@tlcirc\sd@trcirc% + \fi% + \else% + \sd@dostack\sd@upper{\dp\z@}\relax\relax% + \fi% + \else% + \ifsd@round% + \ifsd@top% + \sd@dostack{\ht\z@}{\dp\z@}\sd@blcirc\sd@brcirc% + \else% + \sd@dostack{\ht\z@}{\dp\z@}\sd@tlcirc\sd@trcirc% + \fi% + \else% + \sd@dostack{\ht\z@}{\dp\z@}\relax\relax% + \fi% + \fi% + \sd@toplayerfalse% + \setbox\z@\hbox\bgroup% + \strut% +} +\def\sd@dostack#1#2#3#4{% + \@tempdima#1% + \@tempdimb#2% + \kern-\tw@\sdrulewidth% + \vrule\@height\@tempdima\@depth\@tempdimb\@width\tw@\sdrulewidth% + #3% + \sd@rule\hfill% + \sd@gap\sdtokskip% + \unhbox\z@% + \sd@gap\sdtokskip% + \sd@rule\hfill% + #4% + \vrule\@height\@tempdima\@depth\@tempdimb\@width\tw@\sdrulewidth% + \kern-\tw@\sdrulewidth% + \cr% +} +\newcommand\rep[1][t]{% + \sd@gap\sdmidskip% + \begingroup\sd@basefalse% + \ifsd@backwards\sd@backwardsfalse\else\sd@backwardstrue\fi% + \let\\\sd@loop% + \if#1t% + \let\@tempa\vbox% + \sd@toptrue% + \else\if#1b% + \let\@tempa\vtop% + \sd@topfalse% + \else% + \sd@err{Bad position argument passed to loop}% + {The positioning argument must be `t' or `b'. I have^^J% + assumed you meant to type `t'.}% + \let\@tempa\vbox% + \sd@toptrue% + \fi\fi% + \@tempa\bgroup% + \setbox\tw@\copy\strutbox% + \setbox\z@\hbox\bgroup\strut% +} +\def\endrep{% + \egroup% + \ifsd@top% + \ifsd@round% + \sd@doloop\tw@\z@\relax\relax% + \sd@tlcirc\sd@trcirc{\sd@rlc\sd@blcirc}{\sd@llc\sd@brcirc}% + \else% + \sd@doloop\tw@\z@\relax\sd@downarr\relax\relax\relax\relax% + \fi% + \else% + \ifsd@round% + \sd@doloop\z@\tw@\relax\relax% + {\sd@rlc\sd@tlcirc}{\sd@llc\sd@trcirc}\sd@blcirc\sd@brcirc% + \else% + \sd@doloop\z@\tw@\sd@uparr\relax\relax\relax\relax\relax% + \fi% + \fi% + \egroup% + \endgroup\sd@gap\sdmidskip% +} +\def\sd@loop{% + \egroup% + \def\\{\sd@err{Too many \string\\\space commands in loop}\@ehc}% + \setbox\tw@\hbox\bgroup\strut% +} +\def\sd@doloop#1#2#3#4#5#6#7#8{% + \@tempdima\dp#1\relax% + \@tempdimb\ht#2\relax% + \offinterlineskip% + \ialign{% + ##\cr% + \ifsd@round% + \sd@doloop@i#1#3\sd@topcirc\@tempdima{#5}{#6}% + \sd@doloop@i#2#4\@tempdimb\sd@botcirc{#7}{#8}% + \else% + \sd@doloop@i#1#3\sd@upper\@tempdima{#5}{#6}% + \sd@doloop@i#2#4\@tempdimb\sd@lower{#7}{#8}% + \fi% + }% +} +\def\sd@doloop@i#1#2#3#4#5#6{% + \ifsd@backwards#2\fi% + \kern-\tw@\sdrulewidth% + \vrule\@height#3\@depth#4\@width\tw@\sdrulewidth% + #5% + \sd@rule\hfill% + \sd@gap\sdtokskip% + \unhbox#1% + \sd@gap\sdtokskip% + \sd@rule\hfill% + #6% + \vrule\@height#3\@depth#4\@width\tw@\sdrulewidth% + \ifsd@backwards\else#2\fi% + \kern-\tw@\sdrulewidth% + \cr% +} +%% +%% doafter package -- insert a token really after a group +%% Copyright (c) 1996 Peter Schmitt and Mark Wooding +%% +\let\@@aftergroup\aftergroup +\def\doafter#1{% + \def\@tempa{\@@aftergroup#1}% + \afterassignment\doafter@i\let\@let@token% +} +\def\doafter@i{% + \@let@token% + \let\aftergroup\@my@aftergroup% + \@@aftergroup\@prepare@after\@tempa% +} +\def\ag@cnt@local{0 } +\let\ag@cnt@global\ag@cnt@local +\def\@my@aftergroup{% + \begingroup% + \count@\ag@cnt@local% + \advance\count@\@ne% + \xdef\ag@cnt@global{\the\count@\space}% + \endgroup% + \let\ag@cnt@local\ag@cnt@global% + \@@aftergroup\@after@token\@@aftergroup% +} +\def\@after@token{% + \@start@after@group% + \@after@token% +} +\def\@start@after@group{% + \begingroup% + \count@\ag@cnt@global% + \clubpenalty\ag@cnt@local% + \let\@after@token\@after@token@i% +} +\def\@after@token@i{% + \advance\count@\m@ne% + \ifnum\count@=\clubpenalty% + \global\let\ag@cnt@global\ag@cnt@local% + \expandafter\@after@aftertoken\expandafter\@after@all% + \else% + \expandafter\@@aftergroup% + \fi% +} +\let\@after@all\endgroup +\def\@prepare@after{% + \ifx\ag@cnt@local\ag@cnt@global\else% + \expandafter\@prepare@after@i% + \fi% +} +\def\@prepare@after@i#1{% + \@start@after@group% + \def\@after@all{\@@aftergroup#1\endgroup}% +} +\def\@after@aftertoken#1{% + \let\bgroup\relax\let\egroup\relax% + \toks@{#1}% + \futurelet\@let@token\@after@aftertoken@i% +} +\def\@after@aftertoken@i{% + \ifcat\noexpand\@let@token{% + \@@aftergroup{% + \else\ifcat\noexpand\@let@token}% + \@@aftergroup}% + \else% + \def\@tempa##1{\@@aftergroup##1\the\toks@}% + \expandafter\expandafter\expandafter\@tempa% + \fi\fi% +} +\endinput +%% +%% End of file `syntax.sty'. -- cgit v1.2.3