5

I know that \frenchspacing is the way I ought to typeset documents today, but I happen to like the double spacing after periods. To enable them, I use \nonfrenchspacing. But if I use babel and issue a \setlanguage{} command, it resets frenchspacing again. Is there a way to set it once per document (and maybe language) so it doesn't get switched later on?

  • 2
    \addto\extrasenglish{\nonfrenchspacing} (and the same for each language) should do, but it's difficult to say when you don't provide a MWE... – yo' Nov 2 '14 at 23:54
  • 1
    \setlanguage is not a babel command. Please, provide a MWE. – Javier Bezos Nov 3 '14 at 6:59
  • 1
    \AtBeginDocument{\let\frenchspacing\nonfrenchspacing} – egreg Nov 3 '14 at 8:46
  • @tohecz: Thanks, the \addto\extrasenglish{\nonfrenchspacing} works fine. – cxxl Nov 3 '14 at 10:24
  • 1
    @JavierBezos Look at the title. \setlanguage{}is obviously a typo! But we need an MWE. – Sveinung Nov 3 '14 at 10:38
7

Latest releases provide some hooks which you can use for this purpose. If it applies only to a language or some of them, follow the procedure already explained:

\addto\extrasLANG{\nonfrenchspacing}

But if the setting applies to the whole document:

\AddBabelHook{nonfrench}{afterextras}{\nonfrenchspacing}

This line of code tells babel to execute \nonfrenchspacing after every \extrasLANG is executed.

6

The way how to add some declaration into a language setting is this (preferably in the preamble):

\addto\extrasLANG{\nonfrenchspacing}

where LANG is whatever you need: english, czech, ...


The way how to enforce \nonfrenchspacing everywhere is:

\AtBeginDocument{
  \let\frenchspacing=\nonfrenchspacing
  \nonfrenchspacing
}

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.