The Tex Book (20th printing, 1991) describes the \shipout<box> primitive as follows (p. 279).

After the <box> is formed — possibly by constructing it explicitly and changing modes during the construction, as explained for \hbox earlier — its contents are sent to the dvi file

Based on this description, I would expect the pdf for the following plain TeX manuscript

\shipout\hbox{Hello, }%

to comprise a single page with the one-liner:

Hello, world!

Instead, it comprises two pages:

  1. Hello,

  2. world!


  • 3
    Your expectation is wrong: every \shipout operation ships out a page.
    – egreg
    Aug 8, 2017 at 15:20
  • 3
    \shipout is the only way to make a new page in an output file as far as I know. Aug 8, 2017 at 15:20
  • 1
    Do you mean the TeX Book?
    – cfr
    Aug 8, 2017 at 15:54

1 Answer 1


Your expectations are not in line with TeX’s, I’m afraid. If you look at page 227, last doubly dangerous paragraph, you can read

Sometimes you don't want TeX to defer a \write or \openout or \closeout. You could say, e.g., ‘\shipout\hbox{\write...}’, but that would put an unwanted empty page in your dvi file.

Every \shipout operation ships out a page in the DVI file (or PDF, in case of pdftex with \pdfoutput=1).

With \shipout<box>, the box is built, then delivered in the proper format to the DVI (or PDF) file and finally removed from memory.

Note that \shipout, by itself, has no effect on the main vertical list: it's normally the output routine that manages it and usually calls \shipout\box255 at the appropriate time, thus outputting a new page. So if you do





you will get two pages: one with “DEF” and the other one with the two lines “ABC” and “GHI”.

You must log in to answer this question.

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