TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

Your Answer


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.