有时,当使用该hyphenat
包来防止句子中的连字符时,会出现以下不良的美学现象,如该 MWE 输出的第一段所示:
\documentclass{book}
\usepackage[none]{hyphenat} % To prevent hyphenation
\begin{document}
\large
A paragraph with sentences comprised of some-long-words. A paragraph with sentences comprised of some-long-words. A paragraph with sentences comprised of some-long-words. The same paragraph with sentences comprised of some-long-words.
\vskip 10pt
A paragraph with sentences comprised of some-long-words. A paragraph with sentences comprised of some-long-words. A \\ paragraph with sentences comprised of some-long-words. The same paragraph with sentences comprised of some-long-words.
\end{document}
为了让段落“看起来更好”,我\\
在第二段中使用了;但正如您所看到的,第二行的对齐受到了影响。(例如,当使用时也会发生同样的事情\newline
)
我知道我可以通过一系列hfill
s 来强制实现所需的对齐方式,但我想知道是否有一种自动的方法可以在试图防止所描述的不良美感时保留所有句子的对齐方式——因为在排版大型文档时这种情况经常发生?
进一步来说,
问:在使用hypenat
并尝试用(或类似的)纠正给定句子中的单词过多时\\
,如何才能自动保留该句子所需的对齐方式?(我知道单词 \hfill
单词 \hfill
单词 \hfill
等会起作用,但由于问题可能发生多次,如果可能的话,我希望\\
每次都应用(或类似的东西),而不必处理\hfill
s 来完成此操作。)
谢谢。
答案1
如果你禁用连字符,那么你将很难获得合理的印刷输出,但你可以使用它\sloppy
来允许更多的空白,并microtype
进行字符调整以尝试补偿,
\documentclass{book}
\usepackage[none]{hyphenat} % To prevent hyphenation
\usepackage{microtype}% try to repair the damage done by the above
\begin{document}
\large\sloppy
A paragraph with sentences comprised of some-long-words. A paragraph with sentences comprised of some-long-words. A paragraph with sentences comprised of some-long-words. The same paragraph with sentences comprised of some-long-words.
\end{document}