7

As you maybe know, in French typography, "big" punctuation marks (!?;») must be preceded by a thin undividable space (obviously « must be followed by a thin unbreakable space, and as a matter of exception, : should be preceded by a normal unbreakable space), see for example in French http://fvsch.com/articles/espaces-ponctuation/.

Here an example : enter image description here

The solution used by babel extension is to use in every case a normal unbreakable space with ~.

I have three questions to solve this trouble :

  1. What is the actual definition of ~?
  2. Is there a way to change this definition of ~?
  3. Is there a way to force babel to use thin unbreakable space with !?;«» and normal unbreakable space with :.

Thank you for any clue.

4 Answers4

11

A counterexample to what you assert. With babel the right spaces are used, according to French typographic rules.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}

\usepackage{newunicodechar}
\newunicodechar{«}{\og}
\newunicodechar{»}{\fg}

\begin{document}

Une phrase en français; sans intérêt, avec signes diacritiques:
nous pouvons voir qu'il est correct!

Les \og guillemets\fg{} sont corrects aussi.

Les «guillemets» sont corrects aussi.

\end{document}

enter image description here

As you can see the spaces are thin before ; and ! (the same for ?), but they're normal spaces before the colon.

For guillemets, the standard way is to use \og and \fg, but one can redefine « and » for getting the same effect.

Some excerpts of the log file when \showoutput is used:

....\T1/cmr/m/n/10 f
....\T1/cmr/m/n/10 r
....\T1/cmr/m/n/10 a
....\T1/cmr/m/n/10 n
....\T1/cmr/m/n/10 ?
....\T1/cmr/m/n/10 a
....\T1/cmr/m/n/10 i
....\T1/cmr/m/n/10 s
....\penalty 10000
....\kern 1.6663
....\T1/cmr/m/n/10 ;
[...]
....\T1/cmr/m/n/10 d
....\T1/cmr/m/n/10 i
....\T1/cmr/m/n/10 a
....\T1/cmr/m/n/10 c
....\T1/cmr/m/n/10 r
....\T1/cmr/m/n/10 i
....\T1/cmr/m/n/10 t
....\T1/cmr/m/n/10 i
....\T1/cmr/m/n/10 q
....\T1/cmr/m/n/10 u
....\T1/cmr/m/n/10 e
....\T1/cmr/m/n/10 s
....\penalty 10000
....\glue 3.33252 plus 1.66626 minus 1.11084
....\T1/cmr/m/n/10 :
....\glue 3.33252 plus 1.66626 minus 1.11084
[...]
....\T1/cmr/m/n/10 c
....\T1/cmr/m/n/10 o
....\T1/cmr/m/n/10 r
....\T1/cmr/m/n/10 r
....\T1/cmr/m/n/10 e
....\T1/cmr/m/n/10 c
....\T1/cmr/m/n/10 t
....\penalty 10000
....\kern 1.6663
....\T1/cmr/m/n/10 !

A thin space is exactly \kern 1.6663, while the two spaces around the colon are normal interword spaces.

If you want to change the space before the colon to be a normal interword space without stretching (but with shrinking) and the space after/before open/close guillemets, just redefine \FBcolonspace and \FBguillspace:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}

\usepackage{newunicodechar}
\newunicodechar{«}{\og}
\newunicodechar{»}{\fg}

\renewcommand{\FBcolonspace}{\hspace{\fontdimen 2\font minus\fontdimen4\font}}
\renewcommand{\FBguillspace}{\thinspace}

\begin{document}

Une phrase en français; sans intérêt, avec signes diacritiques:
nous pouvons voir qu'il est correct!

\makebox[3cm][s]{Deux: point}

Les \og guillemets\fg{} sont corrects aussi.

Les «guillemets» sont corrects aussi.

\showoutput

\end{document}

enter image description here

The added example with the colon is exaggerated on purpose.

egreg
  • 1,121,712
  • Is it possible to use csquotes for the quotes? Could you add it in affirmative case? – Manuel Oct 25 '14 at 12:56
  • @Manuel Yes, it's possible. Desirable? I don't think so. – egreg Oct 25 '14 at 12:57
  • I mean to handle the french quotes (with spaces). Not desirable? In what sense? – Manuel Oct 25 '14 at 12:58
  • 2
    @Manuel I prefer to see what I input. Quotes aren't generic markup, like \emph or an environment. The csquotes package was born mainly for managing citations. – egreg Oct 25 '14 at 13:22
  • I've never used csquotes, I was just asking to learn how it works, in case it's easy. So, okey. – Manuel Oct 25 '14 at 13:29
  • @egreg, you're right. babel use thin space for ;!?. I've made a mystake, I'm going to post an answer below (in the right box). – Matthieu Thomas Oct 26 '14 at 15:53
  • @egreg, you're right. babel use thin space for ;!?. I've made a mystake. But (I don't know how to indent this answer) babel use normal space before : (and I think it's too big) and use something like normal space \glue 2.66602 plus 0.49988 minus 0.88867 after/before «» (which is not imho the right thing to do). The \showoutput is great thank you. – Matthieu Thomas Oct 26 '14 at 15:59
  • Is there a way to use thin space with «» ? Is there a way to use thin space with : ? – Matthieu Thomas Oct 26 '14 at 16:01
  • @MatthieuThomas Didn't I show it? – egreg Oct 26 '14 at 16:01
  • Well, for «», something like \renewcommand{\og}{«\kern 0.16667em} \renewcommand{\fg}{\kern 0.16667em»}. I dont't know how to do this with : which is an active character. – Matthieu Thomas Oct 26 '14 at 16:09
  • As a trick, I use \defineshorthand{:}{\kern 0.16667em:} \defineshorthand{!<}{«\kern 0.16667em} \defineshorthand{!>}{\kern 0.16667em»}, but I'm loosing the AutoSpacePunctuation=true for :. I must type quelque chose: comme ça and not quelque chose : comme ça. – Matthieu Thomas Oct 26 '14 at 16:23
  • 1
    @MatthieuThomas The rule exposed in the article you refer to is wrong: the spaces around the colon should be equal. In my example I show how you can directly use « and » and get the (horrible) French spacing. – egreg Oct 26 '14 at 16:26
  • @egreg In this article, as everywhere else, is it stated that the space after the colon should be a normal space , and that the space before the colon should be normal space but unbreakable and fixed. Babel uses as a normal space and as space before the colon \glue 3.33252 plus 1.66626 minus 1.11084. Babel uses as space for «» the value \glue 2.66602 plus 0.49988 minus 0.88867. In the two cases this is wrong : these spaces must be fixed. That's, in my opinion, why you find the French spacing horrible: is it way too large in babel. – Matthieu Thomas Oct 26 '14 at 17:02
  • @MatthieuThomas The spaces around the colon you see on the finely printed documents are always equal. They are different when programs just insert the “unbreakable space” before the colon, because it's a character that doesn't participate to space stretch or shrink (and different spaces are absurd). I'll add how to change the spaces inserted by babel, but not immediately. – egreg Oct 26 '14 at 17:13
  • OK, I will not fight windmills... I'm probably wrong if I'm the only one that wants all these double-punctuation-spaces equal to \kern 0.16667em. Thank you for your time. – Matthieu Thomas Oct 26 '14 at 17:32
2

from: How to typeset a "small" non-breaking space

(1) the definition of ~ is

\leavevmode\nobreak\ 

(2) Change the \nobreakspace definition.

(3) I don't know about using babel to do it, but you can use \, to insert the thin unbreakable space.

EDIT: typo.

2

I think you can do what you require with the babel-french (frenchb) package: http://ctan.org/pkg/babel-french.

1

I would like, in addition to the excellent response of egreg, add that frenchb from babel has this option :

ThinColonSpace=true (false) changes the inter-word unbreakable space
added before the colon ‘:’ to a thin space, so that the same amount
of space is added before any of the four ‘high punctuation’ characters.
The default setting is supported by the French ‘Imprimerie Nationale’.