0

This is my code:

\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}

The numbers on the left of the Python code are in Persian. How can I change them to be in English? (But the 222 is in English)

Output of the above code A also have tried moving \newmintedfile[pythoncode]{pthon} into latin environment which did not fix the problem.

1
  • By "English" numerals, would you be referring to arabic numerals, i.e., 0, 1, 2, 3, ...? Please advise.
    – Mico
    Jun 27, 2017 at 19:47

1 Answer 1

1

You can try adding

\renewcommand{\theFancyVerbLine}{\lr{\upshape\tiny\arabic{FancyVerbLine}}}

to your document preamble.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .