this is not teTeX specific and would better be dicussed on (e.g.)

On 11-Dec-01 Mathis Kretz wrote:
> My question is based on the following assumption: 
> -------------------------------------------------
> Somewhere along the process of compiling a LaTeX (TeTeX) document, all
> macros, defined using \newcommand or \renewcommand are syntactically
> expanded into the document source, similar to the way a C preprocessor
> works.
> (If this assumption turns out to be wrong, my question will not make
> sense.)

Your assumption is wrong. If you want to learn about the internals of TeX I
strongly suggest the TeX book from D.E. Knuth. You won't have to go through
all of it, parts will do to learn the basics ideas.

> My question:
> ------------
> Is there a way of outputting the result of this preprocessing stage to a
> file? Maybe in the form of command line option to the latex command?

Not as you think -- there is no prepocessor. 

BUT you can tell TeX to output all macro expansions in the log file while it
is performing them. 

put something like:
\tracingmacros=1 in your preamble (or beginning of document?) or wherever
you want the detailed macro output to start.
There are more \tracingXXXX command then that (see TeX book).
\tracingcommands=1 will show infos on every processed command. 
normally output is only to the logfile, if you want it online say:

You also can try xxx=2 to get more output (I guess on system commands as
well) and there is a \tracingall as well If it's still not enough debu output

And there is another possibility (which wont help you I think): the macro
packages are somewhat preprocessed after all, but not yet fully expanded when
their definitions are first read. This "memory state" of LaTeX (or plain TeX)
is then dumped as binary image (*.fmt) and normally loaded instead of
preprocessing all macro definitions again. But this is nothing like a
preprocessor output.


Reply via email to