29

In french, we put spaces before characters : ! ; ? when we type the text. For instance, we will type

Que fait-on ? On met un espace avant les deux points : comme cela.

If I do so and use microtype, the spacing in the generated pdf file is not the right one. See the following example:

\documentclass{article}

\usepackage[utf8x]{inputenc}
\usepackage[french]{babel}
\usepackage[babel=true, kerning=french]{microtype}

\begin{document}
 
  Voici ce qui se passe quand on met un signe \og{}deux~points\fg{} 
 avec le package \og{}microtype\fg{} : il semble que ça ne marche pas ! 
 Un autre essai : est-ce que cela marche ?
  \bigskip 

  \textbf{But what happens if I type my text following the 
 English typographic rules?}
  \bigskip 

  Voici ce qui se passe quand on met un signe \og{}deux~points\fg{} 
 avec le package \og{}microtype\fg{}: il semble que ça ne marche pas! 
 Un autre essai: est-ce que cela marche?
 
\end{document}

enter image description here

Hence:

  • How can I use microtype and type my text the french way?

Note: here is the result without microtype.

\documentclass{article}

\usepackage[utf8x]{inputenc}
\usepackage[french]{babel}
%\usepackage[babel=true, kerning=french]{microtype}

\begin{document}
 
  Voici ce qui se passe quand on met un signe \og{}deux~points\fg{} 
 avec le package \og{}microtype\fg{} : 
 il semble que ça ne marche pas ! Un autre essai : est-ce que cela marche ?
 
\end{document}

enter image description here

6
  • 5
    I personally think that this is a pain to read. Do you know why it is done like that in France?
    – Ingo
    Commented Nov 5, 2013 at 13:44
  • 16
    When you are French, you feel it is the way it should be for all languages!!
    – Colas
    Commented Nov 5, 2013 at 13:45
  • 4
    @Ingo A discussion on orthotypographie.fr suggests that it prevents changing the shape of the word, which helps reading. And then, there is use of habit. By the way, Colas, may I suggest using non-breaking spaces before “high” punctuation? It makes much more sense and, when writing email, you’ll need to do it anyway. Any text editor which can handle LaTeX should be able to insert the proper “~” when you type a non-breaking space when correctly set up.
    – Édouard
    Commented Nov 5, 2013 at 14:15
  • 2
    It probably prevents line breaks before “:;?!”. But I just find it way easier to always type “non-breaking space; question mark; space“ whatever software I’m in rather than type “space; question mark; space” in LaTeX only. But, as I said, this is just a suggestion.
    – Édouard
    Commented Nov 5, 2013 at 15:28
  • 2
    Note: as recommended by babel-french documentation, don't use \og text \fg{} but \frquote{text}. You can also load the csquote package and use \enquote{text}... Commented Mar 13, 2022 at 0:30

1 Answer 1

29

If you want to use kerning=french, then you need to disable the punctuation settings made by babel and leave no space before punctuation symbols.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,french]{babel}
\frenchbsetup{AutoSpacePunctuation=false}
\usepackage[babel=true, kerning=french]{microtype}

\begin{document}

Voici ce qui se passe quand on met un signe \og{}deux~points\fg{}
avec le package \og{}microtype\fg{}: il semble que ça ne marche pas!
Un autre essai: est-ce que cela marche?

\bigskip

\begin{otherlanguage*}{english}
But what happens if I type my text following the
English typographic rules?
\end{otherlanguage*}

\end{document}

enter image description here

Note that for disabling the humongous space before punctuation used in French typography when using another language you have to tell LaTeX you want to temporarily change the rules.

Alternatively, don't use kerning=french; you can type a space before punctuation or not.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,french]{babel}
\usepackage[babel=true]{microtype}

\begin{document}

Voici ce qui se passe quand on met un signe \og{}deux~points\fg{}
avec le package \og{}microtype\fg{}: il semble que ça ne marche pas!
Un autre essai: est-ce que cela marche?

\bigskip

Voici ce qui se passe quand on met un signe \og{}deux~points\fg{}
avec le package \og{}microtype\fg{} : il semble que ça ne marche pas !
Un autre essai : est-ce que cela marche ?

\end{document}

enter image description here

My eyes will never get used to see such monstrosities perpetrated by the French. ;-)

11
  • Thanks! I want to type a space before : ? ! ;. So, I will not use kerning=french. Will I loose a lot doing so?
    – Colas
    Commented Nov 5, 2013 at 13:48
  • 2
    @Colas I don't think so; the kerning feature seemed promising, but it isn't really working.
    – egreg
    Commented Nov 5, 2013 at 14:07
  • Great to put some complete code in your answer.
    – Colas
    Commented Nov 5, 2013 at 17:29
  • 2
    @Fran Say \usepackage{newunicodechar}; then \newunicodechar{«}{\og} and \newunicodechar{»}{\fg} should do.
    – egreg
    Commented Nov 6, 2013 at 7:30
  • 3
    @Mico Of course! “Mathematicians are like Frenchmen: whatever you say to them they translate into their own language, and forthwith it is something entirely different.”
    – egreg
    Commented Dec 5, 2013 at 22:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .