我想增加每段最后一行每个单词之间的间距。
我使用命令 {\hbox spread 10pt{...}} 来实现这一点,但注意到单词之间的间距并不取决于最后一行的长度。例如,即使使用具有相同参数的相同 hbox,较短的最后一行的单词间距也会比较长的行大。
有没有办法来解决这个问题?
谢谢!
答案1
您可以通过调整最后一行的拉伸来调整\parfillskip
\documentclass{article}
\newcommand\qq{\smash{\kern-1pt\rule[-5cm]{1pt}{5cm}}}
\begin{document}
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.\qq
\setlength\parfillskip{0pt plus \textwidth}% always safe but only slight stretch
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.\qq
\setlength\parfillskip{0pt plus .5\textwidth}% more stretch but may cause underfull boxes
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.\qq
\end{document}
答案2
etex 引入了(很少使用的)命令\lastlinefit
,它将根据前一行的拉伸和收缩组件调整最后一行的拉伸和收缩组件:它接受 0 到 1000 之间的值,其中 0 表示该行将按照其自然宽度排版,1000 表示将以与前一行相同的字间空间排版;0 到 1000 之间的任何值都将是两个极值的插值。
因此,将\lastlinefit=1000
(或500
或任何你喜欢的内容)放入你的序言中应该可以解决你的问题。