这是我的代码:
\documentclass{article}
\usepackage{xcolor}
\usepackage{minted}
\usemintedstyle{colorful}
\usepackage{xepersian}
\settextfont{B Nazanin}
\definecolor{mintedbackground}{rgb}{0.95,0.95,0.95}
\newmintedfile[pythoncode]{python}{
fontfamily=tt,
bgcolor=mintedbackground,
linenos=true,
numberblanklines=true,
numbersep=5pt,
gobble=0,
frame=leftline,
framerule=0.4pt,
framesep=2mm,
funcnamehighlighting=true,
tabsize=4,
obeytabs=false,
mathescape=false,
samepage=false, %with this setting you can force the list to appear on the same page
showspaces=false,
showtabs =false,
texcl=false,
breaklines=true
}
\begin{document}
\begin{latin}
\pythoncode{P.py}
222
\end{latin}
\end{document}
Python 代码左侧的数字是波斯语。我怎样才能将它们更改为英语?(但是 222 是英文的)
答案1
您可以尝试添加
\renewcommand{\theFancyVerbLine}{\lr{\upshape\tiny\arabic{FancyVerbLine}}}
到您的文档序言中。