[Tex/LaTex] space before and after emdashes

punctuationspacing

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

Best Answer

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}{\,-\,}