
所以我從我正在從事的專案中得到了以下片段。第二段的第一行延伸超出右側邊距,而不是與右側齊平。
其他答案建議用連字符來解決這個問題,但我不能用連字符來連接它,因為它是一個單音節詞。我能做些什麼來解決這個問題嗎?
\documentclass[12pt]{book}
\usepackage[paperwidth=5.5in,
paperheight=8.5in,
inner=0.25in,
outer=0.5in,
bindingoffset=0.25in
]{geometry}
\usepackage{fontspec}
\setmainfont[Numbers=OldStyle]{Linux Libertine O}
\begin{document}
Now the merchant-farmer understood what all this meant, because he had overheard the talk between the Bull and the Ass, so quoth he, ``Take that rascal donkey, and set the yoke on his neck, and bind him to the plough and make him do Bull’s work.''
Thereupon the ploughman took the Ass, and worked him through the livelong day at the Bull’s task; and, when he failed for weakness, he made him eat stick till his ribs were sore and his sides were sunken and his neck was flayed by the yoke; and when he came home in the evening he could hardly drag his limbs along, either
\end{document}
答案1
一種選擇是,考慮到線寬的字體相對較大,您可以\sloppy
在段落中使用:
...
{\sloppy
Thereupon the ploughman took the Ass, and worked him through the livelong day at the Bull’s task; and, when he failed for weakness, he made him eat stick till his ribs were sore and his sides were sunken and his neck was flayed by the yoke; and when he came home in the evening he could hardly drag his limbs along, either
}
% notice the white line above, \sloppy is applied when \par is found.
...
這條線其實有點草率,是的......
如果你使用microtype
(添加\usepackage{microtype}
在你的序言中),你仍然有一個過滿的行,但它是:
Overfull \hbox (1.02644pt too wide) in paragraph at lines 16--17
這也許是可以接受的。
最後,您可以減少段落開頭的縮排;例如,\parindent=14pt
使用微排版將修復過滿的線條。
%! TeX program = lualatex
\documentclass[12pt]{book}
\usepackage[paperwidth=5.5in,
paperheight=8.5in,
inner=0.25in,
outer=0.5in,
bindingoffset=0.25in
]{geometry}
\usepackage{fontspec}
\usepackage{microtype}
\parindent=14pt
\setmainfont[Numbers=OldStyle]{Linux Libertine O}
\begin{document}
Now the merchant-farmer understood what all this meant, because he had overheard the talk between the Bull and the Ass, so quoth he, ``Take that rascal donkey, and set the yoke on his neck, and bind him to the plough and make him do Bull’s work.''
Thereupon the ploughman took the Ass, and worked him through the livelong day at the Bull’s task; and, when he failed for weakness, he made him eat stick till his ribs were sore and his sides were sunken and his neck was flayed by the yoke; and when he came home in the evening he could hardly drag his limbs along, either
\end{document}