LaTeX breaking up too many words

梦想与她 提交于 2019-12-04 10:38:22

问题


I've written a document in LaTeX, using two-column format, 11pt, times font. Many of my words appear hyphenated, and for every description list item, I get a badbox warning (no problems visible in the output though). How can I fix this?


回答1:


you should set a hyphenation penalty somewhere in your preamble:

\hyphenpenalty=750

The value of 750 suited my needs for a two column layout on letter paper (8.5x11 in) with a 12 pt font. Adjust the value to suit your needs. The higher the number, the less hyphenation will occur. You may also want to have a look at the hyphenatpackage, it provides a bit more than just hyphenation penalty.




回答2:


While, yes, you could make TeX less picky or even go the ragged option, this is best fixed by the microtype package. Just loading it should do the trick:

\usepackage{microtype}

It provides two features to improve the typesetting of paragraphs:

  • Margin kerning: characters, especially punctuation, will protrude a small fraction into the margin. Practically, this has the effect of very slightly increasing the line length and (IMO) visually looks very nice.
  • Font expansion: as well as stretching/shrinking the space between words to create a flush paragraph, the characters themselves are stretched/shrunk by very small amounts (less than one percent). This is visually imperceptible at the character level but, surprisingly, makes a huge difference at the paragraph level.



回答3:


I've always just used \raggedright for this, but I've never done that for an entire paper. This FAQ (which is one of my go-to LaTeX resources) recommends the ragged2e package.

Oh, and a side note: I never pay attention to bad boxes unless I can see them in the output. This is probably dumb, but LaTeX is much pickier than I am.



来源:https://stackoverflow.com/questions/1609837/latex-breaking-up-too-many-words

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!