Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why no hyphenation in a \parbox?

276 views
Skip to first unread message

Martin Schroder)

unread,
Aug 2, 1993, 12:10:47 PM8/2/93
to
Hello,
TeX seems to be unable to hyphenate a very long word in a \parbox.
Could somebody please tell me why and how to tell TeX to hyphenate
the word (I don't want to give all possible hyphenations with \- ).

Thanks in advance
Martin

The testfile:
\documentstyle{article}
\pagestyle{empty}
\begin{document}
\showhyphens{supercalifragilistic}
\parbox[b]{5pc}{supercalifragilistic}
\end{document}

The log:
This is TeX, Version 3.141 // 2.6cs (format=LATEX 93.2.19) 1 AUG 1993 22:17
**&latex HYPHENS.TEX
(HYPHENS.TEX
LaTeX Version 2.09 <25 March 1992>
(f:/tex/styles/latex/article.sty
Standard Document Style `article' <14 Jan 92>.
(f:/tex/styles/latex/art10.sty)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
) (HYPHENS.aux)
Underfull \hbox (badness 10000) in paragraph at lines 9--9
[] \tenrm su-per-cal-ifrag-ilis-tic

\hbox(6.94444+1.94444)x16383.99998, glue set 9772.02637 []


Overfull \hbox (19.05573pt too wide) in paragraph at lines 11--11
[]\tenrm supercalifragilistic

\hbox(6.94444+1.94444)x60.0
.\hbox(0.0+0.0)x0.0
.\tenrm s
.\tenrm u
.\tenrm p
.\kern0.27779
.etc.

[1

] (HYPHENS.aux) )
Output written on HYPHENS.dvi (1 page, 228 bytes).


/--------------------------------------------------------------------\
| Martin Schr{\"o}der, L1...@ALF.ZFN.UNI-BREMEN.DE |
|\bye % This is the way the file ends, not with a bang but with a bye|
| Donald E. Knuth, The TeXbook, p340 |

Donald Arseneau

unread,
Aug 3, 1993, 7:13:00 AM8/3/93
to
In article <1993Aug2.1...@informatik.uni-bremen.de>, L1...@ALF.ZFN.UNI-BREMEN.DE writes...

>TeX seems to be unable to hyphenate a very long word in a \parbox.
>\parbox[b]{5pc}{supercalifragilistic}

The problem is not the \parbox, but TeX will not hyphenate the first
word of a paragraph because the paragraph indentation box touches
it. You can start paragraphs with

\hspace*{0pt}supercalifragilistic

which allows hyphenation, but prevents an empty line.

Note that hyphenation probably won't help anyway! There is no stretch
in the word fragment supercalifrag-
so it would be very lucky if the fragment width matched the parbox
width. Narrow parboxes (narrow columns in general) should be formatted
ragged-right.

Donald Arseneau as...@reg.triumf.ca

Bernd Raichle

unread,
Aug 5, 1993, 11:40:10 AM8/5/93
to
In article <1993Aug2.1...@informatik.uni-bremen.de> m...@p103.informatik.Uni-Bremen.DE (Martin Schr"oder) writes:

MS> TeX seems to be unable to hyphenate a very long word in a \parbox.

TeX is able to hyphenate a long word in a \parbox, but he doesn't
hyphenate the first word of a paragraph.

TeXbook, Appendix H: ``TeX looks for potentially hyphenatable words by
searching ahead from each glue item [...]'', but there's no glue item
before the first word of a paragraph.

MS> Could somebody please tell me why and how to tell TeX to hyphenate
MS> the word (I don't want to give all possible hyphenations with \- ).

Put a glue item before the word, e.g. \hspace{0pt}.

-bernd

0 new messages