# LaTeX < shows upside-down? [duplicate]

I'm trying to write a simple < in my text, but each time I write it, an upside-down ! is there. And for > I get an upside-down ? Can someone please help me?

## marked as duplicate by egreg symbols StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Oct 13 '15 at 10:46

• Solutions are already given. The reason behind that strange behaviour is that CMR font (which is the standard TeX font) uses an encoding which is almost ASCII, except for codes 60 and 62, which are ASCII < and >. In those codes cmr stores the glyphs for ¡ and ¿. Moreover, cmr has no glyphs for < , > so you have to resort to another font, which is what $<$ or \textgreater or \verb|<| do. – JLDiaz Oct 13 '15 at 8:09
• @JLDiaz made me curious now: do you know the historical reasons for this? – Bordaigorl Oct 13 '15 at 8:21
• @Bordaigorl I don't remember the source. Perhaps The TeXbook, perhaps TeX FAQ, or some tugboat, or some document about OT1 encoding... I'm a bit "historical" too :-) – JLDiaz Oct 13 '15 at 8:55

Use T1-encoding:

\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
< and >
\end{document}


The commands \textless and \textgreater are designed for this usage of < and > in text mode.

\documentclass{article}
\begin{document}
There are also \textgreater\ and \textless
\end{document}


Disclaimer: A solution but not the better one.

Edit: see Christian Hupfer comment.

Use inline math:

\documentclass{article}

\begin{document}
\ensuremath{<} is not < .
\end{document}


You can define a command if you want:

\documentclass{article}

\begin{document}
\newcommand{\foo}{\ensuremath{<}}
\ensuremath{<} is not < .

But \foo{} is \ensuremath{<} !
\end{document}

• \ensuremath{<} would provide the better spacings -- the trailing \ isn't needed then – user31729 Oct 13 '15 at 8:04
• @ChristianHupfer disclaimer write for this kind of solution ;-) you should post it. – Romain Picot Oct 13 '15 at 8:06
• Nope: I've upvoted your solution already -- otherwise you will get beyond the 2k boundary :-P – user31729 Oct 13 '15 at 8:07
• @ChristianHupfer ok I've modified my answer then ;-) – Romain Picot Oct 13 '15 at 8:11