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?
Asked
Active
Viewed 1,873 times
3 Answers
7
Use T1-encoding:
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
< and >
\end{document}
Ulrike Fischer
- 327,261
3
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}
2
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}
Romain Picot
- 6,730
- 4
- 28
- 58
-
\ensuremath{<}would provide the better spacings -- the trailing\\isn't needed then – Oct 13 '15 at 08:04 -
@ChristianHupfer disclaimer write for this kind of solution
;-)you should post it. – Romain Picot Oct 13 '15 at 08:06 -
Nope: I've upvoted your solution already -- otherwise you will get beyond the 2k boundary :-P – Oct 13 '15 at 08:07
-

<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\textgreateror\verb|<|do. – JLDiaz Oct 13 '15 at 08:09