[Tex/LaTex] beramono and texttt : angle brackets show as inverted exclamation mark and inverted question mark symbols (upside-down signs, like in spanish)

beramonobracketsfont-encodingspunctuationsymbols

Angle brackets < and > in \texttt render as inverted exclamation mark and inverted question mark (spanish punctuation marks):

\documentclass{article}
\usepackage{beramono}
\begin{document}
\texttt{<>}
\end{document}

The above document renders the < and > characters as:

enter image description here

How do I fix this?

Best Answer

The Bera Mono fonts are not available in OT1 encoding, but only in T1; if you want to use them for typewriter type, you need \usepackage[T1]{fontenc}.

This should be clear from the shown warnings

LaTeX Font Warning: Font shape `OT1/fvm/m/n' undefined
(Font)              using `OT1/cmr/m/n' instead on input line 4.

Correct example

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{beramono}
\begin{document}
\texttt{<>}
\end{document}

enter image description here