When typing <
or >
in LaTeX and compiling with pdflatex
, the less than and greater than symbols appear at upside down exclamation points. I'm not in math mode.
[Tex/LaTex] Why do the less than symbol (<) and the greater than symbol (>) appear wrong as upside down exclamation (¡) or question mark (¿)
font-encodingspunctuationsymbols
Related Question
- [Tex/LaTex] beramono and texttt : angle brackets show as inverted exclamation mark and inverted question mark symbols (upside-down signs, like in spanish)
- [Tex/LaTex] n upside-down version of the symbol for $\pi$
- [Tex/LaTex] How to put a small question mark over the Greater than or equals to sign
- [Tex/LaTex] How to generate a less than symbol and vertical bar that are the same height
- [Tex/LaTex] How to make an old school “much less/greater” (<< and >>) symbol
Best Answer
Geoffs tip with
\textless
and\textgreater
will work well for you. However, you could type these symbols < and > directly in your editor and they would be correctly printed if you use the recommended font encoding, Cork resp. T1:Have a look at the T1 encoding table, search for the symbols < and >. Afterwards, open the OT1 encoding table, which is the default. At the two corresponding places you will find the upside down exclamation resp. quotation mark. That should explain it.
For further reasons, why you should use T1 encoding, have a look at this question: Why should I use \usepackage[T1]{fontenc}?
You should use a font supporting T1. For instance use the very good Latin Modern font, derived from the standard fonts:
Or install the
cm-super
package which provides the standard Computer Modern fonts with T1 support.