[OS X TeX] Single-stepping through TeX

Peter Dyballa Peter_Dyballa at Web.DE
Fri Nov 18 23:05:39 CET 2011

Am 18.11.2011 um 20:47 schrieb Doug McKenna:

> Although there's a directory in the distribution tree for web2c, I can't 
> find any executables or sources or directions that make it easy (no doubt 
> for some value of "easy") to convert TeX's source code into final 
> runnable C code for the command line program "tex".

There at least two source files: texk/web2c/tex.web and texk/web2c/tex.ch. The former is the original and frozen source, the latter is a series of patches.

Modern pdfTeX has texk/web2c/pdftexdir/pdftex.web and and also CHange files, but it's actually based on eTeX, a series of patches for original TeX, found in texk/web2c/etexdir. Here the file tex.ech visualises one step of the build:

	%	pdfetexdir/tex.ch0	)
	%	   +			)
	%	tex.ch			)
	%	   +			)
	%	etexdir/tex.ch1		)
	%	   +			)   =>   tie -c ...   =>   pdfetex.ch
	%	etexdir/tex.ech		)
	%	   +			)
	%	pdfetexdir/tex.ch1	)
	%	   +			)
	%	pdftexdir/tex.pch	)

The cweave programme converts the WEB and CHange files to a TEX output file, the documentation, the ctangle programme creates from the same input a C output file. This can be compiled with a C compiler. But this is not sufficient. You also need to compile libkpathsea.

It might help to look into Fink or MacPorts. They have kind of "control files" which make TeX Live build.



Theory and practice are the same, in theory, but, in practice, they are different.

More information about the macostex-archives mailing list