>> is changed to » using beramono [duplicate]

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.

-

marked as duplicate by Manuel, LaRiFaRi, Masroor, Christian Hupfer, ThorstenJul 21 at 14:14

Welcome to TeX.sx! :) –  cgnieder Jul 21 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 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 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 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 at 13:49

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

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{libertine}
\usepackage[scaled]{beramono}

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


-