Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LaTeX sometimes puts too much or too little space after periods

Tags:

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.  

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

After brushing teeth etc. I went to bed. 

(Too much space after "etc.".)

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

like image 989
dreeves Avatar asked Jan 07 '10 23:01

dreeves


People also ask

How do you remove spaces after a period in LaTeX?

You can also use a ~ after a period in order to have non sentence spacing after a period. (You might want to do this if you write e.g. 'see p. 1'.) You can also put \@ after punctuation to enforce a regular sized space.

Are you supposed to add a space after period?

Just one. According to every major style guide you'll find, the rule is a single space after a period or any other punctuation mark you use to end a sentence. Even the APA, the staunchest defender of the double space over the decades, changed their stance on the issue in 2019.

Why do we no longer put two spaces after a period?

Because we've all switched to modern fonts, adding two spaces after a period no longer enhances readability, typographers say. It diminishes it.


2 Answers

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 
like image 114
dreeves Avatar answered Oct 05 '22 11:10

dreeves


You can sidestep the spacing issue if you prefer single spaces at the end of sentences: put \frenchspacing on (for older versions of Latex this was a fragile command). Knuth was following the traditional naming in calling it French spacing, although calling double spacing after sentences French spacing has become dominant in publishing.

Dirk Margulis wrote a nice post summarising some of the reasons for the prevalance of single spacing: Space between sentences.

like image 33
Charles Stewart Avatar answered Oct 05 '22 11:10

Charles Stewart