5

When a colon is used to separate clauses in a sentence (rather than preceding a list), current typographic practice, and my preference, is to follow it with the same space as after a semicolon.

The LaTeX default \nonfrenchspacing violates that, making the space after a colon the same as after a period.

But \frenchspacing,while shrinking the space after a colon, unfortunately also shrinks the space after a period, which I do not want to do.

See this example:

\documentclass[12pt]{article}
\begin{document}

\nonfrenchspacing
\emph{nonfrenchspacing}
\smallskip

Spacing after; semicolon.

Spacing after: colon.

Spacing after. period

\bigskip

\frenchspacing
\emph{frenchspacing}
\smallskip

Spacing after; semicolon.

Spacing after: colon.

Spacing after. period

\end{document}

Spacing after colon, semicolon, and period.

How can I get all the following:

  • space after a colon separating clauses the same as that after a semicolon; and
  • space after a colon before a list retains the larger spacing from \nonfrenchspacing; and
  • space after a period retains the larger spacing from \nonfrenchspacing?
5
  • 1
    The traditional (manual) approach is Spacing after:\@ colon. with the use of \@. Apr 3, 2020 at 19:37
  • It seems that \frenchspacing doesn't respect the traditional French spacing before a colon or a semicolon (thin unbreakable space)…
    – Bernard
    Apr 3, 2020 at 19:47
  • @Bernard The names are a bit odd, to be honest. They only refer to the spacing after punctuation.
    – egreg
    Apr 3, 2020 at 19:47
  • 2
    @StevenB.Segletes -- I believe that "\ " (slash-space) is preferable. See What is the proper use of \@ (i.e., backslash-at)? Apr 3, 2020 at 20:37
  • @barbarabeeton Thank you for that link. Learned something new. Apr 3, 2020 at 22:24

1 Answer 1

4

If you want that the space after a colon is the same as after a semicolon, tell TeX that the space factor codes of both are the same.

\documentclass[12pt]{article}
\begin{document}

\nonfrenchspacing\sfcode`:=\sfcode`;
\emph{nonfrenchspacing}
\smallskip

Spacing after; semicolon.

Spacing after: colon.

Spacing after. period

\bigskip

\frenchspacing
\emph{frenchspacing}
\smallskip

Spacing after; semicolon.

Spacing after: colon.

Spacing after. period

\end{document}

enter image description here

Since you won't be changing between “French spacing” and “non French spacing” (would you?), you can simply state

\sfcode`:=\sfcode`;

before \begin{document}.

\documentclass[12pt]{article}

\sfcode`:=\sfcode`;

\begin{document}

Spacing after; x

Spacing after: x

Spacing after. x

\end{document}

enter image description here

TeXnical note. The space factors of semicolon, colon and period under \nonfrenchspacing are, respectively, 1500, 2000 and 3000. So it's a bit inaccurate to say that the space after a colon is the same as after a period.

3
  • But then how would I (temporarily) revert to my preferred wider space when a colon precedes a list?
    – murray
    Apr 3, 2020 at 21:11
  • 1
    @murray Does this make sense? Anyway, do \newcommand{\colonlist}{:\spacefactor2000\relax\space\ignorespaces} and use \colonlist in front of a list.
    – egreg
    Apr 3, 2020 at 21:14
  • Yes, that works, thank you!
    – murray
    Apr 4, 2020 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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