在 xelatex 或 lualatex 中,如何让段落在单词内留出微小的空格作为排版的最后手段来拉伸单词?似乎每个人都只想要大写字母之间固定大小的微小 hspace,但我想要一个像0em plus 0.05em
每个单词内一样的空格 - 但我仍然需要连字符才能工作,并且当单词内的拉伸为零时,我希望正常的字距和连字!
在示例中,您会看到,对于第一行未满的水平盒子,空格已经大到可以达到的程度,单词开始出现间隔。在同一段落中,该单词再次出现,间距正常。并且“flesh”中“fl”的连字符也存在。
我以为 TeX 默认就是这么做的!
这是乳胶失败的情况:
\documentclass{article}
\begin{document}
\rightskip=0.65\linewidth
23\hspace{1ex}And Abraham took Ishmael his son, and all that
were born in his house, and all that were bought with his
money, every male among the men of Abraham's house; and
circumcised the flesh of their foreskin in the selfsame day,
as God had said unto him.
\end{document}
答案1
答案2
以下适用于 pdfLaTeX 和 LuaLaTeX:
\documentclass{article}
\usepackage[tracking]{microtype}
\begin{document}
\rightskip=0.65\linewidth
\emergencystretch=1pt
23\enspace And Abraham took Ishmael his son, and all that
were born in his house, and all that were bought with his
money, every male among the men of Abraham's house; and
circumcised the flesh of their foreskin in the selfsame day,
as God had said unto him.
\end{document}
XeLaTeXtracking
无法使用此功能。因此,您必须增加该\emergencystretch
值:
\documentclass{article}
\usepackage{microtype}
\begin{document}
\rightskip=0.65\linewidth
\emergencystretch=1em
23\enspace And Abraham took Ishmael his son, and all that
were born in his house, and all that were bought with his
money, every male among the men of Abraham's house; and
circumcised the flesh of their foreskin in the selfsame day,
as God had said unto him.
\end{document}
或者必须使用类似的东西sloppypar
:
\documentclass{article}
\usepackage{microtype}
\begin{document}
\rightskip=0.65\linewidth
\begin{sloppypar}
23\enspace And Abraham took Ishmael his son, and all that
were born in his house, and all that were bought with his
money, every male among the men of Abraham's house; and
circumcised the flesh of their foreskin in the selfsame day,
as God had said unto him.
\end{sloppypar}
\end{document}
有关功能和所需引擎的更多信息,请参阅microtype
用户手册。您还会发现有关在 XeLaTeX 中使用(替代)fontspec
的说明。LetterSpace
tracking