newcommand 存在 verb=xxx_== 问题 - 缺少插入的 $

newcommand 存在 verb=xxx_== 问题 - 缺少插入的 $
\documentclass[12pt,a4paper,UTF8, scheme = plain]{ctexrep}
\usepackage{amsmath,enumerate}
\usepackage{geometry}
\usepackage{adjustbox}
\usepackage{booktabs}
\usepackage{fancyhdr}
\usepackage{lastpage}
\fancyhead{}
\fancyfoot[C]{}
\fancyfoot[R]{Page~\thepage~of~\pageref{LastPage}}
\fancyfoot[L]{Department of Mathematics}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\usepackage{pdfpages}
\usepackage{hyperref}
\hypersetup{
    bookmarksopen  = false,
    pdfstartview   = {FitV},         % fits the width of the page to the window
    pdfpagelayout  = TwoPageRight    % UseOutlines, %UseNone-disable bookmark panel
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pdfsuppressptexinfo=-1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{qrcode}
\usepackage{background}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% Cover page  %%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\myCover}[5]{%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newgeometry{top=2cm,left=2cm,right=2cm,bottom=2cm}
\NoBgThispage
\pagestyle{empty}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[!th]
\begin{minipage}[c]{0.3\textwidth}
    \begin{center}
    \includegraphics[scale=0.35]{example-image}
    \end{center}
\end{minipage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\qquad%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{minipage}{0.65\textwidth}
{
\Large \bfseries
    CAIE 9709 Mathematics   \\[2ex]
    #1                      \\[2ex]  % Paper Name
    Length : #2             \\[2ex]  1 HOUR 30 MINUTES
    Last updated: \today    \\[3ex]
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{minipage}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vspace*{\fill}
\textbf{\Large Name:}     \rule{6cm}{1pt} \\[3ex]
\textbf{\Large Teacher:}  \Large{#3}      \\[2ex]  %%%%% TeacherName
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vspace*{\fill}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Score Tables
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{table}[!h]
\large
\begin{tabular}{|l|l|r|c|}
\toprule
No.  & Source  & Mark & Score \\
\midrule
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#5
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\midrule
Total & & #4 & \\ %%%%%%%%%%%%%%%%% %%%%%% Total Marks 
\bottomrule
\end{tabular}
\end{table}
\vspace*{\fill}
How I can achieve better:
\begin{itemize}
\item
\item
\item
\item
\end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vspace*{\fill}
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\myCover%%%%%%%%%%%%%%%%%%%%%%%%%%%
{Paper 4 Mechanics}
{1 HOUR 30 MINUTES}
{Maths Department}
{75}
{%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Q1  & \verb=9709_XXX= &  4 &  \\ \hline
Q2  & \verb=9709_XXX= &  6 &  \\ \hline
Q3  & \verb=9709_XXX= &  6 &  \\ \hline
Q4  & \verb=9709_XXX= &  6 &  \\ \hline
Q5  & \verb=9709_XXX= &  9 &  \\ \hline
Q6  & \verb=9709_XXX= &  9 &  \\ \hline 
Q7  & \verb=9709_XXX= & 10 &  \\ \hline 
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
test test test test 


\end{document}

这是什么

 ! Missing $ inserted.

关于?

我发现这是\动词=9709_XXX=这导致了问题......但在我将它们放入新命令之前,我不必担心它们。

更改为 \path{9709_XXX} 可以达到此文档的目的。

我以后应该注意什么?

相关内容