铸造更改注释字符

铸造更改注释字符

我正在尝试使用 minted 将一些 asm 代码添加到我的文档中。为此,我有以下实现:

\documentclass[a4paper,12pt,twoside]{article}

% Syntax Highlighting
\usepackage{pdfcol}
\usepackage[most, minted]{tcolorbox}
\tcbuselibrary{minted,breakable}
\usepackage{xcolor}
\usemintedstyle{friendly}
\definecolor{bg}{rgb}{0.95,0.95,0.95}
\renewcommand{\theFancyVerbLine}{\scriptsize {\arabic{FancyVerbLine}}}
\newcommand{\myminted}[1]{\tcbinputlisting{
colback=bg,
breakable,
listing only,
listing file={#1},
minted language=nasm,
minted options={linenos,breaklines,numbersep=2mm,xleftmargin=2mm,obeytabs,tabsize=2,autogobble},
enhanced,
overlay={%
       \begin{tcbclipinterior}
           \fill[gray!25] (frame.south west) rectangle ([xshift=6mm]frame.north west);
       \end{tcbclipinterior}
   }
}}

\begin{document}
\myminted{mwe.asm}
\end{document}

问题是我需要数字前面有 #,但 minted 认为这会使其成为注释。我希望它们显示为数字,就像前面没有 # 一样。如果您使用此 asm 文件,则可以看到:

; This should be a comment
mov R1, 56 ; <- this should be a number
mov R2, #56 ; <- this should also be a number, but isn't

我该怎么做才能改正这个行为?

相关内容