Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In LaTeX, what is the default space that is inserted after a period . inside a block of text? What if I press enter (to start a new line in my GUI) after the period?

Is it any different in the memoir class? Is there any way to change the default spacing?

\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}
share|improve this question
add comment

1 Answer

up vote 14 down vote accepted

Spaces are generally ignored by TeX, so it doesn't matter if you put one, two or even ten spaces after a sentence. TeX standardly puts more than an single space after punctuation. You can turn this off using the \frenchspacing command:

\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}

output of code

The space that TeX inserts is actually a stretchable space, and so the spacing between the punctuation mark and the following word will depend partially on the rest of the line. It doesn't depend on how you enter your source. So in the example you post, you can make the spacing the same if the text is exactly the same:

\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}

output of code

Notice that in this example the space after the . is different in the first sentence, since the first sentence contains "twice" and the other sentences in the examples contain "once". This small difference is enough to affect the spacing.

share|improve this answer
    
I'm actually getting a different amount of spacing when I start a newline (by pressing enter once) in my GUI... please see my updated MWE. Thanks! –  jamaicanworm Jan 30 '12 at 1:03
2  
This question has some good info on how spaces are set –  bev Jan 30 '12 at 1:13
2  
@jamaicanworm, actually the space before the I in each of your three paragraphs is different, but this is because the words in the paragraphs are different, so tex stretches by different amounts while linebreaking. Try copying the text exactly and just changing the white space from one or two spaces or a newline, you will see the white space has no effect. –  David Carlisle Jan 30 '12 at 10:49
    
@David Carlisle, you're exactly right! Thank you so much for the clarification. –  jamaicanworm Jan 30 '12 at 16:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.