Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

I have the following piece of text in Latex: \texttt{List<List<Integer>>} and it was rendering properly. Then, I decided to use beramono as my typewriter font, and I have a problem: >> is now rendered as a » character. How should I fix it? In a listing environment, >> is shown correctly.

share|improve this question

marked as duplicate by Manuel, LaRiFaRi, Masroor, Christian Hupfer, Thorsten Jul 21 '14 at 14:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Welcome to! :) – clemens Jul 21 '14 at 12:59
Have you tried writing \verb+List<List<Integer>>+? Just a guess. If you want to get answers without any guessing, you should provide a minimal working example of your problem. – LaRiFaRi Jul 21 '14 at 13:18
Apart from the answers in that question, you can (if you use/are able to use microtype package) disable ligatures with \DisableLigatures[<,>]{encoding=*,family=tt}. – Manuel Jul 21 '14 at 13:24
@Ali The suggestion may came when we have a minimal compilable example of the code you are compiling. Without it, no one can know what's going on. – Manuel Jul 21 '14 at 13:41
@Ali Although you should always post a minimal compilable example to show your problem (which helps everyone to answer your question), here it's a problem with me: I forgot a * after tt, you need to add it. – Manuel Jul 21 '14 at 13:49

1 Answer 1

up vote 4 down vote accepted

The >> is transformed into a ligature, which can be really beautiful for quotes. In this case you will have to split the ligature (\texttt{<{}< {<}< <{<} <\/<} or some babel shorthand...) or just use the \verb command which is meant for such purpose.

% arara: pdflatex


\texttt{List<List<Integer>>} vs.\ \verb+List<List<Integer>>+

enter image description here

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.