[tug-summer-of-code] Simplifying TeX's \tracingall output

J.Fine J.Fine at open.ac.uk
Thu Feb 19 14:14:11 CET 2009

Hello Will

You wrote:

> I'm not really sure what this has to do with the LaTeX3 project, to be
> honest. It's impossible to influence the tracing from within TeX
> itself, right? The only useful way to look at this (unless I've missed
> something) is as a postprocessor to the log file.

As you say, all that can be done within TeX is to turn tracing on and
off, and also that we could write tools to analyse the resulting output.

The relation with LaTeX3, in my view, is this: tools to support the
migration of documents and styles from LaTeX2e to LaTeX3.


Thank you for the (snipped) example of LaTeX3 input, tracing and
improved tracing.
> The problem is that this sort of transformation is only feasible (I
> think) for small snippets of code. If you could somehow detect, after
> tokenisation, where the "boundaries" of each piece of expanding code
> existed (i.e., where the line breaks were, originally) then the task
> might be more friendly. 

I'm not sure what you mean here, Will.  To me there seems to be two

1.  When have we come to the end of the expansion of a complex macro.
2.  Where is the source for this macro (file and line range for

If we have both then we would have something like a post-mortem debugger
for TeX, complete with links to source files.  I think this would be
worth having (although beyond the scope of a student project, I fear).

> Although since we're talking about post-
> processing, that should be perfectly feasible as long as you've got
> access to the position in the source file where the trace came from.

Again, I'm not sure what you mean.  Perhaps it's this: Many debuggers
allow you to trace execution through the source file(s) for the program
or script.  And, for example, to set breakpoints, inspect values and
change values.

Well, we can't get all that, but maybe what you're thinking of is
stepping through the macros, as written in the source file.  Is this
what you have in mind?



The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302).

More information about the summer-of-code mailing list