How to convert mdash into LaTeX markup?

I am converting HTML markup into LaTeX markup by using sed command. I need to convert &mdash; into its corresponding LaTeX markup. How can I implement it?

&mdash; into LaTeX markup

-

migrated from stackoverflow.comJan 22 '13 at 12:16

This question came from our site for professional and enthusiast programmers.

You convert the em dash by using three dashes in a row in the LaTeX file: ---
\textemdash - or, if you have a recent UTF-8 capable TeX engine, you can insert the UTF-8 character. See Wikipedia. Note that the command will gobble a trailing space unless you add a {} to it.