句子间距不正确 省略号

句子间距不正确 省略号

我正在测试使用增加的句子间距。我发现 LaTeX 不会在以省略号或省略号后跟结束引号结尾的句子末尾添加间距。我想告诉 LaTeX 句子以省略号或省略号后跟结束引号结尾。我似乎找不到一种方法来手动插入应该出现在句子末尾的增加的间距或告诉 LaTeX 句子在特定点结束。提前致谢!

编辑:我弄清楚了如何在句子末尾手动插入间距“\hspace{\fontdimen7\font} ”,这在 TeX 算法不足的特殊情况下很有用。

\documentclass{article}
\usepackage{csquotes}
\raggedright
%frenchspacing is OFF
\begin{document}
\textbf{Correct spacing between sentences:}\par
He reached the quarter-finals of the 1981 UK Championship by eliminating Geoff Foulds, Fred Davis and Doug Mountjoy from the competition before being defeated 5–9 by Terry Griffiths. Later that season, Knowles gained attention when he won 10–1 against defending champion Steve Davis in the first round of the 1982 World Snooker Championship, after staying out late at a nightclub following the first day's play when he had built an 8–1 lead. He defeated Miles 13–7 in the second round, before losing 11–13 to Eddie Charlton in the quarter-finals.\par
\textbf{Incorrect spacing after \ldots{}\textquotedblright{} and before \enquote{Ten century}}\par
\enquote{\ldots{}Davis was the bookmaker's favourite to win the tournament, but he lost 1–10 to Tony Knowles in the\ldots{}} Ten century breaks were made during the tournament, the highest of which was a 143 scored by Willie Thorne.\par
\textbf{Correct spacing between sentences:}\par
I love latex. I am here to learn latex! Hello world.\par%using latex in all lowercase just for example
\textbf{Incorrect spacing between sentences:}\par
I love latex\ldots{} I am here to learn latex\ldots{} Hello world.\par
\textbf{Incorrect spacing between sentences:}\par
\enquote{I love latex\ldots{}} \enquote{I am here to learn latex\ldots{}} Hello world.
\end{document}

答案1

姆韦

您的 MWE 中的句子间额外空格已经存在,并且始终存在。我猜您看到的差异是由于标点符号固有的空格造成的。

如果您想在句子后看到更多额外的空格,您必须检查 是否\frenchspacing未激活(即“法语间距”表示“没有额外的间距,谢谢”)并注意句子间粘连,即\xspaceskip。当未设置此长度或将其设置为 0pt 时,则粘连来自\fontdimen7\font。此参数的默认值非常小,因此 \nonfrenchspacing几乎无法察觉。

设置一个大号\fontdimen7\font\xspaceskip(比如,20 pt),你会清楚地看到 LaTeX 在以引号或省略号结尾的句子后也添加了相同的(*)额外空格。

(*) 由于空格可能是一种胶水(即可拉伸和收缩的空间20pt plus 1pt minus 2pt),因此某些差异不是 LaTeX 错误,而是一种获得更好换行符的技巧。

\documentclass{article}
\usepackage{csquotes}
\raggedright
\begin{document}

\bigskip\frenchspacing \verb-\frenchspacing-\bigskip 


I love latex. I am here to learn latex! Hello world.\par%using latex in all lowercase just for example
I love latex\ldots{} I am here to learn latex\ldots{} Hello world.\par
\enquote{I love latex\ldots{}} \enquote{I am here to learn latex\ldots{}} Hello world.


\bigskip\nonfrenchspacing\verb-\nonfrenchspacing-\bigskip 


\verb-\fontdimen7\font=-\the\fontdimen7\font\ (default)\bigskip

I love latex. I am here to learn latex! Hello world.\par%using latex in all lowercase just for example
I love latex\ldots{} I am here to learn latex\ldots{} Hello world.\par
\enquote{I love latex\ldots{}} \enquote{I am here to learn latex\ldots{}} Hello world.

\bigskip\fontdimen7\font=40pt \verb-\fontdimen7\font=40pt-\bigskip

I love latex. I am here to learn latex! Hello world.\par%using latex in all lowercase just for example
I love latex\ldots{} I am here to learn latex\ldots{} Hello world.\par
\enquote{I love latex\ldots{}} \enquote{I am here to learn latex\ldots{}} Hello world.


\bigskip
\setlength{\xspaceskip}{10pt} \verb-\setlength{\xspaceskip}{20pt}-%
\bigskip

I love latex. I am here to learn latex! Hello world.\par%using latex in all lowercase just for example
I love latex\ldots{} I am here to learn latex\ldots{} Hello world.\par
\enquote{I love latex\ldots{}} \enquote{I am here to learn latex\ldots{}} Hello world.


\end{document}

相关内容