本文介绍了LaTeX 有时会在句号后放置太多或太少的空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

LaTeX 会尝试猜测句点是否结束了句子,在这种情况下,它会在句点之后放置额外的空格.下面是两个猜错的例子:

LaTeX tries to guess whether a period ends a sentence, in which case it puts extra space after it.Here are two examples where it guesses wrong:

I watched Superman III. Then I went home.

(《超人III》之后的篇幅太少了.)

(Too little space after "Superman III.".)

After brushing teeth etc. I went to bed.

(等"后的空格太多.)

(Too much space after "etc.".)

请注意,在 LaTeX 源代码中使用多少空格并不重要,因为 LaTeX 会忽略这一点.

Note that it doesn't matter how much whitespace you use in the LaTeX source since LaTeX ignores that.

推荐答案

我在这里找到了答案:http:///john.regehr.org/latex/.摘录:

I found the answer here: http://john.regehr.org/latex/. Excerpt:

当非句末句点后跟空格时,空格必须是显式空格.所以第二个例子应该是:

When a non-sentence-ending period is to be followed by a space, the space must be an explicit blank.So the second example should be:

After brushing teeth etc. I went to bed.

当大写字母在输入中的句末句点之前时,会出现此问题的相反情况,如第一个示例中所示.在这种情况下,LaTeX 假定句点终止一个缩写词,并在它后面加上单词间空间而不是句子间空间.解决方法是将@"放在句点之前.所以第一个例子应该是

The converse of this problem happens when a capital letter precedes a sentence-ending period in the input, as in the first example.In this case LaTeX assumes that the period terminates an abbreviation and follows it with inter-word space rather than inter-sentence space.The fix is to put "@" before the period.So the first example should be

I watched Superman III@. Then I went home.

查找此错误的简便方法是:

A handy way to find this error is:

grep '[A-Z].' *.tex

这篇关于LaTeX 有时会在句号后放置太多或太少的空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 02:07
查看更多