diff options
author | Karl Berry <karl@freefriends.org> | 2018-12-11 22:32:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-12-11 22:32:49 +0000 |
commit | b8f67cb908880c8fdf6b03eb9c4d5219d7409171 (patch) | |
tree | 87574d214a3f39e7293bc54e2b40076ae052bed3 /Master/texmf-dist/source/latex/tools/trace.dtx | |
parent | 6ffd766f7627989e12bfb89d63f908de8c052c81 (diff) |
latex(2e) (11dec18)
git-svn-id: svn://tug.org/texlive/trunk@49390 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/tools/trace.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/tools/trace.dtx | 114 |
1 files changed, 70 insertions, 44 deletions
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 @@ %<driver>\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} |