LaTeX有时会在分句后放置太多或太少的空间 [英] LaTeX sometimes puts too much or too little space after periods
问题描述
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有时会在分句后放置太多或太少的空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!