home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!news.service.uci.edu!unogate!mvb.saic.com!info-tex
- From: "Daniel H. Luecking" <DL24794@UAFSYSB.UARK.EDU>
- Newsgroups: comp.text.tex
- Subject: \raggedright
- Message-ID: <9783302@MVB.SAIC.COM>
- Date: Mon, 21 Dec 92 10:40:13 CST
- Organization: Info-Tex<==>Comp.Text.Tex Gateway
- X-Gateway-Source-Info: Mailing List
- Lines: 40
-
-
- >From: <mroth@afit.af.mil>
- >Subject: fixed width fonts
- >
- > ...
- >Is there a way to get raggedright and hyphenation at the same time? I would
- >like this for use with a fixed width font. If you don't have hyphenation
- >then large, hyphenatable words that could be split at the end of the line
- >will be forced to the next line leaving large white spaces on the previous
- >line.
- ...
- >I can only get rid of overful boxes in the fixed width font with \tolerance
- >= 10000 or by using \raggedright, both of which have the
- >effect of turning off hyphenation. Any ideas?
- >
- >Mark Roth
-
- The effect you want is exactly the effect that \raggedright has IN PLAIN TeX.
- Apparently, LaTeX uses a different definition. In plain TeX the definition
- of \raggedright is more-or-less the following:
-
- \def\raggedright{\rightskip=0pt plus 2em ... }
-
- where the ... indicates commands which remove the stretchability of interword
- spaces. This makes all lines have uniform spacing (to improve legibility?).
- Knuth indicates in the TeXbook that you may wish to retain this
- stretchability. If you omit those commands, you should replace them
- with \relax.
-
- My guess is that LaTeX's \raggedright puts \rightskip=0pt plus 1fil . This
- makes the initial (nonhyphenating) pass produce good lines (by TeX's measure
- demerit counting) simply because all lines can be filled at the right with
- as much space as necessary.
-
- Increasing the "2em" in the definition above will give more ragged lines and
- fewer hyphens. Decreasing it will have the opposite effect. If you have
- frequent font changes, you may wish to change the font dependent 2em to
- absolute units.
-
- Dan Luecking
-