Thursday, 15 August 2013

Penalty inserted by output routine

Penalty inserted by output routine

I am using plain TeX (actually plain e-TeX) processed by a relatively
recent version of MiKTeX (pdfTeX). Consider the following fragment of code
that can be processed with plain TeX:
\noindent
A\par
\output={\unvbox255}
\break
\vskip 1pt
\noindent
B
\output={\showbox255 \plainoutput}
\end
According to my knowledge, I was expected that as the \break appears, the
output routine re-inject the content of \box255 inside the main vertical
list, the \vskip 1pt be cleaned and a \skip\topskip inserted before the
letter B. But this is not at all what happens: after the output routine
has been first called as the break appears, a \penalty10000 is
(inexplicably) inserted into the main vertical list, and the \vskip 1pt is
not cleaned but left in place (this is shown by the \showbox inside the
definition of the second \output above). Is it a normal behavior of TeX or
is it a bug?

No comments:

Post a Comment