Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am wondering if this is a normal situation or a bug!

\documentclass{article}
\usepackage[french]{babel}
\begin{document}

Ceci est \og entre guillemets \fg.

Ceci est aussi \og~entre guillemets~\fg, mais avec des espaces insécables.

\end{document}

which gives

enter image description here

Is there a way to use both a non-breaking space and the symbol \og?


PS :

Ceci est aussi \og{}~entre guillemets~\fg{}, mais avec des espaces insécables.

gives the same.

share|improve this question
2  
\og already contains some spacing commands: \penalty \@M \hskip .8\fontdimen 2\font plus.3\fontdimen 3\font minus.8\fontdimen 4\font –  Jubobs Dec 10 '13 at 13:55
3  
You can also use csquotes, a package for intelligent quoting. –  Johannes_B Dec 10 '13 at 14:02

2 Answers 2

up vote 9 down vote accepted

It seems to be very logical: \og and \fg do add unbreakable spaces. So if you specify them explicitly, it considers you want to have two of them on each side. I think you also can use directly « and » in your code, provided you don't forget to add \usepackage[T1]{fontenc} (and an 8-bit font, not cm fonts). See §9 of the doc for frenchb.

share|improve this answer

This is a question of how tex interprets its input. In \og , \og followed by space, the final space is swallowed as a terminator for the command and no space is printed. In \og~ the ~ inserts a space into the output. This is similar to \og{} , \og{} followed by space, which also inserts a space:

Sample output

\documentclass{article}
\usepackage[french]{babel}
\begin{document}

Ceci est \og{} entre guillemets\fg.

\end{document}

Now do you need to instert a non-breakable space after \og? No. \og inserts penalties disallowing a line break immediately after.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.