alexott ([personal profile] alexott) wrote in [personal profile] juan_gandhi 2019-01-08 07:52 am (UTC)

Из документации: upquote=⟨true|false⟩ false determines whether the left and right quote are printed ‘’ or `'. This key requires the textcomp package if true.

\documentclass{article}
\usepackage{listings}
\usepackage{textcomp}

\begin{document}
\begin{lstlisting}[language=Python,upquote=true]
print('Hello world!')
\end{lstlisting}

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting