[comp.text] syntax.tex file

rjchen@phoenix.Princeton.EDU (Raymond Juimong Chen) (11/09/88)

Hello, networld.

I'm having a devil of a time trying to get the syntax checker file
(page 401 of the TeXbook) to work.

Here's what I do:
(syntax.tex)

\font\dummy=dummy % dummy is the font with no characters
% redefine all fonts to "dummy"
\let\tenrm=\dummy ... \let\tenit=\dummy
% now eliminate the font families
\textfont0=\dummy \scriptfont0=\dummy \scriptscriptfont0=\dummy
\textfont1=\dummy \scriptfont1=\dummy \scriptscriptfont1=\dummy
\textfont2=\dummy \scriptfont2=\dummy \scriptscriptfont2=\dummy
\textfont3=\dummy \scriptfont3=\dummy \scriptscriptfont3=\dummy
\textfont\itfam=\dummy
\textfont\slfam=\dummy
\textfont\bffam=\dummy \scriptfont\bffam=\dummy \scriptscriptfont\bffam=\dummy
\textfont\ttfam=\dummy
\dummy % select the dummy font
%
\tracinglostchars=0 % don't complain when characters don't exist
%
\output={\setbox0=\box255\deadcycles=0} % make no output
%
\newtoks\output % override any new versions of "output"
%
\frenchspacing % don't play games with spaces
%
\hbadness=10000 % don't complain about underfull boxes
%
\let\immediate=\relax \def\write#1#{{\afterassignment}\toks0=}
% disable write's

(end of file syntax.tex)

Yet when I run it, glue mysteriously appears after mathematical expressions;
I'm guessing that the italic correction for some font is getting used, but
where, and why?

Here's a sample run on the file

(sample.tex)
\tracingall

This is a test.  It contains mathematics.  Like $X$, for example.
It also breaks onto more than one line.
\end

This is TeX, Version 2.3 for Berkeley UNIX (preloaded format=plain 87.10.30)  8 NOV 1988 11:25
**syntax 
(syntax.tex
\output=\toks12
)
*\input sample
(sample.tex
 ... sections deleted ...

Overfull \hbox (0.13269pt too wide) in paragraph at lines 3--5
[]\dummy This is a test. It con-tains math-e-mat-ics. Like $X$, for ex-am-ple. 
It also breaks onto more than one line. |

\hbox(7.5+9.6)x469.75499
.\hbox(0.0+0.0)x20.0
...
.\mathon
.\dummy X
.\kern1.46428    <<<<< where did this come from?
.\mathoff
...
.\dummy l
.\dummy i
.\dummy n
.\dummy e
.\dummy .
.\penalty 10000
.\glue(\parfillskip) 0.0 plus 1.0fil
.\glue(\rightskip) 0.0
.\rule(*+*)x5.0

...

Has anyone out there gotten the syntax macros to work?  And where is
this glue coming from?  (If it is, indeed, an italic correction, then
the character X should be in some font other than \dummy...)

Help?
-- 
Raymond Chen	UUCP: ...allegra!princeton!{phoenix|pucc}!rjchen
		BITNET: rjchen@phoenix.UUCP, rjchen@pucc
		ARPA: rjchen@phoenix.PRINCETON.EDU, rjchen@pucc.PRINCETON.EDU
"Say something, please!  ('Yes' would be best.)" - The Doctor