For using Hyphen(-), En-dash(–), and Em-dash(—) symbols in documents, LaTeX provides you with some default commands by which you can use these symbols wherever you need them.
You don’t need to use any package for this. The commands are listed in the table below
Name | Command |
---|---|
Hyphen(-) | - |
En-dash(–) | -- or \textendash |
Em-dash(—) | --- or \textemdash |
Here are some examples so you can see what the output looks like.
\documentclass{article}
\begin{document}
\verb|Latex-help|\rightarrow $Latex-help$\\[4pt]
\verb|Latex--help|\rightarrow $Latex--help$\\
or,\\
\verb|Latex\textendash help|\rightarrow $Latex\textendash help$\\[4pt]
\verb|Latex---help|\rightarrow $Latex---help$\\
or,\\
\verb|Latex\textemdash help|\rightarrow $Latex\textemdash help$
\end{document}
Output :