home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / text / tex / 14374 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.9 KB  |  51 lines

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