Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to get an en-dash by using two '-' characters, but instead of appearing as one long en-dash symbol, I'm getting --. Any idea how I can get an unbroken en-dash?

share|improve this question
Please post a minimal example and which engine and format you are using (LaTeX, pdfLaTeX, XeLaTeX, ...) It could be a problem with ligatures, font, or just with your viewer. Zoom in, try a different viewer or print it. –  Stefan Kottwitz Aug 7 '11 at 22:02
You should get an unbroken endash by default. Are you using xelatex or special font package, etc.? –  frabjous Aug 7 '11 at 22:02
Try \textendash although I get an endash using two '-' characters. And, while we're on the topic, an even longer dash is produced by the \textemdash command –  DJP Aug 8 '11 at 1:20
Apparently '--' doesn't produce an en-dash in math-mode; it works fine in text mode. –  Isaac Kleinman Aug 8 '11 at 1:40

1 Answer 1

up vote 23 down vote accepted

Are you perhaps trying to do this within math mode? If, so that needs special attention:


Outside of math mode  13--17 works.

In math mode this does not work as the dashes represent a minus operation:
\[a = d\ 17--21\]

In math mode you need to:
\[a = d \hbox{ 17--21}\]
or if you have the amsmath pacakge:
\[a = d \text{ 16--19}\]
share|improve this answer
Yes, I realized my mistake, I was trying to get the en-dash from within math mode; it works fine in text mode. –  Isaac Kleinman Aug 8 '11 at 1:37

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.