Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Often I need to recall the different \tracing commands; and a couple of times I stumbled on some webpages that worked fine for me; sadly, I didn't keep them, and my searches don't take me there anymore.

So I thought I'd ask about links to where one can read a list of \tracing commands?

For instance, TRALICS : a LaTeX to XML translator (T) mentions:

\tracingall
\tracingassigns
\tracingcommands
\tracinggroups
\tracingifs
\tracinglostchars
\tracingmacros
\tracingnesting
\tracingonline
\tracingoutput
\tracingpages
\tracingparagraphs
\tracingrestores
\tracingstats
\tracingscantokens

.. but, I'm pretty sure there was something like \tracingboxes (and not so sure if there was something like \tracingglues); yet I cannot find any resources mentioning those.

share|improve this question
3  
The TeXbook, Tex for the Impatient and the e-TeX package documentation can be valuable resources for the \tracing... family. – Gonzalo Medina Jun 20 '12 at 2:30
Thanks for those links, @GonzaloMedina - they look really good! But I was hoping more for a quick, compehensive webpage list (possibly with notes about where the commands come from, e.g. "tracingall" from Latex, "traceon" from trace package, etc..) Thanks again - cheers! – sdaau Jun 20 '12 at 2:38

1 Answer

up vote 21 down vote accepted

Scanning the TeX Book and the TeX program provide the most detail with regards to the \tracing... commands. Also a list is provided online in the TeX Primitive Control Sequences. The combined list includes:

  • \tracingcommands [pi] if positive, writes commands to the .log file.
  • \tracinglostchars [pi] if positive, writes characters not in the current font to the .log file.
  • \tracingmacros [pi] if positive, writes to the .log file when expanding macros and arguments.
  • \tracingonline [pi] if positive, writes diagnostic output to the terminal as well as to the .log file.
  • \tracingoutput [pi] if positive, writes contents of shipped out boxes to the .log file.
  • \tracingpages [pi] if positive, writes the page-cost calculations to the .log file.
  • \tracingparagraphs [pi] if positive, writes a summary of the line-breaking calculations to the .log file.
  • \tracingrestores [pi] if positive, writes save-stack details to the .log file.
  • \tracingstats [pi] if positive, writes memory usage statistics to the .log file.
  • \tracingall turns on every possible mode of interaction

Those marked with [pi] take a parameter argument in the form of an integer. For example, one would use \tracingcommands1.


e-TeX introduces a number of new features in the form of:

  • \tracingassigns [pi] When the program is compiled with the code for collecting statistics and \tracingassigns has a value of 1 or more, all assignments subject to TEX's grouping mechanism are traced.
  • \tracinggroups [pi] a further aid to debugging runaway-group problems, \tracinggroups (an internal read/write integer) causes e-TeX to trace entry and exit to every group while set to a positive non-zero value.
  • \tracingifs [pi] When \tracingifs has a value of 1 or more, all conditionals (including \unless, \or, \else, and \fi) are traced, together with the starting line and nesting level; the \showifs command displays the state of all currently active conditionals.
  • \tracingscantokens [pi] an internal read/write integer, assigning it a positive non-zero value will cause an open-parenthesis and space to be displayed whenever \scantokens is invoked; the matching close-parenthesis will be recorded when the scan is complete. If a traceback occurs during the expansion of \scantokens, the first displayed line number will reflect the logical line number of the pseudo-file created from the parameter to \scantokens; thus enabling \tracingscantokens can assist in identifying why an seemingly irrational line number is shewn as the source of error (the traceback always continues until the line number of the actual source file is displayed).

These additions are explained in the e-TeX system documentation.


TeX for the Impatient defines \tracingboxes:

\def\tracingboxes{\showboxbreadth = \maxdimen
  \showboxdepth = \maxdimen}%
  • \tracingboxes causes boxes to be displayed completely when they're traced. (TeX normally shows only three levels of boxing and five items within each box.)

The xcolor package adds \tracingcolors (from the documentation, section 2.13 Color Information, p 28-29):

  • \tracingcolors=<int> controls the amount of information that is written into the .log file:
    • <int> ≤ 0: no specific colour logging.
    • <int> ≥ 1: ignored colour definitions due to \providecolor are logged.
    • <int> ≥ 2: multiple (i.e. overwritten) colour definitions are logged.
    • <int> ≥ 3: every command that defines a colour will be logged.
    • <int> ≥ 4: every command that sets a colour will be logged.

The etoolbox package adds \tracingpatches (from the documentation, section 3.4 Patching, p 11-12):

Also note that the commands in this section will not automatically issue any error messages if patching fails. Instead, they take a <failure> argument which should provide suitable fallback code or an error message. Issuing \tracingpatches in the preamble will cause the commands to write debugging information to the transcript file.

[...]

\tracingpatches

Enables tracing for all patching commands, including \ifpatchable. The debugging information will be written to the transcript file. This is useful if the reason why a patch is not applied or \ifpatchable yields <false> is not obvious. This command must be issued in the preamble.

Concurrently, regexpatch supplies \tracingxpatches.


share|improve this answer
Many thanks for that list, @Werner! So all of these are tex built-ins, no e-tex (or etex) commands among them? (note to self: cseq.html is quite a large page, and may take a bit to load). – sdaau Jun 20 '12 at 2:44
1  
@sdaau: As far as I can tell, yes. I'll add some more about e-TeX. – Werner Jun 20 '12 at 2:47
Perfect, many thanks for the update @Werner; accepted now, as I believe the list now is as complete as it gets. (now I just wish I could remember where I got that \tracingboxes from :)) Many thanks again - cheers! – sdaau Jun 20 '12 at 3:02
1  
You can add \tracingboxes; a description can be found in TeX for the Impatient. – Gonzalo Medina Jun 20 '12 at 3:02
Great, thanks for that @GonzaloMedina - I was afraid I had otherwise imagined that command :) Cheers! – sdaau Jun 20 '12 at 3:04
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.