I'm trying to list some code using the listings package, however if use ttfamily font, brackets don't render correctly. This is what it looks like
1 Answer
First of please always post a full minimal example others can copy and test as is.
It is a known fact that <>
used in text gives ¡ and ¿ if running under pdflatex
and without \usepackage[T1]{fontenc}
as the default font encoding OT1
performs many loops.
Thus for pdflatex
the solution is to add
\usepackage[T1]{fontenc}
to your preamble.
-
Sorry about that, however I tried looking for this specific issue but nothing came up (perhaps I wasn't searching with the right words) Nov 5, 2021 at 13:17
pdflatex
try adding\usepackage[T1]{fontenc}