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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I insert an inter-sentence space without using a period?

I can easily get an inter-word space via \␣ (backslash followed by a space), or ~ if I don't want line breaking. Is there something equivalent for inter-sentence space?

share|improve this question
up vote 3 down vote accepted

Set the space factor to the space factor code of the period.

\documentclass{article}

\newcommand{\intersentencespace}{\spacefactor\sfcode`. \space}

\begin{document}

Ends.\ Here.

Ends. Here.

.Ends\intersentencespace Here.

\bigskip

\xspaceskip=30pt

Ends.\ Here.

Ends. Here.

.Ends\intersentencespace Here.

\end{document}

The strange code .Ends\intersentencespace Here is for getting the same width before the space.

In the first three lines, the normal spacing is considered. In the second part, an artificially enlarged \xspacskip clearly shows the effect.

enter image description here

share|improve this answer
    
How do I get this to work after a capital letter? I'm worried that adding \@ to the beginning of the definition of \intersentencespace would interfere with kerning and italic correction. – Richard Hansen Mar 4 at 0:46
    
@RichardHansen It does work after capital letters, with no change. – egreg Mar 4 at 9:04
    
Oops, you're right—I made a mistake in my test document. Thank you! – Richard Hansen Mar 4 at 20:55

You can define your own command, by adding fontdimen2 (interword space) to fontdimen7 (extra space). See section 4.3.1 of TeX by Topic .

\documentclass{article}
\newdimen\mydimen
\mydimen=\fontdimen2\font
\advance\mydimen by \fontdimen7\font
\newcommand\sspc{\hskip\mydimen}
\begin{document}
\noindent
test. test\\
test\sspc{}test\\
test test
\end{document}

enter image description here

share|improve this answer

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.