From b8f67cb908880c8fdf6b03eb9c4d5219d7409171 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 11 Dec 2018 22:32:49 +0000 Subject: latex(2e) (11dec18) git-svn-id: svn://tug.org/texlive/trunk@49390 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/tools/array.dtx | 131 +++++++++++++++------- Master/texmf-dist/source/latex/tools/multicol.dtx | 81 ++++++++++--- Master/texmf-dist/source/latex/tools/trace.dtx | 114 +++++++++++-------- Master/texmf-dist/source/latex/tools/xr.dtx | 15 ++- Master/texmf-dist/source/latex/tools/xr.ins | 9 ++ 5 files changed, 246 insertions(+), 104 deletions(-) create mode 100644 Master/texmf-dist/source/latex/tools/xr.ins (limited to 'Master/texmf-dist/source/latex/tools') diff --git a/Master/texmf-dist/source/latex/tools/array.dtx b/Master/texmf-dist/source/latex/tools/array.dtx index d8f3687a026..ec597464c04 100644 --- a/Master/texmf-dist/source/latex/tools/array.dtx +++ b/Master/texmf-dist/source/latex/tools/array.dtx @@ -32,7 +32,7 @@ %<+package>\DeclareCurrentRelease{}{2018-04-30} %<+package> %<+package>\ProvidesPackage{array} -%<+package> [2018/04/30 v2.4h Tabular extension package (FMi)] +%<+package> [2018/11/13 v2.4j Tabular extension package (FMi)] % % \fi % @@ -1283,6 +1283,10 @@ % \subsection{The macro \texttt{\textbackslash @mkpream}} % % \begin{macro}{\@mkpream} +% \emph{The code below has been replaced long time ago by an +% extended version further down but the code and its documentation +% was left here for reference. It is now commented out to avoid +% confusion.} % \begin{macro}{\the@toks} % \label{@mkpream} % Now we can define the macro which builds up the preamble for the @@ -1290,7 +1294,7 @@ % First we initialize =\@preamble=, =\@lastchclass= % and the boolean variable =\if@firstamp=. % \begin{macrocode} -\def\@mkpream#1{\gdef\@preamble{}\@lastchclass 4 \@firstamptrue +%\def\@mkpream#1{\gdef\@preamble{}\@lastchclass 4 \@firstamptrue % \end{macrocode} % During the build-up of the preamble we cannot directly use the % =#= sign; this would lead to an error message in the next @@ -1309,7 +1313,7 @@ % macros expand in many \textsf{tokens} which would delay the % build-up of the preamble. % \begin{macrocode} - \let\@sharp\relax \let\@startpbox\relax \let\@endpbox\relax +% \let\@sharp\relax\let\@startpbox\relax\let\@endpbox\relax % \end{macrocode} % Two more are needed to deal with the code that handles struts % for extra space after a row from =\\[]= @@ -1318,27 +1322,27 @@ % \changes{v2.4e}{2016/10/07}{Fixing SX68732} % \changes{v2.4f}{2017/11/04}{Managing m-cells without \cs{vcenter}} % \begin{macrocode} - \let\do@row@strut\relax - \let\ar@align@mcell\relax +% \let\do@row@strut\relax +% \let\ar@align@mcell\relax % \end{macrocode} % Now we remove possible $*$-forms in the user preamble with the % command =\@xexpast=. As we already know, this command saves % its result in the macro =\@tempa=. % \begin{macrocode} - \@xexpast #1*0x\@@ +% \@xexpast #1*0x\@@ % \end{macrocode} % Afterwards we initialize all registers and macros, that we need % for the build-up of the preamble. % Since we want to start with the \textsf{token} register $0$, % =\count@= has to contain the value $-1$. % \begin{macrocode} - \count@\m@ne - \let\the@toks\relax +% \count@\m@ne +% \let\the@toks\relax % \end{macrocode} % Then we call up =\prepnext@tok= in order to prepare the % \textsf{token} register $0$ for use. % \begin{macrocode} - \prepnext@tok +% \prepnext@tok % \end{macrocode} % To evaluate the user preamble (without stars) saved in % =\@tempa= we use the \LaTeX--macro =\@tfor=. @@ -1347,8 +1351,8 @@ % =\@tempa= and not the macro =\@tempa= to this % \LaTeX--macro. % \begin{macrocode} - \expandafter \@tfor \expandafter \@nextchar - \expandafter :\expandafter =\@tempa \do +% \expandafter \@tfor \expandafter \@nextchar +% \expandafter :\expandafter =\@tempa \do % \end{macrocode} % The body of this loop (the group after the =\do=) % is executed for one \textsf{token} at a time, whereas @@ -1359,15 +1363,15 @@ % the character number of this \textsf{token}. % \changes{v2.0f}{1992/02/29}{\cs{@testpach} now without arg} % \begin{macrocode} - {\@testpach +% {\@testpach % \end{macrocode} % Then we branch out depending on the value of =\@chclass= into % different macros that extend the preamble respectively. % \begin{macrocode} - \ifcase \@chclass \@classz \or \@classi \or \@classii - \or \save@decl \or \or \@classv \or \@classvi - \or \@classvii \or \@classviii \or \@classix - \or \@classx \fi +% \ifcase \@chclass \@classz \or \@classi \or \@classii +% \or \save@decl \or \or \@classv \or \@classvi +% \or \@classvii \or \@classviii \or \@classix +% \or \@classx \fi % \end{macrocode} % Two cases deserve our special attention: Since the current % \textsf{token} cannot have the character class $4$ (start) we @@ -1379,29 +1383,29 @@ % =\@lastchclass= to assure that this information will be available % during the next run of the loop. % \begin{macrocode} - \@lastchclass\@chclass}% +% \@lastchclass\@chclass}% % \end{macrocode} % After the loop has been finished space must still be added to % the created preamble, depending on the last \textsf{token}. % Depending on the value of =\@lastchclass= we perform % the necessary operations. % \begin{macrocode} - \ifcase\@lastchclass +% \ifcase\@lastchclass % \end{macrocode} % If the last class equals $0$ we add a % =\hskip \col@sep=. % \begin{macrocode} - \@acol \or +% \@acol \or % \end{macrocode} % If it equals $1$ we do not add any additional space so that the % horizontal lines do not exceed the vertical ones. % \begin{macrocode} - \or +% \or % \end{macrocode} % Class $2$ is treated like class $0$ because a =<{...}= can % only directly follow after class $0$. % \begin{macrocode} - \@acol \or +% \@acol \or % \end{macrocode} % Most of the other possibilities can only appear if the user % preamble was defective. Class $3$ is not allowed since after a @@ -1409,32 +1413,32 @@ % \texttt{r}, \texttt{p},\texttt{m} or \texttt{b}. We report an % error and ignore the declaration given by ={..}=. % \begin{macrocode} - \@preamerr \thr@@ \or +% \@preamerr \thr@@ \or % \end{macrocode} % If =\@lastchclass= is $4$ the user preamble has been empty. % To continue, we insert a =#= in the preamble. % \begin{macrocode} - \@preamerr \tw@ \@addtopreamble\@sharp \or +% \@preamerr \tw@ \@addtopreamble\@sharp \or % \end{macrocode} % Class $5$ is allowed again. In this case % (the user preamble ends with =@{..}=) we need not % do anything. % \begin{macrocode} - \or +% \or % \end{macrocode} % Any other case means that the arguments to =@=, \texttt{!}, % \texttt{<}, \texttt{>}, \texttt{p}, \texttt{m} or \texttt{b} have % been forgotten. So we report an error and ignore the last % \textsf{token}. % \begin{macrocode} - \else \@preamerr \@ne \fi +% \else \@preamerr \@ne \fi % \end{macrocode} % Now that the build-up of the preamble is almost finished we can % insert the \textsf{token} registers and therefore redefine % =\the@toks=. The actual insertion, though, is performed % later. % \begin{macrocode} - \def\the@toks{\the\toks}} +% \def\the@toks{\the\toks}} % \end{macrocode} % \end{macro} % \end{macro} @@ -1593,7 +1597,6 @@ % mode. Therefore we start with a~=$=. % \changes{v2.4f}{2017/11/04}{Managing m-cells without \cs{vcenter}} % \begin{macrocode} -% $\vcenter \setbox\ar@mcellbox\vbox % \end{macrocode} % The part of the templates which is the same in all three cases @@ -1608,9 +1611,8 @@ % \changes{v2.4e}{2016/10/07}{Fixing SX68732} % \changes{v2.4f}{2017/11/04}{Managing m-cells without \cs{vcenter}} % \begin{macrocode} - \@startpbox{\@nextchar}\insert@column \@endpbox - \ar@align@mcell -%$ + \@startpbox{\@nextchar}\insert@column \@endpbox + \ar@align@mcell \do@row@strut \or % \end{macrocode} % The templates for \texttt{p} and \texttt{b} are generated in the @@ -1691,6 +1693,11 @@ % % \begin{macro}{\@classix} +% \emph{The code below has been replaced long time ago by an +% extended version further down but the code and its documentation +% was left here for reference. It is now commented out to avoid +% confusion.} +% % In case of class $9$ (\texttt{>}--\textsf{token}) we first check % if the character class of the last % \textsf{token} was $3$. In this case we have a @@ -1699,28 +1706,33 @@ % So the declarations defined by the first =>{...}= % are ignored. % \begin{macrocode} -\def\@classix{\ifnum \@lastchclass = \thr@@ - \@preamerr \thr@@ \fi +%\def\@classix{\ifnum \@lastchclass = \thr@@ +% \@preamerr \thr@@ \fi % \end{macrocode} % Furthermore, we call up =\@class10= because afterwards always a % new column is started by \texttt{c}, \texttt{l}, \texttt{r}, % \texttt{p}, \texttt{m} or \texttt{b}. % \begin{macrocode} - \@classx} +% \@classx} % \end{macrocode} % \end{macro} % % % % \begin{macro}{\@classviii} +% \emph{The code below has been replaced long time ago by an +% extended version further down but the code and its documentation +% was left here for reference. It is now commented out to avoid +% confusion.} +% % If the current \textsf{token} is a \texttt{<} the last character % class must be $0$. In this case it is not necessary to extend the % preamble. Otherwise we output an error message, set =\@chclass= % to $6$ and call =\@classvi=. By doing this we achieve that % \texttt{<} is treated like \texttt{!}. % \begin{macrocode} -\def\@classviii{\ifnum \@lastchclass >\z@ - \@preamerr 4\@chclass 6 \@classvi \fi} +%\def\@classviii{\ifnum \@lastchclass >\z@ +% \@preamerr 4\@chclass 6 \@classvi \fi} % \end{macrocode} % \end{macro} % @@ -1819,11 +1831,16 @@ % % % \begin{macro}{\@classv} +% \emph{The code below has been replaced long time ago by an +% extended version further down but the code and its documentation +% was left here for reference. It is now commented out to avoid +% confusion.} +% % If the current \textsf{token} is of class $5$ then it is an % argument of a \texttt{@} \textsf{token}. It must be stored into a % \textsf{token} register. % \begin{macrocode} -\def\@classv{\save@decl +%\def\@classv{\save@decl % \end{macrocode} % We extend the preamble with a command which inserts this % \textsf{token} register into the preamble when its construction @@ -1834,11 +1851,11 @@ % \changes{v2.0c}{1990/08/14}{\cs{relax} added to avoid problem % `the`toks0`the`toks1.} % \begin{macrocode} - \@addtopreamble{\d@llarbegin\the@toks\the\count@\relax\d@llarend}% +% \@addtopreamble{\d@llarbegin\the@toks\the\count@\relax\d@llarend}% % \end{macrocode} % Finally we must prepare the next \textsf{token} register. % \begin{macrocode} - \prepnext@tok} +% \prepnext@tok} % \end{macrocode} % \end{macro} % @@ -1868,8 +1885,10 @@ % The width of the \textsf{parbox} is passed as an argument. % =\vcenter=, =\vtop= or =\vbox= are already in the % preamble. So we start with the braces for the wanted box. +% \changes{v2.4i}{2018/09/13}{Add group to prevent color leak (gh/72)} % \begin{macrocode} \def\@startpbox#1{\bgroup + \color@begingroup % \end{macrocode} % The argument is the width of the box. This information has to be % assigned to =\hsize=. @@ -1917,8 +1936,9 @@ % =\@startpbox=. % \changes{v2.2d}{1994/05/16}{Use \LaTeXe \cs{@finalstrut}} % \changes{v2.3g}{1996/05/07}{Add \cs{hfil} for tools/2120} +% \changes{v2.4i}{2018/09/13}{Add group to prevent color leak (gh/72)} % \begin{macrocode} -\def\@endpbox{\@finalstrut\@arstrutbox \egroup\hfil} +\def\@endpbox{\@finalstrut\@arstrutbox \color@endgroup \egroup\hfil} % \end{macrocode} % \end{macro} % @@ -2307,10 +2327,15 @@ % \end{macro} % % \begin{macro}{\@tabarray} +% \emph{The code below has been replaced long time ago by an +% extended version further down but the code and its documentation +% was left here for reference. It is now commented out to avoid +% confusion.} +% % This macro tests for a optional bracket and then calls up % =\@array= or =\@array[c]= (as default). % \begin{macrocode} -\def\@tabarray{\@ifnextchar[{\@array}{\@array[c]}} +%\def\@tabarray{\@ifnextchar[{\@array}{\@array[c]}} % \end{macrocode} % \end{macro} % @@ -2366,6 +2391,11 @@ % \end{macro} % % \begin{macro}{\endarray} +% \emph{The code below has been replaced long time ago by an +% extended version further down but the code and its documentation +% was left here for reference. It is now commented out to avoid +% confusion.} +% % When the processing of \textsf{array} is finished we have to % close the =\halign= % and afterwards the surrounding \textsf{box} selected by @@ -2373,7 +2403,7 @@ % =\@preamble= % because its replacement text isn't longer needed. % \begin{macrocode} -\def\endarray{\crcr \egroup \egroup \gdef\@preamble{}} +%\def\endarray{\crcr \egroup \egroup \gdef\@preamble{}} % \end{macrocode} % \end{macro} % @@ -2675,6 +2705,7 @@ {\expandafter\@nextchar\the\toks\count@}} % \end{macrocode} % \end{macro} +% % \begin{macro}{\@mkpream} % The main modification to "\@mkpream" is to replace the call to % "\@xexpast" (which expanded $*$-forms) by a loop which expands @@ -2683,7 +2714,23 @@ % \changes{v2.4f}{2017/11/04}{Managing m-cells without \cs{vcenter}} % \begin{macrocode} \def\@mkpream#1{\gdef\@preamble{}\@lastchclass 4 \@firstamptrue - \let\@sharp\relax \let\@startpbox\relax \let\@endpbox\relax + \let\@sharp\relax +% \end{macrocode} +% +% \changes{v2.4j}{2018/11/13}{Do not expand argument of +% \cs{@startpbox} while building the tabular preamble (sx/459285)} +% The "\@startpbox" (which is called for "p", "m" or "b" columns) +% receives a user supplied argument: the width of the +% paragraph-column. Normally that is something harmless like a length or a +% simple length expression, but with the calc package involved it +% could break under an "\edef" operation, which is how the preamble +% is constructed. We now make use of "\unexpanded" here to prevent that. The +% "\expandafter" gymnastics is necessary to expand the "#1" at least +% once (since it will get "\@nextchar" as its value and need its +% content! +% \begin{macrocode} + \def\@startpbox##1{\unexpanded\expandafter{\expandafter + \@startpbox\expandafter{##1}}}\let\@endpbox\relax \let\do@row@strut\relax \let\ar@align@mcell\relax % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/tools/multicol.dtx b/Master/texmf-dist/source/latex/tools/multicol.dtx index b347d3e80b5..1962ec24e59 100644 --- a/Master/texmf-dist/source/latex/tools/multicol.dtx +++ b/Master/texmf-dist/source/latex/tools/multicol.dtx @@ -98,7 +98,7 @@ % \ProvidesFile{multicol.drv} % \fi % \ProvidesFile{multicol.dtx} - [2018/04/20 v1.8s multicolumn formatting (FMi)] + [2018/11/09 v1.8u multicolumn formatting (FMi)] % % %% @@ -3899,8 +3899,24 @@ not make sense.\MessageBreak Going to balance anyway}% \else - \let\balance@columns@out - \multi@column@out +% \end{macrocode} +% If we aren't balancing we change the |\balance@columns@out| to +% work like the normal output routine that cuts normal +% pages. However, there is a catch: In case the last page we cut +% (after seeing the end of the environment) is actually larger than +% a page (for example, if it contains more |\columnbreak| commands +% than columns) we end up with some leftover material that is +% returned to the main galley, but now the environment end penalty +% is missing. So we add another one here too. Of course that +% shouldn't be done if there is really only a single final page, +% but fortunately in that case we have just finished a page and any +% penalty on the recent contributions will be discarded, thus the +% extra one is harmless---puh. +% \changes{v1.8t}{2018/06/26}{Re-add end penalty for +% \texttt{multicols*} environment to guard against leftovers (git/53)} +% \begin{macrocode} + \def\balance@columns@out + {\multi@column@out \penalty-\@Mvi }% \fi \begin{multicols} } @@ -4217,8 +4233,16 @@ % \begin{macro}{\docolaction} % +% The \verb=\docolaction= scans for a star and optional argument +% and 3 mandatory ones, but we do this in chunks (not having xparse +% available). +% +% \changes{v1.8u}{2018/11/09}{Support star with \cs{docolaction}} +% \begin{macrocode} +\newcommand\docolaction{% +% \end{macrocode} +% First check is the support is enabled. % \begin{macrocode} -\newcommand\docolaction[4][1]{% \ifx\mc@col@status@write\relax \PackageError{multicol}% {Option 'colaction' not selected}% @@ -4226,6 +4250,9 @@ requires the use of the 'colaction' option on the package}% \fi +% \end{macrocode} +% Then prepare \verb=\mc@col@type=. +% \begin{macrocode} \global\advance\mc@col@check@num\@ne \edef\mc@col@type{\expandafter\ifx \csname mc@col-\the\mc@col@check@num @@ -4233,7 +4260,36 @@ 0\else \csname mc@col-\the\mc@col@check@num \endcsname - \fi}% + \fi}% +% \end{macrocode} +% Finally check for a star, record this information and then call +% \verb=\@docolaction= to do the rest. +% \begin{macrocode} + \@ifstar + {\@docolactionstartrue \@docolaction}% + {\@docolactionstarfalse\@docolaction}% +} +% \end{macrocode} +% +% \begin{macrocode} +\newcommand\@docolaction[4][1]{% +% \end{macrocode} +% +% How does the column number get associated with our label? We +% do do this by writing another line into the aux file. Here are the +% preparations. +% \begin{macrocode} + \edef\@docolactioncheck{\write\@auxout + {\string\mc@set@col@status + {mc@col-\the\mc@col@check@num}% + {\mc@col@type}}}% +% \end{macrocode} +% Where we do the actual \verb=\write= depends on the whether or +% not we gave seen a \texttt{*}. If yes, we do it first and then +% execute the code argument, otherwise we execute that code first +% and check at the point after that. +% \begin{macrocode} + \if@docolactionstar \@docolactioncheck \fi % \end{macrocode} % We prefix with 0 so that an unknown label (that returns % \verb=\relax=) will result in case 0 @@ -4256,21 +4312,20 @@ \or #4% % 3 last col \else - \ERROR + \ERRORwrongdefaultgiven \fi % \end{macrocode} -% But how does the column number get associated with our label? We -% do do this by writing another line into the aux file at this point: % \begin{macrocode} - \edef\next{\write\@auxout - {\string\mc@set@col@status - {mc@col-\the\mc@col@check@num}% - {\mc@col@type}}}% - \next + \if@docolactionstar \else \@docolactioncheck \fi } % \end{macrocode} % \end{macro} % +% Here is the if used above: +% \begin{macrocode} +\newif\if@docolactionstar +% \end{macrocode} +% % Because of extra data writing to the aux file the aux file will % now contain something like the following after the document is % processed the first time: diff --git a/Master/texmf-dist/source/latex/tools/trace.dtx b/Master/texmf-dist/source/latex/tools/trace.dtx index 422c43e0713..dabec8aa006 100644 --- a/Master/texmf-dist/source/latex/tools/trace.dtx +++ b/Master/texmf-dist/source/latex/tools/trace.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright 1993-2016 +% Copyright 1993-2018 % % The LaTeX3 Project and any individual authors listed elsewhere % in this file. @@ -22,7 +22,7 @@ % \fi % \iffalse %% -%% (C) Copyright 1999-2014 Frank Mittelbach +%% (C) Copyright 1999-2018 Frank Mittelbach %% All rights reserved. %% %<*dtx> @@ -33,7 +33,7 @@ %\ProvidesFile{trace.drv} % \fi % \ProvidesFile{trace.dtx} - [2014/10/28 v1.1d trace LaTeX code] + [2018/10/13 v1.1e trace LaTeX code] % % \iffalse %<*driver> @@ -355,13 +355,14 @@ % \changes{v1.1c}{2003/04/30}{Macro added} % \begin{macro}{\conditionally@traceoff} % As stated in the introduction, the amount of tracing being done -% should depend on the formatter we use. So we first test if we are +% should depend on the formatter we use. Initially first test if we are % running with \eTeX{} in extended mode. In the latter case the command -% |\tracinggroups| is defined.\footnote{If some package writer has defined -% that command name for some reason---too bad---then we make the -% wrong deduction from this fact and as a result the package will fail.} +% |\tracinggroups| is defined. +% But for a number of years now \LaTeX{} only works with \eTeX{} so +% we drop that part of the code. For now I leave it in the file +% together with its documentation, but commented out. % \begin{macrocode} -\ifx\tracinggroups\undefined +%\ifx\tracinggroups\undefined % \end{macrocode} % % If we are using standard \TeX{} then |\tr@ce@n| is more or less @@ -402,31 +403,31 @@ % nothing whatsoever since the noise generating switches are set at % the very end. % \begin{macrocode} - \def\tr@ce@n{% +% \def\tr@ce@n{% % \end{macrocode} % We start by setting the |@tracing| switch to signal that tracing % is asked for. This is then followed by setting the various % tracing primitives of \TeX. % \begin{macrocode} - \@tracingtrue - \tracingstats\tw@ - \tracingpages\@ne - \tracinglostchars\@ne - \tracingparagraphs\@ne - \errorcontextlines\maxdimen - \tracingoutput\@ne - \showboxbreadth\maxdimen - \showboxdepth\maxdimen - \errorstopmode - \tracingmacros\tw@ - \tracingrestores\@ne - \tracingcommands\tw@ +% \@tracingtrue +% \tracingstats\tw@ +% \tracingpages\@ne +% \tracinglostchars\@ne +% \tracingparagraphs\@ne +% \errorcontextlines\maxdimen +% \tracingoutput\@ne +% \showboxbreadth\maxdimen +% \showboxdepth\maxdimen +% \errorstopmode +% \tracingmacros\tw@ +% \tracingrestores\@ne +% \tracingcommands\tw@ % \end{macrocode} % The setting of |\tracingonline| depends on the option % \texttt{logonly}: % \begin{macrocode} - \tracingonline\tracingonline@p - } +% \tracingonline\tracingonline@p +% } % \end{macrocode} % % Now what should |\conditionally@traceoff| do in this case? Should @@ -454,15 +455,15 @@ % value they already have). % \changes{v1.1c}{2003/04/30}{Turn off \cs{tracingoutput}} % \begin{macrocode} - \def\conditionally@traceoff{% - \tracingrestores\z@ - \tracingcommands\z@ - \tracingpages\z@ - \tracingmacros\z@ - \tracingparagraphs\z@ - \tracingoutput\z@ - \showboxbreadth\m@ne - \showboxdepth\m@ne +% \def\conditionally@traceoff{% +% \tracingrestores\z@ +% \tracingcommands\z@ +% \tracingpages\z@ +% \tracingmacros\z@ +% \tracingparagraphs\z@ +% \tracingoutput\z@ +% \showboxbreadth\m@ne +% \showboxdepth\m@ne % \end{macrocode} % % As remarked above there are more tracing switches set by @@ -470,22 +471,22 @@ % |\tracinglostchars| so we leave it alone. % \changes{v1.1c}{2003/04/30}{Reset \cs{tracingstats} to one} % \begin{macrocode} - \tracingstats\@ne -% \tracinglostchars\z@ +% \tracingstats\@ne +%% \tracinglostchars\z@ % \end{macrocode} % Since this is the command that only conditionally turns off % tracing we do not touch the |@tracing| switch. This way a % |\conditionally@traceon| will be able to turn the tracing on % again. % \begin{macrocode} - } +% } % \end{macrocode} % % That covers the case for the standard \TeX{} program. If % |\tracingsgroups| was defined we assume that we are running with % \eTeX{} in extended mode. % \begin{macrocode} -\else +%\else % \end{macrocode} % % In that case |\tr@ce@n| does more than |\tracingall|: it also @@ -504,9 +505,22 @@ \tracinglostchars\@ne \tracingparagraphs\@ne \errorcontextlines\maxdimen - \tracingoutput\@ne - \showboxbreadth\maxdimen - \showboxdepth\maxdimen +% \end{macrocode} +% We only change |\tracingoutput| if it hasn't already been enabled by +% |\showoutput|. If that's not the case, we set it to 2 so that we +% can distingush the two cases. +% \changes{v1.1e}{2018/10/13}{Only reset \cs{tracingoutput} if not +% set by \cs{showoutput} earlier} +% \begin{macrocode} + \ifnum\tracingoutput=\@ne + \else + \tracingoutput\tw@ + \showboxbreadth\maxdimen + \showboxdepth\maxdimen + \fi +% \end{macrocode} +% +% \begin{macrocode} \errorstopmode \tracingmacros\tw@ \tracinggroups\@ne @@ -536,9 +550,21 @@ \tracingcommands\z@ \tracingpages\z@ \tracingmacros\z@ - \tracingoutput\z@ - \showboxbreadth\m@ne - \showboxdepth\m@ne +% \end{macrocode} +% If |\tracingoutput| is 2 it was set above, if it is 1 it was set +% by |\showoutput| and we leave it alone and if it is 0 there is +% nothing to do as well. +% \changes{v1.1e}{2018/10/13}{Only reset \cs{tracingoutput} if not +% set by \cs{showoutput} earlier} +% \begin{macrocode} + \ifnum\tracingoutput=\tw@ + \tracingoutput\z@ + \showboxbreadth\m@ne + \showboxdepth\m@ne + \fi +% \end{macrocode} +% +% \begin{macrocode} \tracingstats\@ne \tracingparagraphs\z@ \tracinggroups\z@ @@ -548,7 +574,7 @@ % This concludes the part that depends on the formatter being % used. % \begin{macrocode} -\fi +%\fi % \end{macrocode} % \end{macro} % \end{macro} diff --git a/Master/texmf-dist/source/latex/tools/xr.dtx b/Master/texmf-dist/source/latex/tools/xr.dtx index 5cd0cebc4bc..c4bd41e9164 100644 --- a/Master/texmf-dist/source/latex/tools/xr.dtx +++ b/Master/texmf-dist/source/latex/tools/xr.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % % Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 -% 2006 2008 2009 +% 2006 2008 2009 2018 % The LaTeX3 Project and any individual authors listed elsewhere % in this file. % @@ -21,11 +21,11 @@ % % \fi % \iffalse -%% File: xr.dtx Copyright (C) 1994-1994 David Carlisle +%% File: xr.dtx Copyright (C) 1994-1994 2018 David Carlisle % %\NeedsTeXFormat{LaTeX2e} %\ProvidesPackage{xr} -% [1994/05/28 v5.02 eXternal References (DPC)] +% [2018/10/01 v5.03 eXternal References (DPC)] % %<*driver> \documentclass{ltxdoc} @@ -56,6 +56,7 @@ % aux files of \cmd\include'ed files. (Reported by J-PD)} % % \changes{v5.02}{1994/05/28}{Update for LaTeX2e} +% \changes{v5.02}{1994/05/28}{Fix for conditionals in aux file} % % % This package implements a system for eXternal References. @@ -152,13 +153,17 @@ % filename to the list of files to process. Otherwise ignore. % Go around the loop if not at end of file. Finally process the next % file in the list. +% +% 2018 update: make sure the arguments are handled outside the |\ifx| test, % \begin{macrocode} \long\def\XR@test#1#2#3#4\XR@{% + \let\XR@next\@gobbletwo \ifx#1\newlabel - \newlabel{\XR@prefix#2}{#3}% + \let\XR@next\@firstoftwo% \else\ifx#1\@input - \edef\XR@list{\XR@list#2\relax}% + \let\XR@next\@secondoftwo \fi\fi + \XR@next{\newlabel{\XR@prefix#2}{#3}}{\edef\XR@list{\XR@list#2\relax}}% \ifeof\@inputcheck\expandafter\XR@aux \else\expandafter\XR@read\fi} % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/tools/xr.ins b/Master/texmf-dist/source/latex/tools/xr.ins new file mode 100644 index 00000000000..b34a2ac87ae --- /dev/null +++ b/Master/texmf-dist/source/latex/tools/xr.ins @@ -0,0 +1,9 @@ +\input docstrip + +\def\SimplePackage#1{% + \generate{\file{#1.sty}{\from{#1.dtx}{package}}}} + +\keepsilent +\SimplePackage{xr} + +\endbatchfile \ No newline at end of file -- cgit v1.2.3