What LaTeX command creates an emdash?

F'x picture F'x · Dec 4, 2010 · Viewed 7.3k times · Source

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.

Answer

F'x picture F'x · Dec 4, 2010

\textemdash and \textendash