我在一个段落的行尾获得了连续的连字符(超过 5 个连续的连字符),在双列格式中,我已经使用了 \doublehyphendemerits=10000,但没有解决问题。
如何通过自动化避免连续连字
答案1
10000 是默认值,缺点是“坏度平方”,因此需要有两倍的数字,或者简单地使用\maxdimen
适当大的整数值。
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
\fbox{\parbox{3cm}{%
conveniently extravagant vocabulary to maximise hyphenation possibilities in exceptionally narrow text
conveniently extravagant vocabulary to maximise hyphenation possibilities in exceptionally narrow text
}}
\fbox{%
\doublehyphendemerits=\maxdimen
\parbox{3cm}{%
conveniently extravagant vocabulary to maximise hyphenation possibilities in exceptionally narrow text
conveniently extravagant vocabulary to maximise hyphenation possibilities in exceptionally narrow text
}}
\end{document}
但正如这里所示,在任何一种情况下,文本都不漂亮,并且需要较少连字符的粗糙设置通常更可取。