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.

Consider the following example (Plain TeX):

%%%%%

Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt-

Test.

\end

%%%%%

The first line produces a paragraph ended by dash with (small) overfull. For some strange reason TeX leaves an extra (empty) line after this paragraph (with corresponding "Underfull \hbox (badness 10000)" message in log file). Any explanations of such behaviour? TIA

share|improve this question

2 Answers 2

It appears to be because the hyphen implies a discretionary break after it. Since the line is overfull no matter what, the break is taken, and leaves a lone space token that winds up on a line of its own.

If you insert

\showboxbreadth=999
\showboxdepth=999
\showlists

after the long line (with a blank line in between), you will see this in the log file:

### vertical mode entered at line 0
### current page:
\glue(\topskip) 3.16669
\hbox(6.83331+0.0)x469.75499
.\hbox(0.0+0.0)x20.0
.\tenrm T
.\tenrm t
.\tenrm t
…
.\tenrm t
.\tenrm t
.\tenrm -
.\discretionary
.\glue(\rightskip) 0.0
.\rule(*+*)x5.0
\penalty 400
\glue(\baselineskip) 12.0
\hbox(0.0+0.0)x469.75499
.\glue(\rightskip) 0.0
total height 22.0
 goal height 643.20255
prevdepth 0.0, prevgraf 2 lines

Interestingly, there is no \parfillskip there, so maybe my theory is lacking some piece of the puzzle. But you do get the same result if the dash is replaced by \discretionary{}{}{}.

share|improve this answer

TeX breaks the line because of the dash. You could use \hbox to prevent that. If you end that line this way

...tttttt\hbox{-}

the extra line would go away.

share|improve this answer

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.