Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In the transcript of

\nonstopmode
\tenrm
\vsize=2cm

\output={\shipout\vbox{
  \showlists
  \unvbox255
}}

\hbox{blah}
\hbox{blah}
\hbox{blah}
\hbox{blah}
\hbox{blah}
\hbox{blah}
\hbox{blah}
\hbox{blah}
\hbox{blah}

\bye

the \showlists in my output routine gives me in each except the last iteration:

### recent contributions:
\glue(\baselineskip) 5.05556
\hbox(6.94444+0.0)x18.88895
.\tenrm b
.\tenrm l
.\tenrm a
.\tenrm h
\glue(\baselineskip) 5.05556
\hbox(6.94444+0.0)x18.88895
.\tenrm b
.\tenrm l
.\tenrm a
.\tenrm h
prevdepth 0.0

Why are there two of the hbox-es and not three or one (which I'd expect most)?

share|improve this question
1  
Why not? Probably one \hbox had been moved before deciding the page break and so it has been put back in the recent contributions. It's hard to diagnose with a system font, as they tend to be different from system to system. Try with a standard distribution font, so that everybody can test the same setting (I don't get your log, for example). –  egreg Dec 15 '11 at 18:04
    
Maybe I don't understand the MVL->page-builder->output-routine sequence. I understand that usually the page-builder (and subsequent the output-routine) is run between paragraphs. Since here are no paragraphs, what is triggering the run? About the font: Such as \tenrm? Updated the question. –  AndreKR Dec 16 '11 at 0:40
add comment

1 Answer

TeX exercises the page builder (TeXbook, page 281) also when it finds a <box> in vertical mode (page 282).

When the page builder is exercised, something from the recent contribution list is carried to the main vertical list, in order to see whether a page must be ejected. In your case, \tracingpages=1 gives

%% goal height=56.9055, max depth=4.0
% t=10.0 g=56.9055 b=10000 p=0 c=100000#
% t=22.0 g=56.9055 b=10000 p=0 c=100000#
% t=34.0 g=56.9055 b=10000 p=0 c=100000#
% t=46.0 g=56.9055 b=10000 p=0 c=100000#
% t=58.0 g=56.9055 b=* p=0 c=*

The page break calculations show that a page break is taken between boxes 4 and 5, so that box 5 is put back in the list of recent contributions, where box 6 is already there, because otherwise TeX wouldn't have known that a legitimate break point was possible.

If instead of blah we put blah1, blah2 and so on in the boxes, the recent contribution list shows indeed

### recent contributions:
\glue(\baselineskip) 5.05556
\hbox(6.94444+0.0)x23.88896
.\tenrm b
.\tenrm l
.\tenrm a
.\tenrm h
.\tenrm 5
\glue(\baselineskip) 5.05556
\hbox(6.94444+0.0)x23.88896
.\tenrm b
.\tenrm l
.\tenrm a
.\tenrm h
.\tenrm 6
prevdepth 0.0
share|improve this answer
    
When it finds a what? –  AndreKR Dec 16 '11 at 15:09
    
@AndreKR A <box>; sorry. –  egreg Dec 16 '11 at 15:10
    
Why didn't this already happen after box 5? –  AndreKR Dec 16 '11 at 17:05
    
@AndreKR Until box 6 doesn't appear into the recent contribution list, TeX doesn't know that there's a legitimate break point after box 5. –  egreg Dec 16 '11 at 17:09
    
I see, and then again why it doesn't wait until after box 7 to see if there is another possible breakpoint after box 6? Because it dit already find that the breakpoint after box 5 is bad? –  AndreKR Dec 16 '11 at 17:27
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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