summaryrefslogtreecommitdiff
path: root/macros/latex/required/tools/trace.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/required/tools/trace.dtx')
-rw-r--r--macros/latex/required/tools/trace.dtx34
1 files changed, 21 insertions, 13 deletions
diff --git a/macros/latex/required/tools/trace.dtx b/macros/latex/required/tools/trace.dtx
index 4a08f569bb..d10243f690 100644
--- a/macros/latex/required/tools/trace.dtx
+++ b/macros/latex/required/tools/trace.dtx
@@ -1,8 +1,8 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2020
+% Copyright (C) 1993-2021
%
-% The LaTeX3 Project and any individual authors listed elsewhere
+% The LaTeX Project and any individual authors listed elsewhere
% in this file.
%
% This file is part of the Standard LaTeX `Tools Bundle'.
@@ -33,7 +33,7 @@
%<driver>\ProvidesFile{trace.drv}
% \fi
% \ProvidesFile{trace.dtx}
- [2018/10/13 v1.1e trace LaTeX code]
+ [2021/04/18 v1.1f trace LaTeX code]
%
% \iffalse
%<*driver>
@@ -343,7 +343,7 @@
%
% \begin{macro}{\traceon}
% This macro ensures that |\conditionally@traceoff| is actually
-% turning off switches (since |\tracinall| might have disabled it)
+% turning off switches (since |\tracingall| might have disabled it)
% and then calls |\tr@ce@n| to setup tracing.
% \begin{macrocode}
\def\traceon{\let\conditionally@traceoff\unconditionally@traceoff
@@ -470,6 +470,8 @@
% |\tr@ce@n|, however there is no point in resetting
% |\tracinglostchars| so we leave it alone.
% \changes{v1.1c}{2003/04/30}{Reset \cs{tracingstats} to one}
+% \changes{v1.1f}{2021/04/18}
+% {Add \cs{tracingstacklevels} and \cs{tracinglostchars}=3}
% \begin{macrocode}
% \tracingstats\@ne
%% \tracinglostchars\z@
@@ -498,13 +500,14 @@
% on last (in fact like before we disassemble |\tracingall|
% and reorder it partially).
% \begin{macrocode}
- \def\tr@ce@n{%
- \@tracingtrue
+ \edef\tr@ce@n{%
+ \noexpand\@tracingtrue
\tracingstats\tw@
\tracingpages\@ne
- \tracinglostchars\@ne
+ \tracinglostchars\thr@@
\tracingparagraphs\@ne
\errorcontextlines\maxdimen
+ \ifdefined\tracingstacklevels \tracingstacklevels\maxdimen \fi
% \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
@@ -512,12 +515,12 @@
% \changes{v1.1e}{2018/10/13}{Only reset \cs{tracingoutput} if not
% set by \cs{showoutput} earlier}
% \begin{macrocode}
- \ifnum\tracingoutput=\@ne
- \else
+ \noexpand\ifnum\tracingoutput=\@ne
+ \noexpand\else
\tracingoutput\tw@
\showboxbreadth\maxdimen
\showboxdepth\maxdimen
- \fi
+ \noexpand\fi
% \end{macrocode}
%
% \begin{macrocode}
@@ -543,8 +546,11 @@
% |@tracing| switch and always set the primitives back to zero.
% \changes{v1.1c}{2003/04/30}{Turn off \cs{tracingoutput}}
% \changes{v1.1c}{2003/04/30}{Reset \cs{tracingstats} to one}
+% \changes{v1.1f}{2021/04/18}{Add missing reset of \cs{errorcontextlines}}
+% \changes{v1.1f}{2021/04/18}
+% {Add \cs{tracingstacklevels} and \cs{tracinglostchars}=3}
% \begin{macrocode}
- \def\conditionally@traceoff{%
+ \edef\conditionally@traceoff{%
\tracingassigns\z@
\tracingrestores\z@
\tracingcommands\z@
@@ -557,15 +563,17 @@
% \changes{v1.1e}{2018/10/13}{Only reset \cs{tracingoutput} if not
% set by \cs{showoutput} earlier}
% \begin{macrocode}
- \ifnum\tracingoutput=\tw@
+ \noexpand\ifnum\tracingoutput=\tw@
\tracingoutput\z@
\showboxbreadth\m@ne
\showboxdepth\m@ne
- \fi
+ \noexpand\fi
% \end{macrocode}
%
% \begin{macrocode}
\tracingstats\@ne
+ \ifdefined\tracingstacklevels \tracingstacklevels\z@ \fi
+ \errorcontextlines\m@ne
\tracingparagraphs\z@
\tracinggroups\z@
}