3

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?

1 Answer 1

6

TeX only discards the skips if there are no boxes in the current page. The penalty of 10000 arises because of the following as described in the TeXBook:

When the best page break is finally chosen, TeX removes everything after the chosen breakpoint from the bottom of the current page, and puts it all back at the top of the recent contributions. The chosen breakpoint itself is placed at the very top of the recent contributions. If it is a penalty item, the value of the penalty is recorded in \outputpenalty and the penalty in the contribution list is changed to 10000; otherwise \outputpenalty is set to 10000.

2
  • Thx for your answer. I am trying to use a "transparent" output routine to track the footnotes inserted up to the current point, and I would like it be as transparent as possible. I know no other method but to put a \break to invoke the ouput routine. But then, this penalty appears in the main vertical list. Is there a mean to remove it (or at least to make it harmless, say, by introducing a void box before the break)?
    – MikeTeX
    Aug 15, 2013 at 21:52
  • @MikeTeX look at \holdinginserts Aug 15, 2013 at 22:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .