句号后的默认间距

句号后的默认间距

.在 LaTeX 中,文本块中句号后默认插入的空格是什么?如果我enter在句号后按下(在我的 GUI 中开始新行)会怎样?

课堂上有什么不同吗memoir?有没有什么办法可以改变默认间距?

\documentclass{memoir}
\begin{document}

This is my text block.  I pressed spacebar twice before this sentence.

This is my text block. I pressed spacebar once before this sentence, but the spacing is the same.

This is my text block.
I pressed enter once before this sentence, and now the spacing is different.

\end{document}

答案1

TeX 通常会忽略空格,因此句子后面加一个、两个甚至十个空格都没有关系。TeX 标准情况下会在标点符号后加多个空格。您可以使用以下命令关闭此功能\frenchspacing

\documentclass{memoir}
\begin{document}
\parindent=0pt
\Huge
This is some text. This is some more text.

\frenchspacing
This is some text. This is some more text.
\end{document}

代码输出

TeX 插入的空格实际上是可拉伸的空格,因此标点符号和下一个单词之间的间距将部分取决于行的其余部分。它不取决于您如何输入源代码。因此,在您发布的示例中,如果文本完全相同,则可以使间距相同:

\documentclass{memoir}
\begin{document}
\large
This is my text block.  I pressed spacebar twice before this sentence.

% This has one line in the source
This is my text block. I pressed spacebar once before this sentence, but the spacing is the same.

% This one has two lines in the source.
This is my text block.
I pressed spacebar once before this sentence, but the spacing is the same.

\end{document}

代码输出

请注意,在这个例子中,第一个句子中的 the 后面的空格.不同,因为第一个句子包含“twice”,而例子中的其他句子包含“once”。这个小差异足以影响间距。

相关内容