Hyphen (-), En-dash (–), and Em-dash (—) in LaTeX
In this tutorial, I will show you how to get Hyphen (-), En-dash (–), and Em-dash (—) in LaTeX.
Hyphen (-): To get the Hyphen symbol in LaTeX you can use the -
(dash) key from your keyboard.
En-dash (–): To get the En-dash symbol in LaTeX you can use the -
(dash or hyphen) symbol twice without giving space between them like this --
, this will convert to an En-dash (–) symbol in the LaTeX document. Also, you can use the \textendash
command.
Em-dash (—): For Em-dash, you have to use the -
(dash or hyphen) symbol three times without giving space between them like this ---
. Also, you can use the \textemdash
command.
\documentclass{article} \begin{document} Hyphen: \verb|A-Z| : A-Z En-dash: \verb|A--Z| : A--Z En-dash: \verb|A\textendash Z| : A\textendash Z Em-dash: \verb|A---Z| : A---Z Em-dash: \verb|A\textemdash Z| : A\textemdash Z \end{document}
Output:
Leave a Reply