Search code examples
unicodelatextexligature

What LaTeX command creates an emdash?


I know I can create an em-dash with --- (and an en-dash with --). However, I want to use these glyphs in my Unicode setup, and trying it as follows:

\DeclareUnicodeCharacter{2012}{--}
\DeclareUnicodeCharacter{2013}{--}
\DeclareUnicodeCharacter{2014}{---}

simply yields series of two or three dashes in the output. What should I use instead? I tried \endash and \ndash, but those are not known commands.


Solution

  • \textemdash and \textendash