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 Answers
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.
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
}
\addto\extrasenglish{\nonfrenchspacing}
(and the same for each language) should do, but it's difficult to say when you don't provide a MWE...\setlanguage
is not ababel
command. Please, provide a MWE.\AtBeginDocument{\let\frenchspacing\nonfrenchspacing}
\addto\extrasenglish{\nonfrenchspacing}
works fine.\setlanguage{}
is obviously a typo! But we need an MWE.