LaTeX sometimes puts too much or too little space after periods

后端 未结 3 1364
别那么骄傲
别那么骄傲 2021-01-29 22:24

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 Superm         


        
3条回答
  •  终归单人心
    2021-01-29 23:10

    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.
    

    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
    

提交回复
热议问题