Take the 2-minute tour ×

I am looking to produce directional variants of the en-dash. A "left en-dash" should have half of ordinary inter-word spacing on its right and allow line-breaks only on its left; a "right en-dash" should have half of ordinary inter-word spacing on its left and allow line-breaks only on its right. This is intended to aid the visual parsing of parenthetical phrases: "Here - as in his other works - the composer alludes to Italian folk dances."

What is the best way to define such commands? Let's name them \ldash and \rdash.

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

You can use


\nobreak inserts a large \penalty, discouraging (not avoiding) a line or page break at that location. A small space on the sides are offered by \,, while \unskip and \ignorespaces removes the whitespace naturally inserted between words.

share|improve this answer
Usage for your solution would be some words \ldash parenthetical expression \rdash{} some words. Is there an easy way to modify the \rdash macro so that I can omit {} after it? –  Lover of Structure Oct 26 '12 at 4:38
@user14996: xspace can be used: \usepackage{xspace}\newcommand{\rdash}{\unskip\nobreak\,\nobreak--\xspace} –  Werner Oct 26 '12 at 4:44
Isn't \nolinebreak instead of \nobreak cleaner here? –  Lover of Structure Jun 16 '13 at 11:36
Actually, a better approach might be to prepend \leavevmode to \rdash: \leavevmode\unskip\nobreak\,\nobreak--\xspace; otherwise the first \nobreak will be equivalent to a \nopagebreak if \rdash is used paragraph-initially, right? It does make sense for \rdash to have no spacing if used paragraph-initially (for whatever reason; of course this shouldn't normally occur), but I'm not sure how to get this effect. This case won't occur in normal code, but I think it might occur accidentally, so perhaps one should guard against it? –  Lover of Structure Jun 17 '13 at 15:51
If \ldash happens to be typeset at the beginning of a line, it might strut into the margin. Writing \hspace*{0pt}\ldash fixes this. –  Lover of Structure Jul 4 '13 at 10:16
show 1 more comment

Your Answer


