latex2e
latex2e copied to clipboard
\tracingnone resets too much
Brief outline of the enhancement
Currently \tracingnone
resets all TeX's tracing parameters to zero, which may be a nuisance if a document wants them on throughout, so changing \tracingnone
should restore the tracing parameters to what they were before the \tracingall
instead.
Minimal example showing the current behaviour
See how \nullfont b
doesn't throw an error (whereas it probably should due to the setting in the preamble).
\RequirePackage{latexbug}
\documentclass{article}
\tracinglostchars=3 % I want \tracinglostchars=3 throughout the document
\begin{document}
\nullfont a
\tracingall
% <some debugging>
\tracingnone
\nullfont b % no longer errors
\end{document}
Minimal example showing the desired new behaviour
\tracingall/none
could take an approach similar to what \ExplSyntaxOn/Off
do for catcodes: Normally \tracingnone
is a no-op, then \tracingall
defines \tracingnone
on-the-fly to reset the tracing parameters to what they were when \tracingall
was issued (with proper handling of two consecutive \tracingall
). Here's a sample for some of the parameters:
\RequirePackage{latexbug}
\documentclass{article}
\tracinglostchars=3 % I want \tracinglostchars=3 throughout the document
\let\tracingnone\relax
\def\tracingall{%
\edef\tracingnone{%
\tracinglostchars=\the\tracinglostchars\relax
\tracingmacros=\the\tracingmacros\relax
\tracingonline=\the\tracingonline\relax
% and more
\let\noexpand\tracingnone\relax
}
\tracinglostchars=3
\tracingmacros=2
\tracingonline=1
% and more
}
\begin{document}
\nullfont a
\tracingall
% <some debugging>
\tracingnone
\nullfont b % no longer errors
\end{document}
This issue has been automatically marked as stale because it has not had recent activity.
This issue has been automatically marked as stale because it has not had recent activity.
This issue has been automatically marked as stale because it has not had recent activity.