![newcommand 存在 verb=xxx_== 问题 - 缺少插入的 $](https://linux22.com/image/449712/newcommand%20%E5%AD%98%E5%9C%A8%20verb%3Dxxx_%3D%3D%20%E9%97%AE%E9%A2%98%20-%20%E7%BC%BA%E5%B0%91%E6%8F%92%E5%85%A5%E7%9A%84%20%24.png)
\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} 可以达到此文档的目的。
我以后应该注意什么?