Please, don't ask why I need this. I need to print > character, but I can't use the > symbol inside the .tex file. \rangle doesn't work for me, since it prints a math-mode char, which looks very much different from \texttt{>} (I need true-type font).


2 Answers 2


\textgreater works with any encoding (in text mode); remember that TeX will ignore spaces following the command, so you may need \textgreater{} if a space must follow.

If you also need to use > in math mode (but cannot input the character), also do


or, more simply but more cryptic,

  • There is also \textless
    – yegor256
    Jun 29 at 17:52
  • apparently, \texttt{\textgreater} and \texttt{>} look differently, do you know why and how to fix?
    – yegor256
    Jun 29 at 17:54
  • 1
    @yegor256 You need \usepackage[T1]{fontenc} if you need \textgreater in typewriter type.
    – egreg
    Jun 29 at 20:02

When compiling with XeLaTeX or LuaLaTeX you can use the following:




(in pdfLaTeX you'll need to also \usepackage[T1]{fontenc}).

This'll give the following output:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .