# space before and after emdashes

I am typing a document in French and I need to automatically get a fine space (unbreakable) after opening emdash and before closing dash. ---\, blahblah\, --- is not very good...

How can I do that.

Best, Fred

• Crosspost – Johannes_B Nov 16 '15 at 11:42
• Depending on what blahblah semantically is supposed to mean I'd define a new macro or environment \newcommand\thought[1]{---\,#1\,---} and then use \thought{blahblah} – clemens Nov 16 '15 at 11:47
• BTW: the example in your post has thin spaces in addition to normal ones… – clemens Nov 16 '15 at 11:59
• Doesn't frenchb ensure this automatically? – Bernard Nov 16 '15 at 12:53
• You can adapt the code from here: tex.stackexchange.com/questions/22419/… – Ulrike Fischer Nov 16 '15 at 16:19

You can use LaTeX unbreakable space ~:

~-~Blahblah~-~


This will create a space and force the TeX engine to link the part before and after the tilde to be on the same line of text produced.

You can create a command to not type them:

\newcommand{\foo}{~-~}


For a thin space you can use \, without space around:

\,-\,Blahblah\,-\,


With newcommand:

\newcommand{\bar}{\,-\,}

• Thanks.But ~ generates a normal space, not a thin one... – Fred_O Nov 16 '15 at 11:35
• @Fred_O see my edit for a thin space. – Romain Picot Nov 16 '15 at 11:41
• isn't it usual to use an en-dash (--) rather than a hyphen between the spaces? – barbara beeton Nov 16 '15 at 14:01