# no linebreak between opening quotation mark and em-dash

In dialogues I often need to use the form \enquote{---\,Lorem ipsum dolor}. But sometimes, when the quote begins toward the end of a line, I get an ugly rendering like this:

d sse lectus lorem sit amet et consectetur quia adipit erit et « —

Lorem ipum dolor »

This is a minimal example of this behaviour:

\documentclass{article}
\usepackage[french]{babel}
\RequirePackage[babel=true]{csquotes}
\begin{document}
d sse lectus lorem ipsum quia dolor sit amet et consectetur quia adipit     \enquote{---\,Lorem ipsum dolor}
\end{document}


As you see, i use an \, between the long dash and the following word but the line is breaked in the rending. I get the same behavior with ~.

So, how can I force the whole chain “« — Lorem” to be in the same line?

• \mbox{\enquote{---\,Lorem ipsum dolor}} – Bobyandbob Apr 4 '17 at 4:30
• An excellent MWE, by the way! – Mico Apr 4 '17 at 5:52

# First solution

Mico's answers are good, but here's one that doesn't require any packages.

\documentclass{article}
\usepackage{csquotes}

\newcommand{\denquote}[1]{%
\enquote{\mbox{---\,}\ignorespaces#1}}

\begin{document}

% orig. form of "paragraph"
d sse lectus lorem ipsum quia dolor sit amet et consectetur

% with \denquote
d sse lectus lorem ipsum quia dolor sit amet et consectetur

\end{document}


i threw in the \ignorespaces just in case the input isn't careful, and begins with a typed space.

# Second solution

You can also create the macro \longdash you could use anywhere you need dash and not especially in \enquote command:

\documentclass{article}
\usepackage[french]{babel}
\RequirePackage[babel=true]{csquotes}

\newcommand\longdash{\mbox{---\,}\ignorespaces{}}
\begin{document}
d sse lectus lorem ipsum quia dolor sit amet et consectetur quia adipit     \enquote{---\,Lorem ipsum dolor}

d sse lectus lorem ipsum quia dolor sit amet et consectetur quia adipit     \enquote{\longdash{}Lorem ipsum dolor}
\end{document}

• I modify you’re answer to add a second solution based on your own one. The second solution seems better for me. – fauve Apr 5 '17 at 1:46

I suggest you load the amsmath package use its \nobreakdash macro as follows:

\enquote{\nobreakdash---\,Lorem ipsum dolor}


A full MWE:

\documentclass{article}
\usepackage{amsmath} % for "\nobreakdash" macro
\usepackage[french]{babel}
\RequirePackage[babel=true]{csquotes}
\begin{document}

% orig. form of "paragraph"
d sse lectus lorem ipsum quia dolor sit amet et consectetur

• seems to me that the babel approach might also suppress breaks after hyphens where they would be not only unobjectionable but desirable. – barbara beeton Apr 4 '17 at 13:43
• in the screenshot there is an inserted hyphen at the position of \babelhyphen{nobreak}, is that intentional? – Marijn Apr 4 '17 at 14:06
• @Marijn - I rewrote the answer and dropped the \babelhyphen{break} method. – Mico Apr 4 '17 at 14:33
• @barbarabeeton - Thanks. Based on your comment and the one by @Marijn, I decided to rewrite the answer and drop the \babelhyphen{break} method. – Mico Apr 4 '17 at 14:34