French spacing

From Wiki
Jump to navigation Jump to search

In English, the space after some punctuation (most notably after period) is wider than a usual one; this is a standard behaviour of ConTeXt when typesetting in English. If you want to disable it, \frenchspacing is the command in TeX (that also works in ConTeXt).

In ConTeXt, you may also setup the language instead:

\setuplanguage[en][spacing=packed]

Here is a nice tweak:

\enabledirectives[characters.spaceafteruppercase=normal]

\vbox{\hsize 5em x. X\par x.\ X\par X. X\par X.\ X\par}

By default space after uppercase followed by punctuation is set to traditional which enables a somewhat special hard coded hack in the tex engine where characters with sfcodes 999 nil a following spacecode setting, even when it's triggered by a \ .


Mixing broad and packed spaces

When current language is set to English, the default is to have broad spaces after punctuation marks.

But after an uppercase letter, ConTeXt applies a packed space. Using \null before the punctuation mark, gives a broad space.

If you need a packed space after a punctuation mark use \fsp[1] or simply use \ (backslash and space) after the punctuation mark.

This sample shows the commands in use:[2]

\startTEXpage[offset=1em, foregroundstyle={\tfd}]
PhD. Next sentence

PhD\null. Next sentence

word. Next sentence

word.\ Next sentence
\stopTEXpage

Footnotes

  1. It stands for fixed space punctuation before the punctuation mark. It requires ConTeXt LMTX from 2023.02.06 17:58.
  2. Excepting \fsp, since the command is too new for the ConTeXt version in the wiki.