如何查找并修复 \exam 类中的多重定义标签错误

如何查找并修复 \exam 类中的多重定义标签错误

下面的 mwe 在 overleaf 中编译,但出现以下错误:

在此处输入图片描述

尽管阅读了手册,但我仍不完全理解标签的工作原理,因此我无法找到重复的定义。

为了让这篇文章对其他人更有用,请建议更多合适的标签。

非常感谢您的帮助!

\documentclass[12pt]{exam}
\printanswers
% un-comment to print solutions.
\renewcommand{\solutiontitle}{}
\usepackage{amsmath}
\usepackage{cancel}
\usepackage{framed}
\usepackage{paracol}
\globalcounter*
\usepackage[table]{xcolor}
\usepackage{tikz}
\usepackage[a4paper,margin=0.5in,include head]{geometry}
\usepackage{nicematrix}
\pagestyle{head}

\header{Algebra II: Unit 11 Quiz (Rational Expressions \& Equations)}
{}
{Due 04/07/23} 

\newcommand{\pagetop}{%
    \noindent 
    
    \bigskip
    \vspace{0.5mm}
}

\begin{document}
\def\bigskip{\vskip\bigskipamount}
    
\begin{questions}
    \fullwidth{\textbf{1-2 Simplify each expression.}}

\begin{paracol}{2}
    
% Prob #1
\question $\dfrac{4x+12}{x^2+5x+6}$
\\
\begin{solutionorbox}[3cm]
    $\dfrac{4(x+3)}
    {(x+3)(x+2)}$
    \bigskip
    $\dfrac{4\cancel{(x+3)}}{\cancel{(x+3)}(x+2)} = \boldsymbol{\dfrac{4}{x+2}}$
\end{solutionorbox}

\switchcolumn

% Prob #2
\question $\dfrac{x^2+3x+2}{x^2-4}$
\bigskip
\begin{solutionorbox}[5cm]
$\dfrac{(x+2)(x+1)}{(x+2)(x-2)}$
    \bigskip
$\dfrac{\cancel{(x+2)}(x+1)}{\cancel{(x+2)}(x-2)} = \boldsymbol{\dfrac{x+1}{x-2}}$
    \bigskip
\end{solutionorbox}

\switchcolumn*[\fullwidth{\textbf{3-4: Multiply or divide. Simply.}}]

% Prob #3
\question $\dfrac{x^2-16}{3x+3}\boldsymbol{\cdot}\dfrac{6x+6}{x^2+9x+20}$
\bigskip
\begin{solutionorbox}[5cm]
    $\dfrac{(x+4)(x-4)}{3(x+1)}\boldsymbol{\cdot}\dfrac{6(x+1)}{(x+5)(x+4)}$
    \bigskip
    $\dfrac{\textcolor{red}{\cancel{(x+4)}}(x-4)}{3\textcolor{blue}{\cancel{(x+1)}} }\boldsymbol{\cdot}\dfrac{6\textcolor{blue}{\cancel{(x+1)}}}{(x+5)\textcolor{red}{\cancel{(x+4)}}}$ 
    \bigskip
    $\dfrac{6(x-4)}{3(x+5)}=\dfrac{\cancel{6}(x-4)}{\cancel{3}(x+5)}=\boldsymbol{\dfrac{2(x-4)}{x+5}}$
\end{solutionorbox}

\switchcolumn

% Prob #4
\question $\dfrac{x^2-4x+3}{x^2-9}\boldsymbol{\div}\dfrac{x^2-3x+2}{3x+9}$
\bigskip
\begin{solutionorbox}[5cm]
    $\dfrac{\textcolor{blue}{\cancel{(x-1)}}\textcolor{red}{\cancel{(x-3)}}}{\cancel{(x+3)}\textcolor{red}{\cancel{(x-3)}}}\boldsymbol{\cdot}\dfrac{3\cancel{(x+3)}}{\textcolor{blue}{\cancel{(x-1)}}(x-2)}$
    \bigskip
    $\boldsymbol={\dfrac{3}{x-2}}$  
\end{solutionorbox}

\switchcolumn*
[\fullwidth{\textbf{5-8: Add/Subtract. If possible, simply.}}]

%Problem #5
\question $\dfrac{x+7}{3}\boldsymbol{+} \dfrac{4x-2}{2}$
\bigskip
\begin{solutionorbox}[5cm]
    $\left( \dfrac{2}{2}\right)\dfrac{(x+7)}{3} 
    \boldsymbol{+}\dfrac{4x-2}{2}\left( \dfrac{3}{3}\right)$
    \bigskip
    $\dfrac{2x+14}{6}
    \boldsymbol{+}\dfrac{12x-6}{6}$
    \bigskip
    $=\dfrac{14x+8}{6}=\dfrac{\cancel{2}(7x+4)}{\cancel{2}\boldsymbol{\cdot}3}=\boldsymbol{\dfrac{7x+4}{3}}$
\end{solutionorbox}
\vspace{0.25cm}

\switchcolumn
%Problem #6
\question $\dfrac{x+4}{2x+2}\boldsymbol{+} \dfrac{2x-1}{3x+3}$
\bigskip
\begin{solutionorbox}[5cm]
    $\left( \dfrac{2}{2}\right)\dfrac{(x+7)}{3} 
    \boldsymbol{+}\dfrac{4x-2}{2}\left( \dfrac{3}{3}\right)$
    \bigskip
    $\dfrac{2x+14}{6}
    \boldsymbol{+}\dfrac{12x-6}{6}$
    \bigskip
    $=\dfrac{14x+8}{6}=\dfrac{\cancel{2}(7x+4)}{\cancel{2}\boldsymbol{\cdot}3}=\boldsymbol{\dfrac{7x+4}{3}}$
\end{solutionorbox}
\vspace{0.25cm}

\switchcolumn*[\newpage]

\vspace{0.25cm}\vspace{0.25cm}
\end{paracol}

\newpage

%Extra credit problem
\fullwidth{\textbf{EXTRA CREDIT}}
 \bigskip
Divide and simplify. Show all work clearly.
 \qformat{\textit{\thequestion}}   % not really needed, but emphasizes the capital A
    \setcounter{question}{0}
    \renewcommand{\thequestion}{\Alph{question}}
 \question 
 $\dfrac{3x^2-13x-10}{x^2+2x-35}\boldsymbol{\div}\dfrac{6x^2-11x-10}{6x-15}$
  \bigskip
\begin{solutionorbox}[5cm]
$\dfrac{3x^2-13x-10}{x^2+2x-35}\boldsymbol{\cdot}\dfrac{6x-15}{6x^2-11x-10}$
\bigskip
$\dfrac{(3x^2-15x)+(2x-10)}{(x+7)(x-5)}\boldsymbol{\cdot}\dfrac{3(2x-5)}{(6x^2+4x)+(-15x-10)}$
\bigskip
$\dfrac{3x(x-5)+2(x-5)}{(x+7)(x-5)}\boldsymbol{\cdot}\dfrac{3(2x-5)}{2x(3x+2)-5(3x+2)}$
\bigskip
$\dfrac{(3x+2)(x-5)}{(x+7)(x-5)}\boldsymbol{\cdot}\dfrac{3(2x-5)}{(2x-5)(3x+2)}$
\bigskip
$\dfrac{\textcolor{red}{\cancel{(3x+2)}}\textcolor{blue}{\cancel{(x-5)}}}{(x+7)\textcolor{blue}{\cancel{(x-5)}}}\boldsymbol{\cdot}\dfrac{3\cancel{(2x-5)}}{\cancel{(2x-5)}(\textcolor{red}{\cancel{(3x+2)}}}$ 
\bigskip
$=\boldsymbol{\dfrac{3}{x+7}}$
\bigskip
\end{solutionorbox}
\bigskip
\fullwidth{\textbf{Solve for $\boldsymbol{x}$ (i.e. find all roots). Show all work clearly.}}
\question
$x^5+x^3+6x^2-56x+48=0$
\begin{solutionorbox}[5cm]
$\begin{NiceArray}{rrrrrrr}
1 & 1 & 0  & 1  &  6  & -56 & 48 \\
   &   & -2 & 4 & -10  &  8  &   \\
   & 1 & -2 & 5  & -4  & -48 &
\CodeAfter
  \begin{tikzpicture}
    \draw (1-|2) |- (2-|last) ;
    \draw (3-|2) -- (3-|last) ;
    \draw [very thick,red,->] (2-|2.5) -- (3-|2.5) ;
  \end{tikzpicture}
\end{NiceArray}$

\bigskip
$=\boldsymbol{}$
\bigskip
\end{solutionorbox}

\end{questions}
\end{document}```

答案1

我不知道 overleaf 应该如何工作,但从您引用的错误消息来看,您的问题可能出在您的文件上main.tex

相关内容