I am trying to fix two half-paged documents on one document, one on top of the other.

The method below works pretty well so far, but I'm having trouble using 0.5\textheight for the height of the second minipage. When I change 0.49 to 0.5, the second page breaks onto another page. What am I doing wrong? Is there a better way to achieve what I'm looking for?

\parindent = 0.0in

        Page 1
    \end{minipage} \\
        Page 2
| improve this question | | | | |

Adding the lines


to the preamble and then looking in the log file is instructive. Here is the contents of the main text block:

..\vbox(737.15489+0.0)x430.00462, glue set 3.20049fil
...\glue(\topskip) 3.16669
...\hbox(6.83331+361.74413)x430.00462 []
...\penalty 300
...\glue(\lineskip) 1.0
...\hbox(361.20995+0.0)x430.00462 []
...\glue 0.0 plus 1.0fil
...\glue 0.0
...\glue 0.0 plus 0.0001fil

So \topskip and lineskip glue are clearly the culprits here.

You can turn off \topskip glue for a given page by starting it with


and you can turn off interlineskip for a given paragraph by ending it with {\offinterlineskip\par}.

| improve this answer | | | | |
  • Thanks for the trace tips. Adding \hbox{}\kern-\topskip before the beginning of the document seemed to work. – Trey Hunner Oct 18 '10 at 8:28

If you wrap the two minipages in a \vbox and look at the output, the vbox is overfull by just under 1pt.

The real problem is that the two boxes (that is to say the two minipages) are less than \lineskiplimit apart so TeX inserts \lineskip glue between them. The way to handle this is to put \nointerlineskip before the second minipage like this.

        Page 1

        Page 2

Leaving the \vbox there handles the issue with the \topskip.

Alternatively, you can remove the \vbox and add \null\kern-\topskip\nointerlineskip in its place. Again, the \nointerlineskip is necessary to keep TeX from trying to put space between the null hbox and the first minipage.

| improve this answer | | | | |
  • The \vbox and nointerlineskip method works for me and the \null\kern-\topskip\nointerlineskip alternative also works if I add it before the document. Thanks! – Trey Hunner Oct 18 '10 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.