考试类别 & 解答框:打印答案时警告颜色不兼容

考试类别 & 解答框:打印答案时警告颜色不兼容

以下代码使用printanswers%printanswers(注释掉的)命令(h/t @simondispa)

使用 编译代码没有错误%printanswers。但是当我使用printanswers以下日志警告结果时:

在此处输入图片描述

我仔细阅读了代码,试图找到警告的来源。没有找到。既然这只是一个警告,也许可以忽略它?

非常感谢您的帮助。下面的 MWE 启用printanswers。谢谢!

\documentclass[12pt]{exam}

\printanswers
% un-comment to print solutions.
\renewcommand{\solutiontitle}{}
\usepackage{amsmath}
\usepackage{cancel}
\usepackage{framed}
\usepackage{bm}
\usepackage{multicol}
\usepackage[nice]{nicefrac}
\usepackage{tasks}
\usepackage[a4paper,margin=0.5in,include head]{geometry}
\usepackage{xcolor}
\usepackage{soul}
\pagestyle{head}
\header{Algebra II: Unit 13 A\&B Fractional Exponents}
{}
{Due 05/02/23} 

\newcommand{\pagetop}{%
 }
\newlength{\lwidth}% added <<<<<
\settowidth{\lwidth}{(99)\enspace} % added

\settasks{after-item-skip=1em,
    after-skip=2cm,
    label-width=\lwidth, % changed <<<<<<<<<
    item-indent=0pt,   % changed <<<<<<<<<<
    %label-format = \bfseries, 
    %add \bf to make numbers bold <<<<<<<<<<
    label=(\arabic*), % 
    label-offset = -\lwidth,% added <<<<<
    item-format = \hspace{\lwidth},% added <<<<<
    column-sep=2em,    % changed <<<<<<<<<  
}
\makeatletter
\renewcommand{\fullwidth}[1]{%
    \vbox{%     
        \leftskip=-\lwidth \rightskip=0pt
        \advance\linewidth\@totalleftmargin%
        \@totalleftmargin=0pt%
        #1}%
    \nobreak
}
\makeatother

%******************************************** added <<<<<<<<<<
\newlength{\SolutionSpace}
\ifthenelse{\boolean{printanswers}}
{\setlength{\SolutionSpace}{5cm}
    \colorsolutionboxes 
    \definecolor{SolutionBoxColor}{gray}{0.8}}% solutions are printed
{\setlength{\SolutionSpace}{0cm}
    \colorsolutionboxes 
    \definecolor{SolutionBoxColor}{gray}{1}}% solutions are not being printed
%*********************************************
\begin{document}
%definition for bigskip = 1 line to replace all \bigskip
\def\bigskip{\vskip\bigskipamount}
\begin{tasks}
[style=enumerate](4)
\task![]\fullwidth{\textbf{Show all work on separate paper.}}
\bigskip
\task![]\fullwidth{\textbf{Change to log form.}}
%%% Prob #1
\task 
$2^4=16$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$\log16_{2} =3$}
\end{solutionorbox}
\vspace{0.25cm}
%%%%
%%%%Prob #2
\task 
$\sqrt[4]{5}$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$logz$}
\end{solutionorbox}
\vspace{0.25cm}
%%%Prob #3
\task 
$\sqrt[3]{x^2}$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$logz$}
\end{solutionorbox}
\vspace{0.25cm}
%%% Prob #4
\task 
$\sqrt[4]{x^3}$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$logz$}
\end{solutionorbox}
\vspace{0.25cm}
%%% Prob #5
\task 
$\sqrt[4]{x^3y^2}$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$logz$}
\end{solutionorbox}
\vspace{0.25cm}
%%% Prob #6
\task 
$\sqrt[4]{x^3y^4}$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$logz$}
\end{solutionorbox}
%%% Prob #7
\task 
$\sqrt[4]{5}$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$5^{1/4}$}
\end{solutionorbox}
\vspace{0.25cm}
%%% Prob #8
\task 
$\sqrt[3]{x^2}$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$x^{2/3}$}
\end{solutionorbox}
\vspace{0.25cm}
\task![]\fullwidth{\textbf{Change to exponential form.}}
%%% Prob #9
\task
$w^{4/7}$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$exponent$}
\end{solutionorbox}
\vspace{0.25cm}
%%% Prob #10
\task
$x^{1/3}y^{2/3}$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$exponent$}
\end{solutionorbox}
\vspace{0.25cm}
%%% Prob #11
\task
$m^{4/5}n^{3/5}$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$exponent$}
\end{solutionorbox}
\vspace{0.25cm}
%%% Prob #12
\task
$(ab)^{3/4}$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$exponent$}
\end{solutionorbox}
\vspace{0.25cm}
%%%% Prob #12
\task
$(bc)^{4/5}$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$exponent$}
\end{solutionorbox}
\vspace{0.25cm}
%%% Prob #15
%%
\task![]\fullwidth{\textbf{Simplify. (Add exponents)}}
%%% Prob #39

\end{tasks}
\end{document}

相关内容