Math Mode – Creating an Unbroken En-Dash

math-modepunctuation

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?

Best Answer

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

\documentclass{article}
\usepackage{amsmath}
\begin{document}

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}\]
\end{document}
Related Question