LaTeX 分解了太多单词
我用 LaTeX 编写了一个文档,使用两列格式、11pt、times 字体。我的许多单词都带有连字符,对于每个描述列表项,我都会收到 badbox 警告(尽管输出中没有可见问题)。我该如何解决这个问题?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
是的,虽然您可以让 TeX 不那么挑剔,甚至可以选择不合适的选项,但最好通过
microtype
包来解决这个问题。只需加载它就可以解决问题:它提供了两个功能来改进段落的排版:
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:It provides two features to improve the typesetting of paragraphs:
您应该在序言中的某处设置连字符惩罚:
750 的值适合我对 12 pt 字体的信纸(8.5x11 英寸)上的两列布局的需求。调整该值以满足您的需要。数字越大,连字符越少。您可能还想看看
hyphenat
包,它提供的不仅仅是连字符惩罚。you should set a hyphenation penalty somewhere in your preamble:
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
hyphenat
package, it provides a bit more than just hyphenation penalty.我一直只是使用
\raggedright
来实现此目的,但我从未在整篇论文中这样做过。 此常见问题解答(这是我的首选 LaTeX 之一) resources)推荐使用ragged2e
包。哦,还有一个旁注:我从不注意坏盒子,除非我可以在输出中看到它们。这可能很愚蠢,但 LaTeX 比我挑剔得多。
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 theragged2e
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.
根据另一篇文章的答案,我发现了这些设置完美以完全防止连字符而不难看:
\tolerance=9999
允许尽可能多的空白。\emerencystretch=10pt
每行允许一些额外的空格。\hyphenpenalty=10000
完全禁用连字符。\exhyphenpenalty=100
允许使用已经存在的连字符。Based on the answers from another post, I found these settings to be perfect to prevent hyphenation altogether without being ugly:
\tolerance=9999
allows as much whitespace as possible.\emerencystretch=10pt
allows some extra whitespace per line.\hyphenpenalty=10000
disables hyphens completly.\exhyphenpenalty=100
allows using hyphens which were already present.