diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/base/latex.ltx')
-rw-r--r-- | Master/texmf-dist/tex/latex/base/latex.ltx | 661 |
1 files changed, 415 insertions, 246 deletions
diff --git a/Master/texmf-dist/tex/latex/base/latex.ltx b/Master/texmf-dist/tex/latex/base/latex.ltx index 23ef93d9f88..a235b07c5af 100644 --- a/Master/texmf-dist/tex/latex/base/latex.ltx +++ b/Master/texmf-dist/tex/latex/base/latex.ltx @@ -49,7 +49,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright 1993-2018 +%% Copyright (C) 1993-2019 %% The LaTeX3 Project and any individual authors listed elsewhere %% in this file. %% @@ -62,7 +62,7 @@ %% The latest version of this license is in %% https://www.latex-project.org/lppl.txt %% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. +%% version 2008 or later. %% %% This file has the LPPL maintenance status "maintained". %% @@ -700,8 +700,9 @@ %%% From File: ltvers.dtx \def\fmtname{LaTeX2e} \edef\fmtversion - {2018-12-01} + {2019-10-01} \def\patch@level{0} +\edef\development@branch@name{} \iffalse \def\reserved@a#1/#2/#3\@nil{% \count@\year @@ -738,15 +739,28 @@ \write16{\fmtname \space<\fmtversion> patch level \patch@level} \else \everyjob\expandafter{\the\everyjob - \typeout{\fmtname \space<\fmtversion> pre-release\patch@level}} + \typeout{\fmtname \space<\fmtversion> pre-release\patch@level + \ifx\development@branch@name\@undefined \else + \ifx\development@branch@name\@empty \else + \space (\development@branch@name\space branch)% + \fi + \fi + }} \immediate - \write16{\fmtname \space<\fmtversion> pre-release\patch@level} + \write16{\fmtname \space<\fmtversion> pre-release\patch@level + \ifx\development@branch@name\@undefined \else + \ifx\development@branch@name\@empty \else + \space (\development@branch@name\space branch)% + \fi + \fi + } \fi \fi \let\@currname\@empty \def\IncludeInRelease#1{% \if@includeinrelease - \PackageError{latexrelease}{mis-matched IncludeInRelease}{}% + \PackageError{latexrelease}{mis-matched IncludeInRelease}% + {There is an \string\EndIncludeRelease\space missing}% \@includeinreleasefalse \fi \kernel@ifnextchar[% @@ -783,7 +797,7 @@ \long\def\@check@IncludeInRelease#1\IncludeInRelease #2#3\@end@check@IncludeInRelease{% \ifx\@check@IncludeInRelease#2\else - \PackageError{latexrelease}{skipped IncludeInRelease}{}% + \PackageError{latexrelease}{skipped IncludeInRelease for tag \string#2}{}% \fi} %%% From File: ltdefns.dtx \def\two@digits#1{\ifnum#1<10 0\fi\number#1} @@ -1037,12 +1051,12 @@ {% \@ifundefined{\expandafter\@gobble\string#1\space}% {% - \expandafter\let\csname + \global\expandafter\let\csname \expandafter\@gobble\string#1\space\endcsname=#1% \edef\reserved@a{\string#1}% \def\reserved@b{#1}% \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}% - \edef#1{% + \xdef#1{% \ifx\reserved@a\reserved@b \noexpand\x@protect\noexpand#1% \fi @@ -1052,6 +1066,17 @@ {\@latex@info{The control sequence `\string#1' is already robust}}% }% }% + +\def\kernel@make@fragile#1{% + \@ifundefined{\expandafter\@gobble\string#1\space}% + {}% + {% + \global\expandafter\let\expandafter #1\csname + \expandafter\@gobble\string#1\space\endcsname + \global\expandafter\let\csname + \expandafter\@gobble\string#1\space\endcsname\@undefined + }% +} \def\@ifundefined#1{% \ifcsname#1\endcsname\@ifundefin@d@i\else\@ifundefin@d@ii\fi{#1}} \long\def\@ifundefin@d@i#1\fi#2{\fi @@ -1098,9 +1123,6 @@ \reserved@c} \def\:{\let\@sptoken= } \: % this makes \@sptoken a space token \def\:{\@xifnch} \expandafter\def\: {\futurelet\@let@token\@ifnch} - -\def\makeatletter{\catcode`\@11\relax} -\def\makeatother{\catcode`\@12\relax} \def\@ifstar#1{\@ifnextchar *{\@firstoftwo{#1}}} \long\def\@dblarg#1{\kernel@ifnextchar[{#1}{\@xdblarg{#1}}} \long\def\@xdblarg#1#2{#1[{#2}]{#2}} @@ -1110,6 +1132,9 @@ \edef #1{\expandafter\strip@prefix \meaning #1}% } +\DeclareRobustCommand\makeatletter{\catcode`\@11\relax} +\DeclareRobustCommand\makeatother{\catcode`\@12\relax} + \def\@latex@info#1{} \DeclareRobustCommand{\-}{% \discretionary{% @@ -1123,6 +1148,22 @@ \let\@dischyph=\- \newif\if@includeinrelease \@includeinreleasefalse +\MakeRobust\allowbreak +\MakeRobust\bigbreak +\MakeRobust\break +\MakeRobust\dotfill +\MakeRobust\frenchspacing +\MakeRobust\goodbreak +\MakeRobust\hrulefill +\MakeRobust\medbreak +\MakeRobust\nobreak +\MakeRobust\nonfrenchspacing +\MakeRobust\obeylines +\MakeRobust\obeyspaces +\MakeRobust\slash +\MakeRobust\smallbreak +\MakeRobust\strut +\MakeRobust\underbar %%% From File: ltalloc.dtx \chardef\@xxxii=32 \mathchardef\@Mi=10001 @@ -1405,6 +1446,9 @@ Type H <return> for immediate help.}% \ifmmode \@latex@error{Command \protect#1 invalid in math mode}\@ehc \fi} + +\let\conditionally@traceon\@empty +\let\conditionally@traceoff\@empty %%% From File: ltpar.dtx \message{par,} \def\@setpar#1{\def\par{#1}\def\@par{#1}} @@ -1412,8 +1456,18 @@ Type H <return> for immediate help.}% \def\@restorepar{\def\par{\@par}} %%% From File: ltspace.dtx \message{spacing,} -\def\pagebreak{\@testopt{\@no@pgbk-}4} -\def\nopagebreak{\@testopt\@no@pgbk4} +\DeclareRobustCommand\pagebreak{\@testopt{\@no@pgbk-}4} +\DeclareRobustCommand\nopagebreak{\@testopt\@no@pgbk4} +\DeclareRobustCommand\linebreak{\@testopt{\@no@lnbk-}4} +\DeclareRobustCommand\nolinebreak{\@testopt\@no@lnbk4} +\DeclareRobustCommand\samepage{\interlinepenalty\@M + \postdisplaypenalty\@M + \interdisplaylinepenalty\@M + \@beginparpenalty\@M + \@endparpenalty\@M + \@itempenalty\@M + \@secpenalty\@M + \interfootnotelinepenalty\@M} \def\@no@pgbk #1[#2]{% \ifvmode \penalty #1\@getpen{#2}% @@ -1422,8 +1476,6 @@ Type H <return> for immediate help.}% \vadjust{\penalty #1\@getpen{#2}}% \@esphack \fi} -\def\linebreak{\@testopt{\@no@lnbk-}4} -\def\nolinebreak{\@testopt\@no@lnbk4} \def\@no@lnbk #1[#2]{% \ifvmode \@nolnerr @@ -1436,14 +1488,6 @@ Type H <return> for immediate help.}% \ignorespaces \fi \fi} -\def\samepage{\interlinepenalty\@M - \postdisplaypenalty\@M - \interdisplaylinepenalty\@M - \@beginparpenalty\@M - \@endparpenalty\@M - \@itempenalty\@M - \@secpenalty\@M - \interfootnotelinepenalty\@M} \DeclareRobustCommand\\{% \let \reserved@e \relax \let \reserved@f \relax @@ -1627,9 +1671,9 @@ Type H <return> for immediate help.}% \newskip\fill \fill = 0pt plus 1fill \def\stretch#1{\z@ \@plus #1fill\relax} -\def\thinspace{\leavevmode@ifvmode\kern .16667em } -\def\negthinspace{\leavevmode@ifvmode\kern-.16667em } -\def\enspace{\leavevmode@ifvmode\kern.5em } +\DeclareRobustCommand\thinspace{\leavevmode@ifvmode\kern .16667em } +\DeclareRobustCommand\negthinspace{\leavevmode@ifvmode\kern-.16667em } +\DeclareRobustCommand\enspace{\leavevmode@ifvmode\kern.5em } \protected\def\leavevmode@ifvmode{\ifvmode\expandafter\indent\fi} \def\enskip{\hskip.5em\relax} \def\quad{\hskip1em\relax} @@ -1640,7 +1684,7 @@ Type H <return> for immediate help.}% \@gobble\ignorespaces}} \gdef\restorecr{\catcode`\^^M5 }} %%% From File: ltlogos.dtx -\def\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\@} +\DeclareRobustCommand\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\@} \DeclareRobustCommand{\LaTeX}{L\kern-.36em% {\sbox\z@ T% \vbox to\ht\z@{\hbox{\check@mathfonts @@ -1688,7 +1732,7 @@ Type H <return> for immediate help.}% \immediate\write\@mainaux{\relax}% \fi \process@table - \let\glb@currsize\@empty %% Force math initialization. + \let\glb@currsize\@empty % Force math initialization. \normalsize \everypar{}% \ifx\normalsfcodes\@empty @@ -1740,12 +1784,18 @@ Type H <return> for immediate help.}% \let\@auxout=\@mainaux \def\includeonly#1{% \@partswtrue - \edef\@partlist{\zap@space#1 \@empty}} + \set@curr@file{\zap@space#1 \@empty}% + \let\@partlist\@curr@file + } \@onlypreamble\includeonly \def\include#1{\relax \ifnum\@auxout=\@partaux \@latex@error{\string\include\space cannot be nested}\@eha - \else \@include#1 \fi} + \else + \set@curr@file{#1 }% + \expandafter\@include\@curr@file + \fi} + \def\@include#1 {% \clearpage \if@filesw @@ -1790,7 +1840,21 @@ Type H <return> for immediate help.}% \gdef\@charlb[{] \gdef\@charrb[}] ]% }brace matching -\long\def \IfFileExists#1#2#3{% + +\def\set@curr@file#1{% + \begingroup + \escapechar\m@ne + \xdef\@curr@file{\expandafter\string\csname #1\endcsname}% + \endgroup +} +\def\quote@name#1{"\quote@@name#1\@gobble""} +\def\quote@@name#1"{#1\quote@@name} +\def\unquote@name#1{\quote@@name#1\@gobble"} +\DeclareRobustCommand\IfFileExists[1]{% + \set@curr@file{#1}% + \edef\q@curr@file{\expandafter\quote@name\expandafter{\@curr@file}}% + \expandafter\IfFileExists@\expandafter{\q@curr@file}} +\long\def \IfFileExists@#1#2#3{% \openin\@inputcheck#1 % \ifeof\@inputcheck \ifx\input@path\@undefined @@ -1816,17 +1880,21 @@ Type H <return> for immediate help.}% \@break@tfor \fi}% \reserved@a} -\long\def \InputIfFileExists#1#2{% +\DeclareRobustCommand \InputIfFileExists[2]{% \IfFileExists{#1}% - {#2\@addtofilelist{#1}\@@input \@filef@und}} + {% + \expandafter\@swaptwoargs\expandafter + {\@filef@und}{#2\@addtofilelist{#1}\@@input}}} +\long\def\@swaptwoargs#1#2{#2#1} \def\input{\@ifnextchar\bgroup\@iinput\@@input} \def\@iinput#1{% \InputIfFileExists{#1}{}% - {\filename@parse{#1}% + {\filename@parse\@curr@file \edef\reserved@a{\noexpand\@missingfileerror {\filename@area\filename@base}% {\ifx\filename@ext\relax tex\else\filename@ext\fi}}% \reserved@a}} + \def\@input#1{% \IfFileExists{#1}{\@@input\@filef@und}{\typeout{No file #1.}}} \def\@input@#1{\InputIfFileExists{#1}{}{\typeout{No file #1.}}} @@ -1996,7 +2064,7 @@ Type H <return> for immediate help.}% \reserved@a ^^@}} \catcode\z@=15\relax \@onlypreamble\DeclareTextComposite -\def\UseTextAccent#1#2#3{% +\DeclareRobustCommand\UseTextAccent[3]{% \hmode@start@before@group {% \let\hmode@start@before@group\@firstofone @@ -2004,7 +2072,7 @@ Type H <return> for immediate help.}% \@use@text@encoding{#1}% #2{\@use@text@encoding\@curr@enc#3}% }} -\def\UseTextSymbol#1#2{% +\DeclareRobustCommand\UseTextSymbol[2]{% \hmode@start@before@group {% \def\@wrong@font@char{\MessageBreak @@ -2284,13 +2352,12 @@ Type H <return> for immediate help.}% \def\addtolength#1#2{\advance#1 #2\relax} \def\@settodim#1#2#3{\setbox\@tempboxa\hbox{{#3}}#2#1\@tempboxa \setbox\@tempboxa\box\voidb@x} -\def\settoheight{\@settodim\ht} -\def\settodepth {\@settodim\dp} -\def\settowidth {\@settodim\wd} +\DeclareRobustCommand\settoheight{\@settodim\ht} +\DeclareRobustCommand\settodepth {\@settodim\dp} +\DeclareRobustCommand\settowidth {\@settodim\wd} \def\@settopoint#1{\divide#1\p@\multiply#1\p@} %%% From File: ltfssbas.dtx %% Copyright (C) 1989-2002 Frank Mittelbach and Rainer Sch\"opf -\expandafter\let\csname ver@autofss1.sty\endcsname\fmtversion \def\@nomath#1{\relax\ifmmode \@font@warning{Command \noexpand#1invalid in math mode}\fi} \gdef\no@alphabet@error#1{\relax \ifmmode @@ -2503,7 +2570,7 @@ Type H <return> for immediate help.}% \DeclareRobustCommand\fontfamily[1]{\edef\f@family{#1}} \DeclareRobustCommand\fontseries[1]{\edef\f@series{#1}} \DeclareRobustCommand\fontshape [1]{\edef\f@shape{#1}} -\def\usefont#1#2#3#4{\fontencoding{#1}\fontfamily{#2}% +\DeclareRobustCommand\usefont[4]{\fontencoding{#1}\fontfamily{#2}% \fontseries{#3}\fontshape{#4}\selectfont \ignorespaces} \DeclareRobustCommand\linespread[1] @@ -2569,7 +2636,7 @@ Type H <return> for immediate help.}% \def\try@load@fontshape{% \expandafter \ifx\csname \f@encoding+\f@family\endcsname\relax - \@font@info{Try loading font information for + \@font@info{Trying to load font information for \f@encoding+\f@family}% \global\expandafter\let \csname\f@encoding+\f@family\endcsname\@empty @@ -2612,11 +2679,6 @@ Type H <return> for immediate help.}% \gdef\default@family{#2}% \gdef\default@series{#3}% \gdef\default@shape{#4}% - \global\let\f@family\default@family - \global\let\f@series\default@series - \global\let\f@shape\default@shape - \gdef\f@size{#5}% - \gdef\f@baselineskip{#5pt}% } \@onlypreamble\DeclareErrorFont \def\wrong@fontshape{% @@ -2689,7 +2751,7 @@ Type H <return> for immediate help.}% \let\noaccents@\@empty \fi \ifx\XeTeXcharclass\@undefined -\gdef\showhyphens#1{% +\DeclareRobustCommand\showhyphens[1]{% \setbox0\vbox{% \color@begingroup \everypar{}% @@ -2698,7 +2760,7 @@ Type H <return> for immediate help.}% \pretolerance\m@ne\tolerance\m@ne\hbadness\z@\showboxdepth\z@\ #1% \color@endgroup}} \else -\long\def\showhyphens#1{% +\DeclareRobustCommand\showhyphens[1]{% \setbox0\vbox{% \usefont{TU}{lmr}{m}{n}% \hsize 1sp % @@ -3566,9 +3628,14 @@ Type H <return> for immediate help.}% \advance\count\tw@-\count@ \if\relax\noexpand#1% is command? \edef\reserved@a{\noexpand\in@ - {\expandafter\@gobble\string\mathaccent}{\meaning#1}}% + {\expandafter\@gobble\string\mathaccent} + {\expandafter\meaning + \csname\expandafter\@gobble\string#1\space\endcsname}}% \reserved@a \ifin@ + \expandafter\let + \csname\expandafter\@gobble\string#1\space\endcsname + \@undefined \expandafter\set@mathaccent \csname sym#3\endcsname#1#2% {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}% @@ -3594,7 +3661,9 @@ Type H <return> for immediate help.}% } \@onlypreamble\DeclareMathAccent \def\set@mathaccent#1#2#3#4{% - \xdef#2{\mathaccent"\mathchar@type#3\hexnumber@#1#4\relax}} + \xdef#2{\mathaccent"\mathchar@type#3\hexnumber@#1#4\relax}% + \MakeRobust#2% +} \@onlypreamble\set@mathaccent \def\DeclareMathSymbol#1#2#3#4{% \expandafter\in@\csname sym#3\expandafter\endcsname @@ -3608,17 +3677,20 @@ Type H <return> for immediate help.}% \multiply\count@\sixt@@n \advance\count\tw@-\count@ \if\relax\noexpand#1% is command? + \edef\reserved@b{\expandafter\noexpand + \csname\expandafter\@gobble\string#1\space\endcsname}% \edef\reserved@a {\noexpand\in@{\expandafter\@gobble\string\mathchar}% - {\meaning#1}}% + {\meaning#1\expandafter\meaning\reserved@b}}% \reserved@a + \global\expandafter\let\reserved@b\@undefined \ifin@ \expandafter\set@mathsymbol \csname sym#3\endcsname#1#2% {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}% \@font@info{Redeclaring math symbol \string#1}% \else - \expandafter\ifx + \expandafter\ifx \csname\expandafter\@gobble\string#1\endcsname \relax \expandafter\set@mathsymbol @@ -3691,9 +3763,11 @@ Type H <return> for immediate help.}% \edef\reserved@d{\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}% % \edef\reserved@a{\noexpand\in@ - {\expandafter\@gobble\string\delimiter}{\meaning#1}}% + {\expandafter\@gobble\string\delimiter}% + {\expandafter\meaning\csname\expandafter\@gobble\string#1\space\endcsname}}% \reserved@a \ifin@ + \expandafter\let\csname\expandafter\@gobble\string#1\space\endcsname\@undefined \expandafter\set@mathdelimiter \csname sym#3\expandafter\endcsname \csname sym#5\endcsname#1#2% @@ -3757,7 +3831,9 @@ Type H <return> for immediate help.}% \@onlypreamble\@xDeclareMathDelimiter \def\set@mathdelimiter#1#2#3#4#5#6{% \xdef#3{\delimiter"\mathchar@type#4\hexnumber@#1#5% - \hexnumber@#2#6 }} + \hexnumber@#2#6 }% + \MakeRobust#3% +} \@onlypreamble\set@mathdelimiter \def\set@@mathdelimiter#1#2#3#4#5{% \global\delcode`#3="\hexnumber@#1#4\hexnumber@#2#5\relax} @@ -3952,20 +4028,20 @@ Type H <return> for immediate help.}% . }% \fi} -\def\boldmath{\@nomath\boldmath +\DeclareRobustCommand\boldmath{\@nomath\boldmath \mathversion{bold}} -\def\unboldmath{\@nomath\unboldmath +\DeclareRobustCommand\unboldmath{\@nomath\unboldmath \mathversion{normal}} \def\math@version{normal} \def\newfont#1#2{\@ifdefinable#1{\font#1=#2\relax}} -\def\symbol#1{\char #1\relax} +\DeclareRobustCommand\symbol[1]{\char #1\relax} \def\@setfontsize#1#2#3{\@nomath#1% \ifx\protect\@typeset@protect \let\@currsize#1% \fi \fontsize{#2}{#3}\selectfont} \def\@setsize#1#2#3#4{\@setfontsize#1{#4}{#2}} -\def\oldstylenums#1{% +\DeclareRobustCommand\oldstylenums[1]{% \begingroup \spaceskip\fontdimen\tw@\font \usefont{OML}{\rmdefault}{\f@series}{it}% @@ -4001,6 +4077,10 @@ Type H <return> for immediate help.}% \DeclareErrorFont{OT1}{cmr}{m}{n}{10} %% don't modify this setting %% overwrite it in fontdef.cfg %% if necessary +\fontfamily{cmr} +\fontseries{m} +\fontshape{n} +\fontsize{10}{10} \InputIfFileExists{fonttext.cfg} {\typeout{====================================^^J% ^^J% @@ -4171,6 +4251,7 @@ Type H <return> for immediate help.}% \c@page}} %%% From File: ltxref.dtx \message{x-ref,} + \def\G@refundefinedtrue{% \gdef\@refundefined{% \@latex@warning@no@line{There were undefined references}}} @@ -4203,8 +4284,11 @@ Type H <return> for immediate help.}% \@esphack} \def\refstepcounter#1{\stepcounter{#1}% \protected@edef\@currentlabel - {\csname p@#1\endcsname\csname the#1\endcsname}% + {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}% } +\def\labelformat#1{\expandafter\def\csname p@#1\endcsname##1} +\DeclareRobustCommand\Ref[1]{\protected@edef\@tempa{\ref{#1}}% + \expandafter\MakeUppercase\@tempa} \def\@currentlabel{} %%% From File: ltmiscen.dtx \message{environments,} @@ -4271,7 +4355,7 @@ Type H <return> for immediate help.}% \def\stop{\clearpage\deadcycles\z@\let\par\@@par\@@end} \everypar{\@nodocument} %% To get an error if text appears before the \nullfont %% \begin{document} -\def\begin#1{% +\DeclareRobustCommand\begin[1]{% \@ifundefined{#1}% {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}% {\def\reserved@a{\def\@currenvir{#1}% @@ -4279,7 +4363,25 @@ Type H <return> for immediate help.}% \csname #1\endcsname}}% \@ignorefalse \begingroup\@endpefalse\reserved@a} -\def\end#1{% +\edef\end + {\unexpanded{% + \romannumeral + \ifx\protect\@typeset@protect + \expandafter %1 + \expandafter %2 + \expandafter %1 + \expandafter %3 expands the \csname inside \end<space> + \expandafter %1 + \expandafter %2 expands \end<space> + \expandafter %1 expands the \else + \z@ + \else + \expandafter\z@\expandafter\protect + \fi + }% + \expandafter\noexpand\csname end \endcsname + } +\@namedef{end }#1{% \csname end#1\endcsname\@checkend{#1}% \expandafter\endgroup\if@endpe\@doendpe\fi \if@ignore\@ignorefalse\ignorespaces\fi} @@ -4294,23 +4396,23 @@ Type H <return> for immediate help.}% \def\@icentercr[#1]{\vskip #1\ignorespaces} \def\center{\trivlist \centering\item\relax} \def\endcenter{\endtrivlist} -\def\centering{% +\DeclareRobustCommand\centering{% \let\\\@centercr \rightskip\@flushglue\leftskip\@flushglue \parindent\z@\parfillskip\z@skip} -\newskip\@rightskip \@rightskip \z@skip -\def\flushleft{\trivlist \raggedright\item\relax} -\def\endflushleft{\endtrivlist} -\def\raggedright{% +\DeclareRobustCommand\raggedright{% \let\\\@centercr\@rightskip\@flushglue \rightskip\@rightskip \leftskip\z@skip \parindent\z@} -\def\flushright{\trivlist \raggedleft\item\relax} -\def\endflushright{\endtrivlist} -\def\raggedleft{% +\DeclareRobustCommand\raggedleft{% \let\\\@centercr \rightskip\z@skip\leftskip\@flushglue \parindent\z@\parfillskip\z@skip} +\newskip\@rightskip \@rightskip \z@skip +\def\flushleft{\trivlist \raggedright\item\relax} +\def\endflushleft{\endtrivlist} +\def\flushright{\trivlist \raggedleft\item\relax} +\def\endflushright{\endtrivlist} \message{verbatim,} {\catcode`\ =\active% \gdef\@vobeyspaces{\catcode`\ \active\let \@xobeysp}} @@ -4398,56 +4500,56 @@ Type H <return> for immediate help.}% \def\@noligs{\let\do\do@noligs \verbatim@nolig@list} %%% From File: ltmath.dtx \message{math definitions,} -\def\log{\mathop{\operator@font log}\nolimits} -\def\lg{\mathop{\operator@font lg}\nolimits} -\def\ln{\mathop{\operator@font ln}\nolimits} -\def\lim{\mathop{\operator@font lim}} -\def\limsup{\mathop{\operator@font lim\,sup}} -\def\liminf{\mathop{\operator@font lim\,inf}} -\def\sin{\mathop{\operator@font sin}\nolimits} -\def\arcsin{\mathop{\operator@font arcsin}\nolimits} -\def\sinh{\mathop{\operator@font sinh}\nolimits} -\def\cos{\mathop{\operator@font cos}\nolimits} -\def\arccos{\mathop{\operator@font arccos}\nolimits} -\def\cosh{\mathop{\operator@font cosh}\nolimits} -\def\tan{\mathop{\operator@font tan}\nolimits} -\def\arctan{\mathop{\operator@font arctan}\nolimits} -\def\tanh{\mathop{\operator@font tanh}\nolimits} -\def\cot{\mathop{\operator@font cot}\nolimits} -\def\coth{\mathop{\operator@font coth}\nolimits} -\def\sec{\mathop{\operator@font sec}\nolimits} -\def\csc{\mathop{\operator@font csc}\nolimits} -\def\max{\mathop{\operator@font max}} -\def\min{\mathop{\operator@font min}} -\def\sup{\mathop{\operator@font sup}} -\def\inf{\mathop{\operator@font inf}} -\def\arg{\mathop{\operator@font arg}\nolimits} -\def\ker{\mathop{\operator@font ker}\nolimits} -\def\dim{\mathop{\operator@font dim}\nolimits} -\def\hom{\mathop{\operator@font hom}\nolimits} -\def\det{\mathop{\operator@font det}} -\def\exp{\mathop{\operator@font exp}\nolimits} -\def\Pr{\mathop{\operator@font Pr}} -\def\gcd{\mathop{\operator@font gcd}} -\def\deg{\mathop{\operator@font deg}\nolimits} -\def\bmod{% +\DeclareRobustCommand\log{\mathop{\operator@font log}\nolimits} +\DeclareRobustCommand\lg{\mathop{\operator@font lg}\nolimits} +\DeclareRobustCommand\ln{\mathop{\operator@font ln}\nolimits} +\DeclareRobustCommand\lim{\mathop{\operator@font lim}} +\DeclareRobustCommand\limsup{\mathop{\operator@font lim\,sup}} +\DeclareRobustCommand\liminf{\mathop{\operator@font lim\,inf}} +\DeclareRobustCommand\sin{\mathop{\operator@font sin}\nolimits} +\DeclareRobustCommand\arcsin{\mathop{\operator@font arcsin}\nolimits} +\DeclareRobustCommand\sinh{\mathop{\operator@font sinh}\nolimits} +\DeclareRobustCommand\cos{\mathop{\operator@font cos}\nolimits} +\DeclareRobustCommand\arccos{\mathop{\operator@font arccos}\nolimits} +\DeclareRobustCommand\cosh{\mathop{\operator@font cosh}\nolimits} +\DeclareRobustCommand\tan{\mathop{\operator@font tan}\nolimits} +\DeclareRobustCommand\arctan{\mathop{\operator@font arctan}\nolimits} +\DeclareRobustCommand\tanh{\mathop{\operator@font tanh}\nolimits} +\DeclareRobustCommand\cot{\mathop{\operator@font cot}\nolimits} +\DeclareRobustCommand\coth{\mathop{\operator@font coth}\nolimits} +\DeclareRobustCommand\sec{\mathop{\operator@font sec}\nolimits} +\DeclareRobustCommand\csc{\mathop{\operator@font csc}\nolimits} +\DeclareRobustCommand\max{\mathop{\operator@font max}} +\DeclareRobustCommand\min{\mathop{\operator@font min}} +\DeclareRobustCommand\sup{\mathop{\operator@font sup}} +\DeclareRobustCommand\inf{\mathop{\operator@font inf}} +\DeclareRobustCommand\arg{\mathop{\operator@font arg}\nolimits} +\DeclareRobustCommand\ker{\mathop{\operator@font ker}\nolimits} +\DeclareRobustCommand\dim{\mathop{\operator@font dim}\nolimits} +\DeclareRobustCommand\hom{\mathop{\operator@font hom}\nolimits} +\DeclareRobustCommand\det{\mathop{\operator@font det}} +\DeclareRobustCommand\exp{\mathop{\operator@font exp}\nolimits} +\DeclareRobustCommand\Pr{\mathop{\operator@font Pr}} +\DeclareRobustCommand\gcd{\mathop{\operator@font gcd}} +\DeclareRobustCommand\deg{\mathop{\operator@font deg}\nolimits} +\DeclareRobustCommand\bmod{% \nonscript\mskip-\medmuskip\mkern5mu% \mathbin{\operator@font mod}\penalty900\mkern5mu% \nonscript\mskip-\medmuskip} -\def\pmod#1{% +\DeclareRobustCommand\pmod[1]{% \allowbreak\mkern18mu({\operator@font mod}\,\,#1)} -\def\bigl{\mathopen\big} -\def\bigm{\mathrel\big} -\def\bigr{\mathclose\big} -\def\Bigl{\mathopen\Big} -\def\Bigm{\mathrel\Big} -\def\Bigr{\mathclose\Big} -\def\biggl{\mathopen\bigg} -\def\biggm{\mathrel\bigg} -\def\biggr{\mathclose\bigg} -\def\Biggl{\mathopen\Bigg} -\def\Biggm{\mathrel\Bigg} -\def\Biggr{\mathclose\Bigg} +\DeclareRobustCommand\bigl{\mathopen\big} +\DeclareRobustCommand\bigm{\mathrel\big} +\DeclareRobustCommand\bigr{\mathclose\big} +\DeclareRobustCommand\Bigl{\mathopen\Big} +\DeclareRobustCommand\Bigm{\mathrel\Big} +\DeclareRobustCommand\Bigr{\mathclose\Big} +\DeclareRobustCommand\biggl{\mathopen\bigg} +\DeclareRobustCommand\biggm{\mathrel\bigg} +\DeclareRobustCommand\biggr{\mathclose\bigg} +\DeclareRobustCommand\Biggl{\mathopen\Bigg} +\DeclareRobustCommand\Biggm{\mathrel\Bigg} +\DeclareRobustCommand\Biggr{\mathclose\Bigg} \newdimen\jot \jot=3pt \newcount\interdisplaylinepenalty @@ -4470,11 +4572,13 @@ Type H <return> for immediate help.}% \dimen@\ht\z@ \advance\dimen@-\dp\z@ \mkern5mu\raise.6\dimen@\copy\rootbox \mkern-10mu\box\z@} + \newif\ifv@ \newif\ifh@ -\def\vphantom{\v@true\h@false\ph@nt} -\def\hphantom{\v@false\h@true\ph@nt} -\def\phantom{\v@true\h@true\ph@nt} +\DeclareRobustCommand\vphantom{\v@true\h@false\ph@nt} +\DeclareRobustCommand\hphantom{\v@false\h@true\ph@nt} +\DeclareRobustCommand\phantom{\v@true\h@true\ph@nt} +\DeclareRobustCommand\mathstrut{\vphantom(} \def\ph@nt{% \ifmmode \expandafter\mathpalette\expandafter\mathph@nt @@ -4490,8 +4594,7 @@ Type H <return> for immediate help.}% \ifv@ \ht\tw@\ht\z@ \dp\tw@\dp\z@\fi \ifh@ \wd\tw@\wd\z@\fi \leavevmode@ifvmode\box\tw@} -\def\mathstrut{\vphantom(} -\def\smash{% +\DeclareRobustCommand\smash{% \relax % \relax, in case this comes first in \halign \ifmmode \expandafter\mathpalette\expandafter\mathsm@sh @@ -4504,13 +4607,13 @@ Type H <return> for immediate help.}% \setbox\z@\hbox{$\m@th#1{#2}$}\finsm@sh} \def\finsm@sh{\ht\z@\z@ \dp\z@\z@ \leavevmode@ifvmode\box\z@} \def\buildrel#1\over#2{\mathrel{\mathop{\kern\z@#2}\limits^{#1}}} -\def\cases#1{\left\{\,\vcenter{\normalbaselines\m@th +\DeclareRobustCommand\cases[1]{\left\{\,\vcenter{\normalbaselines\m@th \ialign{$##\hfil$&\quad{##}\hfil\crcr#1\crcr}}\right.} -\def\matrix#1{\null\,\vcenter{\normalbaselines\m@th +\DeclareRobustCommand\matrix[1]{\null\,\vcenter{\normalbaselines\m@th \ialign{\hfil$##$\hfil&&\quad\hfil$##$\hfil\crcr \mathstrut\crcr\noalign{\kern-\baselineskip} #1\crcr\mathstrut\crcr\noalign{\kern-\baselineskip}}}\,} -\def\pmatrix#1{\left(\matrix{#1}\right)} +\DeclareRobustCommand\pmatrix[1]{\left(\matrix{#1}\right)} \def\bordermatrix#1{\begingroup \m@th \@tempdima 8.75\p@ \setbox\z@\vbox{% @@ -4543,7 +4646,7 @@ Type H <return> for immediate help.}% \def\>{\mskip\medmuskip} \def\;{\mskip\thickmuskip} \def\!{\mskip-\thinmuskip} -\def\*{\discretionary{\thinspace\the\textfont2\char2}{}{}} +\DeclareRobustCommand\*{\discretionary{\thinspace\the\textfont2\char2}{}{}} \let\:=\> \def\active@math@prime{^\bgroup\prim@s} {\catcode`\'=\active \global\let'\active@math@prime} @@ -4598,8 +4701,8 @@ Type H <return> for immediate help.}% \def\equation{$$\refstepcounter{equation}} \def\endequation{\eqno \hbox{\@eqnnum}$$\@ignoretrue} \def\@eqnnum{{\normalfont \normalcolor (\theequation)}} -\def\stackrel#1#2{\mathrel{\mathop{#2}\limits^{#1}}} -\def\frac#1#2{{\begingroup#1\endgroup\over#2}} +\DeclareRobustCommand\stackrel[2]{\mathrel{\mathop{#2}\limits^{#1}}} +\DeclareRobustCommand\frac[2]{{\begingroup#1\endgroup\over#2}} \DeclareRobustCommand\sqrt{\@ifnextchar[\@sqrt\sqrtsign} \def\@sqrt[#1]{\root #1\of} \newcount\@eqcnt @@ -4915,7 +5018,7 @@ Type H <return> for immediate help.}% \@ifnextchar(%) \@makepicbox {\@ifnextchar[\@makebox\mbox}}% -\long\def\mbox#1{\leavevmode\hbox{#1}} +\DeclareRobustCommand\mbox[1]{\leavevmode\hbox{#1}} \def\@makebox[#1]{% \@ifnextchar [{\@imakebox[#1]}{\@imakebox[#1][c]}} \long\def\@begin@tempboxa#1#2{% @@ -4965,7 +5068,7 @@ Type H <return> for immediate help.}% \DeclareRobustCommand\savebox[1]{% \@ifnextchar(%) {\@savepicbox#1}{\@ifnextchar[{\@savebox#1}{\sbox#1}}}% -\long\def\sbox#1#2{\setbox#1\hbox{% +\DeclareRobustCommand\sbox[2]{\setbox#1\hbox{% \color@setgroup#2\color@endgroup}} \def\@savebox#1[#2]{% \@ifnextchar [{\@isavebox#1[#2]}{\@isavebox#1[#2][c]}} @@ -4988,8 +5091,8 @@ Type H <return> for immediate help.}% \color@setgroup \ignorespaces} \def\endlrbox{\unskip\color@endgroup} -\def\usebox#1{\leavevmode\copy #1\relax} -\long\def\frame#1{% +\DeclareRobustCommand\usebox[1]{\leavevmode\copy #1\relax} +\DeclareRobustCommand\frame[1]{% \leavevmode \hbox{% \hskip-\@wholewidth @@ -5005,7 +5108,7 @@ Type H <return> for immediate help.}% \hskip-\@wholewidth}} \newdimen\fboxrule \newdimen\fboxsep -\long\def\fbox#1{% +\DeclareRobustCommand\fbox[1]{% \leavevmode \setbox\@tempboxa\hbox{% \color@begingroup @@ -5169,7 +5272,7 @@ Type H <return> for immediate help.}% \advance\@tempdimc\@tempdima \vrule\@width\@tempdimb\@height\@tempdimc\@depth-\@tempdima}} \let\@@underline\underline -\def\underline#1{% +\DeclareRobustCommand\underline[1]{% \relax \ifmmode\@@underline{#1}% \else $\@@underline{\hbox{#1}}\m@th$\relax\fi} @@ -5199,11 +5302,11 @@ Type H <return> for immediate help.}% \def\@finalstrut#1{% \unskip\ifhmode\nobreak\fi\vrule\@width\z@\@height\z@\@depth\dp#1} \def\@@line{\hb@xt@\hsize} -\def\leftline#1{\@@line{#1\hss}} -\def\rightline#1{\@@line{\hss#1}} -\def\centerline#1{\@@line{\hss#1\hss}} -\def\rlap#1{\hb@xt@\z@{#1\hss}} -\def\llap#1{\hb@xt@\z@{\hss#1}} +\DeclareRobustCommand\leftline[1]{\@@line{#1\hss}} +\DeclareRobustCommand\rightline[1]{\@@line{\hss#1}} +\DeclareRobustCommand\centerline[1]{\@@line{\hss#1\hss}} +\DeclareRobustCommand\rlap[1]{\hb@xt@\z@{#1\hss}} +\DeclareRobustCommand\llap[1]{\hb@xt@\z@{\hss#1}} %%% From File: lttab.dtx \expandafter\let\csname ver@autotabg.sty\endcsname\fmtversion \newdimen\@gtempa @@ -5223,7 +5326,7 @@ Type H <return> for immediate help.}% \newbox\@curfield \newbox\@tabfbox \newif\if@rjfield -\gdef\@startline{% +\def\@startline{% \ifnum \@nxttabmar >\@hightab \@badtab \global\@nxttabmar \@hightab @@ -5233,7 +5336,7 @@ Type H <return> for immediate help.}% \global\setbox\@curline \hbox {}% \@startfield \strut} -\gdef\@stopline{% +\def\@stopline{% \unskip \@stopfield \if@rjfield @@ -5249,21 +5352,20 @@ Type H <return> for immediate help.}% \@addfield \hbox{\@itemfudge\hskip\dimen\@curtabmar\box\@curline}% \fi} -\gdef\@startfield{% +\def\@startfield{% \global\setbox\@curfield\hbox\bgroup\color@begingroup} -\gdef\@stopfield{% +\def\@stopfield{% \color@endgroup\egroup} -\gdef\@contfield{% +\def\@contfield{% \global\setbox\@curfield\hbox\bgroup\color@begingroup \unhbox\@curfield} -\gdef\@addfield{\global\setbox\@curline\hbox{\unhbox +\def\@addfield{\global\setbox\@curline\hbox{\unhbox \@curline\unhbox\@curfield}} -\gdef\@ifatmargin{\ifdim \wd\@curline =\z@} -\gdef\@tabcr{\@stopline \@ifstar{\penalty \@M \@xtabcr}\@xtabcr} -\gdef\@xtabcr{\@ifnextchar[\@itabcr{\@startline\ignorespaces}} -\gdef\@itabcr[#1]{\vskip #1\@startline\ignorespaces} -\gdef\kill{\@stopfield\@startline\ignorespaces} -\gdef\tabbing{\lineskip \z@skip\let\>\@rtab\let\<\@ltab\let\=\@settab +\def\@ifatmargin{\ifdim \wd\@curline =\z@} +\def\@tabcr{\@stopline \@ifstar{\penalty \@M \@xtabcr}\@xtabcr} +\def\@xtabcr{\@ifnextchar[\@itabcr{\@startline\ignorespaces}} +\def\@itabcr[#1]{\vskip #1\@startline\ignorespaces} +\def\tabbing{\lineskip \z@skip\let\>\@rtab\let\<\@ltab\let\=\@settab \let\+\@tabplus\let\-\@tabminus\let\`\@tabrj\let\'\@tablab \let\\=\@tabcr \@hightab\@firsttab @@ -5276,16 +5378,16 @@ Type H <return> for immediate help.}% \rlap{\hskip\@totalleftmargin\indent\the\everypar}}% \def\@itemfudge{\box\@tabfbox}% \@startline\ignorespaces} -\gdef\endtabbing{% +\def\endtabbing{% \@stopline\ifnum\@tabpush >\z@ \@badpoptabs \fi\endtrivlist} -\gdef\@rtab{\@stopfield\@addfield\ifnum \@curtab<\@hightab +\def\@rtab{\@stopfield\@addfield\ifnum \@curtab<\@hightab \global\advance\@curtab \@ne \else\@badtab\fi \@tempdima\dimen\@curtab \advance\@tempdima -\dimen\@curtabmar \advance\@tempdima -\wd\@curline \global\setbox\@curline\hbox{\unhbox\@curline\hskip\@tempdima}% \@startfield\ignorespaces} -\gdef\@settab{\@stopfield\@addfield +\def\@settab{\@stopfield\@addfield \ifnum \@curtab <\@maxtab \ifnum\@curtab =\@hightab \advance\@hightab \@ne @@ -5298,27 +5400,27 @@ Type H <return> for immediate help.}% \advance\dimen\@curtab \wd\@curline \@startfield \ignorespaces} -\gdef\@ltab{\@ifatmargin\ifnum\@curtabmar >\@firsttab +\def\@ltab{\@ifatmargin\ifnum\@curtabmar >\@firsttab \global\advance\@curtab \m@ne \global\advance\@curtabmar\m@ne\else \@badtab\fi\else \@latex@error{\string\<\space in mid line}\@ehd\fi\ignorespaces} -\gdef\@tabplus{% +\def\@tabplus{% \ifnum\@nxttabmar<\@hightab \global\advance\@nxttabmar\@ne \else \@badtab \fi \ignorespaces} -\gdef\@tabminus{% +\def\@tabminus{% \ifnum\@nxttabmar>\@firsttab \global\advance\@nxttabmar\m@ne \else \@badtab \fi \ignorespaces} -\gdef\@tabrj{% +\def\@tabrj{% \@stopfield\@addfield\global\@rjfieldtrue\@startfield\ignorespaces} -\gdef\@tablab{% +\def\@tablab{% \@stopfield \global\setbox\@curline\hbox{% \box\@curline @@ -5327,10 +5429,10 @@ Type H <return> for immediate help.}% \hskip\tabbingsep}% \@startfield \ignorespaces} -\gdef\pushtabs{% +\DeclareRobustCommand\pushtabs{% \@stopfield\@addfield\global\advance\@tabpush \@ne \begingroup \@contfield} -\gdef\poptabs{\@stopfield\@addfield +\DeclareRobustCommand\poptabs{\@stopfield\@addfield \ifnum \@tabpush >\z@ \endgroup \global\advance\@tabpush \m@ne @@ -5342,8 +5444,9 @@ Type H <return> for immediate help.}% \@badpoptabs \fi \@contfield} +\DeclareRobustCommand\kill{\@stopfield\@startline\ignorespaces} \newdimen\tabbingsep -\def\extracolsep#1{\tabskip #1\relax} +\DeclareRobustCommand\extracolsep[1]{\tabskip #1\relax} \def\array{\let\@acol\@arrayacol \let\@classz\@arrayclassz \let\@classiv\@arrayclassiv \let\\\@arraycr\let\@halignto\@empty\@tabarray} @@ -5463,7 +5566,9 @@ Type H <return> for immediate help.}% \edef\@preamble{% \@preamble{% \ifcase\@chnum - \hfil\ignorespaces\@sharp\unskip\hfil + \hfil + \hskip1sp% + \ignorespaces\@sharp\unskip\hfil \or \hskip1sp\ignorespaces\@sharp\unskip\hfil \or @@ -5558,42 +5663,43 @@ Type H <return> for immediate help.}% \newdimen\unitlength \unitlength =1pt \newbox\@picbox \newdimen\@picht -\long\gdef\picture#1{\pictur@#1} -\gdef\pictur@(#1){% +\long\def\picture#1{\pictur@#1} +\def\pictur@(#1){% \@ifnextchar({\@picture(#1)}{\@picture(#1)(0,0)}} -\gdef\@picture(#1,#2)(#3,#4){% +\def\@picture(#1,#2)(#3,#4){% \@picht#2\unitlength \setbox\@picbox\hb@xt@#1\unitlength\bgroup \hskip -#3\unitlength \lower #4\unitlength\hbox\bgroup \ignorespaces} -\gdef\endpicture{% +\def\endpicture{% \egroup\hss\egroup \ht\@picbox\@picht\dp\@picbox\z@ \mbox{\box\@picbox}} -\long\gdef\put(#1,#2)#3{% +\long\def\put(#1,#2)#3{% \@killglue\raise#2\unitlength \hb@xt@\z@{\kern#1\unitlength #3\hss}% \ignorespaces} -\gdef\multiput(#1,#2)#3{% +\def\multiput(#1,#2)#3{% \@xdim #1\unitlength \@ydim #2\unitlength \@multiput(} -\long\gdef\@multiput(#1,#2)#3#4{% +\long\def\@multiput(#1,#2)#3#4{% \@killglue\@multicnt #3\relax \@whilenum \@multicnt >\z@\do {\raise\@ydim\hb@xt@\z@{\kern\@xdim #4\hss}% \advance\@multicnt\m@ne \advance\@xdim#1\unitlength\advance\@ydim#2\unitlength}% \ignorespaces} -\gdef\@killglue{\unskip\@whiledim \lastskip >\z@\do{\unskip}} -\gdef\thinlines{\let\@linefnt\tenln \let\@circlefnt\tencirc +\def\@killglue{\unskip\@whiledim \lastskip >\z@\do{\unskip}} +\DeclareRobustCommand\thinlines{\let\@linefnt\tenln \let\@circlefnt\tencirc \@wholewidth\fontdimen8\tenln \@halfwidth .5\@wholewidth} -\gdef\thicklines{\let\@linefnt\tenlnw \let\@circlefnt\tencircw +\DeclareRobustCommand\thicklines{\let\@linefnt\tenlnw \let\@circlefnt\tencircw \@wholewidth\fontdimen8\tenlnw \@halfwidth .5\@wholewidth} -\gdef\linethickness#1{\@wholewidth #1\relax \@halfwidth .5\@wholewidth} -\gdef\shortstack{\@ifnextchar[\@shortstack{\@shortstack[c]}} -\gdef\@shortstack[#1]{% +\DeclareRobustCommand\linethickness[1] + {\@wholewidth #1\relax \@halfwidth .5\@wholewidth} +\def\shortstack{\@ifnextchar[\@shortstack{\@shortstack[c]}} +\def\@shortstack[#1]{% \leavevmode \vbox\bgroup \baselineskip-\p@\lineskip 3\p@ @@ -5601,19 +5707,19 @@ Type H <return> for immediate help.}% \expandafter\let\csname mb@#1\endcsname\relax \let\\\@stackcr \@ishortstack} -\gdef\@ishortstack#1{\ialign{\mb@l {##}\unskip\mb@r\cr #1\crcr}\egroup} -\gdef\@stackcr{\@ifstar\@ixstackcr\@ixstackcr} -\gdef\@ixstackcr{\@ifnextchar[\@istackcr{\cr\ignorespaces}} -\gdef\@istackcr[#1]{\cr\noalign{\vskip #1}\ignorespaces} +\def\@ishortstack#1{\ialign{\mb@l {##}\unskip\mb@r\cr #1\crcr}\egroup} +\def\@stackcr{\@ifstar\@ixstackcr\@ixstackcr} +\def\@ixstackcr{\@ifnextchar[\@istackcr{\cr\ignorespaces}} +\def\@istackcr[#1]{\cr\noalign{\vskip #1}\ignorespaces} \newif\if@negarg -\gdef\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax +\def\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax \@linelen #3\unitlength \ifdim\@linelen<\z@\@badlinearg\else \ifnum\@xarg =\z@ \@vline \else \ifnum\@yarg =\z@ \@hline \else \@sline\fi \fi \fi} -\gdef\@sline{% +\def\@sline{% \ifnum\@xarg<\z@ \@negargtrue \@xarg -\@xarg \@yyarg -\@yarg \else \@negargfalse \@yyarg \@yarg \fi \ifnum \@yyarg >\z@ \@tempcnta\@yyarg \else \@tempcnta -\@yyarg \fi @@ -5655,14 +5761,14 @@ Type H <return> for immediate help.}% \@picture@warn \fi \else\@upordown\@clnht\copy\@linechar\fi} -\gdef\@hline{\ifnum \@xarg <\z@ \hskip -\@linelen \fi +\def\@hline{\ifnum \@xarg <\z@ \hskip -\@linelen \fi \vrule \@height \@halfwidth \@depth \@halfwidth \@width \@linelen \ifnum \@xarg <\z@ \hskip -\@linelen \fi} -\gdef\@getlinechar(#1,#2){\@tempcnta#1\relax\multiply\@tempcnta 8% +\def\@getlinechar(#1,#2){\@tempcnta#1\relax\multiply\@tempcnta 8% \advance\@tempcnta -9\ifnum #2>\z@ \advance\@tempcnta #2\relax\else \advance\@tempcnta -#2\relax\advance\@tempcnta 64 \fi \char\@tempcnta} -\gdef\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax +\def\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax \@tempcnta \ifnum\@xarg<\z@ -\@xarg\else\@xarg\fi \ifnum\@tempcnta<5\relax \@linelen #3\unitlength @@ -5672,25 +5778,25 @@ Type H <return> for immediate help.}% \fi \fi \else\@badlinearg\fi} -\gdef\@hvector{\@hline\hb@xt@\z@{\@linefnt +\def\@hvector{\@hline\hb@xt@\z@{\@linefnt \ifnum \@xarg <\z@ \@getlarrow(1,0)\hss\else \hss\@getrarrow(1,0)\fi}} -\gdef\@vvector{\ifnum \@yarg <\z@ \@downvector \else \@upvector \fi} -\gdef\@svector{\@sline +\def\@vvector{\ifnum \@yarg <\z@ \@downvector \else \@upvector \fi} +\def\@svector{\@sline \@tempcnta\@yarg \ifnum\@tempcnta <\z@ \@tempcnta -\@tempcnta\fi \ifnum\@tempcnta <5% \hskip -\wd\@linechar \@upordown\@clnht \hbox{\@linefnt \if@negarg \@getlarrow(\@xarg,\@yyarg)\else \@getrarrow(\@xarg,\@yyarg)\fi}% \else\@badlinearg\fi} -\gdef\@getlarrow(#1,#2){\ifnum #2=\z@ \@tempcnta 27 % '33 +\def\@getlarrow(#1,#2){\ifnum #2=\z@ \@tempcnta 27 % '33 \else \@tempcnta #1\relax\multiply\@tempcnta \sixt@@n \advance\@tempcnta -9 \@tempcntb #2\relax\multiply\@tempcntb \tw@ \ifnum \@tempcntb >\z@ \advance\@tempcnta \@tempcntb \else\advance\@tempcnta -\@tempcntb\advance\@tempcnta 64 \fi\fi\char\@tempcnta} -\gdef\@getrarrow(#1,#2){\@tempcntb #2\relax +\def\@getrarrow(#1,#2){\@tempcntb #2\relax \ifnum\@tempcntb <\z@ \@tempcntb -\@tempcntb\relax\fi \ifcase \@tempcntb\relax \@tempcnta 45 % '55 \or @@ -5704,19 +5810,19 @@ Type H <return> for immediate help.}% \@tempcnta #1\relax\multiply\@tempcnta \sixt@@n \advance\@tempcnta 7 \fi\ifnum #2<\z@ \advance\@tempcnta 64 \fi \char\@tempcnta} -\gdef\@vline{\ifnum \@yarg <\z@ \@downline \else \@upline\fi} -\gdef\@upline{% +\def\@vline{\ifnum \@yarg <\z@ \@downline \else \@upline\fi} +\def\@upline{% \hb@xt@\z@{\hskip -\@halfwidth \vrule \@width \@wholewidth \@height \@linelen \@depth \z@\hss}} -\gdef\@downline{% +\def\@downline{% \hb@xt@\z@{\hskip -\@halfwidth \vrule \@width \@wholewidth \@height \z@ \@depth \@linelen \hss}} -\gdef\@upvector{\@upline\setbox\@tempboxa\hbox{\@linefnt\char 54}% '66 +\def\@upvector{\@upline\setbox\@tempboxa\hbox{\@linefnt\char 54}% '66 \raise \@linelen \hb@xt@\z@{\lower \ht\@tempboxa\box\@tempboxa\hss}} -\gdef\@downvector{\@downline\lower \@linelen +\def\@downvector{\@downline\lower \@linelen \hb@xt@\z@{\@linefnt\char 63 % '77 \hss}} -\gdef\dashbox#1(#2,#3){\leavevmode\hb@xt@\z@{\baselineskip \z@skip +\def\dashbox#1(#2,#3){\leavevmode\hb@xt@\z@{\baselineskip \z@skip \lineskip \z@skip \@dashdim #2\unitlength \@dashcnt \@dashdim \advance\@dashcnt 200 @@ -5772,7 +5878,7 @@ Type H <return> for immediate help.}% \newdimen\@ovdy \newdimen\@ovro \newdimen\@ovri -\gdef\@getcirc#1{\@tempdima #1\relax \advance\@tempdima 2\p@ +\def\@getcirc#1{\@tempdima #1\relax \advance\@tempdima 2\p@ \@tempcnta\@tempdima \@tempdima 4\p@ \divide\@tempcnta\@tempdima \ifnum \@tempcnta >10\relax @@ -5787,11 +5893,11 @@ Type H <return> for immediate help.}% \def\@picture@warn{\@latex@warning{% \string\oval, \string\circle, or \string\line\space size unavailable}} -\gdef\@put#1#2#3{\raise #2\hb@xt@\z@{\hskip #1#3\hss}} -\gdef\oval(#1,#2){\@ifnextchar[{\@oval(#1,#2)}{\@oval(#1,#2)[]}} +\def\@put#1#2#3{\raise #2\hb@xt@\z@{\hskip #1#3\hss}} +\def\oval(#1,#2){\@ifnextchar[{\@oval(#1,#2)}{\@oval(#1,#2)[]}} \newif\if@ovvline \@ovvlinetrue \newif\if@ovhline \@ovhlinetrue -\gdef\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen +\def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue \@ovvlinefalse \@ovhlinefalse \@tfor\reserved@a :=#3\do{\csname @ov\reserved@a false\endcsname}% @@ -5814,7 +5920,7 @@ Type H <return> for immediate help.}% \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@ \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}% \endgroup} -\gdef\@ovvert#1#2{\vbox to\@ovyy{% +\def\@ovvert#1#2{\vbox to\@ovyy{% \if@ovb \@tempcntb \@tempcnta \advance \@tempcntb #1\relax \kern -\@ovro \hbox{\char \@tempcntb}\nointerlineskip \else \kern \@ovri \kern \@ovdy \fi @@ -5823,14 +5929,14 @@ Type H <return> for immediate help.}% \if@ovt \@tempcntb \@tempcnta \advance \@tempcntb #2\relax \hbox{\char \@tempcntb}% \else \kern \@ovdy \kern \@ovro \fi}} -\gdef\@ovhorz{\hb@xt@\@ovxx{\kern \@ovro +\def\@ovhorz{\hb@xt@\@ovxx{\kern \@ovro \if@ovr \else \kern \@ovdx \fi \if@ovhline \leaders \hrule \@height \@wholewidth \fi \hfil \if@ovl \else \kern \@ovdx \fi \kern \@ovri}} -\gdef\circle{\@inmatherr\circle\@ifstar\@dot\@circle} -\gdef\@circle#1{% +\def\circle{\@inmatherr\circle\@ifstar\@dot\@circle} +\def\@circle#1{% \begingroup \boxmaxdepth \maxdimen \@tempdimb #1\unitlength \ifdim \@tempdimb >15.5\p@ \@getcirc\@tempdimb \@ovro\ht\@tempboxa @@ -5842,8 +5948,8 @@ Type H <return> for immediate help.}% \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@ \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}% \else \@circ\@tempdimb{96}\fi\endgroup} -\gdef\@dot#1{\@tempdimb #1\unitlength \@circ\@tempdimb{112}} -\gdef\@circ#1#2{\@tempdima #1\relax \advance\@tempdima .5\p@ +\def\@dot#1{\@tempdimb #1\unitlength \@circ\@tempdimb{112}} +\def\@circ#1#2{\@tempdima #1\relax \advance\@tempdima .5\p@ \@tempcnta\@tempdima \@tempdima \p@ \divide\@tempcnta\@tempdima \ifnum\@tempcnta >15\relax \@tempcnta 15\relax \fi @@ -5867,10 +5973,10 @@ Type H <return> for immediate help.}% \let\@circlefnt\tencirc \@wholewidth\fontdimen8\tenln \@halfwidth .5\@wholewidth -\gdef\qbeziermax{500} +\def\qbeziermax{500} \newcommand\qbezier[2][0]{\bezier{#1}#2} -\gdef\bezier#1)#2(#3)#4({\@bezier#1)(#3)(} -\gdef\@bezier#1(#2,#3)(#4,#5)(#6,#7){% +\def\bezier#1)#2(#3)#4({\@bezier#1)(#3)(} +\def\@bezier#1(#2,#3)(#4,#5)(#6,#7){% \ifnum #1=\z@ \@ovxx #4\unitlength \advance\@ovxx -#2\unitlength @@ -5920,6 +6026,18 @@ Type H <return> for immediate help.}% \hb@xt@\z@{\kern\@xdim \unhcopy\@tempboxa\hss}% \advance\count@\@ne}}} +\MakeRobust\bezier +\MakeRobust\circle +\MakeRobust\dashbox +\MakeRobust\line +\MakeRobust\linethickness +\MakeRobust\multiput +\MakeRobust\oval +\MakeRobust\put +\MakeRobust\qbezier +\MakeRobust\shortstack +\MakeRobust\thinlines +\MakeRobust\vector %%% From File: ltthm.dtx \def\newtheorem#1{% \@ifnextchar[{\@othm{#1}}{\@nthm{#1}}} @@ -5961,21 +6079,21 @@ Type H <return> for immediate help.}% \def\@endtheorem{\endtrivlist} %%% From File: ltsect.dtx \message{title,} -\def\title#1{\gdef\@title{#1}} -\def\@title{\@latex@error{No \noexpand\title given}\@ehc} -\def\author#1{\gdef\@author{#1}} -\def\@author{\@latex@warning@no@line{No \noexpand\author given}} -\def\date#1{\gdef\@date{#1}} -\gdef\@date{\today} -\def\thanks#1{\footnotemark +\DeclareRobustCommand\title[1]{\gdef\@title{#1}} +\DeclareRobustCommand\author[1]{\gdef\@author{#1}} +\DeclareRobustCommand\date[1]{\gdef\@date{#1}} +\DeclareRobustCommand\thanks[1]{\footnotemark \protected@xdef\@thanks{\@thanks \protect\footnotetext[\the\c@footnote]{#1}}% } -\let\@thanks\@empty -\def\and{% % \begin{tabular} +\DeclareRobustCommand\and{% % \begin{tabular} \end{tabular}% \hskip 1em \@plus.17fil% - \begin{tabular}[t]{c}}% % \end{tabular} + \begin{tabular}[t]{c}}% % \end{tabular} +\def\@title{\@latex@error{No \noexpand\title given}\@ehc} +\def\@author{\@latex@warning@no@line{No \noexpand\author given}} +\gdef\@date{\today} +\let\@thanks\@empty \message{sectioning,} \newcount\@secpenalty \@secpenalty = -300 @@ -6547,7 +6665,7 @@ Type H <return> for immediate help.}% \hfil}\let\@evenhead\@empty\let\@evenfoot\@oddfoot} \let\@leftmark\@firstoftwo \let\@rightmark\@secondoftwo -\def\markboth#1#2{% +\DeclareRobustCommand\markboth[2]{% \begingroup \let\label\relax \let\index\relax \let\glossary\relax \unrestored@protected@xdef\@themark {{#1}{#2}}% @@ -6555,7 +6673,7 @@ Type H <return> for immediate help.}% \mark{\the\@temptokena}% \endgroup \if@nobreak\ifvmode\nobreak\fi\fi} -\def\markright#1{% +\DeclareRobustCommand\markright[1]{% \begingroup \let\label\relax \let\index\relax \let\glossary\relax \expandafter\@markright\@themark {#1}% @@ -6568,18 +6686,18 @@ Type H <return> for immediate help.}% \def\leftmark{\expandafter\@leftmark\botmark\@empty\@empty} \def\rightmark{\expandafter\@rightmark\firstmark\@empty\@empty} \def\@themark{{}{}} -\def\raggedbottom{% +\DeclareRobustCommand\raggedbottom{% \def\@textbottom{\vskip \z@ \@plus.0001fil}\let\@texttop\relax} -\def\flushbottom{% +\DeclareRobustCommand\flushbottom{% \let\@textbottom\relax \let\@texttop\relax} -\def\sloppy{% +\DeclareRobustCommand\sloppy{% \tolerance 9999% \emergencystretch 3em% \hfuzz .5\p@ \vfuzz\hfuzz} \def\sloppypar{\par\sloppy} \def\endsloppypar{\par} -\def\fussy{% +\DeclareRobustCommand\fussy{% \emergencystretch\z@ \tolerance 200% \hfuzz .1\p@ @@ -6650,7 +6768,7 @@ Type H <return> for immediate help.}% \newdimen\marginparsep \newdimen\marginparpush \newbox\@begindvibox -\def \AtBeginDvi #1{% +\DeclareRobustCommand \AtBeginDvi [1]{% \global \setbox \@begindvibox \vbox{\unvbox \@begindvibox #1}% } @@ -8042,8 +8160,8 @@ Type H <return> for immediate help.}% \let\AtEndOfClass\AtEndOfPackage \@onlypreamble\AtEndOfPackage \@onlypreamble\AtEndOfClass -\def\AtBeginDocument{\g@addto@macro\@begindocumenthook} -\def\AtEndDocument{\g@addto@macro\@enddocumenthook} +\DeclareRobustCommand\AtBeginDocument{\g@addto@macro\@begindocumenthook} +\DeclareRobustCommand\AtEndDocument{\g@addto@macro\@enddocumenthook} \@onlypreamble\AtBeginDocument \def\@cls@pkg{% \ifx\@currext\@clsextension @@ -8088,6 +8206,31 @@ Type H <return> for immediate help.}% {The document may only declare one class.}\@gobble} \@onlypreamble\@twoclasseserror \def\two@digits#1{\ifnum#1<10 0\fi\number#1} + +\def\filecontents{\@tempswatrue\@fileswtrue + \@ifnextchar[\filec@ntents@opt\filec@ntents +} +\@namedef{filecontents*}{\@tempswafalse\@fileswtrue + \@ifnextchar[\filec@ntents@opt\filec@ntents +} +\def\filec@ntents@opt[#1]{% + \@for\@tempa:=#1\do{% + \ifcsname filec@ntents@\@tempa\endcsname + \csname filec@ntents@\@tempa\endcsname + \else + \@latex@error{Unknown filecontents option #1}% + {Valid options are force (or overwrite), nosearch, noheader}% + \fi}% + \filec@ntents +} +\let\filec@ntents@force\@fileswfalse +\let\filec@ntents@overwrite\@fileswfalse % alternative name +\let\filec@ntents@noheader\@tempswafalse +\def\filec@ntents@nosearch{% + \let\filec@ntents@checkdir\@currdir + \def\filec@ntents@where{in current directory}} +\let\filec@ntents@checkdir\@empty +\def\filec@ntents@where{exists on the system} \begingroup% \@tempcnta=1 \loop @@ -8099,28 +8242,53 @@ Type H <return> for immediate help.}% \catcode`\^^M\active% \catcode`\^^L\active\let^^L\relax% \catcode`\^^I\active% -\gdef\filecontents{\@tempswatrue\filec@ntents}% -\gdef\filecontents*{\@tempswafalse\filec@ntents}% \gdef\filec@ntents#1{% - \openin\@inputcheck#1 % + \set@curr@file{\filec@ntents@checkdir#1}% + \edef\q@curr@file{\expandafter\quote@name\expandafter{\@curr@file}}% + \openin\@inputcheck\q@curr@file \space % \ifeof\@inputcheck% \@latex@warning@no@line% - {Writing file `\@currdir#1'}% + {Writing file `\@currdir\@curr@file'}% \chardef\reserved@c15 % \ch@ck7\reserved@c\write% - \immediate\openout\reserved@c#1\relax% + \immediate\openout\reserved@c\q@curr@file\relax% \else% - \closein\@inputcheck% - \@latex@warning@no@line% - {File `#1' already exists on the system.\MessageBreak% + \if@filesw% + \@latex@warning@no@line% + {File `\@curr@file' already \filec@ntents@where.\MessageBreak% Not generating it from this source}% - \let\write\@gobbletwo% - \let\closeout\@gobble% + \let\write\@gobbletwo% + \let\closeout\@gobble% + \else% + \edef\reserved@a{#1}% + \edef\reserved@a{\detokenize\expandafter{\reserved@a}}% + \edef\reserved@b{\detokenize\expandafter{\jobname}}% + \ifx\reserved@a\reserved@b% + \@fileswtrue% + \else% + \edef\reserved@b{\reserved@b\detokenize{.tex}}% + \ifx\reserved@a\reserved@b + \@fileswtrue% + \fi% + \fi% + \chardef\reserved@c15 % + \ch@ck7\reserved@c\write% + \if@filesw% % Foul ... trying to overwrite \jobname! + \@latex@error{Trying to overwrite `\jobname.tex'}{You can't % + write to the file you a reading from!\MessageBreak% + Data is written to screen instead.}% + \else% + \@latex@warning@no@line% + {Writing or overwriting file `\@currdir\@curr@file'}% + \immediate\openout\reserved@c#1\relax% + \fi% + \fi% \fi% + \closein\@inputcheck% \if@tempswa% \immediate\write\reserved@c{% \@percentchar\@percentchar\space% - \expandafter\@gobble\string\LaTeX2e file `#1'^^J% + \expandafter\@gobble\string\LaTeX2e file `\@curr@file'^^J% \@percentchar\@percentchar\space generated by the % `\@currenvir' \expandafter\@gobblefour\string\newenvironment^^J% \@percentchar\@percentchar\space from source `\jobname' on % @@ -8146,7 +8314,7 @@ Type H <return> for immediate help.}% \ifx\relax##1\relax% \else% \@latex@warning{Writing text `##1' before % - \string\end{\@currenvir}\MessageBreak as last line of #1}% + \string\end{\@currenvir}\MessageBreak as last line of \@curr@file}% \immediate\write\reserved@c{##1}% \fi% \ifx\relax##2\relax% @@ -8181,12 +8349,7 @@ Type H <return> for immediate help.}% \T\I{Tab}{Spac}| \immediate\write\@unused{}} \global\let\endfilecontents*\endfilecontents -\@onlypreamble\filecontents -\@onlypreamble\endfilecontents -\@onlypreamble\filecontents* -\@onlypreamble\endfilecontents* \endgroup -\@onlypreamble\filec@ntents \let\pkgcls@debug\@gobble \def\requestedLaTeXdate{0} \ifx\pkgcls@targetdate\@undefined @@ -8372,7 +8535,7 @@ Type H <return> for immediate help.}% \fi } -\long\def\IfTargetDateBefore#1{% +\DeclareRobustCommand\IfTargetDateBefore[1]{% \ifnum\pkgcls@innerdate <% \expandafter\@parse@version\expandafter0#1//00\@nil \typeout{Exclude code introduced on #1}% @@ -8833,12 +8996,18 @@ Type H <return> for immediate help.}% \def\i{I}\def\j{J}% \def\reserved@a##1##2{\let##1##2\reserved@a}% \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}% + \let\UTF@two@octets@noexpand\@empty + \let\UTF@three@octets@noexpand\@empty + \let\UTF@four@octets@noexpand\@empty \protected@edef\reserved@a{\uppercase{#1}}% \reserved@a }} \DeclareRobustCommand{\MakeLowercase}[1]{{% \def\reserved@a##1##2{\let##2##1\reserved@a}% \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}% + \let\UTF@two@octets@noexpand\@empty + \let\UTF@three@octets@noexpand\@empty + \let\UTF@four@octets@noexpand\@empty \protected@edef\reserved@a{\lowercase{#1}}% \reserved@a }} |