Basically I want
\mint{python}|'banana'|
to produce straight single quotes, rather than the curly ones it normally produces (in pdflatex
).
listingsmintedpunctuation
Basically I want
\mint{python}|'banana'|
to produce straight single quotes, rather than the curly ones it normally produces (in pdflatex
).
Best Answer
You can use the package
upquote
. Note the package loads the packagetextcomp
The package
upquote
works also withlistings
.The result:
If you are using pygmentize version 1.6 that the package
upquote
can't do its job. To fix this issue you can use the following hack:Note if you are working with XeLaTeX or LuaLaTeX the hack isn't needed.