From 5255c37137345163348d22ab46af2304cf9f55a6 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 2 Oct 2020 21:49:18 +0000 Subject: latex2e (2oct20) git-svn-id: svn://tug.org/texlive/trunk@56514 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/amsmath/amsmath.sty | 108 +- Master/texmf-dist/tex/latex/base/ansinew.def | 2 +- Master/texmf-dist/tex/latex/base/applemac.def | 2 +- Master/texmf-dist/tex/latex/base/article.cls | 128 +- Master/texmf-dist/tex/latex/base/ascii.def | 2 +- Master/texmf-dist/tex/latex/base/atbegshi-ltx.sty | 76 + Master/texmf-dist/tex/latex/base/atveryend-ltx.sty | 68 + Master/texmf-dist/tex/latex/base/bk10.clo | 6 +- Master/texmf-dist/tex/latex/base/bk11.clo | 6 +- Master/texmf-dist/tex/latex/base/bk12.clo | 6 +- Master/texmf-dist/tex/latex/base/book.cls | 128 +- Master/texmf-dist/tex/latex/base/cp1250.def | 2 +- Master/texmf-dist/tex/latex/base/cp1252.def | 2 +- Master/texmf-dist/tex/latex/base/cp1257.def | 2 +- Master/texmf-dist/tex/latex/base/cp437.def | 2 +- Master/texmf-dist/tex/latex/base/cp437de.def | 2 +- Master/texmf-dist/tex/latex/base/cp850.def | 2 +- Master/texmf-dist/tex/latex/base/cp852.def | 2 +- Master/texmf-dist/tex/latex/base/cp858.def | 2 +- Master/texmf-dist/tex/latex/base/cp865.def | 2 +- Master/texmf-dist/tex/latex/base/decmulti.def | 2 +- Master/texmf-dist/tex/latex/base/doc.sty | 3 +- Master/texmf-dist/tex/latex/base/docstrip.tex | 56 +- Master/texmf-dist/tex/latex/base/everyshi-ltx.sty | 68 + Master/texmf-dist/tex/latex/base/fleqn.clo | 4 +- Master/texmf-dist/tex/latex/base/fontenc.sty | 2 +- Master/texmf-dist/tex/latex/base/fontmath.cfg | 2 +- Master/texmf-dist/tex/latex/base/fontmath.ltx | 2 +- Master/texmf-dist/tex/latex/base/fonttext.cfg | 2 +- Master/texmf-dist/tex/latex/base/fonttext.ltx | 17 +- Master/texmf-dist/tex/latex/base/inputenc.sty | 4 +- Master/texmf-dist/tex/latex/base/latex.ltx | 6554 +++++++++++++------- Master/texmf-dist/tex/latex/base/latex209.def | 8 +- Master/texmf-dist/tex/latex/base/latexrelease.sty | 4508 +++++++++++++- Master/texmf-dist/tex/latex/base/latin1.def | 2 +- Master/texmf-dist/tex/latex/base/latin10.def | 2 +- Master/texmf-dist/tex/latex/base/latin2.def | 2 +- Master/texmf-dist/tex/latex/base/latin3.def | 2 +- Master/texmf-dist/tex/latex/base/latin4.def | 2 +- Master/texmf-dist/tex/latex/base/latin5.def | 2 +- Master/texmf-dist/tex/latex/base/latin9.def | 2 +- Master/texmf-dist/tex/latex/base/letter.cls | 67 +- Master/texmf-dist/tex/latex/base/lppl.tex | 511 ++ Master/texmf-dist/tex/latex/base/ltexpl.ltx | 64 - Master/texmf-dist/tex/latex/base/ltluatex.lua | 10 +- Master/texmf-dist/tex/latex/base/ltluatex.tex | 28 +- Master/texmf-dist/tex/latex/base/ltnews.cls | 4 + Master/texmf-dist/tex/latex/base/ltxdoc.cls | 13 +- Master/texmf-dist/tex/latex/base/macce.def | 2 +- Master/texmf-dist/tex/latex/base/next.def | 2 +- Master/texmf-dist/tex/latex/base/omlenc.def | 2 +- Master/texmf-dist/tex/latex/base/omsenc.def | 2 +- Master/texmf-dist/tex/latex/base/ot1enc.def | 2 +- Master/texmf-dist/tex/latex/base/ot4enc.def | 2 +- Master/texmf-dist/tex/latex/base/preload.cfg | 2 +- Master/texmf-dist/tex/latex/base/report.cls | 128 +- Master/texmf-dist/tex/latex/base/shortvrb.sty | 2 +- Master/texmf-dist/tex/latex/base/size10.clo | 6 +- Master/texmf-dist/tex/latex/base/size11.clo | 6 +- Master/texmf-dist/tex/latex/base/size12.clo | 6 +- Master/texmf-dist/tex/latex/base/slides.cls | 2 +- Master/texmf-dist/tex/latex/base/slides.def | 2 +- Master/texmf-dist/tex/latex/base/source2edoc.cls | 228 + Master/texmf-dist/tex/latex/base/structuredlog.sty | 76 + Master/texmf-dist/tex/latex/base/t1enc.def | 2 +- Master/texmf-dist/tex/latex/base/tuenc.def | 56 +- Master/texmf-dist/tex/latex/graphics/color.sty | 4 +- Master/texmf-dist/tex/latex/graphics/graphics.sty | 61 +- Master/texmf-dist/tex/latex/graphics/graphicx.sty | 30 +- Master/texmf-dist/tex/latex/graphics/lscape.sty | 6 +- .../tex/latex/tools/array-2020-02-10.sty | 374 ++ Master/texmf-dist/tex/latex/tools/array.sty | 24 +- Master/texmf-dist/tex/latex/tools/varioref.sty | 185 +- Master/texmf-dist/tex/latex/tools/verbatim.sty | 10 +- Master/texmf-dist/tex/latex/tools/xr.sty | 7 +- 75 files changed, 10802 insertions(+), 2920 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/base/atbegshi-ltx.sty create mode 100644 Master/texmf-dist/tex/latex/base/atveryend-ltx.sty create mode 100644 Master/texmf-dist/tex/latex/base/everyshi-ltx.sty create mode 100644 Master/texmf-dist/tex/latex/base/lppl.tex delete mode 100644 Master/texmf-dist/tex/latex/base/ltexpl.ltx create mode 100644 Master/texmf-dist/tex/latex/base/source2edoc.cls create mode 100644 Master/texmf-dist/tex/latex/base/structuredlog.sty create mode 100644 Master/texmf-dist/tex/latex/tools/array-2020-02-10.sty (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/amsmath/amsmath.sty b/Master/texmf-dist/tex/latex/amsmath/amsmath.sty index b8a6ade33f6..2aea15ef70c 100644 --- a/Master/texmf-dist/tex/latex/amsmath/amsmath.sty +++ b/Master/texmf-dist/tex/latex/amsmath/amsmath.sty @@ -27,7 +27,7 @@ \providecommand\DeclareCurrentRelease[2]{} \DeclareRelease{}{2018-12-01}{amsmath-2018-12-01.sty} \DeclareCurrentRelease{}{2019-04-01} -\ProvidesPackage{amsmath}[2020/01/20 v2.17e AMS math features] +\ProvidesPackage{amsmath}[2020/09/23 v2.17i AMS math features] \edef\@temp{\catcode 96=\number\catcode 96 } \catcode\string `\`=12 \def\do#1{\catcode\number`#1=\number\catcode`#1} @@ -153,23 +153,29 @@ For additional information on amsmath, use the \lq ?\rq\space option.% \@ifundefined{inf@bad}{% \newcount\inf@bad \inf@bad=1000000 \relax }{} +\let\tmspace\@undefined +\let\,\@undefined +\let\!\@undefined +\let\:\@undefined +\let\negmedspace\@undefined +\let\negthickspace\@undefined \ifx\leavevmode@ifvmode\@undefined -\DeclareRobustCommand{\tmspace}[3]{% +\DeclareRobustCommand\tmspace[3]{% \ifmmode\mskip#1#2\else\kern#1#3\fi\relax} \else -\DeclareRobustCommand{\tmspace}[3]{% +\DeclareRobustCommand\tmspace[3]{% \ifmmode\mskip#1#2\else\leavevmode@ifvmode\kern#1#3\fi\relax} \fi -\renewcommand{\,}{\tmspace+\thinmuskip{.1667em}} +\DeclareRobustCommand\,{\tmspace+\thinmuskip{.1667em}} \let\thinspace\, -\renewcommand{\!}{\tmspace-\thinmuskip{.1667em}} +\DeclareRobustCommand\!{\tmspace-\thinmuskip{.1667em}} \let\negthinspace\! -\renewcommand{\:}{\tmspace+\medmuskip{.2222em}} +\DeclareRobustCommand\:{\tmspace+\medmuskip{.2222em}} \let\medspace\: -\newcommand{\negmedspace}{\tmspace-\medmuskip{.2222em}} -\renewcommand{\;}{\tmspace+\thickmuskip{.2777em}} +\DeclareRobustCommand\negmedspace{\tmspace-\medmuskip{.2222em}} +\renewcommand\;{\tmspace+\thickmuskip{.2777em}} \let\thickspace\; -\newcommand{\negthickspace}{\tmspace-\thickmuskip{.2777em}} +\DeclareRobustCommand\negthickspace{\tmspace-\thickmuskip{.2777em}} \newcommand{\mspace}[1]{\mskip#1\relax} \def\@tempa#1#2\@nil{% \ifx\delimiter#1\@tempcnta#2\relax\else\@tempcnta\z@\fi @@ -224,7 +230,11 @@ Foreign command \@backslashchar#1;\MessageBreak \renewcommand{\overwithdelims}{\primfrac{overwithdelims}} \renewcommand{\atopwithdelims}{\primfrac{atopwithdelims}} \renewcommand{\abovewithdelims}{\primfrac{abovewithdelims}} +\ifx\directlua\@undefined \DeclareRobustCommand{\frac}[2]{{\begingroup#1\endgroup\@@over#2}} +\else +\DeclareRobustCommand{\frac}[2]{{\Ustack{\begingroup#1\endgroup\@@over#2}}} +\fi \newcommand{\dfrac}{\genfrac{}{}{}0} \newcommand{\tfrac}{\genfrac{}{}{}1} \DeclareRobustCommand{\binom}{\genfrac()\z@{}} @@ -296,7 +306,7 @@ Foreign command \@backslashchar#1;\MessageBreak \DeclareRobustCommand{\genfrac}[6]{{% \@mathstyle{#4}% \genfrac@choice o{#1}% -{\begingroup#5\endgroup\ifx @#3@\@@over\else\@@above\fi#3\relax#6}% +{\Ustack {\begingroup#5\endgroup\ifx @#3@\@@over\else\@@above\fi#3\relax#6}}% \genfrac@choice c{#2}% }} \fi @@ -733,11 +743,11 @@ Foreign command \@backslashchar#1;\MessageBreak \DeclareFontEncoding{OML}{}{\noaccents@} \DeclareFontEncoding{OMS}{}{\noaccents@} \ams@newcommand{\dddot}[1]{% - {\mathop{#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@ - \hbox{\normalfont ...}\vss}}}} + {\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@ + \hbox{\,\normalfont...}\vss}}}} \ams@newcommand{\ddddot}[1]{% - {\mathop{#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@ - \hbox{\normalfont....}\vss}}}} + {\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@ + \hbox{\,\normalfont....}\vss}}}} \def\set@mathaccent#1#2#3#4{% \xdef#2{% \@nx\mathaccentV @@ -931,12 +941,28 @@ Foreign command \@backslashchar#1;\MessageBreak \fi } \fi -\mathchardef\std@minus\mathcode`\-\relax -\mathchardef\std@equal\mathcode`\=\relax -\AtBeginDocument{% - \mathchardef\std@minus\mathcode`\-\relax - \mathchardef\std@equal\mathcode`\=\relax -} +\@ifundefined{Umathcode} + {% + \mathchardef\std@minus\mathcode`\-\relax + \mathchardef\std@equal\mathcode`\=\relax + } + {% + \Umathcharnumdef\std@minus\Umathcodenum`\-\relax + \Umathcharnumdef\std@equal\Umathcodenum`\=\relax + } +\@ifundefined{Umathcode} + {% + \AtBeginDocument{% + \mathchardef\std@minus\mathcode`\-\relax + \mathchardef\std@equal\mathcode`\=\relax + }% + } + {% + \AtBeginDocument{% + \Umathcharnumdef\std@minus\Umathcodenum`\-\relax + \Umathcharnumdef\std@equal\Umathcodenum`\=\relax + }% + } \ams@def\relbar{\mathrel{\mathpalette\mathsm@sh\std@minus}} \ams@def\Relbar{\mathrel\std@equal} \def\arrowfill@#1#2#3#4{% @@ -985,6 +1011,7 @@ Foreign command \@backslashchar#1;\MessageBreak } \newcommand{\xrightarrow}[2][]{\ext@arrow 0359\rightarrowfill@{#1}{#2}} \newcommand{\xleftarrow}[2][]{\ext@arrow 3095\leftarrowfill@{#1}{#2}} +\ifx\directlua\@undefined \newenvironment{subarray}[1]{% \vcenter\bgroup \Let@ \restore@math@cr \default@tag @@ -997,6 +1024,23 @@ Foreign command \@backslashchar#1;\MessageBreak }{% \crcr\egroup\egroup } +\else +\newenvironment{subarray}[1]{% + \vcenter\bgroup + \Let@ \restore@math@cr \default@tag + \baselineskip \Umathstacknumup \scriptstyle + \advance\baselineskip \Umathstackdenomdown \scriptstyle + \lineskip \Umathstackvgap \scriptstyle + \lineskiplimit \lineskip + \ialign\bgroup\ifx c#1\hfil\fi + \Ustartmath + \m@th\scriptstyle## + \Ustopmath + \hfil\crcr +}{% + \crcr\egroup\egroup +} +\fi \newcommand{\substack}[1]{\subarray{c}#1\endsubarray} \newenvironment{smallmatrix}{\null\,\vcenter\bgroup \Let@\restore@math@cr\default@tag @@ -1379,13 +1423,31 @@ and fix things up.} \fi \next@ \cr } +\def\ams@start@box#1{% + \edef\reserved@a{\csname ams@pos@\expandafter\detokenize + \expandafter{\romannumeral-`\0#1}\endcsname}% + \expandafter\ifx\reserved@a\relax + \PackageWarning{amsmath}{% + Bracket group \detokenize{[#1]} at formula start!\MessageBreak + It could be a misspelled positional argument.\MessageBreak + If it belongs to the formula add a \relax in\MessageBreak + front to hide it}% + \def\ams@return@opt@arg{[#1]}\vcenter + \else + \let\ams@return@opt@arg\@empty\reserved@a + \fi +} +\def\ams@pos@t{\vtop} +\def\ams@pos@b{\vbox} +\def\ams@pos@c{\vcenter} +\let\ams@pos@\ams@pos@c \newcommand{\start@aligned}[2]{% \RIfM@\else \nonmatherr@{\begin{\@currenvir}}% \fi \savecolumn@ % Assumption: called inside a group \alignedspace@left - \if #1t\vtop \else \if#1b \vbox \else \vcenter \fi \fi \bgroup + \ams@start@box{#1}\bgroup \maxfields@#2\relax \ifnum\maxfields@>\m@ne \multiply\maxfields@\tw@ @@ -1410,6 +1472,7 @@ and fix things up.} \hfil \tabskip\alignsep@ \crcr + \ams@return@opt@arg } \def\math@cr@@@alignedat{% \ifnum\column@>\maxfields@ @@ -1449,12 +1512,13 @@ and fix things up.} \nonmatherr@{\begin{gathered}}% \fi \alignedspace@left - \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi \bgroup + \ams@start@box{#1}\bgroup \Let@ \chardef\dspbrk@context\@ne \restore@math@cr \spread@equation \ialign\bgroup \hfil\strut@$\m@th\displaystyle##$\hfil \crcr + \ams@return@opt@arg }{% \endaligned } diff --git a/Master/texmf-dist/tex/latex/base/ansinew.def b/Master/texmf-dist/tex/latex/base/ansinew.def index c752eaab491..33d64d13c22 100644 --- a/Master/texmf-dist/tex/latex/base/ansinew.def +++ b/Master/texmf-dist/tex/latex/base/ansinew.def @@ -44,7 +44,7 @@ \ProvidesFile{ansinew.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}} \ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}} diff --git a/Master/texmf-dist/tex/latex/base/applemac.def b/Master/texmf-dist/tex/latex/base/applemac.def index e311bb2bd9b..2e5ffe44afb 100644 --- a/Master/texmf-dist/tex/latex/base/applemac.def +++ b/Master/texmf-dist/tex/latex/base/applemac.def @@ -44,7 +44,7 @@ \ProvidesFile{applemac.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textflorin}{\textit{f}} \ProvideTextCommandDefault{\textcent} diff --git a/Master/texmf-dist/tex/latex/base/article.cls b/Master/texmf-dist/tex/latex/base/article.cls index 5aafd282345..024e49cf835 100644 --- a/Master/texmf-dist/tex/latex/base/article.cls +++ b/Master/texmf-dist/tex/latex/base/article.cls @@ -43,70 +43,70 @@ %% extension .ins) which are part of the distribution. \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{article} - [2019/12/20 v1.4l + [2020/04/10 v1.4m Standard LaTeX document class] \newcommand\@ptsize{} \newif\if@restonecol \newif\if@titlepage \@titlepagefalse \if@compatibility\else -\DeclareOption{a4paper} - {\setlength\paperheight {297mm}% - \setlength\paperwidth {210mm}} -\DeclareOption{a5paper} - {\setlength\paperheight {210mm}% - \setlength\paperwidth {148mm}} -\DeclareOption{b5paper} - {\setlength\paperheight {250mm}% - \setlength\paperwidth {176mm}} -\DeclareOption{letterpaper} - {\setlength\paperheight {11in}% - \setlength\paperwidth {8.5in}} -\DeclareOption{legalpaper} - {\setlength\paperheight {14in}% - \setlength\paperwidth {8.5in}} -\DeclareOption{executivepaper} - {\setlength\paperheight {10.5in}% - \setlength\paperwidth {7.25in}} -\DeclareOption{landscape} - {\setlength\@tempdima {\paperheight}% - \setlength\paperheight {\paperwidth}% - \setlength\paperwidth {\@tempdima}} + \DeclareOption{a4paper} + {\setlength\paperheight {297mm}% + \setlength\paperwidth {210mm}} + \DeclareOption{a5paper} + {\setlength\paperheight {210mm}% + \setlength\paperwidth {148mm}} + \DeclareOption{b5paper} + {\setlength\paperheight {250mm}% + \setlength\paperwidth {176mm}} + \DeclareOption{letterpaper} + {\setlength\paperheight {11in}% + \setlength\paperwidth {8.5in}} + \DeclareOption{legalpaper} + {\setlength\paperheight {14in}% + \setlength\paperwidth {8.5in}} + \DeclareOption{executivepaper} + {\setlength\paperheight {10.5in}% + \setlength\paperwidth {7.25in}} + \DeclareOption{landscape} + {\setlength\@tempdima {\paperheight}% + \setlength\paperheight {\paperwidth}% + \setlength\paperwidth {\@tempdima}} \fi \if@compatibility \renewcommand\@ptsize{0} \else -\DeclareOption{10pt}{\renewcommand\@ptsize{0}} + \DeclareOption{10pt}{\renewcommand\@ptsize{0}} \fi \DeclareOption{11pt}{\renewcommand\@ptsize{1}} \DeclareOption{12pt}{\renewcommand\@ptsize{2}} \if@compatibility\else -\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} + \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} \fi \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} \DeclareOption{draft}{\setlength\overfullrule{5pt}} \if@compatibility\else -\DeclareOption{final}{\setlength\overfullrule{0pt}} + \DeclareOption{final}{\setlength\overfullrule{0pt}} \fi \DeclareOption{titlepage}{\@titlepagetrue} \if@compatibility\else -\DeclareOption{notitlepage}{\@titlepagefalse} + \DeclareOption{notitlepage}{\@titlepagefalse} \fi \if@compatibility\else -\DeclareOption{onecolumn}{\@twocolumnfalse} + \DeclareOption{onecolumn}{\@twocolumnfalse} \fi \DeclareOption{twocolumn}{\@twocolumntrue} \DeclareOption{leqno}{\input{leqno.clo}} \DeclareOption{fleqn}{\input{fleqn.clo}} \DeclareOption{openbib}{% \AtEndOfPackage{% - \renewcommand\@openbib@code{% + \renewcommand\@openbib@code{% \advance\leftmargin\bibindent \itemindent -\bibindent \listparindent \itemindent \parsep \z@ }% - \renewcommand\newblock{\par}}% + \renewcommand\newblock{\par}}% } \ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final} \ProcessOptions @@ -166,7 +166,7 @@ \let\sectionmark\@gobble \let\subsectionmark\@gobble } - \if@titlepage +\if@titlepage \newcommand\maketitle{\begin{titlepage}% \let\footnotesize\small \let\footnoterule\relax @@ -198,41 +198,41 @@ \global\let\author\relax \global\let\date\relax \global\let\and\relax -} + } \else -\newcommand\maketitle{\par - \begingroup - \renewcommand\thefootnote{\@fnsymbol\c@footnote}% - \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% - \long\def\@makefntext##1{\parindent 1em\noindent - \hb@xt@1.8em{% + \newcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% - \if@twocolumn - \ifnum \col@number=\@ne - \@maketitle + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi \else - \twocolumn[\@maketitle]% - \fi - \else \newpage - \global\@topnum\z@ % Prevents figures from going at top of page. - \@maketitle - \fi - \thispagestyle{plain}\@thanks - \endgroup - \setcounter{footnote}{0}% - \global\let\thanks\relax - \global\let\maketitle\relax - \global\let\@maketitle\relax - \global\let\@thanks\@empty - \global\let\@author\@empty - \global\let\@date\@empty - \global\let\@title\@empty - \global\let\title\relax - \global\let\author\relax - \global\let\date\relax - \global\let\and\relax -} + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{plain}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax + } \def\@maketitle{% \newpage \null @@ -407,7 +407,7 @@ \item\relax} {\endlist} \if@compatibility -\newenvironment{titlepage} + \newenvironment{titlepage} {% \if@twocolumn \@restonecoltrue\onecolumn @@ -420,7 +420,7 @@ {\if@restonecol\twocolumn \else \newpage \fi } \else -\newenvironment{titlepage} + \newenvironment{titlepage} {% \if@twocolumn \@restonecoltrue\onecolumn diff --git a/Master/texmf-dist/tex/latex/base/ascii.def b/Master/texmf-dist/tex/latex/base/ascii.def index fdedbdf44bb..ad9dabcaf17 100644 --- a/Master/texmf-dist/tex/latex/base/ascii.def +++ b/Master/texmf-dist/tex/latex/base/ascii.def @@ -44,7 +44,7 @@ \ProvidesFile{ascii.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \@inpenc@test \endinput %% diff --git a/Master/texmf-dist/tex/latex/base/atbegshi-ltx.sty b/Master/texmf-dist/tex/latex/base/atbegshi-ltx.sty new file mode 100644 index 00000000000..db9ebd43b60 --- /dev/null +++ b/Master/texmf-dist/tex/latex/base/atbegshi-ltx.sty @@ -0,0 +1,76 @@ +%% +%% This is file `atbegshi-ltx.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ltshipout.dtx (with options: `atbegshi-ltx') +%% +%% This is a generated file. +%% +%% The source is maintained by the LaTeX Project team and bug +%% reports for it can be opened at https://latex-project.org/bugs.html +%% (but please observe conditions on bug reports sent to that address!) +%% +%% +%% Copyright (C) 1993-2020 +%% The LaTeX3 Project and any individual authors listed elsewhere +%% in this file. +%% +%% This file was generated from file(s) of the LaTeX base system. +%% -------------------------------------------------------------- +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% 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 2008 or later. +%% +%% This file has the LPPL maintenance status "maintained". +%% +%% This file may only be distributed together with a copy of the LaTeX +%% base system. You may however distribute the LaTeX base system without +%% such generated files. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.txt'. See also `legal.txt' for additional +%% information. +%% +%% The list of derived (unpacked) files belonging to the distribution +%% and covered by LPPL is defined by the unpacking scripts (with +%% extension .ins) which are part of the distribution. +%% +%% File: ltshipout.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team +%% +%%% From File: ltshipout.dtx +\providecommand\ltshipoutversion{v1.0c} +\providecommand\ltshipoutdate{2020/09/27} +\ProvidesPackage{atbegshi-ltx} + [2020/08/17 v1.0a + Emulation of the original atbegshi package^^Jwith kernel methods] +\let \AtBeginShipoutBox \ShipoutBox +\let \AtBeginShipoutInit \@empty +\protected \def \AtBeginShipout {\AddToHook{shipout/before}} +\protected \def \AtBeginShipoutNext {\AddToHookNext{shipout/before}} +\protected \def \AtBeginShipoutFirst + {\@expl@@@shipout@add@firstpage@material@@Nn \AtBeginShipoutFirst} +\let \AtBeginShipoutDiscard \DiscardShipoutBox +\let \AtBeginShipoutAddToBox + \@expl@@@shipout@add@background@box@@n +\let \AtBeginShipoutAddToBoxForeground + \@expl@@@shipout@add@foreground@box@@n +\let \AtBeginShipoutUpperLeft + \@expl@@@shipout@add@background@picture@@n +\let \AtBeginShipoutUpperLeftForeground + \@expl@@@shipout@add@foreground@picture@@n +\ExplSyntaxOn +\cs_new:Npn \ShipoutBoxHeight { \dim_use:N \l_shipout_box_ht_dim } +\cs_new:Npn \ShipoutBoxDepth { \dim_use:N \l_shipout_box_dp_dim } +\cs_new:Npn \ShipoutBoxWidth { \dim_use:N \l_shipout_box_wd_dim } +\ExplSyntaxOff +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\endinput +%% +%% End of file `atbegshi-ltx.sty'. diff --git a/Master/texmf-dist/tex/latex/base/atveryend-ltx.sty b/Master/texmf-dist/tex/latex/base/atveryend-ltx.sty new file mode 100644 index 00000000000..87e7ae35868 --- /dev/null +++ b/Master/texmf-dist/tex/latex/base/atveryend-ltx.sty @@ -0,0 +1,68 @@ +%% +%% This is file `atveryend-ltx.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ltfilehook.dtx (with options: `atveryend-ltx') +%% +%% This is a generated file. +%% +%% The source is maintained by the LaTeX Project team and bug +%% reports for it can be opened at https://latex-project.org/bugs.html +%% (but please observe conditions on bug reports sent to that address!) +%% +%% +%% Copyright (C) 1993-2020 +%% The LaTeX3 Project and any individual authors listed elsewhere +%% in this file. +%% +%% This file was generated from file(s) of the LaTeX base system. +%% -------------------------------------------------------------- +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% 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 2008 or later. +%% +%% This file has the LPPL maintenance status "maintained". +%% +%% This file may only be distributed together with a copy of the LaTeX +%% base system. You may however distribute the LaTeX base system without +%% such generated files. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.txt'. See also `legal.txt' for additional +%% information. +%% +%% The list of derived (unpacked) files belonging to the distribution +%% and covered by LPPL is defined by the unpacking scripts (with +%% extension .ins) which are part of the distribution. +%% +%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach, +%% Phelype Oleinik & LaTeX Team +%%% From File: ltfilehook.dtx +\providecommand\ltfilehookversion{v1.0b} +\providecommand\ltfilehookdate{2020/09/26} +\ProvidesPackage{atveryend-ltx} + [2020/08/19 v1.0a + Emulation of the original atvery package^^Jwith kernel methods] +\newcommand\AfterLastShipout {\AddToHook{enddocument/afterlastpage}} +\newcommand\AtVeryEndDocument {\AddToHook{enddocument/afteraux}} +\newcommand\AtEndAfterFileList{\AddToHook{enddocument/info}} +\newcommand\AtVeryVeryEnd {\AddToHook{enddocument/end}} +\ExplSyntaxOn +\newcommand\BeforeClearDocument[1] + { \AtEndDocument{#1} + \atveryend@DEPRECATED{BeforeClearDocument \tl_to_str:n{#1}} + } +\cs_new:Npn\atveryend@DEPRECATED #1 + {\iow_term:x{======~DEPRECATED~USAGE~#1~==========}} +\ExplSyntaxOff +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\endinput +%% +%% End of file `atveryend-ltx.sty'. diff --git a/Master/texmf-dist/tex/latex/base/bk10.clo b/Master/texmf-dist/tex/latex/base/bk10.clo index 944d2f09543..da26bc70cf8 100644 --- a/Master/texmf-dist/tex/latex/base/bk10.clo +++ b/Master/texmf-dist/tex/latex/base/bk10.clo @@ -42,7 +42,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. \ProvidesFile{bk10.clo} - [2019/12/20 v1.4l + [2020/04/10 v1.4m Standard LaTeX file (size option)] \renewcommand\normalsize{% \@setfontsize\normalsize\@xpt\@xiipt @@ -97,7 +97,7 @@ \setlength\topskip {10\p@} \setlength\footskip{.35in} \if@compatibility \setlength\maxdepth{4\p@} \else -\setlength\maxdepth{.5\topskip} \fi + \setlength\maxdepth{.5\topskip} \fi \if@compatibility \if@twocolumn \setlength\textwidth{410\p@} @@ -137,7 +137,7 @@ \fi \addtolength\textheight{\topskip} \if@twocolumn - \setlength\marginparsep {10\p@} + \setlength\marginparsep {10\p@} \else \setlength\marginparsep{7\p@} \fi diff --git a/Master/texmf-dist/tex/latex/base/bk11.clo b/Master/texmf-dist/tex/latex/base/bk11.clo index 9baaf6777cc..106db675aa6 100644 --- a/Master/texmf-dist/tex/latex/base/bk11.clo +++ b/Master/texmf-dist/tex/latex/base/bk11.clo @@ -42,7 +42,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. \ProvidesFile{bk11.clo} - [2019/12/20 v1.4l + [2020/04/10 v1.4m Standard LaTeX file (size option)] \renewcommand\normalsize{% \@setfontsize\normalsize\@xipt{13.6}% @@ -97,7 +97,7 @@ \setlength\topskip {11\p@} \setlength\footskip{.38in} \if@compatibility \setlength\maxdepth{4\p@} \else -\setlength\maxdepth{.5\topskip} \fi + \setlength\maxdepth{.5\topskip} \fi \if@compatibility \if@twocolumn \setlength\textwidth{410\p@} @@ -137,7 +137,7 @@ \fi \addtolength\textheight{\topskip} \if@twocolumn - \setlength\marginparsep {10\p@} + \setlength\marginparsep {10\p@} \else \setlength\marginparsep{7\p@} \fi diff --git a/Master/texmf-dist/tex/latex/base/bk12.clo b/Master/texmf-dist/tex/latex/base/bk12.clo index a395ceda8ff..1f6bc54528b 100644 --- a/Master/texmf-dist/tex/latex/base/bk12.clo +++ b/Master/texmf-dist/tex/latex/base/bk12.clo @@ -42,7 +42,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. \ProvidesFile{bk12.clo} - [2019/12/20 v1.4l + [2020/04/10 v1.4m Standard LaTeX file (size option)] \renewcommand\normalsize{% \@setfontsize\normalsize\@xiipt{14.5}% @@ -97,7 +97,7 @@ \setlength\topskip {12\p@} \setlength\footskip{30\p@} \if@compatibility \setlength\maxdepth{4\p@} \else -\setlength\maxdepth{.5\topskip} \fi + \setlength\maxdepth{.5\topskip} \fi \if@compatibility \if@twocolumn \setlength\textwidth{410\p@} @@ -137,7 +137,7 @@ \fi \addtolength\textheight{\topskip} \if@twocolumn - \setlength\marginparsep {10\p@} + \setlength\marginparsep {10\p@} \else \setlength\marginparsep{7\p@} \fi diff --git a/Master/texmf-dist/tex/latex/base/book.cls b/Master/texmf-dist/tex/latex/base/book.cls index ee6cf9119f1..04ab96f3a11 100644 --- a/Master/texmf-dist/tex/latex/base/book.cls +++ b/Master/texmf-dist/tex/latex/base/book.cls @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{book} - [2019/12/20 v1.4l + [2020/04/10 v1.4m Standard LaTeX document class] \newcommand\@ptsize{} \newif\if@restonecol @@ -52,47 +52,47 @@ \newif\if@openright \newif\if@mainmatter \@mainmattertrue \if@compatibility\else -\DeclareOption{a4paper} - {\setlength\paperheight {297mm}% - \setlength\paperwidth {210mm}} -\DeclareOption{a5paper} - {\setlength\paperheight {210mm}% - \setlength\paperwidth {148mm}} -\DeclareOption{b5paper} - {\setlength\paperheight {250mm}% - \setlength\paperwidth {176mm}} -\DeclareOption{letterpaper} - {\setlength\paperheight {11in}% - \setlength\paperwidth {8.5in}} -\DeclareOption{legalpaper} - {\setlength\paperheight {14in}% - \setlength\paperwidth {8.5in}} -\DeclareOption{executivepaper} - {\setlength\paperheight {10.5in}% - \setlength\paperwidth {7.25in}} -\DeclareOption{landscape} - {\setlength\@tempdima {\paperheight}% - \setlength\paperheight {\paperwidth}% - \setlength\paperwidth {\@tempdima}} + \DeclareOption{a4paper} + {\setlength\paperheight {297mm}% + \setlength\paperwidth {210mm}} + \DeclareOption{a5paper} + {\setlength\paperheight {210mm}% + \setlength\paperwidth {148mm}} + \DeclareOption{b5paper} + {\setlength\paperheight {250mm}% + \setlength\paperwidth {176mm}} + \DeclareOption{letterpaper} + {\setlength\paperheight {11in}% + \setlength\paperwidth {8.5in}} + \DeclareOption{legalpaper} + {\setlength\paperheight {14in}% + \setlength\paperwidth {8.5in}} + \DeclareOption{executivepaper} + {\setlength\paperheight {10.5in}% + \setlength\paperwidth {7.25in}} + \DeclareOption{landscape} + {\setlength\@tempdima {\paperheight}% + \setlength\paperheight {\paperwidth}% + \setlength\paperwidth {\@tempdima}} \fi \if@compatibility \renewcommand\@ptsize{0} \else -\DeclareOption{10pt}{\renewcommand\@ptsize{0}} + \DeclareOption{10pt}{\renewcommand\@ptsize{0}} \fi \DeclareOption{11pt}{\renewcommand\@ptsize{1}} \DeclareOption{12pt}{\renewcommand\@ptsize{2}} \if@compatibility\else -\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} + \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} \fi \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} \DeclareOption{draft}{\setlength\overfullrule{5pt}} \if@compatibility\else -\DeclareOption{final}{\setlength\overfullrule{0pt}} + \DeclareOption{final}{\setlength\overfullrule{0pt}} \fi \DeclareOption{titlepage}{\@titlepagetrue} \if@compatibility\else -\DeclareOption{notitlepage}{\@titlepagefalse} + \DeclareOption{notitlepage}{\@titlepagefalse} \fi \if@compatibility \@openrighttrue @@ -101,20 +101,20 @@ \DeclareOption{openany}{\@openrightfalse} \fi \if@compatibility\else -\DeclareOption{onecolumn}{\@twocolumnfalse} + \DeclareOption{onecolumn}{\@twocolumnfalse} \fi \DeclareOption{twocolumn}{\@twocolumntrue} \DeclareOption{leqno}{\input{leqno.clo}} \DeclareOption{fleqn}{\input{fleqn.clo}} \DeclareOption{openbib}{% \AtEndOfPackage{% - \renewcommand\@openbib@code{% + \renewcommand\@openbib@code{% \advance\leftmargin\bibindent \itemindent -\bibindent \listparindent \itemindent \parsep \z@ }% - \renewcommand\newblock{\par}}% + \renewcommand\newblock{\par}}% } \ExecuteOptions{letterpaper,10pt,twoside,onecolumn,final,openright} \ProcessOptions @@ -178,7 +178,7 @@ \let\chaptermark\@gobble \let\sectionmark\@gobble } - \if@titlepage +\if@titlepage \newcommand\maketitle{\begin{titlepage}% \let\footnotesize\small \let\footnoterule\relax @@ -210,41 +210,41 @@ \global\let\author\relax \global\let\date\relax \global\let\and\relax -} + } \else -\newcommand\maketitle{\par - \begingroup - \renewcommand\thefootnote{\@fnsymbol\c@footnote}% - \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% - \long\def\@makefntext##1{\parindent 1em\noindent - \hb@xt@1.8em{% + \newcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% - \if@twocolumn - \ifnum \col@number=\@ne - \@maketitle + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi \else - \twocolumn[\@maketitle]% - \fi - \else \newpage - \global\@topnum\z@ % Prevents figures from going at top of page. - \@maketitle - \fi - \thispagestyle{plain}\@thanks - \endgroup - \setcounter{footnote}{0}% - \global\let\thanks\relax - \global\let\maketitle\relax - \global\let\@maketitle\relax - \global\let\@thanks\@empty - \global\let\@author\@empty - \global\let\@date\@empty - \global\let\@title\@empty - \global\let\title\relax - \global\let\author\relax - \global\let\date\relax - \global\let\and\relax -} + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{plain}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax + } \def\@maketitle{% \newpage \null @@ -486,7 +486,7 @@ \item\relax} {\endlist} \if@compatibility -\newenvironment{titlepage} + \newenvironment{titlepage} {% \cleardoublepage \if@twocolumn @@ -500,7 +500,7 @@ {\if@restonecol\twocolumn \else \newpage \fi } \else -\newenvironment{titlepage} + \newenvironment{titlepage} {% \cleardoublepage \if@twocolumn diff --git a/Master/texmf-dist/tex/latex/base/cp1250.def b/Master/texmf-dist/tex/latex/base/cp1250.def index 77385c63f9e..5abb61b3474 100644 --- a/Master/texmf-dist/tex/latex/base/cp1250.def +++ b/Master/texmf-dist/tex/latex/base/cp1250.def @@ -44,7 +44,7 @@ \ProvidesFile{cp1250.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textcurrency} {\TextSymbolUnavailable\textcurrency} diff --git a/Master/texmf-dist/tex/latex/base/cp1252.def b/Master/texmf-dist/tex/latex/base/cp1252.def index 9d6cc6e6bd7..030e195b356 100644 --- a/Master/texmf-dist/tex/latex/base/cp1252.def +++ b/Master/texmf-dist/tex/latex/base/cp1252.def @@ -44,7 +44,7 @@ \ProvidesFile{cp1252.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}} \ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}} diff --git a/Master/texmf-dist/tex/latex/base/cp1257.def b/Master/texmf-dist/tex/latex/base/cp1257.def index 7aab61dbafb..c43fdccd075 100644 --- a/Master/texmf-dist/tex/latex/base/cp1257.def +++ b/Master/texmf-dist/tex/latex/base/cp1257.def @@ -44,7 +44,7 @@ \ProvidesFile{cp1257.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}} \ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}} diff --git a/Master/texmf-dist/tex/latex/base/cp437.def b/Master/texmf-dist/tex/latex/base/cp437.def index d7ffdf20abd..27acacdec92 100644 --- a/Master/texmf-dist/tex/latex/base/cp437.def +++ b/Master/texmf-dist/tex/latex/base/cp437.def @@ -44,7 +44,7 @@ \ProvidesFile{cp437.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textflorin}{\textit{f}} \ProvideTextCommandDefault{\textpeseta}{Pt} diff --git a/Master/texmf-dist/tex/latex/base/cp437de.def b/Master/texmf-dist/tex/latex/base/cp437de.def index 7d014543bf0..ae78fc6d6ce 100644 --- a/Master/texmf-dist/tex/latex/base/cp437de.def +++ b/Master/texmf-dist/tex/latex/base/cp437de.def @@ -44,7 +44,7 @@ \ProvidesFile{cp437de.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textflorin}{\textit{f}} \ProvideTextCommandDefault{\textpeseta}{Pt} diff --git a/Master/texmf-dist/tex/latex/base/cp850.def b/Master/texmf-dist/tex/latex/base/cp850.def index 0d052ec0a36..d138dd3790a 100644 --- a/Master/texmf-dist/tex/latex/base/cp850.def +++ b/Master/texmf-dist/tex/latex/base/cp850.def @@ -44,7 +44,7 @@ \ProvidesFile{cp850.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] %% %% If you need a Euro symbol, try cp858 instead. %% diff --git a/Master/texmf-dist/tex/latex/base/cp852.def b/Master/texmf-dist/tex/latex/base/cp852.def index 17723bc6b1d..2878f5b1a2e 100644 --- a/Master/texmf-dist/tex/latex/base/cp852.def +++ b/Master/texmf-dist/tex/latex/base/cp852.def @@ -44,7 +44,7 @@ \ProvidesFile{cp852.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}} \ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}} diff --git a/Master/texmf-dist/tex/latex/base/cp858.def b/Master/texmf-dist/tex/latex/base/cp858.def index 44e1d84aad6..d159c74c35d 100644 --- a/Master/texmf-dist/tex/latex/base/cp858.def +++ b/Master/texmf-dist/tex/latex/base/cp858.def @@ -44,7 +44,7 @@ \ProvidesFile{cp858.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}} \ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}} diff --git a/Master/texmf-dist/tex/latex/base/cp865.def b/Master/texmf-dist/tex/latex/base/cp865.def index 2ce27481a70..a4cb3dda881 100644 --- a/Master/texmf-dist/tex/latex/base/cp865.def +++ b/Master/texmf-dist/tex/latex/base/cp865.def @@ -44,7 +44,7 @@ \ProvidesFile{cp865.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textflorin}{\textit{f}} \ProvideTextCommandDefault{\textpeseta}{Pt} diff --git a/Master/texmf-dist/tex/latex/base/decmulti.def b/Master/texmf-dist/tex/latex/base/decmulti.def index b7b98db366b..65c867a1773 100644 --- a/Master/texmf-dist/tex/latex/base/decmulti.def +++ b/Master/texmf-dist/tex/latex/base/decmulti.def @@ -44,7 +44,7 @@ \ProvidesFile{decmulti.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}} \ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}} diff --git a/Master/texmf-dist/tex/latex/base/doc.sty b/Master/texmf-dist/tex/latex/base/doc.sty index 94b1a9754f2..417340cebc9 100644 --- a/Master/texmf-dist/tex/latex/base/doc.sty +++ b/Master/texmf-dist/tex/latex/base/doc.sty @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. \NeedsTeXFormat{LaTeX2e}[1994/12/01] \ProvidesPackage{doc} - [2019/12/16 v2.1l + [2020/06/15 v2.1m Standard LaTeX documentation package (FMi)] %% %% Package `doc' to use with LaTeX 2e @@ -59,6 +59,7 @@ \@beginparpenalty \predisplaypenalty \if@inlabel\leavevmode\fi \trivlist \parskip \z@ \item[]% + \global\setbox\@labels\box\voidb@x \macro@font \leftskip\@totalleftmargin \advance\leftskip\MacroIndent \rightskip\z@ \parindent\z@ \parfillskip\@flushglue diff --git a/Master/texmf-dist/tex/latex/base/docstrip.tex b/Master/texmf-dist/tex/latex/base/docstrip.tex index feb04768b2c..e670198de27 100644 --- a/Master/texmf-dist/tex/latex/base/docstrip.tex +++ b/Master/texmf-dist/tex/latex/base/docstrip.tex @@ -44,9 +44,9 @@ \catcode`\{=1 \catcode`\}=2 \def\filename{docstrip.dtx} -\def\fileversion{2.5g} -\def\filedate{2018/05/03} -\def\docdate {2018/05/03} +\def\fileversion{v2.6a} +\def\filedate{2020-07-07} +\def\docdate {2020-07-11} %% %% The docstrip program for use with TeX. %% Copyright (C) 1989-1991 Frank Mittelbach @@ -54,7 +54,7 @@ %% Frank Mittelbach %% Copyright (C) 1995 Marcin Woli\'nski %% Copyright (C) 1996-1997 Mark Wooding, Marcin Woli\'nski -%% Copyright (C) 1998-2003 LaTeX3 project and the above authors +%% Copyright (C) 1998-2020 LaTeX3 project and the above authors %% All rights are reserved. %% \catcode`\Z=\catcode`\% @@ -219,13 +219,18 @@ Z \bgroup\edef\x{\egroup \def\noexpand\@stripstr\string\s@{}} \x +\def\quote@name#1{"\quote@@name#1\@gobble""} +\def\quote@@name#1"{#1\quote@@name} \chardef\stream@closed=16 \def\StreamOpen#1{% \chardef#1=\stream@closed \def\s@do##1{\ifnum##1=0 \chardef#1=\expandafter\@stripstr\string##1 % \global\chardef##1=1 % - \immediate\openout#1=\csname pth@\@stripstring#1\endcsname % + \edef\q@curr@file{% + \expandafter\expandafter\expandafter\quote@name + \expandafter\expandafter\expandafter{\csname pth@\@stripstring#1\endcsname}} + \immediate\openout#1=\q@curr@file\relax \@streamfound \fi} \@outputstreams @@ -351,6 +356,7 @@ Z \advance\codeLinesPassed\@ne \maybeMsg{.}% \def\inLine{#1}% + \replaceModuleInLine \let\do\putline@do \activefiles } @@ -392,19 +398,23 @@ Z \ifcase \ifx*#10\else \ifx/#11\else \ifx+#12\else \ifx-#13\else - \ifx<#14\else 5\fi\fi\fi\fi\fi\relax + \ifx<#14\else \ifx @#15\else 6\fi\fi\fi\fi\fi\fi\relax \expandafter\starOption\or \expandafter\slashOption\or \expandafter\plusOption\or \expandafter\minusOption\or \expandafter\verbOption\or + \expandafter\moduleOption\or \expandafter\doOption\fi #1} \def\doOption#1>#2\endLine{% \maybeMsg{<#1 . >}% \Evaluate{#1}% \def\do##1##2##3{% - \if1\Expr{##2}\StreamPut##1{#2}\fi + \if1\Expr{##2}% + \def\inLine{#2}% + \replaceModuleInLine + \StreamPut##1{\inLine}\fi }% \activefiles } @@ -480,6 +490,38 @@ Z \repeat \maybeMsg{>}% }} +\def\moduleOption @@=#1>#2\endLine{% + \maybeMsg{<@@=#1>}% + \prepareActiveModule{#1}% +} +\begingroup + \catcode`\_ = 12 % + \long\gdef\prepareActiveModule#1{% + \ifx\relax#1\relax + \let\replaceModuleInLine\empty + \else + \edef\replaceModuleInLine{% + \noexpand\replaceAllIn\noexpand\inLine{@@@@}{\string aa}% + \noexpand\replaceAllIn\noexpand\inLine{__@@}{__#1}% + \noexpand\replaceAllIn\noexpand\inLine{_@@}{__#1}% + \noexpand\replaceAllIn\noexpand\inLine{@@}{__#1}% + \noexpand\replaceAllIn\noexpand\inLine{\string aa}{@@}% + }% + \fi + } +\endgroup +\let\replaceModuleInLine\empty +\long\def\replaceAllIn#1#2#3{% + \long\def\tempa##1##2#2{% + ##2\qMark\replaceAllInAuxIII#3##1% + }% + \edef#1{\expandafter\replaceAllInAuxI#1\qMark#2\qStop}% +} +\def\replaceAllInAuxI{% + \expandafter\replaceAllInAuxII\tempa\replaceAllInAuxI\empty +} +\long\def\replaceAllInAuxII#1\qMark#2{#1} +\long\def\replaceAllInAuxIII#1\qStop{} \def\generate#1{\begingroup \let\inputfiles\empty \let\filestogenerate\empty \let\file\@file diff --git a/Master/texmf-dist/tex/latex/base/everyshi-ltx.sty b/Master/texmf-dist/tex/latex/base/everyshi-ltx.sty new file mode 100644 index 00000000000..2be54dfdc71 --- /dev/null +++ b/Master/texmf-dist/tex/latex/base/everyshi-ltx.sty @@ -0,0 +1,68 @@ +%% +%% This is file `everyshi-ltx.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ltshipout.dtx (with options: `everyshi-ltx') +%% +%% This is a generated file. +%% +%% The source is maintained by the LaTeX Project team and bug +%% reports for it can be opened at https://latex-project.org/bugs.html +%% (but please observe conditions on bug reports sent to that address!) +%% +%% +%% Copyright (C) 1993-2020 +%% The LaTeX3 Project and any individual authors listed elsewhere +%% in this file. +%% +%% This file was generated from file(s) of the LaTeX base system. +%% -------------------------------------------------------------- +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% 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 2008 or later. +%% +%% This file has the LPPL maintenance status "maintained". +%% +%% This file may only be distributed together with a copy of the LaTeX +%% base system. You may however distribute the LaTeX base system without +%% such generated files. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.txt'. See also `legal.txt' for additional +%% information. +%% +%% The list of derived (unpacked) files belonging to the distribution +%% and covered by LPPL is defined by the unpacking scripts (with +%% extension .ins) which are part of the distribution. +%% +%% File: ltshipout.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team +%% +%%% From File: ltshipout.dtx +\providecommand\ltshipoutversion{v1.0c} +\providecommand\ltshipoutdate{2020/09/27} +\ProvidesPackage{everyshi-ltx} + [2020/08/17 v1.0a + Emulation of the original everyshi package^^Jwith kernel methods] +\protected \def \EveryShipout {\AddToHook{shipout/before}} +\protected \def \AtNextShipout {\AddToHookNext{shipout/before}} +%% +%% In normal circumstances the above emulation is sufficient and in +%% all known packages (we know of) that use everyshi it either works or +%% the packages have been adjusted. +%% +%% Code that directly manipulates box 255, however, might fail. +%% If that is the case look at the shipout hooks offered now as +%% they are normally sufficienct to avoid such minpulations (or +%% replace box 255 with \ShipoutBox in the code. +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\endinput +%% +%% End of file `everyshi-ltx.sty'. diff --git a/Master/texmf-dist/tex/latex/base/fleqn.clo b/Master/texmf-dist/tex/latex/base/fleqn.clo index 7ca8b2b5cfe..35900b21998 100644 --- a/Master/texmf-dist/tex/latex/base/fleqn.clo +++ b/Master/texmf-dist/tex/latex/base/fleqn.clo @@ -45,7 +45,7 @@ \ProvidesFile{fleqn.clo} [2016/12/29 v1.2b Standard LaTeX option (flush left equations)] -\newdimen\mathindent +\newskip\mathindent \AtEndOfClass{\mathindent\leftmargini} \IncludeInRelease{2015/01/01}{\[}{Make \[ robust}% \DeclareRobustCommand\[{\relax @@ -97,7 +97,7 @@ \hb@xt@\linewidth\bgroup $\m@th% $ \displaystyle \hskip\mathindent}% - {$\hfil % $ + {$\hskip .3em minus.3em\hfil % $ \displaywidth\linewidth\hbox{\@eqnnum}% \egroup \endtrivlist} diff --git a/Master/texmf-dist/tex/latex/base/fontenc.sty b/Master/texmf-dist/tex/latex/base/fontenc.sty index 85d45461b2b..e59f6c80f54 100644 --- a/Master/texmf-dist/tex/latex/base/fontenc.sty +++ b/Master/texmf-dist/tex/latex/base/fontenc.sty @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. %%% From File: ltoutenc.dtx \ProvidesPackage{fontenc} - [2020/02/11 v2.0o + [2020/08/10 v2.0s Standard LaTeX package] \def\update@uclc@with@cyrillic{% \expandafter\def\expandafter\@uclclist\expandafter diff --git a/Master/texmf-dist/tex/latex/base/fontmath.cfg b/Master/texmf-dist/tex/latex/base/fontmath.cfg index 0ced57368ab..533c95e3b97 100644 --- a/Master/texmf-dist/tex/latex/base/fontmath.cfg +++ b/Master/texmf-dist/tex/latex/base/fontmath.cfg @@ -37,7 +37,7 @@ %% %%% From File: fontdef.dtx \ProvidesFile{fontmath.cfg} - [2020/02/11 v3.0g LaTeX Kernel + [2020/08/01 v3.0i LaTeX Kernel (Uncustomised math font setup)] %% diff --git a/Master/texmf-dist/tex/latex/base/fontmath.ltx b/Master/texmf-dist/tex/latex/base/fontmath.ltx index 008e3dfa85a..003df16621e 100644 --- a/Master/texmf-dist/tex/latex/base/fontmath.ltx +++ b/Master/texmf-dist/tex/latex/base/fontmath.ltx @@ -37,7 +37,7 @@ %% %%% From File: fontdef.dtx \ProvidesFile{fontmath.ltx} - [2020/02/11 v3.0g LaTeX Kernel + [2020/08/01 v3.0i LaTeX Kernel (Math font setup)] \typeout{=== Don't modify this file, use a .cfg file instead ===^^J} diff --git a/Master/texmf-dist/tex/latex/base/fonttext.cfg b/Master/texmf-dist/tex/latex/base/fonttext.cfg index cccff529eb8..e404b80e993 100644 --- a/Master/texmf-dist/tex/latex/base/fonttext.cfg +++ b/Master/texmf-dist/tex/latex/base/fonttext.cfg @@ -37,7 +37,7 @@ %% %%% From File: fontdef.dtx \ProvidesFile{fonttext.cfg} - [2020/02/11 v3.0g LaTeX Kernel + [2020/08/01 v3.0i LaTeX Kernel (Uncustomised text font setup)] %% diff --git a/Master/texmf-dist/tex/latex/base/fonttext.ltx b/Master/texmf-dist/tex/latex/base/fonttext.ltx index ab8e0d2c9c8..24d26fe9492 100644 --- a/Master/texmf-dist/tex/latex/base/fonttext.ltx +++ b/Master/texmf-dist/tex/latex/base/fonttext.ltx @@ -37,7 +37,7 @@ %% %%% From File: fontdef.dtx \ProvidesFile{fonttext.ltx} - [2020/02/11 v3.0g LaTeX Kernel + [2020/08/01 v3.0i LaTeX Kernel (Text font setup)] \typeout{=== Don't modify this file, use a .cfg file instead ===^^J} @@ -46,7 +46,7 @@ \input {ot1enc.def} \input {t1enc.def} \input{ts1enc.def} -\ifx\Umathchar\@undefined +\ifx\Umathcode\@undefined \fontencoding{OT1} \def\@fontenc@load@list{\@elt{T1,OT1}} \def\rmsubstdefault{cmr} @@ -81,7 +81,7 @@ \input {ot1cmtt.fd} \endgroup \DeclareErrorFont{OT1}{cmr}{m}{n}{10} -\ifx\Umathchar\@undefined +\ifx\Umathcode\@undefined \newcommand\encodingdefault{OT1} \newcommand\rmdefault{cmr} \newcommand\sfdefault{cmss} @@ -93,15 +93,18 @@ \newcommand\sfdefault{lmss} \newcommand\ttdefault{lmtt} \fi -\newcommand\bfdefault{b} % overwritten below -\newcommand\mddefault{m} +\newcommand\bfdefault{b} % overwritten below (for rollback) +\newcommand\mddefault{m} % overwritten below (for rollback) \newcommand\itdefault{it} \newcommand\sldefault{sl} \newcommand\scdefault{sc} -\newcommand\updefault{up} % overwritten below +\newcommand\updefault{up} % overwritten below (for rollback) \renewcommand\updefault{up} -\renewcommand\bfdefault{b} +\renewcommand\bfdefault{b\@empty} +\renewcommand\mddefault{m\@empty} +\let\bfdefault@previous\bfdefault +\let\mddefault@previous\mddefault \newcommand\familydefault{\rmdefault} \newcommand\seriesdefault{\mddefault} \newcommand\shapedefault{n} diff --git a/Master/texmf-dist/tex/latex/base/inputenc.sty b/Master/texmf-dist/tex/latex/base/inputenc.sty index fc59f521002..a8c8ab69b1c 100644 --- a/Master/texmf-dist/tex/latex/base/inputenc.sty +++ b/Master/texmf-dist/tex/latex/base/inputenc.sty @@ -45,7 +45,7 @@ \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{inputenc} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \def\DeclareInputMath#1{% \@inpenc@test \bgroup @@ -71,7 +71,7 @@ \noexpand\IeC \fi } -\ifx\Umathchar\@undefined +\ifx\Umathcode\@undefined \def\inputencoding#1{% \edef\reserved@a{#1}% \ifx\reserved@a\inputencodingname diff --git a/Master/texmf-dist/tex/latex/base/latex.ltx b/Master/texmf-dist/tex/latex/base/latex.ltx index 4b3cccd20d1..ecf6c5e1518 100644 --- a/Master/texmf-dist/tex/latex/base/latex.ltx +++ b/Master/texmf-dist/tex/latex/base/latex.ltx @@ -7,7 +7,10 @@ %% ltdirchk.dtx (with options: `initex,2ekernel,dircheck') %% ltplain.dtx (with options: `2ekernel') %% ltvers.dtx (with options: `2ekernel') +%% ltluatex.dtx (with options: `2ekernel') +%% ltexpl.dtx (with options: `2ekernel') %% ltdefns.dtx (with options: `2ekernel') +%% lthooks.dtx (with options: `2ekernel') %% ltalloc.dtx (with options: `2ekernel') %% ltcntrl.dtx (with options: `2ekernel') %% lterror.dtx (with options: `2ekernel') @@ -39,9 +42,10 @@ %% ltidxglo.dtx (with options: `2ekernel') %% ltbibl.dtx (with options: `2ekernel') %% ltpage.dtx (with options: `2ekernel') -%% ltoutput.dtx (with options: `2ekernel') %% ltclass.dtx (with options: `2ekernel,tracerollback') -%% ltluatex.dtx (with options: `2ekernel') +%% ltfilehook.dtx (with options: `2ekernel') +%% ltshipout.dtx (with options: `2ekernel') +%% ltoutput.dtx (with options: `2ekernel') %% ltfinal.dtx (with options: `2ekernel') %% %% This is a generated file. @@ -432,11 +436,7 @@ \extrafloats\expandafter{\numexpr#1-1\relax}% \fi}% \fi -\def\alloc@#1#2#3#4#5{\global\advance\count1#1\@ne - \ch@ck#1#4#2% - \allocationnumber\count1#1% - \global#3#5\allocationnumber - \wlog{\string#5=\string#2\the\allocationnumber}} +\def\alloc@#1#2#3#4{\e@alloc#2#3{\count1#1}#4\float@count} \ifx\numexpr\@undefined \def\newinsert#1{\global\advance\insc@unt \m@ne \ch@ck0\insc@unt\count @@ -709,8 +709,8 @@ %%% From File: ltvers.dtx \def\fmtname{LaTeX2e} \edef\fmtversion - {2020-02-02} -\def\patch@level{5} + {2020-10-01} +\def\patch@level{0} \edef\development@branch@name{} \iffalse \def\reserved@a#1/#2/#3\@nil{% @@ -808,10 +808,272 @@ \ifx\@check@IncludeInRelease#2\else \PackageError{latexrelease}{skipped IncludeInRelease for tag \string#2}{}% \fi} +%%% From File: ltluatex.dtx +\ifx\directlua\@undefined\else +\ifnum\luatexversion<60 % + \wlog{***************************************************} + \wlog{* LuaTeX version too old for ltluatex support *} + \wlog{***************************************************} + \expandafter\endinput +\fi +\long\def\@gobble#1{} +\long\def\@firstofone#1{#1} +\ifx\e@alloc@attribute@count\@undefined + \countdef\e@alloc@attribute@count=258 + \e@alloc@attribute@count=\z@ +\fi +\def\newattribute#1{% + \e@alloc\attribute\attributedef + \e@alloc@attribute@count\m@ne\e@alloc@top#1% +} +\def\setattribute#1#2{#1=\numexpr#2\relax} +\def\unsetattribute#1{#1=-"7FFFFFFF\relax} +\ifx\e@alloc@ccodetable@count\@undefined + \countdef\e@alloc@ccodetable@count=259 + \e@alloc@ccodetable@count=\z@ +\fi +\def\newcatcodetable#1{% + \e@alloc\catcodetable\chardef + \e@alloc@ccodetable@count\m@ne{"8000}#1% + \initcatcodetable\allocationnumber +} +\newcatcodetable\catcodetable@initex +\newcatcodetable\catcodetable@string +\begingroup + \def\setrangecatcode#1#2#3{% + \ifnum#1>#2 % + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi + {% + \catcode#1=#3 % + \expandafter\setrangecatcode\expandafter + {\number\numexpr#1 + 1\relax}{#2}{#3} + }% + } + \@firstofone{% + \catcodetable\catcodetable@initex + \catcode0=12 % + \catcode13=12 % + \catcode37=12 % + \setrangecatcode{65}{90}{12}% + \setrangecatcode{97}{122}{12}% + \catcode92=12 % + \catcode127=12 % + \savecatcodetable\catcodetable@string + \endgroup + }% +\newcatcodetable\catcodetable@latex +\newcatcodetable\catcodetable@atletter +\begingroup + \def\parseunicodedataI#1;#2;#3;#4\relax{% + \parseunicodedataII#1;#3;#2 First>\relax + }% + \def\parseunicodedataII#1;#2;#3 First>#4\relax{% + \ifx\relax#4\relax + \expandafter\parseunicodedataIII + \else + \expandafter\parseunicodedataIV + \fi + {#1}#2\relax% + }% + \def\parseunicodedataIII#1#2#3\relax{% + \ifnum 0% + \if L#21\fi + \if M#21\fi + >0 % + \catcode"#1=11 % + \fi + }% + \def\parseunicodedataIV#1#2#3\relax{% + \read\unicoderead to \unicodedataline + \if L#2% + \count0="#1 % + \expandafter\parseunicodedataV\unicodedataline\relax + \fi + }% + \def\parseunicodedataV#1;#2\relax{% + \loop + \unless\ifnum\count0>"#1 % + \catcode\count0=11 % + \advance\count0 by 1 % + \repeat + }% + \def\storedpar{\par}% + \chardef\unicoderead=\numexpr\count16 + 1\relax + \openin\unicoderead=UnicodeData.txt % + \loop\unless\ifeof\unicoderead % + \read\unicoderead to \unicodedataline + \unless\ifx\unicodedataline\storedpar + \expandafter\parseunicodedataI\unicodedataline\relax + \fi + \repeat + \closein\unicoderead + \@firstofone{% + \catcode64=12 % + \savecatcodetable\catcodetable@latex + \catcode64=11 % + \savecatcodetable\catcodetable@atletter + } +\endgroup +\ifx\e@alloc@luafunction@count\@undefined + \countdef\e@alloc@luafunction@count=260 + \e@alloc@luafunction@count=\z@ +\fi +\def\newluafunction{% + \e@alloc\luafunction\e@alloc@chardef + \e@alloc@luafunction@count\m@ne\e@alloc@top +} +\ifx\e@alloc@whatsit@count\@undefined + \countdef\e@alloc@whatsit@count=261 + \e@alloc@whatsit@count=\z@ +\fi +\def\newwhatsit#1{% + \e@alloc\whatsit\e@alloc@chardef + \e@alloc@whatsit@count\m@ne\e@alloc@top#1% +} +\ifx\e@alloc@bytecode@count\@undefined + \countdef\e@alloc@bytecode@count=262 + \e@alloc@bytecode@count=\z@ +\fi +\def\newluabytecode#1{% + \e@alloc\luabytecode\e@alloc@chardef + \e@alloc@bytecode@count\m@ne\e@alloc@top#1% +} + +\ifx\e@alloc@luachunk@count\@undefined + \countdef\e@alloc@luachunk@count=263 + \e@alloc@luachunk@count=\z@ +\fi +\def\newluachunkname#1{% + \e@alloc\luachunk\e@alloc@chardef + \e@alloc@luachunk@count\m@ne\e@alloc@top#1% + {\escapechar\m@ne + \directlua{lua.name[\the\allocationnumber]="\string#1"}}% +} +\def\now@and@everyjob#1{% + \everyjob\expandafter{\the\everyjob + #1% + }% + #1% +} +\now@and@everyjob{% + \begingroup + \attributedef\attributezero=0 % + \chardef \charzero =0 % + \countdef \CountZero =0 % + \dimendef \dimenzero =0 % + \mathchardef \mathcharzero =0 % + \muskipdef \muskipzero =0 % + \skipdef \skipzero =0 % + \toksdef \tokszero =0 % + \directlua{require("ltluatex")} + \endgroup +} +\everyjob\expandafter{% + \the\everyjob + \directlua{% + if xpcall(function ()% + require('luaotfload-main')% + end,texio.write_nl) then % + local _void = luaotfload.main ()% + else % + texio.write_nl('Error in luaotfload: reverting to OT1')% + tex.print('\string\\def\string\\encodingdefault{OT1}')% + end % + }% + \let\f@encoding\encodingdefault + \expandafter\let\csname ver@luaotfload.sty\endcsname\fmtversion + } +\fi +%%% From File: ltexpl.dtx +\def\@expl@sys@load@backend@@{} +\def\@expl@push@filename@@{} +\def\@expl@push@filename@aux@@{} +\def\@expl@pop@filename@@{} +\def\@expl@finalise@setup@@{} +\long\def\@gobble#1{} +\long\def\@firstofone#1{#1} +\long\def\@firstoftwo#1#2{#1} +\long\def\@secondoftwo#1#2{#2} +\long\def\IfFileExists#1{% + \openin\@inputcheck"#1" % + \ifeof\@inputcheck + \expandafter\@secondoftwo + \else + \closein\@inputcheck + \expandafter\@firstoftwo + \fi} +\long\def\@ifnextchar#1#2#3{% + \let\reserved@d=#1% + \def\reserved@a{#2}% + \def\reserved@b{#3}% + \futurelet\@let@token\@ifnch} +\def\@ifnch{% + \ifx\@let@token\reserved@d + \expandafter\reserved@a + \else + \expandafter\reserved@b + \fi} +\expandafter\ifx\csname tex\string _let:D\endcsname\relax + \expandafter\@firstofone +\else + \GenericInfo{}{Skipping: expl3 code already part of the format}% + \expandafter\endinput +\fi + {% + \IfFileExists{expl3.ltx} + {% + \ifnum0% + \ifdefined\pdffilesize 1\fi + \ifdefined\filesize 1\fi + \ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi + \ifdefined\kanjiskip 1\fi + >0 % + \expandafter\@firstofone + \else + \def~{ }\def\MessageBreak{^^J~~~~~~~~~~~~~~~}% + \errmessage{LaTeX Error: + LaTeX requires the e-TeX primitives and additional\MessageBreak + functionality available in the engines:\MessageBreak + - pdfTeX v1.40\MessageBreak + - XeTeX v0.99992\MessageBreak + - LuaTeX v0.95\MessageBreak + - e-(u)pTeX mid-2012\MessageBreak + or later% + }\batchmode \read -1 to \reserved@a + \fi + } + {% + \errmessage{LaTeX requires expl3}% + \batchmode \read -1 to \reserved@a + }% + {% + \input expl3.ltx + \ifdefined\NewDocumentCommand + \else + \IfFileExists{xparse.ltx} + {\input xparse.ltx } + {}% + \fi + }% + } +\ExplSyntaxOn +\cs_gset_eq:NN \@expl@cs@to@str@@N \cs_to_str:N +\cs_gset_eq:NN \@expl@str@if@eq@@nnTF \str_if_eq:nnTF +\cs_gset_eq:NN \@expl@cs@prefix@spec@@N \cs_prefix_spec:N +\cs_gset_eq:NN \@expl@cs@argument@spec@@N \cs_argument_spec:N +\cs_gset_eq:NN \@expl@cs@replacement@spec@@N \cs_replacement_spec:N +\cs_gset_eq:NN \@expl@str@map@function@@NN \str_map_function:NN +\cs_gset_eq:NN \@expl@char@generate@@nn \char_generate:nn +\ExplSyntaxOff %%% From File: ltdefns.dtx \def\two@digits#1{\ifnum#1<10 0\fi\number#1} -\def\typeout#1{\begingroup\set@display@protect - \immediate\write\@unused{#1}\endgroup} +\protected\long\def\typeout#1{\begingroup + \set@display@protect + \def\par{^^J^^J}% + \immediate\write\@unused{#1}\endgroup} \newlinechar`\^^J \let\@@par=\par \let\@@hyph=\- @@ -845,7 +1107,7 @@ \def\@cons#1#2{\begingroup\let\@elt\relax\xdef#1{#1\@elt #2}\endgroup} \def\@car#1#2\@nil{#1} \def\@cdr#1#2\@nil{#2} -\def\@carcube#1#2#3#4\@nil{#1#2#3} +\long\def\@carcube#1#2#3#4\@nil{#1#2#3} \def\@preamblecmds{} \def\@onlypreamble#1{% \expandafter\gdef\expandafter\@preamblecmds\expandafter{% @@ -1053,6 +1315,8 @@ \def\restore@protect{\let\protect\@@protect} \set@typeset@protect \def\MakeRobust#1{% + \count@=\escapechar + \escapechar=`\\ \@ifundefined{\expandafter\@gobble\string#1}{% \@latex@error{The control sequence `\string#1' is undefined!% \MessageBreak There is nothing here to make robust}% @@ -1061,8 +1325,9 @@ {% \@ifundefined{\expandafter\@gobble\string#1\space}% {% - \global\expandafter\let\csname - \expandafter\@gobble\string#1\space\endcsname=#1% + \expandafter\@kernel@rename@newcommand + \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}% @@ -1074,19 +1339,183 @@ \csname\expandafter\@gobble\string#1\space\endcsname}% }% {\@latex@info{The control sequence `\string#1' is already robust}}% - }% + }% + \escapechar=\count@ }% - +\def\@kernel@rename@newcommand#1#2{% + \robust@command@chk@safe#2% + {\@if@newcommand#2% + {\afterassignment\global + \global\@copy@newcommand#1#2% + \global\let#2\@undefined + \global\expandafter\let\csname\string#2\endcsname\@undefined}% + {\global\let#1=#2}}% + {\global\let#1=#2}} \def\kernel@make@fragile#1{% \@ifundefined{\expandafter\@gobble\string#1\space}% {}% {% \global\expandafter\let\expandafter #1\csname - \expandafter\@gobble\string#1\space\endcsname + \expandafter\@gobble\string#1\space\endcsname + \expandafter\@kernel@rename@newcommand + \csname\expandafter\@gobble\string#1\expandafter\endcsname + \csname\expandafter\@gobble\string#1\space\endcsname \global\expandafter\let\csname - \expandafter\@gobble\string#1\space\endcsname\@undefined + \expandafter\@gobble\string#1\space\endcsname\@undefined }% } +\long\def\robust@command@act#1#2#3#4{% + \robust@command@chk@safe#2% + {\expandafter\robust@command@act@loop + \expandafter#2% + #1{\@nnil\@nnil}% + \robust@command@act@end}% + {\robust@command@act@end}% + {#3}{#4}}% +\long\def\robust@command@act@loop#1#2{\robust@command@act@loop@aux#1#2} +\long\def\robust@command@act@loop@aux#1#2#3{% + \ifx\@nnil#2% + \else + #2{#1}% + {\robust@command@act@do{#3}}% + {\expandafter\robust@command@act@loop\expandafter#1}% + \fi} +\long\def\robust@command@act@do#1% + \fi#2% + \robust@command@act@end#3#4{% + \fi + #1#4} +\long\def\robust@command@act@end#1#2{#1#2} +\long\def\robust@command@chk@safe#1{% + \begingroup + \escapechar=`\\ + \expandafter\endgroup\expandafter + \robust@command@act@chk@args\meaning#1:->\@nil} +\def\robust@command@act@chk@args#1:->#2\@nil{% + \@expl@str@if@eq@@nnTF{#1}{macro}% + {\@firstoftwo}% + {\@expl@str@if@eq@@nnTF{#1}{\protected macro}% + {\@firstoftwo}% + {\@secondoftwo}}} +\def\NewCommandCopy{% + \declare@commandcopy + {\@firstofone}% + {\@firstoftwo\@notdefinable}} +\def\RenewCommandCopy{% + \declare@commandcopy + {\@latex@error{Command \@backslashchar\reserved@a\space undefined}\@ehc + \@firstofone}% + {\@firstofone}} +\def\DeclareCommandCopy{% + \declare@commandcopy + {\@firstofone}% + {\@firstofone}} +\long\def\declare@commandcopy#1#2#3#4{% + \edef\reserved@a{\@expl@cs@to@str@@N#3}% + \@ifundefined\reserved@a{#1}{#2}% + {\robust@command@act + \@declarecommandcopylisthook#4% + \declare@commandcopy@let{#3#4}}} +\def\@declarecommandcopylisthook{% + {\@if@DeclareRobustCommand \@copy@DeclareRobustCommand}% + {\@if@newcommand \@copy@newcommand}} +\long\def\declare@commandcopy@let#1#2{\let#1=#2\relax} +\long\def\ShowCommand#1{% + \robust@command@act + \@showcommandlisthook#1% + \show#1} +\def\@showcommandlisthook{% + {\@if@DeclareRobustCommand \@show@DeclareRobustCommand}% + {\@if@newcommand \@show@newcommand}} +\long\def\@if@DeclareRobustCommand#1{% + \begingroup + \escapechar=`\\ + \edef\reserved@a{\string#1}% + \edef\reserved@b{\detokenize{#1}}% + \xdef\@gtempa{% + \ifx\reserved@a\reserved@b + \noexpand\x@protect + \noexpand#1% + \fi + \noexpand\protect + \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname}% + \endgroup + \ifx\@gtempa#1\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\long\def\@copy@DeclareRobustCommand#1#2{% + \begingroup + \escapechar=`\\ + \edef\reserved@a{\string#1}% + \edef\reserved@b{\detokenize{#1}}% + \edef\reserved@a{% + \endgroup + \def\noexpand#1{% + \ifx\reserved@a\reserved@b + \noexpand\x@protect + \noexpand#1% + \fi + \noexpand\protect + \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname}% + \noexpand\copy@kernel@robust@command + \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname + \expandafter\noexpand\csname\@expl@cs@to@str@@N#2 \endcsname}% + \reserved@a} +\long\def\copy@kernel@robust@command#1#2{% + \robust@command@chk@safe#2% + {\@if@newcommand#2% + {\@copy@newcommand}% + {\declare@commandcopy@let}} + {\declare@commandcopy@let}% + #1#2} +\long\def\@show@DeclareRobustCommand#1{% + \typeout{> \string#1=robust macro:}% + \typeout{->\@expl@cs@replacement@spec@@N#1.^^J}% + \expandafter\show@kernel@robust@command + \csname\@expl@cs@to@str@@N#1 \endcsname} +\long\def\show@kernel@robust@command#1{% + \robust@command@chk@safe#1% + {\@if@newcommand#1% + {\@show@newcommand}% + {\show}}% + {\show}% + #1} +\long\def\@if@newcommand#1{% + \edef\reserved@a{% + \noexpand\@protected@testopt + \noexpand#1% + \expandafter\noexpand\csname\@backslashchar\@expl@cs@to@str@@N#1\endcsname}% + \edef\reserved@b{% + \unexpanded\expandafter\expandafter\expandafter + {\expandafter\@carcube#1{}{}{}\@nil}}% + \ifx\reserved@a\reserved@b + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\long\def\@copy@newcommand#1#2{% + \edef#1{\noexpand\@protected@testopt + \noexpand#1% + \expandafter\noexpand\csname\@backslashchar\@expl@cs@to@str@@N#1\endcsname + \unexpanded\expandafter\expandafter\expandafter + {\expandafter\@gobblethree#2}}% + \expandafter + \let\csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname + \csname\@backslashchar\@expl@cs@to@str@@N#2\endcsname} +\long\def\@show@newcommand#1{% + \typeout{> \string#1=robust macro:}% + \typeout{->\@expl@cs@replacement@spec@@N#1.^^J}% + \expandafter\@show@newcommand@aux + \csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname + \expandafter{#1}} +\long\def\@show@newcommand@aux#1#2{% + \typeout{> \string#1=\@expl@cs@prefix@spec@@N#1macro:}% + \edef\reserved@a{% + default \string##1=\expandafter\detokenize\@gobblethree#2.^^J% + \@expl@cs@argument@spec@@N#1->\@expl@cs@replacement@spec@@N#1}% + \showtokens\expandafter\expandafter\expandafter{\expandafter\reserved@a}} \def\@ifundefined#1{% \ifcsname#1\endcsname\@ifundefin@d@i\else\@ifundefin@d@ii\fi{#1}} \long\def\@ifundefin@d@i#1\fi#2{\fi @@ -1142,19 +1571,35 @@ \edef #1{\expandafter\strip@prefix \meaning #1}% } +\def\string@makeletter#1{% + \@expl@str@map@function@@NN#1\@string@makeletter} +\def\@string@makeletter#1{% + \char@if@alph{#1}% + {\@expl@char@generate@@nn{`#1}{11}}% + {#1}} +\def\char@if@alph#1{% + \ifnum0\ifnum`#1<`A 1\fi\ifnum`#1>`z 1\fi + \if\ifnum`#1>`Z @\fi\ifnum`#1<`a @\fi01\fi>0 + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi} \DeclareRobustCommand\makeatletter{\catcode`\@11\relax} \DeclareRobustCommand\makeatother{\catcode`\@12\relax} - \def\@latex@info#1{} -\DeclareRobustCommand{\-}{% - \discretionary{% - \char \ifnum\hyphenchar\font<\z@ - \defaulthyphenchar - \else - \hyphenchar\font - \fi - }{}{}% -} +\ifx\directlua\@undefined + \DeclareRobustCommand{\-}{% + \discretionary{% + \char \ifnum\hyphenchar\font<\z@ + \defaulthyphenchar + \else + \hyphenchar\font + \fi + }{}{}% + } +\else + \let\-\@@hyph +\fi \let\@dischyph=\- \newif\if@includeinrelease \@includeinreleasefalse @@ -1174,8 +1619,966 @@ \MakeRobust\smallbreak \MakeRobust\strut \MakeRobust\underbar -%%% From File: ltalloc.dtx -\chardef\@xxxii=32 +\long\def\g@addto@macro#1#2{% + \begingroup + \toks@\expandafter{#1#2}% + \xdef#1{\the\toks@}% + \endgroup} +%% +%% File: lthooks.dtx (C) Copyright 2020 Frank Mittelbach, +%% Phelype Oleinik & LaTeX Team +%%% From File: lthooks.dtx +\def\lthooksversion{v1.0b} +\def\lthooksdate{2020/09/21} +\ExplSyntaxOn +\bool_new:N \g__hook_debug_bool +\cs_new_eq:NN \__hook_debug:n \use_none:n +\cs_new_protected:Npn \hook_debug_on: + { + \bool_gset_true:N \g__hook_debug_bool + \__hook_debug_gset: + } +\cs_new_protected:Npn \hook_debug_off: + { + \bool_gset_false:N \g__hook_debug_bool + \__hook_debug_gset: + } +\cs_new_protected:Npn \__hook_debug_gset: + { + \cs_gset_protected:Npx \__hook_debug:n ##1 + { \bool_if:NT \g__hook_debug_bool {##1} } + } +\cs_new_eq:NN \__hook_str_compare:nn \__str_if_eq:nn +\bool_new:N \l__hook_tmpa_bool +\tl_new:N \l__hook_return_tl +\tl_new:N \l__hook_tmpa_tl +\tl_new:N \l__hook_tmpb_tl +\seq_new:N \g__hook_all_seq +\tl_new:N \g__hook_removal_list_tl +\tl_new:N \l__hook_cur_hook_tl +\prop_new:N \l__hook_work_prop +\prop_new:N \g__hook_execute_immediately_prop +\prop_new:N \g__hook_used_prop +\tl_new:N \g__hook_hook_curr_name_tl +\seq_new:N \g__hook_name_stack_seq +\cs_new_eq:NN \__hook_tmp:w ? +\cs_generate_variant:Nn \tl_gremove_once:Nn { Nx } +\cs_generate_variant:Nn \tl_show:n { x } +\cs_generate_variant:Nn \tl_log:n { x } +\scan_new:N \s__hook_mark +\cs_new_protected:Npn \hook_new:n #1 + { \__hook_normalize_hook_args:Nn \__hook_new:n {#1} } +\cs_new_protected:Npn \__hook_new:n #1 + { + \hook_if_exist:nTF {#1} + { \msg_error:nnn { hooks } { exists } {#1} } + { + \seq_gput_right:Nn \g__hook_all_seq {#1} + \tl_new:c { __hook~#1 } + \__hook_declare:n {#1} + \clist_new:c {g__hook_#1_labels_clist} + \tl_new:c { g__hook_#1_reversed_tl } + \__hook_include_legacy_code_chunk:n {#1} + } + } +\cs_new_protected:Npn \__hook_declare:n #1 + { + \__hook_if_exist:nF {#1} + { + \prop_new:c { g__hook_#1_code_prop } + \tl_new:c { __hook_next~#1 } + } + } +\cs_new_protected:Npn \hook_new_reversed:n #1 + { \__hook_normalize_hook_args:Nn \__hook_new_reversed:n {#1} } +\cs_new_protected:Npn \__hook_new_reversed:n #1 + { + \__hook_new:n {#1} + \tl_gset:cn { g__hook_#1_reversed_tl } { - } + } +\cs_new_protected:Npn \hook_new_pair:nn #1#2 + { \hook_new:n {#1} \hook_new_reversed:n {#2} } +\cs_new_protected:Npn \__hook_include_legacy_code_chunk:n #1 + { + \debug_suspend: + \tl_if_exist:cT { @#1hook } + { + \tl_if_empty:cF { @#1hook } + { + \exp_args:Nnnv \__hook_hook_gput_code_do:nnn {#1} + { legacy } { @#1hook } + \tl_gclear:c { @#1hook } + } + } + \debug_resume: + } +\cs_new:Npn \__hook_parse_label_default:n #1 + { + \tl_if_novalue:nTF {#1} + { \__hook_currname_or_default:n { top-level } } + { + \tl_trim_spaces_apply:nN {#1} + \__hook_parse_dot_label:nn { top-level } + } + } +\cs_new:Npn \__hook_parse_dot_label:nn #1 #2 + { + \tl_if_empty:nTF {#1} + { + \msg_expandable_error:nnn { hooks } { empty-label } {#2} + #2 + } + { + \str_if_eq:nnTF {#1} { . } + { \__hook_currname_or_default:n {#2} } + { \__hook_parse_dot_label:nw {#2} #1 ./ \s__hook_mark } + } + } +\cs_new:Npn \__hook_parse_dot_label:nw #1 #2 ./ #3 \s__hook_mark + { + \tl_if_empty:nTF {#2} + { \__hook_parse_dot_label_aux:nw {#1} #3 \s__hook_mark } + { + \tl_if_empty:nTF {#3} + { \__hook_make_name:n {#2} } + { \__hook_parse_dot_label_cleanup:w #2 ./ #3 \s__hook_mark } + } + } +\cs_new:Npn \__hook_parse_dot_label_cleanup:w #1 ./ \s__hook_mark {#1} +\cs_new:Npn \__hook_parse_dot_label_aux:nw #1 #2 ./ \s__hook_mark + { \__hook_currname_or_default:n {#1} / \__hook_make_name:n {#2} } +\cs_new:Npn \__hook_currname_or_default:n #1 + { + \tl_if_empty:NTF \g__hook_hook_curr_name_tl + { + \tl_if_empty:NTF \@currname + { \__hook_make_name:n {#1} } + { \@currname } + } + { \g__hook_hook_curr_name_tl } + } +\cs_new:Npn \__hook_make_name:n #1 + { + \exp_after:wN \exp_after:wN \exp_after:wN \__hook_make_name:w + \exp_after:wN \token_to_str:N \cs:w __hook~ #1 \cs_end: + } +\exp_last_unbraced:NNNNo +\cs_new:Npn \__hook_make_name:w #1 \tl_to_str:n { __hook~ } { } +\cs_new_protected:Npn \__hook_normalize_hook_args_aux:Nn #1 #2 + { + \group_begin: + \use:e + { + \group_end: + \exp_not:N #1 #2 + } + } +\cs_new_protected:Npn \__hook_normalize_hook_args:Nn #1 #2 + { + \__hook_normalize_hook_args_aux:Nn #1 + { { \__hook_parse_label_default:n {#2} } } + } +\cs_new_protected:Npn \__hook_normalize_hook_args:Nnn #1 #2 #3 + { + \__hook_normalize_hook_args_aux:Nn #1 + { + { \__hook_parse_label_default:n {#2} } + { \__hook_parse_label_default:n {#3} } + } + } +\cs_new_protected:Npn \__hook_normalize_hook_rule_args:Nnnnn #1 #2 #3 #4 #5 + { + \__hook_normalize_hook_args_aux:Nn #1 + { + { \__hook_parse_label_default:n {#2} } + { \__hook_parse_label_default:n {#3} } + { \tl_trim_spaces:n {#4} } + { \__hook_parse_label_default:n {#5} } + } + } +\cs_new_protected:Npn \hook_gput_code:nnn #1 #2 + { \__hook_normalize_hook_args:Nnn \__hook_gput_code:nnn {#1} {#2} } +\cs_new_protected:Npn \__hook_gput_code:nnn #1 #2 #3 + { + \prop_if_in:NnTF \g__hook_execute_immediately_prop {#1} + {#3} + { + \__hook_if_marked_removal:nnTF {#1} {#2} + { \__hook_unmark_removal:nn {#1} {#2} } + { + \hook_if_exist:nTF {#1} + { + \__hook_hook_gput_code_do:nnn {#1} {#2} {#3} + \__hook_update_hook_code:n {#1} + } + { \__hook_try_declaring_generic_hook:nnn {#1} {#2} {#3} } + } + } + } +\cs_generate_variant:Nn \__hook_gput_code:nnn { nxv } +\cs_new_protected:Npn \__hook_hook_gput_code_do:nnn #1 #2 #3 + { + \__hook_debug:n{\iow_term:x{****~ Add~ to~ + \hook_if_exist:nF {#1} { undeclared~ } + hook~ #1~ (#2) + \on@line\space <-~ \tl_to_str:n{#3}} } + \prop_get:cnNTF { g__hook_#1_code_prop } {#2} \l__hook_return_tl + { + \prop_gput:cno { g__hook_#1_code_prop } {#2} + { \l__hook_return_tl #3 } + } + { \prop_gput:cnn { g__hook_#1_code_prop } {#2} {#3} } + } +\cs_new_protected:Npn \__hook_gput_undeclared_hook:nnn #1 #2 #3 + { + \__hook_declare:n {#1} + \__hook_hook_gput_code_do:nnn {#1} {#2} {#3} + } +\cs_new_protected:Npn \__hook_try_declaring_generic_hook:nnn #1 + { + \__hook_try_declaring_generic_hook:nNNnn {#1} + \hook_gput_code:nnn \__hook_gput_undeclared_hook:nnn + } +\cs_new_protected:Npn \__hook_try_declaring_generic_next_hook:nn #1 + { + \__hook_try_declaring_generic_hook:nNNnn {#1} + \hook_gput_next_code:nn \__hook_gput_next_do:nn + } +\cs_new_protected:Npn \__hook_try_declaring_generic_hook:nNNnn #1 + { + \__hook_if_file_hook:wTF #1 / / \s__hook_mark + { + \exp_args:Ne \__hook_try_declaring_generic_hook_split:nNNnn + { \exp_args:Ne \__hook_file_hook_normalize:n {#1} } + } + { \__hook_try_declaring_generic_hook_split:nNNnn {#1} } + } +\cs_new_protected:Npn \__hook_try_declaring_generic_hook_split:nNNnn #1 #2 #3 + { + \__hook_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1} + { #2 } + { #3 } {#1} + } +\prg_new_protected_conditional:Npnn \__hook_try_declaring_generic_hook:wn + #1 / #2 / #3 / #4 \scan_stop: #5 { TF } + { + \tl_if_empty:nTF {#2} + { \prg_return_false: } + { + \prop_if_in:NnTF \c__hook_generics_prop {#1} + { + \hook_if_exist:nF {#5} { \hook_new:n {#5} } + \prop_if_in:NnTF \c__hook_generics_reversed_ii_prop {#2} + { \tl_gset:cn { g__hook_#5_reversed_tl } { - } } + { + \prop_if_in:NnT \c__hook_generics_reversed_iii_prop {#3} + { \tl_gset:cn { g__hook_#5_reversed_tl } { - } } + } + \prg_return_true: + } + { \prg_return_false: } + } + } +\prg_new_conditional:Npnn \__hook_if_file_hook:w + #1 / #2 / #3 \s__hook_mark { TF } + { + \str_if_eq:nnTF {#1} { file } + { + \bool_lazy_or:nnTF + { \tl_if_empty_p:n {#3} } + { \str_if_eq_p:nn {#3} { / } } + { \prg_return_false: } + { + \prop_if_in:NnTF \c__hook_generics_file_prop {#2} + { \prg_return_true: } + { \prg_return_false: } + } + } + { \prg_return_false: } + } +\cs_new:Npn \__hook_file_hook_normalize:n #1 + { \__hook_strip_double_slash:n {#1} } +\cs_new:Npn \__hook_strip_double_slash:n #1 + { \__hook_strip_double_slash:w #1 // \s__hook_mark } +\cs_new:Npn \__hook_strip_double_slash:w #1 // #2 \s__hook_mark + { + \tl_if_empty:nTF {#2} + {#1} + { \__hook_strip_double_slash:w #1 / #2 \s__hook_mark } + } +\prop_const_from_keyval:Nn \c__hook_generics_prop + {env=,file=,package=,class=,include=} +\prop_const_from_keyval:Nn \c__hook_generics_reversed_ii_prop {after=,end=} +\prop_const_from_keyval:Nn \c__hook_generics_reversed_iii_prop {after=} +\prop_const_from_keyval:Nn \c__hook_generics_file_prop {before=,after=} +\cs_new_protected:Npn \hook_gremove_code:nn #1 #2 + { \__hook_normalize_hook_args:Nnn \__hook_gremove_code:nn {#1} {#2} } +\cs_new_protected:Npn \__hook_gremove_code:nn #1 #2 + { + \__hook_if_exist:nTF {#1} + { + \str_if_eq:nnTF {#2} {*} + { \prop_gclear:c { g__hook_#1_code_prop } } + { + \prop_get:cnNTF { g__hook_#1_code_prop } {#2} \l__hook_return_tl + { \__hook_gremove_code_do:nn } + { \__hook_mark_removal:nn } + {#1} {#2} + } + \hook_if_exist:nT {#1} + { \__hook_update_hook_code:n {#1} } + } + { \__hook_mark_removal:nn {#1} {#2} } + } +\cs_new_protected:Npn \__hook_gremove_code_do:nn #1 #2 + { \prop_gremove:cn { g__hook_#1_code_prop } {#2} } +\cs_new_protected:Npn \__hook_mark_removal:nn #1 #2 + { + \tl_gput_right:Nx \g__hook_removal_list_tl + { \__hook_removal_tl:nn {#1} {#2} } + } +\cs_new_protected:Npn \__hook_unmark_removal:nn #1 #2 + { + \tl_gremove_once:Nx \g__hook_removal_list_tl + { \__hook_removal_tl:nn {#1} {#2} } + } +\prg_new_protected_conditional:Npnn \__hook_if_marked_removal:nn #1 #2 { TF } + { + \exp_args:NNx \tl_if_in:NnTF \g__hook_removal_list_tl + { \__hook_removal_tl:nn {#1} {#2} } + { \prg_return_true: } { \prg_return_false: } + } +\cs_new:Npn \__hook_removal_tl:nn #1 #2 + { & \tl_to_str:n {#2} $ \tl_to_str:n {#1} $ } +\prop_new:c {g__hook_??_code_prop} +\prop_new:c {__hook~??} +\tl_new:c {g__hook_??_reversed_tl} +\cs_new_protected:Npn \hook_gset_rule:nnnn #1#2#3#4 + { + \__hook_normalize_hook_rule_args:Nnnnn \__hook_gset_rule:nnnn + {#1} {#2} {#3} {#4} + } +\cs_new_protected:Npn \__hook_gset_rule:nnnn #1#2#3#4 + { + \__hook_declare:n {#1} + \__hook_rule_gclear:nnn {#1} {#2} {#4} + \debug_suspend: + \cs_if_exist_use:cTF { __hook_rule_#3_gset:nnn } + { + {#1} {#2} {#4} + \__hook_update_hook_code:n {#1} + } + { \msg_error:nnnnnn { hooks } { unknown-rule } + {#1} {#2} {#3} {#4} } + \debug_resume: + } +\cs_new_protected:Npn \__hook_rule_before_gset:nnn #1#2#3 + { + \tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } + { \__hook_label_ordered:nnTF {#2} {#3} { < } { > } } + } +\cs_new_eq:cN { __hook_rule_<_gset:nnn } \__hook_rule_before_gset:nnn +\cs_new_protected:Npn \__hook_rule_after_gset:nnn #1#2#3 + { + \tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#3} {#2} _tl } + { \__hook_label_ordered:nnTF {#3} {#2} { < } { > } } + } +\cs_new_eq:cN { __hook_rule_>_gset:nnn } \__hook_rule_after_gset:nnn +\cs_new_protected:Npn \__hook_rule_voids_gset:nnn #1#2#3 + { + \tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } + { \__hook_label_ordered:nnTF {#2} {#3} { -> } { <- } } + } +\cs_new_protected:cpn { __hook_rule_incompatible-error_gset:nnn } #1#2#3 + { \tl_gset:cn { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } { xE } } +\cs_new_protected:cpn { __hook_rule_incompatible-warning_gset:nnn } #1#2#3 + { \tl_gset:cn { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } { xW } } +\cs_new_protected:Npn \__hook_rule_unrelated_gset:nnn #1#2#3 { } +\cs_new_protected:Npn \__hook_rule_gclear:nnn #1#2#3 + { \cs_undefine:c { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } } +\cs_new:Npn \__hook_label_pair:nn #1#2 + { + \if_case:w \__hook_str_compare:nn {#1} {#2} \exp_stop_f: + #1 | #1 % 0 + \or: #1 | #2 % +1 + \else: #2 | #1 % -1 + \fi: + } +\prg_new_conditional:Npnn \__hook_label_ordered:nn #1#2 { TF } + { + \if_int_compare:w \__hook_str_compare:nn {#1} {#2} > 0 \exp_stop_f: + \prg_return_true: + \else + \prg_return_false: + \fi: + } +\cs_new:Npn \__hook_if_label_case:nnnnn #1#2 + { + \cs:w use_ + \if_case:w \__hook_str_compare:nn {#1} {#2} + i \or: ii \else: iii \fi: :nnn + \cs_end: + } +\cs_new_eq:NN \__hook_update_hook_code:n \use_none:n +\cs_new_protected:Npn \__hook_initialize_all: { + \cs_gset_eq:NN \__hook_update_hook_code:n \__hook_initialize_hook_code:n + \__hook_debug:n { \prop_gclear:N \g__hook_used_prop } + \seq_map_inline:Nn \g__hook_all_seq + { + \__hook_update_hook_code:n {##1} + } + \__hook_debug:n + { \iow_term:x{^^JAll~ initialized~ (non-empty)~ hooks:} + \prop_map_inline:Nn \g__hook_used_prop + { \iow_term:x{^^J~ ##1~ ->~ + \exp_not:v {__hook~##1}~ } + } + } + \cs_gset_eq:NN \hook_use:n \__hook_use_initialized:n + \cs_gset_eq:NN \__hook_preamble_hook:n \use_none:n +} +\cs_new_protected:Npn \__hook_initialize_hook_code:n #1 + { + \debug_suspend: + \__hook_debug:n{ \iow_term:x{^^JUpdate~ code~ for~ hook~ + '#1' \on@line :^^J} } + \__hook_include_legacy_code_chunk:n {#1} + \hook_if_exist:nT {#1} + { + \prop_if_empty:cTF {g__hook_#1_code_prop} + { \tl_gset:co { __hook~#1 } + { \cs:w __hook_next~#1 \cs_end: } } + { + \__hook_if_reversed:nTF {#1} + { \cs_set_eq:NN \__hook_tl_gput:NV \tl_gput_left:NV + \cs_set_eq:NN \__hook_clist_gput:NV \clist_gput_left:NV } + { \cs_set_eq:NN \__hook_tl_gput:NV \tl_gput_right:NV + \cs_set_eq:NN \__hook_clist_gput:NV \clist_gput_right:NV } + \prop_set_eq:Nc \l__hook_work_prop { g__hook_#1_code_prop } + \__hook_initialize_single:cccn + { __hook~#1 } { __hook_next~#1 } + { g__hook_#1_labels_clist } {#1} + \__hook_debug:n{ \exp_args:NNx \prop_gput:Nnn + \g__hook_used_prop {#1}{} } + } + } + \debug_resume: + } +\cs_new:Npn \__hook_tl_csname:n #1 { l__hook_label_#1_tl } +\cs_new:Npn \__hook_seq_csname:n #1 { l__hook_label_#1_seq } +\seq_new:N \l__hook_labels_seq +\int_new:N \l__hook_labels_int +\tl_new:N \l__hook_front_tl +\tl_new:N \l__hook_rear_tl +\tl_new:c { \__hook_tl_csname:n { 0 } } +\cs_new_protected:Npn \__hook_initialize_single:NNNn #1#2#3#4 + { + \seq_clear:N \l__hook_labels_seq + \int_zero:N \l__hook_labels_int + \tl_set:Nn \l__hook_cur_hook_tl {#4} + \prop_map_inline:Nn \l__hook_work_prop + { + \int_incr:N \l__hook_labels_int + \seq_put_right:Nn \l__hook_labels_seq {##1} + \tl_set:cn { \__hook_tl_csname:n {##1} }{0} + \seq_clear_new:c { \__hook_seq_csname:n {##1} } + } + \prop_map_inline:Nn \l__hook_work_prop + { + \prop_map_inline:Nn \l__hook_work_prop + { + \__hook_if_label_case:nnnnn {##1} {####1} + { \prop_map_break: } + { \__hook_apply_label_pair:nnn {##1} {####1} } + { \__hook_apply_label_pair:nnn {####1} {##1} } + {#4} + } + } + \__hook_debug:n { \__hook_debug_label_data:N \l__hook_work_prop } + \tl_set:Nn \l__hook_rear_tl { 0 } + \tl_set:cn { \__hook_tl_csname:n { 0 } } { 0 } + \seq_map_inline:Nn \l__hook_labels_seq + { + \int_compare:nNnT { \cs:w \__hook_tl_csname:n {##1} \cs_end: } = 0 + { + \tl_set:cn { \__hook_tl_csname:n { \l__hook_rear_tl } }{##1} + \tl_set:Nn \l__hook_rear_tl {##1} + } + } + \tl_set_eq:Nc \l__hook_front_tl { \__hook_tl_csname:n { 0 } } + \tl_gclear:N #1 + \clist_gclear:N #3 + \bool_while_do:nn { ! \str_if_eq_p:Vn \l__hook_front_tl { 0 } } + { + \int_decr:N \l__hook_labels_int + \prop_get:NVN \l__hook_work_prop \l__hook_front_tl \l__hook_return_tl + \__hook_tl_gput:NV #1 \l__hook_return_tl + \__hook_clist_gput:NV #3 \l__hook_front_tl + \__hook_debug:n{ \iow_term:x{Handled~ code~ for~ \l__hook_front_tl} } + \seq_map_inline:cn { \__hook_seq_csname:n { \l__hook_front_tl } } + { + \tl_set:cx { \__hook_tl_csname:n {##1} } + { \int_eval:n + { \cs:w \__hook_tl_csname:n {##1} \cs_end: - 1 } + } + \int_compare:nNnT + { \cs:w \__hook_tl_csname:n {##1} \cs_end: } = 0 + { + \tl_set:cn { \__hook_tl_csname:n { \l__hook_rear_tl } } {##1} + \tl_set:Nn \l__hook_rear_tl {##1} + } + } + \tl_set_eq:Nc \l__hook_front_tl + { \__hook_tl_csname:n { \l__hook_front_tl } } + } + \int_compare:nNnF \l__hook_labels_int = 0 + { + \iow_term:x{====================} + \iow_term:x{Error:~ label~ rules~ are~ incompatible:} + \__hook_debug_label_data:N \l__hook_work_prop + \iow_term:x{====================} + } + \tl_gput_right:Nn #1 {#2} + } +\cs_generate_variant:Nn \__hook_initialize_single:NNNn {ccc} +\cs_new:Npn \__hook_tl_gput:NV {\ERROR} +\cs_new:Npn \__hook_clist_gput:NV {\ERROR} +\cs_new_protected:Npn \__hook_apply_label_pair:nnn #1#2#3 + { + \__hook_label_if_exist_apply:nnnF {#1} {#2} {#3} + { + \__hook_label_if_exist_apply:nnnF {#1} {#2} { ?? } { } + } + } +\cs_new_protected:Npn \__hook_label_if_exist_apply:nnnF #1#2#3 + { + \if_cs_exist:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end: + \__hook_apply_rule:nnn {#1} {#2} {#3} + \exp_after:wN \use_none:n + \else: + \use:nn + \fi: + } +\cs_new_protected:Npn \__hook_apply_rule:nnn #1#2#3 + { + \cs:w __hook_apply_ + \cs:w g__hook_#3_reversed_tl \cs_end: rule_ + \cs:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end: :nnn \cs_end: + {#1} {#2} {#3} + } +\cs_new_protected:cpn { __hook_apply_rule_<:nnn } #1#2#3 + { + \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} } + \tl_set:cx { \__hook_tl_csname:n {#2} } + { \int_eval:n{ \cs:w \__hook_tl_csname:n {#2} \cs_end: + 1 } } + \seq_put_right:cn{ \__hook_seq_csname:n {#1} }{#2} + } +\cs_new_protected:cpn { __hook_apply_rule_>:nnn } #1#2#3 + { + \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} } + \tl_set:cx { \__hook_tl_csname:n {#1} } + { \int_eval:n{ \cs:w \__hook_tl_csname:n {#1} \cs_end: + 1 } } + \seq_put_right:cn{ \__hook_seq_csname:n {#2} }{#1} + } +\cs_new_protected:cpn { __hook_apply_rule_xE:nnn } #1#2#3 + { + \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} } + \msg_error:nnnnnn { hooks } { labels-incompatible } + {#1} {#2} {#3} { 1 } + \use:c { __hook_apply_rule_->:nnn } {#1} {#2} {#3} + \use:c { __hook_apply_rule_<-:nnn } {#1} {#2} {#3} + } +\cs_new_protected:cpn { __hook_apply_rule_xW:nnn } #1#2#3 + { + \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} } + \msg_warning:nnnnnn { hooks } { labels-incompatible } + {#1} {#2} {#3} { 0 } + } +\cs_new_protected:cpn { __hook_apply_rule_->:nnn } #1#2#3 + { + \__hook_debug:n + { + \__hook_msg_pair_found:nnn {#1} {#2} {#3} + \iow_term:x{--->~ Drop~ '#2'~ code~ from~ + \iow_char:N \\ g__hook_ \l__hook_cur_hook_tl _code_prop ~ + because~ of~ '#1' } + } + \prop_put:Nnn \l__hook_work_prop {#2} { } + } +\cs_new_protected:cpn { __hook_apply_rule_<-:nnn } #1#2#3 + { + \__hook_debug:n + { + \__hook_msg_pair_found:nnn {#1} {#2} {#3} + \iow_term:x{--->~ Drop~ '#1'~ code~ from~ + \iow_char:N \\ g__hook_ \l__hook_cur_hook_tl _code_prop ~ + because~ of~ '#2' } + } + \prop_put:Nnn \l__hook_work_prop {#1} { } + } +\cs_new_eq:cc { __hook_apply_-rule_<:nnn } { __hook_apply_rule_>:nnn } +\cs_new_eq:cc { __hook_apply_-rule_>:nnn } { __hook_apply_rule_<:nnn } +\cs_new_eq:cc { __hook_apply_-rule_<-:nnn } { __hook_apply_rule_<-:nnn } +\cs_new_eq:cc { __hook_apply_-rule_->:nnn } { __hook_apply_rule_->:nnn } +\cs_new_eq:cc { __hook_apply_-rule_xE:nnn } { __hook_apply_rule_xE:nnn } +\cs_new_eq:cc { __hook_apply_-rule_xW:nnn } { __hook_apply_rule_xW:nnn } +\cs_new_protected:Npn \__hook_msg_pair_found:nnn #1#2#3 + { + \iow_term:x{~ \str_if_eq:nnTF {#3} {??} {default} {~normal} ~ + rule~ \__hook_label_pair:nn {#1} {#2}:~ + \use:c { g__hook_#3_rule_ \__hook_label_pair:nn {#1} {#2} _tl } ~ + found} + } +\cs_new_protected:Npn \__hook_debug_label_data:N #1 { + \iow_term:x{Code~ labels~ for~ sorting:} + \iow_term:x{~ \seq_use:Nnnn\l__hook_labels_seq {~and~}{,~}{~and~} } + \iow_term:x{^^J Data~ structure~ for~ label~ rules:} + \prop_map_inline:Nn #1 + { + \iow_term:x{~ ##1~ =~ \tl_use:c{ \__hook_tl_csname:n {##1} }~ ->~ + \seq_use:cnnn{ \__hook_seq_csname:n {##1} }{~->~}{~->~}{~->~} + } + } + \iow_term:x{} +} +\cs_new_protected:Npn \hook_log:n #1 + { + \cs_set_eq:NN \__hook_log_cmd:x \iow_log:x + \__hook_normalize_hook_args:Nn \__hook_log:nN {#1} \tl_log:x + } +\cs_new_protected:Npn \hook_show:n #1 + { + \cs_set_eq:NN \__hook_log_cmd:x \iow_term:x + \__hook_normalize_hook_args:Nn \__hook_log:nN {#1} \tl_show:x + } +\cs_new_protected:Npn \__hook_log_line:x #1 + { \__hook_log_cmd:x { >~#1 } } +\cs_new_protected:Npn \__hook_log_line_indent:x #1 + { \__hook_log_cmd:x { >~\@spaces #1 } } +\cs_new_protected:Npn \__hook_log:nN #1 #2 + { + \__hook_preamble_hook:n {#1} + \iow_term:x { ^^J ->~The~hook~'#1': } + \hook_if_exist:nF {#1} + { \__hook_log_line:x { is~not~declared! } } + \__hook_if_exist:nTF {#1} + { + \__hook_log_line:x { Code~chunks: } + \prop_if_empty:cTF { g__hook_#1_code_prop } + { \__hook_log_line_indent:x { --- } } + { + \prop_map_inline:cn { g__hook_#1_code_prop } + { \__hook_log_line_indent:x { ##1~->~\tl_to_str:n {##2} } } + } + \__hook_log_line:x { Extra~code~for~next~invocation:} + \__hook_log_line_indent:x + { + \tl_if_empty:cTF { __hook_next~#1 } + { --- } + { ->~ \exp_args:Nv \__hook_log_next_code:n { __hook_next~#1 } } + } + \__hook_log_line:x { Rules: } + \bool_set_true:N \l__hook_tmpa_bool + \__hook_list_rules:nn {#1} + { + \bool_set_false:N \l__hook_tmpa_bool + \__hook_log_line_indent:x + { + ##2~ with~ + \str_if_eq:nnT {##3} {??} { default~ } + relation~ ##1 + } + } + \bool_if:NT \l__hook_tmpa_bool + { \__hook_log_line_indent:x { --- } } + \bool_lazy_and:nnTF + { \hook_if_exist_p:n {#1} } + { ! \hook_if_empty_p:n {#1} } + { + \__hook_log_line:x + { + Execution~order + \bool_if:NTF \l__hook_tmpa_bool + { \__hook_if_reversed:nT {#1} { ~(after~reversal) } } + { ~(after~ + \__hook_if_reversed:nT {#1} { reversal~and~ } + applying~rules) + } : + } + #2 % \tl_show:n + { + \@spaces + \clist_if_empty:cTF { g__hook_#1_labels_clist } + { --- } + { \clist_use:cn {g__hook_#1_labels_clist} { ,~ } } + } + } + { + #2 + { + Hook~ \hook_if_exist:nTF {#1} + {code~pool~empty} {not~declared} + } + } + } + { #2 { The~hook~is~empty. } } + } +\cs_new:Npn \__hook_log_next_code:n #1 + { \exp_args:No \tl_to_str:n { \use_none:nn #1 } } +\cs_new_protected:Npn \__hook_list_rules:nn #1 #2 + { + \cs_set_protected:Npn \__hook_tmp:w ##1 ##2 ##3 {#2} + \prop_map_inline:cn { g__hook_#1_code_prop } + { + \prop_map_inline:cn { g__hook_#1_code_prop } + { + \__hook_if_label_case:nnnnn {##1} {####1} + { \prop_map_break: } + { \__hook_list_one_rule:nnn {##1} {####1} } + { \__hook_list_one_rule:nnn {####1} {##1} } + {#1} + } + } + } +\cs_new_protected:Npn \__hook_list_one_rule:nnn #1#2#3 + { + \__hook_list_if_rule_exists:nnnF {#1} {#2} {#3} { } + { \__hook_list_if_rule_exists:nnnF {#1} {#2} { ?? } { } } + } +\cs_new_protected:Npn \__hook_list_if_rule_exists:nnnF #1#2#3 + { + \if_cs_exist:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end: + \exp_args:Nv \__hook_tmp:w + { g__hook_ #3 _rule_ #1 | #2 _tl } { #1 | #2 } {#3} + \fi: + } +\cs_new_protected:Npn \__hook_debug_print_rules:n #1 + { + \iow_term:n { The~hook~#1~contains~the~rules: } + \cs_set_protected:Npn \__hook_tmp:w ##1 + { + \__hook_list_rules:nn {#1} + { + \iow_term:x + { + > ##1 {####2} ##1 => ##1 {####1} + \str_if_eq:nnT {####3} {??} { ~(default) } + } + } + } + \exp_args:No \__hook_tmp:w { \use:nn { ~ } { ~ } } + } +\cs_new_protected:Npn \hook_gput_next_code:nn #1 + { \__hook_normalize_hook_args:Nn \__hook_gput_next_code:nn {#1} } +\cs_new_protected:Npn \__hook_gput_next_code:nn #1 #2 + { + \debug_suspend: + \__hook_declare:n {#1} + \hook_if_exist:nTF {#1} + { \__hook_gput_next_do:nn {#1} {#2} } + { \__hook_try_declaring_generic_next_hook:nn {#1} {#2} } + \debug_resume: + } +\cs_new_protected:Npn \__hook_gput_next_do:nn #1 + { + \exp_args:Nc \__hook_gput_next_do:Nnn + { __hook_next~#1 } {#1} + } +\cs_new_protected:Npn \__hook_gput_next_do:Nnn #1 #2 + { + \tl_if_empty:cT { __hook~#2 } + { \__hook_update_hook_code:n {#2} } + \tl_if_empty:NT #1 + { \tl_gset:Nn #1 { \__hook_clear_next:n {#2} } } + \tl_gput_right:Nn #1 + } +\cs_new_protected:Npn \__hook_clear_next:n #1 + { \cs_gset_eq:cN { __hook_next~#1 } \c_empty_tl } +\cs_new_protected:Npn \hook_use:n #1 + { + \tl_if_exist:cTF { __hook~#1 } + { + \__hook_preamble_hook:n {#1} + \cs:w __hook~#1 \cs_end: + } + { \__hook_use:wn #1 / \s__hook_mark {#1} } + } +\cs_new:Npn \__hook_use_initialized:n #1 + { + \if_cs_exist:w __hook~#1 \cs_end: + \else: + \__hook_use_undefined:w + \fi: + \cs:w __hook~#1 \__hook_use_end: + } +\cs_new:Npn \__hook_use_undefined:w #1 #2 __hook~#3 \__hook_use_end: + { + #1 % fi + \__hook_use:wn #3 / \s__hook_mark {#3} + } +\cs_new_protected:Npn \__hook_preamble_hook:n #1 + { \__hook_initialize_hook_code:n {#1} } +\cs_new_eq:NN \__hook_use_end: \cs_end: +\cs_new:Npn \__hook_use:wn #1 / #2 \s__hook_mark #3 + { + \str_if_eq:nnTF {#1} { file } + { \__hook_try_file_hook:n {#3} } + { } % Hook doesn't exist + } +\cs_new_protected:Npn \__hook_try_file_hook:n #1 + { + \__hook_if_file_hook:wTF #1 / / \s__hook_mark + { + \exp_args:Ne \__hook_if_exist_use:n + { \exp_args:Ne \__hook_file_hook_normalize:n {#1} } + } + { \__hook_if_exist_use:n {#1} } % file/ generic hook (e.g. file/before) + } +\cs_new_protected:Npn \__hook_if_exist_use:n #1 + { + \tl_if_exist:cT { __hook~#1 } + { + \__hook_preamble_hook:n {#1} + \cs:w __hook~#1 \cs_end: + } + } +\cs_new_protected:Npn \hook_use_once:n #1 + { + \tl_if_exist:cT { __hook~#1 } + { + \tl_set:Nn \l__hook_return_tl {#1} + \__hook_normalize_hook_args:Nn \__hook_use_once_store:n + { \l__hook_return_tl } + \hook_use:n {#1} + } + } +\cs_new_protected:Npn \__hook_use_once_store:n #1 + { \prop_gput:Nnn \g__hook_execute_immediately_prop {#1} { } } +\prg_new_conditional:Npnn \hook_if_empty:n #1 { p , T , F , TF } + { + \__hook_if_exist:nTF {#1} + { + \bool_lazy_and:nnTF + { \prop_if_empty_p:c { g__hook_#1_code_prop } } + { \tl_if_empty_p:c { __hook_next~#1 } } + { \prg_return_true: } + { \prg_return_false: } + } + { \prg_return_true: } + } +\prg_new_conditional:Npnn \hook_if_exist:n #1 { p , T , F , TF } + { + \tl_if_exist:cTF { __hook~#1 } + { \prg_return_true: } + { \prg_return_false: } + } +\prg_new_conditional:Npnn \__hook_if_exist:n #1 { p , T , F , TF } + { + \prop_if_exist:cTF { g__hook_#1_code_prop } + { \prg_return_true: } + { \prg_return_false: } + } +\prg_new_conditional:Npnn \__hook_if_reversed:n #1 { p , T , F , TF } + { + \if_int_compare:w \cs:w g__hook_#1_reversed_tl \cs_end: 1 < 0 \exp_stop_f: + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\msg_new:nnnn { hooks } { labels-incompatible } + { + Labels~`#1'~and~`#2'~are~incompatible + \str_if_eq:nnF {#3} {??} { ~in~hook~`#3' } .~ + \int_compare:nNnTF {#4} = { 1 } + { The~ code~ for~ both~ labels~ will~ be~ dropped. } + { You~ may~ see~ errors~ later. } + } + { LaTeX~found~two~incompatible~labels~in~the~same~hook.~ + This~indicates~an~incompatibility~between~packages. } +\msg_new:nnnn { hooks } { exists } + { Hook~`#1'~ has~ already~ been~ declared. } + { There~ already~ exists~ a~ hook~ declaration~ with~ this~ + name.\\ + Please~ use~ a~ different~ name~ for~ your~ hook.} +\msg_new:nnn { hooks } { empty-label } + { Empty~code~label~\msg_line_context:.~Using~`#1'~instead. } +\msg_new:nnnn { hooks } { unknown-rule } + { Unknown~ relationship~ `#3'~ + between~ labels~ `#2'~ and~ `#4'~ + \str_if_eq:nnF {#1} {??} { ~in~hook~`#1' }. ~ + Perhaps~ a~ missspelling? + } + { + The~ relation~ used~ not~ known~ to~ the~ system.~ Allowed~ values~ are~ + `before'~ or~ `<',~ + `after'~ or~ `>',~ + `incompatible-warning',~ + `incompatible-error',~ + `voids'~ or~ + `unrelated'. + } +\msg_new:nnn { hooks } { should-not-happen } + { + ERROR!~This~should~not~happen.~#1 \\ + Please~report~at~https://github.com/latex3/latex2e. + } +\NewDocumentCommand \NewHook { m }{ \hook_new:n {#1} } +\NewDocumentCommand \NewReversedHook { m }{ \hook_new_reversed:n {#1} } +\NewDocumentCommand \NewMirroredHookPair { mm }{ \hook_new_pair:nn {#1}{#2} } +\NewDocumentCommand \AddToHook { m o +m } + { \hook_gput_code:nnn {#1} {#2} {#3} } +\NewDocumentCommand \AddToHookNext { m +m } + { \hook_gput_next_code:nn {#1} {#2} } +\NewDocumentCommand \RemoveFromHook { m o } + { \hook_gremove_code:nn {#1} {#2} } +\seq_gpush:Nn \g__hook_name_stack_seq { } +\cs_new_protected:Npn \__hook_curr_name_push:n #1 + { + \seq_gpush:Nn \g__hook_name_stack_seq {#1} + \tl_gset:Nn \g__hook_hook_curr_name_tl {#1} + } +\cs_new_protected:Npn \__hook_curr_name_pop: + { + \seq_gpop:NN \g__hook_name_stack_seq \l__hook_return_tl + \seq_get:NNTF \g__hook_name_stack_seq \l__hook_return_tl + { \tl_gset_eq:NN \g__hook_hook_curr_name_tl \l__hook_return_tl } + { + \msg_error:nnn { hooks } { should-not-happen } + { Tried~to~pop~from~an~empty~default~label~stack. } + } + } +\NewDocumentCommand \DeclareDefaultHookLabel { m } + { + \seq_gpop:NN \g__hook_name_stack_seq \l__hook_return_tl + \__hook_curr_name_push:n {#1} + } +\cs_new:Npn \UseHook { \hook_use:n } +\cs_new:Npn \UseOneTimeHook { \hook_use_once:n } +\cs_new_protected:Npn \ShowHook { \hook_show:n } +\cs_new_protected:Npn \LogHook { \hook_log:n } +\cs_new_protected:Npn \DebugHooksOn { \hook_debug_on: } +\cs_new_protected:Npn \DebugHooksOff { \hook_debug_off: } +\NewDocumentCommand \DeclareHookRule { m m m m } + { \hook_gset_rule:nnnn {#1}{#2}{#3}{#4} } +\NewDocumentCommand \DeclareDefaultHookRule { m m m } + { \hook_gset_rule:nnnn {??}{#1}{#2}{#3} } +\@onlypreamble\DeclareDefaultHookRule +\NewDocumentCommand \ClearHookRule { m m m } +{ \hook_gset_rule:nnnn {#1}{#2}{unrelated}{#3} } +\cs_new_eq:NN \IfHookExistsTF \hook_if_exist:nTF +\cs_new_eq:NN \IfHookEmptyTF \hook_if_empty:nTF +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5 +\cs_new_eq:NN \@expl@@@initialize@all@@ + \__hook_initialize_all: +\cs_new_eq:NN \@expl@@@hook@curr@name@push@@n + \__hook_curr_name_push:n +\cs_new_eq:NN \@expl@@@hook@curr@name@pop@@ + \__hook_curr_name_pop: +\ExplSyntaxOff +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% From File: ltalloc.dtx +\chardef\@xxxii=32 \mathchardef\@Mi=10001 \mathchardef\@Mii=10002 \mathchardef\@Miii=10003 @@ -1505,12 +2908,14 @@ Type H for immediate help.}% \@xnewline}% \@xnewline} \let\\\@normalcr +\def\@vspace@calcify#1{\begingroup\setlength\skip@{#1}\vskip\skip@\endgroup} + \DeclareRobustCommand\newline{\@normalcr\relax} \def\@xnewline{\@ifnextchar[% ] bracket matching \@newline {\@gnewline\relax}} \def\@newline[#1]{\let \reserved@e \vadjust - \@gnewline {\vskip #1}} + \@gnewline {\@vspace@calcify{#1}}} \def\@gnewline #1{% \ifvmode \@nolnerr @@ -1574,9 +2979,9 @@ Type H for immediate help.}% \ifvmode \if@minipage\else \ifdim \lastskip =\z@ - \vskip #1\relax + \@vspace@calcify{#1}% \else - \@tempskipb#1\relax + \setlength\@tempskipb{#1}% \@xaddvskip \fi \fi @@ -1617,12 +3022,12 @@ Type H for immediate help.}% \DeclareRobustCommand\vspace{\@ifstar\@vspacer\@vspace} \def\@vspace #1{% \ifvmode - \vskip #1 + \@vspace@calcify{#1}% \vskip\z@skip \else \@bsphack \vadjust{\@restorepar - \vskip #1 + \@vspace@calcify{#1}% \vskip\z@skip }% \@esphack @@ -1632,7 +3037,7 @@ Type H for immediate help.}% \dimen@\prevdepth \hrule \@height\z@ \nobreak - \vskip #1 + \@vspace@calcify{#1}% \vskip\z@skip \prevdepth\dimen@ \else @@ -1640,7 +3045,7 @@ Type H for immediate help.}% \vadjust{\@restorepar \hrule \@height\z@ \nobreak - \vskip #1 + \@vspace@calcify{#1}% \vskip\z@skip}% \@esphack \fi} @@ -1669,24 +3074,24 @@ Type H for immediate help.}% \catcode `\~=13 \def~{\nobreakspace{}} \expandafter\let\expandafter\@xobeysp\csname nobreakspace \endcsname -\DeclareRobustCommand{\,}{% - \relax\ifmmode\mskip\thinmuskip\else\thinspace\fi -} \def\@{\spacefactor\@m{}}% \DeclareRobustCommand\hspace{\@ifstar\@hspacer\@hspace} -\def\@hspace#1{\hskip #1\relax} +\def\@hspace#1{\begingroup\setlength\skip@{#1}\hskip\skip@\endgroup} + \def\@hspacer#1{\vrule \@width\z@\nobreak - \hskip #1\hskip \z@skip} + \@hspace{#1}\hskip \z@skip} \newskip\fill \fill = 0pt plus 1fill \def\stretch#1{\z@ \@plus #1fill\relax} -\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} \def\qquad{\hskip2em\relax} +\ifx\Umathcode\@undefined\else + \catcode "AD=13 + \def^^ad{\-} +\fi {\catcode`\^^M=13 \gdef\obeycr{\catcode`\^^M13 \def^^M{\\\relax}% \@gobblecr}% {\catcode`\^^M=13 \gdef\@gobblecr{\@ifnextchar @@ -1717,7 +3122,10 @@ Type H for immediate help.}% \newif\if@partsw \@partswfalse \newcount\@clubpenalty \@clubpenalty \clubpenalty -\def\document{\endgroup +\def\document{% + \UseOneTimeHook{begindocument/before}% + \@kernel@after@begindocument@before + \@expl@sys@load@backend@@ \ifx\@unusedoptionlist\@empty\else \@latex@warning@no@line{Unused global option(s):^^J% \@spaces[\@unusedoptionlist]}% @@ -1756,8 +3164,9 @@ Type H for immediate help.}% \fi \@noskipsecfalse \let \@refundefined \relax - \let\AtBeginDocument\@firstofone - \@begindocumenthook + \@kernel@before@begindocument + \UseOneTimeHook{begindocument}% + \@kernel@after@begindocument \ifdim\topskip<1sp\global\topskip 1sp\relax\fi \global\@maxdepth\maxdepth \global\let\@begindocumenthook\@undefined @@ -1769,7 +3178,19 @@ Type H for immediate help.}% \@preamblecmds \global\let \@nodocument \relax \global\let\do\noexpand + \UseOneTimeHook{begindocument/end}% \ignorespaces} +\NewHook{begindocument} +\NewHook{begindocument/before} +\NewHook{begindocument/end} + +\edef \@kernel@after@begindocument@before {% + \let\expandafter\noexpand\csname + __hook env/document/begin\endcsname + \noexpand\@empty} +\let \@kernel@before@begindocument \@empty +\let \@kernel@after@begindocument \@empty + \@onlypreamble\document \let\normalsfcodes\@empty \def\nofiles{% @@ -1791,24 +3212,43 @@ Type H for immediate help.}% \if@nobreak\ifvmode\nobreak\fi\fi } \let\@auxout=\@mainaux -\def\includeonly#1{% - \@partswtrue - \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 - \set@curr@file{#1 }% - \expandafter\@include\@curr@file + \set@curr@file{#1}% + \edef\@curr@file{\@strip@tex@ext\@curr@file}% + \expandafter\@include\expandafter{\@curr@file} % deliberate space \fi} - +\def\includeonly#1{% + \@partswtrue + \let\@partlist\@empty + \@for\reserved@a:=#1 \do + {% + \expandafter\set@curr@file\expandafter{\reserved@a}% + \ifx\@partlist\@empty + \edef\@partlist{\@strip@tex@ext\@curr@file}% + \else + \edef\@partlist{\@partlist,\@strip@tex@ext\@curr@file}% + \fi + }% + } +\@onlypreamble\includeonly +\def\reserved@a#1{% +\def\@strip@tex@ext##1{% + \expandafter\@strip@tex@ext@aux + ##1\@nil\@nil + #1\@nil\relax\@nnil} +\def\@strip@tex@ext@aux##1#1\@nil##2\@nnil{% + \ifx\relax##2\@empty + \expandafter\@cdr\expandafter\@empty\@cdr{}##1% + \else##1\fi}}% +\expandafter\reserved@a +\expandafter{\detokenize{.tex}} \def\@include#1 {% \clearpage \if@filesw - \immediate\write\@mainaux{\string\@input{#1.aux}}% + \immediate\write\@mainaux{\string\@input{"#1.aux"}}% \fi \@tempswatrue \if@partsw @@ -1820,10 +3260,18 @@ Type H for immediate help.}% \if@tempswa \let\@auxout\@partaux \if@filesw - \immediate\openout\@partaux #1.aux + \immediate\openout\@partaux "#1.aux" \immediate\write\@partaux{\relax}% \fi + \@filehook@set@CurrentFile + \UseHook{include/before}% + \UseHook{include/before/#1}% \@input@{#1.tex}% + \UseHook{include/end/#1}% + \UseHook{include/end}% + \clearpage + \UseHook{include/after/#1}% + \UseHook{include/after}% \clearpage \@writeckpt{#1}% \if@filesw @@ -1849,7 +3297,6 @@ Type H for immediate help.}% \gdef\@charlb[{] \gdef\@charrb[}] ]% }brace matching - \def\set@curr@file#1{% \begingroup \escapechar\m@ne @@ -1905,6 +3352,9 @@ Type H for immediate help.}% \edef\reserved@a{\noexpand\@missingfileerror {\filename@area\filename@base}% {\ifx\filename@ext\relax tex\else\filename@ext\fi}}% + \reserved@a + \edef\reserved@a{\noexpand\@iinput{% + \@missingfile@area\@missingfile@base.\@missingfile@ext}}% \reserved@a}} \def\@input#1{% @@ -1918,20 +3368,27 @@ Type H for immediate help.}% {\endlinechar\m@ne \global\read\m@ne to\@gtempa}% \ifx\@gtempa\@empty + \let\@missingfile@area\@empty + \let\@missingfile@base\@empty + \def\@missingfile@ext{tex}% \else - \def\reserved@a{x}\ifx\reserved@a\@gtempa\batchmode\@@end\fi - \def\reserved@a{X}\ifx\reserved@a\@gtempa\batchmode\@@end\fi + \def\reserved@b{\batchmode\read-1 to \reserved@a}% + \def\reserved@a{x}\ifx\reserved@a\@gtempa\reserved@b\fi + \def\reserved@a{X}\ifx\reserved@a\@gtempa\reserved@b\fi \filename@parse\@gtempa \edef\filename@ext{% \ifx\filename@ext\relax#2\else\filename@ext\fi}% \edef\reserved@a{% - \noexpand\InputIfFileExists + \noexpand\IfFileExists {\filename@area\filename@base.\filename@ext}% - {}% + {\def\noexpand\@missingfile@area{\filename@area}% + \def\noexpand\@missingfile@base{\filename@base}% + \def\noexpand\@missingfile@ext {\filename@ext}}% {\noexpand\@missingfileerror {\filename@area\filename@base}{\filename@ext}}}% \reserved@a - \fi} + \fi +} \def\@obsoletefile#1#2{% \@latex@warning@no@line{inputting `#1' instead of obsolete `#2'}} \@onlypreamble\@obsoletefile @@ -2078,7 +3535,7 @@ Type H for immediate help.}% \reserved@a ^^@}} \catcode\z@=15\relax \@onlypreamble\DeclareTextComposite -\DeclareRobustCommand\UseTextAccent[3]{% +\DeclareRobustCommand*\UseTextAccent[3]{% \hmode@start@before@group {% \let\hmode@start@before@group\@firstofone @@ -2086,7 +3543,7 @@ Type H for immediate help.}% \@use@text@encoding{#1}% #2{\@use@text@encoding\@curr@enc#3}% }} -\DeclareRobustCommand\UseTextSymbol[2]{% +\DeclareRobustCommand*\UseTextSymbol[2]{% \hmode@start@before@group {% \def\@wrong@font@char{\MessageBreak @@ -2395,7 +3852,7 @@ Type H for immediate help.}% \@latex@error{Font family `#1+#2' unknown}\@eha \else \edef\reserved@a{#3}% - \expandafter\series@maybe@drop@one@m\expandafter{#3}\reserved@b + \series@maybe@drop@one@m\reserved@a\reserved@b \ifx\reserved@a\reserved@b\else \@latex@warning{Font shape declaration has incorrect series value `#3'.\MessageBreak It should not contain an `m'! @@ -3303,15 +4760,18 @@ Type H for immediate help.}% \DeclareFontSeriesChangeRule {m}{sc}{msc}{mc} \def\set@target@series#1{% \edef\f@series{#1}% - \expandafter\series@maybe@drop@one@m\expandafter{\f@series}\f@series + \series@maybe@drop@one@m\f@series\f@series } -\def\series@maybe@drop@one@m#1#2{% +\def\series@maybe@drop@one@m#1{% + \expandafter\series@maybe@drop@one@m@x\expandafter{#1}} + +\def\series@maybe@drop@one@m@x#1#2{% \def\in@@##1,#1,{}% \series@check@toks\expandafter{\in@@ ,ulm,elm,lm,slm,mm,sbm,bm,ebm,ubm,muc,mec,mc,msc,msx,mx,mex,mux,{}{},#1,}% \edef\in@@{\the\series@check@toks}% \ifx\in@@\@empty - \def#2{#1}% + \edef#2{#1}% \else \edef#2{\expandafter\series@drop@one@m #1m\series@drop@one@m}% \fi @@ -3326,14 +4786,17 @@ Type H for immediate help.}% \DeclareRobustCommand\ulcshape {\not@math@alphabet\ulcshape\relax \fontshape\ulcdefault\selectfont} +\let\ulcdefault\@undefined % for rollback \newcommand\ulcdefault{ulc} \DeclareRobustCommand\swshape {\not@math@alphabet\swshape\relax \fontshape\swdefault\selectfont} +\let\swdefault\@undefined % for rollback \newcommand\swdefault{sw} \DeclareRobustCommand\sscshape {\not@math@alphabet\sscshape\relax \fontshape\sscdefault\selectfont} +\let\sscdefault\@undefined % for rollback \newcommand\sscdefault{ssc} \DeclareFontShapeChangeRule {n}{it} {it} {sl} \DeclareFontShapeChangeRule {n}{sl} {sl} {it} @@ -3429,6 +4892,8 @@ Type H for immediate help.}% {\not@math@alphabet\sscshape\relax \fontshape\sscdefault\selectfont}% } +\g@addto@macro\@kernel@after@begindocument@before + {\reinstall@nfss@defs\init@series@setup} %%% From File: ltfsstrc.dtx %% Copyright (C) 1989-97 by Frank Mittelbach and Rainer Sch\"opf. %% Copyright (C) 1994-97 by LaTeX3 project. All rights reserved. @@ -3854,7 +5319,7 @@ Type H for immediate help.}% \@eha \fi \else \expandafter\non@alpherr\fi - #1{#4}% + \expandafter#1\ifx\math@bgroup\bgroup{#4}\else#4\fi }% } \def\process@table{% @@ -3894,10 +5359,10 @@ Type H for immediate help.}% \fi \endgroup \let\select@group\document@select@group - \fontencoding{\encodingdefault}% - \fontfamily{\familydefault}% - \fontseries{\seriesdefault}% - \fontshape{\shapedefault}% + \fontencoding\encodingdefault + \edef\f@family{\familydefault}% + \edef\f@series{\seriesdefault}% + \edef\f@shape{\shapedefault}% \everyjob{}% } \@onlypreamble\process@table @@ -4605,13 +6070,16 @@ Type H for immediate help.}% \DeclareRobustCommand\itshape {\not@math@alphabet\itshape\mathit \fontshape\itdefault\selectfont} +\let\DeclareFontSeriesDefault\@undefined % for rollback \newcommand\DeclareFontSeriesDefault[3][]{% \def\reserved@a{#1}% \ifx\reserved@a\@empty \ifcsname #2series\endcsname % supported are % \[md/bf]default \expandafter\def - \csname #2default\endcsname{#3}% + \csname #2default\endcsname{#3\@empty}% + \expandafter\def + \csname #2default@previous\endcsname{#3\@empty}% \else \@latex@error{Wrong syntax for \string\DeclareFontSeriesDefault}% {Mandatory first argument must be 'md' or 'bf'.} @@ -4641,55 +6109,6 @@ Type H for immediate help.}% \def\mdseries@sf{m} \def\mdseries@tt{m} -\def\expand@font@defaults{% - \edef\rmdef@ult{\rmdefault}% - \edef\sfdef@ult{\sfdefault}% - \edef\ttdef@ult{\ttdefault}% - \edef\bfdef@ult{\bfdefault}% - \edef\mddef@ult{\mddefault}% - \edef\famdef@ult{\familydefault}% -} - -\DeclareRobustCommand\bfseries{% - \not@math@alphabet\bfseries\mathbf - \expand@font@defaults - \ifx\f@family\rmdef@ult \fontseries\bfseries@rm - \else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf - \else\ifx\f@family\ttdef@ult \fontseries\bfseries@tt - \else \fontseries\bfdefault - \fi\fi\fi - \selectfont -} - -\DeclareRobustCommand\mdseries{% - \not@math@alphabet\mdseries\relax - \expand@font@defaults - \ifx\f@family\rmdef@ult \fontseries\mdseries@rm - \else\ifx\f@family\sfdef@ult \fontseries\mdseries@sf - \else\ifx\f@family\ttdef@ult \fontseries\mdseries@tt - \else \fontseries\mddefault - \fi\fi\fi - \selectfont -} - -\DeclareRobustCommand\rmfamily{% - \not@math@alphabet\rmfamily\mathrm - \prepare@family@series@update{rm}\rmdefault - \@rmfamilyhook - \selectfont} -\DeclareRobustCommand\sffamily{% - \not@math@alphabet\sffamily\mathsf - \prepare@family@series@update{sf}\sfdefault - \@sffamilyhook - \selectfont} -\DeclareRobustCommand\ttfamily{% - \not@math@alphabet\ttfamily\mathtt - \prepare@family@series@update{tt}\ttdefault - \@ttfamilyhook - \selectfont} -\let\@rmfamilyhook\@empty -\let\@sffamilyhook\@empty -\let\@ttfamilyhook\@empty \def\@meta@family@list{\@elt{rm}\@elt{sf}\@elt{tt}} \def\prepare@family@series@update#1#2{% \if@forced@series @@ -4709,7 +6128,7 @@ Type H for immediate help.}% \ifx \f@series\target@series@value \else \maybe@load@fontshape - \let\f@series\target@series@value + \series@maybe@drop@one@m\target@series@value\f@series \fi \fi \fi @@ -4724,9 +6143,14 @@ Type H for immediate help.}% \csname mdseries@\target@meta@family@value\endcsname \expandafter\let\expandafter\reserved@c \csname bfseries@\target@meta@family@value\endcsname - \expandafter\ifx\csname mdseries@#1\endcsname\f@series + \expandafter\series@maybe@drop@one@m + \csname mdseries@#1\endcsname\reserved@d + \ifx\reserved@d\f@series \let\target@series@value\reserved@b - \else\expandafter\ifx\csname bfseries@#1\endcsname\f@series + \else + \expandafter\series@maybe@drop@one@m + \csname bfseries@#1\endcsname\reserved@d + \ifx\reserved@d\f@series \let\target@series@value\reserved@c \else\ifx\f@series\mddef@ult \let\target@series@value\reserved@b \else\ifx\f@series\bfdef@ult \let\target@series@value\reserved@c @@ -4736,56 +6160,168 @@ Type H for immediate help.}% } \def\init@series@setup{% \ifx\bfseries@rm@kernel\bfseries@rm - \expandafter\in@\expandafter{\rmdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% + \expandafter\in@\expandafter{\rmdefault}% + {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% \ifin@ \else \def\bfseries@rm{b}\fi\fi \ifx\bfseries@sf@kernel\bfseries@sf - \expandafter\in@\expandafter{\sfdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% + \expandafter\in@\expandafter{\sfdefault}% + {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% \ifin@ \else \def\bfseries@sf{b}\fi\fi \ifx\bfseries@tt@kernel\bfseries@tt - \expandafter\in@\expandafter{\ttdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% + \expandafter\in@\expandafter{\ttdefault}% + {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% \ifin@ \else \def\bfseries@tt{b}\fi\fi - - \expand@font@defaults - \ifx\famdef@ult\rmdef@ult \rmfamily - \else\ifx\famdef@ult\sfdef@ult \sffamily - \else\ifx\famdef@ult\ttdef@ult \ttfamily - \fi\fi\fi + \reset@font + \ifx\seriesdefault\seriesdefault@kernel + \mdseries + \let\seriesdefault\f@series + \fi }% \expandafter\let\csname ver@mweights.sty\endcsname\fmtversion -\def\DeclareEmphSequence#1{% - \protected@edef\emfontdeclare@clist{\zap@space#1, \@empty\emforce\emreset}% +\def\expand@font@defaults{% + \edef\rmdef@ult{\rmdefault}% + \edef\sfdef@ult{\sfdefault}% + \edef\ttdef@ult{\ttdefault}% + \series@maybe@drop@one@m\bfdefault\bfdef@ult + \series@maybe@drop@one@m\mddefault\mddef@ult + \UseHook{expand@font@defaults}% } -\let\emfontdeclare@clist\@empty - -\DeclareRobustCommand\emreset{\upshape\ulcshape} -\DeclareRobustCommand\em{% - \@nomath\em - \ifx\emfontdeclare@clist\@empty - \ifdim \fontdimen\@ne\font >\z@ - \eminnershape \else \itshape \fi - \else - \edef\em@currfont{\csname\curr@fontshape/\f@size\endcsname}% - \expandafter\do@emfont@update\emfontdeclare@clist\do@emfont@update +\DeclareRobustCommand\bfseries{% + \not@math@alphabet\bfseries\mathbf + \expand@font@defaults + \ifx\bfdefault\bfdefault@previous\else + \expandafter\def\expandafter\bfdefault + \expandafter{\bfdefault\@empty}% + \let\bfdefault@previous\bfdefault + \let\bfseries@rm\bfdef@ult + \let\bfseries@sf\bfdef@ult + \let\bfseries@tt\bfdef@ult + \UseHook{bfseries/defaults}% \fi + \ifx\f@family\rmdef@ult \fontseries\bfseries@rm + \else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf + \else\ifx\f@family\ttdef@ult \fontseries\bfseries@tt + \else \fontseries\bfdefault + \fi\fi\fi + \UseHook{bfseries}% + \selectfont } -\def\eminnershape{\upshape} -\def\do@emfont@update#1,#2\do@emfont@update{% - \def\emfontdeclare@clist{#2,#1}% - #1\selectfont - \expandafter\ifx\csname \curr@fontshape/\f@size\em@force - \expandafter\endcsname - \em@currfont - \expandafter\do@emfont@update\emfontdeclare@clist\do@emfont@update - \else - \let\em@force\@empty + +\DeclareRobustCommand\mdseries{% + \not@math@alphabet\mdseries\relax + \expand@font@defaults + \ifx\mddefault\mddefault@previous\else + \expandafter\def\expandafter\mddefault\expandafter{\mddefault\@empty}% + \let\mddefault@previous\mddefault + \let\mdseries@rm\mddef@ult + \let\mdseries@sf\mddef@ult + \let\mdseries@tt\mddef@ult + \UseHook{mdseries/defaults}% \fi + \ifx\f@family\rmdef@ult \fontseries\mdseries@rm + \else\ifx\f@family\sfdef@ult \fontseries\mdseries@sf + \else\ifx\f@family\ttdef@ult \fontseries\mdseries@tt + \else \fontseries\mddefault + \fi\fi\fi + \UseHook{mdseries}% + \selectfont } -\protected\def\emforce{\def\em@force{/}} -\let\em@force\@empty - +\DeclareRobustCommand\rmfamily{% + \not@math@alphabet\rmfamily\mathrm + \prepare@family@series@update{rm}\rmdefault + \UseHook{rmfamily}% + \selectfont} +\DeclareRobustCommand\sffamily{% + \not@math@alphabet\sffamily\mathsf + \prepare@family@series@update{sf}\sfdefault + \UseHook{sffamily}% + \selectfont} +\DeclareRobustCommand\ttfamily{% + \not@math@alphabet\ttfamily\mathtt + \prepare@family@series@update{tt}\ttdefault + \UseHook{ttfamily}% + \selectfont} +\NewHook{rmfamily} +\NewHook{sffamily} +\NewHook{ttfamily} +\NewHook{normalfont} +\NewHook{expand@font@defaults} +\NewHook{bfseries} +\NewHook{bfseries/defaults} +\NewHook{mdseries} +\NewHook{mdseries/defaults} +\let\@rmfamilyhook\@empty +\let\@sffamilyhook\@empty +\let\@ttfamilyhook\@empty +\let\@defaulfamilyhook\@empty +\DeclareRobustCommand\IfFontSeriesContextTF[1]{% + \expand@font@defaults + \@font@series@contextfalse + \def\requested@test@context{#1}% + \expandafter\edef\csname ??def@ult\endcsname{\f@family}% + \let\@elt\test@font@series@context + \@meta@family@list + \@elt{??}% + \let\@elt\relax + \if@font@series@context + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} + +\def\test@font@series@context#1{% + \edef\reserved@a{\csname #1def@ult\endcsname}% + \ifx\f@family\reserved@a + \let\@elt\@gobble + \expandafter\ifx + \csname\requested@test@context series@#1\endcsname\f@series + \@font@series@contexttrue + \else + \expandafter\ifx + \csname\requested@test@context def@ult\endcsname\f@series + \@font@series@contexttrue + \fi\fi\fi +} + +\newif\if@font@series@context + +\def\DeclareEmphSequence#1{% + \protected@edef\emfontdeclare@clist{\zap@space#1, \@empty\emforce\emreset}% +} +\let\emfontdeclare@clist\@empty + +\DeclareRobustCommand\emreset{\upshape\ulcshape} + +\DeclareRobustCommand\em{% + \@nomath\em + \ifx\emfontdeclare@clist\@empty + \ifdim \fontdimen\@ne\font >\z@ + \eminnershape \else \itshape \fi + \else + \edef\em@currfont{\csname\curr@fontshape/\f@size\endcsname}% + \expandafter\do@emfont@update\emfontdeclare@clist\do@emfont@update + \fi +} +\def\eminnershape{\upshape} +\def\do@emfont@update#1,#2\do@emfont@update{% + \def\emfontdeclare@clist{#2,#1}% + #1\selectfont + \expandafter\ifx\csname \curr@fontshape/\f@size\em@force + \expandafter\endcsname + \em@currfont + \expandafter\do@emfont@update\emfontdeclare@clist\do@emfont@update + \else + \let\em@force\@empty + \fi +} + +\protected\def\emforce{\def\em@force{/}} +\let\em@force\@empty + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\not@math@alphabet#1#2{% @@ -4810,7 +6346,11 @@ Type H for immediate help.}% \mathversion{normal}} \def\math@version{normal} \def\newfont#1#2{\@ifdefinable#1{\font#1=#2\relax}} -\DeclareRobustCommand\symbol[1]{\char #1\relax} +\ifdefined\XeTeXversion + \DeclareRobustCommand\symbol[1]{\Ucharcat#1 12\relax} +\else + \DeclareRobustCommand\symbol[1]{\char#1\relax} +\fi \def\@setfontsize#1#2#3{\@nomath#1% \ifx\protect\@typeset@protect \let\@currsize#1% @@ -4826,10 +6366,11 @@ Type H for immediate help.}% \edef\f@family{\familydefault}% \edef\f@series{\seriesdefault}% \edef\f@shape{\shapedefault}% - \@defaultfamilyhook + \UseHook{normalfont}% + \@defaultfamilyhook % hookname from 2020/02 will vanish \selectfont} \let\reset@font\normalfont -\let\@defaultfamilyhook\@empty +\let\@defaultfamilyhook\@empty %FMi sort out \def\not@base#1{\@latex@error {Command \noexpand#1not provided in base LaTeX2e}% {Load the latexsym or the amsfonts package to @@ -4883,6 +6424,8 @@ Type H for immediate help.}% } {\input{preload.ltx}} \let\@addtofilelist\@gobble +\expandafter\def\expandafter\seriesdefault\expandafter{\seriesdefault\@empty} +\let\seriesdefault@kernel\seriesdefault \let\@acci\' \let\@accii\` \let\@acciii\= %%% From File: ltfntcmd.dtx %% @@ -5197,22 +6740,22 @@ Type H for immediate help.}% \DeclareTextCommandDefault{\newtie} {\tc@check@accent{\t}2\newtie} \DeclareTextCommandDefault{\capitalnewtie} {\tc@check@accent{\t}2\capitalnewtie} \else - \def\capitalacute{\@tabacckludge'} - \def\capitalbreve{\u} - \def\capitalcaron{\v} - \def\capitalcedilla{\c} - \def\capitalcircumflex{\^} - \def\capitaldieresis{\"} - \def\capitaldotaccent{\.} - \def\capitalgrave{\@tabacckludge`} - \def\capitalhungarumlaut{\H} - \def\capitalmacron{\@tabacckludge=} - \def\capitalnewtie{\t} - \def\capitalogonek{\k} - \def\capitalring{\r} - \def\capitaltie{\t} - \def\capitaltilde{\~} - \def\newtie{\t} + \DeclareTextCommandDefault\capitalacute{\@tabacckludge'} + \DeclareTextCommandDefault\capitalbreve{\u} + \DeclareTextCommandDefault\capitalcaron{\v} + \DeclareTextCommandDefault\capitalcedilla{\c} + \DeclareTextCommandDefault\capitalcircumflex{\^} + \DeclareTextCommandDefault\capitaldieresis{\"} + \DeclareTextCommandDefault\capitaldotaccent{\.} + \DeclareTextCommandDefault\capitalgrave{\@tabacckludge`} + \DeclareTextCommandDefault\capitalhungarumlaut{\H} + \DeclareTextCommandDefault\capitalmacron{\@tabacckludge=} + \DeclareTextCommandDefault\capitalnewtie{\t} + \DeclareTextCommandDefault\capitalogonek{\k} + \DeclareTextCommandDefault\capitalring{\r} + \DeclareTextCommandDefault\capitaltie{\t} + \DeclareTextCommandDefault\capitaltilde{\~} + \DeclareTextCommandDefault\newtie{\t} \fi \DeclareTextCommandDefault{\textlbrackdbl} {\tc@check@symbol2\textlbrackdbl} \DeclareTextCommandDefault{\textrbrackdbl} {\tc@check@symbol2\textrbrackdbl} @@ -5566,7 +7109,9 @@ Type H for immediate help.}% \protected@write\@auxout{}% {\string\newlabel{#1}{{\@currentlabel}{\thepage}}}% \@esphack} +\def\@currentcounter{} \def\refstepcounter#1{\stepcounter{#1}% + \edef\@currentcounter{#1}% \protected@edef\@currentlabel {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}% } @@ -5582,10 +7127,12 @@ Type H for immediate help.}% \@ignorefalse \let\ignorespacesafterend\@ignoretrue \def\enddocument{% - \let\AtEndDocument\@firstofone - \@enddocumenthook + \UseOneTimeHook{enddocument}% + \@kernel@after@enddocument \@checkend{document}% \clearpage + \UseOneTimeHook{enddocument/afterlastpage}% + \@kernel@after@enddocument@afterlastpage \begingroup \if@filesw \immediate\closeout\@mainaux @@ -5594,25 +7141,43 @@ Type H for immediate help.}% \@tempswafalse \makeatletter \@@input\jobname.aux \fi - \@dofilelist - \ifdim \font@submax >\fontsubfuzz\relax - \@font@warning{Size substitutions with differences\MessageBreak - up to \font@submax\space have occurred.\@gobbletwo}% - \fi - \@defaultsubs - \@refundefined - \if@filesw - \ifx \@multiplelabels \relax - \if@tempswa - \@latex@warning@no@line{Label(s) may have changed. - Rerun to get cross-references right}% - \fi - \else - \@multiplelabels - \fi - \fi + \UseHook{enddocument/afteraux}% + \UseOneTimeHook{enddocument/info}% \endgroup + \UseOneTimeHook{enddocument/end}% \deadcycles\z@\@@end} +\NewHook{enddocument} +\NewHook{enddocument/afterlastpage} +\NewHook{enddocument/afteraux} +\NewHook{enddocument/info} +\NewHook{enddocument/end} +\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist} +\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings} +\DeclareHookRule{enddocument/info}{kernel/filelist}{before}{kernel/warnings} +\let\@kernel@after@enddocument\@empty +\let\@kernel@after@enddocument@afterlastpage\@empty +\def\@enddocument@kernel@warnings{% + \ifdim \font@submax >\fontsubfuzz\relax + \@font@warning{Size substitutions with differences\MessageBreak + up to \font@submax\space have occurred.\@gobbletwo}% + \fi + \@defaultsubs + \@refundefined + \if@filesw + \ifx \@multiplelabels \relax + \if@tempswa + \@latex@warning@no@line{Label(s) may have changed. + Rerun to get cross-references right}% + \fi + \else + \@multiplelabels + \fi + \ifx \@extra@page@added \relax + \@latex@warning@no@line{Temporary extra page added at the end. + Rerun to get it removed}% + \fi + \fi +} \def\@testdef #1#2#3{% \def\reserved@a{#3}\expandafter \ifx \csname #1@#2\endcsname \reserved@a \else \@tempswatrue \fi} @@ -5643,14 +7208,24 @@ Type H 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} -\DeclareRobustCommand\begin[1]{% +\DeclareRobustCommand*\begin[1]{% + \UseHook{env/#1/before}% \@ifundefined{#1}% {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}% {\def\reserved@a{\def\@currenvir{#1}% - \edef\@currenvline{\on@line}% - \csname #1\endcsname}}% + \edef\@currenvline{\on@line}% + \@execute@begin@hook{#1}% + \csname #1\endcsname}}% \@ignorefalse \begingroup\@endpefalse\reserved@a} +\def\@execute@begin@hook #1{% + \expandafter\ifx\csname #1\endcsname\document + \endgroup + \gdef\@execute@begin@hook##1{\UseHook{env/##1/begin}}% + \@expl@@@initialize@all@@ + \fi + \UseHook{env/#1/begin}% +} \edef\end {\unexpanded{% \romannumeral @@ -5670,31 +7245,44 @@ Type H for immediate help.}% \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} + \romannumeral + \IfHookEmptyTF{env/#1/end}% + {\expandafter\z@}% + {\z@\UseHook{env/#1/end}}% + \csname end#1\endcsname\@checkend{#1}% + \expandafter\endgroup\if@endpe\@doendpe\fi + \UseHook{env/#1/after}% + \if@ignore\@ignorefalse\ignorespaces\fi +} \def\@checkend#1{\def\reserved@a{#1}\ifx \reserved@a\@currenvir \else\@badend{#1}\fi} \let\@currenvline\@empty +\newcommand\AtBeginEnvironment[2][.] {\AddToHook{env/#2/begin}[#1]} +\newcommand\AtEndEnvironment[2][.] {\AddToHook{env/#2/end}[#1]} +\newcommand\BeforeBeginEnvironment[2][.]{\AddToHook{env/#2/before}[#1]} +\newcommand\AfterEndEnvironment[2][.] {\AddToHook{env/#2/after}[#1]} \message{center,} \protected\def\@centercr{\ifhmode \unskip\else \@nolnerr\fi \par\@ifstar{\nobreak\@xcentercr}\@xcentercr} \def\@xcentercr{\addvspace{-\parskip}\@ifnextchar [\@icentercr\ignorespaces} -\def\@icentercr[#1]{\vskip #1\ignorespaces} +\def\@icentercr[#1]{\@vspace@calcify{#1}\ignorespaces} \def\center{\trivlist \centering\item\relax} \def\endcenter{\endtrivlist} \DeclareRobustCommand\centering{% \let\\\@centercr \rightskip\@flushglue\leftskip\@flushglue + \finalhyphendemerits=\z@ \parindent\z@\parfillskip\z@skip} \DeclareRobustCommand\raggedright{% \let\\\@centercr\@rightskip\@flushglue \rightskip\@rightskip + \finalhyphendemerits=\z@ \leftskip\z@skip \parindent\z@} \DeclareRobustCommand\raggedleft{% \let\\\@centercr \rightskip\z@skip\leftskip\@flushglue + \finalhyphendemerits=\z@ \parindent\z@\parfillskip\z@skip} \newskip\@rightskip \@rightskip \z@skip \def\flushleft{\trivlist \raggedright\item\relax} @@ -5749,7 +7337,12 @@ Type H for immediate help.}% } \newbox\@verbvisiblespacebox -\def\@sverb#1{% +\@namedef{verbatim*}{\@verbatim + \@setupverbvisiblespace + \frenchspacing\@vobeyspaces\@sxverbatim} +\expandafter\let\csname endverbatim*\endcsname =\endverbatim +\def\@sverb#1{\if\noexpand#1 \expandafter\@sverb\else\@@sverb{#1}\fi} +\def\@@sverb#1{% \catcode`#1\active \lccode`\~`#1% \gdef\verb@balance@group{\verb@egroup @@ -5759,10 +7352,6 @@ Type H for immediate help.}% \ifnum\catcode`\ =\active \else \@setupverbvisiblespace \@vobeyspaces \fi } -\@namedef{verbatim*}{\@verbatim - \@setupverbvisiblespace - \frenchspacing\@vobeyspaces\@sxverbatim} -\expandafter\let\csname endverbatim*\endcsname =\endverbatim \def\@makeother#1{\catcode`#112\relax} \let\verb@balance@group\@empty \def\verb@egroup{\global\let\verb@balance@group\@empty\egroup} @@ -5895,13 +7484,13 @@ Type H 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}}} -\DeclareRobustCommand\cases[1]{\left\{\,\vcenter{\normalbaselines\m@th +\DeclareRobustCommand*\cases[1]{\left\{\,\vcenter{\normalbaselines\m@th \ialign{$##\hfil$&\quad{##}\hfil\crcr#1\crcr}}\right.} -\DeclareRobustCommand\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}}}\,} -\DeclareRobustCommand\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{% @@ -5931,11 +7520,21 @@ Type H for immediate help.}% #1\crcr}} \let\sp=^ \let\sb=_ -\def\>{\mskip\medmuskip} -\def\;{\mskip\thickmuskip} -\def\!{\mskip-\thinmuskip} + +\DeclareRobustCommand\tmspace[3]{% + \ifmmode\mskip#1#2\else\leavevmode@ifvmode\kern#1#3\fi\relax} +\DeclareRobustCommand\,{\tmspace+\thinmuskip{.16667em}} +\let\thinspace\, +\DeclareRobustCommand\!{\tmspace-\thinmuskip{.16667em}} +\let\negthinspace\! +\DeclareRobustCommand\:{\tmspace+\medmuskip{.2222em}} +\let\medspace\: +\let\>=\: +\DeclareRobustCommand\negmedspace{\tmspace-\medmuskip{.2222em}} +\DeclareRobustCommand\;{\tmspace+\thickmuskip{.2777em}} +\let\thickspace\; +\DeclareRobustCommand\negthickspace{\tmspace-\thickmuskip{.2777em}} \DeclareRobustCommand\*{\discretionary{\thinspace\the\textfont2\char2}{}{}} -\let\:=\> \def\active@math@prime{^\bgroup\prim@s} {\catcode`\'=\active \global\let'\active@math@prime} \def\prim@s{% @@ -6035,7 +7634,7 @@ Type H for immediate help.}% \def\@xeqncr[#1]{% \ifnum0=`{\fi}% \@@eqncr - \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}% + \noalign{\penalty\@eqpen\vskip\jot\@vspace@calcify{#1}}% } \def\@@eqncr{\let\reserved@a\relax \ifcase\@eqcnt \def\reserved@a{& & &}\or \def\reserved@a{& &}% @@ -6331,7 +7930,8 @@ Type H for immediate help.}% \def\@makepicbox(#1,#2){% \@ifnextchar[{\@imakepicbox(#1,#2)}{\@imakepicbox(#1,#2)[]}} \long\def\@imakepicbox(#1,#2)[#3]#4{% - \vbox to#2\unitlength + \@defaultunitsset\@tempdimc{#2}\unitlength + \vbox to\@tempdimc {\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss \let\mb@t\vss \@tfor\reserved@a :=#3\do{% @@ -6341,7 +7941,8 @@ Type H for immediate help.}% \expandafter\let\csname mb@\reserved@a\endcsname\relax \fi}% \mb@t - \hb@xt@ #1\unitlength{\mb@l #4\mb@r}% + \@defaultunitsset\@tempdimc{#1}\unitlength + \hb@xt@\@tempdimc{\mb@l #4\mb@r}% \mb@b \kern\z@}} \let\set@color\relax @@ -6595,6 +8196,7 @@ Type H for immediate help.}% \DeclareRobustCommand\centerline[1]{\@@line{\hss#1\hss}} \DeclareRobustCommand\rlap[1]{\hb@xt@\z@{#1\hss}} \DeclareRobustCommand\llap[1]{\hb@xt@\z@{\hss#1}} +\DeclareRobustCommand\clap[1]{\hb@xt@\z@{\hss#1\hss}} %%% From File: lttab.dtx \expandafter\let\csname ver@autotabg.sty\endcsname\fmtversion \newdimen\@gtempa @@ -6652,7 +8254,7 @@ Type H for immediate help.}% \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\@itabcr[#1]{\@vspace@calcify{#1}\@startline\ignorespaces} \def\tabbing{\lineskip \z@skip\let\>\@rtab\let\<\@ltab\let\=\@settab \let\+\@tabplus\let\-\@tabminus\let\`\@tabrj\let\'\@tablab \let\\=\@tabcr @@ -6787,7 +8389,7 @@ Type H for immediate help.}% \fi} \def\@xargarraycr#1{\@tempdima #1\advance\@tempdima \dp \@arstrutbox \vrule \@height\z@ \@depth\@tempdima \@width\z@ \cr} -\def\@yargarraycr#1{\cr\noalign{\vskip #1}} +\def\@yargarraycr#1{\cr\noalign{\@vspace@calcify{#1}}} \long\def\multicolumn#1#2#3{\multispan{#1}\begingroup \@mkpream{#2}% \def\@sharp{#3}\set@typeset@protect @@ -6951,41 +8553,54 @@ Type H for immediate help.}% \newdimen\unitlength \unitlength =1pt \newbox\@picbox \newdimen\@picht +\def\@defaultunitsset#1#2#3{% + \@defaultunits#1\dimexpr#2#3\relax\relax\@nnil} \long\def\picture#1{\pictur@#1} \def\pictur@(#1){% \@ifnextchar({\@picture(#1)}{\@picture(#1)(0,0)}} \def\@picture(#1,#2)(#3,#4){% - \@picht#2\unitlength - \setbox\@picbox\hb@xt@#1\unitlength\bgroup - \hskip -#3\unitlength - \lower #4\unitlength\hbox\bgroup + \@defaultunitsset\@picht{#2}\unitlength + \@defaultunitsset\@tempdimc{#1}\unitlength + \setbox\@picbox\hb@xt@\@tempdimc\bgroup + \@defaultunitsset\@tempdimc{#3}\unitlength + \hskip -\@tempdimc + \@defaultunitsset\@tempdimc{#4}\unitlength + \lower\@tempdimc\hbox\bgroup \ignorespaces} \def\endpicture{% \egroup\hss\egroup \ht\@picbox\@picht\dp\@picbox\z@ \mbox{\box\@picbox}} \long\def\put(#1,#2)#3{% - \@killglue\raise#2\unitlength - \hb@xt@\z@{\kern#1\unitlength #3\hss}% + \@killglue + \@defaultunitsset\@tempdimc{#2}\unitlength + \raise\@tempdimc + \hb@xt@\z@{% + \@defaultunitsset\@tempdimc{#1}\unitlength + \kern\@tempdimc + #3\hss}% \ignorespaces} \def\multiput(#1,#2)#3{% - \@xdim #1\unitlength - \@ydim #2\unitlength + \@defaultunitsset\@xdim{#1}\unitlength + \@defaultunitsset\@ydim{#2}\unitlength \@multiput(} \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}% + \@defaultunitsset{\advance\@xdim}{#1}\unitlength + \@defaultunitsset{\advance\@ydim}{#2}\unitlength}% \ignorespaces} \def\@killglue{\unskip\@whiledim \lastskip >\z@\do{\unskip}} -\DeclareRobustCommand\thinlines{\let\@linefnt\tenln \let\@circlefnt\tencirc +\DeclareRobustCommand\thinlines{\let\@linefnt\tenln + \let\@circlefnt\tencirc \@wholewidth\fontdimen8\tenln \@halfwidth .5\@wholewidth} -\DeclareRobustCommand\thicklines{\let\@linefnt\tenlnw \let\@circlefnt\tencircw +\DeclareRobustCommand\thicklines{\let\@linefnt\tenlnw + \let\@circlefnt\tencircw \@wholewidth\fontdimen8\tenlnw \@halfwidth .5\@wholewidth} -\DeclareRobustCommand\linethickness[1] - {\@wholewidth #1\relax \@halfwidth .5\@wholewidth} +\DeclareRobustCommand*\linethickness[1] + {\@wholewidth #1\relax \@halfwidth .5\@wholewidth \ignorespaces} \def\shortstack{\@ifnextchar[\@shortstack{\@shortstack[c]}} \def\@shortstack[#1]{% \leavevmode @@ -6998,10 +8613,10 @@ Type H for immediate help.}% \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} +\def\@istackcr[#1]{\cr\noalign{\@vspace@calcify{#1}}\ignorespaces} \newif\if@negarg \def\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax - \@linelen #3\unitlength + \@defaultunitsset\@linelen{#3}\unitlength \ifdim\@linelen<\z@\@badlinearg\else \ifnum\@xarg =\z@ \@vline \else \ifnum\@yarg =\z@ \@hline \else \@sline\fi @@ -7059,7 +8674,7 @@ Type H for immediate help.}% \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 + \@defaultunitsset\@linelen{#3}\unitlength \ifdim\@linelen<\z@\@badlinearg\else \ifnum\@xarg =\z@ \@vvector \else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi @@ -7112,9 +8727,10 @@ Type H for immediate help.}% \hss}} \def\dashbox#1(#2,#3){\leavevmode\hb@xt@\z@{\baselineskip \z@skip \lineskip \z@skip -\@dashdim #2\unitlength +\@defaultunitsset\@dashdim{#2}\unitlength \@dashcnt \@dashdim \advance\@dashcnt 200 -\@dashdim #1\unitlength\divide\@dashcnt \@dashdim +\@defaultunitsset\@dashdim{#1}\unitlength +\divide\@dashcnt \@dashdim \ifodd\@dashcnt\@dashdim \z@ \advance\@dashcnt \@ne \divide\@dashcnt \tw@ \else \divide\@dashdim \tw@ \divide\@dashcnt \tw@ @@ -7126,15 +8742,19 @@ Type H for immediate help.}% \put(#2,#3){\hskip-\@dashdim\box\@dashbox}% \multiply\@dashdim \thr@@ \fi -\setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth -\@width #1\unitlength\hskip #1\unitlength}\@tempcnta\z@ +\setbox\@dashbox \hbox{% + \@defaultunitsset\@tempdimc{#1}\unitlength + \vrule \@height \@halfwidth \@depth \@halfwidth \@width \@tempdimc + \hskip\@tempdimc}% +\@tempcnta\z@ \put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt \do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@ \put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt \do{\copy\@dashbox\advance\@tempcnta \@ne }}% -\@dashdim #3\unitlength +\@defaultunitsset\@dashdim{#3}\unitlength \@dashcnt \@dashdim \advance\@dashcnt 200 -\@dashdim #1\unitlength\divide\@dashcnt \@dashdim +\@defaultunitsset\@dashdim{#1}\unitlength +\divide\@dashcnt \@dashdim \ifodd\@dashcnt \@dashdim \z@ \advance\@dashcnt \@ne \divide\@dashcnt \tw@ \else @@ -7148,13 +8768,15 @@ Type H for immediate help.}% \put(#2,#3){\lower\@dashdim\copy\@dashbox}% \multiply\@dashdim \thr@@ \fi -\setbox\@dashbox\hbox{\vrule \@width \@wholewidth -\@height #1\unitlength}\@tempcnta\z@ +\@defaultunitsset\@tempdimb{#1}\unitlength +\setbox\@dashbox\hbox{% + \vrule \@width \@wholewidth \@height\@tempdimb}% +\@tempcnta\z@ \put(0,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt -\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }% +\do{\vskip\@tempdimb\copy\@dashbox\advance\@tempcnta \@ne }% \vskip\@dashdim}}\@tempcnta\z@ \put(#2,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta<\@dashcnt -\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }% +\do{\vskip\@tempdimb\copy\@dashbox\advance\@tempcnta \@ne }% \vskip\@dashdim}}}\@makepicbox(#2,#3)} \newif\if@ovt \newif\if@ovb @@ -7188,9 +8810,10 @@ Type H for immediate help.}% \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}% - \@ovxx #1\unitlength - \@ovyy #2\unitlength + \@tfor\reserved@a :=#3\do{% + \csname @ov\reserved@a false\endcsname}% + \@defaultunitsset\@ovxx{#1}\unitlength + \@defaultunitsset\@ovyy{#2}\unitlength \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx \@ovvlinetrue \else \@ovyy \ifdim \@ovyy =\@ovxx \else \@ovhlinetrue \fi\fi \advance \@tempdimb -2\p@ @@ -7225,7 +8848,8 @@ Type H for immediate help.}% \kern \@ovri}} \def\circle{\@inmatherr\circle\@ifstar\@dot\@circle} \def\@circle#1{% - \begingroup \boxmaxdepth \maxdimen \@tempdimb #1\unitlength + \begingroup \boxmaxdepth \maxdimen + \@defaultunitsset\@tempdimb{#1}\unitlength \ifdim \@tempdimb >15.5\p@ \@getcirc\@tempdimb \@ovro\ht\@tempboxa \setbox\@tempboxa\hbox{\@circlefnt @@ -7236,7 +8860,9 @@ Type H for immediate help.}% \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@ \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}% \else \@circ\@tempdimb{96}\fi\endgroup} -\def\@dot#1{\@tempdimb #1\unitlength \@circ\@tempdimb{112}} +\def\@dot#1{% + \@defaultunitsset\@tempdimb{#1}\unitlength + \@circ\@tempdimb{112}} \def\@circ#1#2{\@tempdima #1\relax \advance\@tempdima .5\p@ \@tempcnta\@tempdima \@tempdima \p@ \divide\@tempcnta\@tempdima @@ -7266,33 +8892,39 @@ Type H for immediate help.}% \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 + \@defaultunitsset\@ovxx{#4}\unitlength + \@defaultunitsset{\advance\@ovxx}{-#2}\unitlength \ifdim \@ovxx<\z@ \@ovxx -\@ovxx \fi - \@ovdx #6\unitlength - \advance\@ovdx -#4\unitlength + \@defaultunitsset\@ovdx{#6}\unitlength + \@defaultunitsset{\advance\@ovdx}{-#4}\unitlength \ifdim \@ovdx<\z@ \@ovdx -\@ovdx \fi \ifdim \@ovxx<\@ovdx \@ovxx \@ovdx \fi - \@ovyy #5\unitlength - \advance\@ovyy -#3\unitlength + \@defaultunitsset\@ovyy{#5}\unitlength + \@defaultunitsset{\advance\@ovyy}{-#3}\unitlength \ifdim \@ovyy<\z@ \@ovyy -\@ovyy \fi - \@ovdy #7\unitlength - \advance\@ovdy -#5\unitlength + \@defaultunitsset\@ovdy{#7}\unitlength + \@defaultunitsset{\advance\@ovdy}{-#5}\unitlength \ifdim \@ovdy<\z@ \@ovdy -\@ovdy \fi \ifdim \@ovyy<\@ovdy \@ovyy \@ovdy \fi \@multicnt \ifdim \@ovxx>\@ovyy \@ovxx \else \@ovyy \fi \@ovxx .5\@halfwidth \divide\@multicnt\@ovxx - \ifnum \qbeziermax<\@multicnt \@multicnt\qbeziermax\relax \fi + \ifnum \qbeziermax<\@multicnt + \@multicnt\qbeziermax\relax + \fi \else \@multicnt#1\relax \fi \@tempcnta\@multicnt \advance\@tempcnta\@ne - \@ovdx #4\unitlength \advance\@ovdx -#2\unitlength + \@defaultunitsset\@ovdx{#4}\unitlength + \@defaultunitsset{\advance\@ovdx}{-#2}\unitlength \multiply\@ovdx \tw@ - \@ovxx #6\unitlength \advance\@ovxx -#2\unitlength + \@defaultunitsset\@ovxx{#6}\unitlength + \@defaultunitsset{\advance\@ovxx}{-#2}\unitlength \advance\@ovxx -\@ovdx \divide\@ovxx\@multicnt - \@ovdy #5\unitlength \advance\@ovdy -#3\unitlength + \@defaultunitsset\@ovdy{#5}\unitlength + \@defaultunitsset{\advance\@ovdy}{-#3}\unitlength \multiply\@ovdy \tw@ - \@ovyy #7\unitlength \advance\@ovyy -#3\unitlength + \@defaultunitsset\@ovyy{#7}\unitlength + \@defaultunitsset{\advance\@ovyy}{-#3}\unitlength \advance\@ovyy -\@ovdy \divide\@ovyy\@multicnt \setbox\@tempboxa\hbox{% \hskip -\@halfwidth @@ -7368,8 +9000,8 @@ Type H for immediate help.}% %%% From File: ltsect.dtx \message{title,} \DeclareRobustCommand\title[1]{\gdef\@title{#1}} -\DeclareRobustCommand\author[1]{\gdef\@author{#1}} -\DeclareRobustCommand\date[1]{\gdef\@date{#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}}% @@ -7507,7 +9139,7 @@ Type H for immediate help.}% \@nobreakfalse \endgroup} \def\addcontentsline#1#2#3{% - \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}% + \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}{}% \protected@file@percent}} \long\def\addtocontents#1#2{% \protected@write\@auxout @@ -7790,11 +9422,11 @@ Type H for immediate help.}% \DeclareRobustCommand*\textsuperscript[1]{% \@textsuperscript{\selectfont#1}} \def\@textsuperscript#1{% - {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\z@#1}}}}} + {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\sf@size#1}}}}} \DeclareRobustCommand*\textsubscript[1]{% \@textsubscript{\selectfont#1}}% \def\@textsubscript#1{% - {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}} + {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\sf@size#1}}}}} \newdimen\footnotesep \def\footnote{\@ifnextchar[\@xfootnote{\stepcounter\@mpfn \protected@xdef\@thefnmark{\thempfn}% @@ -7953,7 +9585,7 @@ Type H for immediate help.}% \hfil}\let\@evenhead\@empty\let\@evenfoot\@oddfoot} \let\@leftmark\@firstoftwo \let\@rightmark\@secondoftwo -\DeclareRobustCommand\markboth[2]{% +\DeclareRobustCommand*\markboth[2]{% \begingroup \let\label\relax \let\index\relax \let\glossary\relax \unrestored@protected@xdef\@themark {{#1}{#2}}% @@ -7961,7 +9593,7 @@ Type H for immediate help.}% \mark{\the\@temptokena}% \endgroup \if@nobreak\ifvmode\nobreak\fi\fi} -\DeclareRobustCommand\markright[1]{% +\DeclareRobustCommand*\markright[1]{% \begingroup \let\label\relax \let\index\relax \let\glossary\relax \expandafter\@markright\@themark {#1}% @@ -7991,2016 +9623,2517 @@ Type H for immediate help.}% \hfuzz .1\p@ \vfuzz\hfuzz} \overfullrule 0pt -%%% From File: ltoutput.dtx -\expandafter\let\csname ver@autoout1.sty\endcsname\fmtversion -\message{output,} -\maxdeadcycles = 100 -\let\@elt\relax -\def\@next#1#2#3#4{\ifx#2\@empty #4\else - \expandafter\@xnext #2\@@#1#2#3\fi} -\def\@xnext \@elt #1#2\@@#3#4{\def#3{#1}\gdef#4{#2}} -\def\@testfalse{\global\let\if@test\iffalse} -\def\@testtrue {\global\let\if@test\iftrue} -\@testfalse -\def\@bitor#1#2{\@testfalse {\let\@elt\@xbitor - \@tempcnta #1\relax #2}} -\def\@xbitor #1{\@tempcntb \count#1 - \ifnum \@tempcnta =\z@ - \else - \divide\@tempcntb\@tempcnta - \ifodd\@tempcntb \@testtrue\fi - \fi} -\let\@elt\newinsert -\def\@freelist{% - \@elt\bx@A\@elt\bx@B\@elt\bx@C\@elt\bx@D\@elt\bx@E - \@elt\bx@F\@elt\bx@G\@elt\bx@H\@elt\bx@I\@elt\bx@J - \@elt\bx@K\@elt\bx@L\@elt\bx@M\@elt\bx@N - \@elt\bx@O\@elt\bx@P\@elt\bx@Q\@elt\bx@R} -\@freelist -\ifx\numexpr\@undefined\else -\def\reserved@a{% - \@elt\bx@S\@elt\bx@T\@elt\bx@U\@elt\bx@V - \@elt\bx@W\@elt\bx@X\@elt\bx@Y\@elt\bx@Z - \@elt\bx@AA\@elt\bx@BB\@elt\bx@CC\@elt\bx@DD\@elt\bx@EE - \@elt\bx@FF\@elt\bx@GG\@elt\bx@HH\@elt\bx@II\@elt\bx@JJ - \@elt\bx@KK\@elt\bx@LL\@elt\bx@MM\@elt\bx@NN - \@elt\bx@OO\@elt\bx@PP\@elt\bx@QQ\@elt\bx@RR - \@elt\bx@SS\@elt\bx@TT\@elt\bx@UU\@elt\bx@VV - \@elt\bx@WW\@elt\bx@XX\@elt\bx@YY\@elt\bx@ZZ} -\reserved@a -\def\@elt{\noexpand\@elt\noexpand} -\edef\@freelist{\@freelist\reserved@a} -\fi -\let\reserved@a\relax -\let\@elt\relax -\gdef\@toplist{} -\gdef\@botlist{} -\gdef\@midlist{} -\gdef\@currlist{} -\gdef\@deferlist{} -\gdef\@dbltoplist{} -\gdef\@dbldeferlist{} -\newdimen\topmargin -\newdimen\oddsidemargin -\newdimen\evensidemargin -\let\@themargin=\oddsidemargin -\newdimen\headheight -\newdimen\headsep -\newdimen\footskip -\newdimen\textheight -\newdimen\textwidth -\newdimen\columnwidth -\newdimen\columnsep -\newdimen\columnseprule -\newdimen\marginparwidth -\newdimen\marginparsep -\newdimen\marginparpush -\newbox\@begindvibox -\DeclareRobustCommand \AtBeginDvi [1]{% - \global \setbox \@begindvibox - \vbox{\unvbox \@begindvibox #1}% -} -\newdimen\@maxdepth -\@maxdepth = \maxdepth -\newdimen\paperheight -\newdimen\paperwidth -\newif \if@insert -\newif \if@fcolmade -\newif \if@specialpage \@specialpagefalse -\newif \if@firstcolumn \@firstcolumntrue -\newif \if@twocolumn \@twocolumnfalse -\newif \if@twoside \@twosidefalse -\newif \if@reversemargin \@reversemarginfalse -\newif \if@mparswitch \@mparswitchfalse -\newcount \col@number -\col@number \@ne -\newcount\@topnum -\newdimen\@toproom -\newcount\@dbltopnum -\newdimen\@dbltoproom -\newcount\@botnum -\newdimen\@botroom -\newcount\@colnum -\newdimen\@textmin -\newdimen\@fpmin -\newdimen\@colht -\newdimen\@colroom -\newdimen\@pageht -\newdimen\@pagedp -\newdimen\@mparbottom \@mparbottom\z@ -\newcount\@currtype -\newbox\@outputbox -\newbox\@leftcolumn -\newbox\@holdpg -\def\@thehead{\@oddhead} % initialization -\def\@thefoot{\@oddfoot} -\def\clearpage{% - \ifvmode - \ifnum \@dbltopnum =\m@ne - \ifdim \pagetotal <\topskip - \hbox{}% - \fi - \fi - \fi - \newpage - \write\m@ne{}% - \vbox{}% - \penalty -\@Mi +%%% From File: ltclass.dtx +\newif\if@compatibility +\def\@documentclasshook{% + \ifx\@normalsize\@undefined + \let\@normalsize\normalsize + \fi } -\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else - \hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi} -\def\onecolumn{% - \clearpage - \global\columnwidth\textwidth - \global\hsize\columnwidth - \global\linewidth\columnwidth - \global\@twocolumnfalse - \col@number \@ne - \@floatplacement} -\def \newpage {% - \if@noskipsec - \ifx \@nodocument\relax - \leavevmode - \global \@noskipsecfalse - \fi - \fi - \if@inlabel - \leavevmode - \global \@inlabelfalse - \fi - \if@nobreak \@nobreakfalse \everypar{}\fi - \par - \ifdim\prevdepth>\z@ - \vskip -% - \ifdim\prevdepth>\maxdepth - \maxdepth - \else - \prevdepth - \fi - \fi - \vfil - \penalty -\@M} -\def \@emptycol {\vbox{}\penalty -\@M} -\def \twocolumn {% - \clearpage - \global\columnwidth\textwidth - \global\advance\columnwidth-\columnsep - \global\divide\columnwidth\tw@ - \global\hsize\columnwidth - \global\linewidth\columnwidth - \global\@twocolumntrue - \global\@firstcolumntrue - \col@number \tw@ - \@ifnextchar [\@topnewpage\@floatplacement -} -\long\def \@topnewpage [#1]{% - \@nodocument - \@next\@currbox\@freelist{}{}% - \global \setbox\@currbox - \color@vbox - \normalcolor - \vbox {% - \hsize\textwidth - \@parboxrestore - \col@number \@ne - #1% - \vskip -\dbltextfloatsep - }% - \color@endbox - \ifdim \ht\@currbox>\textheight - \ht\@currbox \textheight - \fi - \global \count\@currbox \tw@ - \@tempdima -\ht\@currbox - \advance \@tempdima -\dbltextfloatsep - \global \advance \@colht \@tempdima - \ifx \@dbltoplist \@empty - \else - \@latexerr{Float(s) lost}\@ehb - \let \@dbltoplist \@empty - \fi - \@cons \@dbltoplist \@currbox - \global \@dbltopnum \m@ne - \ifdim \@colht<2.5\baselineskip - \@latex@warning@no@line {Optional argument of \noexpand\twocolumn - too tall on page \thepage}% - \@emptycol - \if@firstcolumn - \else - \@emptycol - \fi - \else - \global \vsize \@colht - \global \@colroom \@colht - \@floatplacement - \fi -} -\output {% - \let \par \@@par - \ifnum \outputpenalty<-\@M - \@specialoutput +\let\@declaredoptions\@empty +\let\@classoptionslist\relax +\@onlypreamble\@classoptionslist +\let\@unusedoptionlist\@empty +\@onlypreamble\@unusedoptionlist +\let\CurrentOption\@empty +\let\@currname\@empty +\global\let\@currext=\@empty +\def\@clsextension{cls} +\def\@pkgextension{sty} +\@onlypreamble\@clsextension +\@onlypreamble\@pkgextension +\def\@pushfilename{% + \@expl@@@hook@curr@name@push@@n{}% + \@expl@push@filename@@ + \xdef\@currnamestack{% + {\@currname}% + {\@currext}% + {\the\catcode`\@}% + \@currnamestack}% + \@expl@push@filename@aux@@} +\@onlypreamble\@pushfilename +\def\@popfilename{\@expl@@@hook@curr@name@pop@@ + \expandafter\@p@pfilename\@currnamestack\@nil + \@expl@pop@filename@@} +\@onlypreamble\@popfilename +\def\@p@pfilename#1#2#3#4\@nil{% + \gdef\@currname{#1}% + \gdef\@currext{#2}% + \catcode`\@#3\relax + \gdef\@currnamestack{#4}} +\@onlypreamble\@p@pfilename +\gdef\@currnamestack{} +\@onlypreamble\@currnamestack +\def\@ptionlist#1{% + \@ifundefined{opt@#1}\@empty{\csname opt@#1\endcsname}} +\@onlypreamble\@ptionlist +\def\@ifpackageloaded{\@ifl@aded\@pkgextension} +\def\@ifclassloaded{\@ifl@aded\@clsextension} +\@onlypreamble\@ifpackageloaded +\@onlypreamble\@ifclassloaded +\def\@ifl@aded#1#2{% + \expandafter\ifx\csname ver@#2.#1\endcsname\relax + \expandafter\@secondoftwo \else - \@makecol - \@opcol - \@startcolumn - \@whilesw \if@fcolmade \fi - {% - \@opcol\@startcolumn}% - \fi - \ifnum \outputpenalty>-\@Miv - \ifdim \@colroom<1.5\baselineskip - \ifdim \@colroom<\textheight - \@latex@warning@no@line {Text page \thepage\space - contains only floats}% - \@emptycol - \else - \global \vsize \@colroom - \fi - \else - \global \vsize \@colroom - \fi + \expandafter\@firstoftwo + \fi} +\@onlypreamble\@ifl@aded +\def\@ifpackagelater{\@ifl@ter\@pkgextension} +\def\@ifclasslater{\@ifl@ter\@clsextension} +\@onlypreamble\@ifpackagelater +\@onlypreamble\@ifclasslater +\def\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} +\let\IfPackageAtLeastTF\@ifpackagelater +\let\IfClassAtLeastTF\@ifclasslater +\@onlypreamble\IfFormatAtLeastTF +\@onlypreamble\IfPackageAtLeastTF +\@onlypreamble\IfClassAtLeastTF +\def\@ifl@ter#1#2{% + \expandafter\@ifl@t@r + \csname ver@#2.#1\endcsname} +\@onlypreamble\@ifl@ter +\def\@ifl@t@r#1#2{% + \ifnum\expandafter\@parse@version@#1//00\@nil<% + \expandafter\@parse@version@#2//00\@nil + \expandafter\@secondoftwo \else - \global \vsize \maxdimen - \fi + \expandafter\@firstoftwo + \fi} +\def\@parse@version@#1{\@parse@version0#1} +\@onlypreamble\@ifl@t@r +\def\@parse@version#1/#2/#3#4#5\@nil{% +\@parse@version@dash#1-#2-#3#4\@nil } -\gdef\@specialoutput{% - \ifnum \outputpenalty>-\@Mii - \@doclearpage +\def\@parse@version@dash#1-#2-#3#4#5\@nil{% + \if\relax#2\relax\else#1\fi#2#3#4 } +\def\@ifpackagewith{\@if@ptions\@pkgextension} +\def\@ifclasswith{\@if@ptions\@clsextension} +\@onlypreamble\@ifpackagewith +\@onlypreamble\@ifclasswith +\def\@if@ptions#1#2{% + \@expandtwoargs\@if@pti@ns{\@ptionlist{#2.#1}}} +\@onlypreamble\@if@ptions +\def\@if@pti@ns#1#2{% + \let\reserved@a\@firstoftwo + \edef\reserved@b{\zap@space#2 \@empty}% + \@for\reserved@b:=\reserved@b\do{% + \ifx\reserved@b\@empty \else - \ifnum \outputpenalty<-\@Miii - \ifnum \outputpenalty<-\@MM \deadcycles \z@ \fi - \global \setbox\@holdpg \vbox {\unvbox\@cclv}% + \expandafter\in@\expandafter{\expandafter,\reserved@b,}{,#1,}% + \ifin@ \else - \global \setbox\@holdpg \vbox{% - \unvbox\@holdpg - \unvbox\@cclv - \setbox\@tempboxa \lastbox - \unskip - }% - \@pagedp \dp\@holdpg - \@pageht \ht\@holdpg - \unvbox \@holdpg - \@next\@currbox\@currlist{% - \ifnum \count\@currbox>\z@ - \advance \@pageht \@pagedp - \ifvoid\footins \else - \advance \@pageht \ht\footins - \advance \@pageht \skip\footins - \advance \@pageht \dp\footins - \fi - \ifvbox \@kludgeins - \ifdim \wd\@kludgeins=\z@ - \advance \@pageht \ht\@kludgeins - \fi - \fi - \@reinserts - \@addtocurcol - \else - \@reinserts - \@addmarginpar - \fi - }\@latexbug - \ifnum \outputpenalty<\z@ - \if@nobreak - \nobreak - \else - \addpenalty \interlinepenalty - \fi - \fi + \let\reserved@a\@secondoftwo \fi \fi -} -\def\@testwrongwidth #1{% - \ifdim\dp#1=\f@depth - \else - \global\@testtrue - \fi}% -\let\f@depth\z@ -\def \@doclearpage {% - \ifvoid\footins - \ifvbox\@kludgeins - {\setbox \@tempboxa \box \@kludgeins}% - \fi - \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa - \setbox\@tempboxa\box\@cclv - \xdef\@deferlist{\@toplist\@botlist\@deferlist}% - \global \let \@toplist \@empty - \global \let \@botlist \@empty - \global \@colroom \@colht - \ifx \@currlist\@empty - \else - \@latexerr{Float(s) lost}\@ehb - \global \let \@currlist \@empty - \fi - \@makefcolumn\@deferlist - \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}% - \if@twocolumn - \if@firstcolumn - \xdef\@deferlist{\@dbltoplist\@deferlist}% - \global \let \@dbltoplist \@empty - \global \@colht \textheight - \begingroup - \@dblfloatplacement - \@makefcolumn\@deferlist - \@whilesw\if@fcolmade \fi{\@outputpage - \@makefcolumn\@deferlist}% - \endgroup - \else - \vbox{}\clearpage - \fi - \fi - \ifx\@deferlist\@empty \else\clearpage \fi - \else - \setbox\@cclv\vbox{\box\@cclv\vfil}% - \@makecol\@opcol - \clearpage - \fi -}% -\def \@opcol {% - \if@twocolumn - \@outputdblcol - \else - \@outputpage + }% + \reserved@a} +\@onlypreamble\@if@pti@ns +\def\ProvidesPackage#1{% + \xdef\@gtempa{#1}% + \ifx\@gtempa\@currname\else + \@latex@warning@no@line{You have requested + \@cls@pkg\space`\@currname',\MessageBreak + but the \@cls@pkg\space provides `#1'}% \fi - \global \@mparbottom \z@ \global \@textfloatsheight \z@ - \@floatplacement -} -\gdef \@makecol {% - \ifvoid\footins - \setbox\@outputbox \box\@cclv - \else - \setbox\@outputbox \vbox {% - \boxmaxdepth \@maxdepth - \unvbox \@cclv - \vskip \skip\footins - \color@begingroup - \normalcolor - \footnoterule - \unvbox \footins - \color@endgroup - }% - \fi - \let\@elt\relax - \xdef\@freelist{\@freelist\@midlist}% - \global \let \@midlist \@empty - \@combinefloats - \ifvbox\@kludgeins - \@makespecialcolbox - \else - \setbox\@outputbox \vbox to\@colht {% - \@texttop - \dimen@ \dp\@outputbox - \unvbox \@outputbox - \vskip -\dimen@ - \@textbottom - }% - \fi - \global \maxdepth \@maxdepth -} -\gdef \@reinserts{% - \ifvoid\footins\else\insert\footins{\unvbox\footins}\fi - \ifvbox\@kludgeins\insert\@kludgeins - {\unvbox\@kludgeins}\fi -} -\gdef \@makespecialcolbox {% - \setbox\@outputbox \vbox {% - \@texttop - \dimen@ \dp\@outputbox - \unvbox\@outputbox - \vskip-\dimen@ - }% - \@tempdima \@colht - \ifdim \wd\@kludgeins>\z@ - \advance \@tempdima -\ht\@outputbox - \advance \@tempdima \pageshrink - \setbox\@outputbox \vbox to \@colht {% - \unvbox\@outputbox - \vskip \@tempdima - \@textbottom - }% - \else - \advance \@tempdima -\ht\@kludgeins - \setbox \@outputbox \vbox to \@colht {% - \vbox to \@tempdima {% - \unvbox\@outputbox - \@textbottom}% - \vss}% - \fi - {\setbox \@tempboxa \box \@kludgeins}% -} -\let \@texttop \relax -\let \@textbottom \relax -\def\@activechar@info #1{% - \@latex@info@no@line {Active #1 character found while - output routine is active - \MessageBreak - This may be a bug in a package file - you are using}% -} -\begingroup -\obeylines\obeyspaces% -\catcode`\'\active% -\gdef\@resetactivechars{% -\def^^M{\@activechar@info{EOL}\space}% -\def {\@activechar@info{space}\space}% -\let'\active@math@prime}% -\endgroup -\def\@outputpage{% -\begingroup - \let \protect \noexpand - \language\document@default@language - \@resetactivechars - \global\let\@@if@newlist\if@newlist - \global\@newlistfalse - \@parboxrestore - \shipout \vbox{% - \set@typeset@protect - \aftergroup \endgroup - \aftergroup \set@typeset@protect - \if@specialpage - \global\@specialpagefalse\@nameuse{ps@\@specialstyle}% - \fi - \if@twoside - \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot - \let\@themargin\oddsidemargin - \else \let\@thehead\@evenhead - \let\@thefoot\@evenfoot \let\@themargin\evensidemargin - \fi - \fi - \reset@font - \normalsize - \normalsfcodes - \let\label\@gobble - \let\index\@gobble - \let\glossary\@gobble - \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@ - \@begindvi - \vskip \topmargin - \moveright\@themargin \vbox {% - \setbox\@tempboxa \vbox to\headheight{% - \vfil - \color@hbox - \normalcolor - \hb@xt@\textwidth{\@thehead}% - \color@endbox - }% - \dp\@tempboxa \z@ - \box\@tempboxa - \vskip \headsep - \box\@outputbox - \baselineskip \footskip - \color@hbox - \normalcolor - \hb@xt@\textwidth{\@thefoot}% - \color@endbox - }% - }% - \global\let\if@newlist\@@if@newlist - \global \@colht \textheight - \stepcounter{page}% - \let\firstmark\botmark -} -\def \@begindvi{% - \unvbox \@begindvibox - \global\let \@begindvi \@empty -} -\def \@combinefloats {% - \ifx \@toplist\@empty \else \@cflt \fi - \ifx \@botlist\@empty \else \@cflb \fi -} -\def \@cflt{% - \let \@elt \@comflelt - \setbox\@tempboxa \vbox{}% - \@toplist - \setbox\@outputbox \vbox{% - \boxmaxdepth \maxdepth - \unvbox\@tempboxa - \vskip -\floatsep - \topfigrule - \vskip \textfloatsep - \unvbox\@outputbox - }% - \let\@elt\relax - \xdef\@freelist{\@freelist\@toplist}% - \global\let\@toplist\@empty -} -\def \@cflb {% - \let\@elt\@comflelt - \setbox\@tempboxa \vbox{}% - \@botlist - \setbox\@outputbox \vbox{% - \unvbox\@outputbox - \vskip \textfloatsep - \botfigrule - \unvbox\@tempboxa - \vskip -\floatsep - }% - \let\@elt\relax - \xdef\@freelist{\@freelist\@botlist}% - \global \let \@botlist\@empty -} -\def\@comflelt#1{\setbox\@tempboxa - \vbox{\unvbox\@tempboxa\box #1\vskip\floatsep}} -\def\@comdblflelt#1{\setbox\@tempboxa - \vbox{\unvbox\@tempboxa\box #1\vskip\dblfloatsep}} -\def \@combinedblfloats{% - \ifx \@dbltoplist \@empty - \else - \setbox\@tempboxa \vbox{}% - \let \@elt \@comdblflelt - \@dbltoplist - \let \@elt \relax - \xdef \@freelist {\@freelist\@dbltoplist}% - \global\let \@dbltoplist \@empty - \setbox\@outputbox \vbox to\textheight - {%\boxmaxdepth\maxdepth %% probably not needed, CAR - \unvbox\@tempboxa\vskip-\dblfloatsep - \ifnum \@dbltopnum>\m@ne - \dblfigrule - \fi - \vskip \dbltextfloatsep - \unvbox\@outputbox - }% - \fi -} -\def \@startcolumn {% - \global \@colroom \@colht - \@tryfcolumn \@deferlist - \if@fcolmade - \else - \begingroup - \let \reserved@b \@deferlist - \global \let \@deferlist \@empty - \let \@elt \@scolelt - \reserved@b - \endgroup - \fi -} -\def \@startdblcolumn {% - \@tryfcolumn \@deferlist - \if@fcolmade - \else - \begingroup - \let \reserved@b \@deferlist - \global \let \@deferlist \@empty - \let \@elt \@sdblcolelt - \reserved@b - \endgroup - \fi -}% -\def \@tryfcolumn #1{% - \global \@fcolmadefalse - \ifx #1\@empty + \@ifnextchar[\@pr@videpackage{\@pr@videpackage[]}}%] +\@onlypreamble\ProvidesPackage +\def\@pr@videpackage[#1]{% + \expandafter\protected@xdef % <-- protected... + \csname ver@\@currname.\@currext\endcsname{#1}% Loaded package + \expandafter\protected@xdef % <-- protected... + \csname ver@\@currpkg@reqd\endcsname{#1}% Requested package + \ifx\@currext\@clsextension + \typeout{Document Class: \@gtempa\space#1}% \else - \xdef\@trylist{#1}% - \global \let \@failedlist \@empty - \begingroup - \let \@elt \@xtryfc \@trylist - \endgroup - \if@fcolmade - \@vtryfc #1% + \protected@wlog{Package: \@gtempa\space#1}% <--- protected + \fi} +\long\def\protected@wlog#1{\begingroup + \set@display@protect + \immediate \write \m@ne {#1}\endgroup } +\@onlypreamble\@pr@videpackage +\let\ProvidesClass\ProvidesPackage +\@onlypreamble\ProvidesClass +\def\ProvidesFile#1{% + \begingroup + \catcode`\ 10 % + \ifnum \endlinechar<256 % + \ifnum \endlinechar>\m@ne + \catcode\endlinechar 10 % + \fi \fi + \@makeother\/% + \@makeother\&% + \kernel@ifnextchar[{\@providesfile{#1}}{\@providesfile{#1}[]}} +\def\@pass@ptions#1#2#3{% + \edef\reserved@a{\@expl@@@filehook@resolve@file@subst@@w #3.#1\@nil}% + \expandafter\xdef\csname opt@\reserved@a\endcsname{% + \@ifundefined{opt@\reserved@a}\@empty + {\csname opt@\reserved@a\endcsname,}% + \zap@space#2 \@empty}} +\@onlypreamble\@pass@ptions +\def\PassOptionsToPackage{\@pass@ptions\@pkgextension} +\def\PassOptionsToClass{\@pass@ptions\@clsextension} +\@onlypreamble\PassOptionsToPackage +\@onlypreamble\PassOptionsToClass +\def\DeclareOption{% + \let\@fileswith@pti@ns\@badrequireerror + \@ifstar\@defdefault@ds\@declareoption} +\long\def\@declareoption#1#2{% + \xdef\@declaredoptions{\@declaredoptions,#1}% + \toks@{#2}% + \expandafter\edef\csname ds@#1\endcsname{\the\toks@}} +\long\def\@defdefault@ds#1{% + \toks@{#1}% + \edef\default@ds{\the\toks@}} +\@onlypreamble\DeclareOption +\@onlypreamble\@declareoption +\@onlypreamble\@defdefault@ds +\def\OptionNotUsed{% + \ifx\@currext\@clsextension + \xdef\@unusedoptionlist{% + \ifx\@unusedoptionlist\@empty\else\@unusedoptionlist,\fi + \CurrentOption}% + \fi} +\@onlypreamble\OptionNotUsed +\def\ProcessOptions{% + \let\ds@\@empty + \edef\@curroptions{\@ptionlist{\@currname.\@currext}}% + \@ifstar\@xprocess@ptions\@process@ptions} +\@onlypreamble\ProcessOptions +\def\@process@ptions{% + \@for\CurrentOption:=\@declaredoptions\do{% + \ifx\CurrentOption\@empty\else + \@expandtwoargs\in@{,\CurrentOption,}{% + ,\ifx\@currext\@clsextension\else\@classoptionslist,\fi + \@curroptions,}% + \ifin@ + \@use@ption + \expandafter\let\csname ds@\CurrentOption\endcsname\@empty + \fi + \fi}% + \@process@pti@ns} +\@onlypreamble\@process@ptions +\def\@xprocess@ptions{% + \ifx\@currext\@clsextension\else + \@for\CurrentOption:=\@classoptionslist\do{% + \ifx\CurrentOption\@empty\else + \@expandtwoargs\in@{,\CurrentOption,}{,\@declaredoptions,}% + \ifin@ + \@use@ption + \expandafter\let\csname ds@\CurrentOption\endcsname\@empty + \fi + \fi}% \fi -} -\def\@scolelt#1{\def\@currbox{#1}\@addtonextcol} -\def\@sdblcolelt#1{\def\@currbox{#1}\@addtodblcol} -\def\@vtryfc #1{% - \global\setbox\@outputbox\vbox{}% - \let\@elt\@wtryfc - \@flsucceed - \global\setbox\@outputbox \vbox to\@colht{% - \vskip \@fptop - \vskip -\@fpsep - \unvbox \@outputbox - \vskip \@fpbot}% - \let\@elt\relax - \xdef #1{\@failedlist\@flfail}% - \xdef\@freelist{\@freelist\@flsucceed}} -\def\@wtryfc #1{% - \global\setbox\@outputbox\vbox{% - \unvbox\@outputbox - \vskip\@fpsep - \box #1}} -\def\@xtryfc #1{% - \@next\reserved@a\@trylist{}{}% - \@currtype \count #1% - \divide\@currtype\@xxxii - \multiply\@currtype\@xxxii - \@bitor \@currtype \@failedlist - \@testfp #1% - \@testwrongwidth #1% - \ifdim \ht #1>\@colht - \@testtrue + \@process@pti@ns} +\@onlypreamble\@xprocess@ptions +\def\@process@pti@ns{% + \@for\CurrentOption:=\@curroptions\do{% + \@ifundefined{ds@\CurrentOption}% + {\@use@ption + \default@ds}% + \@use@ption}% + \@for\CurrentOption:=\@declaredoptions\do{% + \expandafter\let\csname ds@\CurrentOption\endcsname\relax}% + \let\CurrentOption\@empty + \let\@fileswith@pti@ns\@@fileswith@pti@ns + \AtEndOfPackage{\expandafter\let + \csname unprocessedoptions-\@currname.\@currext\endcsname + \relax}} +\@onlypreamble\@process@pti@ns +\def\@options{\ProcessOptions*} +\@onlypreamble\@options +\def\@use@ption{% + \@expandtwoargs\@removeelement\CurrentOption + \@unusedoptionlist\@unusedoptionlist + \csname ds@\CurrentOption\endcsname} +\@onlypreamble\@use@ption +\def\ExecuteOptions#1{% + \edef\@fortmp{\zap@space#1 \@empty}% + \def\reserved@a##1\@nil{% + \@for\CurrentOption:=\@fortmp\do + {\csname ds@\CurrentOption\endcsname}% + \edef\CurrentOption{##1}}% + \expandafter\reserved@a\CurrentOption\@nil} +\@onlypreamble\ExecuteOptions +\def\documentclass{% + \let\documentclass\@twoclasseserror + \if@compatibility\else\let\usepackage\RequirePackage\fi + \@fileswithoptions\@clsextension} +\@onlypreamble\documentclass +\def\documentstyle{% + \makeatletter\input{latex209.def}\makeatother + \documentclass} +\@onlypreamble\documentstyle +\def\RequirePackage{% + \@fileswithoptions\@pkgextension} +\@onlypreamble\RequirePackage +\def\LoadClass{% + \ifx\@currext\@pkgextension + \@latex@error + {\noexpand\LoadClass in package file}% + {You may only use \noexpand\LoadClass in a class file.}% \fi - \if@test - \@cons\@failedlist #1% + \@fileswithoptions\@clsextension} +\@onlypreamble\LoadClass +\def\@loadwithoptions#1#2#3{% + \expandafter\let\csname opt@#3.#1\expandafter\endcsname + \csname opt@\@currname.\@currext\endcsname + #2{#3}} +\@onlypreamble\@loadwithoptions +\def\LoadClassWithOptions{% + \@loadwithoptions\@clsextension\LoadClass} +\@onlypreamble\LoadClassWithOptions +\def\RequirePackageWithOptions{% + \AtEndOfPackage{\expandafter\let + \csname unprocessedoptions-\@currname.\@currext\endcsname + \relax}% + \@loadwithoptions\@pkgextension\RequirePackage} +\@onlypreamble\RequirePackageWithOptions + +\def\usepackage#1#{% + \@latex@error + {\noexpand \usepackage before \string\documentclass}% + {\noexpand \usepackage may only appear in the document + preamble, i.e.,\MessageBreak + between \noexpand\documentclass and + \string\begin{document}.}% + \@gobble} +\@onlypreamble\usepackage +\def\NeedsTeXFormat#1{% + \def\reserved@a{#1}% + \ifx\reserved@a\fmtname + \expandafter\@needsformat \else - \@ytryfc #1% - \fi}% -\def\@ytryfc #1{% - \begingroup - \gdef\@flsucceed{\@elt #1}% - \global\let\@flfail\@empty - \@tempdima\ht #1% - \let\@elt\@ztryfc - \@trylist - \ifdim \@tempdima >\@fpmin - \global\@fcolmadetrue + \@latex@error{This file needs format `\reserved@a'% + \MessageBreak but this is `\fmtname'}{% + The current input file will not be processed + further,\MessageBreak + because it was written for some other flavor of + TeX.\MessageBreak\@ehd}% + \endinput \fi} +\@onlypreamble\NeedsTeXFormat +\def\@needsformat{% + \@ifnextchar[%] + \@needsf@rmat + {}} +\@onlypreamble\@needsformat +\def\@needsf@rmat[#1]{% + \@ifl@t@r\fmtversion{#1}{}% + {\@latex@warning@no@line + {You have requested release `#1' of LaTeX,\MessageBreak + but only release `\fmtversion' is available}}} +\@onlypreamble\@needsf@rmat +\def\zap@space#1 #2{% + #1% + \ifx#2\@empty\else\expandafter\zap@space\fi + #2} +\def\@fileswithoptions#1{% + \@ifnextchar[%] + {\@fileswith@ptions#1}% + {\@fileswith@ptions#1[]}} +\@onlypreamble\@fileswithoptions +\def\@fileswith@ptions#1[#2]#3{% + \@ifnextchar[%] + {\@fileswith@pti@ns#1[{#2}]#3}% + {\@fileswith@pti@ns#1[{#2}]#3[]}} +\@onlypreamble\@fileswith@ptions +\def\@fileswith@pti@ns#1[#2]#3[#4]{% + \ifx#1\@clsextension + \ifx\@classoptionslist\relax + \xdef\@classoptionslist{\zap@space#2 \@empty}% + \def\reserved@a{% + \@onefilewithoptions#3[{#2}][{#4}]#1% + \@documentclasshook}% \else - \@cons\@failedlist #1% + \def\reserved@a{% + \@onefilewithoptions#3[{#2}][{#4}]#1}% \fi - \endgroup - \if@fcolmade - \let\@elt\@gobble - \fi} -\def\@ztryfc #1{% - \@tempcnta\count #1% - \divide\@tempcnta\@xxxii - \multiply\@tempcnta\@xxxii - \@bitor \@tempcnta {\@failedlist \@flfail}% - \@testfp #1% - \@testwrongwidth #1% - \@tempdimb\@tempdima - \advance\@tempdimb\ht #1% - \advance\@tempdimb\@fpsep - \ifdim \@tempdimb >\@colht - \@testtrue - \fi - \if@test - \@cons\@flfail #1% \else - \@cons\@flsucceed #1% - \@tempdima\@tempdimb - \fi}% -\def \@addtobot {% - \@getfpsbit 4\relax - \ifodd \@tempcnta - \@flsetnum \@botnum - \ifnum \@botnum>\z@ - \@tempswafalse - \@flcheckspace \@botroom \@botlist - \if@tempswa - \global \maxdepth \z@ - \@flupdates \@botnum \@botroom \@botlist - \@inserttrue - \fi - \fi - \fi -} -\def \@addtotoporbot {% - \@getfpsbit \tw@ - \ifodd \@tempcnta - \@flsetnum \@topnum - \ifnum \@topnum>\z@ - \@tempswafalse - \@flcheckspace \@toproom \@toplist - \if@tempswa - \@bitor\@currtype{\@midlist\@botlist}% - \if@test - \else - \@flupdates \@topnum \@toproom \@toplist - \@inserttrue - \fi - \fi - \fi - \fi - \if@insert - \else - \@addtobot - \fi -} -\def \@addtocurcol {% - \@insertfalse - \@setfloattypecounts - \ifnum \@fpstype=8 - \else - \ifnum \@fpstype=24 - \else - \@flsettextmin - \advance \@textmin \@textfloatsheight - \@reqcolroom \@pageht - \ifdim \@textmin>\@reqcolroom - \@reqcolroom \@textmin - \fi - \advance \@reqcolroom \ht\@currbox - \ifdim \@colroom>\@reqcolroom - \@flsetnum \@colnum - \ifnum \@colnum>\z@ - \@bitor\@currtype\@deferlist - \@testwrongwidth\@currbox - \if@test - \else - \@bitor\@currtype\@botlist - \if@test - \@addtobot - \else - \ifodd \count\@currbox - \advance \@reqcolroom \intextsep - \ifdim \@colroom>\@reqcolroom - \global \advance \@colnum \m@ne - \global \advance \@textfloatsheight \ht\@currbox - \global \advance \@textfloatsheight 2\intextsep - \@cons \@midlist \@currbox - \if@nobreak - \nobreak - \@nobreakfalse - \everypar{}% - \else - \addpenalty \interlinepenalty - \fi - \vskip \intextsep - \box\@currbox - \penalty\interlinepenalty - \vskip\intextsep - \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi - \outputpenalty \z@ - \@inserttrue - \fi - \fi - \if@insert - \else - \@addtotoporbot - \fi - \fi - \fi - \fi - \fi - \fi - \fi - \if@insert - \else - \@resethfps - \@cons\@deferlist\@currbox - \fi -}% -\def\@addtonextcol{% - \begingroup - \@insertfalse - \@setfloattypecounts - \ifnum \@fpstype=8 - \else - \ifnum \@fpstype=24 + \def\reserved@b##1,{% + \ifx\@nnil##1\relax\else + \ifx\@nnil##1\@nnil\else + \noexpand\@onefilewithoptions##1[{#2}][{#4}]% + \noexpand\@pkgextension + \fi + \expandafter\reserved@b + \fi}% + \edef\reserved@a{\zap@space#3 \@empty}% + \edef\reserved@a{\expandafter\reserved@b\reserved@a,\@nnil,}% + \fi + \reserved@a} +\@onlypreamble\@fileswith@pti@ns +\def\@onefilewithoptions#1[#2][#3]#4{% + \@pushfilename + \xdef\@currname{#1}% + \global\let\@currext#4% + \@ifl@aded\@currext\@currname + {\@if@ptions\@currext{\@currname}{#2}{}% + {\@latex@error + {Option clash for \@cls@pkg\space \@currname}% + {The package \@currname\space has already been loaded + with options:\MessageBreak + \space\space[\@ptionlist{\@currname.\@currext}]\MessageBreak + There has now been an attempt to load it + with options\MessageBreak + \space\space[#2]\MessageBreak + Adding the global options:\MessageBreak + \space\space + \@ptionlist{\@currname.\@currext},#2\MessageBreak + to your \noexpand\documentclass declaration may fix this.% + \MessageBreak + Try typing \space \space to proceed.}}% + \@firstofone}% + {\makeatletter + \@reset@ptions + \IfFileExists{\@currname.\@currext}{}% + {\@missing@onefilewithoptions{#2}}% + \ifx\@currname\@empty + \expandafter\@gobble \else - \@flsettextmin - \@reqcolroom \ht\@currbox - \advance \@reqcolroom \@textmin - \ifdim \@colroom>\@reqcolroom - \@flsetnum \@colnum - \ifnum\@colnum>\z@ - \@bitor\@currtype\@deferlist - \@testwrongwidth\@currbox - \if@test - \else - \@addtotoporbot - \fi - \fi - \fi - \fi - \fi - \if@insert + \@disable@packageload@do{\@currname.\@currext}% + {\@expl@@@filehook@file@push@@ + \set@curr@file{\@currname.\@currext}% + \@filehook@set@CurrentFile + \edef\@currpkg@reqd{\@currname.\@currext}% + \ifx\CurrentFile\CurrentFileUsed + \else + \filename@parse\@curr@file + \edef\@currname{\string@makeletter\filename@base}% + \edef\@currext{\string@makeletter\filename@ext}% + \fi + \load@onefile@withoptions{#2}% + \@expl@@@filehook@file@pop@@}% + \expandafter\@firstofone + \fi}% + {\@ifl@ter\@currext{\@currname}{#3}{}% + {\@latex@warning@no@line + {You have requested,\on@line, + version\MessageBreak + `#3' of \@cls@pkg\space \@currname,\MessageBreak + but only version\MessageBreak + `\csname ver@\@currname.\@currext\endcsname'\MessageBreak + is available}}% + \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi}% + \@popfilename + \@reset@ptions} +\@onlypreamble\@onefilewithoptions +\let\@unprocessedoptions\@undefined +\def\@missing@onefilewithoptions#1{% + \@missingfileerror\@currname\@currext + \xdef\@currname{\@missingfile@area\@missingfile@base}% + \global\let\@currext\@missingfile@ext} +\def\load@onefile@withoptions#1{% + \let\CurrentOption\@empty + \@reset@ptions + \def\reserved@a{% + \@pass@ptions\@currext{#1}{\@currname}% + \global\expandafter + \let\csname ver@\@currname.\@currext\endcsname\@empty + \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty + \ifx\@currext\@pkgextension + \UseHook{package/before}% + \UseHook{package/before/\@currname}% + \else + \ifx\@currext\@clsextension + \UseHook{class/before}% + \UseHook{class/before/\@currname}% + \fi + \fi + \InputIfFileExists{\@currpkg@reqd}{}% + {\@latex@error + {The \@cls@pkg\space\@currpkg@reqd\space failed to load.}\@ehd}% + \expandafter\let\csname unprocessedoptions-\@currname.\@currext\endcsname + \@@unprocessedoptions + \csname\@currname.\@currext-h@@k\endcsname + \expandafter\let\csname\@currname.\@currext-h@@k\endcsname + \@undefined + \ifx\@unprocessedoptions\relax + \let\@unprocessedoptions\@undefined + \else + \csname unprocessedoptions-\@currname.\@currext\endcsname + \fi + \expandafter\let + \csname unprocessedoptions-\@currname.\@currext\endcsname + \@undefined + \ifx\@currext\@pkgextension + \UseHook{package/after/\@currname}% + \UseHook{package/after}% + \else + \ifx\@currext\@clsextension + \UseHook{class/after/\@currname}% + \UseHook{class/after}% + \fi + \fi}% + \@ifl@aded\@currext\@currname{}{\reserved@a}} +\let\@@fileswith@pti@ns\@fileswith@pti@ns +\@onlypreamble\@@fileswith@pti@ns +\def\@reset@ptions{% + \global\ifx\@currext\@clsextension + \let\default@ds\OptionNotUsed \else - \@cons\@deferlist\@currbox - \fi - \endgroup -}% -\def\@addtodblcol{% + \let\default@ds\@unknownoptionerror + \fi + \global\let\ds@\@empty + \global\let\@declaredoptions\@empty} +\@onlypreamble\@reset@ptions +\ifx\@begindocumenthook\@undefined + \let\@begindocumenthook\@empty +\fi +\let\@enddocumenthook\@empty +\def\AtEndOfPackage{% + \expandafter\g@addto@macro\csname\@currname.\@currext-h@@k\endcsname} +\let\AtEndOfClass\AtEndOfPackage +\@onlypreamble\AtEndOfPackage +\@onlypreamble\AtEndOfClass +\DeclareRobustCommand\AtBeginDocument{\AddToHook{begindocument}} +\DeclareRobustCommand\AtEndDocument {\AddToHook{enddocument}} +\@onlypreamble\AtBeginDocument +\def\@cls@pkg{% + \ifx\@currext\@clsextension + document class% + \else + package% + \fi} +\@onlypreamble\@cls@pkg +\def\@unknownoptionerror{% + \@latex@error + {Unknown option `\CurrentOption' for \@cls@pkg\space`\@currname'}% + {The option `\CurrentOption' was not declared in + \@cls@pkg\space`\@currname', perhaps you\MessageBreak + misspelled its name. + Try typing \space + \space to proceed.}} +\@onlypreamble\@unknownoptionerror +\def\@@unprocessedoptions{% + \ifx\@currext\@pkgextension + \edef\@curroptions{\@ptionlist{\@currname.\@currext}}% + \@for\CurrentOption:=\@curroptions\do{% + \ifx\CurrentOption\@empty\else\@unknownoptionerror\fi}% + \fi} +\@onlypreamble\@unprocessedoptions +\@onlypreamble\@@unprocessedoptions +\def\@badrequireerror#1[#2]#3[#4]{% + \@latex@error + {\noexpand\RequirePackage or \noexpand\LoadClass + in Options Section}% + {The \@cls@pkg\space `\@currname' is defective.\MessageBreak + It attempts to load `#3' in the options section, i.e.,\MessageBreak + between \noexpand\DeclareOption and \string\ProcessOptions.}} +\@onlypreamble\@badrequireerror +\def\@twoloadclasserror{% + \@latex@error + {Two \noexpand\LoadClass commands}% + {You may only use one \noexpand\LoadClass in a class file}} +\@onlypreamble\@twoloadclasserror +\def\@twoclasseserror#1#{% + \@latex@error + {Two \noexpand\documentclass or \noexpand\documentstyle commands}% + {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]{% + \edef\@fortmp{\zap@space#1 \@empty}% + \@for\reserved@a:=\@fortmp\do{% + \ifcsname filec@ntents@\reserved@a\endcsname + \csname filec@ntents@\reserved@a\endcsname + \else + \@latex@error{Unknown filecontents option \reserved@a}% + {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 + \catcode\@tempcnta=12 % + \advance\@tempcnta\@ne % +\ifnum\@tempcnta<32 % +\repeat % +\catcode`\*=11 % +\catcode`\^^M\active% +\catcode`\^^L\active\let^^L\relax% +\catcode`\^^I\active% +\gdef\filec@ntents#1{% + \set@curr@file{\filec@ntents@checkdir#1}% + \edef\q@curr@file{"\@curr@file"}% + \chardef\reserved@c\ifx\directlua\@undefined 15 \else 127 \fi% + \openin\@inputcheck\q@curr@file \space % + \ifeof\@inputcheck% + \@latex@warning@no@line% + {Writing file `\@currdir\@curr@file'}% + \ch@ck7\reserved@c\write\relax% + \immediate\openout\reserved@c\q@curr@file\relax% + \else% + \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% + \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% + \ch@ck7\reserved@c\write\relax% + \if@filesw% % Foul ... trying to overwrite \jobname! + \@latex@error{Trying to overwrite `\jobname.tex'}{You can't % + write to the file you are 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\q@curr@file\relax% + \fi% + \fi% + \fi% + \closein\@inputcheck% + \if@tempswa% + \immediate\write\reserved@c{% + \@percentchar\@percentchar\space% + \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 % + \number\year/\two@digits\month/\two@digits\day.^^J% + \@percentchar\@percentchar}% + \fi% + \let\do\@makeother\dospecials% + \count@ 128\relax% + \loop% + \catcode\count@ 11\relax% + \advance\count@ \@ne% + \ifnum\count@<\@cclvi% + \repeat% + \edef\E{\@backslashchar end\string{\@currenvir\string}}% + \edef\reserved@b{% + \def\noexpand\reserved@b% + ####1\E####2\E####3\relax}% + \reserved@b{% + \ifx\relax##3\relax% + \immediate\write\reserved@c{##1}% + \else% + \edef^^M{\noexpand\end{\@currenvir}}% + \ifx\relax##1\relax% + \else% + \@latex@warning{Writing text `##1' before % + \string\end{\@currenvir}\MessageBreak as last line of \@curr@file}% + \immediate\write\reserved@c{##1}% + \fi% + \ifx\relax##2\relax% + \else% + \@latex@warning{% + Ignoring text `##2' after \string\end{\@currenvir}}% + \fi% + \fi% + ^^M}% + \catcode`\^^L\active% + \let\L\@undefined% + \def^^L{\expandafter\ifx\csname L\endcsname\relax\fi ^^J^^J}% + \catcode`\^^I\active% + \let\I\@undefined% + \def^^I{\expandafter\ifx\csname I\endcsname\relax\fi\space}% + \catcode`\^^M\active% + \edef^^M##1^^M{% + \noexpand\reserved@b##1\E\E\relax}}% +\endgroup% +\begingroup +\catcode`|=\catcode`\% +\catcode`\%=12 +\catcode`\*=11 +\gdef\@percentchar{%} +\gdef\endfilecontents{| + \immediate\closeout\reserved@c + \def\T##1##2##3{| + \ifx##1\@undefined\else + \@latex@warning@no@line{##2 has been converted to Blank ##3e}| + \fi}| + \T\L{Form Feed}{Lin}| + \T\I{Tab}{Spac}| + \immediate\write\@unused{}} +\global\let\endfilecontents*\endfilecontents +\endgroup +\let\pkgcls@debug\@gobble +\def\requestedLaTeXdate{0} +\ifx\pkgcls@targetdate\@undefined + \newcount\pkgcls@targetdate +\fi +\let\pkgcls@targetlabel\@empty +\def\pkgcls@innerdate{\maxdimen} +\let\pkgcls@candidate\@empty +\let\pkgcls@releasedate\@empty +\ifx\load@onefilewithoptions\@undefined + \let\load@onefilewithoptions\@onefilewithoptions + \def\@onefilewithoptions#1[#2][#3]#4{% + \pkgcls@debug{--- File loaded request (\noexpand\usepackage or ...)}% + \pkgcls@debug{\@spaces 1: #1}% + \pkgcls@debug{\@spaces 2: #2}% + \pkgcls@debug{\@spaces 3: #3}% + \pkgcls@debug{\@spaces 4: #4}% + \def\pkgcls@name{#1}% % for info message + \def\pkgcls@arg {#3}% % for info message + \pkgcls@parse@date@arg{#3}% + \let\pkgcls@candidate\@empty \begingroup - \@insertfalse - \@setfloattypecounts - \@getfpsbit \tw@ - \ifodd\@tempcnta - \@flsetnum \@dbltopnum - \ifnum \@dbltopnum>\z@ - \@tempswafalse - \ifdim \@dbltoproom>\ht\@currbox - \@tempswatrue - \else - \ifnum \@fpstype<\sixt@@n - \advance \@dbltoproom \@textmin - \ifdim \@dbltoproom>\ht\@currbox - \@tempswatrue - \fi - \advance \@dbltoproom -\@textmin - \fi - \fi - \if@tempswa - \@bitor \@currtype \@deferlist - \@testwrongwidth\@currbox - \if@test - \else - \@tempdima -\ht\@currbox - \advance\@tempdima - -\ifx \@dbltoplist\@empty \dbltextfloatsep \else - \dblfloatsep \fi - \global \advance \@dbltoproom \@tempdima - \global \advance \@colht \@tempdima - \global \advance \@dbltopnum \m@ne - \@cons \@dbltoplist \@currbox - \@inserttrue - \fi - \fi - \fi - \fi - \if@insert + \edef\reserved@a{% + \endgroup + \unexpanded{\load@onefilewithoptions#1[#2]}% + [\pkgcls@mindate]% + \unexpanded{#4}}% + \reserved@a + } +\fi +\def\pkgcls@parse@date@arg #1{% + \ifx\@nil#1\@nil + \pkgcls@targetdate\requestedLaTeXdate\relax + \let\pkgcls@targetlabel\@empty + \let\pkgcls@mindate\@empty \else - \@cons\@deferlist\@currbox + \pkgcls@parse@date@arg@#1=\@nil\relax \fi - \endgroup -}% -\def\@addmarginpar{\@next\@marbox\@currlist{\@cons\@freelist\@marbox - \@cons\@freelist\@currbox}\@latexbug\@tempcnta\@ne - \if@twocolumn - \if@firstcolumn \@tempcnta\m@ne \fi + } +\def\pkgcls@parse@date@arg@#1=#2\@nil{% + \pkgcls@targetdate + \ifx\@nil#1\@nil + \@parse@version0#2//00\@nil\relax + \ifnum \pkgcls@targetdate=\z@ + \pkgcls@targetdate\@ne + \def\pkgcls@innerdate{\maxdimen}% + \pkgcls@parse@date@arg@version#2% + \else + \edef\pkgcls@innerdate{\the\pkgcls@targetdate}% + \fi + \let\pkgcls@mindate\@empty \else - \if@mparswitch - \ifodd\c@page \else\@tempcnta\m@ne \fi + \requestedLaTeXdate\relax + \let\pkgcls@targetlabel\@empty + \def\pkgcls@innerdate{\maxdimen}% + \def\pkgcls@mindate{#1}% + \ifnum \pkgcls@targetdate > \z@ + \ifnum \@parse@version0#1//00\@nil > \pkgcls@targetdate + \@latex@warning@no@line{Suspicious rollback/min-date date given\MessageBreak + A minimal date of #1 has been specified for + \@cls@pkg\MessageBreak '\pkgcls@name'.\MessageBreak + But this is in conflict + with a rollback request to \requestedpatchdate} + \fi \fi - \if@reversemargin \@tempcnta -\@tempcnta \fi \fi - \ifnum\@tempcnta <\z@ \global\setbox\@marbox\box\@currbox \fi - \@tempdima\@mparbottom - \advance\@tempdima -\@pageht - \advance\@tempdima\ht\@marbox - \ifdim\@tempdima >\z@ - \@latex@warning@no@line {Marginpar on page \thepage\space moved}% +} +\def\pkgcls@parse@date@arg@version#1={% + \def\pkgcls@targetlabel{#1}} +\def\DeclareRelease#1#2#3{% + \ifnum\pkgcls@targetdate>\z@ % some sort of rollback request + \pkgcls@debug{---\string\DeclareRelease:}% + \pkgcls@debug{\@spaces 1: #1}% + \pkgcls@debug{\@spaces 2: #2}% + \pkgcls@debug{\@spaces 3: #3}% + \ifx\@nil#2\@nil + \ifnum\pkgcls@targetdate=\@ne % named request + \def\reserved@a{#1}% + \ifx\pkgcls@targetlabel\reserved@a + \pkgcls@use@this@release{#3}{}% + \else + \pkgcls@debug{Label doesn't match}% + \fi + \else + \pkgcls@debug{Date request: ignored}% + \fi \else - \@tempdima\z@ + \ifnum\pkgcls@targetdate>\@ne % a real request + \ifnum\@parse@version#2//00\@nil + >\pkgcls@targetdate + \ifx\pkgcls@candidate\@empty + \pkgcls@rollbackdate@error{#2}% + \pkgcls@use@this@release{#3}{#2}% + \else + \pkgcls@use@this@release\pkgcls@candidate + \pkgcls@releasedate + \fi + \else + \def\pkgcls@candidate{#3}% + \def\pkgcls@releasedate{#2}% + \pkgcls@debug{New candidate: #3}% + \fi + \else + \def\reserved@a{#1}% + \ifx\pkgcls@targetlabel\reserved@a + \pkgcls@use@this@release{#3}{#2}% + \else + \pkgcls@debug{Label doesn't match}% + \fi + \fi \fi - \global\@mparbottom\@pageht - \global\advance\@mparbottom\@tempdima - \global\advance\@mparbottom\dp\@marbox - \global\advance\@mparbottom\marginparpush - \advance\@tempdima -\ht\@marbox - \global\setbox \@marbox - \vbox {\vskip \@tempdima - \box \@marbox}% - \global \ht\@marbox \z@ - \global \dp\@marbox \z@ - \kern -\@pagedp - \nointerlineskip - \hb@xt@\columnwidth - {\ifnum \@tempcnta >\z@ - \hskip\columnwidth \hskip\marginparsep - \else - \hskip -\marginparsep \hskip -\marginparwidth - \fi - \box\@marbox \hss}% - \nointerlineskip - \hbox{\vrule \@height\z@ \@width\z@ \@depth\@pagedp}} -\newinsert \@kludgeins -\global\dimen\@kludgeins \maxdimen -\global\count\@kludgeins 1000 -\gdef \enlargethispage {% - \@ifstar - {% - \@enlargepage{\hbox{\kern\p@}}}% - {% - \@enlargepage\@empty}% -} -\gdef\@enlargepage#1#2{% - \@tempskipa#2\relax - \ifdim \@tempskipa>.5\maxdimen - \@latexerr{Suggested\space extra\space height\space - (\the\@tempskipa)\space dangerously\space - large}\@eha - \else - \ifdim \vsize<.5\maxdimen - \@bsphack - \insert\@kludgeins{#1\vskip-\@tempskipa}% - \@esphack - \else - \@latexerr{Page\space height\space already\space - too\space large}\@eha - \fi - \fi + \fi } -\def \suppressfloats {% - \@ifnextchar [% - \@flstop - {\global \@colnum \z@}% +\def\pkgcls@use@this@release#1#2{% + \pkgcls@show@selection{#1}{#2}% + \pkgcls@targetdate\z@ + \@@input #1\relax + \endinput } -\def \@flstop [#1]{% - \if t#1% - \global \@topnum \z@ - \fi - \if b#1% - \global \@botnum \z@ - \fi +\def\pkgcls@show@selection#1#2{% + \pkgcls@debug{Result: use #1}% + \GenericInfo + {\@spaces\@spaces\space}{Rollback for + \@cls@pkg\space'\@currname' requested -> + \ifnum\pkgcls@targetdate>\@ne + date + \ifnum\requestedLaTeXdate=\pkgcls@targetdate + \requestedpatchdate + \else + \expandafter\@gobble\pkgcls@arg + \fi.\MessageBreak + Best approximation is + \else + version '\pkgcls@targetlabel'.\MessageBreak + This corresponds to + \fi + \ifx\@nil#2\@nil + a special release% + \else + the release introduced on #2% + \fi + \@gobble}% } -\newcount \@fpstype -\newdimen \@reqcolroom -\newdimen \@textfloatsheight -\def \@fpsadddefault {% - \edef \@fps {\@fps\csname fps@\@captype \endcsname}% - \@latex@warning {% - No positions in optional float specifier.\MessageBreak - Default added (so using `\@fps')}% +\def\pkgcls@rollbackdate@error#1{% + \@latex@error{Suspicious rollback date given}% + {The \@cls@pkg\space'\@currname' claims that it + came into existence on #1 which\MessageBreak + is after your requested rollback date --- so + something is wrong here.\MessageBreak + Continue and we use the earliest known release.}} +\def\DeclareCurrentRelease#1#2{% + \ifnum\pkgcls@targetdate>\z@ % some sort of rollback request + \pkgcls@debug{---DeclareCurrentRelease}% + \pkgcls@debug{ 1: #1}% + \pkgcls@debug{ 2: #2}% + \ifnum\pkgcls@targetdate>\@ne % a date request + \ifnum\@parse@version#2//00\@nil + >\pkgcls@targetdate + \ifx\pkgcls@candidate\@empty + \pkgcls@rollbackdate@error{#2}% + \else + \pkgcls@use@this@release\pkgcls@candidate + \pkgcls@releasedate + \fi + \else + \pkgcls@show@selection{current version}{#2}% + \fi + \else % a label request + \def\reserved@a{#1}% + \ifx\pkgcls@targetlabel\reserved@a + \pkgcls@show@selection{current version}{#2}% + \else + \@latex@error{Requested version '\pkgcls@targetlabel' for + \@cls@pkg\space'\@currname' is unknown}\@ehc + \fi + \fi + \fi } -\def \@setfloattypecounts {% - \@currtype \count\@currbox - \@fpstype \count\@currbox - \divide\@currtype\@xxxii \multiply\@currtype\@xxxii - \advance \@fpstype -\@currtype +\DeclareRobustCommand\IfTargetDateBefore[1]{% + \ifnum\pkgcls@innerdate <% + \expandafter\@parse@version\expandafter0#1//00\@nil + \typeout{Exclude code introduced on #1}% + \expandafter\@firstoftwo + \else + \typeout{Include code introduced on #1}% + \expandafter\@secondoftwo + \fi } -\def \@getfpsbit {% - \@boxfpsbit \@currbox +%% +%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach, +%% Phelype Oleinik & LaTeX Team +%%% From File: ltfilehook.dtx +\providecommand\ltfilehookversion{v1.0b} +\providecommand\ltfilehookdate{2020/09/26} +\ExplSyntaxOn +\tl_new:N \CurrentFile +\tl_new:N \CurrentFilePath +\tl_new:N \CurrentFileUsed +\tl_new:N \CurrentFilePathUsed +\ExplSyntaxOff +\ExplSyntaxOn +\cs_new:Npn \__filehook_file_parse_full_name:nN #1 + { + \exp_args:Nf \file_parse_full_name_apply:nN + { + \exp_args:Nf \__filehook_full_name:nn + { \file_full_name:n {#1} } {#1} + } + } +\cs_new:Npn \__filehook_full_name:nn #1 #2 + { + \tl_if_empty:nTF {#1} + { \tl_trim_spaces:n {#2} } + { \tl_trim_spaces:n {#1} } + } +\cs_new:Npn \__filehook_if_no_extension:nTF #1 + { + \exp_args:Ne \tl_if_empty:nTF + { \file_parse_full_name_apply:nN {#1} \use_iii:nnn } + } +\cs_new_protected:Npn \__filehook_drop_extension:N #1 + { + \tl_gset:Nx #1 + { + \exp_args:NV \__filehook_file_parse_full_name:nN #1 + \__filehook_drop_extension_aux:nnn + } + } +\cs_new:Npn \__filehook_drop_extension_aux:nnn #1 #2 #3 + { \tl_if_empty:nF {#1} { #1 / } #2 } +\tl_new:N \l__filehook_internal_tl +\seq_new:N \g__filehook_input_file_seq +\cs_new_protected:Npn \__filehook_file_push: + { + \seq_gpush:Nx \g__filehook_input_file_seq + { + { \CurrentFilePathUsed } { \CurrentFileUsed } + { \CurrentFilePath } { \CurrentFile } + } + } +\cs_new_protected:Npn \__filehook_file_pop: + { + \seq_gpop:NNTF \g__filehook_input_file_seq \l__filehook_internal_tl + { \exp_after:wN \__filehook_file_pop_assign:nnnn \l__filehook_internal_tl } + { + \msg_error:nnn { hooks } { should-not-happen } + { Tried~to~pop~from~an~empty~file~name~stack. } + } + } +\cs_new_protected:Npn \__filehook_file_pop_assign:nnnn #1 #2 #3 #4 + { + \tl_set:Nn \CurrentFilePathUsed {#1} + \tl_set:Nn \CurrentFileUsed {#2} + \tl_set:Nn \CurrentFilePath {#3} + \tl_set:Nn \CurrentFile {#4} + } +\ExplSyntaxOff +\let\InputIfFileExists\@undefined +\DeclareRobustCommand \InputIfFileExists[2]{% + \IfFileExists{#1}% + {% + \@expl@@@filehook@file@push@@ + \@filehook@set@CurrentFile + \edef\reserved@a{\@filef@und + \@expl@@@filehook@file@pop@assign@@nnnn + {\CurrentFilePathUsed}% + {\CurrentFileUsed}% + {\CurrentFilePath}% + {\CurrentFile}}% + \expandafter\@swaptwoargs\expandafter + {\reserved@a}% + {% + #2% + \@addtofilelist{#1}% + \UseHook{file/before}% + \UseHook{file/before/\CurrentFile}% + \@@input + }% + \UseHook{file/after/\CurrentFile}% + \UseHook{file/after}% + \@expl@@@filehook@file@pop@@ + }% } -\def \@boxfpsbit #1#2{% - \@tempcnta \count#1% - \divide \@tempcnta #2\relax +\ExplSyntaxOn +\cs_new_protected:Npn \__filehook_subst_add:nn #1 #2 + { + \group_begin: + \cs_set:cpx { } { \exp_not:o { \cs:w\cs_end: } } + \int_set:Nn \tex_escapechar:D { -1 } + \cs_gset:cpx { @file-subst@ \__filehook_subst_file_normalize:n {#1} } + { \__filehook_subst_file_normalize:n {#2} } + \group_end: + } +\cs_new_protected:Npn \__filehook_subst_remove:n #1 + { + \group_begin: + \cs_set:cpx { } { \exp_not:o { \cs:w\cs_end: } } + \int_set:Nn \tex_escapechar:D { -1 } + \cs_undefine:c { @file-subst@ \__filehook_subst_file_normalize:n {#1} } + \group_end: + } +\cs_new:Npn \__filehook_subst_file_normalize:n #1 + { + \exp_after:wN \__filehook_subst_empty_name_chk:NN + \cs:w \exp_after:wN \cs_end: + \cs:w \__filehook_file_parse_full_name:nN {#1} \use_ii_iii:nnn \cs_end: + } +\cs_new:Npn \__filehook_subst_empty_name_chk:NN #1 #2 + { \if_meaning:w #1 #2 .tex \else: \token_to_str:N #2 \fi: } +\cs_gset:Npn \use_ii_iii:nnn #1 #2 #3 {#2 #3} +\ExplSyntaxOff +\ExplSyntaxOn +\cs_new_eq:NN \declare@file@substitution \__filehook_subst_add:nn +\cs_new_eq:NN \undeclare@file@substitution \__filehook_subst_remove:n +\ExplSyntaxOff +\ExplSyntaxOff +\def\set@curr@file#1{% + \begingroup + \escapechar\m@ne + \expandafter\def\csname\expandafter\endcsname + \expandafter{\csname\endcsname}% + \@expl@@@filehook@if@no@extension@@nTF{#1}% + {\@tempswatrue}{\@tempswafalse}% + \@kernel@make@file@csname\@curr@file + \@expl@@@filehook@resolve@file@subst@@w {#1}% + \@expl@@@filehook@if@file@replaced@@TF + {\@kernel@make@file@csname\@curr@file@reqd + \@expl@@@filehook@normalize@file@name@@w{#1}% + \if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file@reqd \fi}% + {\if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file \fi + \global\let\@curr@file@reqd\@curr@file}% + \endgroup} +\def\@kernel@make@file@csname#1#2#3{% + \xdef#1{\expandafter\@set@curr@file@aux + \csname\expandafter#2\@firstofone#3\@nil\endcsname}} +\def\@set@curr@file@aux#1{% + \expandafter\ifx\csname\endcsname#1% + .tex\else\string#1\fi} +\def\@filehook@set@CurrentFile{% + \@expl@@@filehook@set@curr@file@@N{\@curr@file}% + \CurrentFileUsed\CurrentFilePathUsed + \ifx\@curr@file@reqd\@curr@file + \let\CurrentFile\CurrentFileUsed + \let\CurrentFilePath\CurrentFilePathUsed + \else + \@expl@@@filehook@set@curr@file@@N{\@curr@file@reqd}% + \CurrentFile\CurrentFilePath + \fi} +\ExplSyntaxOn +\cs_new_protected:Npn \__filehook_set_curr_file:N #1 + { \exp_args:NV \__filehook_set_curr_file:nNN #1 } +\cs_new_protected:Npn \__filehook_set_curr_file:nNN #1 + { + \__filehook_file_parse_full_name:nN {#1} + \__filehook_set_curr_file_assign:nnnNN + } +\cs_new_protected:Npn \__filehook_set_curr_file_assign:nnnNN #1 #2 #3 #4 #5 + { + \str_set:Nn #5 {#1} + \str_set:Nn #4 {#2#3} + } +\ExplSyntaxOff +\ExplSyntaxOn +\cs_new:Npn \__filehook_resolve_file_subst:w #1 \@nil + { \__filehook_file_parse_full_name:nN {#1} \__filehook_file_subst_begin:nnn } +\cs_new:Npn \__filehook_normalize_file_name:w #1 \@nil + { \__filehook_file_parse_full_name:nN {#1} \__filehook_file_name_compose:nnn } +\cs_new:Npn \__filehook_file_name_compose:nnn #1 #2 #3 + { \tl_if_empty:nF {#1} { #1 / } #2#3 } +\flag_new:n { __filehook_file_replaced } +\cs_new:Npn \__filehook_if_file_replaced:TF #1 #2 + { \flag_if_raised:nTF { __filehook_file_replaced } {#1} {#2} } +\cs_new:Npn \__filehook_file_subst_begin:nnn #1 #2 #3 + { + \__filehook_file_subst_tortoise_hare:nn { #2#3 } { #2#3 } + { \__filehook_file_name_compose:nnn {#1} {#2} {#3} } + } +\ExplSyntaxOff +\ExplSyntaxOn +\cs_new:Npn \__filehook_file_subst_tortoise_hare:nn #1 #2 #3 + { + \cs_if_exist:cTF { @file-subst@ #2 } + { + \flag_if_raised:nF { __filehook_file_replaced } + { \flag_raise:n { __filehook_file_replaced } } + \cs_if_exist:cTF { @file-subst@ \use:c { @file-subst@ #2 } } + { + \__filehook_file_subst_loop:cc + { @file-subst@ #1 } + { @file-subst@ \use:c { @file-subst@ #2 } } + } + { \use:c { @file-subst@ #2 } } + } + { #3 } + } +\cs_new:Npn \__filehook_file_subst_loop:NN #1 #2 + { + \token_if_eq_meaning:NNTF #1 #2 + { + .tex + \__filehook_file_subst_cycle_error:cN { @file-subst@ #1 } #1 + } + { \__filehook_file_subst_tortoise_hare:nn {#1} {#2} {#2} } + } +\cs_generate_variant:Nn \__filehook_file_subst_loop:NN { cc } +\cs_new:Npn \__filehook_file_subst_cycle_error:NN #1 #2 + { + \__kernel_msg_expandable_error:nnff { kernel } { file-cycle } + {#1} { \use:c { @file-subst@ #1 } } + \token_if_eq_meaning:NNF #1 #2 + { \__filehook_file_subst_cycle_error:cN { @file-subst@ #1 } #2 } + } +\cs_generate_variant:Nn \__filehook_file_subst_cycle_error:NN { c } +\__kernel_msg_new:nnn { kernel } { file-cycle } + { File~loop!~#1~replaced~by~#2... } +\ExplSyntaxOff +\def\disable@package@load#1#2{% + \global\@namedef{@pkg-disable@#1.\@pkgextension}{#2}} +\def\@disable@packageload@do#1#2{% + \@ifundefined{@pkg-disable@#1}{#2}% + {\@nameuse{@pkg-disable@#1}}} +\def\reenable@package@load#1{% + \global\expandafter\let + \csname @pkg-disable@#1.\@pkgextension \endcsname \@undefined} +\ExplSyntaxOn +\cs_new_eq:NN \@expl@@@filehook@if@no@extension@@nTF + \__filehook_if_no_extension:nTF +\cs_new_eq:NN \@expl@@@filehook@set@curr@file@@N + \__filehook_set_curr_file:N +\cs_new_eq:NN \@expl@@@filehook@resolve@file@subst@@w + \__filehook_resolve_file_subst:w +\cs_new_eq:NN \@expl@@@filehook@normalize@file@name@@w + \__filehook_normalize_file_name:w +\cs_new_eq:NN \@expl@@@filehook@if@file@replaced@@TF + \__filehook_if_file_replaced:TF + +\cs_new_eq:NN \@expl@@@filehook@drop@extension@@N + \__filehook_drop_extension:N +\cs_new_eq:NN \@expl@@@filehook@file@push@@ + \__filehook_file_push: +\cs_new_eq:NN \@expl@@@filehook@file@pop@@ + \__filehook_file_pop: +\cs_new_eq:NN \@expl@@@filehook@file@pop@assign@@nnnn + \__filehook_file_pop_assign:nnnn +\ExplSyntaxOff +\declare@file@substitution{atveryend.sty}{atveryend-ltx.sty} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% +%% File: ltshipout.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team +%% +%%% From File: ltshipout.dtx +\providecommand\ltshipoutversion{v1.0c} +\providecommand\ltshipoutdate{2020/09/27} +\ExplSyntaxOn +\bool_new:N \g__shipout_debug_bool +\cs_new_eq:NN \__shipout_debug:n \use_none:n +\cs_new_protected:Npn \shipout_debug_on: + { + \bool_gset_true:N \g__shipout_debug_bool + \__shipout_debug_gset: + } +\cs_new_protected:Npn \shipout_debug_off: + { + \bool_gset_false:N \g__shipout_debug_bool + \__shipout_debug_gset: + } +\cs_new_protected:Npn \__shipout_debug_gset: + { + \cs_gset_protected:Npx \__shipout_debug:n ##1 + { \bool_if:NT \g__shipout_debug_bool {##1} } + } +\box_new:N \l_shipout_box +\cs_set_eq:NN \ShipoutBox \l_shipout_box +\cs_set_protected:Npn \__shipout_execute: { + \tl_set:Nx \l__shipout_group_level_tl + { \int_value:w \tex_currentgrouplevel:D } + \tex_afterassignment:D \__shipout_execute_test_level: + \tex_setbox:D \l_shipout_box +} +\cs_gset_eq:NN \shipout \__shipout_execute: +\tl_new:N \l__shipout_group_level_tl +\cs_new:Npn \__shipout_execute_test_level: { + \int_compare:nNnT + \l__shipout_group_level_tl < \tex_currentgrouplevel:D + \tex_aftergroup:D + \__shipout_execute_cont: +} +\cs_new:Npn \__shipout_execute_cont: { + \box_if_empty:NTF \l_shipout_box + { \PackageWarning{ltshipout}{Ignoring~ void~ shipout~ box} } + { + \bool_gset_false:N \g__shipout_discard_bool + \cs_set_eq:NN \__shipout_saved_protect: \protect + \set@typeset@protect + \__shipout_get_box_size:N \l_shipout_box + \hook_use:n {shipout/before} + \int_gincr:N \g_shipout_totalpages_int + \bool_if:NTF \g__shipout_discard_bool + { \PackageInfo{ltshipout}{Completed~ page~ discarded} + \bool_gset_false:N \g__shipout_discard_bool + \tex_deadcycles:D \c_zero_int + } + { \box_if_empty:NTF \l_shipout_box + { \PackageWarning{ltshipout}{ + Shipout~ box~ was~ voided~ by~ hook,\MessageBreak + ignoring~ shipout~ box } + } + { + \int_gincr:N \g_shipout_readonly_int + \__shipout_debug:n { + \typeout{Absolute~ page~ =~ \int_use:N \g_shipout_readonly_int + \space (target:~ \@abspage@last)} + } + \__shipout_get_box_size:N \l_shipout_box + \hook_if_empty:nF {shipout/foreground} + { \__shipout_add_foreground_picture:n + { \hook_use:n {shipout/foreground} } } + \hook_if_empty:nF {shipout/background} + { \__shipout_add_background_picture:n + { \@kernel@before@shipout@background + \hook_use:n {shipout/background} } } + \__shipout_execute_firstpage_hook: + \int_compare:nNnT \@abspage@last = \g_shipout_readonly_int + { \hook_if_empty:nF {shipout/lastpage} + { \__shipout_debug:n { \typeout{Executing~ lastpage~ hook~ + on~ page~ \int_use:N \g_shipout_readonly_int } } + \__shipout_add_foreground_box:n { \UseHook{shipout/lastpage} + \@kernel@after@shipout@lastpage } + } + \bool_gset_true:N \g__shipout_lastpage_handled_bool + } + \cs_set_eq:NN \protect \exp_not:N + \tex_shipout:D \box_use:N \l_shipout_box + } + } + \cs_set_eq:NN \protect \__shipout_saved_protect: + } } -\def \@testfp #1{% - \@boxfpsbit #18\relax % Really `#1 8' for human readers! - \ifodd \@tempcnta - \else - \@testtrue - \fi +\cs_new_eq:NN \__shipout_saved_protect: \protect +\hook_new:n{shipout/before} +\hook_new:n{shipout/foreground} +\hook_new:n{shipout/background} +\hook_new:n{shipout/firstpage} +\hook_new:n{shipout/lastpage} +\let\@kernel@after@shipout@lastpage\@empty +\let\@kernel@before@shipout@background\@empty +\cs_new:Npn \__shipout_execute_firstpage_hook: { + \hook_if_empty:nF {shipout/firstpage} + { \__shipout_add_background_box:n { \UseHook{shipout/firstpage} } } + \cs_gset_eq:NN \__shipout_execute_firstpage_hook: \prg_do_nothing: + \cs_gset:Npn \__shipout_add_firstpage_material:Nn ##1 ##2 { + \@latex@warning{ + First~ page~ is~ already~ shipped~ out,~ ignoring\MessageBreak + \string##1 } + } } -\def \@setfpsbit #1{% - \@tempcntb \@tempcnta - \divide \@tempcntb #1\relax - \ifodd \@tempcntb - \else - \advance \@tempcnta #1\relax - \fi +\bool_new:N \g__shipout_lastpage_handled_bool +\cs_new:Npn \__shipout_add_firstpage_material:Nn #1#2 { + \AddToHook{shipout/firstpage}{#2} +} +\cs_new:Npn \__shipout_get_box_size:N #1 { + \dim_set:Nn \l_shipout_box_ht_dim { \box_ht:N #1 } + \dim_set:Nn \l_shipout_box_dp_dim { \box_dp:N #1 } + \dim_set:Nn \l_shipout_box_wd_dim { \box_wd:N #1 } + \dim_set:Nn \l_shipout_box_ht_plus_dp_dim { \l_shipout_box_ht_dim + + \l_shipout_box_dp_dim } +} +\dim_new:N \l_shipout_box_ht_dim +\dim_new:N \l_shipout_box_dp_dim +\dim_new:N \l_shipout_box_wd_dim +\dim_new:N \l_shipout_box_ht_plus_dp_dim +\bool_new:N \g__shipout_discard_bool +\box_new:N \l__shipout_tmp_box +\tl_new:N \l__shipout_saved_badness_tl +\cs_new:Npn \__shipout_add_background_box:n #1 +{ \__shipout_get_box_size:N \l_shipout_box + \box_if_vertical:NTF \l_shipout_box + { + \tl_set:Nx \l__shipout_saved_badness_tl + { \vfuzz=\the\vfuzz\relax + \vbadness=\the\vbadness\relax } + \vfuzz=\c_max_dim + \vbadness=\c_max_int + \vbox_set_to_ht:Nnn \l_shipout_box \l_shipout_box_ht_plus_dp_dim + { + \hbox_set:Nn \l__shipout_tmp_box + { \l__shipout_saved_badness_tl #1 } + \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim + \skip_zero:N \baselineskip + \skip_zero:N \lineskip + \skip_zero:N \lineskiplimit + \box_use:N \l__shipout_tmp_box + \vbox_unpack:N \l_shipout_box + \kern \c_zero_dim + } + \box_set_ht:Nn \l_shipout_box \l_shipout_box_ht_dim + \box_set_dp:Nn \l_shipout_box \l_shipout_box_dp_dim + \l__shipout_saved_badness_tl + } + { + \box_if_horizontal:NT \l_shipout_box + { + \tl_set:Nx \l__shipout_saved_badness_tl + { \hfuzz=\the\hfuzz\relax + \hbadness=\the\hbadness\relax } + \hfuzz=\c_max_dim + \hbadness=\c_max_int + \hbox_set_to_wd:Nnn \l_shipout_box \l_shipout_box_wd_dim + { + \hbox_set:Nn \l__shipout_tmp_box + { \l__shipout_saved_badness_tl #1 } + \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim + \box_move_up:nn + \l_shipout_box_ht_dim + { \box_use:N \l__shipout_tmp_box } + \hbox_unpack:N \l_shipout_box + } + \l__shipout_saved_badness_tl + } + } } -\def \@resethfps {% - \let\reserved@a\@empty - \ifnum \@fpstype=\@ne - \def \reserved@a {!}% - \@fpstype 17 - \fi - \ifnum \@fpstype=17 - \global \advance \count\@currbox \tw@ - \@latex@warning@no@line {% - `\reserved@a h' float specifier changed to `\reserved@a ht'}% - \fi +\cs_new:Npn \__shipout_add_foreground_box:n #1 +{ + \box_if_vertical:NTF \l_shipout_box + { + \tl_set:Nx \l__shipout_saved_badness_tl + { \vfuzz=\the\vfuzz\relax + \vbadness=\the\vbadness\relax } + \vfuzz=\c_max_dim + \vbadness=\c_max_int + \vbox_set_to_ht:Nnn \l_shipout_box \l_shipout_box_ht_plus_dp_dim + { + \hbox_set:Nn \l__shipout_tmp_box + { \l__shipout_saved_badness_tl #1 } + \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim + \skip_zero:N \baselineskip + \skip_zero:N \lineskip + \skip_zero:N \lineskiplimit + \vbox_unpack:N \l_shipout_box + \kern -\l_shipout_box_ht_plus_dp_dim + \box_use:N \l__shipout_tmp_box + \kern \l_shipout_box_ht_plus_dp_dim + } + \l__shipout_saved_badness_tl + \box_set_ht:Nn \l_shipout_box \l_shipout_box_ht_dim + \box_set_dp:Nn \l_shipout_box \l_shipout_box_dp_dim + } + { + \box_if_horizontal:NT \l_shipout_box + { + \tl_set:Nx \l__shipout_saved_badness_tl + { \hfuzz=\the\hfuzz\relax + \hbadness=\the\hbadness\relax } + \hfuzz=\c_max_dim + \hbadness=\c_max_int + \hbox_set_to_wd:Nnn \l_shipout_box \l_shipout_box_wd_dim + { + \hbox_unpack:N \l_shipout_box + \kern -\box_wd:N \l_shipout_box + \hbox_set:Nn \l__shipout_tmp_box + { \l__shipout_saved_badness_tl #1 } + \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim + \box_move_up:nn { \box_ht:N \l_shipout_box } + { \box_use:N \l__shipout_tmp_box } + \kern \box_wd:N \l_shipout_box + }% + \l__shipout_saved_badness_tl + } + } } -\def \@flsetnum #1{% - \ifnum \@fpstype<\sixt@@n - \ifnum #1=\z@ - #1\@ne - \fi - \fi +\cs_new:Npn \__shipout_init_page_origins: { + \tl_const:Nx \c__shipout_horigin_tl + { + \cs_if_exist_use:NTF \pdfvariable { horigin } + { \cs_if_exist_use:NF \pdfhorigin { 1in } } + } + \tl_const:Nx \c__shipout_vorigin_tl + { + \cs_if_exist_use:NTF \pdfvariable { vorigin } + { \cs_if_exist_use:NF \pdfvorigin { 1in } } + } + \cs_gset_eq:NN \__shipout_init_page_origins: \prg_do_nothing: +} +\cs_new:Npn \__shipout_picture_overlay:n #1 { + \__shipout_init_page_origins: + \kern -\c__shipout_horigin_tl \scan_stop: + \vbox_to_zero:n { + \kern -\c__shipout_vorigin_tl \scan_stop: + \unitlength 1pt \scan_stop: + \hbox_set_to_wd:Nnn \l__shipout_tmp_box \c_zero_dim + { \ignorespaces #1 \hss } + \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim + \box_use:N \l__shipout_tmp_box + \tex_vss:D + } } -\def \@flsettextmin {% - \ifnum \@fpstype<\sixt@@n - \@textmin \z@ - \else - \@textmin \textfraction\@colht - \fi +\cs_new:Npn \__shipout_add_background_picture:n #1 { + \__shipout_add_background_box:n { \__shipout_picture_overlay:n {#1} } +} +\cs_new:Npn \__shipout_add_foreground_picture:n #1 { + \__shipout_add_foreground_box:n { \__shipout_picture_overlay:n {#1} } +} +\cs_new_protected:Npn \shipout_discard: { + \bool_gset_true:N \g__shipout_discard_bool +} +\int_new:N \g_shipout_readonly_int +\cs_new_eq:NN \ReadonlyShipoutCounter \g_shipout_readonly_int +\int_new:N \g_shipout_totalpages_int +\cs_new_eq:NN \c@totalpages \g_shipout_totalpages_int +\cs_new:Npn \thetotalpages { \arabic{totalpages} } +\xdef\@abspage@last{\number\maxdimen} +\g@addto@macro \@kernel@after@enddocument { + \int_compare:nNnT \@abspage@last = \maxdimen + { + \xdef\@abspage@last{ \int_eval:n {\g_shipout_readonly_int + 1} } + } } -\def \@flcheckspace #1#2{% - \advance \@reqcolroom - \ifx #2\@empty \textfloatsep \else \floatsep \fi - \ifdim \@colroom>\@reqcolroom - \ifdim #1>\ht\@currbox - \@tempswatrue - \else - \ifnum \@fpstype<\sixt@@n - \@tempswatrue - \fi +\g@addto@macro \@kernel@after@enddocument@afterlastpage { + \int_compare:nNnF \g_shipout_readonly_int = 0 + { + \if@filesw + \iow_now:Nx \@auxout { + \gdef\string\@abspage@last {\int_use:N \g_shipout_readonly_int}} \fi - \fi -} -\def \@flupdates #1#2#3{% - \global \advance #1\m@ne - \global \advance \@colnum \m@ne - \@tempdima -\ht\@currbox - \advance \@tempdima - -\ifx #3\@empty \textfloatsep \else \floatsep \fi - \global \advance #2\@tempdima - \global \advance \@colroom \@tempdima - \@cons #3\@currbox -} -\def\@makefcolumn #1{% - \begingroup - \@fpmin -\maxdimen - \let \@testfp \@gobble - \@tryfcolumn #1% - \endgroup -} -\def\@outputdblcol{% - \if@firstcolumn - \global\@firstcolumnfalse - \global\setbox\@leftcolumn\copy\@outputbox - \splitmaxdepth\maxdimen - \vbadness\maxdimen - \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}% - \setbox\@outputbox\vsplit\@outputbox to\maxdimen - \toks@\expandafter{\topmark}% - \xdef\@firstcoltopmark{\the\toks@}% - \toks@\expandafter{\splitfirstmark}% - \xdef\@firstcolfirstmark{\the\toks@}% - \ifx\@firstcolfirstmark\@empty - \global\let\@setmarks\relax - \else - \gdef\@setmarks{% - \let\firstmark\@firstcolfirstmark - \let\topmark\@firstcoltopmark}% - \fi - \else - \global\@firstcolumntrue - \setbox\@outputbox\vbox{% - \hb@xt@\textwidth{% - \hb@xt@\columnwidth{\box\@leftcolumn \hss}% - \hfil - {\normalcolor\vrule \@width\columnseprule}% - \hfil - \hb@xt@\columnwidth{\box\@outputbox \hss}}}% - \@combinedblfloats - \@setmarks - \@outputpage - \begingroup - \@dblfloatplacement - \@startdblcolumn - \@whilesw\if@fcolmade \fi{\@outputpage - \@startdblcolumn}% - \endgroup - \fi}% -\newcount\c@topnumber -\setcounter{topnumber}{2} -\newcommand\topfraction{.7} -\newcount\c@bottomnumber -\setcounter{bottomnumber}{1} -\newcommand\bottomfraction{.3} -\newcount\c@totalnumber -\setcounter{totalnumber}{3} -\newcommand\textfraction{.2} -\newcommand\floatpagefraction{.5} -\newcount\c@dbltopnumber -\setcounter{dbltopnumber}{2} -\newcommand\dbltopfraction{.7} -\newcommand\dblfloatpagefraction{.5} -\newskip\floatsep -\newskip\textfloatsep -\newskip\intextsep -\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@} -\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} -\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@} -\newskip\dblfloatsep -\newskip\dbltextfloatsep -\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} -\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} -\newskip\@fptop -\newskip\@fpsep -\newskip\@fpbot -\setlength\@fptop{0\p@ \@plus 1fil} -\setlength\@fpsep{8\p@ \@plus 2fil} -\setlength\@fpbot{0\p@ \@plus 1fil} -\newskip\@dblfptop -\newskip\@dblfpsep -\newskip\@dblfpbot -\setlength\@dblfptop{0\p@ \@plus 1fil} -\setlength\@dblfpsep{8\p@ \@plus 2fil} -\setlength\@dblfpbot{0\p@ \@plus 1fil} -\let\topfigrule=\relax -\let\botfigrule=\relax -\let\dblfigrule=\relax -%%% From File: ltclass.dtx -\newif\if@compatibility -\def\@documentclasshook{% - \ifx\@normalsize\@undefined - \let\@normalsize\normalsize - \fi + \bool_if:NF \g__shipout_lastpage_handled_bool + { + \bool_lazy_and:nnF + { \hook_if_empty_p:n {shipout/lastpage} } + { \tl_if_empty_p:N \@kernel@after@shipout@lastpage } + { + \tex_shipout:D\vbox to\textheight + { + \hbox:n { \UseHook{shipout/lastpage} + \@kernel@after@shipout@lastpage } + \__shipout_excuse_extra_page: + \null + } + \cs_gset_eq:NN \@extra@page@added \relax + } + } + } } -\let\@declaredoptions\@empty -\let\@classoptionslist\relax -\@onlypreamble\@classoptionslist -\let\@unusedoptionlist\@empty -\@onlypreamble\@unusedoptionlist -\let\CurrentOption\@empty -\let\@currname\@empty -\global\let\@currext=\@empty -\def\@clsextension{cls} -\def\@pkgextension{sty} -\@onlypreamble\@clsextension -\@onlypreamble\@pkgextension -\def\@pushfilename{% - \xdef\@currnamestack{% - {\@currname}% - {\@currext}% - {\the\catcode`\@}% - \@currnamestack}} -\@onlypreamble\@pushfilename -\def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil} -\@onlypreamble\@popfilename -\def\@p@pfilename#1#2#3#4\@nil{% - \gdef\@currname{#1}% - \gdef\@currext{#2}% - \catcode`\@#3\relax - \gdef\@currnamestack{#4}} -\@onlypreamble\@p@pfilename -\gdef\@currnamestack{} -\@onlypreamble\@currnamestack -\def\@ptionlist#1{% - \@ifundefined{opt@#1}\@empty{\csname opt@#1\endcsname}} -\@onlypreamble\@ptionlist -\def\@ifpackageloaded{\@ifl@aded\@pkgextension} -\def\@ifclassloaded{\@ifl@aded\@clsextension} -\@onlypreamble\@ifpackageloaded -\@onlypreamble\@ifclassloaded -\def\@ifl@aded#1#2{% - \expandafter\ifx\csname ver@#2.#1\endcsname\relax - \expandafter\@secondoftwo - \else - \expandafter\@firstoftwo - \fi} -\@onlypreamble\@ifl@aded -\def\@ifpackagelater{\@ifl@ter\@pkgextension} -\def\@ifclasslater{\@ifl@ter\@clsextension} -\@onlypreamble\@ifpackagelater -\@onlypreamble\@ifclasslater -\def\@ifl@ter#1#2{% - \expandafter\@ifl@t@r - \csname ver@#2.#1\endcsname} -\@onlypreamble\@ifl@ter -\def\@ifl@t@r#1#2{% - \ifnum\expandafter\@parse@version@#1//00\@nil<% - \expandafter\@parse@version@#2//00\@nil - \expandafter\@secondoftwo - \else - \expandafter\@firstoftwo - \fi} -\def\@parse@version@#1{\@parse@version0#1} -\@onlypreamble\@ifl@t@r -\def\@parse@version#1/#2/#3#4#5\@nil{% -\@parse@version@dash#1-#2-#3#4\@nil +\cs_new:Npn \__shipout_excuse_extra_page: { + \vfil + \begin{center} + \bfseries Temporary~ page! + \end{center} + \LaTeX{}~ was~ unable~ to~ guess~ the~ total~ number~ of~ pages~ + correctly.~ ~ As~ there~ was~ some~ unprocessed~ data~ that~ + should~ have~ been~ added~ to~ the~ final~ page~ this~ extra~ + page~ has~ been~ added~ to~ receive~ it. + \par + If~ you~ rerun~ the~ document~ (without~ altering~ it)~ this~ + surplus~ page~ will~ go~ away,~ because~ \LaTeX{}~ now~ knows~ + how~ many~ pages~ to~ expect~ for~ this~ document. + \vfil } -\def\@parse@version@dash#1-#2-#3#4#5\@nil{% - \if\relax#2\relax\else#1\fi#2#3#4 } -\def\@ifpackagewith{\@if@ptions\@pkgextension} -\def\@ifclasswith{\@if@ptions\@clsextension} -\@onlypreamble\@ifpackagewith -\@onlypreamble\@ifclasswith -\def\@if@ptions#1#2{% - \@expandtwoargs\@if@pti@ns{\@ptionlist{#2.#1}}} -\@onlypreamble\@if@ptions -\def\@if@pti@ns#1#2{% - \let\reserved@a\@firstoftwo - \edef\reserved@b{\zap@space#2 \@empty}% - \@for\reserved@b:=\reserved@b\do{% - \ifx\reserved@b\@empty +\def\PreviousTotalPages{0} +\g@addto@macro\@kernel@before@begindocument + {\ifnum\@abspage@last<\maxdimen + \xdef\PreviousTotalPages{\@abspage@last}\fi} +\cs_new_eq:NN \DiscardShipoutBox \shipout_discard: +\cs_new_protected:Npn \AtBeginDvi {\__shipout_add_firstpage_material:Nn \AtBeginDvi} +\cs_new_eq:NN \DebugShipoutsOn \shipout_debug_on: +\cs_new_eq:NN \DebugShipoutsOff \shipout_debug_off: +\cs_set_eq:NN \@expl@@@shipout@add@firstpage@material@@Nn + \__shipout_add_firstpage_material:Nn +\cs_set_eq:NN \@expl@@@shipout@add@background@box@@n + \__shipout_add_background_box:n +\cs_set_eq:NN \@expl@@@shipout@add@foreground@box@@n + \__shipout_add_foreground_box:n +\cs_set_eq:NN \@expl@@@shipout@add@background@picture@@n + \__shipout_add_background_picture:n +\cs_set_eq:NN \@expl@@@shipout@add@foreground@picture@@n + \__shipout_add_foreground_picture:n +\ExplSyntaxOff +\ExplSyntaxOn +\cs_new_protected:Npn \AtEndDvi {\AddToHook{shipout/lastpage}} +\ExplSyntaxOff +\disable@package@load{atenddvi} + {\PackageWarning{atenddvi} + {Functionality of this package is already\MessageBreak + provided by LaTeX.\MessageBreak\MessageBreak + It is there no longer necessary to load it\MessageBreak + and you can safely remove it.\MessageBreak + Found on}} +\declare@file@substitution{atbegshi.sty}{atbegshi-ltx.sty} +\declare@file@substitution{everyshi.sty}{everyshi-ltx.sty} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% From File: ltoutput.dtx +\expandafter\let\csname ver@autoout1.sty\endcsname\fmtversion +\message{output,} +\maxdeadcycles = 100 +\let\@elt\relax +\def\@next#1#2#3#4{\ifx#2\@empty #4\else + \expandafter\@xnext #2\@@#1#2#3\fi} +\def\@xnext \@elt #1#2\@@#3#4{\def#3{#1}\gdef#4{#2}} +\def\@testfalse{\global\let\if@test\iffalse} +\def\@testtrue {\global\let\if@test\iftrue} +\@testfalse +\def\@bitor#1#2{\@testfalse {\let\@elt\@xbitor + \@tempcnta #1\relax #2}} +\def\@xbitor #1{\@tempcntb \count#1 + \ifnum \@tempcnta =\z@ \else - \expandafter\in@\expandafter{\expandafter,\reserved@b,}{,#1,}% - \ifin@ - \else - \let\reserved@a\@secondoftwo - \fi - \fi - }% - \reserved@a} -\@onlypreamble\@if@pti@ns -\def\ProvidesPackage#1{% - \xdef\@gtempa{#1}% - \ifx\@gtempa\@currname\else - \@latex@warning@no@line{You have requested - \@cls@pkg\space`\@currname',\MessageBreak - but the \@cls@pkg\space provides `#1'}% - \fi - \@ifnextchar[\@pr@videpackage{\@pr@videpackage[]}}%] -\@onlypreamble\ProvidesPackage -\def\@pr@videpackage[#1]{% - \expandafter\protected@xdef % <-- protected... - \csname ver@\@currname.\@currext\endcsname{#1}% - \ifx\@currext\@clsextension - \typeout{Document Class: \@gtempa\space#1}% - \else - \protected@wlog{Package: \@gtempa\space#1}% <--- protected - \fi} -\long\def\protected@wlog#1{\begingroup - \set@display@protect - \immediate \write \m@ne {#1}\endgroup } -\@onlypreamble\@pr@videpackage -\let\ProvidesClass\ProvidesPackage -\@onlypreamble\ProvidesClass -\def\ProvidesFile#1{% - \begingroup - \catcode`\ 10 % - \ifnum \endlinechar<256 % - \ifnum \endlinechar>\m@ne - \catcode\endlinechar 10 % + \divide\@tempcntb\@tempcnta + \ifodd\@tempcntb \@testtrue\fi + \fi} +\let\@elt\newinsert +\def\@freelist{% + \@elt\bx@A\@elt\bx@B\@elt\bx@C\@elt\bx@D\@elt\bx@E + \@elt\bx@F\@elt\bx@G\@elt\bx@H\@elt\bx@I\@elt\bx@J + \@elt\bx@K\@elt\bx@L\@elt\bx@M\@elt\bx@N + \@elt\bx@O\@elt\bx@P\@elt\bx@Q\@elt\bx@R} +\@freelist +\ifx\numexpr\@undefined\else +\def\reserved@a{% + \@elt\bx@S\@elt\bx@T\@elt\bx@U\@elt\bx@V + \@elt\bx@W\@elt\bx@X\@elt\bx@Y\@elt\bx@Z + \@elt\bx@AA\@elt\bx@BB\@elt\bx@CC\@elt\bx@DD\@elt\bx@EE + \@elt\bx@FF\@elt\bx@GG\@elt\bx@HH\@elt\bx@II\@elt\bx@JJ + \@elt\bx@KK\@elt\bx@LL\@elt\bx@MM\@elt\bx@NN + \@elt\bx@OO\@elt\bx@PP\@elt\bx@QQ\@elt\bx@RR + \@elt\bx@SS\@elt\bx@TT\@elt\bx@UU\@elt\bx@VV + \@elt\bx@WW\@elt\bx@XX\@elt\bx@YY\@elt\bx@ZZ} +\reserved@a +\def\@elt{\noexpand\@elt\noexpand} +\edef\@freelist{\@freelist\reserved@a} +\fi +\let\reserved@a\relax +\let\@elt\relax +\gdef\@toplist{} +\gdef\@botlist{} +\gdef\@midlist{} +\gdef\@currlist{} +\gdef\@deferlist{} +\gdef\@dbltoplist{} +\gdef\@dbldeferlist{} +\newdimen\topmargin +\newdimen\oddsidemargin +\newdimen\evensidemargin +\let\@themargin=\oddsidemargin +\newdimen\headheight +\newdimen\headsep +\newdimen\footskip +\newdimen\textheight +\newdimen\textwidth +\newdimen\columnwidth +\newdimen\columnsep +\newdimen\columnseprule +\newdimen\marginparwidth +\newdimen\marginparsep +\newdimen\marginparpush +\newbox\@begindvibox +\newdimen\@maxdepth +\@maxdepth = \maxdepth +\newdimen\paperheight +\newdimen\paperwidth +\newif \if@insert +\newif \if@fcolmade +\newif \if@specialpage \@specialpagefalse +\newif \if@firstcolumn \@firstcolumntrue +\newif \if@twocolumn \@twocolumnfalse +\newif \if@twoside \@twosidefalse +\newif \if@reversemargin \@reversemarginfalse +\newif \if@mparswitch \@mparswitchfalse +\newcount \col@number +\col@number \@ne +\newcount\@topnum +\newdimen\@toproom +\newcount\@dbltopnum +\newdimen\@dbltoproom +\newcount\@botnum +\newdimen\@botroom +\newcount\@colnum +\newdimen\@textmin +\newdimen\@fpmin +\newdimen\@colht +\newdimen\@colroom +\newdimen\@pageht +\newdimen\@pagedp +\newdimen\@mparbottom \@mparbottom\z@ +\newcount\@currtype +\newbox\@outputbox +\newbox\@leftcolumn +\newbox\@holdpg +\def\@thehead{\@oddhead} % initialization +\def\@thefoot{\@oddfoot} +\def\clearpage{% + \ifvmode + \ifnum \@dbltopnum =\m@ne + \ifdim \pagetotal <\topskip + \hbox{}% \fi \fi - \@makeother\/% - \@makeother\&% - \kernel@ifnextchar[{\@providesfile{#1}}{\@providesfile{#1}[]}} -\def\@pass@ptions#1#2#3{% - \expandafter\xdef\csname opt@#3.#1\endcsname{% - \@ifundefined{opt@#3.#1}\@empty - {\csname opt@#3.#1\endcsname,}% - \zap@space#2 \@empty}} -\@onlypreamble\@pass@ptions -\def\PassOptionsToPackage{\@pass@ptions\@pkgextension} -\def\PassOptionsToClass{\@pass@ptions\@clsextension} -\@onlypreamble\PassOptionsToPackage -\@onlypreamble\PassOptionsToClass -\def\DeclareOption{% - \let\@fileswith@pti@ns\@badrequireerror - \@ifstar\@defdefault@ds\@declareoption} -\long\def\@declareoption#1#2{% - \xdef\@declaredoptions{\@declaredoptions,#1}% - \toks@{#2}% - \expandafter\edef\csname ds@#1\endcsname{\the\toks@}} -\long\def\@defdefault@ds#1{% - \toks@{#1}% - \edef\default@ds{\the\toks@}} -\@onlypreamble\DeclareOption -\@onlypreamble\@declareoption -\@onlypreamble\@defdefault@ds -\def\OptionNotUsed{% - \ifx\@currext\@clsextension - \xdef\@unusedoptionlist{% - \ifx\@unusedoptionlist\@empty\else\@unusedoptionlist,\fi - \CurrentOption}% - \fi} -\@onlypreamble\OptionNotUsed -\def\ProcessOptions{% - \let\ds@\@empty - \edef\@curroptions{\@ptionlist{\@currname.\@currext}}% - \@ifstar\@xprocess@ptions\@process@ptions} -\@onlypreamble\ProcessOptions -\def\@process@ptions{% - \@for\CurrentOption:=\@declaredoptions\do{% - \ifx\CurrentOption\@empty\else - \@expandtwoargs\in@{,\CurrentOption,}{% - ,\ifx\@currext\@clsextension\else\@classoptionslist,\fi - \@curroptions,}% - \ifin@ - \@use@ption - \expandafter\let\csname ds@\CurrentOption\endcsname\@empty - \fi - \fi}% - \@process@pti@ns} -\@onlypreamble\@process@ptions -\def\@xprocess@ptions{% - \ifx\@currext\@clsextension\else - \@for\CurrentOption:=\@classoptionslist\do{% - \ifx\CurrentOption\@empty\else - \@expandtwoargs\in@{,\CurrentOption,}{,\@declaredoptions,}% - \ifin@ - \@use@ption - \expandafter\let\csname ds@\CurrentOption\endcsname\@empty - \fi - \fi}% \fi - \@process@pti@ns} -\@onlypreamble\@xprocess@ptions -\def\@process@pti@ns{% - \@for\CurrentOption:=\@curroptions\do{% - \@ifundefined{ds@\CurrentOption}% - {\@use@ption - \default@ds}% - \@use@ption}% - \@for\CurrentOption:=\@declaredoptions\do{% - \expandafter\let\csname ds@\CurrentOption\endcsname\relax}% - \let\CurrentOption\@empty - \let\@fileswith@pti@ns\@@fileswith@pti@ns - \AtEndOfPackage{\let\@unprocessedoptions\relax}} -\@onlypreamble\@process@pti@ns -\def\@options{\ProcessOptions*} -\@onlypreamble\@options -\def\@use@ption{% - \@expandtwoargs\@removeelement\CurrentOption - \@unusedoptionlist\@unusedoptionlist - \csname ds@\CurrentOption\endcsname} -\@onlypreamble\@use@ption -\def\ExecuteOptions#1{% - \edef\@fortmp{\zap@space#1 \@empty}% - \def\reserved@a##1\@nil{% - \@for\CurrentOption:=\@fortmp\do - {\csname ds@\CurrentOption\endcsname}% - \edef\CurrentOption{##1}}% - \expandafter\reserved@a\CurrentOption\@nil} -\@onlypreamble\ExecuteOptions -\def\documentclass{% - \let\documentclass\@twoclasseserror - \if@compatibility\else\let\usepackage\RequirePackage\fi - \@fileswithoptions\@clsextension} -\@onlypreamble\documentclass -\def\documentstyle{% - \makeatletter\input{latex209.def}\makeatother - \documentclass} -\@onlypreamble\documentstyle -\def\RequirePackage{% - \@fileswithoptions\@pkgextension} -\@onlypreamble\RequirePackage -\def\LoadClass{% - \ifx\@currext\@pkgextension - \@latex@error - {\noexpand\LoadClass in package file}% - {You may only use \noexpand\LoadClass in a class file.}% + \newpage + \write\m@ne{}% + \vbox{}% + \penalty -\@Mi +} +\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else + \hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi} +\def\onecolumn{% + \clearpage + \global\columnwidth\textwidth + \global\hsize\columnwidth + \global\linewidth\columnwidth + \global\@twocolumnfalse + \col@number \@ne + \@floatplacement} +\def \newpage {% + \if@noskipsec + \ifx \@nodocument\relax + \leavevmode + \global \@noskipsecfalse + \fi + \fi + \if@inlabel + \leavevmode + \global \@inlabelfalse + \fi + \if@nobreak \@nobreakfalse \everypar{}\fi + \par + \ifdim\prevdepth>\z@ + \vskip -% + \ifdim\prevdepth>\maxdepth + \maxdepth + \else + \prevdepth + \fi + \fi + \vfil + \penalty -\@M} +\def \@emptycol {\vbox{}\penalty -\@M} +\def \twocolumn {% + \clearpage + \global\columnwidth\textwidth + \global\advance\columnwidth-\columnsep + \global\divide\columnwidth\tw@ + \global\hsize\columnwidth + \global\linewidth\columnwidth + \global\@twocolumntrue + \global\@firstcolumntrue + \col@number \tw@ + \@ifnextchar [\@topnewpage\@floatplacement +} +\long\def \@topnewpage [#1]{% + \@nodocument + \@next\@currbox\@freelist{}{}% + \global \setbox\@currbox + \color@vbox + \normalcolor + \vbox {% + \hsize\textwidth + \@parboxrestore + \col@number \@ne + #1% + \vskip -\dbltextfloatsep + }% + \color@endbox + \ifdim \ht\@currbox>\textheight + \ht\@currbox \textheight + \fi + \global \count\@currbox \tw@ + \@tempdima -\ht\@currbox + \advance \@tempdima -\dbltextfloatsep + \global \advance \@colht \@tempdima + \ifx \@dbltoplist \@empty + \else + \@latexerr{Float(s) lost}\@ehb + \let \@dbltoplist \@empty \fi - \@fileswithoptions\@clsextension} -\@onlypreamble\LoadClass -\def\@loadwithoptions#1#2#3{% - \expandafter\let\csname opt@#3.#1\expandafter\endcsname - \csname opt@\@currname.\@currext\endcsname - #2{#3}} -\@onlypreamble\@loadwithoptions -\def\LoadClassWithOptions{% - \@loadwithoptions\@clsextension\LoadClass} -\@onlypreamble\LoadClassWithOptions -\def\RequirePackageWithOptions{% - \AtEndOfPackage{\let\@unprocessedoptions\relax}% - \@loadwithoptions\@pkgextension\RequirePackage} -\@onlypreamble\RequirePackageWithOptions -\def\usepackage#1#{% - \@latex@error - {\noexpand \usepackage before \string\documentclass}% - {\noexpand \usepackage may only appear in the document - preamble, i.e.,\MessageBreak - between \noexpand\documentclass and - \string\begin{document}.}% - \@gobble} -\@onlypreamble\usepackage -\def\NeedsTeXFormat#1{% - \def\reserved@a{#1}% - \ifx\reserved@a\fmtname - \expandafter\@needsformat + \@cons \@dbltoplist \@currbox + \global \@dbltopnum \m@ne + \ifdim \@colht<2.5\baselineskip + \@latex@warning@no@line {Optional argument of \noexpand\twocolumn + too tall on page \thepage}% + \@emptycol + \if@firstcolumn + \else + \@emptycol + \fi \else - \@latex@error{This file needs format `\reserved@a'% - \MessageBreak but this is `\fmtname'}{% - The current input file will not be processed - further,\MessageBreak - because it was written for some other flavor of - TeX.\MessageBreak\@ehd}% - \endinput \fi} -\@onlypreamble\NeedsTeXFormat -\def\@needsformat{% - \@ifnextchar[%] - \@needsf@rmat - {}} -\@onlypreamble\@needsformat -\def\@needsf@rmat[#1]{% - \@ifl@t@r\fmtversion{#1}{}% - {\@latex@warning@no@line - {You have requested release `#1' of LaTeX,\MessageBreak - but only release `\fmtversion' is available}}} -\@onlypreamble\@needsf@rmat -\def\zap@space#1 #2{% - #1% - \ifx#2\@empty\else\expandafter\zap@space\fi - #2} -\def\@fileswithoptions#1{% - \@ifnextchar[%] - {\@fileswith@ptions#1}% - {\@fileswith@ptions#1[]}} -\@onlypreamble\@fileswithoptions -\def\@fileswith@ptions#1[#2]#3{% - \@ifnextchar[%] - {\@fileswith@pti@ns#1[{#2}]#3}% - {\@fileswith@pti@ns#1[{#2}]#3[]}} -\@onlypreamble\@fileswith@ptions -\def\@fileswith@pti@ns#1[#2]#3[#4]{% - \ifx#1\@clsextension - \ifx\@classoptionslist\relax - \xdef\@classoptionslist{\zap@space#2 \@empty}% - \def\reserved@a{% - \@onefilewithoptions#3[{#2}][{#4}]#1% - \@documentclasshook}% + \global \vsize \@colht + \global \@colroom \@colht + \@floatplacement + \fi +} +\output {% + \let \par \@@par + \ifnum \outputpenalty<-\@M + \@specialoutput + \else + \@makecol + \@opcol + \@startcolumn + \@whilesw \if@fcolmade \fi + {% + \@opcol\@startcolumn}% + \fi + \ifnum \outputpenalty>-\@Miv + \ifdim \@colroom<1.5\baselineskip + \ifdim \@colroom<\textheight + \@latex@warning@no@line {Text page \thepage\space + contains only floats}% + \@emptycol + \else + \global \vsize \@colroom + \fi \else - \def\reserved@a{% - \@onefilewithoptions#3[{#2}][{#4}]#1}% + \global \vsize \@colroom \fi \else - \def\reserved@b##1,{% - \ifx\@nnil##1\relax\else - \ifx\@nnil##1\@nnil\else - \noexpand\@onefilewithoptions##1[{#2}][{#4}]% - \noexpand\@pkgextension - \fi - \expandafter\reserved@b - \fi}% - \edef\reserved@a{\zap@space#3 \@empty}% - \edef\reserved@a{\expandafter\reserved@b\reserved@a,\@nnil,}% + \global \vsize \maxdimen + \fi +} +\gdef\@specialoutput{% + \ifnum \outputpenalty>-\@Mii + \@doclearpage + \else + \ifnum \outputpenalty<-\@Miii + \ifnum \outputpenalty<-\@MM \deadcycles \z@ \fi + \global \setbox\@holdpg \vbox {\unvbox\@cclv}% + \else + \global \setbox\@holdpg \vbox{% + \unvbox\@holdpg + \unvbox\@cclv + \setbox\@tempboxa \lastbox + \unskip + }% + \@pagedp \dp\@holdpg + \@pageht \ht\@holdpg + \unvbox \@holdpg + \@next\@currbox\@currlist{% + \ifnum \count\@currbox>\z@ + \advance \@pageht \@pagedp + \ifvoid\footins \else + \advance \@pageht \ht\footins + \advance \@pageht \skip\footins + \advance \@pageht \dp\footins + \fi + \ifvbox \@kludgeins + \ifdim \wd\@kludgeins=\z@ + \advance \@pageht \ht\@kludgeins + \fi + \fi + \@reinserts + \@addtocurcol + \else + \@reinserts + \@addmarginpar + \fi + }\@latexbug + \ifnum \outputpenalty<\z@ + \if@nobreak + \nobreak + \else + \addpenalty \interlinepenalty + \fi + \fi + \fi + \fi +} +\def\@testwrongwidth #1{% + \ifdim\dp#1=\f@depth + \else + \global\@testtrue + \fi}% +\let\f@depth\z@ +\def \@doclearpage {% + \ifvoid\footins + \ifvbox\@kludgeins + {\setbox \@tempboxa \box \@kludgeins}% + \fi + \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa + \setbox\@tempboxa\box\@cclv + \xdef\@deferlist{\@toplist\@botlist\@deferlist}% + \global \let \@toplist \@empty + \global \let \@botlist \@empty + \global \@colroom \@colht + \ifx \@currlist\@empty + \else + \@latexerr{Float(s) lost}\@ehb + \global \let \@currlist \@empty + \fi + \@makefcolumn\@deferlist + \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}% + \if@twocolumn + \if@firstcolumn + \xdef\@deferlist{\@dbltoplist\@deferlist}% + \global \let \@dbltoplist \@empty + \global \@colht \textheight + \begingroup + \@dblfloatplacement + \@makefcolumn\@deferlist + \@whilesw\if@fcolmade \fi{\@outputpage + \@makefcolumn\@deferlist}% + \endgroup + \else + \vbox{}\clearpage + \fi + \fi + \ifx\@deferlist\@empty \else\clearpage \fi + \else + \setbox\@cclv\vbox{\box\@cclv\vfil}% + \@makecol\@opcol + \clearpage + \fi +}% +\def \@opcol {% + \if@twocolumn + \@outputdblcol + \else + \@outputpage \fi - \reserved@a} -\@onlypreamble\@fileswith@pti@ns -\def\@onefilewithoptions#1[#2][#3]#4{% - \@pushfilename - \xdef\@currname{#1}% - \global\let\@currext#4% - \let\CurrentOption\@empty - \@reset@ptions - \makeatletter - \def\reserved@a{% - \@ifl@aded\@currext{#1}% - {\@if@ptions\@currext{#1}{#2}{}% - {\@latex@error - {Option clash for \@cls@pkg\space #1}% - {The package #1 has already been loaded - with options:\MessageBreak - \space\space[\@ptionlist{#1.\@currext}]\MessageBreak - There has now been an attempt to load it - with options\MessageBreak - \space\space[#2]\MessageBreak - Adding the global options:\MessageBreak - \space\space - \@ptionlist{#1.\@currext},#2\MessageBreak - to your \noexpand\documentclass declaration may fix this.% - \MessageBreak - Try typing \space \space to proceed.}}}% - {\@pass@ptions\@currext{#2}{#1}% - \global\expandafter - \let\csname ver@\@currname.\@currext\endcsname\@empty - \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty - \InputIfFileExists - {\@currname.\@currext}% - {}% - {\@missingfileerror\@currname\@currext}% - \let\@unprocessedoptions\@@unprocessedoptions - \csname\@currname.\@currext-h@@k\endcsname - \expandafter\let\csname\@currname.\@currext-h@@k\endcsname - \@undefined - \@unprocessedoptions}% - \@ifl@ter\@currext{#1}{#3}{}% - {\@latex@warning@no@line - {You have requested,\on@line, - version\MessageBreak - `#3' of \@cls@pkg\space #1,\MessageBreak - but only version\MessageBreak - `\csname ver@#1.\@currext\endcsname'\MessageBreak - is available}}% - \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi - \@popfilename - \@reset@ptions}% - \reserved@a} -\@onlypreamble\@onefilewithoptions -\let\@@fileswith@pti@ns\@fileswith@pti@ns -\@onlypreamble\@@fileswith@pti@ns -\def\@reset@ptions{% - \global\ifx\@currext\@clsextension - \let\default@ds\OptionNotUsed + \global \@mparbottom \z@ \global \@textfloatsheight \z@ + \@floatplacement +} +\gdef \@makecol {% + \ifvoid\footins + \setbox\@outputbox \box\@cclv \else - \let\default@ds\@unknownoptionerror + \setbox\@outputbox \vbox {% + \boxmaxdepth \@maxdepth + \unvbox \@cclv + \vskip \skip\footins + \color@begingroup + \normalcolor + \footnoterule + \unvbox \footins + \color@endgroup + }% + \fi + \let\@elt\relax + \xdef\@freelist{\@freelist\@midlist}% + \global \let \@midlist \@empty + \@combinefloats + \ifvbox\@kludgeins + \@makespecialcolbox + \else + \setbox\@outputbox \vbox to\@colht {% + \@texttop + \dimen@ \dp\@outputbox + \unvbox \@outputbox + \vskip -\dimen@ + \@textbottom + }% + \fi + \global \maxdepth \@maxdepth +} +\gdef \@reinserts{% + \ifvoid\footins\else\insert\footins{\unvbox\footins}\fi + \ifvbox\@kludgeins\insert\@kludgeins + {\unvbox\@kludgeins}\fi +} +\gdef \@makespecialcolbox {% + \setbox\@outputbox \vbox {% + \@texttop + \dimen@ \dp\@outputbox + \unvbox\@outputbox + \vskip-\dimen@ + }% + \@tempdima \@colht + \ifdim \wd\@kludgeins>\z@ + \advance \@tempdima -\ht\@outputbox + \advance \@tempdima \pageshrink + \setbox\@outputbox \vbox to \@colht {% + \unvbox\@outputbox + \vskip \@tempdima + \@textbottom + }% + \else + \advance \@tempdima -\ht\@kludgeins + \setbox \@outputbox \vbox to \@colht {% + \vbox to \@tempdima {% + \unvbox\@outputbox + \@textbottom}% + \vss}% + \fi + {\setbox \@tempboxa \box \@kludgeins}% +} +\let \@texttop \relax +\let \@textbottom \relax +\def\@activechar@info #1{% + \@latex@info@no@line {Active #1 character found while + output routine is active + \MessageBreak + This may be a bug in a package file + you are using}% +} +\begingroup +\obeylines\obeyspaces% +\catcode`\'\active% +\gdef\@resetactivechars{% +\def^^M{\@activechar@info{EOL}\space}% +\def {\@activechar@info{space}\space}% +\let'\active@math@prime}% +\endgroup +\def\@outputpage{% +\begingroup + \let \protect \noexpand + \language\document@default@language + \@resetactivechars + \global\let\@@if@newlist\if@newlist + \global\@newlistfalse + \@parboxrestore + \shipout \vbox{% + \set@typeset@protect + \aftergroup \endgroup + \aftergroup \set@typeset@protect + \if@specialpage + \global\@specialpagefalse\@nameuse{ps@\@specialstyle}% \fi - \global\let\ds@\@empty - \global\let\@declaredoptions\@empty} -\@onlypreamble\@reset@ptions -\ifx\@begindocumenthook\@undefined - \let\@begindocumenthook\@empty -\fi -\let\@enddocumenthook\@empty -\long\def\g@addto@macro#1#2{% - \begingroup - \toks@\expandafter{#1#2}% - \xdef#1{\the\toks@}% - \endgroup} -\def\AtEndOfPackage{% - \expandafter\g@addto@macro\csname\@currname.\@currext-h@@k\endcsname} -\let\AtEndOfClass\AtEndOfPackage -\@onlypreamble\AtEndOfPackage -\@onlypreamble\AtEndOfClass -\DeclareRobustCommand\AtBeginDocument{\g@addto@macro\@begindocumenthook} -\DeclareRobustCommand\AtEndDocument{\g@addto@macro\@enddocumenthook} -\@onlypreamble\AtBeginDocument -\def\@cls@pkg{% - \ifx\@currext\@clsextension - document class% - \else - package% - \fi} -\@onlypreamble\@cls@pkg -\def\@unknownoptionerror{% - \@latex@error - {Unknown option `\CurrentOption' for \@cls@pkg\space`\@currname'}% - {The option `\CurrentOption' was not declared in - \@cls@pkg\space`\@currname', perhaps you\MessageBreak - misspelled its name. - Try typing \space - \space to proceed.}} -\@onlypreamble\@unknownoptionerror -\def\@@unprocessedoptions{% - \ifx\@currext\@pkgextension - \edef\@curroptions{\@ptionlist{\@currname.\@currext}}% - \@for\CurrentOption:=\@curroptions\do{% - \ifx\CurrentOption\@empty\else\@unknownoptionerror\fi}% - \fi} -\@onlypreamble\@unprocessedoptions -\@onlypreamble\@@unprocessedoptions -\def\@badrequireerror#1[#2]#3[#4]{% - \@latex@error - {\noexpand\RequirePackage or \noexpand\LoadClass - in Options Section}% - {The \@cls@pkg\space `\@currname' is defective.\MessageBreak - It attempts to load `#3' in the options section, i.e.,\MessageBreak - between \noexpand\DeclareOption and \string\ProcessOptions.}} -\@onlypreamble\@badrequireerror -\def\@twoloadclasserror{% - \@latex@error - {Two \noexpand\LoadClass commands}% - {You may only use one \noexpand\LoadClass in a class file}} -\@onlypreamble\@twoloadclasserror -\def\@twoclasseserror#1#{% - \@latex@error - {Two \noexpand\documentclass or \noexpand\documentstyle commands}% - {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 + \if@twoside + \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot + \let\@themargin\oddsidemargin + \else \let\@thehead\@evenhead + \let\@thefoot\@evenfoot \let\@themargin\evensidemargin + \fi + \fi + \reset@font + \normalsize + \normalsfcodes + \let\label\@gobble + \let\index\@gobble + \let\glossary\@gobble + \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@ + \@begindvi + \vskip \topmargin + \moveright\@themargin \vbox {% + \setbox\@tempboxa \vbox to\headheight{% + \vfil + \color@hbox + \normalcolor + \hb@xt@\textwidth{\@thehead}% + \color@endbox + }% + \dp\@tempboxa \z@ + \box\@tempboxa + \vskip \headsep + \box\@outputbox + \baselineskip \footskip + \color@hbox + \normalcolor + \hb@xt@\textwidth{\@thefoot}% + \color@endbox + }% + }% + \global\let\if@newlist\@@if@newlist + \global \@colht \textheight + \stepcounter{page}% + \let\firstmark\botmark +} +\def \@begindvi{% + \unvbox \@begindvibox + \global\let \@begindvi \@empty +} +\def \@combinefloats {% + \ifx \@toplist\@empty \else \@cflt \fi + \ifx \@botlist\@empty \else \@cflb \fi +} +\def \@cflt{% + \let \@elt \@comflelt + \setbox\@tempboxa \vbox{}% + \@toplist + \setbox\@outputbox \vbox{% + \boxmaxdepth \maxdepth + \unvbox\@tempboxa + \vskip -\floatsep + \topfigrule + \vskip \textfloatsep + \unvbox\@outputbox + }% + \let\@elt\relax + \xdef\@freelist{\@freelist\@toplist}% + \global\let\@toplist\@empty } -\@namedef{filecontents*}{\@tempswafalse\@fileswtrue - \@ifnextchar[\filec@ntents@opt\filec@ntents +\def \@cflb {% + \let\@elt\@comflelt + \setbox\@tempboxa \vbox{}% + \@botlist + \setbox\@outputbox \vbox{% + \unvbox\@outputbox + \vskip \textfloatsep + \botfigrule + \unvbox\@tempboxa + \vskip -\floatsep + }% + \let\@elt\relax + \xdef\@freelist{\@freelist\@botlist}% + \global \let \@botlist\@empty } -\def\filec@ntents@opt[#1]{% - \edef\@fortmp{\zap@space#1 \@empty}% - \@for\reserved@a:=\@fortmp\do{% - \ifcsname filec@ntents@\reserved@a\endcsname - \csname filec@ntents@\reserved@a\endcsname - \else - \@latex@error{Unknown filecontents option \reserved@a}% - {Valid options are force (or overwrite), nosearch, noheader}% - \fi}% - \filec@ntents +\def\@comflelt#1{\setbox\@tempboxa + \vbox{\unvbox\@tempboxa\box #1\vskip\floatsep}} +\def\@comdblflelt#1{\setbox\@tempboxa + \vbox{\unvbox\@tempboxa\box #1\vskip\dblfloatsep}} +\def \@combinedblfloats{% + \ifx \@dbltoplist \@empty + \else + \setbox\@tempboxa \vbox{}% + \let \@elt \@comdblflelt + \@dbltoplist + \let \@elt \relax + \xdef \@freelist {\@freelist\@dbltoplist}% + \global\let \@dbltoplist \@empty + \setbox\@outputbox \vbox to\textheight + {%\boxmaxdepth\maxdepth %% probably not needed, CAR + \unvbox\@tempboxa\vskip-\dblfloatsep + \ifnum \@dbltopnum>\m@ne + \dblfigrule + \fi + \vskip \dbltextfloatsep + \unvbox\@outputbox + }% + \fi } -\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 - \catcode\@tempcnta=12 % - \advance\@tempcnta\@ne % -\ifnum\@tempcnta<32 % -\repeat % -\catcode`\*=11 % -\catcode`\^^M\active% -\catcode`\^^L\active\let^^L\relax% -\catcode`\^^I\active% -\gdef\filec@ntents#1{% - \set@curr@file{\filec@ntents@checkdir#1}% - \edef\q@curr@file{\expandafter\quote@name\expandafter{\@curr@file}}% - \chardef\reserved@c\ifx\directlua\@undefined 15 \else 127 \fi% - \openin\@inputcheck\q@curr@file \space % - \ifeof\@inputcheck% - \@latex@warning@no@line% - {Writing file `\@currdir\@curr@file'}% - \ch@ck7\reserved@c\write\relax% - \immediate\openout\reserved@c\q@curr@file\relax% - \else% - \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% - \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% - \ch@ck7\reserved@c\write\relax% - \if@filesw% % Foul ... trying to overwrite \jobname! - \@latex@error{Trying to overwrite `\jobname.tex'}{You can't % - write to the file you are 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\q@curr@file\relax% - \fi% - \fi% - \fi% - \closein\@inputcheck% - \if@tempswa% - \immediate\write\reserved@c{% - \@percentchar\@percentchar\space% - \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 % - \number\year/\two@digits\month/\two@digits\day.^^J% - \@percentchar\@percentchar}% - \fi% - \let\do\@makeother\dospecials% - \count@ 128\relax% - \loop% - \catcode\count@ 11\relax% - \advance\count@ \@ne% - \ifnum\count@<\@cclvi% - \repeat% - \edef\E{\@backslashchar end\string{\@currenvir\string}}% - \edef\reserved@b{% - \def\noexpand\reserved@b% - ####1\E####2\E####3\relax}% - \reserved@b{% - \ifx\relax##3\relax% - \immediate\write\reserved@c{##1}% - \else% - \edef^^M{\noexpand\end{\@currenvir}}% - \ifx\relax##1\relax% - \else% - \@latex@warning{Writing text `##1' before % - \string\end{\@currenvir}\MessageBreak as last line of \@curr@file}% - \immediate\write\reserved@c{##1}% - \fi% - \ifx\relax##2\relax% - \else% - \@latex@warning{% - Ignoring text `##2' after \string\end{\@currenvir}}% - \fi% - \fi% - ^^M}% - \catcode`\^^L\active% - \let\L\@undefined% - \def^^L{\expandafter\ifx\csname L\endcsname\relax\fi ^^J^^J}% - \catcode`\^^I\active% - \let\I\@undefined% - \def^^I{\expandafter\ifx\csname I\endcsname\relax\fi\space}% - \catcode`\^^M\active% - \edef^^M##1^^M{% - \noexpand\reserved@b##1\E\E\relax}}% -\endgroup% -\begingroup -\catcode`|=\catcode`\% -\catcode`\%=12 -\catcode`\*=11 -\gdef\@percentchar{%} -\gdef\endfilecontents{| - \immediate\closeout\reserved@c - \def\T##1##2##3{| - \ifx##1\@undefined\else - \@latex@warning@no@line{##2 has been converted to Blank ##3e}| - \fi}| - \T\L{Form Feed}{Lin}| - \T\I{Tab}{Spac}| - \immediate\write\@unused{}} -\global\let\endfilecontents*\endfilecontents -\endgroup -\let\pkgcls@debug\@gobble -\def\requestedLaTeXdate{0} -\ifx\pkgcls@targetdate\@undefined - \newcount\pkgcls@targetdate -\fi -\let\pkgcls@targetlabel\@empty -\def\pkgcls@innerdate{\maxdimen} -\let\pkgcls@candidate\@empty -\let\pkgcls@releasedate\@empty -\ifx\load@onefilewithoptions\@undefined - \let\load@onefilewithoptions\@onefilewithoptions - \def\@onefilewithoptions#1[#2][#3]#4{% - \pkgcls@debug{--- File loaded request (\noexpand\usepackage or ...)}% - \pkgcls@debug{\@spaces 1: #1}% - \pkgcls@debug{\@spaces 2: #2}% - \pkgcls@debug{\@spaces 3: #3}% - \pkgcls@debug{\@spaces 4: #4}% - \def\pkgcls@name{#1}% % for info message - \def\pkgcls@arg {#3}% % for info message - \pkgcls@parse@date@arg{#3}% - \let\pkgcls@candidate\@empty +\def \@startcolumn {% + \global \@colroom \@colht + \@tryfcolumn \@deferlist + \if@fcolmade + \else + \begingroup + \let \reserved@b \@deferlist + \global \let \@deferlist \@empty + \let \@elt \@scolelt + \reserved@b + \endgroup + \fi +} +\def \@startdblcolumn {% + \@tryfcolumn \@deferlist + \if@fcolmade + \else + \begingroup + \let \reserved@b \@deferlist + \global \let \@deferlist \@empty + \let \@elt \@sdblcolelt + \reserved@b + \endgroup + \fi +}% +\def \@tryfcolumn #1{% + \global \@fcolmadefalse + \ifx #1\@empty + \else + \xdef\@trylist{#1}% + \global \let \@failedlist \@empty + \begingroup + \let \@elt \@xtryfc \@trylist + \endgroup + \if@fcolmade + \@vtryfc #1% + \fi + \fi +} +\def\@scolelt#1{\def\@currbox{#1}\@addtonextcol} +\def\@sdblcolelt#1{\def\@currbox{#1}\@addtodblcol} +\def\@vtryfc #1{% + \global\setbox\@outputbox\vbox{}% + \let\@elt\@wtryfc + \@flsucceed + \global\setbox\@outputbox \vbox to\@colht{% + \vskip \@fptop + \vskip -\@fpsep + \unvbox \@outputbox + \vskip \@fpbot}% + \let\@elt\relax + \xdef #1{\@failedlist\@flfail}% + \xdef\@freelist{\@freelist\@flsucceed}} +\def\@wtryfc #1{% + \global\setbox\@outputbox\vbox{% + \unvbox\@outputbox + \vskip\@fpsep + \box #1}} +\def\@xtryfc #1{% + \@next\reserved@a\@trylist{}{}% + \@currtype \count #1% + \divide\@currtype\@xxxii + \multiply\@currtype\@xxxii + \@bitor \@currtype \@failedlist + \@testfp #1% + \@testwrongwidth #1% + \ifdim \ht #1>\@colht + \@testtrue + \fi + \if@test + \@cons\@failedlist #1% + \else + \@ytryfc #1% + \fi}% +\def\@ytryfc #1{% \begingroup - \edef\reserved@a{% - \endgroup - \unexpanded{\load@onefilewithoptions#1[#2]}% - [\pkgcls@mindate]% - \unexpanded{#4}}% - \reserved@a - } -\fi -\def\pkgcls@parse@date@arg #1{% - \ifx\@nil#1\@nil - \pkgcls@targetdate\requestedLaTeXdate\relax - \let\pkgcls@targetlabel\@empty - \let\pkgcls@mindate\@empty + \gdef\@flsucceed{\@elt #1}% + \global\let\@flfail\@empty + \@tempdima\ht #1% + \let\@elt\@ztryfc + \@trylist + \ifdim \@tempdima >\@fpmin + \global\@fcolmadetrue + \else + \@cons\@failedlist #1% + \fi + \endgroup + \if@fcolmade + \let\@elt\@gobble + \fi} +\def\@ztryfc #1{% + \@tempcnta\count #1% + \divide\@tempcnta\@xxxii + \multiply\@tempcnta\@xxxii + \@bitor \@tempcnta {\@failedlist \@flfail}% + \@testfp #1% + \@testwrongwidth #1% + \@tempdimb\@tempdima + \advance\@tempdimb\ht #1% + \advance\@tempdimb\@fpsep + \ifdim \@tempdimb >\@colht + \@testtrue + \fi + \if@test + \@cons\@flfail #1% + \else + \@cons\@flsucceed #1% + \@tempdima\@tempdimb + \fi}% +\def \@addtobot {% + \@getfpsbit 4\relax + \ifodd \@tempcnta + \@flsetnum \@botnum + \ifnum \@botnum>\z@ + \@tempswafalse + \@flcheckspace \@botroom \@botlist + \if@tempswa + \global \maxdepth \z@ + \@flupdates \@botnum \@botroom \@botlist + \@inserttrue + \fi + \fi + \fi +} +\def \@addtotoporbot {% + \@getfpsbit \tw@ + \ifodd \@tempcnta + \@flsetnum \@topnum + \ifnum \@topnum>\z@ + \@tempswafalse + \@flcheckspace \@toproom \@toplist + \if@tempswa + \@bitor\@currtype{\@midlist\@botlist}% + \if@test + \else + \@flupdates \@topnum \@toproom \@toplist + \@inserttrue + \fi + \fi + \fi + \fi + \if@insert \else - \pkgcls@parse@date@arg@#1=\@nil\relax + \@addtobot \fi - } -\def\pkgcls@parse@date@arg@#1=#2\@nil{% - \pkgcls@targetdate - \ifx\@nil#1\@nil - \@parse@version0#2//00\@nil\relax - \ifnum \pkgcls@targetdate=\z@ - \pkgcls@targetdate\@ne - \def\pkgcls@innerdate{\maxdimen}% - \pkgcls@parse@date@arg@version#2% - \else - \edef\pkgcls@innerdate{\the\pkgcls@targetdate}% - \fi - \let\pkgcls@mindate\@empty +} +\def \@addtocurcol {% + \@insertfalse + \@setfloattypecounts + \ifnum \@fpstype=8 + \else + \ifnum \@fpstype=24 + \else + \@flsettextmin + \advance \@textmin \@textfloatsheight + \@reqcolroom \@pageht + \ifdim \@textmin>\@reqcolroom + \@reqcolroom \@textmin + \fi + \advance \@reqcolroom \ht\@currbox + \ifdim \@colroom>\@reqcolroom + \@flsetnum \@colnum + \ifnum \@colnum>\z@ + \@bitor\@currtype\@deferlist + \@testwrongwidth\@currbox + \if@test + \else + \@bitor\@currtype\@botlist + \if@test + \@addtobot + \else + \ifodd \count\@currbox + \advance \@reqcolroom \intextsep + \ifdim \@colroom>\@reqcolroom + \global \advance \@colnum \m@ne + \global \advance \@textfloatsheight \ht\@currbox + \global \advance \@textfloatsheight 2\intextsep + \@cons \@midlist \@currbox + \if@nobreak + \nobreak + \@nobreakfalse + \everypar{}% + \else + \addpenalty \interlinepenalty + \fi + \vskip \intextsep + \box\@currbox + \penalty\interlinepenalty + \vskip\intextsep + \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi + \outputpenalty \z@ + \@inserttrue + \fi + \fi + \if@insert + \else + \@addtotoporbot + \fi + \fi + \fi + \fi + \fi + \fi + \fi + \if@insert + \else + \@resethfps + \@cons\@deferlist\@currbox + \fi +}% +\def\@addtonextcol{% + \begingroup + \@insertfalse + \@setfloattypecounts + \ifnum \@fpstype=8 + \else + \ifnum \@fpstype=24 + \else + \@flsettextmin + \@reqcolroom \ht\@currbox + \advance \@reqcolroom \@textmin + \ifdim \@colroom>\@reqcolroom + \@flsetnum \@colnum + \ifnum\@colnum>\z@ + \@bitor\@currtype\@deferlist + \@testwrongwidth\@currbox + \if@test + \else + \@addtotoporbot + \fi + \fi + \fi + \fi + \fi + \if@insert + \else + \@cons\@deferlist\@currbox + \fi + \endgroup +}% +\def\@addtodblcol{% + \begingroup + \@insertfalse + \@setfloattypecounts + \@getfpsbit \tw@ + \ifodd\@tempcnta + \@flsetnum \@dbltopnum + \ifnum \@dbltopnum>\z@ + \@tempswafalse + \ifdim \@dbltoproom>\ht\@currbox + \@tempswatrue + \else + \ifnum \@fpstype<\sixt@@n + \advance \@dbltoproom \@textmin + \ifdim \@dbltoproom>\ht\@currbox + \@tempswatrue + \fi + \advance \@dbltoproom -\@textmin + \fi + \fi + \if@tempswa + \@bitor \@currtype \@deferlist + \@testwrongwidth\@currbox + \if@test + \else + \@tempdima -\ht\@currbox + \advance\@tempdima + -\ifx \@dbltoplist\@empty \dbltextfloatsep \else + \dblfloatsep \fi + \global \advance \@dbltoproom \@tempdima + \global \advance \@colht \@tempdima + \global \advance \@dbltopnum \m@ne + \@cons \@dbltoplist \@currbox + \@inserttrue + \fi + \fi + \fi + \fi + \if@insert + \else + \@cons\@deferlist\@currbox + \fi + \endgroup +}% +\def\@addmarginpar{\@next\@marbox\@currlist{\@cons\@freelist\@marbox + \@cons\@freelist\@currbox}\@latexbug\@tempcnta\@ne + \if@twocolumn + \if@firstcolumn \@tempcnta\m@ne \fi \else - \requestedLaTeXdate\relax - \let\pkgcls@targetlabel\@empty - \def\pkgcls@innerdate{\maxdimen}% - \def\pkgcls@mindate{#1}% - \ifnum \pkgcls@targetdate > \z@ - \ifnum \@parse@version0#1//00\@nil > \pkgcls@targetdate - \@latex@warning@no@line{Suspicious rollback/min-date date given\MessageBreak - A minimal date of #1 has been specified for - \@cls@pkg\MessageBreak '\pkgcls@name'.\MessageBreak - But this is in conflict - with a rollback request to \requestedpatchdate} - \fi + \if@mparswitch + \ifodd\c@page \else\@tempcnta\m@ne \fi \fi + \if@reversemargin \@tempcnta -\@tempcnta \fi \fi -} -\def\pkgcls@parse@date@arg@version#1={% - \def\pkgcls@targetlabel{#1}} -\def\DeclareRelease#1#2#3{% - \ifnum\pkgcls@targetdate>\z@ % some sort of rollback request - \pkgcls@debug{---\string\DeclareRelease:}% - \pkgcls@debug{\@spaces 1: #1}% - \pkgcls@debug{\@spaces 2: #2}% - \pkgcls@debug{\@spaces 3: #3}% - \ifx\@nil#2\@nil - \ifnum\pkgcls@targetdate=\@ne % named request - \def\reserved@a{#1}% - \ifx\pkgcls@targetlabel\reserved@a - \pkgcls@use@this@release{#3}{}% - \else - \pkgcls@debug{Label doesn't match}% - \fi - \else - \pkgcls@debug{Date request: ignored}% - \fi + \ifnum\@tempcnta <\z@ \global\setbox\@marbox\box\@currbox \fi + \@tempdima\@mparbottom + \advance\@tempdima -\@pageht + \advance\@tempdima\ht\@marbox + \ifdim\@tempdima >\z@ + \@latex@warning@no@line {Marginpar on page \thepage\space moved}% \else - \ifnum\pkgcls@targetdate>\@ne % a real request - \ifnum\@parse@version#2//00\@nil - >\pkgcls@targetdate - \ifx\pkgcls@candidate\@empty - \pkgcls@rollbackdate@error{#2}% - \pkgcls@use@this@release{#3}{#2}% - \else - \pkgcls@use@this@release\pkgcls@candidate - \pkgcls@releasedate - \fi - \else - \def\pkgcls@candidate{#3}% - \def\pkgcls@releasedate{#2}% - \pkgcls@debug{New candidate: #3}% - \fi - \else - \def\reserved@a{#1}% - \ifx\pkgcls@targetlabel\reserved@a - \pkgcls@use@this@release{#3}{#2}% - \else - \pkgcls@debug{Label doesn't match}% - \fi - \fi + \@tempdima\z@ \fi - \fi + \global\@mparbottom\@pageht + \global\advance\@mparbottom\@tempdima + \global\advance\@mparbottom\dp\@marbox + \global\advance\@mparbottom\marginparpush + \advance\@tempdima -\ht\@marbox + \global\setbox \@marbox + \vbox {\vskip \@tempdima + \box \@marbox}% + \global \ht\@marbox \z@ + \global \dp\@marbox \z@ + \kern -\@pagedp + \nointerlineskip + \hb@xt@\columnwidth + {\ifnum \@tempcnta >\z@ + \hskip\columnwidth \hskip\marginparsep + \else + \hskip -\marginparsep \hskip -\marginparwidth + \fi + \box\@marbox \hss}% + \nointerlineskip + \hbox{\vrule \@height\z@ \@width\z@ \@depth\@pagedp}} +\newinsert \@kludgeins +\global\dimen\@kludgeins \maxdimen +\global\count\@kludgeins 1000 +\gdef \enlargethispage {% + \@ifstar + {% + \@enlargepage{\hbox{\kern\p@}}}% + {% + \@enlargepage\@empty}% } -\def\pkgcls@use@this@release#1#2{% - \pkgcls@show@selection{#1}{#2}% - \pkgcls@targetdate\z@ - \@@input #1\relax - \endinput +\gdef\@enlargepage#1#2{% + \@tempskipa#2\relax + \ifdim \@tempskipa>.5\maxdimen + \@latexerr{Suggested\space extra\space height\space + (\the\@tempskipa)\space dangerously\space + large}\@eha + \else + \ifdim \vsize<.5\maxdimen + \@bsphack + \insert\@kludgeins{#1\vskip-\@tempskipa}% + \@esphack + \else + \@latexerr{Page\space height\space already\space + too\space large}\@eha + \fi + \fi } -\def\pkgcls@show@selection#1#2{% - \pkgcls@debug{Result: use #1}% - \GenericInfo - {\@spaces\@spaces\space}{Rollback for - \@cls@pkg\space'\@currname' requested -> - \ifnum\pkgcls@targetdate>\@ne - date - \ifnum\requestedLaTeXdate=\pkgcls@targetdate - \requestedpatchdate - \else - \expandafter\@gobble\pkgcls@arg - \fi.\MessageBreak - Best approximation is - \else - version '\pkgcls@targetlabel'.\MessageBreak - This corresponds to - \fi - \ifx\@nil#2\@nil - a special release% - \else - the release introduced on #2% - \fi - \@gobble}% +\def \suppressfloats {% + \@ifnextchar [% + \@flstop + {\global \@colnum \z@}% } -\def\pkgcls@rollbackdate@error#1{% - \@latex@error{Suspicious rollback date given}% - {The \@cls@pkg\space'\@currname' claims that it - came into existence on #1 which\MessageBreak - is after your requested rollback date --- so - something is wrong here.\MessageBreak - Continue and we use the earliest known release.}} -\def\DeclareCurrentRelease#1#2{% - \ifnum\pkgcls@targetdate>\z@ % some sort of rollback request - \pkgcls@debug{---DeclareCurrentRelease}% - \pkgcls@debug{ 1: #1}% - \pkgcls@debug{ 2: #2}% - \ifnum\pkgcls@targetdate>\@ne % a date request - \ifnum\@parse@version#2//00\@nil - >\pkgcls@targetdate - \ifx\pkgcls@candidate\@empty - \pkgcls@rollbackdate@error{#2}% - \else - \pkgcls@use@this@release\pkgcls@candidate - \pkgcls@releasedate - \fi - \else - \pkgcls@show@selection{current version}{#2}% - \fi - \else % a label request - \def\reserved@a{#1}% - \ifx\pkgcls@targetlabel\reserved@a - \pkgcls@show@selection{current version}{#2}% - \else - \@latex@error{Requested version '\pkgcls@targetlabel' for - \@cls@pkg\space'\@currname' is unknown}\@ehc - \fi - \fi - \fi +\def \@flstop [#1]{% + \if t#1% + \global \@topnum \z@ + \fi + \if b#1% + \global \@botnum \z@ + \fi } -\DeclareRobustCommand\IfTargetDateBefore[1]{% - \ifnum\pkgcls@innerdate <% - \expandafter\@parse@version\expandafter0#1//00\@nil - \typeout{Exclude code introduced on #1}% - \expandafter\@firstoftwo - \else - \typeout{Include code introduced on #1}% - \expandafter\@secondoftwo - \fi +\newcount \@fpstype +\newdimen \@reqcolroom +\newdimen \@textfloatsheight +\def \@fpsadddefault {% + \edef \@fps {\@fps\csname fps@\@captype \endcsname}% + \@latex@warning {% + No positions in optional float specifier.\MessageBreak + Default added (so using `\@fps')}% } -%%% From File: ltluatex.dtx -\ifx\directlua\@undefined\else -\ifnum\luatexversion<60 % - \wlog{***************************************************} - \wlog{* LuaTeX version too old for ltluatex support *} - \wlog{***************************************************} - \expandafter\endinput -\fi -\ifx\e@alloc@attribute@count\@undefined - \countdef\e@alloc@attribute@count=258 -\fi -\def\newattribute#1{% - \e@alloc\attribute\attributedef - \e@alloc@attribute@count\m@ne\e@alloc@top#1% +\def \@setfloattypecounts {% + \@currtype \count\@currbox + \@fpstype \count\@currbox + \divide\@currtype\@xxxii \multiply\@currtype\@xxxii + \advance \@fpstype -\@currtype } -\e@alloc@attribute@count=\z@ -\def\setattribute#1#2{#1=\numexpr#2\relax} -\def\unsetattribute#1{#1=-"7FFFFFFF\relax} -\ifx\e@alloc@ccodetable@count\@undefined - \countdef\e@alloc@ccodetable@count=259 -\fi -\def\newcatcodetable#1{% - \e@alloc\catcodetable\chardef - \e@alloc@ccodetable@count\m@ne{"8000}#1% - \initcatcodetable\allocationnumber +\def \@getfpsbit {% + \@boxfpsbit \@currbox +} +\def \@boxfpsbit #1#2{% + \@tempcnta \count#1% + \divide \@tempcnta #2\relax +} +\def \@testfp #1{% + \@boxfpsbit #18\relax % Really `#1 8' for human readers! + \ifodd \@tempcnta + \else + \@testtrue + \fi +} +\def \@setfpsbit #1{% + \@tempcntb \@tempcnta + \divide \@tempcntb #1\relax + \ifodd \@tempcntb + \else + \advance \@tempcnta #1\relax + \fi +} +\def \@resethfps {% + \let\reserved@a\@empty + \ifnum \@fpstype=\@ne + \def \reserved@a {!}% + \@fpstype 17 + \fi + \ifnum \@fpstype=17 + \global \advance \count\@currbox \tw@ + \@latex@warning@no@line {% + `\reserved@a h' float specifier changed to `\reserved@a ht'}% + \fi } -\e@alloc@ccodetable@count=\z@ -\newcatcodetable\catcodetable@initex -\newcatcodetable\catcodetable@string -\begingroup - \def\setrangecatcode#1#2#3{% - \ifnum#1>#2 % - \expandafter\@gobble - \else - \expandafter\@firstofone - \fi - {% - \catcode#1=#3 % - \expandafter\setrangecatcode\expandafter - {\number\numexpr#1 + 1\relax}{#2}{#3} - }% - } - \@firstofone{% - \catcodetable\catcodetable@initex - \catcode0=12 % - \catcode13=12 % - \catcode37=12 % - \setrangecatcode{65}{90}{12}% - \setrangecatcode{97}{122}{12}% - \catcode92=12 % - \catcode127=12 % - \savecatcodetable\catcodetable@string - \endgroup - }% -\newcatcodetable\catcodetable@latex -\newcatcodetable\catcodetable@atletter -\begingroup - \def\parseunicodedataI#1;#2;#3;#4\relax{% - \parseunicodedataII#1;#3;#2 First>\relax - }% - \def\parseunicodedataII#1;#2;#3 First>#4\relax{% - \ifx\relax#4\relax - \expandafter\parseunicodedataIII - \else - \expandafter\parseunicodedataIV - \fi - {#1}#2\relax% - }% - \def\parseunicodedataIII#1#2#3\relax{% - \ifnum 0% - \if L#21\fi - \if M#21\fi - >0 % - \catcode"#1=11 % - \fi - }% - \def\parseunicodedataIV#1#2#3\relax{% - \read\unicoderead to \unicodedataline - \if L#2% - \count0="#1 % - \expandafter\parseunicodedataV\unicodedataline\relax - \fi - }% - \def\parseunicodedataV#1;#2\relax{% - \loop - \unless\ifnum\count0>"#1 % - \catcode\count0=11 % - \advance\count0 by 1 % - \repeat - }% - \def\storedpar{\par}% - \chardef\unicoderead=\numexpr\count16 + 1\relax - \openin\unicoderead=UnicodeData.txt % - \loop\unless\ifeof\unicoderead % - \read\unicoderead to \unicodedataline - \unless\ifx\unicodedataline\storedpar - \expandafter\parseunicodedataI\unicodedataline\relax - \fi - \repeat - \closein\unicoderead - \@firstofone{% - \catcode64=12 % - \savecatcodetable\catcodetable@latex - \catcode64=11 % - \savecatcodetable\catcodetable@atletter - } -\endgroup -\ifx\e@alloc@luafunction@count\@undefined - \countdef\e@alloc@luafunction@count=260 -\fi -\def\newluafunction{% - \e@alloc\luafunction\e@alloc@chardef - \e@alloc@luafunction@count\m@ne\e@alloc@top +\def \@flsetnum #1{% + \ifnum \@fpstype<\sixt@@n + \ifnum #1=\z@ + #1\@ne + \fi + \fi } -\e@alloc@luafunction@count=\z@ -\ifx\e@alloc@whatsit@count\@undefined - \countdef\e@alloc@whatsit@count=261 -\fi -\def\newwhatsit#1{% - \e@alloc\whatsit\e@alloc@chardef - \e@alloc@whatsit@count\m@ne\e@alloc@top#1% +\def \@flsettextmin {% + \ifnum \@fpstype<\sixt@@n + \@textmin \z@ + \else + \@textmin \textfraction\@colht + \fi } -\e@alloc@whatsit@count=\z@ -\ifx\e@alloc@bytecode@count\@undefined - \countdef\e@alloc@bytecode@count=262 -\fi -\def\newluabytecode#1{% - \e@alloc\luabytecode\e@alloc@chardef - \e@alloc@bytecode@count\m@ne\e@alloc@top#1% +\def \@flcheckspace #1#2{% + \advance \@reqcolroom + \ifx #2\@empty \textfloatsep \else \floatsep \fi + \ifdim \@colroom>\@reqcolroom + \ifdim #1>\ht\@currbox + \@tempswatrue + \else + \ifnum \@fpstype<\sixt@@n + \@tempswatrue + \fi + \fi + \fi } -\e@alloc@bytecode@count=\z@ - -\ifx\e@alloc@luachunk@count\@undefined - \countdef\e@alloc@luachunk@count=263 -\fi -\def\newluachunkname#1{% - \e@alloc\luachunk\e@alloc@chardef - \e@alloc@luachunk@count\m@ne\e@alloc@top#1% - {\escapechar\m@ne - \directlua{lua.name[\the\allocationnumber]="\string#1"}}% +\def \@flupdates #1#2#3{% + \global \advance #1\m@ne + \global \advance \@colnum \m@ne + \@tempdima -\ht\@currbox + \advance \@tempdima + -\ifx #3\@empty \textfloatsep \else \floatsep \fi + \global \advance #2\@tempdima + \global \advance \@colroom \@tempdima + \@cons #3\@currbox } -\e@alloc@luachunk@count=\z@ -\everyjob\expandafter{% - \the\everyjob +\def\@makefcolumn #1{% \begingroup - \attributedef\attributezero=0 % - \chardef \charzero =0 % - \countdef \CountZero =0 % - \dimendef \dimenzero =0 % - \mathchardef \mathcharzero =0 % - \muskipdef \muskipzero =0 % - \skipdef \skipzero =0 % - \toksdef \tokszero =0 % - \directlua{require("ltluatex")} + \@fpmin -\maxdimen + \let \@testfp \@gobble + \@tryfcolumn #1% \endgroup } -\everyjob\expandafter{% - \the\everyjob - \directlua{% - if xpcall(function ()% - require('luaotfload-main')% - end,texio.write_nl) then % - local _void = luaotfload.main ()% - else % - texio.write_nl('Error in luaotfload: reverting to OT1')% - tex.print('\string\\def\string\\encodingdefault{OT1}')% - end % - }% - \let\f@encoding\encodingdefault - \expandafter\let\csname ver@luaotfload.sty\endcsname\fmtversion - } -\fi +\def\@outputdblcol{% + \if@firstcolumn + \global\@firstcolumnfalse + \global\setbox\@leftcolumn\copy\@outputbox + \splitmaxdepth\maxdimen + \vbadness\maxdimen + \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}% + \setbox\@outputbox\vsplit\@outputbox to\maxdimen + \toks@\expandafter{\topmark}% + \xdef\@firstcoltopmark{\the\toks@}% + \toks@\expandafter{\splitfirstmark}% + \xdef\@firstcolfirstmark{\the\toks@}% + \ifx\@firstcolfirstmark\@empty + \global\let\@setmarks\relax + \else + \gdef\@setmarks{% + \let\firstmark\@firstcolfirstmark + \let\topmark\@firstcoltopmark}% + \fi + \else + \global\@firstcolumntrue + \setbox\@outputbox\vbox{% + \hb@xt@\textwidth{% + \hb@xt@\columnwidth{\box\@leftcolumn \hss}% + \hfil + {\normalcolor\vrule \@width\columnseprule}% + \hfil + \hb@xt@\columnwidth{\box\@outputbox \hss}}}% + \@combinedblfloats + \@setmarks + \@outputpage + \begingroup + \@dblfloatplacement + \@startdblcolumn + \@whilesw\if@fcolmade \fi{\@outputpage + \@startdblcolumn}% + \endgroup + \fi}% +\newcount\c@topnumber +\setcounter{topnumber}{2} +\newcommand\topfraction{.7} +\newcount\c@bottomnumber +\setcounter{bottomnumber}{1} +\newcommand\bottomfraction{.3} +\newcount\c@totalnumber +\setcounter{totalnumber}{3} +\newcommand\textfraction{.2} +\newcommand\floatpagefraction{.5} +\newcount\c@dbltopnumber +\setcounter{dbltopnumber}{2} +\newcommand\dbltopfraction{.7} +\newcommand\dblfloatpagefraction{.5} +\newskip\floatsep +\newskip\textfloatsep +\newskip\intextsep +\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@} +\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} +\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@} +\newskip\dblfloatsep +\newskip\dbltextfloatsep +\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} +\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} +\newskip\@fptop +\newskip\@fpsep +\newskip\@fpbot +\setlength\@fptop{0\p@ \@plus 1fil} +\setlength\@fpsep{8\p@ \@plus 2fil} +\setlength\@fpbot{0\p@ \@plus 1fil} +\newskip\@dblfptop +\newskip\@dblfpsep +\newskip\@dblfpbot +\setlength\@dblfptop{0\p@ \@plus 1fil} +\setlength\@dblfpsep{8\p@ \@plus 2fil} +\setlength\@dblfpbot{0\p@ \@plus 1fil} +\let\topfigrule=\relax +\let\botfigrule=\relax +\let\dblfigrule=\relax %%% From File: ltfinal.dtx \tracingstats1 \newcount\@lowpenalty @@ -10086,6 +12219,8 @@ Type H for immediate help.}% \lccode 127=127 % alternate hyphen char \lccode 23 =23 % textcompwordmark in T1 \fi +\@expl@finalise@setup@@ +\def\@expl@finalise@setup@@{} \ifx\XeTeXuseglyphmetrics\@undefined \else \XeTeXuseglyphmetrics=1 % @@ -10117,7 +12252,7 @@ Type H for immediate help.}% \def\font@submax{0pt} \fi \ifnum0% - \ifx\Umathchar\@undefined\else 1\fi + \ifx\Umathcode\@undefined\else 1\fi \ifx\mubyte\@undefined\else 1\fi \ifx\charsubdef\@undefined\else 1\fi =\z@ @@ -10299,7 +12434,6 @@ Type H for immediate help.}% \dh\DH\dj\DJ\l\L\ng\NG\ss\SS\th\TH} \protected@edef\MakeUppercase#1{\MakeUppercase{#1}} \protected@edef\MakeLowercase#1{\MakeLowercase{#1}} -\input{ltexpl.ltx} \let\reserved@a\@filelist \let\reserved@b=\@undefined \let\reserved@c=\@undefined @@ -10318,7 +12452,7 @@ Type H for immediate help.}% \endgroup} \let\@filelist\@gobble \def\@addtofilelist#1{\xdef\@filelist{\@filelist,#1}}% -\AtBeginDocument{\reinstall@nfss@defs\init@series@setup} +\@input{latex2e-first-aid-for-external-files.ltx} \makeatother \errorstopmode \dump diff --git a/Master/texmf-dist/tex/latex/base/latex209.def b/Master/texmf-dist/tex/latex/base/latex209.def index ab075121bd8..d69aad61ee0 100644 --- a/Master/texmf-dist/tex/latex/base/latex209.def +++ b/Master/texmf-dist/tex/latex/base/latex209.def @@ -44,7 +44,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. \NeedsTeXFormat{LaTeX2e} -\ProvidesFile{latex209.def}[2018/08/11 v0.54 Standard LaTeX file] +\ProvidesFile{latex209.def}[2020/08/21 v0.55 Standard LaTeX file] \if@compatibility \expandafter\endinput \else @@ -152,6 +152,12 @@ \saved@missingfileerror{#1}{#2}% \fi } +\@ifundefined{@missing@onefilewithoptions}{}{% + \def\@missing@onefilewithoptions#1{% + \@pass@ptions\@currext{#1}{\@currname}% + \@missingfileerror\@currname\@currext + \let\@currname\@empty}% +} \def\@obsoletefile#1#2{% \expandafter\let\csname opt@#1\expandafter\endcsname \csname opt@\@currname.\@currext\endcsname diff --git a/Master/texmf-dist/tex/latex/base/latexrelease.sty b/Master/texmf-dist/tex/latex/base/latexrelease.sty index 353f2aa7c5f..f88aa695503 100644 --- a/Master/texmf-dist/tex/latex/base/latexrelease.sty +++ b/Master/texmf-dist/tex/latex/base/latexrelease.sty @@ -8,7 +8,9 @@ %% ltvers.dtx (with options: `latexrelease') %% latexrelease.dtx (with options: `latexrelease') %% ltdirchk.dtx (with options: `latexrelease') +%% ltexpl.dtx (with options: `latexrelease') %% ltdefns.dtx (with options: `latexrelease') +%% lthooks.dtx (with options: `latexrelease') %% ltalloc.dtx (with options: `latexrelease') %% ltcntrl.dtx (with options: `latexrelease') %% lterror.dtx (with options: `latexrelease') @@ -28,6 +30,8 @@ %% ltidxglo.dtx (with options: `latexrelease') %% ltbibl.dtx (with options: `latexrelease') %% ltpage.dtx (with options: `latexrelease') +%% ltfilehook.dtx (with options: `latexrelease') +%% ltshipout.dtx (with options: `latexrelease') %% ltoutput.dtx (with options: `latexrelease') %% ltclass.dtx (with options: `latexrelease,tracerollback') %% ltspace.dtx (with options: `latexrelease') @@ -280,7 +284,7 @@ } %%% From File: ltvers.dtx \edef\latexreleaseversion - {2020-02-02} + {2020-10-01} \newif\if@includeinrelease \@includeinreleasefalse \def\IncludeInRelease#1{% @@ -442,7 +446,147 @@ of this package available from CTAN} \fi \edef\filename@base{#1}} \EndIncludeInRelease +%%% From File: ltexpl.dtx +\IncludeInRelease{2020/10/01}% + {expl3}{Pre-load expl3}% +\expandafter\ifx\csname tex\string _let:D\endcsname\relax + \expandafter\@firstofone +\else + \GenericInfo{}{Skipping: expl3 code already part of the format}% + \expandafter\@gobble +\fi + {% + \IfFileExists{expl3.ltx} + {% + \ifnum0% + \ifdefined\pdffilesize 1\fi + \ifdefined\filesize 1\fi + \ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi + \ifdefined\kanjiskip 1\fi + >0 % + \expandafter\@firstofone + \else + \@latex@error{% + LaTeX requires the e-TeX primitives and additional\MessageBreak + functionality available in the engines:\MessageBreak + - pdfTeX v1.40\MessageBreak + - XeTeX v0.99992\MessageBreak + - LuaTeX v0.95\MessageBreak + - e-(u)pTeX mid-2012\MessageBreak + or later% + }\@ehd \expandafter\@gobble + \fi + } + {% + \@latex@error{LaTeX requires expl3}\@ehd + \@gobble + }% + {% + \input expl3.ltx + \ifdefined\NewDocumentCommand + \else + \IfFileExists{xparse.ltx} + {\input xparse.ltx } + {}% + \fi + }% + } +\EndIncludeInRelease + +\IncludeInRelease{2020/02/02}% + {expl3}{Pre-load expl3}% +\IfFileExists{expl3.ltx} + {% + \ifnum0% + \ifdefined\pdffilesize 1\fi + \ifdefined\filesize 1\fi + \ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi + >0 % + \else + \message{Skipping expl3-dependent extensions} + \expandafter\@gobbletwo + \fi + } + {% + \message{Skipping expl3-dependent extensions}% + \@gobbletwo + }% +\input{expl3.ltx} +\EndIncludeInRelease +\ExplSyntaxOn +\IncludeInRelease{2020/10/01}{expl3~2020-10-01}% + {expl3~macros~added~for~the~2020-10-01~release}% +\cs_gset_eq:NN \@expl@cs@to@str@@N \cs_to_str:N +\cs_gset_eq:NN \@expl@str@if@eq@@nnTF \str_if_eq:nnTF +\cs_gset_eq:NN \@expl@cs@prefix@spec@@N \cs_prefix_spec:N +\cs_gset_eq:NN \@expl@cs@argument@spec@@N \cs_argument_spec:N +\cs_gset_eq:NN \@expl@cs@replacement@spec@@N \cs_replacement_spec:N +\cs_gset_eq:NN \@expl@str@map@function@@NN \str_map_function:NN +\cs_gset_eq:NN \@expl@char@generate@@nn \char_generate:nn +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}{expl3~2020-10-01}% + {expl3~macros~added~for~the~2020-10-01~release}% +\cs_undefine:N \@expl@cs@to@str@@N +\cs_undefine:N \@expl@str@if@eq@@nnTF +\cs_undefine:N \@expl@cs@prefix@spec@@N +\cs_undefine:N \@expl@cs@argument@spec@@N +\cs_undefine:N \@expl@cs@replacement@spec@@N +\cs_undefine:N \@expl@str@map@function@@NN +\EndIncludeInRelease +\ExplSyntaxOff %%% From File: ltdefns.dtx +\IncludeInRelease{2020/10/01}% + {\typeout}{Allow "par" in \typeout}% +\protected\long\def\typeout#1{\begingroup + \set@display@protect + \def\par{^^J^^J}% + \immediate\write\@unused{#1}\endgroup} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\typeout}{Allow "par" in \typeout}% + +\def\typeout#1{\begingroup\set@display@protect + \immediate\write\@unused{#1}\endgroup} +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\MakeRobust}{\MakeRobust}% +\def\MakeRobust#1{% + \count@=\escapechar + \escapechar=`\\ + \@ifundefined{\expandafter\@gobble\string#1}{% + \@latex@error{The control sequence `\string#1' is undefined!% + \MessageBreak There is nothing here to make robust}% + \@eha + }% + {% + \@ifundefined{\expandafter\@gobble\string#1\space}% + {% + \expandafter\@kernel@rename@newcommand + \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}% + \xdef#1{% + \ifx\reserved@a\reserved@b + \noexpand\x@protect\noexpand#1% + \fi + \noexpand\protect\expandafter\noexpand + \csname\expandafter\@gobble\string#1\space\endcsname}% + }% + {\@latex@info{The control sequence `\string#1' is already robust}}% + }% + \escapechar=\count@ +}% +\def\@kernel@rename@newcommand#1#2{% + \robust@command@chk@safe#2% + {\@if@newcommand#2% + {\afterassignment\global + \global\@copy@newcommand#1#2% + \global\let#2\@undefined + \global\expandafter\let\csname\string#2\endcsname\@undefined}% + {\global\let#1=#2}}% + {\global\let#1=#2}} +\EndIncludeInRelease \IncludeInRelease{2019/10/01}{\MakeRobust}{\MakeRobust}% \def\MakeRobust#1{% \@ifundefined{\expandafter\@gobble\string#1}{% @@ -468,6 +612,7 @@ of this package available from CTAN} {\@latex@info{The control sequence `\string#1' is already robust}}% }% }% +\let\@kernel@rename@newcommand\@undefined \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\MakeRobust}{\MakeRobust}% \def\MakeRobust#1{% @@ -494,9 +639,27 @@ of this package available from CTAN} {\@latex@info{The control sequence `\string#1' is already robust}}% }% }% +\let\@kernel@rename@newcommand\@undefined \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\MakeRobust}{\MakeRobust}% \let\MakeRobust\@undefined +\let\@kernel@rename@newcommand\@undefined +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\kernel@make@fragile}{Undo robustness}% +\def\kernel@make@fragile#1{% + \@ifundefined{\expandafter\@gobble\string#1\space}% + {}% + {% + \global\expandafter\let\expandafter #1\csname + \expandafter\@gobble\string#1\space\endcsname + \expandafter\@kernel@rename@newcommand + \csname\expandafter\@gobble\string#1\expandafter\endcsname + \csname\expandafter\@gobble\string#1\space\endcsname + \global\expandafter\let\csname + \expandafter\@gobble\string#1\space\endcsname\@undefined + }% +} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\kernel@make@fragile}{Undo robustness}% @@ -511,6 +674,210 @@ of this package available from CTAN} }% } \EndIncludeInRelease +\IncludeInRelease{2020-10-01}{\robust@command@act} + {Add \robust@command@act}% +\long\def\robust@command@act#1#2#3#4{% + \robust@command@chk@safe#2% + {\expandafter\robust@command@act@loop + \expandafter#2% + #1{\@nnil\@nnil}% + \robust@command@act@end}% + {\robust@command@act@end}% + {#3}{#4}}% +\long\def\robust@command@act@loop#1#2{\robust@command@act@loop@aux#1#2} +\long\def\robust@command@act@loop@aux#1#2#3{% + \ifx\@nnil#2% + \else + #2{#1}% + {\robust@command@act@do{#3}}% + {\expandafter\robust@command@act@loop\expandafter#1}% + \fi} +\long\def\robust@command@act@do#1% + \fi#2% + \robust@command@act@end#3#4{% + \fi + #1#4} +\long\def\robust@command@act@end#1#2{#1#2} +\long\def\robust@command@chk@safe#1{% + \begingroup + \escapechar=`\\ + \expandafter\endgroup\expandafter + \robust@command@act@chk@args\meaning#1:->\@nil} +\def\robust@command@act@chk@args#1:->#2\@nil{% + \@expl@str@if@eq@@nnTF{#1}{macro}% + {\@firstoftwo}% + {\@expl@str@if@eq@@nnTF{#1}{\protected macro}% + {\@firstoftwo}% + {\@secondoftwo}}} +\EndIncludeInRelease +\IncludeInRelease{0000-00-00}{\robust@command@act} + {Add \robust@command@act}% +\let\robust@command@act\@undefined +\let\robust@command@act@loop\@undefined +\let\robust@command@act@loop@aux\@undefined +\let\robust@command@act@do\@undefined +\let\robust@command@act@end\@undefined +\let\robust@command@chk@safe\@undefined +\let\robust@command@act@chk@args\@undefined +\EndIncludeInRelease +\IncludeInRelease{2020-10-01}{\DeclareCommandCopy} + {Add \NewCommandCopy, \RenewCommandCopy, and \DeclareCommandCopy}% +\def\NewCommandCopy{% + \declare@commandcopy + {\@firstofone}% + {\@firstoftwo\@notdefinable}} +\def\RenewCommandCopy{% + \declare@commandcopy + {\@latex@error{Command \@backslashchar\reserved@a\space undefined}\@ehc + \@firstofone}% + {\@firstofone}} +\def\DeclareCommandCopy{% + \declare@commandcopy + {\@firstofone}% + {\@firstofone}} +\long\def\declare@commandcopy#1#2#3#4{% + \edef\reserved@a{\@expl@cs@to@str@@N#3}% + \@ifundefined\reserved@a{#1}{#2}% + {\robust@command@act + \@declarecommandcopylisthook#4% + \declare@commandcopy@let{#3#4}}} +\def\@declarecommandcopylisthook{% + {\@if@DeclareRobustCommand \@copy@DeclareRobustCommand}% + {\@if@newcommand \@copy@newcommand}} +\long\def\declare@commandcopy@let#1#2{\let#1=#2\relax} +\EndIncludeInRelease +\IncludeInRelease{0000-00-00}{\DeclareCommandCopy} + {Undefine \NewCommandCopy, \RenewCommandCopy, and \DeclareCommandCopy}% +\let\NewCommandCopy\@undefined +\let\RenewCommandCopy\@undefined +\let\DeclareCommandCopy\@undefined +\let\declare@commandcopy\@undefined +\let\@declarecommandcopylisthook\@undefined +\let\declare@commandcopy@let\@undefined +\EndIncludeInRelease +\IncludeInRelease{2020-10-01}{\ShowCommand}% + {Add \ShowCommand}% +\long\def\ShowCommand#1{% + \robust@command@act + \@showcommandlisthook#1% + \show#1} +\def\@showcommandlisthook{% + {\@if@DeclareRobustCommand \@show@DeclareRobustCommand}% + {\@if@newcommand \@show@newcommand}} +\EndIncludeInRelease +\IncludeInRelease{0000-00-00}{\ShowCommand} + {Undefine \ShowCommand}% +\let\ShowCommand\@undefined +\let\@showcommandlisthook\@undefined +\EndIncludeInRelease +\IncludeInRelease{2020-10-01}{\@if@DeclareRobustCommand} + {Add \@if@DeclareRobustCommand, \@if@newcommand, + \@copy@DeclareRobustCommand, \@copy@newcommand, + \@show@DeclareRobustCommand, \@show@newcommand}% +\long\def\@if@DeclareRobustCommand#1{% + \begingroup + \escapechar=`\\ + \edef\reserved@a{\string#1}% + \edef\reserved@b{\detokenize{#1}}% + \xdef\@gtempa{% + \ifx\reserved@a\reserved@b + \noexpand\x@protect + \noexpand#1% + \fi + \noexpand\protect + \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname}% + \endgroup + \ifx\@gtempa#1\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\long\def\@copy@DeclareRobustCommand#1#2{% + \begingroup + \escapechar=`\\ + \edef\reserved@a{\string#1}% + \edef\reserved@b{\detokenize{#1}}% + \edef\reserved@a{% + \endgroup + \def\noexpand#1{% + \ifx\reserved@a\reserved@b + \noexpand\x@protect + \noexpand#1% + \fi + \noexpand\protect + \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname}% + \noexpand\copy@kernel@robust@command + \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname + \expandafter\noexpand\csname\@expl@cs@to@str@@N#2 \endcsname}% + \reserved@a} +\long\def\copy@kernel@robust@command#1#2{% + \robust@command@chk@safe#2% + {\@if@newcommand#2% + {\@copy@newcommand}% + {\declare@commandcopy@let}} + {\declare@commandcopy@let}% + #1#2} +\long\def\@show@DeclareRobustCommand#1{% + \typeout{> \string#1=robust macro:}% + \typeout{->\@expl@cs@replacement@spec@@N#1.^^J}% + \expandafter\show@kernel@robust@command + \csname\@expl@cs@to@str@@N#1 \endcsname} +\long\def\show@kernel@robust@command#1{% + \robust@command@chk@safe#1% + {\@if@newcommand#1% + {\@show@newcommand}% + {\show}}% + {\show}% + #1} +\long\def\@if@newcommand#1{% + \edef\reserved@a{% + \noexpand\@protected@testopt + \noexpand#1% + \expandafter\noexpand\csname\@backslashchar\@expl@cs@to@str@@N#1\endcsname}% + \edef\reserved@b{% + \unexpanded\expandafter\expandafter\expandafter + {\expandafter\@carcube#1{}{}{}\@nil}}% + \ifx\reserved@a\reserved@b + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\long\def\@copy@newcommand#1#2{% + \edef#1{\noexpand\@protected@testopt + \noexpand#1% + \expandafter\noexpand\csname\@backslashchar\@expl@cs@to@str@@N#1\endcsname + \unexpanded\expandafter\expandafter\expandafter + {\expandafter\@gobblethree#2}}% + \expandafter + \let\csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname + \csname\@backslashchar\@expl@cs@to@str@@N#2\endcsname} +\long\def\@show@newcommand#1{% + \typeout{> \string#1=robust macro:}% + \typeout{->\@expl@cs@replacement@spec@@N#1.^^J}% + \expandafter\@show@newcommand@aux + \csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname + \expandafter{#1}} +\long\def\@show@newcommand@aux#1#2{% + \typeout{> \string#1=\@expl@cs@prefix@spec@@N#1macro:}% + \edef\reserved@a{% + default \string##1=\expandafter\detokenize\@gobblethree#2.^^J% + \@expl@cs@argument@spec@@N#1->\@expl@cs@replacement@spec@@N#1}% + \showtokens\expandafter\expandafter\expandafter{\expandafter\reserved@a}} +\EndIncludeInRelease +\IncludeInRelease{0000-00-00}{\@if@DeclareRobustCommand} + {Undefine \@if@DeclareRobustCommand, \@if@newcommand, + \@copy@DeclareRobustCommand, \@copy@newcommand, + \@show@DeclareRobustCommand, \@show@newcommand}% +\let\@if@DeclareRobustCommand\@undefined +\let\@copy@DeclareRobustCommand\@undefined +\let\@show@DeclareRobustCommand\@undefined +\let\@if@newcommand\@undefined +\let\@copy@newcommand\@undefined +\let\@show@newcommand\@undefined +\let\copy@kernel@robust@command\@undefined +\let\show@kernel@robust@command\@undefined +\let\@show@newcommand@aux\@undefined +\EndIncludeInRelease \IncludeInRelease{2018-04-01}{\@ifundefined} {Leave commands undefined in \@ifundefined}% \def\@ifundefined#1{% @@ -548,6 +915,43 @@ of this package available from CTAN} \expandafter\@secondoftwo \fi} \EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\string@makeletter} + {Add \string@makeletter}% +\def\string@makeletter#1{% + \@expl@str@map@function@@NN#1\@string@makeletter} +\def\@string@makeletter#1{% + \char@if@alph{#1}% + {\@expl@char@generate@@nn{`#1}{11}}% + {#1}} +\def\char@if@alph#1{% + \ifnum0\ifnum`#1<`A 1\fi\ifnum`#1>`z 1\fi + \if\ifnum`#1>`Z @\fi\ifnum`#1<`a @\fi01\fi>0 + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}{\string@makeletter} + {Undefine \string@makeletter}% +\let\string@makeletter\@undefined +\let\@string@makeletter\@undefined +\let\char@if@alph\@undefined +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\-}{Use primitive \- in Lua\LaTeX}% +\ifx\directlua\@undefined + \DeclareRobustCommand{\-}{% + \discretionary{% + \char \ifnum\hyphenchar\font<\z@ + \defaulthyphenchar + \else + \hyphenchar\font + \fi + }{}{}% + } +\else + \let\-\@@hyph +\fi +\EndIncludeInRelease \IncludeInRelease{2017/04/15}{\-}{Use \hyphenchar in \-}% \DeclareRobustCommand{\-}{% \discretionary{% @@ -558,12 +962,11 @@ of this package available from CTAN} \fi }{}{}% } -\let\@dischyph=\- \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\-}{Use \hyphenchar in \-}% \def\-{\discretionary{-}{}{}} -\let\@dischyph=\- \EndIncludeInRelease +\let\@dischyph=\- \IncludeInRelease{2019/10/01}% {\allowbreak}{Make various commands robust}% \MakeRobust\allowbreak @@ -604,6 +1007,990 @@ of this package available from CTAN} \kernel@make@fragile\underbar \EndIncludeInRelease +%% +%% File: lthooks.dtx (C) Copyright 2020 Frank Mittelbach, +%% Phelype Oleinik & LaTeX Team +%%% From File: lthooks.dtx +\def\lthooksversion{v1.0b} +\def\lthooksdate{2020/09/21} +\IncludeInRelease{2020/10/01}% + {\NewHook}{The hook management}% +\ExplSyntaxOn +\bool_new:N \g__hook_debug_bool +\cs_new_eq:NN \__hook_debug:n \use_none:n +\cs_new_protected:Npn \hook_debug_on: + { + \bool_gset_true:N \g__hook_debug_bool + \__hook_debug_gset: + } +\cs_new_protected:Npn \hook_debug_off: + { + \bool_gset_false:N \g__hook_debug_bool + \__hook_debug_gset: + } +\cs_new_protected:Npn \__hook_debug_gset: + { + \cs_gset_protected:Npx \__hook_debug:n ##1 + { \bool_if:NT \g__hook_debug_bool {##1} } + } +\cs_new_eq:NN \__hook_str_compare:nn \__str_if_eq:nn +\bool_new:N \l__hook_tmpa_bool +\tl_new:N \l__hook_return_tl +\tl_new:N \l__hook_tmpa_tl +\tl_new:N \l__hook_tmpb_tl +\seq_new:N \g__hook_all_seq +\tl_new:N \g__hook_removal_list_tl +\tl_new:N \l__hook_cur_hook_tl +\prop_new:N \l__hook_work_prop +\prop_new:N \g__hook_execute_immediately_prop +\prop_new:N \g__hook_used_prop +\tl_new:N \g__hook_hook_curr_name_tl +\seq_new:N \g__hook_name_stack_seq +\cs_new_eq:NN \__hook_tmp:w ? +\cs_generate_variant:Nn \tl_gremove_once:Nn { Nx } +\cs_generate_variant:Nn \tl_show:n { x } +\cs_generate_variant:Nn \tl_log:n { x } +\scan_new:N \s__hook_mark +\cs_new_protected:Npn \hook_new:n #1 + { \__hook_normalize_hook_args:Nn \__hook_new:n {#1} } +\cs_new_protected:Npn \__hook_new:n #1 + { + \hook_if_exist:nTF {#1} + { \msg_error:nnn { hooks } { exists } {#1} } + { + \seq_gput_right:Nn \g__hook_all_seq {#1} + \tl_new:c { __hook~#1 } + \__hook_declare:n {#1} + \clist_new:c {g__hook_#1_labels_clist} + \tl_new:c { g__hook_#1_reversed_tl } + \__hook_include_legacy_code_chunk:n {#1} + } + } +\cs_new_protected:Npn \__hook_declare:n #1 + { + \__hook_if_exist:nF {#1} + { + \prop_new:c { g__hook_#1_code_prop } + \tl_new:c { __hook_next~#1 } + } + } +\cs_new_protected:Npn \hook_new_reversed:n #1 + { \__hook_normalize_hook_args:Nn \__hook_new_reversed:n {#1} } +\cs_new_protected:Npn \__hook_new_reversed:n #1 + { + \__hook_new:n {#1} + \tl_gset:cn { g__hook_#1_reversed_tl } { - } + } +\cs_new_protected:Npn \hook_new_pair:nn #1#2 + { \hook_new:n {#1} \hook_new_reversed:n {#2} } +\cs_new_protected:Npn \__hook_include_legacy_code_chunk:n #1 + { + \debug_suspend: + \tl_if_exist:cT { @#1hook } + { + \tl_if_empty:cF { @#1hook } + { + \exp_args:Nnnv \__hook_hook_gput_code_do:nnn {#1} + { legacy } { @#1hook } + \tl_gclear:c { @#1hook } + } + } + \debug_resume: + } +\cs_new:Npn \__hook_parse_label_default:n #1 + { + \tl_if_novalue:nTF {#1} + { \__hook_currname_or_default:n { top-level } } + { + \tl_trim_spaces_apply:nN {#1} + \__hook_parse_dot_label:nn { top-level } + } + } +\cs_new:Npn \__hook_parse_dot_label:nn #1 #2 + { + \tl_if_empty:nTF {#1} + { + \msg_expandable_error:nnn { hooks } { empty-label } {#2} + #2 + } + { + \str_if_eq:nnTF {#1} { . } + { \__hook_currname_or_default:n {#2} } + { \__hook_parse_dot_label:nw {#2} #1 ./ \s__hook_mark } + } + } +\cs_new:Npn \__hook_parse_dot_label:nw #1 #2 ./ #3 \s__hook_mark + { + \tl_if_empty:nTF {#2} + { \__hook_parse_dot_label_aux:nw {#1} #3 \s__hook_mark } + { + \tl_if_empty:nTF {#3} + { \__hook_make_name:n {#2} } + { \__hook_parse_dot_label_cleanup:w #2 ./ #3 \s__hook_mark } + } + } +\cs_new:Npn \__hook_parse_dot_label_cleanup:w #1 ./ \s__hook_mark {#1} +\cs_new:Npn \__hook_parse_dot_label_aux:nw #1 #2 ./ \s__hook_mark + { \__hook_currname_or_default:n {#1} / \__hook_make_name:n {#2} } +\cs_new:Npn \__hook_currname_or_default:n #1 + { + \tl_if_empty:NTF \g__hook_hook_curr_name_tl + { + \tl_if_empty:NTF \@currname + { \__hook_make_name:n {#1} } + { \@currname } + } + { \g__hook_hook_curr_name_tl } + } +\cs_new:Npn \__hook_make_name:n #1 + { + \exp_after:wN \exp_after:wN \exp_after:wN \__hook_make_name:w + \exp_after:wN \token_to_str:N \cs:w __hook~ #1 \cs_end: + } +\exp_last_unbraced:NNNNo +\cs_new:Npn \__hook_make_name:w #1 \tl_to_str:n { __hook~ } { } +\cs_new_protected:Npn \__hook_normalize_hook_args_aux:Nn #1 #2 + { + \group_begin: + \use:e + { + \group_end: + \exp_not:N #1 #2 + } + } +\cs_new_protected:Npn \__hook_normalize_hook_args:Nn #1 #2 + { + \__hook_normalize_hook_args_aux:Nn #1 + { { \__hook_parse_label_default:n {#2} } } + } +\cs_new_protected:Npn \__hook_normalize_hook_args:Nnn #1 #2 #3 + { + \__hook_normalize_hook_args_aux:Nn #1 + { + { \__hook_parse_label_default:n {#2} } + { \__hook_parse_label_default:n {#3} } + } + } +\cs_new_protected:Npn \__hook_normalize_hook_rule_args:Nnnnn #1 #2 #3 #4 #5 + { + \__hook_normalize_hook_args_aux:Nn #1 + { + { \__hook_parse_label_default:n {#2} } + { \__hook_parse_label_default:n {#3} } + { \tl_trim_spaces:n {#4} } + { \__hook_parse_label_default:n {#5} } + } + } +\cs_new_protected:Npn \hook_gput_code:nnn #1 #2 + { \__hook_normalize_hook_args:Nnn \__hook_gput_code:nnn {#1} {#2} } +\cs_new_protected:Npn \__hook_gput_code:nnn #1 #2 #3 + { + \prop_if_in:NnTF \g__hook_execute_immediately_prop {#1} + {#3} + { + \__hook_if_marked_removal:nnTF {#1} {#2} + { \__hook_unmark_removal:nn {#1} {#2} } + { + \hook_if_exist:nTF {#1} + { + \__hook_hook_gput_code_do:nnn {#1} {#2} {#3} + \__hook_update_hook_code:n {#1} + } + { \__hook_try_declaring_generic_hook:nnn {#1} {#2} {#3} } + } + } + } +\cs_generate_variant:Nn \__hook_gput_code:nnn { nxv } +\cs_new_protected:Npn \__hook_hook_gput_code_do:nnn #1 #2 #3 + { + \__hook_debug:n{\iow_term:x{****~ Add~ to~ + \hook_if_exist:nF {#1} { undeclared~ } + hook~ #1~ (#2) + \on@line\space <-~ \tl_to_str:n{#3}} } + \prop_get:cnNTF { g__hook_#1_code_prop } {#2} \l__hook_return_tl + { + \prop_gput:cno { g__hook_#1_code_prop } {#2} + { \l__hook_return_tl #3 } + } + { \prop_gput:cnn { g__hook_#1_code_prop } {#2} {#3} } + } +\cs_new_protected:Npn \__hook_gput_undeclared_hook:nnn #1 #2 #3 + { + \__hook_declare:n {#1} + \__hook_hook_gput_code_do:nnn {#1} {#2} {#3} + } +\cs_new_protected:Npn \__hook_try_declaring_generic_hook:nnn #1 + { + \__hook_try_declaring_generic_hook:nNNnn {#1} + \hook_gput_code:nnn \__hook_gput_undeclared_hook:nnn + } +\cs_new_protected:Npn \__hook_try_declaring_generic_next_hook:nn #1 + { + \__hook_try_declaring_generic_hook:nNNnn {#1} + \hook_gput_next_code:nn \__hook_gput_next_do:nn + } +\cs_new_protected:Npn \__hook_try_declaring_generic_hook:nNNnn #1 + { + \__hook_if_file_hook:wTF #1 / / \s__hook_mark + { + \exp_args:Ne \__hook_try_declaring_generic_hook_split:nNNnn + { \exp_args:Ne \__hook_file_hook_normalize:n {#1} } + } + { \__hook_try_declaring_generic_hook_split:nNNnn {#1} } + } +\cs_new_protected:Npn \__hook_try_declaring_generic_hook_split:nNNnn #1 #2 #3 + { + \__hook_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1} + { #2 } + { #3 } {#1} + } +\prg_new_protected_conditional:Npnn \__hook_try_declaring_generic_hook:wn + #1 / #2 / #3 / #4 \scan_stop: #5 { TF } + { + \tl_if_empty:nTF {#2} + { \prg_return_false: } + { + \prop_if_in:NnTF \c__hook_generics_prop {#1} + { + \hook_if_exist:nF {#5} { \hook_new:n {#5} } + \prop_if_in:NnTF \c__hook_generics_reversed_ii_prop {#2} + { \tl_gset:cn { g__hook_#5_reversed_tl } { - } } + { + \prop_if_in:NnT \c__hook_generics_reversed_iii_prop {#3} + { \tl_gset:cn { g__hook_#5_reversed_tl } { - } } + } + \prg_return_true: + } + { \prg_return_false: } + } + } +\prg_new_conditional:Npnn \__hook_if_file_hook:w + #1 / #2 / #3 \s__hook_mark { TF } + { + \str_if_eq:nnTF {#1} { file } + { + \bool_lazy_or:nnTF + { \tl_if_empty_p:n {#3} } + { \str_if_eq_p:nn {#3} { / } } + { \prg_return_false: } + { + \prop_if_in:NnTF \c__hook_generics_file_prop {#2} + { \prg_return_true: } + { \prg_return_false: } + } + } + { \prg_return_false: } + } +\cs_new:Npn \__hook_file_hook_normalize:n #1 + { \__hook_strip_double_slash:n {#1} } +\cs_new:Npn \__hook_strip_double_slash:n #1 + { \__hook_strip_double_slash:w #1 // \s__hook_mark } +\cs_new:Npn \__hook_strip_double_slash:w #1 // #2 \s__hook_mark + { + \tl_if_empty:nTF {#2} + {#1} + { \__hook_strip_double_slash:w #1 / #2 \s__hook_mark } + } +\prop_const_from_keyval:Nn \c__hook_generics_prop + {env=,file=,package=,class=,include=} +\prop_const_from_keyval:Nn \c__hook_generics_reversed_ii_prop {after=,end=} +\prop_const_from_keyval:Nn \c__hook_generics_reversed_iii_prop {after=} +\prop_const_from_keyval:Nn \c__hook_generics_file_prop {before=,after=} +\cs_new_protected:Npn \hook_gremove_code:nn #1 #2 + { \__hook_normalize_hook_args:Nnn \__hook_gremove_code:nn {#1} {#2} } +\cs_new_protected:Npn \__hook_gremove_code:nn #1 #2 + { + \__hook_if_exist:nTF {#1} + { + \str_if_eq:nnTF {#2} {*} + { \prop_gclear:c { g__hook_#1_code_prop } } + { + \prop_get:cnNTF { g__hook_#1_code_prop } {#2} \l__hook_return_tl + { \__hook_gremove_code_do:nn } + { \__hook_mark_removal:nn } + {#1} {#2} + } + \hook_if_exist:nT {#1} + { \__hook_update_hook_code:n {#1} } + } + { \__hook_mark_removal:nn {#1} {#2} } + } +\cs_new_protected:Npn \__hook_gremove_code_do:nn #1 #2 + { \prop_gremove:cn { g__hook_#1_code_prop } {#2} } +\cs_new_protected:Npn \__hook_mark_removal:nn #1 #2 + { + \tl_gput_right:Nx \g__hook_removal_list_tl + { \__hook_removal_tl:nn {#1} {#2} } + } +\cs_new_protected:Npn \__hook_unmark_removal:nn #1 #2 + { + \tl_gremove_once:Nx \g__hook_removal_list_tl + { \__hook_removal_tl:nn {#1} {#2} } + } +\prg_new_protected_conditional:Npnn \__hook_if_marked_removal:nn #1 #2 { TF } + { + \exp_args:NNx \tl_if_in:NnTF \g__hook_removal_list_tl + { \__hook_removal_tl:nn {#1} {#2} } + { \prg_return_true: } { \prg_return_false: } + } +\cs_new:Npn \__hook_removal_tl:nn #1 #2 + { & \tl_to_str:n {#2} $ \tl_to_str:n {#1} $ } +\prop_new:c {g__hook_??_code_prop} +\prop_new:c {__hook~??} +\tl_new:c {g__hook_??_reversed_tl} +\cs_new_protected:Npn \hook_gset_rule:nnnn #1#2#3#4 + { + \__hook_normalize_hook_rule_args:Nnnnn \__hook_gset_rule:nnnn + {#1} {#2} {#3} {#4} + } +\cs_new_protected:Npn \__hook_gset_rule:nnnn #1#2#3#4 + { + \__hook_declare:n {#1} + \__hook_rule_gclear:nnn {#1} {#2} {#4} + \debug_suspend: + \cs_if_exist_use:cTF { __hook_rule_#3_gset:nnn } + { + {#1} {#2} {#4} + \__hook_update_hook_code:n {#1} + } + { \msg_error:nnnnnn { hooks } { unknown-rule } + {#1} {#2} {#3} {#4} } + \debug_resume: + } +\cs_new_protected:Npn \__hook_rule_before_gset:nnn #1#2#3 + { + \tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } + { \__hook_label_ordered:nnTF {#2} {#3} { < } { > } } + } +\cs_new_eq:cN { __hook_rule_<_gset:nnn } \__hook_rule_before_gset:nnn +\cs_new_protected:Npn \__hook_rule_after_gset:nnn #1#2#3 + { + \tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#3} {#2} _tl } + { \__hook_label_ordered:nnTF {#3} {#2} { < } { > } } + } +\cs_new_eq:cN { __hook_rule_>_gset:nnn } \__hook_rule_after_gset:nnn +\cs_new_protected:Npn \__hook_rule_voids_gset:nnn #1#2#3 + { + \tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } + { \__hook_label_ordered:nnTF {#2} {#3} { -> } { <- } } + } +\cs_new_protected:cpn { __hook_rule_incompatible-error_gset:nnn } #1#2#3 + { \tl_gset:cn { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } { xE } } +\cs_new_protected:cpn { __hook_rule_incompatible-warning_gset:nnn } #1#2#3 + { \tl_gset:cn { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } { xW } } +\cs_new_protected:Npn \__hook_rule_unrelated_gset:nnn #1#2#3 { } +\cs_new_protected:Npn \__hook_rule_gclear:nnn #1#2#3 + { \cs_undefine:c { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } } +\cs_new:Npn \__hook_label_pair:nn #1#2 + { + \if_case:w \__hook_str_compare:nn {#1} {#2} \exp_stop_f: + #1 | #1 % 0 + \or: #1 | #2 % +1 + \else: #2 | #1 % -1 + \fi: + } +\prg_new_conditional:Npnn \__hook_label_ordered:nn #1#2 { TF } + { + \if_int_compare:w \__hook_str_compare:nn {#1} {#2} > 0 \exp_stop_f: + \prg_return_true: + \else + \prg_return_false: + \fi: + } +\cs_new:Npn \__hook_if_label_case:nnnnn #1#2 + { + \cs:w use_ + \if_case:w \__hook_str_compare:nn {#1} {#2} + i \or: ii \else: iii \fi: :nnn + \cs_end: + } +\cs_new_eq:NN \__hook_update_hook_code:n \use_none:n +\cs_new_protected:Npn \__hook_initialize_all: { + \cs_gset_eq:NN \__hook_update_hook_code:n \__hook_initialize_hook_code:n + \__hook_debug:n { \prop_gclear:N \g__hook_used_prop } + \seq_map_inline:Nn \g__hook_all_seq + { + \__hook_update_hook_code:n {##1} + } + \__hook_debug:n + { \iow_term:x{^^JAll~ initialized~ (non-empty)~ hooks:} + \prop_map_inline:Nn \g__hook_used_prop + { \iow_term:x{^^J~ ##1~ ->~ + \exp_not:v {__hook~##1}~ } + } + } + \cs_gset_eq:NN \hook_use:n \__hook_use_initialized:n + \cs_gset_eq:NN \__hook_preamble_hook:n \use_none:n +} +\cs_new_protected:Npn \__hook_initialize_hook_code:n #1 + { + \debug_suspend: + \__hook_debug:n{ \iow_term:x{^^JUpdate~ code~ for~ hook~ + '#1' \on@line :^^J} } + \__hook_include_legacy_code_chunk:n {#1} + \hook_if_exist:nT {#1} + { + \prop_if_empty:cTF {g__hook_#1_code_prop} + { \tl_gset:co { __hook~#1 } + { \cs:w __hook_next~#1 \cs_end: } } + { + \__hook_if_reversed:nTF {#1} + { \cs_set_eq:NN \__hook_tl_gput:NV \tl_gput_left:NV + \cs_set_eq:NN \__hook_clist_gput:NV \clist_gput_left:NV } + { \cs_set_eq:NN \__hook_tl_gput:NV \tl_gput_right:NV + \cs_set_eq:NN \__hook_clist_gput:NV \clist_gput_right:NV } + \prop_set_eq:Nc \l__hook_work_prop { g__hook_#1_code_prop } + \__hook_initialize_single:cccn + { __hook~#1 } { __hook_next~#1 } + { g__hook_#1_labels_clist } {#1} + \__hook_debug:n{ \exp_args:NNx \prop_gput:Nnn + \g__hook_used_prop {#1}{} } + } + } + \debug_resume: + } +\cs_new:Npn \__hook_tl_csname:n #1 { l__hook_label_#1_tl } +\cs_new:Npn \__hook_seq_csname:n #1 { l__hook_label_#1_seq } +\seq_new:N \l__hook_labels_seq +\int_new:N \l__hook_labels_int +\tl_new:N \l__hook_front_tl +\tl_new:N \l__hook_rear_tl +\tl_new:c { \__hook_tl_csname:n { 0 } } +\cs_new_protected:Npn \__hook_initialize_single:NNNn #1#2#3#4 + { + \seq_clear:N \l__hook_labels_seq + \int_zero:N \l__hook_labels_int + \tl_set:Nn \l__hook_cur_hook_tl {#4} + \prop_map_inline:Nn \l__hook_work_prop + { + \int_incr:N \l__hook_labels_int + \seq_put_right:Nn \l__hook_labels_seq {##1} + \tl_set:cn { \__hook_tl_csname:n {##1} }{0} + \seq_clear_new:c { \__hook_seq_csname:n {##1} } + } + \prop_map_inline:Nn \l__hook_work_prop + { + \prop_map_inline:Nn \l__hook_work_prop + { + \__hook_if_label_case:nnnnn {##1} {####1} + { \prop_map_break: } + { \__hook_apply_label_pair:nnn {##1} {####1} } + { \__hook_apply_label_pair:nnn {####1} {##1} } + {#4} + } + } + \__hook_debug:n { \__hook_debug_label_data:N \l__hook_work_prop } + \tl_set:Nn \l__hook_rear_tl { 0 } + \tl_set:cn { \__hook_tl_csname:n { 0 } } { 0 } + \seq_map_inline:Nn \l__hook_labels_seq + { + \int_compare:nNnT { \cs:w \__hook_tl_csname:n {##1} \cs_end: } = 0 + { + \tl_set:cn { \__hook_tl_csname:n { \l__hook_rear_tl } }{##1} + \tl_set:Nn \l__hook_rear_tl {##1} + } + } + \tl_set_eq:Nc \l__hook_front_tl { \__hook_tl_csname:n { 0 } } + \tl_gclear:N #1 + \clist_gclear:N #3 + \bool_while_do:nn { ! \str_if_eq_p:Vn \l__hook_front_tl { 0 } } + { + \int_decr:N \l__hook_labels_int + \prop_get:NVN \l__hook_work_prop \l__hook_front_tl \l__hook_return_tl + \__hook_tl_gput:NV #1 \l__hook_return_tl + \__hook_clist_gput:NV #3 \l__hook_front_tl + \__hook_debug:n{ \iow_term:x{Handled~ code~ for~ \l__hook_front_tl} } + \seq_map_inline:cn { \__hook_seq_csname:n { \l__hook_front_tl } } + { + \tl_set:cx { \__hook_tl_csname:n {##1} } + { \int_eval:n + { \cs:w \__hook_tl_csname:n {##1} \cs_end: - 1 } + } + \int_compare:nNnT + { \cs:w \__hook_tl_csname:n {##1} \cs_end: } = 0 + { + \tl_set:cn { \__hook_tl_csname:n { \l__hook_rear_tl } } {##1} + \tl_set:Nn \l__hook_rear_tl {##1} + } + } + \tl_set_eq:Nc \l__hook_front_tl + { \__hook_tl_csname:n { \l__hook_front_tl } } + } + \int_compare:nNnF \l__hook_labels_int = 0 + { + \iow_term:x{====================} + \iow_term:x{Error:~ label~ rules~ are~ incompatible:} + \__hook_debug_label_data:N \l__hook_work_prop + \iow_term:x{====================} + } + \tl_gput_right:Nn #1 {#2} + } +\cs_generate_variant:Nn \__hook_initialize_single:NNNn {ccc} +\cs_new:Npn \__hook_tl_gput:NV {\ERROR} +\cs_new:Npn \__hook_clist_gput:NV {\ERROR} +\cs_new_protected:Npn \__hook_apply_label_pair:nnn #1#2#3 + { + \__hook_label_if_exist_apply:nnnF {#1} {#2} {#3} + { + \__hook_label_if_exist_apply:nnnF {#1} {#2} { ?? } { } + } + } +\cs_new_protected:Npn \__hook_label_if_exist_apply:nnnF #1#2#3 + { + \if_cs_exist:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end: + \__hook_apply_rule:nnn {#1} {#2} {#3} + \exp_after:wN \use_none:n + \else: + \use:nn + \fi: + } +\cs_new_protected:Npn \__hook_apply_rule:nnn #1#2#3 + { + \cs:w __hook_apply_ + \cs:w g__hook_#3_reversed_tl \cs_end: rule_ + \cs:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end: :nnn \cs_end: + {#1} {#2} {#3} + } +\cs_new_protected:cpn { __hook_apply_rule_<:nnn } #1#2#3 + { + \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} } + \tl_set:cx { \__hook_tl_csname:n {#2} } + { \int_eval:n{ \cs:w \__hook_tl_csname:n {#2} \cs_end: + 1 } } + \seq_put_right:cn{ \__hook_seq_csname:n {#1} }{#2} + } +\cs_new_protected:cpn { __hook_apply_rule_>:nnn } #1#2#3 + { + \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} } + \tl_set:cx { \__hook_tl_csname:n {#1} } + { \int_eval:n{ \cs:w \__hook_tl_csname:n {#1} \cs_end: + 1 } } + \seq_put_right:cn{ \__hook_seq_csname:n {#2} }{#1} + } +\cs_new_protected:cpn { __hook_apply_rule_xE:nnn } #1#2#3 + { + \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} } + \msg_error:nnnnnn { hooks } { labels-incompatible } + {#1} {#2} {#3} { 1 } + \use:c { __hook_apply_rule_->:nnn } {#1} {#2} {#3} + \use:c { __hook_apply_rule_<-:nnn } {#1} {#2} {#3} + } +\cs_new_protected:cpn { __hook_apply_rule_xW:nnn } #1#2#3 + { + \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} } + \msg_warning:nnnnnn { hooks } { labels-incompatible } + {#1} {#2} {#3} { 0 } + } +\cs_new_protected:cpn { __hook_apply_rule_->:nnn } #1#2#3 + { + \__hook_debug:n + { + \__hook_msg_pair_found:nnn {#1} {#2} {#3} + \iow_term:x{--->~ Drop~ '#2'~ code~ from~ + \iow_char:N \\ g__hook_ \l__hook_cur_hook_tl _code_prop ~ + because~ of~ '#1' } + } + \prop_put:Nnn \l__hook_work_prop {#2} { } + } +\cs_new_protected:cpn { __hook_apply_rule_<-:nnn } #1#2#3 + { + \__hook_debug:n + { + \__hook_msg_pair_found:nnn {#1} {#2} {#3} + \iow_term:x{--->~ Drop~ '#1'~ code~ from~ + \iow_char:N \\ g__hook_ \l__hook_cur_hook_tl _code_prop ~ + because~ of~ '#2' } + } + \prop_put:Nnn \l__hook_work_prop {#1} { } + } +\cs_new_eq:cc { __hook_apply_-rule_<:nnn } { __hook_apply_rule_>:nnn } +\cs_new_eq:cc { __hook_apply_-rule_>:nnn } { __hook_apply_rule_<:nnn } +\cs_new_eq:cc { __hook_apply_-rule_<-:nnn } { __hook_apply_rule_<-:nnn } +\cs_new_eq:cc { __hook_apply_-rule_->:nnn } { __hook_apply_rule_->:nnn } +\cs_new_eq:cc { __hook_apply_-rule_xE:nnn } { __hook_apply_rule_xE:nnn } +\cs_new_eq:cc { __hook_apply_-rule_xW:nnn } { __hook_apply_rule_xW:nnn } +\cs_new_protected:Npn \__hook_msg_pair_found:nnn #1#2#3 + { + \iow_term:x{~ \str_if_eq:nnTF {#3} {??} {default} {~normal} ~ + rule~ \__hook_label_pair:nn {#1} {#2}:~ + \use:c { g__hook_#3_rule_ \__hook_label_pair:nn {#1} {#2} _tl } ~ + found} + } +\cs_new_protected:Npn \__hook_debug_label_data:N #1 { + \iow_term:x{Code~ labels~ for~ sorting:} + \iow_term:x{~ \seq_use:Nnnn\l__hook_labels_seq {~and~}{,~}{~and~} } + \iow_term:x{^^J Data~ structure~ for~ label~ rules:} + \prop_map_inline:Nn #1 + { + \iow_term:x{~ ##1~ =~ \tl_use:c{ \__hook_tl_csname:n {##1} }~ ->~ + \seq_use:cnnn{ \__hook_seq_csname:n {##1} }{~->~}{~->~}{~->~} + } + } + \iow_term:x{} +} +\cs_new_protected:Npn \hook_log:n #1 + { + \cs_set_eq:NN \__hook_log_cmd:x \iow_log:x + \__hook_normalize_hook_args:Nn \__hook_log:nN {#1} \tl_log:x + } +\cs_new_protected:Npn \hook_show:n #1 + { + \cs_set_eq:NN \__hook_log_cmd:x \iow_term:x + \__hook_normalize_hook_args:Nn \__hook_log:nN {#1} \tl_show:x + } +\cs_new_protected:Npn \__hook_log_line:x #1 + { \__hook_log_cmd:x { >~#1 } } +\cs_new_protected:Npn \__hook_log_line_indent:x #1 + { \__hook_log_cmd:x { >~\@spaces #1 } } +\cs_new_protected:Npn \__hook_log:nN #1 #2 + { + \__hook_preamble_hook:n {#1} + \iow_term:x { ^^J ->~The~hook~'#1': } + \hook_if_exist:nF {#1} + { \__hook_log_line:x { is~not~declared! } } + \__hook_if_exist:nTF {#1} + { + \__hook_log_line:x { Code~chunks: } + \prop_if_empty:cTF { g__hook_#1_code_prop } + { \__hook_log_line_indent:x { --- } } + { + \prop_map_inline:cn { g__hook_#1_code_prop } + { \__hook_log_line_indent:x { ##1~->~\tl_to_str:n {##2} } } + } + \__hook_log_line:x { Extra~code~for~next~invocation:} + \__hook_log_line_indent:x + { + \tl_if_empty:cTF { __hook_next~#1 } + { --- } + { ->~ \exp_args:Nv \__hook_log_next_code:n { __hook_next~#1 } } + } + \__hook_log_line:x { Rules: } + \bool_set_true:N \l__hook_tmpa_bool + \__hook_list_rules:nn {#1} + { + \bool_set_false:N \l__hook_tmpa_bool + \__hook_log_line_indent:x + { + ##2~ with~ + \str_if_eq:nnT {##3} {??} { default~ } + relation~ ##1 + } + } + \bool_if:NT \l__hook_tmpa_bool + { \__hook_log_line_indent:x { --- } } + \bool_lazy_and:nnTF + { \hook_if_exist_p:n {#1} } + { ! \hook_if_empty_p:n {#1} } + { + \__hook_log_line:x + { + Execution~order + \bool_if:NTF \l__hook_tmpa_bool + { \__hook_if_reversed:nT {#1} { ~(after~reversal) } } + { ~(after~ + \__hook_if_reversed:nT {#1} { reversal~and~ } + applying~rules) + } : + } + #2 % \tl_show:n + { + \@spaces + \clist_if_empty:cTF { g__hook_#1_labels_clist } + { --- } + { \clist_use:cn {g__hook_#1_labels_clist} { ,~ } } + } + } + { + #2 + { + Hook~ \hook_if_exist:nTF {#1} + {code~pool~empty} {not~declared} + } + } + } + { #2 { The~hook~is~empty. } } + } +\cs_new:Npn \__hook_log_next_code:n #1 + { \exp_args:No \tl_to_str:n { \use_none:nn #1 } } +\cs_new_protected:Npn \__hook_list_rules:nn #1 #2 + { + \cs_set_protected:Npn \__hook_tmp:w ##1 ##2 ##3 {#2} + \prop_map_inline:cn { g__hook_#1_code_prop } + { + \prop_map_inline:cn { g__hook_#1_code_prop } + { + \__hook_if_label_case:nnnnn {##1} {####1} + { \prop_map_break: } + { \__hook_list_one_rule:nnn {##1} {####1} } + { \__hook_list_one_rule:nnn {####1} {##1} } + {#1} + } + } + } +\cs_new_protected:Npn \__hook_list_one_rule:nnn #1#2#3 + { + \__hook_list_if_rule_exists:nnnF {#1} {#2} {#3} { } + { \__hook_list_if_rule_exists:nnnF {#1} {#2} { ?? } { } } + } +\cs_new_protected:Npn \__hook_list_if_rule_exists:nnnF #1#2#3 + { + \if_cs_exist:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end: + \exp_args:Nv \__hook_tmp:w + { g__hook_ #3 _rule_ #1 | #2 _tl } { #1 | #2 } {#3} + \fi: + } +\cs_new_protected:Npn \__hook_debug_print_rules:n #1 + { + \iow_term:n { The~hook~#1~contains~the~rules: } + \cs_set_protected:Npn \__hook_tmp:w ##1 + { + \__hook_list_rules:nn {#1} + { + \iow_term:x + { + > ##1 {####2} ##1 => ##1 {####1} + \str_if_eq:nnT {####3} {??} { ~(default) } + } + } + } + \exp_args:No \__hook_tmp:w { \use:nn { ~ } { ~ } } + } +\cs_new_protected:Npn \hook_gput_next_code:nn #1 + { \__hook_normalize_hook_args:Nn \__hook_gput_next_code:nn {#1} } +\cs_new_protected:Npn \__hook_gput_next_code:nn #1 #2 + { + \debug_suspend: + \__hook_declare:n {#1} + \hook_if_exist:nTF {#1} + { \__hook_gput_next_do:nn {#1} {#2} } + { \__hook_try_declaring_generic_next_hook:nn {#1} {#2} } + \debug_resume: + } +\cs_new_protected:Npn \__hook_gput_next_do:nn #1 + { + \exp_args:Nc \__hook_gput_next_do:Nnn + { __hook_next~#1 } {#1} + } +\cs_new_protected:Npn \__hook_gput_next_do:Nnn #1 #2 + { + \tl_if_empty:cT { __hook~#2 } + { \__hook_update_hook_code:n {#2} } + \tl_if_empty:NT #1 + { \tl_gset:Nn #1 { \__hook_clear_next:n {#2} } } + \tl_gput_right:Nn #1 + } +\cs_new_protected:Npn \__hook_clear_next:n #1 + { \cs_gset_eq:cN { __hook_next~#1 } \c_empty_tl } +\cs_new_protected:Npn \hook_use:n #1 + { + \tl_if_exist:cTF { __hook~#1 } + { + \__hook_preamble_hook:n {#1} + \cs:w __hook~#1 \cs_end: + } + { \__hook_use:wn #1 / \s__hook_mark {#1} } + } +\cs_new:Npn \__hook_use_initialized:n #1 + { + \if_cs_exist:w __hook~#1 \cs_end: + \else: + \__hook_use_undefined:w + \fi: + \cs:w __hook~#1 \__hook_use_end: + } +\cs_new:Npn \__hook_use_undefined:w #1 #2 __hook~#3 \__hook_use_end: + { + #1 % fi + \__hook_use:wn #3 / \s__hook_mark {#3} + } +\cs_new_protected:Npn \__hook_preamble_hook:n #1 + { \__hook_initialize_hook_code:n {#1} } +\cs_new_eq:NN \__hook_use_end: \cs_end: +\cs_new:Npn \__hook_use:wn #1 / #2 \s__hook_mark #3 + { + \str_if_eq:nnTF {#1} { file } + { \__hook_try_file_hook:n {#3} } + { } % Hook doesn't exist + } +\cs_new_protected:Npn \__hook_try_file_hook:n #1 + { + \__hook_if_file_hook:wTF #1 / / \s__hook_mark + { + \exp_args:Ne \__hook_if_exist_use:n + { \exp_args:Ne \__hook_file_hook_normalize:n {#1} } + } + { \__hook_if_exist_use:n {#1} } % file/ generic hook (e.g. file/before) + } +\cs_new_protected:Npn \__hook_if_exist_use:n #1 + { + \tl_if_exist:cT { __hook~#1 } + { + \__hook_preamble_hook:n {#1} + \cs:w __hook~#1 \cs_end: + } + } +\cs_new_protected:Npn \hook_use_once:n #1 + { + \tl_if_exist:cT { __hook~#1 } + { + \tl_set:Nn \l__hook_return_tl {#1} + \__hook_normalize_hook_args:Nn \__hook_use_once_store:n + { \l__hook_return_tl } + \hook_use:n {#1} + } + } +\cs_new_protected:Npn \__hook_use_once_store:n #1 + { \prop_gput:Nnn \g__hook_execute_immediately_prop {#1} { } } +\prg_new_conditional:Npnn \hook_if_empty:n #1 { p , T , F , TF } + { + \__hook_if_exist:nTF {#1} + { + \bool_lazy_and:nnTF + { \prop_if_empty_p:c { g__hook_#1_code_prop } } + { \tl_if_empty_p:c { __hook_next~#1 } } + { \prg_return_true: } + { \prg_return_false: } + } + { \prg_return_true: } + } +\prg_new_conditional:Npnn \hook_if_exist:n #1 { p , T , F , TF } + { + \tl_if_exist:cTF { __hook~#1 } + { \prg_return_true: } + { \prg_return_false: } + } +\prg_new_conditional:Npnn \__hook_if_exist:n #1 { p , T , F , TF } + { + \prop_if_exist:cTF { g__hook_#1_code_prop } + { \prg_return_true: } + { \prg_return_false: } + } +\prg_new_conditional:Npnn \__hook_if_reversed:n #1 { p , T , F , TF } + { + \if_int_compare:w \cs:w g__hook_#1_reversed_tl \cs_end: 1 < 0 \exp_stop_f: + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\msg_new:nnnn { hooks } { labels-incompatible } + { + Labels~`#1'~and~`#2'~are~incompatible + \str_if_eq:nnF {#3} {??} { ~in~hook~`#3' } .~ + \int_compare:nNnTF {#4} = { 1 } + { The~ code~ for~ both~ labels~ will~ be~ dropped. } + { You~ may~ see~ errors~ later. } + } + { LaTeX~found~two~incompatible~labels~in~the~same~hook.~ + This~indicates~an~incompatibility~between~packages. } +\msg_new:nnnn { hooks } { exists } + { Hook~`#1'~ has~ already~ been~ declared. } + { There~ already~ exists~ a~ hook~ declaration~ with~ this~ + name.\\ + Please~ use~ a~ different~ name~ for~ your~ hook.} +\msg_new:nnn { hooks } { empty-label } + { Empty~code~label~\msg_line_context:.~Using~`#1'~instead. } +\msg_new:nnnn { hooks } { unknown-rule } + { Unknown~ relationship~ `#3'~ + between~ labels~ `#2'~ and~ `#4'~ + \str_if_eq:nnF {#1} {??} { ~in~hook~`#1' }. ~ + Perhaps~ a~ missspelling? + } + { + The~ relation~ used~ not~ known~ to~ the~ system.~ Allowed~ values~ are~ + `before'~ or~ `<',~ + `after'~ or~ `>',~ + `incompatible-warning',~ + `incompatible-error',~ + `voids'~ or~ + `unrelated'. + } +\msg_new:nnn { hooks } { should-not-happen } + { + ERROR!~This~should~not~happen.~#1 \\ + Please~report~at~https://github.com/latex3/latex2e. + } +\NewDocumentCommand \NewHook { m }{ \hook_new:n {#1} } +\NewDocumentCommand \NewReversedHook { m }{ \hook_new_reversed:n {#1} } +\NewDocumentCommand \NewMirroredHookPair { mm }{ \hook_new_pair:nn {#1}{#2} } +\NewDocumentCommand \AddToHook { m o +m } + { \hook_gput_code:nnn {#1} {#2} {#3} } +\NewDocumentCommand \AddToHookNext { m +m } + { \hook_gput_next_code:nn {#1} {#2} } +\NewDocumentCommand \RemoveFromHook { m o } + { \hook_gremove_code:nn {#1} {#2} } +\seq_gpush:Nn \g__hook_name_stack_seq { } +\cs_new_protected:Npn \__hook_curr_name_push:n #1 + { + \seq_gpush:Nn \g__hook_name_stack_seq {#1} + \tl_gset:Nn \g__hook_hook_curr_name_tl {#1} + } +\cs_new_protected:Npn \__hook_curr_name_pop: + { + \seq_gpop:NN \g__hook_name_stack_seq \l__hook_return_tl + \seq_get:NNTF \g__hook_name_stack_seq \l__hook_return_tl + { \tl_gset_eq:NN \g__hook_hook_curr_name_tl \l__hook_return_tl } + { + \msg_error:nnn { hooks } { should-not-happen } + { Tried~to~pop~from~an~empty~default~label~stack. } + } + } +\NewDocumentCommand \DeclareDefaultHookLabel { m } + { + \seq_gpop:NN \g__hook_name_stack_seq \l__hook_return_tl + \__hook_curr_name_push:n {#1} + } +\cs_new:Npn \UseHook { \hook_use:n } +\cs_new:Npn \UseOneTimeHook { \hook_use_once:n } +\cs_new_protected:Npn \ShowHook { \hook_show:n } +\cs_new_protected:Npn \LogHook { \hook_log:n } +\cs_new_protected:Npn \DebugHooksOn { \hook_debug_on: } +\cs_new_protected:Npn \DebugHooksOff { \hook_debug_off: } +\NewDocumentCommand \DeclareHookRule { m m m m } + { \hook_gset_rule:nnnn {#1}{#2}{#3}{#4} } +\NewDocumentCommand \DeclareDefaultHookRule { m m m } + { \hook_gset_rule:nnnn {??}{#1}{#2}{#3} } +\@onlypreamble\DeclareDefaultHookRule +\NewDocumentCommand \ClearHookRule { m m m } +{ \hook_gset_rule:nnnn {#1}{#2}{unrelated}{#3} } +\cs_new_eq:NN \IfHookExistsTF \hook_if_exist:nTF +\cs_new_eq:NN \IfHookEmptyTF \hook_if_empty:nTF +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5 +\cs_new_eq:NN \@expl@@@initialize@all@@ + \__hook_initialize_all: +\cs_new_eq:NN \@expl@@@hook@curr@name@push@@n + \__hook_curr_name_push:n +\cs_new_eq:NN \@expl@@@hook@curr@name@pop@@ + \__hook_curr_name_pop: +\ExplSyntaxOff +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\NewHook}{The hook management}% + +\def \NewHook#1{} +\def \NewReversedHook#1{} +\def \NewMirroredHookPair#1#2{} + +\long\def \AddToHook#1#2{} + +\def \AddToHookNext#1{\@gobble@AddToHook@args} +\providecommand\@gobble@AddToHook@args[2][]{} + +\def\RemoveFromHook#1{\@gobble@RemoveFromHook@arg} +\providecommand\@gobble@RemoveFromHook@arg[1][]{} + +\def \UseHook #1{} +\def \UseOneTimeHook #1{} +\def \ShowHook #1{} +\let \DebugHooksOn \@empty +\let \DebugHooksOff\@empty + +\def \DeclareHookRul#1#2#3#4{} +\def \DeclareDefaultHookRule #1#2#3{} +\def \ClearHookRule#1#2#3{} +\def \IfHookExistTF #1#2#3{#3} +\def \IfHookEmptyTF #1#2#3{#2} + +\EndIncludeInRelease +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% From File: ltalloc.dtx %%% From File: ltcntrl.dtx %%% From File: lterror.dtx @@ -627,6 +2014,42 @@ of this package available from CTAN} {\@ifnextchar[\@makebox\mbox}}% \expandafter\let\csname makebox \endcsname\@undefined \EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@imakepicbox}{default units}% +\long\def\@imakepicbox(#1,#2)[#3]#4{% + \@defaultunitsset\@tempdimc{#2}\unitlength + \vbox to\@tempdimc + {\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss + \let\mb@t\vss + \@tfor\reserved@a :=#3\do{% + \if s\reserved@a + \let\mb@l\relax\let\mb@r\relax + \else + \expandafter\let\csname mb@\reserved@a\endcsname\relax + \fi}% + \mb@t + \@defaultunitsset\@tempdimc{#1}\unitlength + \hb@xt@\@tempdimc{\mb@l #4\mb@r}% + \mb@b + \kern\z@}} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@imakepicbox}{default units}% +\long\def\@imakepicbox(#1,#2)[#3]#4{% + \vbox to#2\unitlength + {\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss + \let\mb@t\vss + \@tfor\reserved@a :=#3\do{% + \if s\reserved@a + \let\mb@l\relax\let\mb@r\relax + \else + \expandafter\let\csname mb@\reserved@a\endcsname\relax + \fi}% + \mb@t + \hb@xt@ #1\unitlength{\mb@l #4\mb@r}% + \mb@b + \kern\z@}} +\EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\savebox}{Make \savebox robust}% \DeclareRobustCommand\savebox[1]{% @@ -729,6 +2152,15 @@ of this package available from CTAN} \expandafter\let\csname raisebox \endcsname\@undefined \EndIncludeInRelease %%% From File: lttab.dtx +\IncludeInRelease{2020/10/01}% + {\@itabcr}{Tabbing calc syntax}% +\def\@itabcr[#1]{\@vspace@calcify{#1}\@startline\ignorespaces} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@itabcr}{Tabbing calc syntax}% + +\def\@itabcr[#1]{\vskip #1\@startline\ignorespaces} +\EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\pushtabs}{Make commands robust}% \DeclareRobustCommand\pushtabs{% @@ -755,6 +2187,15 @@ of this package available from CTAN} \kernel@make@fragile\poptabs \kernel@make@fragile\kill +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@yargarraycr}{tabular support calc syntax}% +\def\@yargarraycr#1{\cr\noalign{\@vspace@calcify{#1}}} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@yargarraycr}{tabular support calc syntax}% + +\def\@yargarraycr#1{\cr\noalign{\vskip #1}} \EndIncludeInRelease %%% From File: ltmath.dtx \IncludeInRelease{2019/10/01}% @@ -798,13 +2239,13 @@ of this package available from CTAN} \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\cases}{Make commands robust}% -\DeclareRobustCommand\cases[1]{\left\{\,\vcenter{\normalbaselines\m@th +\DeclareRobustCommand*\cases[1]{\left\{\,\vcenter{\normalbaselines\m@th \ialign{$##\hfil$&\quad{##}\hfil\crcr#1\crcr}}\right.} -\DeclareRobustCommand\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}}}\,} -\DeclareRobustCommand\pmatrix[1]{\left(\matrix{#1}\right)} +\DeclareRobustCommand*\pmatrix[1]{\left(\matrix{#1}\right)} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\cases}{Make commands robust}% @@ -813,6 +2254,36 @@ of this package available from CTAN} \kernel@make@fragile\matrix \kernel@make@fragile\pmatrix +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\tmspace}{amsmath spacing commands}% +\DeclareRobustCommand\tmspace[3]{% + \ifmmode\mskip#1#2\else\leavevmode@ifvmode\kern#1#3\fi\relax} +\DeclareRobustCommand\,{\tmspace+\thinmuskip{.16667em}} +\let\thinspace\, +\DeclareRobustCommand\!{\tmspace-\thinmuskip{.16667em}} +\let\negthinspace\! +\DeclareRobustCommand\:{\tmspace+\medmuskip{.2222em}} +\let\medspace\: +\let\>=\: +\DeclareRobustCommand\negmedspace{\tmspace-\medmuskip{.2222em}} +\DeclareRobustCommand\;{\tmspace+\thickmuskip{.2777em}} +\let\thickspace\; +\DeclareRobustCommand\negthickspace{\tmspace-\thickmuskip{.2777em}} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\tmspace}{amsmath spacing commands}% + +\let\tmspace\@undefined +\DeclareRobustCommand{\,}{% + \relax\ifmmode\mskip\thinmuskip\else\thinspace\fi} +\DeclareRobustCommand\thinspace{\leavevmode@ifvmode\kern .16667em } +\DeclareRobustCommand\negthinspace{\leavevmode@ifvmode\kern-.16667em } +\def\>{\mskip\medmuskip} +\let\:=\> +\def\;{\mskip\thickmuskip} +\def\!{\mskip-\thinmuskip} + \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\(}{Make \( robust}% \DeclareRobustCommand\({% @@ -880,28 +2351,316 @@ of this package available from CTAN} }% \expandafter\let\csname\string] \endcsname\@undefined \EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@xeqncr}{eqnarray support calc syntax}% +\def\@xeqncr[#1]{% + \ifnum0=`{\fi}% + \@@eqncr + \noalign{\penalty\@eqpen\vskip\jot\@vspace@calcify{#1}}% +} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@xeqncr}{eqnarray support calc syntax}% + +\def\@xeqncr[#1]{% + \ifnum0=`{\fi}% + \@@eqncr + \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}% +} +\EndIncludeInRelease %%% From File: ltpictur.dtx -\IncludeInRelease{2016/03/31}% - {\@ovhlinetrue}% - {Avoid almost zero length leaders}% -\newif\if@ovvline \@ovvlinetrue -\newif\if@ovhline \@ovhlinetrue -\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}% - \@ovxx #1\unitlength - \@ovyy #2\unitlength - \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx \@ovvlinetrue - \else \@ovyy \ifdim \@ovyy =\@ovxx \else \@ovhlinetrue \fi\fi - \advance \@tempdimb -2\p@ - \@getcirc \@tempdimb - \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa - \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@ - \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@ - \ifdim \@ovdx >\z@ \@ovhlinetrue \fi - \ifdim \@ovdy >\z@ \@ovvlinetrue \fi - \@circlefnt \setbox\@tempboxa +\IncludeInRelease{2020/10/01}% + {\@defaultunitsset}{default units}% +\def\@defaultunitsset#1#2#3{% + \@defaultunits#1\dimexpr#2#3\relax\relax\@nnil} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@defaultunitsset}{default units}% +\let\@defaultunitsset\@undefined +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@picture}{default units}% +\def\@picture(#1,#2)(#3,#4){% + \@defaultunitsset\@picht{#2}\unitlength + \@defaultunitsset\@tempdimc{#1}\unitlength + \setbox\@picbox\hb@xt@\@tempdimc\bgroup + \@defaultunitsset\@tempdimc{#3}\unitlength + \hskip -\@tempdimc + \@defaultunitsset\@tempdimc{#4}\unitlength + \lower\@tempdimc\hbox\bgroup + \ignorespaces} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@picture}{default units}% +\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} +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\put}{default units}% +\expandafter\let\csname put \endcsname\@undefind +\long\def\put(#1,#2)#3{% + \@killglue + \@defaultunitsset\@tempdimc{#2}\unitlength + \raise\@tempdimc + \hb@xt@\z@{% + \@defaultunitsset\@tempdimc{#1}\unitlength + \kern\@tempdimc + #3\hss}% + \ignorespaces} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\put}{default units}% +\expandafter\let\csname put \endcsname\@undefind +\long\def\put(#1,#2)#3{% + \@killglue\raise#2\unitlength + \hb@xt@\z@{\kern#1\unitlength #3\hss}% + \ignorespaces} +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\multiput}{default units}% +\expandafter\let\csname multiput \endcsname\@undefind +\def\multiput(#1,#2)#3{% + \@defaultunitsset\@xdim{#1}\unitlength + \@defaultunitsset\@ydim{#2}\unitlength + \@multiput(} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\multiput}{default units}% +\expandafter\let\csname multiput \endcsname\@undefind +\def\multiput(#1,#2)#3{% + \@xdim #1\unitlength + \@ydim #2\unitlength + \@multiput(} +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@multiput}{default units}% +\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 + \@defaultunitsset{\advance\@xdim}{#1}\unitlength + \@defaultunitsset{\advance\@ydim}{#2}\unitlength}% + \ignorespaces} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@multiput}{default units}% +\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} +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@istackcr}{\shortstack calc support}% +\def\@istackcr[#1]{\cr\noalign{\@vspace@calcify{#1}}\ignorespaces} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@istackcr}{\shortstack calc support}% + +\def\@istackcr[#1]{\cr\noalign{\vskip #1}\ignorespaces} +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\line}{default units}% +\expandafter\let\csname line \endcsname\@undefind +\def\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax + \@defaultunitsset\@linelen{#3}\unitlength + \ifdim\@linelen<\z@\@badlinearg\else + \ifnum\@xarg =\z@ \@vline + \else \ifnum\@yarg =\z@ \@hline \else \@sline\fi + \fi + \fi} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\line}{default units}% +\expandafter\let\csname line \endcsname\@undefind +\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} +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\vector}{default units}% +\expandafter\let\csname vector \endcsname\@undefind +\def\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax + \@tempcnta \ifnum\@xarg<\z@ -\@xarg\else\@xarg\fi + \ifnum\@tempcnta<5\relax + \@defaultunitsset\@linelen{#3}\unitlength + \ifdim\@linelen<\z@\@badlinearg\else + \ifnum\@xarg =\z@ \@vvector + \else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi + \fi + \fi + \else\@badlinearg\fi} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\vector}{default units}% +\expandafter\let\csname vector \endcsname\@undefind +\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 + \ifdim\@linelen<\z@\@badlinearg\else + \ifnum\@xarg =\z@ \@vvector + \else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi + \fi + \fi + \else\@badlinearg\fi} +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\dashbox}{default units}% +\expandafter\let\csname dashbox \endcsname\@undefind +\def\dashbox#1(#2,#3){\leavevmode\hb@xt@\z@{\baselineskip \z@skip +\lineskip \z@skip +\@defaultunitsset\@dashdim{#2}\unitlength +\@dashcnt \@dashdim \advance\@dashcnt 200 +\@defaultunitsset\@dashdim{#1}\unitlength +\divide\@dashcnt \@dashdim +\ifodd\@dashcnt\@dashdim \z@ +\advance\@dashcnt \@ne \divide\@dashcnt \tw@ +\else \divide\@dashdim \tw@ \divide\@dashcnt \tw@ +\advance\@dashcnt \m@ne +\setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth +\@width \@dashdim}\put(0,0){\copy\@dashbox}% +\put(0,#3){\copy\@dashbox}% +\put(#2,0){\hskip-\@dashdim\copy\@dashbox}% +\put(#2,#3){\hskip-\@dashdim\box\@dashbox}% +\multiply\@dashdim \thr@@ +\fi +\setbox\@dashbox \hbox{% + \@defaultunitsset\@tempdimc{#1}\unitlength + \vrule \@height \@halfwidth \@depth \@halfwidth \@width \@tempdimc + \hskip\@tempdimc}% +\@tempcnta\z@ +\put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt +\do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@ +\put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt +\do{\copy\@dashbox\advance\@tempcnta \@ne }}% +\@defaultunitsset\@dashdim{#3}\unitlength +\@dashcnt \@dashdim \advance\@dashcnt 200 +\@defaultunitsset\@dashdim{#1}\unitlength +\divide\@dashcnt \@dashdim +\ifodd\@dashcnt \@dashdim \z@ +\advance\@dashcnt \@ne \divide\@dashcnt \tw@ +\else +\divide\@dashdim \tw@ \divide\@dashcnt \tw@ +\advance\@dashcnt \m@ne +\setbox\@dashbox\hbox{\hskip -\@halfwidth +\vrule \@width \@wholewidth +\@height \@dashdim}\put(0,0){\copy\@dashbox}% +\put(#2,0){\copy\@dashbox}% +\put(0,#3){\lower\@dashdim\copy\@dashbox}% +\put(#2,#3){\lower\@dashdim\copy\@dashbox}% +\multiply\@dashdim \thr@@ +\fi +\@defaultunitsset\@tempdimb{#1}\unitlength +\setbox\@dashbox\hbox{% + \vrule \@width \@wholewidth \@height\@tempdimb}% +\@tempcnta\z@ +\put(0,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt +\do{\vskip\@tempdimb\copy\@dashbox\advance\@tempcnta \@ne }% +\vskip\@dashdim}}\@tempcnta\z@ +\put(#2,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta<\@dashcnt +\do{\vskip\@tempdimb\copy\@dashbox\advance\@tempcnta \@ne }% +\vskip\@dashdim}}}\@makepicbox(#2,#3)} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\dashbox}{default units}% +\expandafter\let\csname dashbox \endcsname\@undefind +\def\dashbox#1(#2,#3){% +\leavevmode\hb@xt@\z@{\baselineskip \z@skip +\lineskip \z@skip +\@dashdim #2\unitlength +\@dashcnt \@dashdim \advance\@dashcnt 200 +\@dashdim #1\unitlength\divide\@dashcnt \@dashdim +\ifodd\@dashcnt\@dashdim \z@ +\advance\@dashcnt \@ne \divide\@dashcnt \tw@ +\else \divide\@dashdim \tw@ \divide\@dashcnt \tw@ +\advance\@dashcnt \m@ne +\setbox\@dashbox \hbox{% + \vrule \@height \@halfwidth \@depth \@halfwidth + \@width \@dashdim}\put(0,0){\copy\@dashbox}% +\put(0,#3){\copy\@dashbox}% +\put(#2,0){\hskip-\@dashdim\copy\@dashbox}% +\put(#2,#3){\hskip-\@dashdim\box\@dashbox}% +\multiply\@dashdim \thr@@ +\fi +\setbox\@dashbox \hbox{% + \vrule \@height \@halfwidth \@depth \@halfwidth + \@width #1\unitlength\hskip #1\unitlength}\@tempcnta\z@ +\put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt +\do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@ +\put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt +\do{\copy\@dashbox\advance\@tempcnta \@ne }}% +\@dashdim #3\unitlength +\@dashcnt \@dashdim \advance\@dashcnt 200 +\@dashdim #1\unitlength\divide\@dashcnt \@dashdim +\ifodd\@dashcnt \@dashdim \z@ +\advance\@dashcnt \@ne \divide\@dashcnt \tw@ +\else +\divide\@dashdim \tw@ \divide\@dashcnt \tw@ +\advance\@dashcnt \m@ne +\setbox\@dashbox\hbox{\hskip -\@halfwidth +\vrule \@width \@wholewidth +\@height \@dashdim}\put(0,0){\copy\@dashbox}% +\put(#2,0){\copy\@dashbox}% +\put(0,#3){\lower\@dashdim\copy\@dashbox}% +\put(#2,#3){\lower\@dashdim\copy\@dashbox}% +\multiply\@dashdim \thr@@ +\fi +\setbox\@dashbox\hbox{\vrule \@width \@wholewidth +\@height #1\unitlength}\@tempcnta\z@ +\put(0,0){% + \hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt + \do{\vskip #1\unitlength\copy\@dashbox + \advance\@tempcnta\@ne }% + \vskip\@dashdim}}\@tempcnta\z@ +\put(#2,0){% + \hskip -\@halfwidth \vbox{\@whilenum \@tempcnta<\@dashcnt + \do{\vskip #1\unitlength\copy\@dashbox + \advance\@tempcnta \@ne }% + \vskip\@dashdim}}}\@makepicbox(#2,#3)} +\EndIncludeInRelease +\IncludeInRelease{2016/03/31}% + {\@ovhlinetrue}% + {Avoid almost zero length leaders}% +\newif\if@ovvline \@ovvlinetrue +\newif\if@ovhline \@ovhlinetrue +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@ovhlinetrue}% + {Avoid almost zero length leaders}% +\let\if@ovvline\@undefined +\let\if@ovhline\@undefined +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@oval}{default units}% +\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}% + \@defaultunitsset\@ovxx{#1}\unitlength + \@defaultunitsset\@ovyy{#2}\unitlength + \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx \@ovvlinetrue + \else \@ovyy \ifdim \@ovyy =\@ovxx \else \@ovhlinetrue \fi\fi + \advance \@tempdimb -2\p@ + \@getcirc \@tempdimb + \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa + \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@ + \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@ + \ifdim \@ovdx >\z@ \@ovhlinetrue \fi + \ifdim \@ovdy >\z@ \@ovvlinetrue \fi + \@circlefnt \setbox\@tempboxa \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi \if@ovl \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx \fi \if@ovt \@ovhorz \kern -\@ovxx \fi @@ -909,27 +2668,39 @@ of this package available from CTAN} \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@ \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}% \endgroup} -\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 - \if@ovvline \leaders\vrule \@width \@wholewidth \fi - \vfil \nointerlineskip - \if@ovt \@tempcntb \@tempcnta \advance \@tempcntb #2\relax - \hbox{\char \@tempcntb}% - \else \kern \@ovdy \kern \@ovro \fi}} -\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}} +\EndIncludeInRelease +\IncludeInRelease{2016/03/31}% + {\@oval}{default units}% +\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}% + \@ovxx #1\unitlength + \@ovyy #2\unitlength + \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx \@ovvlinetrue + \else \@ovyy \ifdim \@ovyy =\@ovxx \else \@ovhlinetrue + \fi\fi + \advance \@tempdimb -2\p@ + \@getcirc \@tempdimb + \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa + \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@ + \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@ + \ifdim \@ovdx >\z@ \@ovhlinetrue \fi + \ifdim \@ovdy >\z@ \@ovvlinetrue \fi + \@circlefnt \setbox\@tempboxa + \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi + \if@ovl + \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx + \fi + \if@ovt \@ovhorz \kern -\@ovxx \fi + \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro + \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@ + \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}% + \endgroup} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% - {\@ovhlinetrue}% - {Avoid almost zero length leaders}% -\let\if@ovvline\@undefined -\let\if@ovhline\@undefined + {\@oval}{default units}% \def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue \@tfor\reserved@a :=#3\do @@ -952,6 +2723,21 @@ of this package available from CTAN} \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@ \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}% \endgroup} +\EndIncludeInRelease +\IncludeInRelease{2016/03/31}% + {\@ovvert}{Avoid almost zero length leaders}% +\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 + \if@ovvline \leaders\vrule \@width \@wholewidth \fi + \vfil \nointerlineskip + \if@ovt \@tempcntb \@tempcnta \advance \@tempcntb #2\relax + \hbox{\char \@tempcntb}% + \else \kern \@ovdy \kern \@ovro \fi}} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@ovvert}{Avoid almost zero length leaders}% \def\@ovvert#1#2{\vbox to\@ovyy{% \if@ovb \@tempcntb \@tempcnta \advance \@tempcntb #1\relax \kern -\@ovro \hbox{\char \@tempcntb}\nointerlineskip @@ -960,12 +2746,181 @@ of this package available from CTAN} \if@ovt \@tempcntb \@tempcnta \advance \@tempcntb #2\relax \hbox{\char \@tempcntb}% \else \kern \@ovdy \kern \@ovro \fi}} +\EndIncludeInRelease +\IncludeInRelease{2016/03/31}% + {\@ovhorz}{Avoid almost zero length leaders}% +\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}} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@ovhorz}{Avoid almost zero length leaders}% \def\@ovhorz{\hb@xt@\@ovxx{\kern \@ovro \if@ovr \else \kern \@ovdx \fi \leaders \hrule \@height \@wholewidth \hfil \if@ovl \else \kern \@ovdx \fi \kern \@ovri}} \EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@circle}{default units}% +\def\@circle#1{% + \begingroup \boxmaxdepth \maxdimen + \@defaultunitsset\@tempdimb{#1}\unitlength + \ifdim \@tempdimb >15.5\p@ \@getcirc\@tempdimb + \@ovro\ht\@tempboxa + \setbox\@tempboxa\hbox{\@circlefnt + \advance\@tempcnta\tw@ \char \@tempcnta + \advance\@tempcnta\m@ne \char \@tempcnta \kern -2\@tempdima + \advance\@tempcnta\tw@ + \raise \@tempdima \hbox{\char\@tempcnta}\raise \@tempdima + \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@ + \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}% + \else \@circ\@tempdimb{96}\fi\endgroup} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@circle}{default units}% +\def\@circle#1{% + \begingroup \boxmaxdepth \maxdimen \@tempdimb #1\unitlength + \ifdim \@tempdimb >15.5\p@ \@getcirc\@tempdimb + \@ovro\ht\@tempboxa + \setbox\@tempboxa\hbox{\@circlefnt + \advance\@tempcnta\tw@ \char \@tempcnta + \advance\@tempcnta\m@ne \char \@tempcnta + \kern -2\@tempdima + \advance\@tempcnta\tw@ + \raise \@tempdima \hbox{\char\@tempcnta}% + \raise \@tempdima + \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@ + \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}% + \else \@circ\@tempdimb{96}\fi\endgroup} +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@dot}{default units}% +\def\@dot#1{% + \@defaultunitsset\@tempdimb{#1}\unitlength + \@circ\@tempdimb{112}} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@dot}{default units}% +\def\@dot#1{\@tempdimb #1\unitlength \@circ\@tempdimb{112}} +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@bezier}{default units}% +\def\@bezier#1(#2,#3)(#4,#5)(#6,#7){% + \ifnum #1=\z@ + \@defaultunitsset\@ovxx{#4}\unitlength + \@defaultunitsset{\advance\@ovxx}{-#2}\unitlength + \ifdim \@ovxx<\z@ \@ovxx -\@ovxx \fi + \@defaultunitsset\@ovdx{#6}\unitlength + \@defaultunitsset{\advance\@ovdx}{-#4}\unitlength + \ifdim \@ovdx<\z@ \@ovdx -\@ovdx \fi + \ifdim \@ovxx<\@ovdx \@ovxx \@ovdx \fi + \@defaultunitsset\@ovyy{#5}\unitlength + \@defaultunitsset{\advance\@ovyy}{-#3}\unitlength + \ifdim \@ovyy<\z@ \@ovyy -\@ovyy \fi + \@defaultunitsset\@ovdy{#7}\unitlength + \@defaultunitsset{\advance\@ovdy}{-#5}\unitlength + \ifdim \@ovdy<\z@ \@ovdy -\@ovdy \fi + \ifdim \@ovyy<\@ovdy \@ovyy \@ovdy \fi + \@multicnt + \ifdim \@ovxx>\@ovyy \@ovxx \else \@ovyy \fi + \@ovxx .5\@halfwidth \divide\@multicnt\@ovxx + \ifnum \qbeziermax<\@multicnt + \@multicnt\qbeziermax\relax + \fi + \else \@multicnt#1\relax \fi + \@tempcnta\@multicnt \advance\@tempcnta\@ne + \@defaultunitsset\@ovdx{#4}\unitlength + \@defaultunitsset{\advance\@ovdx}{-#2}\unitlength + \multiply\@ovdx \tw@ + \@defaultunitsset\@ovxx{#6}\unitlength + \@defaultunitsset{\advance\@ovxx}{-#2}\unitlength + \advance\@ovxx -\@ovdx \divide\@ovxx\@multicnt + \@defaultunitsset\@ovdy{#5}\unitlength + \@defaultunitsset{\advance\@ovdy}{-#3}\unitlength + \multiply\@ovdy \tw@ + \@defaultunitsset\@ovyy{#7}\unitlength + \@defaultunitsset{\advance\@ovyy}{-#3}\unitlength + \advance\@ovyy -\@ovdy \divide\@ovyy\@multicnt + \setbox\@tempboxa\hbox{% + \hskip -\@halfwidth + \vrule \@height\@halfwidth + \@depth \@halfwidth + \@width \@wholewidth}% + \put(#2,#3){% + \count@\z@ + \@whilenum{\count@<\@tempcnta}\do + {\@xdim\count@\@ovxx + \advance\@xdim\@ovdx + \divide\@xdim\@multicnt + \multiply\@xdim\count@ + \@ydim\count@\@ovyy + \advance\@ydim\@ovdy + \divide\@ydim\@multicnt + \multiply\@ydim\count@ + \raise \@ydim + \hb@xt@\z@{\kern\@xdim + \unhcopy\@tempboxa\hss}% + \advance\count@\@ne}}} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@bezier}{default units}% +\def\@bezier#1(#2,#3)(#4,#5)(#6,#7){% + \ifnum #1=\z@ + \@ovxx #4\unitlength + \advance\@ovxx -#2\unitlength + \ifdim \@ovxx<\z@ \@ovxx -\@ovxx \fi + \@ovdx #6\unitlength + \advance\@ovdx -#4\unitlength + \ifdim \@ovdx<\z@ \@ovdx -\@ovdx \fi + \ifdim \@ovxx<\@ovdx \@ovxx \@ovdx \fi + \@ovyy #5\unitlength + \advance\@ovyy -#3\unitlength + \ifdim \@ovyy<\z@ \@ovyy -\@ovyy \fi + \@ovdy #7\unitlength + \advance\@ovdy -#5\unitlength + \ifdim \@ovdy<\z@ \@ovdy -\@ovdy \fi + \ifdim \@ovyy<\@ovdy \@ovyy \@ovdy \fi + \@multicnt + \ifdim \@ovxx>\@ovyy \@ovxx \else \@ovyy \fi + \@ovxx .5\@halfwidth \divide\@multicnt\@ovxx + \ifnum + \qbeziermax<\@multicnt \@multicnt\qbeziermax\relax + \fi + \else \@multicnt#1\relax \fi + \@tempcnta\@multicnt \advance\@tempcnta\@ne + \@ovdx #4\unitlength \advance\@ovdx -#2\unitlength + \multiply\@ovdx \tw@ + \@ovxx #6\unitlength \advance\@ovxx -#2\unitlength + \advance\@ovxx -\@ovdx \divide\@ovxx\@multicnt + \@ovdy #5\unitlength \advance\@ovdy -#3\unitlength + \multiply\@ovdy \tw@ + \@ovyy #7\unitlength \advance\@ovyy -#3\unitlength + \advance\@ovyy -\@ovdy \divide\@ovyy\@multicnt + \setbox\@tempboxa\hbox{% + \hskip -\@halfwidth + \vrule \@height\@halfwidth + \@depth \@halfwidth + \@width \@wholewidth}% + \put(#2,#3){% + \count@\z@ + \@whilenum{\count@<\@tempcnta}\do + {\@xdim\count@\@ovxx + \advance\@xdim\@ovdx + \divide\@xdim\@multicnt + \multiply\@xdim\count@ + \@ydim\count@\@ovyy + \advance\@ydim\@ovdy + \divide\@ydim\@multicnt + \multiply\@ydim\count@ + \raise \@ydim + \hb@xt@\z@{\kern\@xdim + \unhcopy\@tempboxa\hss}% + \advance\count@\@ne}}} +\EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\bezier}{Make commands robust}% \MakeRobust\bezier @@ -1003,8 +2958,8 @@ of this package available from CTAN} \IncludeInRelease{2019/10/01}% {\title}{Make commands robust}% \DeclareRobustCommand\title[1]{\gdef\@title{#1}} -\DeclareRobustCommand\author[1]{\gdef\@author{#1}} -\DeclareRobustCommand\date[1]{\gdef\@date{#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}}% @@ -1023,12 +2978,18 @@ of this package available from CTAN} \kernel@make@fragile\thanks \kernel@make@fragile\and +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\addcontentsline}{fourth argument}% +\def\addcontentsline#1#2#3{% + \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}{}% + \protected@file@percent}} \EndIncludeInRelease \IncludeInRelease{2018/12/01}% {\addcontentsline}{Mask line endings}% -\def\addcontentsline#1#2#3{% + \def\addcontentsline#1#2#3{% \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}% - \protected@file@percent}} + \protected@file@percent}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\addcontentsline}{Mask line endings}% @@ -1081,8 +3042,81 @@ of this package available from CTAN} \let\noprotrusion\@undefined \EndIncludeInRelease %%% From File: ltfiles.dtx +\IncludeInRelease{2020/10/01}% + {\document}{Added hook to load l3backend code}% +\def\document{% + \UseOneTimeHook{begindocument/before}% + \@kernel@after@begindocument@before + \@expl@sys@load@backend@@ + \ifx\@unusedoptionlist\@empty\else + \@latex@warning@no@line{Unused global option(s):^^J% + \@spaces[\@unusedoptionlist]}% + \fi + \@colht\textheight + \@colroom\textheight \vsize\textheight + \columnwidth\textwidth + \@clubpenalty\clubpenalty + \if@twocolumn + \advance\columnwidth -\columnsep + \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue + \fi + \hsize\columnwidth \linewidth\hsize + \begingroup\@floatplacement\@dblfloatplacement + \makeatletter\let\@writefile\@gobbletwo + \global \let \@multiplelabels \relax + \@input{\jobname.aux}% + \endgroup + \if@filesw + \immediate\openout\@mainaux\jobname.aux + \immediate\write\@mainaux{\relax}% + \fi + \process@table + \let\glb@currsize\@empty % Force math initialization. + \normalsize + \everypar{}% + \ifx\normalsfcodes\@empty + \ifnum\sfcode`\.=\@m + \let\normalsfcodes\frenchspacing + \else + \let\normalsfcodes\nonfrenchspacing + \fi + \fi + \ifx\document@default@language\m@ne + \chardef\document@default@language\language + \fi + \@noskipsecfalse + \let \@refundefined \relax + \@kernel@before@begindocument + \UseOneTimeHook{begindocument}% + \@kernel@after@begindocument + \ifdim\topskip<1sp\global\topskip 1sp\relax\fi + \global\@maxdepth\maxdepth + \global\let\@begindocumenthook\@undefined + \ifx\@listfiles\@undefined + \global\let\@filelist\relax + \global\let\@addtofilelist\@gobble + \fi + \gdef\do##1{\global\let ##1\@notprerr}% + \@preamblecmds + \global\let \@nodocument \relax + \global\let\do\noexpand + \UseOneTimeHook{begindocument/end}% + \ignorespaces} +\NewHook{begindocument} +\NewHook{begindocument/before} +\NewHook{begindocument/end} + +\edef \@kernel@after@begindocument@before {% + \let\expandafter\noexpand\csname + __hook env/document/begin\endcsname + \noexpand\@empty} +\let \@kernel@before@begindocument \@empty +\let \@kernel@after@begindocument \@empty + +\EndIncludeInRelease \IncludeInRelease{2017/04/15}% {\document}{Save language for hyphenation}% + \def\document{\endgroup \ifx\@unusedoptionlist\@empty\else \@latex@warning@no@line{Unused global option(s):^^J% @@ -1137,6 +3171,7 @@ of this package available from CTAN} \global\let\do\noexpand \ignorespaces} \EndIncludeInRelease + \IncludeInRelease{0000/00/00}% {\document}{Save language for hyphenation} \def\document{\endgroup @@ -1191,21 +3226,62 @@ of this package available from CTAN} \global\let\do\noexpand \ignorespaces} \EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\includeonly}{Spaces in file names}% +\def\include#1{\relax + \ifnum\@auxout=\@partaux + \@latex@error{\string\include\space cannot be nested}\@eha + \else + \set@curr@file{#1}% + \edef\@curr@file{\@strip@tex@ext\@curr@file}% + \expandafter\@include\expandafter{\@curr@file} % deliberate space + \fi} +\def\includeonly#1{% + \@partswtrue + \let\@partlist\@empty + \@for\reserved@a:=#1 \do + {% + \expandafter\set@curr@file\expandafter{\reserved@a}% + \ifx\@partlist\@empty + \edef\@partlist{\@strip@tex@ext\@curr@file}% + \else + \edef\@partlist{\@partlist,\@strip@tex@ext\@curr@file}% + \fi + }% + } +\@onlypreamble\includeonly +\def\reserved@a#1{% +\def\@strip@tex@ext##1{% + \expandafter\@strip@tex@ext@aux + ##1\@nil\@nil + #1\@nil\relax\@nnil} +\def\@strip@tex@ext@aux##1#1\@nil##2\@nnil{% + \ifx\relax##2\@empty + \expandafter\@cdr\expandafter\@empty\@cdr{}##1% + \else##1\fi}}% +\expandafter\reserved@a +\expandafter{\detokenize{.tex}} +\EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\includeonly}{Spaces in file names}% + \def\includeonly#1{% \@partswtrue \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 - \set@curr@file{#1 }% - \expandafter\@include\@curr@file + \set@curr@file{#1 }% + \expandafter\@include\@curr@file \fi} + +\let\@strip@tex@ext\@undefined +\let\@strip@tex@ext@aux\@undefined + \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\includeonly}{Spaces in file names}% @@ -1218,19 +3294,82 @@ of this package available from CTAN} \@latex@error{\string\include\space cannot be nested}\@eha \else \@include#1 \fi} +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@include}{Spaces in file names and hooks}% +\def\@include#1 {% + \clearpage + \if@filesw + \immediate\write\@mainaux{\string\@input{"#1.aux"}}% + \fi + \@tempswatrue + \if@partsw + \@tempswafalse + \edef\reserved@b{#1}% + \@for\reserved@a:=\@partlist\do + {\ifx\reserved@a\reserved@b\@tempswatrue\fi}% + \fi + \if@tempswa + \let\@auxout\@partaux + \if@filesw + \immediate\openout\@partaux "#1.aux" + \immediate\write\@partaux{\relax}% + \fi + \@filehook@set@CurrentFile + \UseHook{include/before}% + \UseHook{include/before/#1}% + \@input@{#1.tex}% + \UseHook{include/end/#1}% + \UseHook{include/end}% + \clearpage + \UseHook{include/after/#1}% + \UseHook{include/after}% + \clearpage + \@writeckpt{#1}% + \if@filesw + \immediate\closeout\@partaux + \fi + \else + \deadcycles\z@ + \@nameuse{cp@#1}% + \fi + \let\@auxout\@mainaux} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@include}{Spaces in file names}% +\def\@include#1 {% + \clearpage + \if@filesw + \immediate\write\@mainaux{\string\@input{#1.aux}}% + \fi + \@tempswatrue + \if@partsw + \@tempswafalse + \edef\reserved@b{#1}% + \@for\reserved@a:=\@partlist\do + {\ifx\reserved@a\reserved@b\@tempswatrue\fi}% + \fi + \if@tempswa + \let\@auxout\@partaux + \if@filesw + \immediate\openout\@partaux #1.aux + \immediate\write\@partaux{\relax}% + \fi + \@input@{#1.tex}% + \clearpage + \@writeckpt{#1}% + \if@filesw + \immediate\closeout\@partaux + \fi + \else + \deadcycles\z@ + \@nameuse{cp@#1}% + \fi + \let\@auxout\@mainaux} + \EndIncludeInRelease \IncludeInRelease{2019/10/01}% - {\set@curr@file}{Quote file names}% -\def\set@curr@file#1{% - \begingroup - \escapechar\m@ne - \xdef\@curr@file{% - \expandafter\expandafter\expandafter\unquote@name - \expandafter\expandafter\expandafter{% - \expandafter\string - \csname\@firstofone#1\@empty\endcsname}}% - \endgroup -} + {\quote@name}{Quote file names}% \def\quote@name#1{"\quote@@name#1\@gobble""} \def\quote@@name#1"{#1\quote@@name} \def\unquote@name#1{\quote@@name#1\@gobble"} @@ -1265,12 +3404,11 @@ of this package available from CTAN} \reserved@a} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% - {\set@curr@file}{Quote file names}% + {\quote@name}{Quote file names}% \let\quote@name\@undefined \let\quote@@name\@undefined \let\unquote@name\@undefined -\let\set@curr@file\@undefined \let\IfFileExists@\@undefined @@ -1304,24 +3442,29 @@ of this package available from CTAN} \EndIncludeInRelease \IncludeInRelease{2019/10/01}% - {\InputIfFileExists}{Don't lose the file name}% -\DeclareRobustCommand \InputIfFileExists[2]{% - \IfFileExists{#1}% - {% - \expandafter\@swaptwoargs\expandafter - {\@filef@und}{#2\@addtofilelist{#1}\@@input}}} + {\@swaptwoargs}{Don't lose the file name}% \long\def\@swaptwoargs#1#2{#2#1} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% - {\InputIfFileExists}{Don't lose the file name}% -\long\def \InputIfFileExists#1#2{% - \IfFileExists{#1}% - {#2\@addtofilelist{#1}\@@input \@filef@und}} - + {\@swaptwoargs}{Don't lose the file name}% \let\@swaptwoargs\@undefined \EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@iinput}{Change in file error handling}% +\def\@iinput#1{% + \InputIfFileExists{#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 + \edef\reserved@a{\noexpand\@iinput{% + \@missingfile@area\@missingfile@base.\@missingfile@ext}}% + \reserved@a}} +\EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\@iinput}{Quote file names}% + \def\@iinput#1{% \InputIfFileExists{#1}{}% {\filename@parse\@curr@file @@ -1340,6 +3483,65 @@ of this package available from CTAN} {\ifx\filename@ext\relax tex\else\filename@ext\fi}}% \reserved@a}} \EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@missingfileerror}{Do not load missing file immediately}% +\gdef\@missingfileerror#1#2{% + \typeout{^^J! LaTeX Error: File `#1.#2' not found.^^J^^J% + Type X to quit or to proceed,^^J% + or enter new name. (Default extension: #2)^^J}% + \message{Enter file name: }% + {\endlinechar\m@ne + \global\read\m@ne to\@gtempa}% + \ifx\@gtempa\@empty + \let\@missingfile@area\@empty + \let\@missingfile@base\@empty + \def\@missingfile@ext{tex}% + \else + \def\reserved@b{\batchmode\read-1 to \reserved@a}% + \def\reserved@a{x}\ifx\reserved@a\@gtempa\reserved@b\fi + \def\reserved@a{X}\ifx\reserved@a\@gtempa\reserved@b\fi + \filename@parse\@gtempa + \edef\filename@ext{% + \ifx\filename@ext\relax#2\else\filename@ext\fi}% + \edef\reserved@a{% + \noexpand\IfFileExists + {\filename@area\filename@base.\filename@ext}% + {\def\noexpand\@missingfile@area{\filename@area}% + \def\noexpand\@missingfile@base{\filename@base}% + \def\noexpand\@missingfile@ext {\filename@ext}}% + {\noexpand\@missingfileerror + {\filename@area\filename@base}{\filename@ext}}}% + \reserved@a + \fi +} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@missingfileerror}{Do not load missing file immediately}% + +\gdef\@missingfileerror#1#2{% + \typeout{^^J! LaTeX Error: File `#1.#2' not found.^^J^^J% + Type X to quit or to proceed,^^J% + or enter new name. (Default extension: #2)^^J}% + \message{Enter file name: }% + {\endlinechar\m@ne + \global\read\m@ne to\@gtempa}% + \ifx\@gtempa\@empty + \else + \def\reserved@a{x}\ifx\reserved@a\@gtempa\batchmode\@@end\fi + \def\reserved@a{X}\ifx\reserved@a\@gtempa\batchmode\@@end\fi + \filename@parse\@gtempa + \edef\filename@ext{% + \ifx\filename@ext\relax#2\else\filename@ext\fi}% + \edef\reserved@a{% + \noexpand\InputIfFileExists + {\filename@area\filename@base.\filename@ext}% + {}% + {\noexpand\@missingfileerror + {\filename@area\filename@base}{\filename@ext}}}% + \reserved@a + \fi} + +\EndIncludeInRelease %%% From File: ltoutenc.dtx \IncludeInRelease{2017/04/15}{\DeclareTextCompositeCommand} {test for undeclared accent}% @@ -1388,7 +3590,7 @@ of this package available from CTAN} \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\UseTextAccent}{Make commands robust}% -\DeclareRobustCommand\UseTextAccent[3]{% +\DeclareRobustCommand*\UseTextAccent[3]{% \hmode@start@before@group {% \let\hmode@start@before@group\@firstofone @@ -1396,7 +3598,7 @@ of this package available from CTAN} \@use@text@encoding{#1}% #2{\@use@text@encoding\@curr@enc#3}% }} -\DeclareRobustCommand\UseTextSymbol[2]{% +\DeclareRobustCommand*\UseTextSymbol[2]{% \hmode@start@before@group {% \def\@wrong@font@char{\MessageBreak @@ -1777,16 +3979,39 @@ of this package available from CTAN} \@fpbot \@dblfpbot }% \EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@textsuperscript}{superscript baseline}% +\def\@textsuperscript#1{% + {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\sf@size#1}}}}} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@textsuperscript}{superscript baseline}% + +\def\@textsuperscript#1{% + {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\z@#1}}}}} +\EndIncludeInRelease +\IncludeInRelease{2015/01/01}% + {\textsubscript}{\textsubscript}% +\DeclareRobustCommand*\textsubscript[1]{% + \@textsubscript{\selectfont#1}}% +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\textsubscript}{\textsubscript}% +\let\textsubscript\@undefined +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@textsubscript}{subscript baseline}% +\def\@textsubscript#1{% + {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\sf@size#1}}}}} +\EndIncludeInRelease \IncludeInRelease{2015/01/01}% - {\textsubscript}{\textsubscript}% -\DeclareRobustCommand*\textsubscript[1]{% - \@textsubscript{\selectfont#1}}% + {\@textsubscript}{subscript baseline}% + \def\@textsubscript#1{% {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% - {\textsubscript}{\textsubscript}% -\let\textsubscript\@undefined + {\@textsubscript}{subscript baseline}% \let\@textsubscript\@undefined \EndIncludeInRelease %%% From File: ltidxglo.dtx @@ -1794,7 +4019,7 @@ of this package available from CTAN} %%% From File: ltpage.dtx \IncludeInRelease{2019/10/01}% {\markboth}{Make commands robust}% -\DeclareRobustCommand\markboth[2]{% +\DeclareRobustCommand*\markboth[2]{% \begingroup \let\label\relax \let\index\relax \let\glossary\relax \unrestored@protected@xdef\@themark {{#1}{#2}}% @@ -1802,7 +4027,7 @@ of this package available from CTAN} \mark{\the\@temptokena}% \endgroup \if@nobreak\ifvmode\nobreak\fi\fi} -\DeclareRobustCommand\markright[1]{% +\DeclareRobustCommand*\markright[1]{% \begingroup \let\label\relax \let\index\relax \let\glossary\relax \expandafter\@markright\@themark {#1}% @@ -1818,6 +4043,751 @@ of this package available from CTAN} \kernel@make@fragile\markright \EndIncludeInRelease +%% +%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach, +%% Phelype Oleinik & LaTeX Team +%%% From File: ltfilehook.dtx +\providecommand\ltfilehookversion{v1.0b} +\providecommand\ltfilehookdate{2020/09/26} +\IncludeInRelease{2020/10/01}% + {\CurrentFile}{Hook management file}% +\ExplSyntaxOn +\tl_new:N \CurrentFile +\tl_new:N \CurrentFilePath +\tl_new:N \CurrentFileUsed +\tl_new:N \CurrentFilePathUsed +\ExplSyntaxOff +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\CurrentFile}{Hook management file}% + +\let \CurrentFile \@undefined +\let \CurrentFilePath \@undefined +\let \CurrentFileUsed \@undefined +\let \CurrentFilePathUsed \@undefined + +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\__filehook_file_parse_full_name:nN}{File helpers}% +\ExplSyntaxOn +\cs_new:Npn \__filehook_file_parse_full_name:nN #1 + { + \exp_args:Nf \file_parse_full_name_apply:nN + { + \exp_args:Nf \__filehook_full_name:nn + { \file_full_name:n {#1} } {#1} + } + } +\cs_new:Npn \__filehook_full_name:nn #1 #2 + { + \tl_if_empty:nTF {#1} + { \tl_trim_spaces:n {#2} } + { \tl_trim_spaces:n {#1} } + } +\cs_new:Npn \__filehook_if_no_extension:nTF #1 + { + \exp_args:Ne \tl_if_empty:nTF + { \file_parse_full_name_apply:nN {#1} \use_iii:nnn } + } +\cs_new_protected:Npn \__filehook_drop_extension:N #1 + { + \tl_gset:Nx #1 + { + \exp_args:NV \__filehook_file_parse_full_name:nN #1 + \__filehook_drop_extension_aux:nnn + } + } +\cs_new:Npn \__filehook_drop_extension_aux:nnn #1 #2 #3 + { \tl_if_empty:nF {#1} { #1 / } #2 } +\tl_new:N \l__filehook_internal_tl +\seq_new:N \g__filehook_input_file_seq +\cs_new_protected:Npn \__filehook_file_push: + { + \seq_gpush:Nx \g__filehook_input_file_seq + { + { \CurrentFilePathUsed } { \CurrentFileUsed } + { \CurrentFilePath } { \CurrentFile } + } + } +\cs_new_protected:Npn \__filehook_file_pop: + { + \seq_gpop:NNTF \g__filehook_input_file_seq \l__filehook_internal_tl + { \exp_after:wN \__filehook_file_pop_assign:nnnn \l__filehook_internal_tl } + { + \msg_error:nnn { hooks } { should-not-happen } + { Tried~to~pop~from~an~empty~file~name~stack. } + } + } +\cs_new_protected:Npn \__filehook_file_pop_assign:nnnn #1 #2 #3 #4 + { + \tl_set:Nn \CurrentFilePathUsed {#1} + \tl_set:Nn \CurrentFileUsed {#2} + \tl_set:Nn \CurrentFilePath {#3} + \tl_set:Nn \CurrentFile {#4} + } +\ExplSyntaxOff +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\InputIfFileExists}{Hook management (files)}% +\let\InputIfFileExists\@undefined +\DeclareRobustCommand \InputIfFileExists[2]{% + \IfFileExists{#1}% + {% + \@expl@@@filehook@file@push@@ + \@filehook@set@CurrentFile + \edef\reserved@a{\@filef@und + \@expl@@@filehook@file@pop@assign@@nnnn + {\CurrentFilePathUsed}% + {\CurrentFileUsed}% + {\CurrentFilePath}% + {\CurrentFile}}% + \expandafter\@swaptwoargs\expandafter + {\reserved@a}% + {% + #2% + \@addtofilelist{#1}% + \UseHook{file/before}% + \UseHook{file/before/\CurrentFile}% + \@@input + }% + \UseHook{file/after/\CurrentFile}% + \UseHook{file/after}% + \@expl@@@filehook@file@pop@@ + }% +} +\EndIncludeInRelease +\IncludeInRelease{2019/10/01}% + {\InputIfFileExists}{Hook management (files)}% + +\DeclareRobustCommand \InputIfFileExists[2]{% + \IfFileExists{#1}% + {% + \expandafter\@swaptwoargs\expandafter + {\@filef@und}{#2\@addtofilelist{#1}\@@input}}} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\InputIfFileExists}{Hook management (files)}% +\long\def \InputIfFileExists#1#2{% + \IfFileExists{#1}% + {#2\@addtofilelist{#1}\@@input \@filef@und}} +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\__filehook_subst_add:nn}{Declaring file substitution}% +\ExplSyntaxOn +\cs_new_protected:Npn \__filehook_subst_add:nn #1 #2 + { + \group_begin: + \cs_set:cpx { } { \exp_not:o { \cs:w\cs_end: } } + \int_set:Nn \tex_escapechar:D { -1 } + \cs_gset:cpx { @file-subst@ \__filehook_subst_file_normalize:n {#1} } + { \__filehook_subst_file_normalize:n {#2} } + \group_end: + } +\cs_new_protected:Npn \__filehook_subst_remove:n #1 + { + \group_begin: + \cs_set:cpx { } { \exp_not:o { \cs:w\cs_end: } } + \int_set:Nn \tex_escapechar:D { -1 } + \cs_undefine:c { @file-subst@ \__filehook_subst_file_normalize:n {#1} } + \group_end: + } +\cs_new:Npn \__filehook_subst_file_normalize:n #1 + { + \exp_after:wN \__filehook_subst_empty_name_chk:NN + \cs:w \exp_after:wN \cs_end: + \cs:w \__filehook_file_parse_full_name:nN {#1} \use_ii_iii:nnn \cs_end: + } +\cs_new:Npn \__filehook_subst_empty_name_chk:NN #1 #2 + { \if_meaning:w #1 #2 .tex \else: \token_to_str:N #2 \fi: } +\cs_gset:Npn \use_ii_iii:nnn #1 #2 #3 {#2 #3} +\ExplSyntaxOff +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\declare@file@substitution}{File substitution}% +\ExplSyntaxOn +\cs_new_eq:NN \declare@file@substitution \__filehook_subst_add:nn +\cs_new_eq:NN \undeclare@file@substitution \__filehook_subst_remove:n +\ExplSyntaxOff +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\declare@file@substitution}{File substitution}% + +\let \declare@file@substitution \@undefined +\let \undeclare@file@substitution \@undefined + +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\set@curr@file}{Setting current file name}% +\def\set@curr@file#1{% + \begingroup + \escapechar\m@ne + \expandafter\def\csname\expandafter\endcsname + \expandafter{\csname\endcsname}% + \@expl@@@filehook@if@no@extension@@nTF{#1}% + {\@tempswatrue}{\@tempswafalse}% + \@kernel@make@file@csname\@curr@file + \@expl@@@filehook@resolve@file@subst@@w {#1}% + \@expl@@@filehook@if@file@replaced@@TF + {\@kernel@make@file@csname\@curr@file@reqd + \@expl@@@filehook@normalize@file@name@@w{#1}% + \if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file@reqd \fi}% + {\if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file \fi + \global\let\@curr@file@reqd\@curr@file}% + \endgroup} +\EndIncludeInRelease +\IncludeInRelease{2019/10/01}% + {\set@curr@file}{Setting current file name}% +\def\set@curr@file#1{% + \begingroup + \escapechar\m@ne + \xdef\@curr@file{% + \expandafter\expandafter\expandafter\unquote@name + \expandafter\expandafter\expandafter{% + \expandafter\string + \csname\@firstofone#1\@empty\endcsname}}% + \endgroup +} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\set@curr@file}{Setting current file name}% +\let\set@curr@file\@undefined +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@kernel@make@file@csname}{Make file csname}% +\def\@kernel@make@file@csname#1#2#3{% + \xdef#1{\expandafter\@set@curr@file@aux + \csname\expandafter#2\@firstofone#3\@nil\endcsname}} +\def\@set@curr@file@aux#1{% + \expandafter\ifx\csname\endcsname#1% + .tex\else\string#1\fi} +\def\@filehook@set@CurrentFile{% + \@expl@@@filehook@set@curr@file@@N{\@curr@file}% + \CurrentFileUsed\CurrentFilePathUsed + \ifx\@curr@file@reqd\@curr@file + \let\CurrentFile\CurrentFileUsed + \let\CurrentFilePath\CurrentFilePathUsed + \else + \@expl@@@filehook@set@curr@file@@N{\@curr@file@reqd}% + \CurrentFile\CurrentFilePath + \fi} +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {@@_set_curr_file:N}{Set curr file}% +\ExplSyntaxOn +\cs_new_protected:Npn \__filehook_set_curr_file:N #1 + { \exp_args:NV \__filehook_set_curr_file:nNN #1 } +\cs_new_protected:Npn \__filehook_set_curr_file:nNN #1 + { + \__filehook_file_parse_full_name:nN {#1} + \__filehook_set_curr_file_assign:nnnNN + } +\cs_new_protected:Npn \__filehook_set_curr_file_assign:nnnNN #1 #2 #3 #4 #5 + { + \str_set:Nn #5 {#1} + \str_set:Nn #4 {#2#3} + } +\ExplSyntaxOff +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\__filehook_resolve_file_subst:w}{Replace files detect loops}% +\ExplSyntaxOn +\cs_new:Npn \__filehook_resolve_file_subst:w #1 \@nil + { \__filehook_file_parse_full_name:nN {#1} \__filehook_file_subst_begin:nnn } +\cs_new:Npn \__filehook_normalize_file_name:w #1 \@nil + { \__filehook_file_parse_full_name:nN {#1} \__filehook_file_name_compose:nnn } +\cs_new:Npn \__filehook_file_name_compose:nnn #1 #2 #3 + { \tl_if_empty:nF {#1} { #1 / } #2#3 } +\flag_new:n { __filehook_file_replaced } +\cs_new:Npn \__filehook_if_file_replaced:TF #1 #2 + { \flag_if_raised:nTF { __filehook_file_replaced } {#1} {#2} } +\cs_new:Npn \__filehook_file_subst_begin:nnn #1 #2 #3 + { + \__filehook_file_subst_tortoise_hare:nn { #2#3 } { #2#3 } + { \__filehook_file_name_compose:nnn {#1} {#2} {#3} } + } +\ExplSyntaxOff +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\__filehook_file_subst_tortoise_hare:nn}{Tortoise and Hare}% +\ExplSyntaxOn +\cs_new:Npn \__filehook_file_subst_tortoise_hare:nn #1 #2 #3 + { + \cs_if_exist:cTF { @file-subst@ #2 } + { + \flag_if_raised:nF { __filehook_file_replaced } + { \flag_raise:n { __filehook_file_replaced } } + \cs_if_exist:cTF { @file-subst@ \use:c { @file-subst@ #2 } } + { + \__filehook_file_subst_loop:cc + { @file-subst@ #1 } + { @file-subst@ \use:c { @file-subst@ #2 } } + } + { \use:c { @file-subst@ #2 } } + } + { #3 } + } +\cs_new:Npn \__filehook_file_subst_loop:NN #1 #2 + { + \token_if_eq_meaning:NNTF #1 #2 + { + .tex + \__filehook_file_subst_cycle_error:cN { @file-subst@ #1 } #1 + } + { \__filehook_file_subst_tortoise_hare:nn {#1} {#2} {#2} } + } +\cs_generate_variant:Nn \__filehook_file_subst_loop:NN { cc } +\cs_new:Npn \__filehook_file_subst_cycle_error:NN #1 #2 + { + \__kernel_msg_expandable_error:nnff { kernel } { file-cycle } + {#1} { \use:c { @file-subst@ #1 } } + \token_if_eq_meaning:NNF #1 #2 + { \__filehook_file_subst_cycle_error:cN { @file-subst@ #1 } #2 } + } +\cs_generate_variant:Nn \__filehook_file_subst_cycle_error:NN { c } +\__kernel_msg_new:nnn { kernel } { file-cycle } + { File~loop!~#1~replaced~by~#2... } +\ExplSyntaxOff +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\disable@package@load}{Disable packages}% +\def\disable@package@load#1#2{% + \global\@namedef{@pkg-disable@#1.\@pkgextension}{#2}} +\def\@disable@packageload@do#1#2{% + \@ifundefined{@pkg-disable@#1}{#2}% + {\@nameuse{@pkg-disable@#1}}} +\def\reenable@package@load#1{% + \global\expandafter\let + \csname @pkg-disable@#1.\@pkgextension \endcsname \@undefined} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\disable@package@load}{Disable packages}% + +\let\disable@package@load \@undefined +\let\@disable@packageload@do\@undefined +\let\reenable@package@load \@undefined +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@expl@@@filehook@if@no@extension@@nTF}{2e tmp interfaces}% +\ExplSyntaxOn +\cs_new_eq:NN \@expl@@@filehook@if@no@extension@@nTF + \__filehook_if_no_extension:nTF +\cs_new_eq:NN \@expl@@@filehook@set@curr@file@@N + \__filehook_set_curr_file:N +\cs_new_eq:NN \@expl@@@filehook@resolve@file@subst@@w + \__filehook_resolve_file_subst:w +\cs_new_eq:NN \@expl@@@filehook@normalize@file@name@@w + \__filehook_normalize_file_name:w +\cs_new_eq:NN \@expl@@@filehook@if@file@replaced@@TF + \__filehook_if_file_replaced:TF + +\cs_new_eq:NN \@expl@@@filehook@drop@extension@@N + \__filehook_drop_extension:N +\cs_new_eq:NN \@expl@@@filehook@file@push@@ + \__filehook_file_push: +\cs_new_eq:NN \@expl@@@filehook@file@pop@@ + \__filehook_file_pop: +\cs_new_eq:NN \@expl@@@filehook@file@pop@assign@@nnnn + \__filehook_file_pop_assign:nnnn +\ExplSyntaxOff +\EndIncludeInRelease +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% +%% File: ltshipout.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team +%% +%%% From File: ltshipout.dtx +\providecommand\ltshipoutversion{v1.0c} +\providecommand\ltshipoutdate{2020/09/27} +\IncludeInRelease{2020/10/01}% + {\shipout}{Hook mangement (shipout)}% +\ExplSyntaxOn +\bool_new:N \g__shipout_debug_bool +\cs_new_eq:NN \__shipout_debug:n \use_none:n +\cs_new_protected:Npn \shipout_debug_on: + { + \bool_gset_true:N \g__shipout_debug_bool + \__shipout_debug_gset: + } +\cs_new_protected:Npn \shipout_debug_off: + { + \bool_gset_false:N \g__shipout_debug_bool + \__shipout_debug_gset: + } +\cs_new_protected:Npn \__shipout_debug_gset: + { + \cs_gset_protected:Npx \__shipout_debug:n ##1 + { \bool_if:NT \g__shipout_debug_bool {##1} } + } +\box_new:N \l_shipout_box +\cs_set_eq:NN \ShipoutBox \l_shipout_box +\cs_set_protected:Npn \__shipout_execute: { + \tl_set:Nx \l__shipout_group_level_tl + { \int_value:w \tex_currentgrouplevel:D } + \tex_afterassignment:D \__shipout_execute_test_level: + \tex_setbox:D \l_shipout_box +} +\cs_gset_eq:NN \shipout \__shipout_execute: +\tl_new:N \l__shipout_group_level_tl +\cs_new:Npn \__shipout_execute_test_level: { + \int_compare:nNnT + \l__shipout_group_level_tl < \tex_currentgrouplevel:D + \tex_aftergroup:D + \__shipout_execute_cont: +} +\cs_new:Npn \__shipout_execute_cont: { + \box_if_empty:NTF \l_shipout_box + { \PackageWarning{ltshipout}{Ignoring~ void~ shipout~ box} } + { + \bool_gset_false:N \g__shipout_discard_bool + \cs_set_eq:NN \__shipout_saved_protect: \protect + \set@typeset@protect + \__shipout_get_box_size:N \l_shipout_box + \hook_use:n {shipout/before} + \int_gincr:N \g_shipout_totalpages_int + \bool_if:NTF \g__shipout_discard_bool + { \PackageInfo{ltshipout}{Completed~ page~ discarded} + \bool_gset_false:N \g__shipout_discard_bool + \tex_deadcycles:D \c_zero_int + } + { \box_if_empty:NTF \l_shipout_box + { \PackageWarning{ltshipout}{ + Shipout~ box~ was~ voided~ by~ hook,\MessageBreak + ignoring~ shipout~ box } + } + { + \int_gincr:N \g_shipout_readonly_int + \__shipout_debug:n { + \typeout{Absolute~ page~ =~ \int_use:N \g_shipout_readonly_int + \space (target:~ \@abspage@last)} + } + \__shipout_get_box_size:N \l_shipout_box + \hook_if_empty:nF {shipout/foreground} + { \__shipout_add_foreground_picture:n + { \hook_use:n {shipout/foreground} } } + \hook_if_empty:nF {shipout/background} + { \__shipout_add_background_picture:n + { \@kernel@before@shipout@background + \hook_use:n {shipout/background} } } + \__shipout_execute_firstpage_hook: + \int_compare:nNnT \@abspage@last = \g_shipout_readonly_int + { \hook_if_empty:nF {shipout/lastpage} + { \__shipout_debug:n { \typeout{Executing~ lastpage~ hook~ + on~ page~ \int_use:N \g_shipout_readonly_int } } + \__shipout_add_foreground_box:n { \UseHook{shipout/lastpage} + \@kernel@after@shipout@lastpage } + } + \bool_gset_true:N \g__shipout_lastpage_handled_bool + } + \cs_set_eq:NN \protect \exp_not:N + \tex_shipout:D \box_use:N \l_shipout_box + } + } + \cs_set_eq:NN \protect \__shipout_saved_protect: + } +} +\cs_new_eq:NN \__shipout_saved_protect: \protect +\hook_new:n{shipout/before} +\hook_new:n{shipout/foreground} +\hook_new:n{shipout/background} +\hook_new:n{shipout/firstpage} +\hook_new:n{shipout/lastpage} +\let\@kernel@after@shipout@lastpage\@empty +\let\@kernel@before@shipout@background\@empty +\cs_new:Npn \__shipout_execute_firstpage_hook: { + \hook_if_empty:nF {shipout/firstpage} + { \__shipout_add_background_box:n { \UseHook{shipout/firstpage} } } + \cs_gset_eq:NN \__shipout_execute_firstpage_hook: \prg_do_nothing: + \cs_gset:Npn \__shipout_add_firstpage_material:Nn ##1 ##2 { + \@latex@warning{ + First~ page~ is~ already~ shipped~ out,~ ignoring\MessageBreak + \string##1 } + } +} +\bool_new:N \g__shipout_lastpage_handled_bool +\cs_new:Npn \__shipout_add_firstpage_material:Nn #1#2 { + \AddToHook{shipout/firstpage}{#2} +} +\cs_new:Npn \__shipout_get_box_size:N #1 { + \dim_set:Nn \l_shipout_box_ht_dim { \box_ht:N #1 } + \dim_set:Nn \l_shipout_box_dp_dim { \box_dp:N #1 } + \dim_set:Nn \l_shipout_box_wd_dim { \box_wd:N #1 } + \dim_set:Nn \l_shipout_box_ht_plus_dp_dim { \l_shipout_box_ht_dim + + \l_shipout_box_dp_dim } +} +\dim_new:N \l_shipout_box_ht_dim +\dim_new:N \l_shipout_box_dp_dim +\dim_new:N \l_shipout_box_wd_dim +\dim_new:N \l_shipout_box_ht_plus_dp_dim +\bool_new:N \g__shipout_discard_bool +\box_new:N \l__shipout_tmp_box +\tl_new:N \l__shipout_saved_badness_tl +\cs_new:Npn \__shipout_add_background_box:n #1 +{ \__shipout_get_box_size:N \l_shipout_box + \box_if_vertical:NTF \l_shipout_box + { + \tl_set:Nx \l__shipout_saved_badness_tl + { \vfuzz=\the\vfuzz\relax + \vbadness=\the\vbadness\relax } + \vfuzz=\c_max_dim + \vbadness=\c_max_int + \vbox_set_to_ht:Nnn \l_shipout_box \l_shipout_box_ht_plus_dp_dim + { + \hbox_set:Nn \l__shipout_tmp_box + { \l__shipout_saved_badness_tl #1 } + \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim + \skip_zero:N \baselineskip + \skip_zero:N \lineskip + \skip_zero:N \lineskiplimit + \box_use:N \l__shipout_tmp_box + \vbox_unpack:N \l_shipout_box + \kern \c_zero_dim + } + \box_set_ht:Nn \l_shipout_box \l_shipout_box_ht_dim + \box_set_dp:Nn \l_shipout_box \l_shipout_box_dp_dim + \l__shipout_saved_badness_tl + } + { + \box_if_horizontal:NT \l_shipout_box + { + \tl_set:Nx \l__shipout_saved_badness_tl + { \hfuzz=\the\hfuzz\relax + \hbadness=\the\hbadness\relax } + \hfuzz=\c_max_dim + \hbadness=\c_max_int + \hbox_set_to_wd:Nnn \l_shipout_box \l_shipout_box_wd_dim + { + \hbox_set:Nn \l__shipout_tmp_box + { \l__shipout_saved_badness_tl #1 } + \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim + \box_move_up:nn + \l_shipout_box_ht_dim + { \box_use:N \l__shipout_tmp_box } + \hbox_unpack:N \l_shipout_box + } + \l__shipout_saved_badness_tl + } + } +} +\cs_new:Npn \__shipout_add_foreground_box:n #1 +{ + \box_if_vertical:NTF \l_shipout_box + { + \tl_set:Nx \l__shipout_saved_badness_tl + { \vfuzz=\the\vfuzz\relax + \vbadness=\the\vbadness\relax } + \vfuzz=\c_max_dim + \vbadness=\c_max_int + \vbox_set_to_ht:Nnn \l_shipout_box \l_shipout_box_ht_plus_dp_dim + { + \hbox_set:Nn \l__shipout_tmp_box + { \l__shipout_saved_badness_tl #1 } + \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim + \skip_zero:N \baselineskip + \skip_zero:N \lineskip + \skip_zero:N \lineskiplimit + \vbox_unpack:N \l_shipout_box + \kern -\l_shipout_box_ht_plus_dp_dim + \box_use:N \l__shipout_tmp_box + \kern \l_shipout_box_ht_plus_dp_dim + } + \l__shipout_saved_badness_tl + \box_set_ht:Nn \l_shipout_box \l_shipout_box_ht_dim + \box_set_dp:Nn \l_shipout_box \l_shipout_box_dp_dim + } + { + \box_if_horizontal:NT \l_shipout_box + { + \tl_set:Nx \l__shipout_saved_badness_tl + { \hfuzz=\the\hfuzz\relax + \hbadness=\the\hbadness\relax } + \hfuzz=\c_max_dim + \hbadness=\c_max_int + \hbox_set_to_wd:Nnn \l_shipout_box \l_shipout_box_wd_dim + { + \hbox_unpack:N \l_shipout_box + \kern -\box_wd:N \l_shipout_box + \hbox_set:Nn \l__shipout_tmp_box + { \l__shipout_saved_badness_tl #1 } + \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim + \box_move_up:nn { \box_ht:N \l_shipout_box } + { \box_use:N \l__shipout_tmp_box } + \kern \box_wd:N \l_shipout_box + }% + \l__shipout_saved_badness_tl + } + } +} +\cs_new:Npn \__shipout_init_page_origins: { + \tl_const:Nx \c__shipout_horigin_tl + { + \cs_if_exist_use:NTF \pdfvariable { horigin } + { \cs_if_exist_use:NF \pdfhorigin { 1in } } + } + \tl_const:Nx \c__shipout_vorigin_tl + { + \cs_if_exist_use:NTF \pdfvariable { vorigin } + { \cs_if_exist_use:NF \pdfvorigin { 1in } } + } + \cs_gset_eq:NN \__shipout_init_page_origins: \prg_do_nothing: +} +\cs_new:Npn \__shipout_picture_overlay:n #1 { + \__shipout_init_page_origins: + \kern -\c__shipout_horigin_tl \scan_stop: + \vbox_to_zero:n { + \kern -\c__shipout_vorigin_tl \scan_stop: + \unitlength 1pt \scan_stop: + \hbox_set_to_wd:Nnn \l__shipout_tmp_box \c_zero_dim + { \ignorespaces #1 \hss } + \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim + \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim + \box_use:N \l__shipout_tmp_box + \tex_vss:D + } +} +\cs_new:Npn \__shipout_add_background_picture:n #1 { + \__shipout_add_background_box:n { \__shipout_picture_overlay:n {#1} } +} +\cs_new:Npn \__shipout_add_foreground_picture:n #1 { + \__shipout_add_foreground_box:n { \__shipout_picture_overlay:n {#1} } +} +\cs_new_protected:Npn \shipout_discard: { + \bool_gset_true:N \g__shipout_discard_bool +} +\int_new:N \g_shipout_readonly_int +\cs_new_eq:NN \ReadonlyShipoutCounter \g_shipout_readonly_int +\int_new:N \g_shipout_totalpages_int +\cs_new_eq:NN \c@totalpages \g_shipout_totalpages_int +\cs_new:Npn \thetotalpages { \arabic{totalpages} } +\xdef\@abspage@last{\number\maxdimen} +\g@addto@macro \@kernel@after@enddocument { + \int_compare:nNnT \@abspage@last = \maxdimen + { + \xdef\@abspage@last{ \int_eval:n {\g_shipout_readonly_int + 1} } + } +} +\g@addto@macro \@kernel@after@enddocument@afterlastpage { + \int_compare:nNnF \g_shipout_readonly_int = 0 + { + \if@filesw + \iow_now:Nx \@auxout { + \gdef\string\@abspage@last {\int_use:N \g_shipout_readonly_int}} + \fi + \bool_if:NF \g__shipout_lastpage_handled_bool + { + \bool_lazy_and:nnF + { \hook_if_empty_p:n {shipout/lastpage} } + { \tl_if_empty_p:N \@kernel@after@shipout@lastpage } + { + \tex_shipout:D\vbox to\textheight + { + \hbox:n { \UseHook{shipout/lastpage} + \@kernel@after@shipout@lastpage } + \__shipout_excuse_extra_page: + \null + } + \cs_gset_eq:NN \@extra@page@added \relax + } + } + } +} +\cs_new:Npn \__shipout_excuse_extra_page: { + \vfil + \begin{center} + \bfseries Temporary~ page! + \end{center} + \LaTeX{}~ was~ unable~ to~ guess~ the~ total~ number~ of~ pages~ + correctly.~ ~ As~ there~ was~ some~ unprocessed~ data~ that~ + should~ have~ been~ added~ to~ the~ final~ page~ this~ extra~ + page~ has~ been~ added~ to~ receive~ it. + \par + If~ you~ rerun~ the~ document~ (without~ altering~ it)~ this~ + surplus~ page~ will~ go~ away,~ because~ \LaTeX{}~ now~ knows~ + how~ many~ pages~ to~ expect~ for~ this~ document. + \vfil +} +\def\PreviousTotalPages{0} +\g@addto@macro\@kernel@before@begindocument + {\ifnum\@abspage@last<\maxdimen + \xdef\PreviousTotalPages{\@abspage@last}\fi} +\cs_new_eq:NN \DiscardShipoutBox \shipout_discard: +\cs_new_protected:Npn \AtBeginDvi {\__shipout_add_firstpage_material:Nn \AtBeginDvi} +\cs_new_eq:NN \DebugShipoutsOn \shipout_debug_on: +\cs_new_eq:NN \DebugShipoutsOff \shipout_debug_off: +\cs_set_eq:NN \@expl@@@shipout@add@firstpage@material@@Nn + \__shipout_add_firstpage_material:Nn +\cs_set_eq:NN \@expl@@@shipout@add@background@box@@n + \__shipout_add_background_box:n +\cs_set_eq:NN \@expl@@@shipout@add@foreground@box@@n + \__shipout_add_foreground_box:n +\cs_set_eq:NN \@expl@@@shipout@add@background@picture@@n + \__shipout_add_background_picture:n +\cs_set_eq:NN \@expl@@@shipout@add@foreground@picture@@n + \__shipout_add_foreground_picture:n +\ExplSyntaxOff +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\shipout}{The hook management (shipout)}% +\expandafter\let\expandafter\shipout\csname tex_shipout:D\endcsname + +\let \ShipoutBox\@undefined +\let \ReadonlyShipoutCounter \@undefined +\let \c@totalpages \@undefined +\let \thetotalpages \@undefined + +\let \DiscardShipoutBox \@undefined +\let \DebugShipoutsOn \@undefined +\let \DebugShipoutsOff \@undefined + +\DeclareRobustCommand \AtBeginDvi [1]{% + \global \setbox \@begindvibox + \vbox{\unvbox \@begindvibox #1}% +} + +\let \AtBeginShipout \@undefined +\let \AtBeginShipoutNext \@undefined + +\let \AtBeginShipoutFirst \@undefined + +\let \ShipoutBoxHeight \@undefined +\let \ShipoutBoxDepth \@undefined +\let \ShipoutBoxWidth \@undefined + +\let \AtBeginShipoutDiscard \@undefined + +\let \AtBeginShipoutAddToBox \@undefined +\let \AtBeginShipoutAddToBoxForeground \@undefined +\let \AtBeginShipoutUpperLeft \@undefined +\let \AtBeginShipoutUpperLeftForeground \@undefined + + +\let \AtEndDvi \@undefined + +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\AtEndDvi}{atenddvi emulation}% +\ExplSyntaxOn +\cs_new_protected:Npn \AtEndDvi {\AddToHook{shipout/lastpage}} +\ExplSyntaxOff +\disable@package@load{atenddvi} + {\PackageWarning{atenddvi} + {Functionality of this package is already\MessageBreak + provided by LaTeX.\MessageBreak\MessageBreak + It is there no longer necessary to load it\MessageBreak + and you can safely remove it.\MessageBreak + Found on}} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\AtEndDvi}{atenddvi emulation}% +\let \AtEndDvi \@undefined +\EndIncludeInRelease +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% From File: ltoutput.dtx \IncludeInRelease{2015/10/01}% {\bx@ZZ}{Extended float list}% @@ -2609,6 +5579,58 @@ of this package available from CTAN} }% \EndIncludeInRelease %%% From File: ltclass.dtx + +\IncludeInRelease{2020/10/01}{\@pushfilename}% + {Add \@expl@push@filename@@ and \@expl@push@filename@aux@@}% +\def\@pushfilename{% + \@expl@@@hook@curr@name@push@@n{}% + \@expl@push@filename@@ + \xdef\@currnamestack{% + {\@currname}% + {\@currext}% + {\the\catcode`\@}% + \@currnamestack}% + \@expl@push@filename@aux@@} +\EndIncludeInRelease + +\IncludeInRelease{0000/00/00}{\@pushfilename}% + {Add \@expl@push@filename@@ and \@expl@push@filename@aux@@}% +\def\@pushfilename{% + \xdef\@currnamestack{% + {\@currname}% + {\@currext}% + {\the\catcode`\@}% + \@currnamestack}} +\EndIncludeInRelease +\@onlypreamble\@pushfilename + +\IncludeInRelease{2020/10/01}{\@popfilename}% + {Add \@expl@pop@filename@@}% +\def\@popfilename{\@expl@@@hook@curr@name@pop@@ + \expandafter\@p@pfilename\@currnamestack\@nil + \@expl@pop@filename@@} +\EndIncludeInRelease + +\IncludeInRelease{0000/00/00}{\@popfilename}% + {Add \@expl@push@filename@@ and \@expl@push@filename@aux@@}% +\def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil} +\EndIncludeInRelease +\@onlypreamble\@popfilename +\IncludeInRelease{2020/10/01}% + {\IfFormatAtLeastTF}{Test format date}% +\def\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} +\let\IfPackageAtLeastTF\@ifpackagelater +\let\IfClassAtLeastTF\@ifclasslater +\@onlypreamble\IfFormatAtLeastTF +\@onlypreamble\IfPackageAtLeastTF +\@onlypreamble\IfClassAtLeastTF +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\IfFormatAtLeastTF}{Test format date}% +\def\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} +\let\IfPackageAtLeastTF\@ifpackagelater +\let\IfClassAtLeastTF\@ifclasslater +\EndIncludeInRelease \IncludeInRelease{2018/04/01}% {\@ifl@t@r}{Guard against bad input}% \def\@ifl@t@r#1#2{% @@ -2665,11 +5687,13 @@ of this package available from CTAN} }% \reserved@a} \EndIncludeInRelease -\IncludeInRelease{2020/02/02}% - {\@pr@videpackage}{Protection for package info}% +\IncludeInRelease{2020/10/01}% + {\@pr@videpackage}{Allow for package subsitution}% \def\@pr@videpackage[#1]{% \expandafter\protected@xdef % <-- protected... - \csname ver@\@currname.\@currext\endcsname{#1}% + \csname ver@\@currname.\@currext\endcsname{#1}% Loaded package + \expandafter\protected@xdef % <-- protected... + \csname ver@\@currpkg@reqd\endcsname{#1}% Requested package \ifx\@currext\@clsextension \typeout{Document Class: \@gtempa\space#1}% \else @@ -2679,6 +5703,19 @@ of this package available from CTAN} \set@display@protect \immediate \write \m@ne {#1}\endgroup } \EndIncludeInRelease +\IncludeInRelease{2020/02/02}% + {\@pr@videpackage}{Protection for package info}% + +\def\@pr@videpackage[#1]{% + \expandafter\protected@xdef % <-- protected... + \csname ver@\@currname.\@currext\endcsname{#1}% +\ifx\@currext\@clsextension + \typeout{Document Class: \@gtempa\space#1}% + \else + \protected@wlog{Package: \@gtempa\space#1}% <--- protected + \fi} + +\EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@pr@videpackage}{Protection for package info}% @@ -2691,6 +5728,55 @@ of this package available from CTAN} \fi} \let\protected@wlog\@undefined +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\@pass@ptions} + {Add file replacement in \@pass@ptions}% +\def\@pass@ptions#1#2#3{% + \edef\reserved@a{\@expl@@@filehook@resolve@file@subst@@w #3.#1\@nil}% + \expandafter\xdef\csname opt@\reserved@a\endcsname{% + \@ifundefined{opt@\reserved@a}\@empty + {\csname opt@\reserved@a\endcsname,}% + \zap@space#2 \@empty}} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}{\@pass@ptions} + {\@pass@ptions}% +\def\@pass@ptions#1#2#3{% + \expandafter\xdef\csname opt@#3.#1\endcsname{% + \@ifundefined{opt@#3.#1}\@empty + {\csname opt@#3.#1\endcsname,}% + \zap@space#2 \@empty}} +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@process@pti@ns}{Unused options issue}% +\def\@process@pti@ns{% + \@for\CurrentOption:=\@curroptions\do{% + \@ifundefined{ds@\CurrentOption}% + {\@use@ption + \default@ds}% + \@use@ption}% + \@for\CurrentOption:=\@declaredoptions\do{% + \expandafter\let\csname ds@\CurrentOption\endcsname\relax}% + \let\CurrentOption\@empty + \let\@fileswith@pti@ns\@@fileswith@pti@ns + \AtEndOfPackage{\expandafter\let + \csname unprocessedoptions-\@currname.\@currext\endcsname + \relax}} +\@onlypreamble\@process@pti@ns +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@process@pti@ns}{Unused options issue}% + +\def\@process@pti@ns{% + \@for\CurrentOption:=\@curroptions\do{% + \@ifundefined{ds@\CurrentOption}% + {\@use@ption + \default@ds}% + \@use@ption}% + \@for\CurrentOption:=\@declaredoptions\do{% + \expandafter\let\csname ds@\CurrentOption\endcsname\relax}% + \let\CurrentOption\@empty + \let\@fileswith@pti@ns\@@fileswith@pti@ns + \AtEndOfPackage{\let\@unprocessedoptions\relax}} \EndIncludeInRelease \IncludeInRelease{2017/01/01}% {\ExecuteOptions}{Spaces in \ExecuteOptions}% @@ -2711,6 +5797,22 @@ of this package available from CTAN} \edef\CurrentOption{##1}}% \expandafter\reserved@a\CurrentOption\@nil} \EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\RequirePackageWithOptions}{Unused options issue}% +\def\RequirePackageWithOptions{% + \AtEndOfPackage{\expandafter\let + \csname unprocessedoptions-\@currname.\@currext\endcsname + \relax}% + \@loadwithoptions\@pkgextension\RequirePackage} +\@onlypreamble\RequirePackageWithOptions +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\RequirePackageWithOptions}{Unused options issue}% + +\def\RequirePackageWithOptions{% + \AtEndOfPackage{\let\@unprocessedoptions\relax}% + \@loadwithoptions\@pkgextension\RequirePackage} +\EndIncludeInRelease \IncludeInRelease{2017/01/01}% {\@fileswith@pti@ns}{ifx tests in \@fileswith@pti@ns}% \def\@fileswith@pti@ns#1[#2]#3[#4]{% @@ -2766,6 +5868,311 @@ of this package available from CTAN} \fi \reserved@a} \EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@onefilewithoptions}{Hooks and unused options issue}% +\def\@onefilewithoptions#1[#2][#3]#4{% + \@pushfilename + \xdef\@currname{#1}% + \global\let\@currext#4% + \@ifl@aded\@currext\@currname + {\@if@ptions\@currext{\@currname}{#2}{}% + {\@latex@error + {Option clash for \@cls@pkg\space \@currname}% + {The package \@currname\space has already been loaded + with options:\MessageBreak + \space\space[\@ptionlist{\@currname.\@currext}]\MessageBreak + There has now been an attempt to load it + with options\MessageBreak + \space\space[#2]\MessageBreak + Adding the global options:\MessageBreak + \space\space + \@ptionlist{\@currname.\@currext},#2\MessageBreak + to your \noexpand\documentclass declaration may fix this.% + \MessageBreak + Try typing \space \space to proceed.}}% + \@firstofone}% + {\makeatletter + \@reset@ptions + \IfFileExists{\@currname.\@currext}{}% + {\@missing@onefilewithoptions{#2}}% + \ifx\@currname\@empty + \expandafter\@gobble + \else + \@disable@packageload@do{\@currname.\@currext}% + {\@expl@@@filehook@file@push@@ + \set@curr@file{\@currname.\@currext}% + \@filehook@set@CurrentFile + \edef\@currpkg@reqd{\@currname.\@currext}% + \ifx\CurrentFile\CurrentFileUsed + \else + \filename@parse\@curr@file + \edef\@currname{\string@makeletter\filename@base}% + \edef\@currext{\string@makeletter\filename@ext}% + \fi + \load@onefile@withoptions{#2}% + \@expl@@@filehook@file@pop@@}% + \expandafter\@firstofone + \fi}% + {\@ifl@ter\@currext{\@currname}{#3}{}% + {\@latex@warning@no@line + {You have requested,\on@line, + version\MessageBreak + `#3' of \@cls@pkg\space \@currname,\MessageBreak + but only version\MessageBreak + `\csname ver@\@currname.\@currext\endcsname'\MessageBreak + is available}}% + \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi}% + \@popfilename + \@reset@ptions} +\@onlypreamble\@onefilewithoptions +\let\@unprocessedoptions\@undefined +\def\@missing@onefilewithoptions#1{% + \@missingfileerror\@currname\@currext + \xdef\@currname{\@missingfile@area\@missingfile@base}% + \global\let\@currext\@missingfile@ext} +\def\load@onefile@withoptions#1{% + \let\CurrentOption\@empty + \@reset@ptions + \def\reserved@a{% + \@pass@ptions\@currext{#1}{\@currname}% + \global\expandafter + \let\csname ver@\@currname.\@currext\endcsname\@empty + \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty + \ifx\@currext\@pkgextension + \UseHook{package/before}% + \UseHook{package/before/\@currname}% + \else + \ifx\@currext\@clsextension + \UseHook{class/before}% + \UseHook{class/before/\@currname}% + \fi + \fi + \InputIfFileExists{\@currpkg@reqd}{}% + {\@latex@error + {The \@cls@pkg\space\@currpkg@reqd\space failed to load.}\@ehd}% + \expandafter\let\csname unprocessedoptions-\@currname.\@currext\endcsname + \@@unprocessedoptions + \csname\@currname.\@currext-h@@k\endcsname + \expandafter\let\csname\@currname.\@currext-h@@k\endcsname + \@undefined + \ifx\@unprocessedoptions\relax + \let\@unprocessedoptions\@undefined + \else + \csname unprocessedoptions-\@currname.\@currext\endcsname + \fi + \expandafter\let + \csname unprocessedoptions-\@currname.\@currext\endcsname + \@undefined + \ifx\@currext\@pkgextension + \UseHook{package/after/\@currname}% + \UseHook{package/after}% + \else + \ifx\@currext\@clsextension + \UseHook{class/after/\@currname}% + \UseHook{class/after}% + \fi + \fi}% + \@ifl@aded\@currext\@currname{}{\reserved@a}} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@onefilewithoptions}{Hooks and unused options issue}% + +\def\load@onefilewithoptions#1[#2][#3]#4{% + \@pushfilename + \xdef\@currname{#1}% + \global\let\@currext#4% + \let\CurrentOption\@empty + \@reset@ptions + \makeatletter + \def\reserved@a{% + \@ifl@aded\@currext{#1}% + {\@if@ptions\@currext{#1}{#2}{}% + {\@latex@error + {Option clash for \@cls@pkg\space #1}% + {The package #1 has already been loaded + with options:\MessageBreak + \space\space[\@ptionlist{#1.\@currext}]\MessageBreak + There has now been an attempt to load it + with options\MessageBreak + \space\space[#2]\MessageBreak + Adding the global options:\MessageBreak + \space\space + \@ptionlist{#1.\@currext},#2\MessageBreak + to your \noexpand\documentclass declaration may fix this.% + \MessageBreak + Try typing \space \space to proceed.}}}% + {\@pass@ptions\@currext{#2}{#1}% + \global\expandafter + \let\csname ver@\@currname.\@currext\endcsname\@empty + \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty + \InputIfFileExists + {\@currname.\@currext}% + {}% + {\@missingfileerror\@currname\@currext}% + \let\@unprocessedoptions\@@unprocessedoptions + \csname\@currname.\@currext-h@@k\endcsname + \expandafter\let\csname\@currname.\@currext-h@@k\endcsname + \@undefined + \@unprocessedoptions}% + \@ifl@ter\@currext{#1}{#3}{}% + {\@latex@warning@no@line + {You have requested,\on@line, + version\MessageBreak + `#3' of \@cls@pkg\space #1,\MessageBreak + but only version\MessageBreak + `\csname ver@#1.\@currext\endcsname'\MessageBreak + is available}}% + \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi + \@popfilename + \@reset@ptions}% + \reserved@a} + +\let \load@onefile@withoptions \@undefined +\let \@missing@onefilewithoptions \@undefined + +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\AtBeginDocument}{Use hook system}% +\DeclareRobustCommand\AtBeginDocument{\AddToHook{begindocument}} +\DeclareRobustCommand\AtEndDocument {\AddToHook{enddocument}} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\AtBeginDocument}{Use hook system}% + +\DeclareRobustCommand\AtBeginDocument{\g@addto@macro\@begindocumenthook} +\DeclareRobustCommand\AtEndDocument{\g@addto@macro\@enddocumenthook} + +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\filec@ntents}{Define \q@curr@file directly (gh/220)}% +\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]{% + \edef\@fortmp{\zap@space#1 \@empty}% + \@for\reserved@a:=\@fortmp\do{% + \ifcsname filec@ntents@\reserved@a\endcsname + \csname filec@ntents@\reserved@a\endcsname + \else + \@latex@error{Unknown filecontents option \reserved@a}% + {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 + \catcode\@tempcnta=12 % + \advance\@tempcnta\@ne % +\ifnum\@tempcnta<32 % +\repeat % +\catcode`\*=11 % +\catcode`\^^M\active% +\catcode`\^^L\active\let^^L\relax% +\catcode`\^^I\active% +\gdef\filec@ntents#1{% + \set@curr@file{\filec@ntents@checkdir#1}% + \edef\q@curr@file{"\@curr@file"}% + \chardef\reserved@c\ifx\directlua\@undefined 15 \else 127 \fi% + \openin\@inputcheck\q@curr@file \space % + \ifeof\@inputcheck% + \@latex@warning@no@line% + {Writing file `\@currdir\@curr@file'}% + \ch@ck7\reserved@c\write\relax% + \immediate\openout\reserved@c\q@curr@file\relax% + \else% + \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% + \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% + \ch@ck7\reserved@c\write\relax% + \if@filesw% % Foul ... trying to overwrite \jobname! + \@latex@error{Trying to overwrite `\jobname.tex'}{You can't % + write to the file you are 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\q@curr@file\relax% + \fi% + \fi% + \fi% + \closein\@inputcheck% + \if@tempswa% + \immediate\write\reserved@c{% + \@percentchar\@percentchar\space% + \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 % + \number\year/\two@digits\month/\two@digits\day.^^J% + \@percentchar\@percentchar}% + \fi% + \let\do\@makeother\dospecials% + \count@ 128\relax% + \loop% + \catcode\count@ 11\relax% + \advance\count@ \@ne% + \ifnum\count@<\@cclvi% + \repeat% + \edef\E{\@backslashchar end\string{\@currenvir\string}}% + \edef\reserved@b{% + \def\noexpand\reserved@b% + ####1\E####2\E####3\relax}% + \reserved@b{% + \ifx\relax##3\relax% + \immediate\write\reserved@c{##1}% + \else% + \edef^^M{\noexpand\end{\@currenvir}}% + \ifx\relax##1\relax% + \else% + \@latex@warning{Writing text `##1' before % + \string\end{\@currenvir}\MessageBreak as last line of \@curr@file}% + \immediate\write\reserved@c{##1}% + \fi% + \ifx\relax##2\relax% + \else% + \@latex@warning{% + Ignoring text `##2' after \string\end{\@currenvir}}% + \fi% + \fi% + ^^M}% + \catcode`\^^L\active% + \let\L\@undefined% + \def^^L{\expandafter\ifx\csname L\endcsname\relax\fi ^^J^^J}% + \catcode`\^^I\active% + \let\I\@undefined% + \def^^I{\expandafter\ifx\csname I\endcsname\relax\fi\space}% + \catcode`\^^M\active% + \edef^^M##1^^M{% + \noexpand\reserved@b##1\E\E\relax}}% +\endgroup% +\EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\filec@ntents}{Spaces in file names + optional arg}% \def\filecontents{\@tempswatrue\@fileswtrue @@ -3035,6 +6442,26 @@ of this package available from CTAN} \csname\expandafter\@gobble\string\\ \endcsname \EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@vspace@calcify}{Add calc support}% +\def\@vspace@calcify#1{\begingroup\setlength\skip@{#1}\vskip\skip@\endgroup} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@vspace@calcify}{Add calc support}% + +\let\@vspace@calcify\@undefined +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@newline}{\newline calc support}% +\def\@newline[#1]{\let \reserved@e \vadjust + \@gnewline {\@vspace@calcify{#1}}} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@newline}{\newline calc support}% + +\def\@newline[#1]{\let \reserved@e \vadjust + \@gnewline {\vskip #1}} +\EndIncludeInRelease \IncludeInRelease{2018/10/10}% {\@esphack}{hyphenation and nobreak after space hack}% \def\@esphack{% @@ -3115,6 +6542,39 @@ of this package available from CTAN} \fi \fi}% \EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\addvspace}{\addvspace calc support}% +\def\addvspace#1{% + \ifvmode + \if@minipage\else + \ifdim \lastskip =\z@ + \@vspace@calcify{#1}% + \else + \setlength\@tempskipb{#1}% + \@xaddvskip + \fi + \fi + \else + \@noitemerr + \fi} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\addvspace}{\addvspace calc support}% + +\def\addvspace#1{% + \ifvmode + \if@minipage\else + \ifdim \lastskip =\z@ + \vskip #1\relax + \else + \@tempskipb#1\relax + \@xaddvskip + \fi + \fi + \else + \@noitemerr + \fi} +\EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\addpenalty}{\addpenalty}% \def\addpenalty#1{% @@ -3171,6 +6631,71 @@ of this package available from CTAN} \@noitemerr \fi}% \EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@vspace}{Support calc in \vspace}% +\def\@vspace #1{% + \ifvmode + \@vspace@calcify{#1}% + \vskip\z@skip + \else + \@bsphack + \vadjust{\@restorepar + \@vspace@calcify{#1}% + \vskip\z@skip + }% + \@esphack + \fi} +\def\@vspacer#1{% + \ifvmode + \dimen@\prevdepth + \hrule \@height\z@ + \nobreak + \@vspace@calcify{#1}% + \vskip\z@skip + \prevdepth\dimen@ + \else + \@bsphack + \vadjust{\@restorepar + \hrule \@height\z@ + \nobreak + \@vspace@calcify{#1}% + \vskip\z@skip}% + \@esphack + \fi} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@vspace}{Support calc in \vspace}% + +\def\@vspace #1{% + \ifvmode + \vskip #1 + \vskip\z@skip + \else + \@bsphack + \vadjust{\@restorepar + \vskip #1 + \vskip\z@skip + }% + \@esphack + \fi} +\def\@vspacer#1{% + \ifvmode + \dimen@\prevdepth + \hrule \@height\z@ + \nobreak + \vskip #1 + \vskip\z@skip + \prevdepth\dimen@ + \else + \@bsphack + \vadjust{\@restorepar + \hrule \@height\z@ + \nobreak + \vskip #1 + \vskip\z@skip}% + \@esphack + \fi} +\EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\@}{Space after \@}% \def\@{\spacefactor\@m{}}% @@ -3179,10 +6704,18 @@ of this package available from CTAN} {\@}{Space after \@}% \def\@{\spacefactor\@m}% \EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@hspace}{Support calc with \hspace}% +\def\@hspace#1{\begingroup\setlength\skip@{#1}\hskip\skip@\endgroup} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@hspace}{Support calc with \hspace}% + + +\def\@hspace#1{\hskip #1\relax} +\EndIncludeInRelease \IncludeInRelease{2018/12/01}% {\thinspace}{Start LR-mode}% -\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} \EndIncludeInRelease @@ -3360,6 +6893,18 @@ of this package available from CTAN} \let\float@count\@undefined \let\extrafloats\@undefined \EndIncludeInRelease +\IncludeInRelease{2020/10/01} + {\alloc@}{emulate alloc@}% +\def\alloc@#1#2#3#4{\e@alloc#2#3{\count1#1}#4\float@count} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\alloc@}{emulate alloc@}% +\def\alloc@#1#2#3#4#5{\global\advance\count1#1\@ne + \ch@ck#1#4#2% + \allocationnumber\count1#1% + \global#3#5\allocationnumber + \wlog{\string#5=\string#2\the\allocationnumber}} +\EndIncludeInRelease \IncludeInRelease{2015/10/01} {\newinsert}{Extended \newinsert}% \ifx\numexpr\@undefined @@ -3564,8 +7109,38 @@ of this package available from CTAN} }% } \EndIncludeInRelease +\IncludeInRelease{2020/10/01} + {\document@select@group}{\document@select@group}% +\def\document@select@group#1#2#3#4{% + \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi + {% + \ifmmode + \ifnum\csname c@mv@\math@version\endcsname<\e@mathgroup@top + \begingroup + \escapechar\m@ne + \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3% + \globaldefs\@ne \math@fonts + \endgroup + \expandafter\extract@alph@from@version + \csname mv@\math@version\expandafter\endcsname + \expandafter{\number\csname + c@mv@\math@version\endcsname}% + #1% + \global\advance\csname c@mv@\math@version\endcsname\@ne + \else + \let#1\relax + \@latex@error{Too many math alphabets used + in version \math@version}% + \@eha + \fi + \else \expandafter\non@alpherr\fi + \expandafter#1\ifx\math@bgroup\bgroup{#4}\else#4\fi + }% +} +\EndIncludeInRelease \IncludeInRelease{2015/01/01} {\document@select@group}{\document@select@group}% + \def\document@select@group#1#2#3#4{% \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi {% @@ -3593,8 +7168,10 @@ of this package available from CTAN} }% } \EndIncludeInRelease + \IncludeInRelease{0000/00/00} {\document@select@group}{\document@select@group}% + \def\document@select@group#1#2#3#4{% \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi {% @@ -3749,13 +7326,16 @@ of this package available from CTAN} %% all rights reserved. \IncludeInRelease{2020/02/02}% {\DeclareFontSeriesDefault}{Custom series}% +\let\DeclareFontSeriesDefault\@undefined % for rollback \newcommand\DeclareFontSeriesDefault[3][]{% \def\reserved@a{#1}% \ifx\reserved@a\@empty \ifcsname #2series\endcsname % supported are % \[md/bf]default \expandafter\def - \csname #2default\endcsname{#3}% + \csname #2default\endcsname{#3\@empty}% + \expandafter\def + \csname #2default@previous\endcsname{#3\@empty}% \else \@latex@error{Wrong syntax for \string\DeclareFontSeriesDefault}% {Mandatory first argument must be 'md' or 'bf'.} @@ -3785,6 +7365,183 @@ of this package available from CTAN} \def\mdseries@sf{m} \def\mdseries@tt{m} +\def\@meta@family@list{\@elt{rm}\@elt{sf}\@elt{tt}} +\def\prepare@family@series@update#1#2{% + \if@forced@series + \fontfamily#2% + \else + \expand@font@defaults + \let\target@series@value\@empty + \def\target@meta@family@value{#1}% + \expandafter\edef\csname ??def@ult\endcsname{\f@family}% + \let\@elt\update@series@target@value + \@meta@family@list + \@elt{??}% + \let\@elt\relax + \fontfamily#2% + \ifx\target@series@value\@empty + \else + \ifx \f@series\target@series@value + \else + \maybe@load@fontshape + \series@maybe@drop@one@m\target@series@value\f@series + \fi + \fi + \fi +} +\def\update@series@target@value#1{% + \def\reserved@a{#1}% + \ifx\target@meta@family@value\reserved@a % rm -> rm do nothing + \else + \expandafter\ifx\csname#1def@ult\endcsname\f@family + \let\@elt\@gobble + \expandafter\let\expandafter\reserved@b + \csname mdseries@\target@meta@family@value\endcsname + \expandafter\let\expandafter\reserved@c + \csname bfseries@\target@meta@family@value\endcsname + \expandafter\series@maybe@drop@one@m + \csname mdseries@#1\endcsname\reserved@d + \ifx\reserved@d\f@series + \let\target@series@value\reserved@b + \else + \expandafter\series@maybe@drop@one@m + \csname bfseries@#1\endcsname\reserved@d + \ifx\reserved@d\f@series + \let\target@series@value\reserved@c + \else\ifx\f@series\mddef@ult \let\target@series@value\reserved@b + \else\ifx\f@series\bfdef@ult \let\target@series@value\reserved@c + \fi\fi\fi\fi + \fi + \fi +} +\def\init@series@setup{% + \ifx\bfseries@rm@kernel\bfseries@rm + \expandafter\in@\expandafter{\rmdefault}% + {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% + \ifin@ \else \def\bfseries@rm{b}\fi\fi + \ifx\bfseries@sf@kernel\bfseries@sf + \expandafter\in@\expandafter{\sfdefault}% + {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% + \ifin@ \else \def\bfseries@sf{b}\fi\fi + \ifx\bfseries@tt@kernel\bfseries@tt + \expandafter\in@\expandafter{\ttdefault}% + {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% + \ifin@ \else \def\bfseries@tt{b}\fi\fi + \reset@font + \ifx\seriesdefault\seriesdefault@kernel + \mdseries + \let\seriesdefault\f@series + \fi +}% +\expandafter\let\csname ver@mweights.sty\endcsname\fmtversion +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\DeclareFontSeriesDefault}{Custom series}% + +\let\DeclareFontSeriesDefault\@undefined +\let\bfseries@rm\@undefined +\let\bfseries@sf\@undefined +\let\bfseries@tt\@undefined +\let\bfseries@rm@kernel\@undefined +\let\bfseries@sf@kernel\@undefined +\let\bfseries@tt@kernel\@undefined +\let\mdseries@rm\@undefined +\let\mdseries@sf\@undefined +\let\mdseries@tt\@undefined +\expandafter\let\csname ver@mweights.sty\endcsname\@undefined + +\let\@meta@family@list\@undefined +\let\prepare@family@series@update\@undefined +\let\update@series@target@value\@undefined + +\let\init@series@setup\relax + +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\bfseries}{Custom series with hooks}% + +\def\expand@font@defaults{% + \edef\rmdef@ult{\rmdefault}% + \edef\sfdef@ult{\sfdefault}% + \edef\ttdef@ult{\ttdefault}% + \series@maybe@drop@one@m\bfdefault\bfdef@ult + \series@maybe@drop@one@m\mddefault\mddef@ult + \UseHook{expand@font@defaults}% +} + +\DeclareRobustCommand\bfseries{% + \not@math@alphabet\bfseries\mathbf + \expand@font@defaults + \ifx\bfdefault\bfdefault@previous\else + \expandafter\def\expandafter\bfdefault + \expandafter{\bfdefault\@empty}% + \let\bfdefault@previous\bfdefault + \let\bfseries@rm\bfdef@ult + \let\bfseries@sf\bfdef@ult + \let\bfseries@tt\bfdef@ult + \UseHook{bfseries/defaults}% + \fi + \ifx\f@family\rmdef@ult \fontseries\bfseries@rm + \else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf + \else\ifx\f@family\ttdef@ult \fontseries\bfseries@tt + \else \fontseries\bfdefault + \fi\fi\fi + \UseHook{bfseries}% + \selectfont +} + +\DeclareRobustCommand\mdseries{% + \not@math@alphabet\mdseries\relax + \expand@font@defaults + \ifx\mddefault\mddefault@previous\else + \expandafter\def\expandafter\mddefault\expandafter{\mddefault\@empty}% + \let\mddefault@previous\mddefault + \let\mdseries@rm\mddef@ult + \let\mdseries@sf\mddef@ult + \let\mdseries@tt\mddef@ult + \UseHook{mdseries/defaults}% + \fi + \ifx\f@family\rmdef@ult \fontseries\mdseries@rm + \else\ifx\f@family\sfdef@ult \fontseries\mdseries@sf + \else\ifx\f@family\ttdef@ult \fontseries\mdseries@tt + \else \fontseries\mddefault + \fi\fi\fi + \UseHook{mdseries}% + \selectfont +} + +\DeclareRobustCommand\rmfamily{% + \not@math@alphabet\rmfamily\mathrm + \prepare@family@series@update{rm}\rmdefault + \UseHook{rmfamily}% + \selectfont} +\DeclareRobustCommand\sffamily{% + \not@math@alphabet\sffamily\mathsf + \prepare@family@series@update{sf}\sfdefault + \UseHook{sffamily}% + \selectfont} +\DeclareRobustCommand\ttfamily{% + \not@math@alphabet\ttfamily\mathtt + \prepare@family@series@update{tt}\ttdefault + \UseHook{ttfamily}% + \selectfont} +\NewHook{rmfamily} +\NewHook{sffamily} +\NewHook{ttfamily} +\NewHook{normalfont} +\NewHook{expand@font@defaults} +\NewHook{bfseries} +\NewHook{bfseries/defaults} +\NewHook{mdseries} +\NewHook{mdseries/defaults} +\let\@rmfamilyhook\@empty +\let\@sffamilyhook\@empty +\let\@ttfamilyhook\@empty +\let\@defaulfamilyhook\@empty +\EndIncludeInRelease +\IncludeInRelease{2020/02/02}% + {\bfseries}{Custom series with hooks}% + \def\expand@font@defaults{% \edef\rmdef@ult{\rmdefault}% \edef\sfdef@ult{\sfdefault}% @@ -3831,87 +7588,13 @@ of this package available from CTAN} \prepare@family@series@update{tt}\ttdefault \@ttfamilyhook \selectfont} -\let\@rmfamilyhook\@empty -\let\@sffamilyhook\@empty -\let\@ttfamilyhook\@empty -\def\@meta@family@list{\@elt{rm}\@elt{sf}\@elt{tt}} -\def\prepare@family@series@update#1#2{% - \if@forced@series - \fontfamily#2% - \else - \expand@font@defaults - \let\target@series@value\@empty - \def\target@meta@family@value{#1}% - \expandafter\edef\csname ??def@ult\endcsname{\f@family}% - \let\@elt\update@series@target@value - \@meta@family@list - \@elt{??}% - \let\@elt\relax - \fontfamily#2% - \ifx\target@series@value\@empty - \else - \ifx \f@series\target@series@value - \else - \maybe@load@fontshape - \let\f@series\target@series@value - \fi - \fi - \fi -} -\def\update@series@target@value#1{% - \def\reserved@a{#1}% - \ifx\target@meta@family@value\reserved@a % rm -> rm do nothing - \else - \expandafter\ifx\csname#1def@ult\endcsname\f@family - \let\@elt\@gobble - \expandafter\let\expandafter\reserved@b - \csname mdseries@\target@meta@family@value\endcsname - \expandafter\let\expandafter\reserved@c - \csname bfseries@\target@meta@family@value\endcsname - \expandafter\ifx\csname mdseries@#1\endcsname\f@series - \let\target@series@value\reserved@b - \else\expandafter\ifx\csname bfseries@#1\endcsname\f@series - \let\target@series@value\reserved@c - \else\ifx\f@series\mddef@ult \let\target@series@value\reserved@b - \else\ifx\f@series\bfdef@ult \let\target@series@value\reserved@c - \fi\fi\fi\fi - \fi - \fi -} -\def\init@series@setup{% - \ifx\bfseries@rm@kernel\bfseries@rm - \expandafter\in@\expandafter{\rmdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% - \ifin@ \else \def\bfseries@rm{b}\fi\fi - \ifx\bfseries@sf@kernel\bfseries@sf - \expandafter\in@\expandafter{\sfdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% - \ifin@ \else \def\bfseries@sf{b}\fi\fi - \ifx\bfseries@tt@kernel\bfseries@tt - \expandafter\in@\expandafter{\ttdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% - \ifin@ \else \def\bfseries@tt{b}\fi\fi - \expand@font@defaults - \ifx\famdef@ult\rmdef@ult \rmfamily - \else\ifx\famdef@ult\sfdef@ult \sffamily - \else\ifx\famdef@ult\ttdef@ult \ttfamily - \fi\fi\fi -}% -\expandafter\let\csname ver@mweights.sty\endcsname\fmtversion + \EndIncludeInRelease \IncludeInRelease{0000/00/00}% - {\DeclareFontSeriesDefault}{Custom series}% + {\bfseries}{Custom series with hooks}% -\let\DeclareFontSeriesDefault\@undefined -\let\bfseries@rm\@undefined -\let\bfseries@sf\@undefined -\let\bfseries@tt\@undefined -\let\bfseries@rm@kernel\@undefined -\let\bfseries@sf@kernel\@undefined -\let\bfseries@tt@kernel\@undefined -\let\mdseries@rm\@undefined -\let\mdseries@sf\@undefined -\let\mdseries@tt\@undefined \let\expand@font@defaults\@undefined -\expandafter\let\csname ver@mweights.sty\endcsname\@undefined \DeclareRobustCommand\bfseries {\not@math@alphabet\bfseries\mathbf @@ -3932,12 +7615,50 @@ of this package available from CTAN} \let\@rmfamilyhook\@undefined \let\@sffamilyhook\@undefined \let\@ttfamilyhook\@undefined -\let\@meta@family@list\@undefined -\let\prepare@family@series@update\@undefined -\let\update@series@target@value\@undefined -\let\init@series@setup\relax +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\IfFontSeriesContextTF}{Font series context}% +\DeclareRobustCommand\IfFontSeriesContextTF[1]{% + \expand@font@defaults + \@font@series@contextfalse + \def\requested@test@context{#1}% + \expandafter\edef\csname ??def@ult\endcsname{\f@family}% + \let\@elt\test@font@series@context + \@meta@family@list + \@elt{??}% + \let\@elt\relax + \if@font@series@context + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\def\test@font@series@context#1{% + \edef\reserved@a{\csname #1def@ult\endcsname}% + \ifx\f@family\reserved@a + \let\@elt\@gobble + \expandafter\ifx + \csname\requested@test@context series@#1\endcsname\f@series + \@font@series@contexttrue + \else + \expandafter\ifx + \csname\requested@test@context def@ult\endcsname\f@series + \@font@series@contexttrue + \fi\fi\fi +} + +\newif\if@font@series@context +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\IfFontSeriesContextTF}{Font series context}% + +\let\IfFontSeriesContextTF\@undefined +\let\test@font@series@context\@undefined +\let\if@font@series@context\@undefined +\let\@font@series@contexttrue\@undefined +\let\@font@series@contextfalse\@undefined \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\DeclareEmphSequence}{Nested emph}% @@ -3993,6 +7714,20 @@ of this package available from CTAN} {\@nomath\em \ifdim \fontdimen\@ne\font >\z@ \upshape \else \itshape \fi}% \let\eminnershape\@undefined +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\symbol}{XeTeX change for math}% +\ifdefined\XeTeXversion + \DeclareRobustCommand\symbol[1]{\Ucharcat#1 12\relax} +\else + \DeclareRobustCommand\symbol[1]{\char#1\relax} +\fi +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\symbol}{XeTeX change for math}% + +\DeclareRobustCommand\symbol[1]{\char#1\relax} + \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\normalfont}{Add hook to \normalfont}% @@ -4001,10 +7736,11 @@ of this package available from CTAN} \edef\f@family{\familydefault}% \edef\f@series{\seriesdefault}% \edef\f@shape{\shapedefault}% - \@defaultfamilyhook + \UseHook{normalfont}% + \@defaultfamilyhook % hookname from 2020/02 will vanish \selectfont} \let\reset@font\normalfont -\let\@defaultfamilyhook\@empty +\let\@defaultfamilyhook\@empty %FMi sort out \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\normalfont}{Add hook to \normalfont}% @@ -4023,7 +7759,7 @@ of this package available from CTAN} %%% From File: fontdef.dtx \IncludeInRelease{2017/01/01}% {\encodingdefault}{TU encoding default}% -\ifx\Umathchar\@undefined +\ifx\Umathcode\@undefined \renewcommand\encodingdefault{OT1} \fontencoding{\encodingdefault} \renewcommand\rmdefault{cmr} @@ -4052,13 +7788,19 @@ of this package available from CTAN} \IncludeInRelease{2020/02/02}% {\updefault}{font defaults change}% \renewcommand\updefault{up} -\renewcommand\bfdefault{b} +\renewcommand\bfdefault{b\@empty} +\renewcommand\mddefault{m\@empty} +\let\bfdefault@previous\bfdefault +\let\mddefault@previous\mddefault \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\updefault}{font defaults change}% \renewcommand\updefault{n} \renewcommand\bfdefault{bx} + +\let\bfdefault@previous\undefined +\let\mddefault@previous\undefined \EndIncludeInRelease \IncludeInRelease{2018/12/01}% {\Big}{Start LR-mode}% @@ -4291,22 +8033,22 @@ of this package available from CTAN} \DeclareTextCommandDefault{\newtie} {\tc@check@accent{\t}2\newtie} \DeclareTextCommandDefault{\capitalnewtie} {\tc@check@accent{\t}2\capitalnewtie} \else - \def\capitalacute{\@tabacckludge'} - \def\capitalbreve{\u} - \def\capitalcaron{\v} - \def\capitalcedilla{\c} - \def\capitalcircumflex{\^} - \def\capitaldieresis{\"} - \def\capitaldotaccent{\.} - \def\capitalgrave{\@tabacckludge`} - \def\capitalhungarumlaut{\H} - \def\capitalmacron{\@tabacckludge=} - \def\capitalnewtie{\t} - \def\capitalogonek{\k} - \def\capitalring{\r} - \def\capitaltie{\t} - \def\capitaltilde{\~} - \def\newtie{\t} + \DeclareTextCommandDefault\capitalacute{\@tabacckludge'} + \DeclareTextCommandDefault\capitalbreve{\u} + \DeclareTextCommandDefault\capitalcaron{\v} + \DeclareTextCommandDefault\capitalcedilla{\c} + \DeclareTextCommandDefault\capitalcircumflex{\^} + \DeclareTextCommandDefault\capitaldieresis{\"} + \DeclareTextCommandDefault\capitaldotaccent{\.} + \DeclareTextCommandDefault\capitalgrave{\@tabacckludge`} + \DeclareTextCommandDefault\capitalhungarumlaut{\H} + \DeclareTextCommandDefault\capitalmacron{\@tabacckludge=} + \DeclareTextCommandDefault\capitalnewtie{\t} + \DeclareTextCommandDefault\capitalogonek{\k} + \DeclareTextCommandDefault\capitalring{\r} + \DeclareTextCommandDefault\capitaltie{\t} + \DeclareTextCommandDefault\capitaltilde{\~} + \DeclareTextCommandDefault\newtie{\t} \fi \DeclareTextCommandDefault{\textlbrackdbl} {\tc@check@symbol2\textlbrackdbl} \DeclareTextCommandDefault{\textrbrackdbl} {\tc@check@symbol2\textrbrackdbl} @@ -4817,7 +8559,7 @@ of this package available from CTAN} \@latex@error{Font family `#1+#2' unknown}\@eha \else \edef\reserved@a{#3}% - \expandafter\series@maybe@drop@one@m\expandafter{#3}\reserved@b + \series@maybe@drop@one@m\reserved@a\reserved@b \ifx\reserved@a\reserved@b\else \@latex@warning{Font shape declaration has incorrect series value `#3'.\MessageBreak It should not contain an `m'! @@ -5543,15 +9285,18 @@ of this package available from CTAN} \DeclareFontSeriesChangeRule {m}{sc}{msc}{mc} \def\set@target@series#1{% \edef\f@series{#1}% - \expandafter\series@maybe@drop@one@m\expandafter{\f@series}\f@series + \series@maybe@drop@one@m\f@series\f@series } -\def\series@maybe@drop@one@m#1#2{% +\def\series@maybe@drop@one@m#1{% + \expandafter\series@maybe@drop@one@m@x\expandafter{#1}} + +\def\series@maybe@drop@one@m@x#1#2{% \def\in@@##1,#1,{}% \series@check@toks\expandafter{\in@@ ,ulm,elm,lm,slm,mm,sbm,bm,ebm,ubm,muc,mec,mc,msc,msx,mx,mex,mux,{}{},#1,}% \edef\in@@{\the\series@check@toks}% \ifx\in@@\@empty - \def#2{#1}% + \edef#2{#1}% \else \edef#2{\expandafter\series@drop@one@m #1m\series@drop@one@m}% \fi @@ -5566,14 +9311,17 @@ of this package available from CTAN} \DeclareRobustCommand\ulcshape {\not@math@alphabet\ulcshape\relax \fontshape\ulcdefault\selectfont} +\let\ulcdefault\@undefined % for rollback \newcommand\ulcdefault{ulc} \DeclareRobustCommand\swshape {\not@math@alphabet\swshape\relax \fontshape\swdefault\selectfont} +\let\swdefault\@undefined % for rollback \newcommand\swdefault{sw} \DeclareRobustCommand\sscshape {\not@math@alphabet\sscshape\relax \fontshape\sscdefault\selectfont} +\let\sscdefault\@undefined % for rollback \newcommand\sscdefault{ssc} \DeclareFontShapeChangeRule {n}{it} {it} {sl} \DeclareFontShapeChangeRule {n}{sl} {sl} {it} @@ -5700,10 +9448,22 @@ of this package available from CTAN} \let\reinstall@nfss@defs\relax \EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\reinstall@nfss@defs}{NFSS series init}% +\g@addto@macro\@kernel@after@begindocument@before + {\reinstall@nfss@defs\init@series@setup} +\EndIncludeInRelease +\IncludeInRelease{2020/02/02}% + {\reinstall@nfss@defs}{NFSS series init}% +\AtBeginDocument{\reinstall@nfss@defs\init@series@setup} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\reinstall@nfss@defs}{NFSS series init}% +\EndIncludeInRelease %%% From File: ltfsstrc.dtx %% Copyright (C) 1989-97 by Frank Mittelbach and Rainer Sch\"opf. %% Copyright (C) 1994-97 by LaTeX3 project. All rights reserved. -\IncludeInRelease{2020/02/01}% +\IncludeInRelease{2020/02/02}% {\@font@aliasinfo}{alias size function}% \DeclareSizeFunction{alias}{\sub@sfcnt\@font@aliasinfo} \def\@font@aliasinfo#1{% @@ -5864,11 +9624,24 @@ of this package available from CTAN} \EndIncludeInRelease %%% From File: ltpageno.dtx %%% From File: ltxref.dtx +\IncludeInRelease{2020/10/01}% + {\refstepcounter}{Add \@currentcounter}% +\def\@currentcounter{} +\def\refstepcounter#1{\stepcounter{#1}% + \edef\@currentcounter{#1}% + \protected@edef\@currentlabel + {\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} +\EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\refstepcounter}{Add \labelformat and \Ref}% +\let\@currentcounter\@undefined \def\refstepcounter#1{\stepcounter{#1}% \protected@edef\@currentlabel - {\csname p@#1\expandafter\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}}% @@ -5886,6 +9659,102 @@ of this package available from CTAN} \EndIncludeInRelease %%% From File: ltmiscen.dtx +\IncludeInRelease{2020/10/01}% + {\enddocument}{Use Hooks}% +\def\enddocument{% + \UseOneTimeHook{enddocument}% + \@kernel@after@enddocument + \@checkend{document}% + \clearpage + \UseOneTimeHook{enddocument/afterlastpage}% + \@kernel@after@enddocument@afterlastpage + \begingroup + \if@filesw + \immediate\closeout\@mainaux + \let\@setckpt\@gobbletwo + \let\@newl@bel\@testdef + \@tempswafalse + \makeatletter \@@input\jobname.aux + \fi + \UseHook{enddocument/afteraux}% + \UseOneTimeHook{enddocument/info}% + \endgroup + \UseOneTimeHook{enddocument/end}% + \deadcycles\z@\@@end} +\NewHook{enddocument} +\NewHook{enddocument/afterlastpage} +\NewHook{enddocument/afteraux} +\NewHook{enddocument/info} +\NewHook{enddocument/end} +\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist} +\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings} +\DeclareHookRule{enddocument/info}{kernel/filelist}{before}{kernel/warnings} +\let\@kernel@after@enddocument\@empty +\let\@kernel@after@enddocument@afterlastpage\@empty +\def\@enddocument@kernel@warnings{% + \ifdim \font@submax >\fontsubfuzz\relax + \@font@warning{Size substitutions with differences\MessageBreak + up to \font@submax\space have occurred.\@gobbletwo}% + \fi + \@defaultsubs + \@refundefined + \if@filesw + \ifx \@multiplelabels \relax + \if@tempswa + \@latex@warning@no@line{Label(s) may have changed. + Rerun to get cross-references right}% + \fi + \else + \@multiplelabels + \fi + \ifx \@extra@page@added \relax + \@latex@warning@no@line{Temporary extra page added at the end. + Rerun to get it removed}% + \fi + \fi +} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\enddocument}{Use Hooks}% + +\def\enddocument{% + \let\AtEndDocument\@firstofone + \@enddocumenthook + \@checkend{document}% + \clearpage + \begingroup + \if@filesw + \immediate\closeout\@mainaux + \let\@setckpt\@gobbletwo + \let\@newl@bel\@testdef + \@tempswafalse + \makeatletter \@@input\jobname.aux + \fi + \@dofilelist + \ifdim \font@submax >\fontsubfuzz\relax + \@font@warning{Size substitutions with differences\MessageBreak + up to \font@submax\space have occurred.\@gobbletwo}% + \fi + \@defaultsubs + \@refundefined + \if@filesw + \ifx \@multiplelabels \relax + \if@tempswa + \@latex@warning@no@line{Label(s) may have changed. + Rerun to get cross-references right}% + \fi + \else + \@multiplelabels + \fi + \fi + \endgroup + \deadcycles\z@\@@end} + +\let\@kernel@after@enddocument\@undefined +\let\@kernel@after@enddocument@afterlastpage\@undefined +\let\@enddocument@kernel@warnings\@undefined + +\EndIncludeInRelease \IncludeInRelease{2018/12/01}% {\protected@file@percent}{Mask line endings}% \protected\def\protected@file@percent{} @@ -5926,6 +9795,55 @@ of this package available from CTAN} }% } \EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\begin}{Use hook system}% +\DeclareRobustCommand*\begin[1]{% + \UseHook{env/#1/before}% + \@ifundefined{#1}% + {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}% + {\def\reserved@a{\def\@currenvir{#1}% + \edef\@currenvline{\on@line}% + \@execute@begin@hook{#1}% + \csname #1\endcsname}}% + \@ignorefalse + \begingroup\@endpefalse\reserved@a} +\def\@execute@begin@hook #1{% + \expandafter\ifx\csname #1\endcsname\document + \endgroup + \gdef\@execute@begin@hook##1{\UseHook{env/##1/begin}}% + \@expl@@@initialize@all@@ + \fi + \UseHook{env/#1/begin}% +} +\edef\end + {\unexpanded{% + \romannumeral + \ifx\protect\@typeset@protect + \expandafter %1 + \expandafter %2 + \expandafter %1 + \expandafter %3 expands the \csname inside \end + \expandafter %1 + \expandafter %2 expands \end + \expandafter %1 expands the \else + \z@ + \else + \expandafter\z@\expandafter\protect + \fi + }% + \expandafter\noexpand\csname end \endcsname + } +\@namedef{end }#1{% + \romannumeral + \IfHookEmptyTF{env/#1/end}% + {\expandafter\z@}% + {\z@\UseHook{env/#1/end}}% + \csname end#1\endcsname\@checkend{#1}% + \expandafter\endgroup\if@endpe\@doendpe\fi + \UseHook{env/#1/after}% + \if@ignore\@ignorefalse\ignorespaces\fi +} +\EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\begin}{Making \begin/\end robust}% \DeclareRobustCommand\begin[1]{% @@ -5961,8 +9879,34 @@ of this package available from CTAN} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\begin}{Making \begin/\end robust}% -\kernel@make@fragile\begin -\kernel@make@fragile\end +\def\begin#1{% + \@ifundefined{#1}% + {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}% + {\def\reserved@a{\def\@currenvir{#1}% + \edef\@currenvline{\on@line}% + \csname #1\endcsname}}% + \@ignorefalse + \begingroup\@endpefalse\reserved@a} +\def\end#1{% + \csname end#1\endcsname\@checkend{#1}% + \expandafter\endgroup\if@endpe\@doendpe\fi + \if@ignore\@ignorefalse\ignorespaces\fi} + +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\AtBeginEnvironment}{Hooks for environments}% +\newcommand\AtBeginEnvironment[2][.] {\AddToHook{env/#2/begin}[#1]} +\newcommand\AtEndEnvironment[2][.] {\AddToHook{env/#2/end}[#1]} +\newcommand\BeforeBeginEnvironment[2][.]{\AddToHook{env/#2/before}[#1]} +\newcommand\AfterEndEnvironment[2][.] {\AddToHook{env/#2/after}[#1]} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\AtBeginEnvironment}{Hooks for environments}% + +\let\AtBeginEnvironment\@undefined +\let\AtEndEnvironment\@undefined +\let\BeforeBeginEnvironment\@undefined +\let\AfterEndEnvironment\@undefined \EndIncludeInRelease \IncludeInRelease{2020/02/02}% @@ -5977,8 +9921,36 @@ of this package available from CTAN} \par\@ifstar{\nobreak\@xcentercr}\@xcentercr} \EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@icentercr}{centering, etc support calc}% +\def\@icentercr[#1]{\@vspace@calcify{#1}\ignorespaces} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@icentercr}{centering, etc support calc}% + +\def\@icentercr[#1]{\vskip #1\ignorespaces} +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\centering}{Set finaldhypendemerits}% +\DeclareRobustCommand\centering{% + \let\\\@centercr + \rightskip\@flushglue\leftskip\@flushglue + \finalhyphendemerits=\z@ + \parindent\z@\parfillskip\z@skip} +\DeclareRobustCommand\raggedright{% + \let\\\@centercr\@rightskip\@flushglue \rightskip\@rightskip + \finalhyphendemerits=\z@ + \leftskip\z@skip + \parindent\z@} +\DeclareRobustCommand\raggedleft{% + \let\\\@centercr + \rightskip\z@skip\leftskip\@flushglue + \finalhyphendemerits=\z@ + \parindent\z@\parfillskip\z@skip} +\EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\centering}{Make commands robust}% + \DeclareRobustCommand\centering{% \let\\\@centercr \rightskip\@flushglue\leftskip\@flushglue @@ -5992,6 +9964,7 @@ of this package available from CTAN} \rightskip\z@skip\leftskip\@flushglue \parindent\z@\parfillskip\z@skip} \EndIncludeInRelease + \IncludeInRelease{0000/00/00}% {\centering}{Make commands robust}% @@ -6043,7 +10016,7 @@ of this package available from CTAN} } \EndIncludeInRelease \IncludeInRelease{2018/12/01}% - {\verbvisiblespace}{Setup visible space for verb}% + {\verbvisiblespace}{Setup visible space for \verb}% \DeclareRobustCommand\asciispace{\char 32 } \ifx\Umathcode\@undefined \let\verbvisiblespace\asciispace % Pdftex version @@ -6063,23 +10036,13 @@ of this package available from CTAN} } \newbox\@verbvisiblespacebox -\def\@sverb#1{% - \catcode`#1\active - \lccode`\~`#1% - \gdef\verb@balance@group{\verb@egroup - \@latex@error{\noexpand\verb illegal in command argument}\@ehc}% - \aftergroup\verb@balance@group - \lowercase{\let~\verb@egroup}% - \ifnum\catcode`\ =\active - \else \@setupverbvisiblespace \@vobeyspaces \fi -} \@namedef{verbatim*}{\@verbatim \@setupverbvisiblespace \frenchspacing\@vobeyspaces\@sxverbatim} \expandafter\let\csname endverbatim*\endcsname =\endverbatim \EndIncludeInRelease \IncludeInRelease{0000/00/00}% - {\verbvisiblespace}{Setup visible space for verb}% + {\verbvisiblespace}{Setup visible space for \verb}% \@namedef{verbatim*}{\@verbatim\@sxverbatim} @@ -6087,7 +10050,39 @@ of this package available from CTAN} \let\verbvisiblespace \@undefined \let\@setupverbvisiblespace\@undefined \let\@verbvisiblespacebox \@undefined +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}% + {\@sverb}{Drop spaces before \verb delimiter}% +\def\@sverb#1{\if\noexpand#1 \expandafter\@sverb\else\@@sverb{#1}\fi} +\def\@@sverb#1{% + \catcode`#1\active + \lccode`\~`#1% + \gdef\verb@balance@group{\verb@egroup + \@latex@error{\noexpand\verb illegal in command argument}\@ehc}% + \aftergroup\verb@balance@group + \lowercase{\let~\verb@egroup}% + \ifnum\catcode`\ =\active + \else \@setupverbvisiblespace \@vobeyspaces \fi +} +\EndIncludeInRelease +\IncludeInRelease{2018/12/01}% + {\@sverb}{Setup visible space for \verb}% +\def\@sverb#1{% + \catcode`#1\active + \lccode`\~`#1% + \gdef\verb@balance@group{\verb@egroup + \@latex@error{\noexpand\verb illegal in command argument}\@ehc}% + \aftergroup\verb@balance@group + \lowercase{\let~\verb@egroup}% + \ifnum\catcode`\ =\active + \else \@setupverbvisiblespace \@vobeyspaces \fi +} +\let\@@sverb\@undefined +\EndIncludeInRelease + +\IncludeInRelease{0000/00/00}% + {\@sverb}{Setup visible space for \verb}% \def\@sverb#1{% \catcode`#1\active \lccode`\~`#1% @@ -6123,25 +10118,27 @@ of this package available from CTAN} \wlog{***************************************************} \expandafter\endinput \fi +\long\def\@gobble#1{} +\long\def\@firstofone#1{#1} \ifx\e@alloc@attribute@count\@undefined \countdef\e@alloc@attribute@count=258 + \e@alloc@attribute@count=\z@ \fi \def\newattribute#1{% \e@alloc\attribute\attributedef \e@alloc@attribute@count\m@ne\e@alloc@top#1% } -\e@alloc@attribute@count=\z@ \def\setattribute#1#2{#1=\numexpr#2\relax} \def\unsetattribute#1{#1=-"7FFFFFFF\relax} \ifx\e@alloc@ccodetable@count\@undefined \countdef\e@alloc@ccodetable@count=259 + \e@alloc@ccodetable@count=\z@ \fi \def\newcatcodetable#1{% \e@alloc\catcodetable\chardef \e@alloc@ccodetable@count\m@ne{"8000}#1% \initcatcodetable\allocationnumber } -\e@alloc@ccodetable@count=\z@ \newcatcodetable\catcodetable@initex \newcatcodetable\catcodetable@string \begingroup @@ -6224,31 +10221,32 @@ of this package available from CTAN} \endgroup \ifx\e@alloc@luafunction@count\@undefined \countdef\e@alloc@luafunction@count=260 + \e@alloc@luafunction@count=\z@ \fi \def\newluafunction{% \e@alloc\luafunction\e@alloc@chardef \e@alloc@luafunction@count\m@ne\e@alloc@top } -\e@alloc@luafunction@count=\z@ \ifx\e@alloc@whatsit@count\@undefined \countdef\e@alloc@whatsit@count=261 + \e@alloc@whatsit@count=\z@ \fi \def\newwhatsit#1{% \e@alloc\whatsit\e@alloc@chardef \e@alloc@whatsit@count\m@ne\e@alloc@top#1% } -\e@alloc@whatsit@count=\z@ \ifx\e@alloc@bytecode@count\@undefined \countdef\e@alloc@bytecode@count=262 + \e@alloc@bytecode@count=\z@ \fi \def\newluabytecode#1{% \e@alloc\luabytecode\e@alloc@chardef \e@alloc@bytecode@count\m@ne\e@alloc@top#1% } -\e@alloc@bytecode@count=\z@ \ifx\e@alloc@luachunk@count\@undefined \countdef\e@alloc@luachunk@count=263 + \e@alloc@luachunk@count=\z@ \fi \def\newluachunkname#1{% \e@alloc\luachunk\e@alloc@chardef @@ -6256,7 +10254,12 @@ of this package available from CTAN} {\escapechar\m@ne \directlua{lua.name[\the\allocationnumber]="\string#1"}}% } -\e@alloc@luachunk@count=\z@ +\def\now@and@everyjob#1{% + \everyjob\expandafter{\the\everyjob + #1% + }% + #1% +} \begingroup \attributedef\attributezero=0 % \chardef \charzero =0 % @@ -6316,6 +10319,52 @@ of this package available from CTAN} \EndIncludeInRelease \fi %%% From File: ltexpl.dtx +\IncludeInRelease{2020/10/01}% + {expl3}{Pre-load expl3}% +\expandafter\ifx\csname tex\string _let:D\endcsname\relax + \expandafter\@firstofone +\else + \GenericInfo{}{Skipping: expl3 code already part of the format}% + \expandafter\@gobble +\fi + {% + \IfFileExists{expl3.ltx} + {% + \ifnum0% + \ifdefined\pdffilesize 1\fi + \ifdefined\filesize 1\fi + \ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi + \ifdefined\kanjiskip 1\fi + >0 % + \expandafter\@firstofone + \else + \@latex@error{% + LaTeX requires the e-TeX primitives and additional\MessageBreak + functionality available in the engines:\MessageBreak + - pdfTeX v1.40\MessageBreak + - XeTeX v0.99992\MessageBreak + - LuaTeX v0.95\MessageBreak + - e-(u)pTeX mid-2012\MessageBreak + or later% + }\@ehd \expandafter\@gobble + \fi + } + {% + \@latex@error{LaTeX requires expl3}\@ehd + \@gobble + }% + {% + \input expl3.ltx + \ifdefined\NewDocumentCommand + \else + \IfFileExists{xparse.ltx} + {\input xparse.ltx } + {}% + \fi + }% + } +\EndIncludeInRelease + \IncludeInRelease{2020/02/02}% {expl3}{Pre-load expl3}% \IfFileExists{expl3.ltx} @@ -6336,6 +10385,27 @@ of this package available from CTAN} }% \input{expl3.ltx} \EndIncludeInRelease +\ExplSyntaxOn +\IncludeInRelease{2020/10/01}{expl3~2020-10-01}% + {expl3~macros~added~for~the~2020-10-01~release}% +\cs_gset_eq:NN \@expl@cs@to@str@@N \cs_to_str:N +\cs_gset_eq:NN \@expl@str@if@eq@@nnTF \str_if_eq:nnTF +\cs_gset_eq:NN \@expl@cs@prefix@spec@@N \cs_prefix_spec:N +\cs_gset_eq:NN \@expl@cs@argument@spec@@N \cs_argument_spec:N +\cs_gset_eq:NN \@expl@cs@replacement@spec@@N \cs_replacement_spec:N +\cs_gset_eq:NN \@expl@str@map@function@@NN \str_map_function:NN +\cs_gset_eq:NN \@expl@char@generate@@nn \char_generate:nn +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}{expl3~2020-10-01}% + {expl3~macros~added~for~the~2020-10-01~release}% +\cs_undefine:N \@expl@cs@to@str@@N +\cs_undefine:N \@expl@str@if@eq@@nnTF +\cs_undefine:N \@expl@cs@prefix@spec@@N +\cs_undefine:N \@expl@cs@argument@spec@@N +\cs_undefine:N \@expl@cs@replacement@spec@@N +\cs_undefine:N \@expl@str@map@function@@NN +\EndIncludeInRelease +\ExplSyntaxOff %%% From File: ltfinal.dtx \IncludeInRelease{2015/01/01}% {\newmarks}{Extended Allocation}% @@ -6471,7 +10541,7 @@ of this package available from CTAN} \IncludeInRelease{2018/04/01}% {\UTFviii@invalid}{UTF-8 default}% \ifnum0% - \ifx\Umathchar\@undefined\else 1\fi + \ifx\Umathcode\@undefined\else 1\fi \ifx\mubyte\@undefined\else 1\fi \ifx\charsubdef\@undefined\else 1\fi =\z@ diff --git a/Master/texmf-dist/tex/latex/base/latin1.def b/Master/texmf-dist/tex/latex/base/latin1.def index 642230dda3d..ef47b4d36e9 100644 --- a/Master/texmf-dist/tex/latex/base/latin1.def +++ b/Master/texmf-dist/tex/latex/base/latin1.def @@ -44,7 +44,7 @@ \ProvidesFile{latin1.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}} \ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}} diff --git a/Master/texmf-dist/tex/latex/base/latin10.def b/Master/texmf-dist/tex/latex/base/latin10.def index 7ee0cf07d15..25eeb22d5b4 100644 --- a/Master/texmf-dist/tex/latex/base/latin10.def +++ b/Master/texmf-dist/tex/latex/base/latin10.def @@ -44,7 +44,7 @@ \ProvidesFile{latin10.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\texteuro} {\TextSymbolUnavailable\texteuro} diff --git a/Master/texmf-dist/tex/latex/base/latin2.def b/Master/texmf-dist/tex/latex/base/latin2.def index 79f500e43fa..cabf30a3d40 100644 --- a/Master/texmf-dist/tex/latex/base/latin2.def +++ b/Master/texmf-dist/tex/latex/base/latin2.def @@ -44,7 +44,7 @@ \ProvidesFile{latin2.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textcurrency} {\TextSymbolUnavailable\textcurrency} diff --git a/Master/texmf-dist/tex/latex/base/latin3.def b/Master/texmf-dist/tex/latex/base/latin3.def index 39ba31667d2..909307dc280 100644 --- a/Master/texmf-dist/tex/latex/base/latin3.def +++ b/Master/texmf-dist/tex/latex/base/latin3.def @@ -44,7 +44,7 @@ \ProvidesFile{latin3.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}} \ProvideTextCommandDefault{\textcurrency} diff --git a/Master/texmf-dist/tex/latex/base/latin4.def b/Master/texmf-dist/tex/latex/base/latin4.def index 48659524cbe..b150ce4938c 100644 --- a/Master/texmf-dist/tex/latex/base/latin4.def +++ b/Master/texmf-dist/tex/latex/base/latin4.def @@ -44,7 +44,7 @@ \ProvidesFile{latin4.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textcurrency} {\TextSymbolUnavailable\textcurrency} diff --git a/Master/texmf-dist/tex/latex/base/latin5.def b/Master/texmf-dist/tex/latex/base/latin5.def index 58216b83e87..e91af0cccbd 100644 --- a/Master/texmf-dist/tex/latex/base/latin5.def +++ b/Master/texmf-dist/tex/latex/base/latin5.def @@ -44,7 +44,7 @@ \ProvidesFile{latin5.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}} \ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}} diff --git a/Master/texmf-dist/tex/latex/base/latin9.def b/Master/texmf-dist/tex/latex/base/latin9.def index 24c78ad859e..a420b7765ea 100644 --- a/Master/texmf-dist/tex/latex/base/latin9.def +++ b/Master/texmf-dist/tex/latex/base/latin9.def @@ -44,7 +44,7 @@ \ProvidesFile{latin9.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textcent} {\TextSymbolUnavailable\textcent} diff --git a/Master/texmf-dist/tex/latex/base/letter.cls b/Master/texmf-dist/tex/latex/base/letter.cls index 4d1d1476ae7..9909ad61c3d 100644 --- a/Master/texmf-dist/tex/latex/base/letter.cls +++ b/Master/texmf-dist/tex/latex/base/letter.cls @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. \NeedsTeXFormat{LaTeX2e}[1996/06/01] \ProvidesClass{letter} - [2014/09/29 v1.2z + [2020/03/11 v1.3b Standard LaTeX document class] \newcommand\@ptsize{} \DeclareOption{a4paper} @@ -150,17 +150,17 @@ \let\@oddhead\@empty \def\@oddfoot{\normalfont\hfil\thepage\hfil}% \def\@evenfoot{\normalfont\hfil\thepage\hfil}} -\newcommand*{\name}[1]{\def\fromname{#1}} -\newcommand*{\signature}[1]{\def\fromsig{#1}} -\newcommand*{\address}[1]{\def\fromaddress{#1}} -\newcommand*{\location}[1]{\def\fromlocation{#1}} -\newcommand*{\telephone}[1]{\def\telephonenum{#1}} +\newcommand*\name[1]{\def\fromname{#1}} +\newcommand*\signature[1]{\def\fromsig{#1}} +\newcommand*\address[1]{\def\fromaddress{#1}} +\newcommand*\location[1]{\def\fromlocation{#1}} +\newcommand*\telephone[1]{\def\telephonenum{#1}} \name{} \signature{} \address{} \location{} \telephone{} -\newcommand*{\makelabels}{% +\newcommand*\makelabels{% \AtBeginDocument{% \let\@startlabels\startlabels \let\@mlabel\mlabel @@ -195,7 +195,7 @@ \fi} \long\def\@xproc #1\\#2@@@{\def\toname{#1}\def\toaddress{#2}} \long\def\@yproc #1\\#2@@@{\def\toaddress{#2}} -\newcommand*{\stopbreaks}{% +\newcommand*\stopbreaks{% \interlinepenalty\@M \def\par{\@@par\nobreak}% \let\\\@nobreakcr @@ -209,7 +209,7 @@ \@bsphack\vadjust{\nobreak\vskip #1}\@esphack \fi} \def\@nobreakcr{\@ifstar{\@normalcr*}{\@normalcr*}} -\newcommand*{\startbreaks}{% +\newcommand*\startbreaks{% \let\\\@normalcr \interlinepenalty 200% \def\par{\@@par\penalty 200\relax}} @@ -218,7 +218,7 @@ \newdimen\indentedwidth \indentedwidth=\textwidth \advance\indentedwidth -\longindentation -\newcommand*{\opening}[1]{\ifx\@empty\fromaddress +\newcommand*\opening[1]{\ifx\@empty\fromaddress \thispagestyle{firstpage}% {\raggedleft\@date\par}% \else % home address @@ -231,7 +231,7 @@ {\raggedright \toname \\ \toaddress \par}% \vspace{2\parskip}% #1\par\nobreak} -\newcommand{\closing}[1]{\par\nobreak\vspace{\parskip}% +\newcommand\closing[1]{\par\nobreak\vspace{\parskip}% \stopbreaks \noindent \ifx\@empty\fromaddress\else @@ -243,21 +243,21 @@ \else \fromsig \fi\strut}% \par} \medskipamount=\parskip -\newcommand*{\cc}[1]{% +\newcommand*\cc[1]{% \par\noindent \parbox[t]{\textwidth}{% \@hangfrom{\normalfont\ccname: }% \ignorespaces #1\strut}\par} -\newcommand*{\encl}[1]{% +\newcommand*\encl[1]{% \par\noindent \parbox[t]{\textwidth}{% \@hangfrom{\normalfont\enclname: }% \ignorespaces #1\strut}\par} -\newcommand*{\ps}{\par\startbreaks} -\newcommand*{\stopletter}{} -\newcommand*{\returnaddress}{} +\newcommand*\ps{\par\startbreaks} +\newcommand*\stopletter{} +\newcommand*\returnaddress{} \newcount\labelcount -\newcommand*{\startlabels}{\labelcount\z@ +\newcommand*\startlabels{\labelcount\z@ \pagestyle{empty}% \let\@texttop\relax \topmargin -50\p@ @@ -281,16 +281,16 @@ \parindent \z@ \twocolumn\relax} \let\@startlabels=\relax -\newcommand*{\mlabel}[2]{% +\newcommand*\mlabel[2]{% \parbox[b][2in][c]{262\p@}{\strut\ignorespaces #2}% } \let\@mlabel=\@gobbletwo -\setlength\leftmargini {2.5em} +\setlength\leftmargini {2.5em} \setlength\leftmarginii {2.2em} \setlength\leftmarginiii {1.87em} \setlength\leftmarginiv {1.7em} -\setlength\leftmarginv {1em} -\setlength\leftmarginvi {1em} +\setlength\leftmarginv {1em} +\setlength\leftmarginvi {1em} \setlength\leftmargin {\leftmargini} \setlength \labelsep {5\p@} \setlength \labelwidth{\leftmargini} @@ -333,16 +333,17 @@ \renewcommand\p@enumii{\theenumi} \renewcommand\p@enumiii{\theenumi(\theenumii)} \renewcommand\p@enumiv{\p@enumiii\theenumiii} -\newcommand\labelitemi{\textbullet} -\newcommand\labelitemii{\normalfont\bfseries \textendash} -\newcommand\labelitemiii{\textasteriskcentered} -\newcommand\labelitemiv{\textperiodcentered} +\newcommand\labelitemi {\labelitemfont \textbullet} +\newcommand\labelitemii {\labelitemfont \bfseries \textendash} +\newcommand\labelitemiii{\labelitemfont \textasteriskcentered} +\newcommand\labelitemiv {\labelitemfont \textperiodcentered} +\newcommand\labelitemfont{\normalfont} \newenvironment{description} {\list{}{\labelwidth\z@ \itemindent-\leftmargin \let\makelabel\descriptionlabel}} {\endlist} -\newcommand*{\descriptionlabel}[1]{\hspace\labelsep - \normalfont\bfseries #1} +\newcommand*\descriptionlabel[1]{\hspace\labelsep + \normalfont\bfseries #1} \newenvironment{verse} {\let\\=\@centercr \list{}{\setlength\itemsep{\z@}% @@ -384,15 +385,15 @@ \kern-\p@ \hrule \@width .4\columnwidth \kern .6\p@} -\long\def\@makefntext#1{% +\newcommand\@makefntext[1]{% \noindent \hangindent 5\p@ \hb@xt@5\p@{\hss\@makefnmark}#1} -\newcommand*{\ccname}{cc} -\newcommand*{\enclname}{encl} -\newcommand*{\pagename}{Page} -\newcommand*{\headtoname}{To} -\newcommand*{\today}{\ifcase\month\or +\newcommand*\ccname{cc} +\newcommand*\enclname{encl} +\newcommand*\pagename{Page} +\newcommand*\headtoname{To} +\newcommand*\today{\ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi \space\number\day, \number\year} diff --git a/Master/texmf-dist/tex/latex/base/lppl.tex b/Master/texmf-dist/tex/latex/base/lppl.tex new file mode 100644 index 00000000000..c2a54c1532d --- /dev/null +++ b/Master/texmf-dist/tex/latex/base/lppl.tex @@ -0,0 +1,511 @@ +% +% Copyright 1999 2002-2011 LaTeX3 Project +% Everyone is allowed to distribute verbatim copies of this +% license document, but modification of it is not allowed. +% +% +% If you wish to load it as part of a ``doc'' source, you have to +% ensure that a) % is a comment character and b) that short verb +% characters are being turned off, i.e., +% +% \DeleteShortVerb{\'} % or whatever was made a shorthand +% \MakePercentComment +% \input{lppl} +% \MakePercentIgnore +% \MakeShortVerb{\'} % turn it on again if necessary +% +% +% By default the license is produced with \section* as the highest +% heading level. If this is not appropriate for the document in which +% it is included define the commands listed below before loading this +% document, e.g., for inclusion as a separate chapter define: +% +% \providecommand{\LPPLsection}{\chapter*} +% \providecommand{\LPPLsubsection}{\section*} +% \providecommand{\LPPLsubsubsection}{\subsection*} +% \providecommand{\LPPLparagraph}{\subsubsection*} +% +% +% To allow cross-referencing the headings \label's have been attached +% to them, all starting with ``LPPL:''. As by default headings without +% numbers are produced, this will only allow page references. +% However, you can use the titleref package to produce textual +% references or you change the definitions of \LPPLsection, and +% friends to generated numbered headings. +% +% +% We want it to be possible that this file can be processed by +% (pdf)LaTeX on its own, or that this file can be included in another +% LaTeX document without any modification whatsoever. +% Hence the little test below. +% +% +\makeatletter +\ifx\@preamblecmds\@notprerr + % In this case the preamble has already been processed so this file + % is loaded as part of another document; just enclose everything in + % a group + \let\LPPLicense\bgroup + \let\endLPPLicense\egroup +\else + % In this case the preamble has not been processed yet so this file + % is processed by itself. + \documentclass{article} + \let\LPPLicense\document + \let\endLPPLicense\enddocument +\fi +\makeatother + + +\begin{LPPLicense} + \providecommand{\LPPLsection}{\section*} + \providecommand{\LPPLsubsection}{\subsection*} + \providecommand{\LPPLsubsubsection}{\subsubsection*} + \providecommand{\LPPLparagraph}{\paragraph*} + \providecommand*{\LPPLfile}[1]{\texttt{#1}} + \providecommand*{\LPPLdocfile}[1]{`\LPPLfile{#1.tex}'} + \providecommand*{\LPPL}{\textsc{lppl}} + + \LPPLsection{The \LaTeX\ Project Public License} + \label{LPPL:LPPL} + + \emph{LPPL Version 1.3c 2008-05-04} + + \textbf{Copyright 1999, 2002--2008 \LaTeX3 Project} + \begin{quotation} + Everyone is allowed to distribute verbatim copies of this + license document, but modification of it is not allowed. + \end{quotation} + + \LPPLsubsection{Preamble} + \label{LPPL:Preamble} + + The \LaTeX\ Project Public License (\LPPL) is the primary license + under which the \LaTeX\ kernel and the base \LaTeX\ packages are + distributed. + + You may use this license for any work of which you hold the + copyright and which you wish to distribute. This license may be + particularly suitable if your work is \TeX-related (such as a + \LaTeX\ package), but it is written in such a way that you can use + it even if your work is unrelated to \TeX. + + The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS + LICENSE', below, gives instructions, examples, and recommendations + for authors who are considering distributing their works under this + license. + + This license gives conditions under which a work may be distributed + and modified, as well as conditions under which modified versions of + that work may be distributed. + + We, the \LaTeX3 Project, believe that the conditions below give you + the freedom to make and distribute modified versions of your work + that conform with whatever technical specifications you wish while + maintaining the availability, integrity, and reliability of that + work. If you do not see how to achieve your goal while meeting + these conditions, then read the document \LPPLdocfile{cfgguide} and + \LPPLdocfile{modguide} in the base \LaTeX\ distribution for suggestions. + + + \LPPLsubsection{Definitions} + \label{LPPL:Definitions} + + In this license document the following terms are used: + + \begin{description} + \item[Work] Any work being distributed under this License. + + \item[Derived Work] Any work that under any applicable law is + derived from the Work. + + \item[Modification] Any procedure that produces a Derived Work under + any applicable law -- for example, the production of a file + containing an original file associated with the Work or a + significant portion of such a file, either verbatim or with + modifications and/or translated into another language. + + \item[Modify] To apply any procedure that produces a Derived Work + under any applicable law. + + \item[Distribution] Making copies of the Work available from one + person to another, in whole or in part. Distribution includes + (but is not limited to) making any electronic components of the + Work accessible by file transfer protocols such as \textsc{ftp} or + \textsc{http} or by shared file systems such as Sun's Network File + System (\textsc{nfs}). + + \item[Compiled Work] A version of the Work that has been processed + into a form where it is directly usable on a computer system. + This processing may include using installation facilities provided + by the Work, transformations of the Work, copying of components of + the Work, or other activities. Note that modification of any + installation facilities provided by the Work constitutes + modification of the Work. + + \item[Current Maintainer] A person or persons nominated as such + within the Work. If there is no such explicit nomination then it + is the `Copyright Holder' under any applicable law. + + \item[Base Interpreter] A program or process that is normally needed + for running or interpreting a part or the whole of the Work. + + A Base Interpreter may depend on external components but these are + not considered part of the Base Interpreter provided that each + external component clearly identifies itself whenever it is used + interactively. Unless explicitly specified when applying the + license to the Work, the only applicable Base Interpreter is a + `\LaTeX-Format' or in the case of files belonging to the + `\LaTeX-format' a program implementing the `\TeX{} language'. + \end{description} + + \LPPLsubsection{Conditions on Distribution and Modification} + \label{LPPL:Conditions} + + \begin{enumerate} + \item Activities other than distribution and/or modification of the + Work are not covered by this license; they are outside its scope. + In particular, the act of running the Work is not restricted and + no requirements are made concerning any offers of support for the + Work. + + \item\label{LPPL:item:distribute} You may distribute a complete, unmodified + copy of the Work as you received it. Distribution of only part of + the Work is considered modification of the Work, and no right to + distribute such a Derived Work may be assumed under the terms of + this clause. + + \item You may distribute a Compiled Work that has been generated + from a complete, unmodified copy of the Work as distributed under + Clause~\ref{LPPL:item:distribute} above, as long as that Compiled Work is + distributed in such a way that the recipients may install the + Compiled Work on their system exactly as it would have been + installed if they generated a Compiled Work directly from the + Work. + + \item\label{LPPL:item:currmaint} If you are the Current Maintainer of the + Work, you may, without restriction, modify the Work, thus creating + a Derived Work. You may also distribute the Derived Work without + restriction, including Compiled Works generated from the Derived + Work. Derived Works distributed in this manner by the Current + Maintainer are considered to be updated versions of the Work. + + \item If you are not the Current Maintainer of the Work, you may + modify your copy of the Work, thus creating a Derived Work based + on the Work, and compile this Derived Work, thus creating a + Compiled Work based on the Derived Work. + + \item\label{LPPL:item:conditions} If you are not the Current Maintainer + of the + Work, you may distribute a Derived Work provided the following + conditions are met for every component of the Work unless that + component clearly states in the copyright notice that it is exempt + from that condition. Only the Current Maintainer is allowed to + add such statements of exemption to a component of the Work. + \begin{enumerate} + \item If a component of this Derived Work can be a direct + replacement for a component of the Work when that component is + used with the Base Interpreter, then, wherever this component of + the Work identifies itself to the user when used interactively + with that Base Interpreter, the replacement component of this + Derived Work clearly and unambiguously identifies itself as a + modified version of this component to the user when used + interactively with that Base Interpreter. + + \item\label{LPPL:item:changelog} Every component of the Derived Work + contains prominent + notices detailing the nature of the changes to that component, + or a prominent reference to another file that is distributed as + part of the Derived Work and that contains a complete and + accurate log of the changes. + + \item No information in the Derived Work implies that any persons, + including (but not limited to) the authors of the original + version of the Work, provide any support, including (but not + limited to) the reporting and handling of errors, to recipients + of the Derived Work unless those persons have stated explicitly + that they do provide such support for the Derived Work. + + \item\label{LPPL:item:unmodifiedcopy} You distribute at least one of + the following with the Derived Work: + \begin{enumerate} + \item A complete, unmodified copy of the Work; if your + distribution of a modified component is made by offering + access to copy the modified component from a designated place, + then offering equivalent access to copy the Work from the same + or some similar place meets this condition, even though third + parties are not compelled to copy the Work along with the + modified component; + + \item Information that is sufficient to obtain a complete, + unmodified copy of the Work. + \end{enumerate} + \end{enumerate} + \item If you are not the Current Maintainer of the Work, you may + distribute a Compiled Work generated from a Derived Work, as long + as the Derived Work is distributed to all recipients of the + Compiled Work, and as long as the conditions of + Clause~\ref{LPPL:item:conditions}, above, are met with regard to the + Derived Work. + + \item The conditions above are not intended to prohibit, and hence + do not apply to, the modification, by any method, of any component + so that it becomes identical to an updated version of that + component of the Work as it is distributed by the Current + Maintainer under Clause~\ref{LPPL:item:currmaint}, above. + + \item Distribution of the Work or any Derived Work in an alternative + format, where the Work or that Derived Work (in whole or in part) + is then produced by applying some process to that format, does not + relax or nullify any sections of this license as they pertain to + the results of applying that process. + + \item + \begin{enumerate} + \item A Derived Work may be distributed under a different license + provided that license itself honors the conditions listed in + Clause~\ref{LPPL:item:conditions} above, in regard to the Work, though it + does not have to honor the rest of the conditions in this + license. + + \item If a Derived Work is distributed under a different license, + that Derived Work must provide sufficient documentation as part + of itself to allow each recipient of that Derived Work to honor + the restrictions in Clause~\ref{LPPL:item:conditions} above, concerning + changes from the Work. + \end{enumerate} + \item This license places no restrictions on works that are + unrelated to the Work, nor does this license place any + restrictions on aggregating such works with the Work by any means. + + \item Nothing in this license is intended to, or may be used to, + prevent complete compliance by all parties with all applicable + laws. + \end{enumerate} + + \LPPLsubsection{No Warranty} + \label{LPPL:Warranty} + + There is no warranty for the Work. Except when otherwise stated in + writing, the Copyright Holder provides the Work `as is', without + warranty of any kind, either expressed or implied, including, but + not limited to, the implied warranties of merchantability and + fitness for a particular purpose. The entire risk as to the quality + and performance of the Work is with you. Should the Work prove + defective, you assume the cost of all necessary servicing, repair, + or correction. + + In no event unless required by applicable law or agreed to in + writing will The Copyright Holder, or any author named in the + components of the Work, or any other party who may distribute and/or + modify the Work as permitted above, be liable to you for damages, + including any general, special, incidental or consequential damages + arising out of any use of the Work or out of inability to use the + Work (including, but not limited to, loss of data, data being + rendered inaccurate, or losses sustained by anyone as a result of + any failure of the Work to operate with any other programs), even if + the Copyright Holder or said author or said other party has been + advised of the possibility of such damages. + + \LPPLsubsection{Maintenance of The Work} + \label{LPPL:Maintenance} + + The Work has the status `author-maintained' if the Copyright Holder + explicitly and prominently states near the primary copyright notice + in the Work that the Work can only be maintained by the Copyright + Holder or simply that it is `author-maintained'. + + The Work has the status `maintained' if there is a Current + Maintainer who has indicated in the Work that they are willing to + receive error reports for the Work (for example, by supplying a + valid e-mail address). It is not required for the Current Maintainer + to acknowledge or act upon these error reports. + + The Work changes from status `maintained' to `unmaintained' if there + is no Current Maintainer, or the person stated to be Current + Maintainer of the work cannot be reached through the indicated means + of communication for a period of six months, and there are no other + significant signs of active maintenance. + + You can become the Current Maintainer of the Work by agreement with + any existing Current Maintainer to take over this role. + + If the Work is unmaintained, you can become the Current Maintainer + of the Work through the following steps: + \begin{enumerate} + \item Make a reasonable attempt to trace the Current Maintainer (and + the Copyright Holder, if the two differ) through the means of an + Internet or similar search. + \item If this search is successful, then enquire whether the Work is + still maintained. + \begin{enumerate} + \item If it is being maintained, then ask the Current Maintainer + to update their communication data within one month. + + \item\label{LPPL:item:intention} If the search is unsuccessful or + no action to resume active maintenance is taken by the Current + Maintainer, then announce within the pertinent community your + intention to take over maintenance. (If the Work is a \LaTeX{} + work, this could be done, for example, by posting to + \texttt{comp.text.tex}.) + \end{enumerate} + \item {} + \begin{enumerate} + \item If the Current Maintainer is reachable and agrees to pass + maintenance of the Work to you, then this takes effect + immediately upon announcement. + + \item\label{LPPL:item:announce} If the Current Maintainer is not + reachable and the Copyright Holder agrees that maintenance of + the Work be passed to you, then this takes effect immediately + upon announcement. + \end{enumerate} + \item\label{LPPL:item:change} If you make an `intention + announcement' as described in~\ref{LPPL:item:intention} above and + after three months your intention is challenged neither by the + Current Maintainer nor by the Copyright Holder nor by other + people, then you may arrange for the Work to be changed so as to + name you as the (new) Current Maintainer. + + \item If the previously unreachable Current Maintainer becomes + reachable once more within three months of a change completed + under the terms of~\ref{LPPL:item:announce} + or~\ref{LPPL:item:change}, then that Current Maintainer must + become or remain the Current Maintainer upon request provided they + then update their communication data within one month. + \end{enumerate} + A change in the Current Maintainer does not, of itself, alter the + fact that the Work is distributed under the \LPPL\ license. + + If you become the Current Maintainer of the Work, you should + immediately provide, within the Work, a prominent and unambiguous + statement of your status as Current Maintainer. You should also + announce your new status to the same pertinent community as + in~\ref{LPPL:item:intention} above. + + \LPPLsubsection{Whether and How to Distribute Works under This License} + \label{LPPL:Distribute} + + This section contains important instructions, examples, and + recommendations for authors who are considering distributing their + works under this license. These authors are addressed as `you' in + this section. + + \LPPLsubsubsection{Choosing This License or Another License} + \label{LPPL:Choosing} + + If for any part of your work you want or need to use + \emph{distribution} conditions that differ significantly from those + in this license, then do not refer to this license anywhere in your + work but, instead, distribute your work under a different license. + You may use the text of this license as a model for your own + license, but your license should not refer to the \LPPL\ or + otherwise give the impression that your work is distributed under + the \LPPL. + + The document \LPPLdocfile{modguide} in the base \LaTeX\ distribution + explains the motivation behind the conditions of this license. It + explains, for example, why distributing \LaTeX\ under the + \textsc{gnu} General Public License (\textsc{gpl}) was considered + inappropriate. Even if your work is unrelated to \LaTeX, the + discussion in \LPPLdocfile{modguide} may still be relevant, and authors + intending to distribute their works under any license are encouraged + to read it. + + \LPPLsubsubsection{A Recommendation on Modification Without Distribution} + \label{LPPL:WithoutDistribution} + + It is wise never to modify a component of the Work, even for your + own personal use, without also meeting the above conditions for + distributing the modified component. While you might intend that + such modifications will never be distributed, often this will happen + by accident -- you may forget that you have modified that component; + or it may not occur to you when allowing others to access the + modified version that you are thus distributing it and violating the + conditions of this license in ways that could have legal + implications and, worse, cause problems for the community. It is + therefore usually in your best interest to keep your copy of the + Work identical with the public one. Many works provide ways to + control the behavior of that work without altering any of its + licensed components. + + \LPPLsubsubsection{How to Use This License} + \label{LPPL:HowTo} + + To use this license, place in each of the components of your work + both an explicit copyright notice including your name and the year + the work was authored and/or last substantially modified. Include + also a statement that the distribution and/or modification of that + component is constrained by the conditions in this license. + + Here is an example of such a notice and statement: +\begin{verbatim} + %% pig.dtx + %% Copyright 2005 M. Y. Name + % + % This work may be distributed and/or modified under the + % conditions of the LaTeX Project Public License, either version 1.3 + % of this license or (at your option) any later version. + % The latest version of this license is in + % https://www.latex-project.org/lppl.txt + % and version 1.3 or later is part of all distributions of LaTeX + % version 2005/12/01 or later. + % + % This work has the LPPL maintenance status `maintained'. + % + % The Current Maintainer of this work is M. Y. Name. + % + % This work consists of the files pig.dtx and pig.ins + % and the derived file pig.sty. +\end{verbatim} + + Given such a notice and statement in a file, the conditions given in + this license document would apply, with the `Work' referring to the + three files `\LPPLfile{pig.dtx}', `\LPPLfile{pig.ins}', and + `\LPPLfile{pig.sty}' (the last being generated from + `\LPPLfile{pig.dtx}' using `\LPPLfile{pig.ins}'), the `Base + Interpreter' referring to any `\LaTeX-Format', and both `Copyright + Holder' and `Current Maintainer' referring to the person `M. Y. + Name'. + + If you do not want the Maintenance section of \LPPL\ to apply to + your Work, change `maintained' above into `author-maintained'. + However, we recommend that you use `maintained' as the Maintenance + section was added in order to ensure that your Work remains useful + to the community even when you can no longer maintain and support it + yourself. + + \LPPLsubsubsection{Derived Works That Are Not Replacements} + \label{LPPL:NotReplacements} + + Several clauses of the \LPPL\ specify means to provide reliability + and stability for the user community. They therefore concern + themselves with the case that a Derived Work is intended to be used + as a (compatible or incompatible) replacement of the original + Work. If this is not the case (e.g., if a few lines of code are + reused for a completely different task), then clauses + \ref{LPPL:item:changelog} and \ref{LPPL:item:unmodifiedcopy} + shall not apply. + + \LPPLsubsubsection{Important Recommendations} + \label{LPPL:Recommendations} + + \LPPLparagraph{Defining What Constitutes the Work} + + The \LPPL\ requires that distributions of the Work contain all the + files of the Work. It is therefore important that you provide a way + for the licensee to determine which files constitute the Work. This + could, for example, be achieved by explicitly listing all the files + of the Work near the copyright notice of each file or by using a + line such as: +\begin{verbatim} + % This work consists of all files listed in manifest.txt. +\end{verbatim} + in that place. In the absence of an unequivocal list it might be + impossible for the licensee to determine what is considered by you + to comprise the Work and, in such a case, the licensee would be + entitled to make reasonable conjectures as to which files comprise + the Work. + +\end{LPPLicense} +\endinput diff --git a/Master/texmf-dist/tex/latex/base/ltexpl.ltx b/Master/texmf-dist/tex/latex/base/ltexpl.ltx deleted file mode 100644 index cc67093fdbb..00000000000 --- a/Master/texmf-dist/tex/latex/base/ltexpl.ltx +++ /dev/null @@ -1,64 +0,0 @@ -%% -%% This is file `ltexpl.ltx', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% ltexpl.dtx (with options: `2ekernel') -%% -%% This is a generated file. -%% -%% The source is maintained by the LaTeX Project team and bug -%% reports for it can be opened at https://latex-project.org/bugs.html -%% (but please observe conditions on bug reports sent to that address!) -%% -%% -%% Copyright (C) 1993-2020 -%% The LaTeX3 Project and any individual authors listed elsewhere -%% in this file. -%% -%% This file was generated from file(s) of the LaTeX base system. -%% -------------------------------------------------------------- -%% -%% It may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% 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 2008 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% This file may only be distributed together with a copy of the LaTeX -%% base system. You may however distribute the LaTeX base system without -%% such generated files. -%% -%% The list of all files belonging to the LaTeX base distribution is -%% given in the file `manifest.txt'. See also `legal.txt' for additional -%% information. -%% -%% The list of derived (unpacked) files belonging to the distribution -%% and covered by LPPL is defined by the unpacking scripts (with -%% extension .ins) which are part of the distribution. -%%% From File: ltexpl.dtx -\IfFileExists{expl3.ltx} - {% - \ifnum0% - \ifdefined\pdffilesize 1\fi - \ifdefined\filesize 1\fi - \ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi - >0 % - \else - \message{Skipping expl3-dependent extensions} - \expandafter\endinput - \fi - } - {% - \message{Skipping expl3-dependent extensions}% - \endinput - }% -\input{expl3.ltx} -\endinput -%% -%% End of file `ltexpl.ltx'. diff --git a/Master/texmf-dist/tex/latex/base/ltluatex.lua b/Master/texmf-dist/tex/latex/base/ltluatex.lua index 96a507047c3..dcbc5730258 100644 --- a/Master/texmf-dist/tex/latex/base/ltluatex.lua +++ b/Master/texmf-dist/tex/latex/base/ltluatex.lua @@ -298,7 +298,7 @@ local callbacktypes = callbacktypes or { pre_mlist_to_hlist_filter = list, mlist_to_hlist = exclusive, post_mlist_to_hlist_filter = reverselist, - new_graf = simple, + new_graf = exclusive, pre_dump = simple, start_run = simple, stop_run = simple, @@ -357,7 +357,7 @@ local function list_handler(name) "Function `" .. i.description .. "' returned false\n" .. "in callback `" .. name .."'" ) - break + return false end if ret ~= true then alltrue = false @@ -383,7 +383,7 @@ local function reverselist_handler(name) "Function `" .. cb.description .. "' returned false\n" .. "in callback `" .. name .."'" ) - break + return false end if ret ~= true then alltrue = false @@ -545,7 +545,9 @@ local function remove_from_callback(name, description) ) if #l == 0 then callbacklist[name] = nil - callback_register(name, nil) + if user_callbacks_defaults[name] == nil then + callback_register(name, nil) + end end return cb.func,cb.description end diff --git a/Master/texmf-dist/tex/latex/base/ltluatex.tex b/Master/texmf-dist/tex/latex/base/ltluatex.tex index 73b3528e674..febfbd72510 100644 --- a/Master/texmf-dist/tex/latex/base/ltluatex.tex +++ b/Master/texmf-dist/tex/latex/base/ltluatex.tex @@ -46,8 +46,8 @@ \ProvidesFile\undefined\begingroup\def\ProvidesFile #1#2[#3]{\endgroup\immediate\write-1{File: #1 #3}} \fi -\ProvidesFile{ltluatex.tex} -[2020/02/02 v1.1l +\ProvidesFile{ltluatex.tex}% +[2020/09/25 v1.1s LuaTeX support for plain TeX (core) ] \edef\etatcatcode{\the\catcode`\@} @@ -58,6 +58,8 @@ \wlog{***************************************************} \expandafter\endinput \fi +\long\def\@gobble#1{} +\long\def\@firstofone#1{#1} \directlua{tex.enableprimitives("",tex.extraprimitives("luatex"))} \ifx\e@alloc\@undefined \ifx\documentclass\@undefined @@ -74,7 +76,7 @@ \expandafter\let\expandafter\new@mathgroup\csname newfam\endcsname \fi \edef \et@xmaxregs {\ifx\directlua\@undefined 32768\else 65536\fi} -\edef \et@xmaxfam {\ifx\Umathchar\@undefined\sixt@@n\else\@cclvi\fi} +\edef \et@xmaxfam {\ifx\Umathcode\@undefined\sixt@@n\else\@cclvi\fi} \count 270=\et@xmaxregs % locally allocates \count registers \count 271=\et@xmaxregs % ditto for \dimen registers \count 272=\et@xmaxregs % ditto for \skip registers @@ -109,8 +111,6 @@ \errmessage{No room for a new \string#4}% \fi \fi}% -\long\def\@gobble#1{} -\long\def\@firstofone#1{#1} \expandafter\csname newcount\endcsname\e@alloc@attribute@count \expandafter\csname newcount\endcsname\e@alloc@ccodetable@count \expandafter\csname newcount\endcsname\e@alloc@luafunction@count @@ -120,23 +120,23 @@ \fi \ifx\e@alloc@attribute@count\@undefined \countdef\e@alloc@attribute@count=258 + \e@alloc@attribute@count=\z@ \fi \def\newattribute#1{% \e@alloc\attribute\attributedef \e@alloc@attribute@count\m@ne\e@alloc@top#1% } -\e@alloc@attribute@count=\z@ \def\setattribute#1#2{#1=\numexpr#2\relax} \def\unsetattribute#1{#1=-"7FFFFFFF\relax} \ifx\e@alloc@ccodetable@count\@undefined \countdef\e@alloc@ccodetable@count=259 + \e@alloc@ccodetable@count=\z@ \fi \def\newcatcodetable#1{% \e@alloc\catcodetable\chardef \e@alloc@ccodetable@count\m@ne{"8000}#1% \initcatcodetable\allocationnumber } -\e@alloc@ccodetable@count=\z@ \newcatcodetable\catcodetable@initex \newcatcodetable\catcodetable@string \begingroup @@ -219,31 +219,32 @@ \endgroup \ifx\e@alloc@luafunction@count\@undefined \countdef\e@alloc@luafunction@count=260 + \e@alloc@luafunction@count=\z@ \fi \def\newluafunction{% \e@alloc\luafunction\e@alloc@chardef \e@alloc@luafunction@count\m@ne\e@alloc@top } -\e@alloc@luafunction@count=\z@ \ifx\e@alloc@whatsit@count\@undefined \countdef\e@alloc@whatsit@count=261 + \e@alloc@whatsit@count=\z@ \fi \def\newwhatsit#1{% \e@alloc\whatsit\e@alloc@chardef \e@alloc@whatsit@count\m@ne\e@alloc@top#1% } -\e@alloc@whatsit@count=\z@ \ifx\e@alloc@bytecode@count\@undefined \countdef\e@alloc@bytecode@count=262 + \e@alloc@bytecode@count=\z@ \fi \def\newluabytecode#1{% \e@alloc\luabytecode\e@alloc@chardef \e@alloc@bytecode@count\m@ne\e@alloc@top#1% } -\e@alloc@bytecode@count=\z@ \ifx\e@alloc@luachunk@count\@undefined \countdef\e@alloc@luachunk@count=263 + \e@alloc@luachunk@count=\z@ \fi \def\newluachunkname#1{% \e@alloc\luachunk\e@alloc@chardef @@ -251,7 +252,12 @@ {\escapechar\m@ne \directlua{lua.name[\the\allocationnumber]="\string#1"}}% } -\e@alloc@luachunk@count=\z@ +\def\now@and@everyjob#1{% + \everyjob\expandafter{\the\everyjob + #1% + }% + #1% +} \begingroup \attributedef\attributezero=0 % \chardef \charzero =0 % diff --git a/Master/texmf-dist/tex/latex/base/ltnews.cls b/Master/texmf-dist/tex/latex/base/ltnews.cls index 08f098515b7..632f0681175 100644 --- a/Master/texmf-dist/tex/latex/base/ltnews.cls +++ b/Master/texmf-dist/tex/latex/base/ltnews.cls @@ -608,6 +608,10 @@ % That's it! +%FMi temp addition until etoolbox is updated +%\RequirePackage{etoolbox-ltx} +%\AddToHook{env/document/begin}{\RemoveFromHook{env/document/begin}[*]} % done in \document + \endinput % CHANGELOG diff --git a/Master/texmf-dist/tex/latex/base/ltxdoc.cls b/Master/texmf-dist/tex/latex/base/ltxdoc.cls index 18ca996958a..897c59b5dc8 100644 --- a/Master/texmf-dist/tex/latex/base/ltxdoc.cls +++ b/Master/texmf-dist/tex/latex/base/ltxdoc.cls @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ltxdoc} - [2019/09/16 v2.0y Standard LaTeX documentation class] + [2020/08/21 v2.1a Standard LaTeX documentation class] \DeclareOption{a5paper}{\@latexerr{Option not supported}% {}} \DeclareOption*{% @@ -158,14 +158,19 @@ {\def\currentfile{#1.dtx}}% \ifnum\@auxout=\@partaux \@latexerr{\string\include\space cannot be nested}\@eha - \else \@docinclude#1 \fi} + \else + \set@curr@file{#1}% + \edef\@curr@file{\@strip@tex@ext\@curr@file}% + \expandafter\@docinclude\expandafter{\@curr@file} + \fi} \def\@docinclude#1 {\clearpage -\if@filesw \immediate\write\@mainaux{\string\@input{#1.aux}}\fi +\if@filesw \immediate\write\@mainaux{\string\@input{"#1.aux"}}\fi \@tempswatrue\if@partsw \@tempswafalse\edef\@tempb{#1}\@for \@tempa:=\@partlist\do{\ifx\@tempa\@tempb\@tempswatrue\fi}\fi \if@tempswa \let\@auxout\@partaux \if@filesw -\immediate\openout\@partaux #1.aux +\immediate\openout\@partaux "#1.aux" \immediate\write\@partaux{\relax}\fi +\@filehook@set@CurrentFile \let\@ltxdoc@PrintIndex\PrintIndex \let\PrintIndex\relax \let\@ltxdoc@PrintChanges\PrintChanges diff --git a/Master/texmf-dist/tex/latex/base/macce.def b/Master/texmf-dist/tex/latex/base/macce.def index 9d769f7f2fa..abe0c3f1d77 100644 --- a/Master/texmf-dist/tex/latex/base/macce.def +++ b/Master/texmf-dist/tex/latex/base/macce.def @@ -44,7 +44,7 @@ \ProvidesFile{macce.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textdiv} {\TextSymbolUnavailable\textdiv} diff --git a/Master/texmf-dist/tex/latex/base/next.def b/Master/texmf-dist/tex/latex/base/next.def index 3ccc2d137d6..7b17b7f14e8 100644 --- a/Master/texmf-dist/tex/latex/base/next.def +++ b/Master/texmf-dist/tex/latex/base/next.def @@ -44,7 +44,7 @@ \ProvidesFile{next.def} - [2018/08/11 v1.3c Input encoding file] + [2020/08/01 v1.3d Input encoding file] \ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} \ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}} \ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}} diff --git a/Master/texmf-dist/tex/latex/base/omlenc.def b/Master/texmf-dist/tex/latex/base/omlenc.def index 266f9c9eb5b..0ec41965eb4 100644 --- a/Master/texmf-dist/tex/latex/base/omlenc.def +++ b/Master/texmf-dist/tex/latex/base/omlenc.def @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. %%% From File: ltoutenc.dtx \ProvidesFile{omlenc.def} - [2020/02/11 v2.0o + [2020/08/10 v2.0s Standard LaTeX file] \DeclareFontEncoding{OML}{}{} \DeclareTextSymbol{\textless}{OML}{`\<} diff --git a/Master/texmf-dist/tex/latex/base/omsenc.def b/Master/texmf-dist/tex/latex/base/omsenc.def index b62514c1d3c..af45ce463ab 100644 --- a/Master/texmf-dist/tex/latex/base/omsenc.def +++ b/Master/texmf-dist/tex/latex/base/omsenc.def @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. %%% From File: ltoutenc.dtx \ProvidesFile{omsenc.def} - [2020/02/11 v2.0o + [2020/08/10 v2.0s Standard LaTeX file] \DeclareFontEncoding{OMS}{}{} \DeclareTextSymbol{\textasteriskcentered}{OMS}{3} % "03 diff --git a/Master/texmf-dist/tex/latex/base/ot1enc.def b/Master/texmf-dist/tex/latex/base/ot1enc.def index 087bb545493..c636ed38f8f 100644 --- a/Master/texmf-dist/tex/latex/base/ot1enc.def +++ b/Master/texmf-dist/tex/latex/base/ot1enc.def @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. %%% From File: ltoutenc.dtx \ProvidesFile{ot1enc.def} - [2020/02/11 v2.0o + [2020/08/10 v2.0s Standard LaTeX file] \DeclareFontEncoding{OT1}{}{} \DeclareTextAccent{\"}{OT1}{127} diff --git a/Master/texmf-dist/tex/latex/base/ot4enc.def b/Master/texmf-dist/tex/latex/base/ot4enc.def index 4ee0bd0bc9c..48b4f7384a7 100644 --- a/Master/texmf-dist/tex/latex/base/ot4enc.def +++ b/Master/texmf-dist/tex/latex/base/ot4enc.def @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. %%% From File: ltoutenc.dtx \ProvidesFile{ot4enc.def} - [2020/02/11 v2.0o + [2020/08/10 v2.0s Standard LaTeX file] \DeclareFontEncoding{OT4}{}{} \DeclareFontSubstitution{OT4}{cmr}{m}{n} diff --git a/Master/texmf-dist/tex/latex/base/preload.cfg b/Master/texmf-dist/tex/latex/base/preload.cfg index 02d8cb532ef..d6cc4e40270 100644 --- a/Master/texmf-dist/tex/latex/base/preload.cfg +++ b/Master/texmf-dist/tex/latex/base/preload.cfg @@ -37,7 +37,7 @@ %% %%% From File: fontdef.dtx \ProvidesFile{preload.cfg} - [2020/02/11 v3.0g LaTeX Kernel + [2020/08/01 v3.0i LaTeX Kernel (Uncustomised preload font setup)] %% diff --git a/Master/texmf-dist/tex/latex/base/report.cls b/Master/texmf-dist/tex/latex/base/report.cls index 40280cb9cdb..498b9b1fbdc 100644 --- a/Master/texmf-dist/tex/latex/base/report.cls +++ b/Master/texmf-dist/tex/latex/base/report.cls @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{report} - [2019/12/20 v1.4l + [2020/04/10 v1.4m Standard LaTeX document class] \newcommand\@ptsize{} \newif\if@restonecol @@ -51,47 +51,47 @@ \@titlepagetrue \newif\if@openright \if@compatibility\else -\DeclareOption{a4paper} - {\setlength\paperheight {297mm}% - \setlength\paperwidth {210mm}} -\DeclareOption{a5paper} - {\setlength\paperheight {210mm}% - \setlength\paperwidth {148mm}} -\DeclareOption{b5paper} - {\setlength\paperheight {250mm}% - \setlength\paperwidth {176mm}} -\DeclareOption{letterpaper} - {\setlength\paperheight {11in}% - \setlength\paperwidth {8.5in}} -\DeclareOption{legalpaper} - {\setlength\paperheight {14in}% - \setlength\paperwidth {8.5in}} -\DeclareOption{executivepaper} - {\setlength\paperheight {10.5in}% - \setlength\paperwidth {7.25in}} -\DeclareOption{landscape} - {\setlength\@tempdima {\paperheight}% - \setlength\paperheight {\paperwidth}% - \setlength\paperwidth {\@tempdima}} + \DeclareOption{a4paper} + {\setlength\paperheight {297mm}% + \setlength\paperwidth {210mm}} + \DeclareOption{a5paper} + {\setlength\paperheight {210mm}% + \setlength\paperwidth {148mm}} + \DeclareOption{b5paper} + {\setlength\paperheight {250mm}% + \setlength\paperwidth {176mm}} + \DeclareOption{letterpaper} + {\setlength\paperheight {11in}% + \setlength\paperwidth {8.5in}} + \DeclareOption{legalpaper} + {\setlength\paperheight {14in}% + \setlength\paperwidth {8.5in}} + \DeclareOption{executivepaper} + {\setlength\paperheight {10.5in}% + \setlength\paperwidth {7.25in}} + \DeclareOption{landscape} + {\setlength\@tempdima {\paperheight}% + \setlength\paperheight {\paperwidth}% + \setlength\paperwidth {\@tempdima}} \fi \if@compatibility \renewcommand\@ptsize{0} \else -\DeclareOption{10pt}{\renewcommand\@ptsize{0}} + \DeclareOption{10pt}{\renewcommand\@ptsize{0}} \fi \DeclareOption{11pt}{\renewcommand\@ptsize{1}} \DeclareOption{12pt}{\renewcommand\@ptsize{2}} \if@compatibility\else -\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} + \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} \fi \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} \DeclareOption{draft}{\setlength\overfullrule{5pt}} \if@compatibility\else -\DeclareOption{final}{\setlength\overfullrule{0pt}} + \DeclareOption{final}{\setlength\overfullrule{0pt}} \fi \DeclareOption{titlepage}{\@titlepagetrue} \if@compatibility\else -\DeclareOption{notitlepage}{\@titlepagefalse} + \DeclareOption{notitlepage}{\@titlepagefalse} \fi \if@compatibility \else @@ -99,20 +99,20 @@ \DeclareOption{openany}{\@openrightfalse} \fi \if@compatibility\else -\DeclareOption{onecolumn}{\@twocolumnfalse} + \DeclareOption{onecolumn}{\@twocolumnfalse} \fi \DeclareOption{twocolumn}{\@twocolumntrue} \DeclareOption{leqno}{\input{leqno.clo}} \DeclareOption{fleqn}{\input{fleqn.clo}} \DeclareOption{openbib}{% \AtEndOfPackage{% - \renewcommand\@openbib@code{% + \renewcommand\@openbib@code{% \advance\leftmargin\bibindent \itemindent -\bibindent \listparindent \itemindent \parsep \z@ }% - \renewcommand\newblock{\par}}% + \renewcommand\newblock{\par}}% } \ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final,openany} \ProcessOptions @@ -172,7 +172,7 @@ \let\chaptermark\@gobble \let\sectionmark\@gobble } - \if@titlepage +\if@titlepage \newcommand\maketitle{\begin{titlepage}% \let\footnotesize\small \let\footnoterule\relax @@ -204,41 +204,41 @@ \global\let\author\relax \global\let\date\relax \global\let\and\relax -} + } \else -\newcommand\maketitle{\par - \begingroup - \renewcommand\thefootnote{\@fnsymbol\c@footnote}% - \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% - \long\def\@makefntext##1{\parindent 1em\noindent - \hb@xt@1.8em{% + \newcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% - \if@twocolumn - \ifnum \col@number=\@ne - \@maketitle + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi \else - \twocolumn[\@maketitle]% - \fi - \else \newpage - \global\@topnum\z@ % Prevents figures from going at top of page. - \@maketitle - \fi - \thispagestyle{plain}\@thanks - \endgroup - \setcounter{footnote}{0}% - \global\let\thanks\relax - \global\let\maketitle\relax - \global\let\@maketitle\relax - \global\let\@thanks\@empty - \global\let\@author\@empty - \global\let\@date\@empty - \global\let\@title\@empty - \global\let\title\relax - \global\let\author\relax - \global\let\date\relax - \global\let\and\relax -} + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{plain}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax + } \def\@maketitle{% \newpage \null @@ -482,7 +482,7 @@ \item\relax} {\endlist} \if@compatibility -\newenvironment{titlepage} + \newenvironment{titlepage} {% \if@twocolumn \@restonecoltrue\onecolumn @@ -495,7 +495,7 @@ {\if@restonecol\twocolumn \else \newpage \fi } \else -\newenvironment{titlepage} + \newenvironment{titlepage} {% \if@twocolumn \@restonecoltrue\onecolumn diff --git a/Master/texmf-dist/tex/latex/base/shortvrb.sty b/Master/texmf-dist/tex/latex/base/shortvrb.sty index 804f54aa0d0..adeae1eca9d 100644 --- a/Master/texmf-dist/tex/latex/base/shortvrb.sty +++ b/Master/texmf-dist/tex/latex/base/shortvrb.sty @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. \NeedsTeXFormat{LaTeX2e}[1994/12/01] \ProvidesPackage{shortvrb} - [2019/12/16 v2.1l + [2020/06/15 v2.1m Standard LaTeX documentation package (FMi)] %% %% Package `doc' to use with LaTeX 2e diff --git a/Master/texmf-dist/tex/latex/base/size10.clo b/Master/texmf-dist/tex/latex/base/size10.clo index eb31188c880..4eb2ebde0ab 100644 --- a/Master/texmf-dist/tex/latex/base/size10.clo +++ b/Master/texmf-dist/tex/latex/base/size10.clo @@ -42,7 +42,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. \ProvidesFile{size10.clo} - [2019/12/20 v1.4l + [2020/04/10 v1.4m Standard LaTeX file (size option)] \renewcommand\normalsize{% \@setfontsize\normalsize\@xpt\@xiipt @@ -97,7 +97,7 @@ \setlength\topskip {10\p@} \setlength\footskip{30\p@} \if@compatibility \setlength\maxdepth{4\p@} \else -\setlength\maxdepth{.5\topskip} \fi + \setlength\maxdepth{.5\topskip} \fi \if@compatibility \if@twocolumn \setlength\textwidth{410\p@} @@ -137,7 +137,7 @@ \fi \addtolength\textheight{\topskip} \if@twocolumn - \setlength\marginparsep {10\p@} + \setlength\marginparsep {10\p@} \else \setlength\marginparsep{11\p@} \fi diff --git a/Master/texmf-dist/tex/latex/base/size11.clo b/Master/texmf-dist/tex/latex/base/size11.clo index f1f8a2235d9..ee39dc8b448 100644 --- a/Master/texmf-dist/tex/latex/base/size11.clo +++ b/Master/texmf-dist/tex/latex/base/size11.clo @@ -42,7 +42,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. \ProvidesFile{size11.clo} - [2019/12/20 v1.4l + [2020/04/10 v1.4m Standard LaTeX file (size option)] \renewcommand\normalsize{% \@setfontsize\normalsize\@xipt{13.6}% @@ -97,7 +97,7 @@ \setlength\topskip {11\p@} \setlength\footskip{30\p@} \if@compatibility \setlength\maxdepth{4\p@} \else -\setlength\maxdepth{.5\topskip} \fi + \setlength\maxdepth{.5\topskip} \fi \if@compatibility \if@twocolumn \setlength\textwidth{410\p@} @@ -137,7 +137,7 @@ \fi \addtolength\textheight{\topskip} \if@twocolumn - \setlength\marginparsep {10\p@} + \setlength\marginparsep {10\p@} \else \setlength\marginparsep{10\p@} \fi diff --git a/Master/texmf-dist/tex/latex/base/size12.clo b/Master/texmf-dist/tex/latex/base/size12.clo index 559db07e04f..9767c339fdc 100644 --- a/Master/texmf-dist/tex/latex/base/size12.clo +++ b/Master/texmf-dist/tex/latex/base/size12.clo @@ -42,7 +42,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. \ProvidesFile{size12.clo} - [2019/12/20 v1.4l + [2020/04/10 v1.4m Standard LaTeX file (size option)] \renewcommand\normalsize{% \@setfontsize\normalsize\@xiipt{14.5}% @@ -97,7 +97,7 @@ \setlength\topskip {12\p@} \setlength\footskip{30\p@} \if@compatibility \setlength\maxdepth{4\p@} \else -\setlength\maxdepth{.5\topskip} \fi + \setlength\maxdepth{.5\topskip} \fi \if@compatibility \if@twocolumn \setlength\textwidth{410\p@} @@ -137,7 +137,7 @@ \fi \addtolength\textheight{\topskip} \if@twocolumn - \setlength\marginparsep {10\p@} + \setlength\marginparsep {10\p@} \else \setlength\marginparsep{10\p@} \fi diff --git a/Master/texmf-dist/tex/latex/base/slides.cls b/Master/texmf-dist/tex/latex/base/slides.cls index 929d261630d..b2234aedf96 100644 --- a/Master/texmf-dist/tex/latex/base/slides.cls +++ b/Master/texmf-dist/tex/latex/base/slides.cls @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. \NeedsTeXFormat{LaTeX2e}[1997/06/01] \ProvidesClass{slides} - [2019/11/04 v2.4b + [2020/02/20 v2.4b Standard LaTeX document class] \input{slides.def} \InputIfFileExists{sfonts.cfg} diff --git a/Master/texmf-dist/tex/latex/base/slides.def b/Master/texmf-dist/tex/latex/base/slides.def index 7405c6bc78b..1cdda66467c 100644 --- a/Master/texmf-dist/tex/latex/base/slides.def +++ b/Master/texmf-dist/tex/latex/base/slides.def @@ -42,7 +42,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. \ProvidesFile{slides.def} - [2019/11/04 v2.4b + [2020/02/20 v2.4b SLiTeX definitions] \message{hacks,} diff --git a/Master/texmf-dist/tex/latex/base/source2edoc.cls b/Master/texmf-dist/tex/latex/base/source2edoc.cls new file mode 100644 index 00000000000..5b6700039c3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/base/source2edoc.cls @@ -0,0 +1,228 @@ + +% This class is buggy and needs fixing + +\ProvidesClass{source2edoc} + [2020/08/16 v0.1 Quick hack to typeset source2.tex + (not usable for anything else and buggy -- will vanish again)!] + +\LoadClass{l3doc} + +\RemoveFromHook{begindocument}[l3doc] % drop the standard setting making " a shortverb +\AddToHook{begindocument}{\MakeShortVerb \|} % but readd | as one + +%\ShowHook{begindocument} + + + +% l3doc's def are buggy (already fixed there but not distributed yet) +\ExplSyntaxOn +\RenewDocumentCommand \DocInclude { m } + { + \relax\clearpage + \docincludeaux + \IfFileExists{#1.fdd} + { \cs_set:Npn \currentfile{#1.fdd} } + { \cs_set:Npn \currentfile{#1.dtx} } + \int_compare:nNnTF \@auxout = \@partaux + { \@latexerr{\string\include\space cannot~be~nested}\@eha } + { \@docinclude {#1} } % <--- braces needed! + } +\cs_gset:Npn \@docinclude #1 + { + \clearpage + \immediate\write\@mainaux{\string\@input{#1.aux}} + \@tempswatrue + \if@partsw + \@tempswafalse + \cs_set:Npx \@tempb {#1} + \clist_map_inline:Nn \@partlist + { + \if_meaning:w \@tempa \@tempb + \@tempswatrue + \fi: + } + \fi + \if@tempswa + \cs_set_eq:NN \@auxout \@partaux + \immediate\openout\@partaux #1.aux + \immediate\write\@partaux{\relax} + \cs_set_eq:NN \@ltxdoc@PrintIndex \PrintIndex + \cs_set_eq:NN \PrintIndex \relax + \cs_set_eq:NN \@ltxdoc@PrintChanges \PrintChanges + \cs_set_eq:NN \PrintChanges \relax + \cs_set_eq:NN \@ltxdoc@theglossary \theglossary + \cs_set_eq:NN \@ltxdoc@endtheglossary \endtheglossary + \part{\currentfile} + { + \cs_set_eq:NN \ttfamily\relax + \cs_gset:Npx \filekey + { \filekey,~ \thepart = { \ttfamily \currentfile } } % <-- mising spaces considered harmful + } + \DocInput{\currentfile} + \cs_set_eq:NN \PrintIndex \@ltxdoc@PrintIndex + \cs_set_eq:NN \PrintChanges \@ltxdoc@PrintChanges + \cs_set_eq:NN \theglossary \@ltxdoc@theglossary + \cs_set_eq:NN \endtheglossary \@ltxdoc@endtheglossary + \clearpage + \@writeckpt{#1} + \immediate \closeout \@partaux + \else + \@nameuse{cp@#1} + \fi + \cs_set_eq:NN \@auxout \@mainaux + } +\ExplSyntaxOff + +\def\partname{File} + + +\gdef\codeline@wrindex#1{\if@filesw + \begingroup + \let\protect\noexpand + \immediate\write\@indexfile + {\string\indexentry{#1}% + {\filesep\number\c@CodelineNo}}% + \endgroup\fi} +\let\filesep\@empty +\def\aalph#1{\@aalph{\csname c@#1\endcsname}} +\def\@aalph#1{% + \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or + j\or k\or l\or m\or n\or o\or p\or q\or r\or s\or + t\or u\or v\or w\or x\or y\or z\or A\or B\or C\or + D\or E\or F\or G\or H\or I\or J\or K\or L\or M\or + N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or + X\or Y\or Z\else\@ctrerr\fi} +\def\docincludeaux{% + \def\thepart{\aalph{part}}\def\filesep{\thepart-}% + \let\filekey\@gobble + \g@addto@macro\index@prologue{% + \gdef\@oddfoot{\parbox[t]{\textwidth}{\strut\footnotesize + \raggedright{\bfseries File Key:} \filekey}}% + \let\@evenfoot\@oddfoot}% + \global\let\docincludeaux\relax + \gdef\@oddfoot{% + \expandafter\ifx\csname ver@\currentfile\endcsname\relax + File \thepart: {\ttfamily\currentfile} % + \else + \GetFileInfo{\currentfile}% + File \thepart: {\ttfamily\filename} % + Date: \filedate\ % + Version \fileversion + \fi + \hfill\thepage}% + \let\@evenfoot\@oddfoot}% +\def\MaintainedBy#1{\gdef\@maintainedby{#1}} +\let\@maintainedby\@empty +\def\MaintainedByLaTeXTeam#1{% +{\gdef\@maintainedby{% +This file is maintained by the \LaTeX{} Project team.\\% +Bug reports can be opened (category \texttt{#1}) at\\% +\url{https://latex-project.org/bugs.html}.}}} +\def\@maketitle{% + \newpage + \null + \vskip 2em% + \begin{center}% + \let \footnote \thanks + {\LARGE \@title \par}% + \vskip 1.5em% + {\large + \lineskip .5em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par}% + \vskip 1em% + {\large \@date}% + \ifx\@maintainedby\@empty + \else + \vskip 1em% + \fbox{\fbox{\begin{tabular}{@{}l@{}}\@maintainedby\end{tabular}}}% + \fi + \end{center}% + \par + \vskip 1.5em} +\providecommand\url{\texttt} +\def\task#1#2{} + + +\def\oc@scan#1{% + \ifx\oc@bslash#1% + \egroup\let\next\oc@bslash\else + \ifcat a\noexpand#1% + #1\let\next\oc@scan\else + \ifx\oc@percent#1% + \def\next{\char`\%\egroup}% + \else + #1\let\next\egroup + \fi\fi\fi\next} +\def\oc@bslash{\bgroup\oc@ttf\char`\\\oc@scan}% +\def\oc@verb#1{% + \catcode`#1\active + \uccode`\~`#1% + \uppercase{\def~{{\oc@ttf\char`#1}}}} +\begingroup + \obeyspaces% + \catcode`\/=\catcode`\\ + /catcode`/\/active + /catcode`<=/catcode`{% + /catcode`>=/catcode`}% + /catcode`/{/active% + /catcode`/}/active% + /gdef/oldc< \end{oldcomments}>% + /gdef/begmac< \begin{macrocode}>% + /gdef/obs>>% +/endgroup% +\begingroup + \catcode`\/=\catcode`\\ + \catcode`\\=13 + /catcode`/|=/catcode`/% + /catcode`/%=13 + /gdef/oldcomments{| + /makeatletter + /let/do/oc@verb/dospecials + /frenchspacing/@vobeyspaces/obs + /raggedright + /oc@verb/>| + /oc@verb/<| + /let\/oc@bslash + /let%/oc@percent + /obeylines + /parindent/z@ + /ttfamily/expandafter/let/expandafter/oc@ttf/the/font + /rmfamily + /textit{Historical /LaTeX/,2.09 comments (not necessarily accurate any more):} + /hfuzz/maxdimen + } +/endgroup +\begingroup + \sloppy% + \obeylines% + \gdef\oc@percent#1^^M{% + \ifvmode% + \def\commentline{#1}% + \ifx\commentline\oldc% + \textit{End of historical \LaTeX\,2.09 comments.} + \end{oldcomments}% + \else% + \ifx\commentline\begmac% + \begin{macrocode}% + \else% + \leavevmode% + #1^^M% + \fi\fi% + \else% + {\oc@ttf\char`\%}#1^^M% + \fi}% +\endgroup% + +\InputIfFileExists{ltxdoc.cfg} + {\typeout{*************************************^^J% + * Local config file ltxdoc.cfg used^^J% + *************************************}} + {} + + +%\errorstopmode +\batchmode + +\endinput diff --git a/Master/texmf-dist/tex/latex/base/structuredlog.sty b/Master/texmf-dist/tex/latex/base/structuredlog.sty new file mode 100644 index 00000000000..0f6e34d85bb --- /dev/null +++ b/Master/texmf-dist/tex/latex/base/structuredlog.sty @@ -0,0 +1,76 @@ +%% +%% This is file `structuredlog.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ltfilehook.dtx (with options: `structuredlog') +%% +%% This is a generated file. +%% +%% The source is maintained by the LaTeX Project team and bug +%% reports for it can be opened at https://latex-project.org/bugs.html +%% (but please observe conditions on bug reports sent to that address!) +%% +%% +%% Copyright (C) 1993-2020 +%% The LaTeX3 Project and any individual authors listed elsewhere +%% in this file. +%% +%% This file was generated from file(s) of the LaTeX base system. +%% -------------------------------------------------------------- +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% 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 2008 or later. +%% +%% This file has the LPPL maintenance status "maintained". +%% +%% This file may only be distributed together with a copy of the LaTeX +%% base system. You may however distribute the LaTeX base system without +%% such generated files. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.txt'. See also `legal.txt' for additional +%% information. +%% +%% The list of derived (unpacked) files belonging to the distribution +%% and covered by LPPL is defined by the unpacking scripts (with +%% extension .ins) which are part of the distribution. +%% +%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach, +%% Phelype Oleinik & LaTeX Team +%%% From File: ltfilehook.dtx +\providecommand\ltfilehookversion{v1.0b} +\providecommand\ltfilehookdate{2020/09/26} +\ProvidesExplPackage + {structuredlog}{\ltfilehookdate}{\ltfilehookversion} + {Structuring the TeX transcript file} +\int_new:N \g__filehook_nesting_level_int +\int_gset:Nn \g__filehook_nesting_level_int + { ( \tl_count:N \@currnamestack ) / 3 - 1 } +\cs_new_protected:Npn \__filehook_log_file_record:n #1 + { + \str_if_eq:nnT {#1} {START} { \int_gincr:N \g__filehook_nesting_level_int } + \iow_term:x + { + \prg_replicate:nn { \g__filehook_nesting_level_int } { = } ~ + ( LEVEL ~ \int_use:N \g__filehook_nesting_level_int \c_space_tl #1 ) ~ + \CurrentFileUsed + \str_if_eq:NNF \CurrentFileUsed \CurrentFile + { ~ ( \CurrentFile \c_space_tl requested ) } + \iow_newline: + } + \str_if_eq:nnT {#1} {STOP} { \int_gdecr:N \g__filehook_nesting_level_int } + } +\AddToHook{file/before}{ \__filehook_log_file_record:n { START } } +\AddToHookNext{file/after} + { \AddToHook{file/after}{ \__filehook_log_file_record:n { STOP } } } +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\endinput +%% +%% End of file `structuredlog.sty'. diff --git a/Master/texmf-dist/tex/latex/base/t1enc.def b/Master/texmf-dist/tex/latex/base/t1enc.def index 0a983d455ca..56d77bc1a8b 100644 --- a/Master/texmf-dist/tex/latex/base/t1enc.def +++ b/Master/texmf-dist/tex/latex/base/t1enc.def @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. %%% From File: ltoutenc.dtx \ProvidesFile{t1enc.def} - [2020/02/11 v2.0o + [2020/08/10 v2.0s Standard LaTeX file] \DeclareFontEncoding{T1}{}{} \DeclareTextAccent{\`}{T1}{0} diff --git a/Master/texmf-dist/tex/latex/base/tuenc.def b/Master/texmf-dist/tex/latex/base/tuenc.def index 88093dba94a..a9f8a27eb35 100644 --- a/Master/texmf-dist/tex/latex/base/tuenc.def +++ b/Master/texmf-dist/tex/latex/base/tuenc.def @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. %%% From File: ltoutenc.dtx \ProvidesFile{tuenc.def} - [2020/02/11 v2.0o + [2020/08/10 v2.0s Standard LaTeX file] \providecommand\UnicodeEncodingName{TU} \begingroup\expandafter\expandafter\expandafter\endgroup @@ -58,20 +58,44 @@ \expandafter\expandafter\expandafter\endinput \else \def\UnicodeFontTeXLigatures{+tlig;} - \def\reserved@a#1{% - \def\@remove@tlig##1{\@remove@tlig@##1\@nil#1\@nil\relax} - \def\@remove@tlig@##1#1{\@remove@tlig@@##1}} - \edef\reserved@b{\detokenize{+tlig;}} - \expandafter\reserved@a\expandafter{\reserved@b} - \def\@remove@tlig@@#1\@nil#2\relax{#1} - \def\remove@tlig#1{% - \begingroup - \font\remove@tlig - \expandafter\@remove@tlig\expandafter{\fontname\font}% - \remove@tlig - \char#1\relax - \endgroup - } + \ifnum\luatexversion<110 + \def\reserved@a#1{% + \def\@remove@tlig##1{\@remove@tlig@##1\@nil#1\@nil\relax} + \def\@remove@tlig@##1#1{\@remove@tlig@@##1}} + \edef\reserved@b{\detokenize{+tlig;}} + \expandafter\reserved@a\expandafter{\reserved@b} + \def\@remove@tlig@@#1\@nil#2\relax{#1} + \def\remove@tlig#1{% + \begingroup + \font\remove@tlig + \expandafter\@remove@tlig\expandafter{\fontname\font}% + \remove@tlig + \char#1\relax + \endgroup + } + \else + \newluafunction\@remove@tlig@@@@ + \now@and@everyjob{\directlua{ + local rawchar_func = token.create'@remove@tlig@@@@'.index + local forcehmode = tex.forcehmode + local put_next = token.put_next + local glyph_id = node.id'glyph' + local rawchar_token = token.new(rawchar_func, token.command_id'lua_call') + lua.get_functions_table()[rawchar_func] = function() + local mode = tex.nest.top.mode + if mode == 1 or mode == -1 then + put_next(rawchar_token) + return forcehmode(true) + end + local n = node.new(glyph_id, 256) + n.font = font.current() + n.char = token.scan_int() + return node.write(n) + end + token.set_lua('@remove@tlig@@@', rawchar_func, 'global', 'protected') + }} + \def\remove@tlig#1{\@remove@tlig@@@#1\relax} + \fi \fi \else \def\UnicodeFontTeXLigatures{mapping=tex-text;} @@ -475,7 +499,7 @@ \DeclareUnicodeComposite{\textcommabelow}{T}{"021A} \DeclareUnicodeComposite{\textcommabelow}{t}{"021B} \DeclareUnicodeComposite{\=} {Y}{"0232} -\DeclareUnicodeComposite{\=} {y}{"0232} +\DeclareUnicodeComposite{\=} {y}{"0233} \DeclareUnicodeComposite{\.} {B}{"1E02} \DeclareUnicodeComposite{\.} {b}{"1E03} \DeclareUnicodeComposite{\d} {B}{"1E04} diff --git a/Master/texmf-dist/tex/latex/graphics/color.sty b/Master/texmf-dist/tex/latex/graphics/color.sty index 7973f8428ff..0f0b974689a 100644 --- a/Master/texmf-dist/tex/latex/graphics/color.sty +++ b/Master/texmf-dist/tex/latex/graphics/color.sty @@ -23,7 +23,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{color} - [2019/11/23 v1.2a Standard LaTeX Color (DPC)] + [2020/02/24 v1.2b Standard LaTeX Color (DPC)] \edef\Gin@codes{% \catcode`\noexpand\^^A\the\catcode`\^^A\relax \catcode`\noexpand\"\the\catcode`\"\relax @@ -124,7 +124,7 @@ {\c@lor@error{model `#1'}}% {\@ifundefined{color@#3}% {\c@lor@error{model `#3'}}% - {\@ifundefined{c@lor@#1@#2}{}% + {\@ifundefined{col@#2}{}% {\PackageInfo{color}{Redefining color #2 in named color model}}% \csname color@#3\endcsname\@tempa{#4}% \csname define@color@#1\endcsname{#2}\@tempa diff --git a/Master/texmf-dist/tex/latex/graphics/graphics.sty b/Master/texmf-dist/tex/latex/graphics/graphics.sty index f23eabadc70..86e3314d9a5 100644 --- a/Master/texmf-dist/tex/latex/graphics/graphics.sty +++ b/Master/texmf-dist/tex/latex/graphics/graphics.sty @@ -29,7 +29,7 @@ \DeclareCurrentRelease{}{2019-10-01} \ProvidesPackage{graphics} - [2019/11/30 v1.4a Standard LaTeX Graphics (DPC,SPQR)] + [2020/08/30 v1.4c Standard LaTeX Graphics (DPC,SPQR)] \edef\Gin@codes{% \catcode`\noexpand\^^A\the\catcode`\^^A\relax \catcode`\noexpand\"\the\catcode`\"\relax @@ -212,20 +212,24 @@ \fi}% \else \Gin@getbase{\Gin@sepdefault\filename@ext}% -\ifx\Gin@ext\relax -\let\Gin@savedbase\filename@base -\let\Gin@savedext\filename@ext - \edef\filename@base{\filename@base\Gin@sepdefault\filename@ext}% - \let\filename@ext\relax - \@for\Gin@temp:=\Gin@extensions\do{% + \ifnum0% + \ifx\Gin@ext\relax 1% + \else \@ifundefined{Gin@rule@\Gin@ext}{1}{0}% + \fi >0 + \let\Gin@ext\relax + \let\Gin@savedbase\filename@base + \let\Gin@savedext\filename@ext + \edef\filename@base{\filename@base\Gin@sepdefault\filename@ext}% + \let\filename@ext\relax + \@for\Gin@temp:=\Gin@extensions\do{% + \ifx\Gin@ext\relax + \Gin@getbase\Gin@temp + \fi}% \ifx\Gin@ext\relax - \Gin@getbase\Gin@temp - \fi}% - \ifx\Gin@ext\relax - \let\filename@base\Gin@savedbase - \let\filename@ext\Gin@savedext - \fi -\fi + \let\filename@base\Gin@savedbase + \let\filename@ext\Gin@savedext + \fi + \fi \ifx\Gin@ext\relax \@warning{File `#1' not found}% \def\Gin@base{\filename@area\filename@base}% @@ -343,6 +347,7 @@ \dospecials \catcode`\ 10 % \catcode`\^^I10 % + \endlinechar13 % \catcode\endlinechar5 % \@makeother\:% \@makeother\-% @@ -400,6 +405,34 @@ \Gin@defaultbp\Gin@urx{#3}% \Gin@defaultbp\Gin@ury{#4}}% \def\Gread@atend{atend} +\def\Gin@viewport{% + \let\Gin@ollx\Gin@llx + \let\Gin@olly\Gin@lly + \let\Gin@ourx\Gin@urx + \let\Gin@oury\Gin@ury + \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vurx\p@ + \edef\Gin@urx{\strip@pt\dimen@}% + \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vury\p@ + \edef\Gin@ury{\strip@pt\dimen@}% + \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vllx\p@ + \edef\Gin@llx{\strip@pt\dimen@}% + \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vlly\p@ + \edef\Gin@lly{\strip@pt\dimen@}} +\def\Gin@trim{% + \let\Gin@ollx\Gin@llx + \let\Gin@olly\Gin@lly + \let\Gin@ourx\Gin@urx + \let\Gin@oury\Gin@ury + \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vllx\p@ + \edef\Gin@llx{\strip@pt\dimen@}% + \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vlly\p@ + \edef\Gin@lly{\strip@pt\dimen@}% + \dimen@\Gin@urx\p@\advance\dimen@ -\Gin@vurx\p@ + \edef\Gin@urx{\strip@pt\dimen@}% + \dimen@\Gin@ury\p@\advance\dimen@ -\Gin@vury\p@ + \edef\Gin@ury{\strip@pt\dimen@}} +\let\Gin@vllx\Gin@llx\let\Gin@vlly\Gin@llx +\let\Gin@vurx\Gin@llx\let\Gin@vury\Gin@llx \let\Grot@height\@ovxx \let\Grot@left\@ovyy \let\Grot@right\@ovdx diff --git a/Master/texmf-dist/tex/latex/graphics/graphicx.sty b/Master/texmf-dist/tex/latex/graphics/graphicx.sty index c28ca752b3b..9446a0a5c2f 100644 --- a/Master/texmf-dist/tex/latex/graphics/graphicx.sty +++ b/Master/texmf-dist/tex/latex/graphics/graphicx.sty @@ -21,7 +21,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{graphicx} - [2019/11/30 v1.2a Enhanced LaTeX Graphics (DPC,SPQR)] + [2020/09/09 v1.2b Enhanced LaTeX Graphics (DPC,SPQR)] \DeclareOption{unknownkeysallowed} {\PassOptionsToPackage\CurrentOption{keyval}} \DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}} @@ -53,34 +53,6 @@ \Gin@defaultbp\Gin@vlly{#2}% \Gin@defaultbp\Gin@vurx{#3}% \Gin@defaultbp\Gin@vury{#4}}% -\def\Gin@viewport{% - \let\Gin@ollx\Gin@llx - \let\Gin@olly\Gin@lly - \let\Gin@ourx\Gin@urx - \let\Gin@oury\Gin@ury - \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vurx\p@ - \edef\Gin@urx{\strip@pt\dimen@}% - \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vury\p@ - \edef\Gin@ury{\strip@pt\dimen@}% - \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vllx\p@ - \edef\Gin@llx{\strip@pt\dimen@}% - \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vlly\p@ - \edef\Gin@lly{\strip@pt\dimen@}} -\def\Gin@trim{% - \let\Gin@ollx\Gin@llx - \let\Gin@olly\Gin@lly - \let\Gin@ourx\Gin@urx - \let\Gin@oury\Gin@ury - \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vllx\p@ - \edef\Gin@llx{\strip@pt\dimen@}% - \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vlly\p@ - \edef\Gin@lly{\strip@pt\dimen@}% - \dimen@\Gin@urx\p@\advance\dimen@ -\Gin@vurx\p@ - \edef\Gin@urx{\strip@pt\dimen@}% - \dimen@\Gin@ury\p@\advance\dimen@ -\Gin@vury\p@ - \edef\Gin@ury{\strip@pt\dimen@}} -\let\Gin@vllx\Gin@llx\let\Gin@vlly\Gin@llx -\let\Gin@vurx\Gin@llx\let\Gin@vury\Gin@llx \define@key{Gin}{angle} {\Gin@esetsize \@tempswatrue diff --git a/Master/texmf-dist/tex/latex/graphics/lscape.sty b/Master/texmf-dist/tex/latex/graphics/lscape.sty index e4ece0f218d..d9f2daee5a8 100644 --- a/Master/texmf-dist/tex/latex/graphics/lscape.sty +++ b/Master/texmf-dist/tex/latex/graphics/lscape.sty @@ -21,7 +21,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{lscape} - [2000/10/22 v3.01 Landscape Pages (DPC)] + [2020/05/28 v3.02 Landscape Pages (DPC)] \newif\ifGin@pdftex \Gin@pdftexfalse \DeclareOption{pdftex}{% @@ -31,11 +31,11 @@ \DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}} \ProcessOptions \RequirePackage{graphics} -\let\LS@makecol=\@makecol -\let\LS@makefcolumn=\@makefcolumn \def\LS@rot{% \setbox\@outputbox\vbox{\hbox{\rotatebox{90}{\box\@outputbox}}}} \def\landscape{% + \let\LS@makecol=\@makecol + \let\LS@makefcolumn=\@makefcolumn \clearpage \begingroup \vsize=\textwidth diff --git a/Master/texmf-dist/tex/latex/tools/array-2020-02-10.sty b/Master/texmf-dist/tex/latex/tools/array-2020-02-10.sty new file mode 100644 index 00000000000..9fddc0d490f --- /dev/null +++ b/Master/texmf-dist/tex/latex/tools/array-2020-02-10.sty @@ -0,0 +1,374 @@ +%% +%% This is file `array.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% array.dtx (with options: `package,ncols') +%% +%% This is a generated file. +%% +%% The source is maintained by the LaTeX Project team and bug +%% reports for it can be opened at https://latex-project.org/bugs/ +%% (but please observe conditions on bug reports sent to that address!) +%% +%% +%% Copyright (C) 1993-2020 +%% The LaTeX3 Project and any individual authors listed elsewhere +%% in this file. +%% +%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'. +%% -------------------------------------------------------------------------- +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% 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. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle' +%% without such generated files. +%% +%% The list of all files belonging to the LaTeX `Tools Bundle' is +%% given in the file `manifest.txt'. +%% +%% Package `array' to use with LaTeX 2e +%% Copyright (C) 1989-1998 Frank Mittelbach, all rights reserved. +\NeedsTeXFormat{LaTeX2e}[1995/06/01] +\providecommand\DeclareRelease[3]{} +\providecommand\DeclareCurrentRelease[2]{} + +\DeclareRelease{}{2016-10-06}{array-2016-10-06.sty} +\DeclareCurrentRelease{}{2019-10-01} + +\ProvidesPackage{array} + [2020/02/10 v2.4m Tabular extension package (FMi)] +%% + +\def\@addtopreamble#1{\xdef\@preamble{\@preamble #1}} +\def\@testpach{\@chclass + \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else + \ifnum \@lastchclass=7 5 \else + \ifnum \@lastchclass=8 \tw@ \else + \ifnum \@lastchclass=9 \thr@@ + \else \z@ + \ifnum \@lastchclass = 10 \else + \edef\@nextchar{\expandafter\string\@nextchar}% + \@chnum + \if \@nextchar c\z@ \else + \if \@nextchar l\@ne \else + \if \@nextchar r\tw@ \else + \z@ \@chclass + \if\@nextchar |\@ne \else + \if \@nextchar !6 \else + \if \@nextchar @7 \else + \if \@nextchar <8 \else + \if \@nextchar >9 \else + 10 + \@chnum + \if \@nextchar m\thr@@\else + \if \@nextchar p4 \else + \if \@nextchar b5 \else + \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi + \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi} +\def\@xexpast#1*#2#3#4\@@{% + \@tempcnta #2 + \toks@={#1}\@temptokena={#3}% + \let\the@toksz\relax \let\the@toks\relax + \def\@tempa{\the@toksz}% + \ifnum\@tempcnta >0 \@whilenum\@tempcnta >0\do + {\edef\@tempa{\@tempa\the@toks}\advance \@tempcnta \m@ne}% + \let \@tempb \@xexpast \else + \let \@tempb \@xexnoop \fi + \def\the@toksz{\the\toks@}\def\the@toks{\the\@temptokena}% + \edef\@tempa{\@tempa}% + \expandafter \@tempb \@tempa #4\@@} +\def\prepnext@tok{\advance \count@ \@ne + \toks\count@{}} +\def\save@decl{\toks\count@ \expandafter{\@nextchar}} +\def\insert@column{% + \the@toks \the \@tempcnta + \ignorespaces \@sharp \unskip + \the@toks \the \count@ \relax} +\newdimen\col@sep +\def\@acol{\@addtopreamble{\hskip\col@sep}} +\def\@classx{% + \ifcase \@lastchclass + \@acolampacol \or + \@addamp \@acol \or + \@acolampacol \or + \or + \@acol \@firstampfalse \or + \@addamp + \fi} +\def\@classz{\@classx + \@tempcnta \count@ + \prepnext@tok + \@addtopreamble{\ifcase \@chnum + \hfil + \hskip1sp% + \d@llarbegin + \insert@column + \d@llarend \do@row@strut \hfil \or + \hskip1sp\d@llarbegin \insert@column \d@llarend \do@row@strut \hfil \or + \hfil\hskip1sp\d@llarbegin \insert@column \d@llarend \do@row@strut \or + \setbox\ar@mcellbox\vbox + \@startpbox{\@nextchar}\insert@column \@endpbox + \ar@align@mcell + \do@row@strut \or + \vtop \@startpbox{\@nextchar}\insert@column \@endpbox\do@row@strut \or + \vbox \@startpbox{\@nextchar}\insert@column \@endpbox\do@row@strut + \fi}\prepnext@tok} + +\newbox\ar@mcellbox +\def\ar@align@mcell{% + \ifdim \ht\ar@mcellbox > \ht\@arstrutbox + \begingroup + \dimen@\ht\ar@mcellbox + \advance\dimen@-\ht\@arstrutbox + \advance\dimen@\baselineskip + \lower.5\dimen@\box\ar@mcellbox + \endgroup + \else % assume one line and align at baseline + \box\ar@mcellbox + \fi} + +\def\@arrayrule{\@addtopreamble \vline} +\def\@classvii{\ifnum \@lastchclass = \thr@@ + \@preamerr \thr@@ \fi} +\def\@classvi{\ifcase \@lastchclass + \@acol \or + \@addtopreamble{\hskip \doublerulesep}\or + \@acol \or + \@classvii + \fi} +\def\@classii{\advance \count@ \m@ne + \save@decl\prepnext@tok} +\def\@classi{\@classvi + \ifcase \@chnum \@arrayrule \or + \@classv \fi} +\def\@startpbox#1{\bgroup + \color@begingroup + \setlength\hsize{#1}\@arrayparboxrestore + \everypar{% + \vrule \@height \ht\@arstrutbox \@width \z@ + \everypar{}}% + } +\def\@endpbox{\@finalstrut\@arstrutbox \color@endgroup \egroup\hfil} +\def\@array[#1]#2{% + \@tempdima \ht \strutbox + \advance \@tempdima by\extrarowheight + \setbox \@arstrutbox \hbox{\vrule + \@height \arraystretch \@tempdima + \@depth \arraystretch \dp \strutbox + \@width \z@}% + \begingroup + \@mkpream{#2}% + \xdef\@preamble{\noexpand \ialign \@halignto + \bgroup \@arstrut \@preamble + \tabskip \z@ \cr}% + \endgroup + \@arrayleft + \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi \fi + \bgroup + \let \@sharp ##\let \protect \relax + \lineskip \z@ + \baselineskip \z@ + \m@th + \let\\\@arraycr \let\tabularnewline\\\let\par\@empty \@preamble} +\def\arraybackslash{\let\\\tabularnewline} +\newdimen \extrarowheight +\extrarowheight=0pt +\def\@arstrut{\unhcopy\@arstrutbox} +\def\@arraycr{\relax\iffalse{\fi\ifnum 0=`}\fi + \@ifstar \@xarraycr \@xarraycr} +\def\@xarraycr{\@ifnextchar [% + \@argarraycr {\ifnum 0=`{}\fi\cr}} +\def\@argarraycr[#1]{\ifnum0=`{}\fi\ifdim #1>\z@ + \expandafter\@xargarraycr\else + \expandafter\@yargarraycr\fi{#1}} +\def\@xargarraycr#1{\unskip\gdef\do@row@strut + {\@tempdima #1\advance\@tempdima \dp\@arstrutbox + \vrule \@depth\@tempdima \@width\z@\global\let\do@row@strut\relax}% + % \begin{macrocode} + \ifnum\@multicnt >\z@ \do@row@strut \fi + \cr} +\let\do@row@strut\relax +\def\@yargarraycr#1{\cr\noalign{\vskip #1}} +\long\def\multicolumn#1#2#3{% + \multispan{#1}\begingroup + \def\@addamp{\if@firstamp \@firstampfalse \else + \@preamerr 5\fi}% + \@mkpream{#2}\@addtopreamble\@empty + \endgroup + \def\@sharp{#3}% + \@arstrut \@preamble + \null + \ignorespaces} +\let\d@llarbegin\begingroup +\let\d@llarend\endgroup +\def\array{\col@sep\arraycolsep + \def\d@llarbegin{$}\let\d@llarend\d@llarbegin\def\@halignto{}% + \@tabarray} +\def\tabular{\def\@halignto{}\@tabular} +\expandafter\def\csname tabular*\endcsname#1{% + \setlength\dimen@{#1}% + \edef\@halignto{to\the\dimen@}\@tabular} +\def\@tabular{% + \leavevmode + \hbox \bgroup $\col@sep\tabcolsep \let\d@llarbegin\begingroup + \let\d@llarend\endgroup + \@tabarray} +\def\endtabular{\endarray $\egroup} +\expandafter\let\csname endtabular*\endcsname=\endtabular +\let\@ampacol=\relax \let\@expast=\relax +\let\@arrayclassiv=\relax \let\@arrayclassz=\relax +\let\@tabclassiv=\relax \let\@tabclassz=\relax +\let\@arrayacol=\relax \let\@tabacol=\relax +\let\@tabularcr=\relax \let\@@endpbox=\relax +\let\@argtabularcr=\relax \let\@xtabularcr=\relax +\def\@preamerr#1{\def\@tempd{{..} at wrong position: }% + \PackageError{array}{% + \ifcase #1 Illegal pream-token (\@nextchar): `c' used\or %0 + Missing arg: token ignored\or %1 + Empty preamble: `l' used\or %2 + >\@tempd token ignored\or %3 + <\@tempd changed to !{..}\or %4 + Only one column-spec. allowed.\fi}\@ehc} %5 +\def\newcolumntype#1{% + \edef\NC@char{\string#1}% + \@ifundefined{NC@find@\NC@char}% + {\@tfor\next:=<>clrmbp@!|\do + {% + \if\expandafter\noexpand\next\NC@char + \PackageWarning{array}% + {Redefining primitive column \NC@char}\fi}% + \NC@list\expandafter{\the\NC@list\NC@do#1}}% + {\PackageWarning{array}{Column \NC@char\space is already defined}}% + \@namedef{NC@find@\NC@char}##1#1{\NC@{##1}}% + \@ifnextchar[{\newcol@{\NC@char}}{\newcol@{\NC@char}[0]}} +\def\newcol@#1[#2]#3{\expandafter\@reargdef + \csname NC@rewrite@#1\endcsname[#2]{\NC@find#3}} +\def\NC@#1{% + \@temptokena\expandafter{\the\@temptokena#1}\futurelet\next\NC@ifend} +\def\NC@ifend{% + \ifx\next\relax + \else\@tempswatrue\expandafter\NC@rewrite\fi} +\def\NC@do#1{% + \expandafter\let\expandafter\NC@rewrite + \csname NC@rewrite@\string#1\endcsname + \expandafter\let\expandafter\NC@find + \csname NC@find@\string#1\endcsname + \expandafter\@temptokena\expandafter{\expandafter}% + \expandafter\NC@find\the\@temptokena#1\relax} +\def\showcols{{\def\NC@do##1{\let\NC@do\NC@show}\the\NC@list}} +\def\NC@show#1{% + \typeout{Column #1\expandafter\expandafter\expandafter\NC@strip + \expandafter\meaning\csname NC@rewrite@#1\endcsname\@@}} +\def\NC@strip#1:#2->#3 #4\@@{#2 -> #4} +\newtoks\NC@list +\newcolumntype{*}[2]{} +\long\@namedef{NC@rewrite@*}#1#2{% + \count@#1\relax + \loop + \ifnum\count@>\z@ + \advance\count@\m@ne + \@temptokena\expandafter{\the\@temptokena#2}% + \repeat + \NC@find} +\let\@xexpast\relax +\let\@xexnoop\relax +\def\save@decl{\toks \count@ = \expandafter\expandafter\expandafter + {\expandafter\@nextchar\the\toks\count@}} +\def\@mkpream#1{\gdef\@preamble{}\@lastchclass 4 \@firstamptrue + \let\@sharp\relax + \def\@startpbox##1{\unexpanded\expandafter{\expandafter + \@startpbox\expandafter{##1}}}\let\@endpbox\relax + \let\do@row@strut\relax + \let\ar@align@mcell\relax + \@temptokena{#1}\@tempswatrue + \@whilesw\if@tempswa\fi{\@tempswafalse\the\NC@list}% + \count@\m@ne + \let\the@toks\relax + \prepnext@tok + \expandafter \@tfor \expandafter \@nextchar + \expandafter :\expandafter =\the\@temptokena \do + {\@testpach + \ifcase \@chclass \@classz \or \@classi \or \@classii + \or \save@decl \or \or \@classv \or \@classvi + \or \@classvii \or \@classviii + \or \@classx + \or \@classx \fi + \@lastchclass\@chclass}% + \ifcase\@lastchclass + \@acol \or + \or + \@acol \or + \@preamerr \thr@@ \or + \@preamerr \tw@ \@addtopreamble\@sharp \or + \or + \else \@preamerr \@ne \fi + \def\the@toks{\the\toks}} +\let\@classix\relax +\def\@classviii{\ifnum \@lastchclass >\z@\ifnum\@lastchclass=\tw@\else + \@preamerr 4\@chclass 6 \@classvi \fi\fi} +\def\@classv{\save@decl + \expandafter\NC@ecs\@nextchar\extracolsep{}\extracolsep\@@@ + \@addtopreamble{\d@llarbegin\the@toks\the\count@\relax\d@llarend}% + \prepnext@tok} +\def\NC@ecs#1\extracolsep#2#3\extracolsep#4\@@@{\def\@tempa{#2}% + \ifx\@tempa\@empty\else\toks\count@={#1\tabskip#2\relax#3}\fi} +\def\@tabarray{\@ifnextchar[{\@@array}{\@@array[c]}} +\let\@@array\@array +\def\endarray{\crcr \egroup \egroup \@arrayright \gdef\@preamble{}} +\let\@arrayleft\@empty +\let\@arrayright\@empty +\newlength{\extratabsurround} +\setlength{\extratabsurround}{2pt} +\newlength{\backup@length} +\newcommand{\firsthline}{% + \multicolumn1c{% + \global\backup@length\ht\@arstrutbox + \global\advance\backup@length\dp\@arstrutbox + \global\advance\backup@length\arrayrulewidth + \raise\extratabsurround\copy\@arstrutbox + }\\[-\backup@length]\hline +} +\newcommand{\lasthline}{\hline\multicolumn1c{% + \global\backup@length2\ht\@arstrutbox + \global\advance\backup@length2\dp\@arstrutbox + \global\advance\backup@length\arrayrulewidth + }\\[-\backup@length]% + \multicolumn1c{% + \lower\extratabsurround\copy\@arstrutbox + }% +} +\CheckCommand*\@xhline{\ifx\reserved@a\hline + \vskip\doublerulesep + \vskip-\arrayrulewidth + \fi + \ifnum0=`{\fi}} +\renewcommand*\@xhline{\ifx\reserved@a\hline + \vskip\doublerulesep + \fi + \ifnum0=`{\fi}} + +\newsavebox\ar@cellbox +\newcolumntype{w}[2]{% + >{\begin{lrbox}\ar@cellbox}% + c% + <{\end{lrbox}% + \makebox[#2][#1]{\unhbox\ar@cellbox}}} + +\newcolumntype{W}[2] + {>{\begin{lrbox}\ar@cellbox}% + c% + <{\end{lrbox}% + \let\hss\hfil + \makebox[#2][#1]{\unhbox\ar@cellbox}}} +\endinput +%% +%% End of file `array.sty'. diff --git a/Master/texmf-dist/tex/latex/tools/array.sty b/Master/texmf-dist/tex/latex/tools/array.sty index 7afaa6dbadf..28162839cb1 100644 --- a/Master/texmf-dist/tex/latex/tools/array.sty +++ b/Master/texmf-dist/tex/latex/tools/array.sty @@ -42,10 +42,11 @@ \providecommand\DeclareCurrentRelease[2]{} \DeclareRelease{}{2016-10-06}{array-2016-10-06.sty} -\DeclareCurrentRelease{}{2019-10-01} +\DeclareRelease{v2.4}{2020-02-10}{array-2020-02-10.sty} +\DeclareCurrentRelease{}{2020-10-01} \ProvidesPackage{array} - [2019/08/31 v2.4l Tabular extension package (FMi)] + [2020/10/01 v2.5c Tabular extension package (FMi)] %% \def\@addtopreamble#1{\xdef\@preamble{\@preamble #1}} @@ -197,7 +198,6 @@ \ifnum\@multicnt >\z@ \do@row@strut \fi \cr} \let\do@row@strut\relax -\def\@yargarraycr#1{\cr\noalign{\vskip #1}} \long\def\multicolumn#1#2#3{% \multispan{#1}\begingroup \def\@addamp{\if@firstamp \@firstampfalse \else @@ -330,20 +330,22 @@ \setlength{\extratabsurround}{2pt} \newlength{\backup@length} \newcommand{\firsthline}{% - \multicolumn1c{% + \multicolumn1{@{}c@{}}{% \global\backup@length\ht\@arstrutbox \global\advance\backup@length\dp\@arstrutbox \global\advance\backup@length\arrayrulewidth \raise\extratabsurround\copy\@arstrutbox + \kern-1sp% }\\[-\backup@length]\hline } -\newcommand{\lasthline}{\hline\multicolumn1c{% +\newcommand{\lasthline}{\hline\multicolumn1{@{}c@{}}{% \global\backup@length2\ht\@arstrutbox \global\advance\backup@length2\dp\@arstrutbox \global\advance\backup@length\arrayrulewidth }\\[-\backup@length]% - \multicolumn1c{% + \multicolumn1{@{}c@{}}{% \lower\extratabsurround\copy\@arstrutbox + \kern-1sp% }% } \CheckCommand*\@xhline{\ifx\reserved@a\hline @@ -358,15 +360,15 @@ \newsavebox\ar@cellbox \newcolumntype{w}[2]{% - >{\begin{lrbox}\ar@cellbox}% + >{\begin{lrbox}\ar@cellbox\d@llarbegin}% c% - <{\end{lrbox}% - \makebox[#2][#1]{\usebox\ar@cellbox}}} + <{\d@llarend \end{lrbox}% + \makebox[#2][#1]{\unhbox\ar@cellbox}}} \newcolumntype{W}[2] - {>{\begin{lrbox}\ar@cellbox}% + {>{\begin{lrbox}\ar@cellbox\d@llarbegin}% c% - <{\end{lrbox}% + <{\d@llarend\end{lrbox}% \let\hss\hfil \makebox[#2][#1]{\unhbox\ar@cellbox}}} \endinput diff --git a/Master/texmf-dist/tex/latex/tools/varioref.sty b/Master/texmf-dist/tex/latex/tools/varioref.sty index 532d7fa572d..657cf053a45 100644 --- a/Master/texmf-dist/tex/latex/tools/varioref.sty +++ b/Master/texmf-dist/tex/latex/tools/varioref.sty @@ -52,7 +52,7 @@ \DeclareCurrentRelease{}{2019-10-01} \ProvidesPackage{varioref} - [2020/01/23 v1.6c package for extended references (FMi)] + [2020/08/11 v1.6e package for extended references (FMi)] %% @@ -108,6 +108,10 @@ \def\reftextfaraway#1{op bladsy~\pageref{#1}}% \def\reftextpagerange#1#2{op bladsye~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} tot~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{american} {\vref@addto\extrasamerican{% @@ -120,6 +124,10 @@ \def\reftextfaraway#1{on page~\pageref{#1}}% \def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{arabic} {\vref@addto\extrasarabic{% @@ -131,6 +139,10 @@ \def\reftextfaraway#1{بالصفحة رقم~\pageref{#1}}% \def\reftextpagerange#1#2{بالصفحات~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} حتى~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{austrian} {\vref@addto\extrasaustrian{% @@ -142,6 +154,7 @@ \def\reftextfaraway#1{auf Seite~\pageref{#1}}% \def\reftextpagerange#1#2{auf Seiten~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}% + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{naustrian} {\vref@addto\extrasnaustrian{% @@ -153,6 +166,10 @@ \def\reftextfaraway#1{auf Seite~\pageref{#1}}% \def\reftextpagerange#1#2{auf Seiten~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{basque} {\vref@addto\extrasbasque{% @@ -164,6 +181,10 @@ \def\reftextfaraway#1{~\pageref{#1}. orrialdean}% \def\reftextpagerange#1#2{~\pageref{#1}--\pageref{#2} orrialdeetan}% \def\reftextlabelrange#1#2{\ref{#1}.etik \ref{#2}.eraino}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{bahasam} {\vref@addto\extrasbahasam{% @@ -175,6 +196,10 @@ \def\reftextfaraway#1{pada muka surat~\pageref{#1}}% \def\reftextpagerange#1#2{pada muka surat~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1}--\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{brazil} {\vref@addto\extrasbrazil{% @@ -189,6 +214,10 @@ \def\reftextfaraway#1{na p\'agina~\pageref{#1}}% \def\reftextpagerange#1#2{nas p\'aginas~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{breton} {\vref@excuse{breton}% @@ -204,6 +233,10 @@ on pages~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\vref@stringwarning\reflabelpagerange \ref{#1} to~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{bulgarian}% {\vref@addto\extrasbulgarian{% @@ -233,6 +266,10 @@ \cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyri ~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} \cyrd\cyro~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{catalan} {\vref@addto\extrascatalan{% @@ -245,6 +282,10 @@ \def\reftextpagerange#1#2{a les p\`agines~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{croatian} {\vref@addto\extrascroatian{% @@ -256,6 +297,10 @@ \def\reftextfaraway#1{na stranici~\pageref{#1}}% \def\reftextpagerange#1#2{na stranicama~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} do~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{czech} {%\vref@excuse{czech}% @@ -268,6 +313,10 @@ \def\reftextfaraway#1{na stran\v{e}~\pageref{#1}}% \def\reftextpagerange#1#2{na stran\'ach~\pageref{#1}\--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} a\v{z}~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{danish} {\vref@addto\extrasdanish{% @@ -283,6 +332,10 @@ \def\reftextfaraway#1{p\aa{} side~\pageref{#1}}% \def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{dutch} {\vref@addto\extrasdutch{% @@ -299,6 +352,10 @@ \def\reftextfaraway#1{op \refpagename~\pageref{#1}}% \def\reftextpagerange#1#2{op pagina's~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1}--\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{english} {\vref@addto\extrasenglish{% @@ -311,6 +368,10 @@ \def\reftextfaraway#1{on page~\pageref{#1}}% \def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{esperanto} {\vref@addto\extrasesperanto{% @@ -325,6 +386,10 @@ \def\reftextfaraway#1{en pa\^go~\pageref{#1}}% \def\reftextpagerange#1#2{en pa\^goj~\pageref{#1} \^gis \pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} \^gis~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{finnish} {\vref@addto\extrasfinnish{% @@ -338,6 +403,10 @@ \def\reftextfaraway#1{sivulla~\pageref{#1}}% \def\reftextpagerange#1#2{sivuilla~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1}--\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{french} {\vref@addto\extrasfrench{% @@ -350,6 +419,10 @@ \def\reftextfaraway#1{page~\pageref{#1}}% \def\reftextpagerange#1#2{pages~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} \`a~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{galician} {\vref@addto\extrasgalician{% @@ -362,6 +435,10 @@ \def\reftextpagerange#1#2{% nas p\'axinas~\pageref{#1}-\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{german} {\vref@addto\extrasgerman{% @@ -373,6 +450,10 @@ \def\reftextfaraway#1{auf Seite~\pageref{#1}}% \def\reftextpagerange#1#2{auf den Seiten~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{ngerman} {\vref@addto\extrasngerman{% @@ -384,6 +465,10 @@ \def\reftextfaraway#1{auf Seite~\pageref{#1}}% \def\reftextpagerange#1#2{auf den Seiten~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{greek} {\vref@addto\extrasgreek{% @@ -398,6 +483,10 @@ \def\reftextpagerange#1#2{stis sel'ides\nobreakspace \pageref{#1}---\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} ws\nobreakspace\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{icelandic} {\vref@addto\extrasicelandic{% @@ -413,6 +502,10 @@ \def\reftextfaraway#1{\'{a} s\'{i}{\dh}u~\pageref{#1}}% \def\reftextpagerange#1#2{\'{a} s\'{i}{\dh}um~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{italian} {\vref@addto\extrasitalian{% @@ -427,6 +520,26 @@ \def\reftextfaraway#1{a pagina~\pageref{#1}}% \def\reftextpagerange#1#2{nelle pagine~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{da~\ref{#1} a~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat + }} +\DeclareOption{japanese} + {\vref@addto\extrasjapanese{% + \def\reftextfaceafter {\reftextvario{見開き}{次}ページ}% + \def\reftextfacebefore{\reftextvario{見開き}{前}ページ}% + \def\reftextafter {\reftextvario{直後の}{次}ページ}% + \def\reftextbefore {\reftextvario{直前の}{前}ページ}% + \def\reftextcurrent {\reftextvario{この}{現}ページ}% + \def\reftextfaraway#1{\pageref{#1}ページ}% + \def\reftextpagerange#1#2{\pageref{#1}から\pageref{#2}ページ}% + \def\reftextlabelrange#1#2{\ref{#1}から\ref{#2}}% + \def\vrefformat#1#2{\ref{#2}(\vpageref[#1]{#2})}% + \def\Vrefformat#1#2{\Ref{#2}(\vpageref[#1]{#2})}% + \def\fullrefformat#1{\ref{#1}(\reftextfaraway{#1})}% + \def\vrefrangeformat#1#2#3{\reftextlabelrange{#2}{#3}% + (\vpagerefrange[{#1}]{#2}{#3})}% }} \DeclareOption{magyar} {\vref@addto\extrasmagyar{% @@ -442,6 +555,10 @@ on pages~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\vref@stringwarning\reflabelpagerange \ref{#1} to~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }% \AtBeginDocument{\providecommand\aza[1]{a/az% \PackageError{varioref}{% @@ -463,6 +580,10 @@ \def\reftextfaraway#1{p\aa{} side~\pageref{#1}}% \def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{nynorsk} {\vref@addto\extrasnynorsk{% @@ -474,6 +595,10 @@ \def\reftextfaraway#1{p\aa{} side~\pageref{#1}}% \def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{polish} {\vref@addto\extraspolish{% @@ -488,6 +613,10 @@ \def\reftextfaraway#1{na stronie~\pageref{#1}}% \def\reftextpagerange#1#2{na stronach~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{od~\ref{#1} do~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{portuges} {\vref@addto\extrasportuges{% @@ -501,6 +630,10 @@ \def\reftextfaraway#1{na p\'agina~\pageref{#1}}% \def\reftextpagerange#1#2{nas p\'aginas~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{romanian} {\vref@addto\extrasromanian{% @@ -514,6 +647,10 @@ \def\reftextfaraway#1{pe pagina~\pageref{#1}}% \def\reftextpagerange#1#2{pe paginile~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} la~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{russian} {\vref@addto\extrasrussian{% @@ -538,6 +675,10 @@ \def\reftextpagerange#1#2{\cyrn\cyra\ \cyrs\cyrt\cyrr\cyra\cyrn \cyri\cyrc\cyra\cyrh~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\cyrs~\ref{#1}\ \cyrp\cyro~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{slovak} {\vref@addto\extrasslovak{% @@ -553,6 +694,10 @@ \def\reftextfaraway#1{na strane~\pageref{#1}}% \def\reftextpagerange#1#2{na stran\'ach~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} a\v z~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{slovene} {\vref@addto\extrasslovene{% @@ -564,6 +709,10 @@ \def\reftextfaraway#1{na strani~\pageref{#1}}% \def\reftextpagerange#1#2{na straneh~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{od~\ref{#1} do~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{spanish} {\vref@addto\extrasspanish{% @@ -576,6 +725,10 @@ \def\reftextpagerange#1#2{en las p\'aginas~\pageref{#1}% -\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{swedish} {\vref@addto\extrasswedish{% @@ -591,6 +744,10 @@ \def\reftextpagerange#1#2{p\aa\ sidorna~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} till~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{turkish} {\vref@excuse{turkish}% @@ -604,6 +761,7 @@ \def\reftextfaraway#1{on page~\pageref{#1}}% \def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}% + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{ukrainian} {\vref@addto\extrasukrainian{% @@ -626,6 +784,10 @@ \def\reftextpagerange#1#2{\cyrn\cyra\ \cyrs\cyrt\cyro\cyrr\cyrii \cyrn\cyrk\cyra\cyrh~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\cyrz~\ref{#1}\ \cyrd\cyro~\ref{#2}}% + \let\vrefformat\vrefdefaultformat + \let\Vrefformat\Vrefdefaultformat + \let\fullrefformat\fullrefdefaultformat + \let\vrefrangeformat\vrefrangedefaultformat }} \DeclareOption{francais}{% \typeout{Please use `french' instead of `francais'}% @@ -639,7 +801,6 @@ \DeclareOption{space} {\@vrefhandlespacetrue} \DeclareOption{nospace}{\@vrefhandlespacefalse} \ExecuteOptions{english,final,space} -\ProcessOptions* \newcounter{vrcnt} \DeclareRobustCommand\vpageref{\@ifstar {\let\vref@maybe@space\@empty\vp@gerefstar}% @@ -746,9 +907,11 @@ \DeclareRobustCommand\vref{\@ifstar {\vref@star}{\vr@f}} -\newcommand\vref@star[2][]{% +\newcommand\vref@star[1][]{\vrefformat{#1}} +\def\vrefdefaultformat#1#2{% \ref{#2} \vpageref[#1]{#2}} +\let\vrefformat\vrefdefaultformat \def\vr@f{% \leavevmode @@ -764,7 +927,10 @@ \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi} \def\reftextvario#1#2{\ifodd\c@vrcnt #1\else#2\fi} -\def\fullref#1{\ref{#1} \reftextfaraway{#1}} +\newcommand\fullref{\fullrefformat} +\def\fullrefdefaultformat#1{% + \ref{#1} \reftextfaraway{#1}} +\let\fullrefformat\fullrefdefaultformat \def\vref@pagenum#1#2{% \@ifundefined{r@#2}{\@namedef{r@#2}{{??}{??}}}{}% \expandafter\expandafter\expandafter\vref@@pagenum @@ -798,14 +964,18 @@ \fi } \newcommand\vpagerefrange{\@ifstar\@svpagerefrange\@vpagerefrange} -\newcommand\vrefrange[3][\reftextcurrent] - {\reftextlabelrange{#2}{#3} \vpagerefrange[{#1}]{#2}{#3}} +\newcommand\vrefrange[1][\reftextcurrent]{\vrefrangeformat{#1}} +\def\vrefrangedefaultformat#1#2#3{% + \reftextlabelrange{#2}{#3} \vpagerefrange[{#1}]{#2}{#3}} +\let\vrefrangeformat\vrefrangedefaultformat \DeclareRobustCommand\Vref{\@ifstar {\Vref@star}% {\Vr@f}} -\newcommand\Vref@star[2][]{% +\newcommand\Vref@star[1][]{\Vrefformat{#1}} +\def\Vrefdefaultformat#1#2{% \Ref{#2} \vpageref[#1]{#2}} +\let\Vrefformat\Vrefdefaultformat \def\Vr@f{% \if@vrefhandlespace \unskip \vref@space @@ -869,6 +1039,7 @@ \protected@edef\@currentlabel {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}} \fi +\ProcessOptions* \endinput %% %% End of file `varioref.sty'. diff --git a/Master/texmf-dist/tex/latex/tools/verbatim.sty b/Master/texmf-dist/tex/latex/tools/verbatim.sty index ab0f603ba5d..647fe064567 100644 --- a/Master/texmf-dist/tex/latex/tools/verbatim.sty +++ b/Master/texmf-dist/tex/latex/tools/verbatim.sty @@ -39,7 +39,7 @@ %% Copyright (C) 1989--2003 by Rainer Sch\"opf. All rights reserved. \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{verbatim} - [2019/11/10 v1.5r LaTeX2e package for verbatim enhancements] + [2020-07-07 v1.5u LaTeX2e package for verbatim enhancements] \@ifundefined{verbatim@@@}{}{\endinput} \newtoks\every@verbatim \every@verbatim={} @@ -206,8 +206,12 @@ \@ifstar{\verbatim@input\relax}% {\verbatim@input{\frenchspacing\@vobeyspaces}}} \def\verbatim@input#1#2{% - \IfFileExists {#2}{\@verbatim #1\relax - \verbatim@readfile{\@filef@und}\endtrivlist\endgroup\@doendpe}% + \IfFileExists {#2}{% + \expandafter\@swaptwoargs\expandafter + {\expandafter{\@filef@und}}% + {\@verbatim #1\relax + \verbatim@readfile}% + \endtrivlist\endgroup\@doendpe}% {\typeout {No file #2.}\endgroup}} \endinput %% diff --git a/Master/texmf-dist/tex/latex/tools/xr.sty b/Master/texmf-dist/tex/latex/tools/xr.sty index 0344f194e3d..3f448c9f21a 100644 --- a/Master/texmf-dist/tex/latex/tools/xr.sty +++ b/Master/texmf-dist/tex/latex/tools/xr.sty @@ -38,13 +38,14 @@ %% File: xr.dtx Copyright (C) 1993-2019 David Carlisle \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{xr} - [2019/07/22 v5.05 eXternal References (DPC)] + [2020-05-10 v5.06 eXternal References (DPC)] \def\externaldocument{\@ifnextchar[\XR@{\XR@[]}} \let\externalcitedocument\externaldocument \def\XR@[#1]#2{{% \makeatletter \def\XR@prefix{#1}% - \XR@next#2.aux\relax\\}} + \set@curr@file{#2}% + \expandafter\XR@next\@curr@file.aux\relax\\}} \def\XR@next#1\relax#2\\{% \edef\XR@list{#2}% \XR@loop{#1}} @@ -52,7 +53,7 @@ \ifx\XR@list\@empty\else\expandafter\XR@explist\fi} \def\XR@explist{\expandafter\XR@next\XR@list\\} -\def\XR@loop#1{\openin\@inputcheck#1\relax +\def\XR@loop#1{\openin\@inputcheck{#1}\relax \ifeof\@inputcheck \PackageWarning{xr}{^^JNo file #1^^JLABELS NOT IMPORTED.^^J}% \expandafter\XR@aux -- cgit v1.2.3