TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

— into LaTeX markup
share|improve this question

migrated from stackoverflow.com Jan 22 '13 at 12:16

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

up vote 8 down vote accepted

You convert the em dash by using three dashes in a row in the LaTeX file: ---

Actually, this depends on the font, but for all practical cases, this will work.

share|improve this answer

\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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.