在我的代码中,我有弯曲的引号(见屏幕截图)。我可以将它们替换为垂直引号吗?
这是我的格式化代码:
\lstset{%
% General design
backgroundcolor=\color{lightgray},
basicstyle={\small\ttfamily},
frame=l,
% Code design
identifierstyle=\color{black},
keywordstyle=\color{blue}\bfseries,
ndkeywordstyle=\color{greenCode}\bfseries,
stringstyle=\color{ocherCode}\ttfamily,
commentstyle=\color{darkgray}\ttfamily,
% Code
language={JavaScript},
tabsize=2,
showtabs=false,
showspaces=false,
showstringspaces=false,
extendedchars=true,
breaklines=true,
captionpos=b,
% line-numbers
xleftmargin={0.75cm},
numbers=left,
stepnumber=1,
firstnumber=1,
numberfirstline=true,
}
答案1
使用upquote
解决了该问题:
\usepackage{upquote}
\usepackage{listings}
感谢 G. Poore!