Text FormattingTurn off French Spacing by default

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Laurentius
Posts: 132
Joined: Wed Feb 11, 2009 11:38 pm

Turn off French Spacing by default

Post by Laurentius »

Is there a way to make \nonfrenchspacing the default for a language, so you don’t have to repeat the command every time you \selectlanguage?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Turn off French Spacing by default

Post by cgnieder »

This should do it (assuming you're talking about babel):

Code: Select all

\addto\extras<lang>{\nonfrenchspacing}
\addto\noextras<lang>{\frenchspacing}
Regards
site moderator & package author
Laurentius
Posts: 132
Joined: Wed Feb 11, 2009 11:38 pm

Re: Turn off French Spacing by default

Post by Laurentius »

Thanks! How about spacefactorcodes?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Turn off French Spacing by default

Post by Stefan Kottwitz »

Laurentius wrote:How about spacefactorcodes?
Very similar, I think.

Stefan
LaTeX.org admin
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Turn off French Spacing by default

Post by cgnieder »

Laurentius wrote:Thanks! How about spacefactorcodes?
What about them? Both \frenchspacing and \nonfrenchspacing simply set space factors of punctuation marks:

Code: Select all

\meaning\frenchspacing
\meaning\nonfrenspacing
gives (if no package changes them)

Code: Select all

macro:->\sfcode ‘\.\@m \sfcode ‘\?\@m \sfcode ‘\!\@m \sfcode ‘\:\@m
\sfcode ‘\;\@m \sfcode ‘\,\@m
macro:->\sfcode ‘\.3000\sfcode ‘\?3000\sfcode ‘\!3000\sfcode ‘\:2000\sfcode
‘\;1500\sfcode ‘\,1250
Regards
site moderator & package author
Post Reply