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?
3 Answers
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– user31729Oct 13, 2015 at 8:04 -
@ChristianHupfer disclaimer write for this kind of solution
;-)
you should post it. Oct 13, 2015 at 8:06 -
Nope: I've upvoted your solution already -- otherwise you will get beyond the 2k boundary :-P– user31729Oct 13, 2015 at 8: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\textgreater
or\verb|<|
do.