[latex3-commits] [git/LaTeX3-latex3-latex2e] gh524: Add \tracingstacklevels and \tracinglostchars=3 to trace.dtx (321ff1b8)

PhelypeOleinik phelype.oleinik at latex-project.org
Mon Apr 19 02:58:02 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh524
Link       : https://github.com/latex3/latex2e/commit/321ff1b8a0ea2165214565227e06f03d7f1f5b6e

>---------------------------------------------------------------

commit 321ff1b8a0ea2165214565227e06f03d7f1f5b6e
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Sun Apr 18 21:58:02 2021 -0300

    Add \tracingstacklevels and \tracinglostchars=3 to trace.dtx


>---------------------------------------------------------------

321ff1b8a0ea2165214565227e06f03d7f1f5b6e
 required/tools/trace.dtx | 30 +++++++++++++++++++-----------
 1 file changed, 19 insertions(+), 11 deletions(-)

diff --git a/required/tools/trace.dtx b/required/tools/trace.dtx
index 7ab6e18e..d10243f6 100644
--- a/required/tools/trace.dtx
+++ b/required/tools/trace.dtx
@@ -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 at 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 at ce@n| to setup tracing.
 %    \begin{macrocode}
 \def\traceon{\let\conditionally at traceoff\unconditionally at traceoff
@@ -470,6 +470,8 @@
 %    |\tr at 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 at ce@n{%
-    \@tracingtrue
+  \edef\tr at 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 at traceoff{%
+  \edef\conditionally at 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 at ne
       \showboxdepth\m at ne
-    \fi
+    \noexpand\fi
 %    \end{macrocode}
 %
 %    \begin{macrocode}
     \tracingstats\@ne
+    \ifdefined\tracingstacklevels \tracingstacklevels\z@ \fi
+    \errorcontextlines\m at ne
     \tracingparagraphs\z@
     \tracinggroups\z@
   }





More information about the latex3-commits mailing list.