All over the internet, there's this question on how to make LaTeX do the en-dash and em-dash.
I have the opposite problem. I have some text from which I am generating HTML and LaTeX outputs. The original text has nothing to do with LaTeX and therefore --
and ---
are needed to be written as they are, as opposed to being converted to en and em dashes.
Putting it in \texttt
should probably solve it, but this could happen in normal text and I'd like to know if there is any other solutions.
P.S. I am writing the LaTeX files with a software, so in fact for example a thing like \dash{}
instead of every -
is easier for me, if such a thing exists that is!
Best Answer
--
and---
are TeX ligatures (likefl
orfi
). Disabling ligatures is one of the features of package microtype. You may deactivate all ligatures of all fonts:or only the ligatures of the
rm
-family:or only the ligatures
--
and---
of all fonts:or of one family, e.g. the
tt
-family:See the manual of package
microtype
for more information about disabling ligatures.