在 mwe 中,我已经注释掉了打印解决方案命令:%\printanswers
。
正如预期的那样,这会产生带有空框的问题。“答案”实际上是分步解决方案,导致出现如下所示的大框。
是否可以注释掉打印答案命令并删除方框?(原因:回收空方框创建的所有空白区域。学生在单独的纸上展示作业。)
或者,我应该创建 2 个版本:(1)仅问题(即没有解决方案框的代码)(2)问题+像这样的分步解决方案:
练习包含 15 至 30 个问题。因此,任何使流程更高效的建议都十分受欢迎。
非常感谢您花时间阅读并回复我的帖子!
\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}{%
%\noindent
\bigskip
\vspace{0.5mm}
}
\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
\begin{document}
%definition for bigskip = 1 line to replace all \bigskip
\def\bigskip{\vskip\bigskipamount}
\begin{tasks}
[style=enumerate](3)
\task![]\fullwidth{\textbf{Change to fractional exponents.}}
\task![]\fullwidth{\textbf{Simplify. }}
%% Prob #34
\task
$\dfrac{a^{3/4}\bm{\cdot}a^{1/2}}{a^{3/8}}$
\vspace{0.25cm}
\begin{solutionorbox}[5cm]
$\dfrac{a^{(3/4\bm{+}1/2)}}{a^{3/8}}=\dfrac{a^{(3/4\bm{+}2/4)}}{a^{3/8}}$
\bigskip
$a^{(5/4\bm{-}3/8)}=$
\colorbox{yellow}{$a^{7/8}$}
\end{solutionorbox}
{\vspace{0.5cm}}
%%
%% Problem #35
\task
$\dfrac{(b^{4/5}c^{3/4})\strut^{20}}{(b^{1/2}c)\strut^2}$
\vspace{0.25cm}
\begin{solutionorbox}[5cm]
$\dfrac{b^{(4/5\bm{\cdot}20)}c^{(3/4\bm{\cdot}{20})}}{b^{(1/2\bm{\cdot}2)}c^{(1\bm{\cdot}2)}}$
\bigskip
$\dfrac{b^{16}c^{15}}{bc^2}=$
\colorbox{yellow}{$b^{15}c^{13}$}
\end{solutionorbox}
{\vspace{0.5cm}}
%%% Prob #36
\task
$\dfrac{(a^4b^6)\strut^{2/3}}{(a^{10}b^5)\strut^{1/5}}$
\vspace{0.25cm}
\begin{solutionorbox}[5cm]
$\dfrac{a^{(4\bm{\cdot}2/3)}b^{(6\bm{\cdot}2/3)}}{a^{(10\bm{\cdot}1/5)}b^{(5\bm{\cdot}1/5)}}=\dfrac{a^{8/3}b^4}{a^2b^1}$
\bigskip
$a^{(8/3-6/3)}b^{(4-1)}=$
\colorbox{yellow}{$a^{2/3}b^3$}
\end{solutionorbox}
{\vspace{0.5cm}}
%%% Prob #37
\task
$\dfrac{(a^{24}b^{16})\strut^{3/4}}{(a^{10}b^{14})\strut^{1/2}}$
\vspace{0.25cm}
\begin{solutionorbox}[5cm]
$\dfrac{a^{(24\bm{\cdot}3/4)}b^{(16\bm{\cdot}3/4)}}{a^{(10\bm{\cdot}1/2)}b^{(14\bm{\cdot}1/2)}}=\dfrac{a^{18}b^{12}}{a^5b^7}$
\bigskip
$a^{(18-5)}b^{(12-7)}=$
\colorbox{yellow}{$a^{13}b^5$}
\end{solutionorbox}
{\vspace{0.5cm}}
%%% Prob #38
\task
$\dfrac{(a^4b^{1/2})\strut^{2}(a^6b^4)\strut^{1/2}}{(ab^4)\strut^{1/2}(ab^2)\strut^{1/4}}$
\vspace{0.25cm}
\begin{solutionorbox}[5cm]
$\dfrac{\bigl(a^{(4\bm{\cdot}2)}b^{(1/2\bm{\cdot}2)}\bigr)\bigl(a^{(6\bm{\cdot}1/2)}b^{(4\bm{\cdot}1/2)}\bigr)}{\bigl(a^{(1\bm{\cdot}1/2)}b^{(4\bm{\cdot}1/2)}\bigr)\bigl(a^{(1\bm{\cdot}1/4)}b^{(2\bm{\cdot}1/4}\bigr)}$
\bigskip
$\dfrac{\bigl(a^8b^1\bigr)\bigl(a^3b^2\bigr)}{\bigl(a^{(1/2)}b^2\bigr)\bigl(a^{(1/4)}b^{(1/2)}\bigr)}$
\bigskip
$\dfrac{a^{(8+3)}b^{(1+2)}}{a^{(1/2+1/4)}b^{(2+1/2)}}=
\dfrac{a^{11}b^4}{a^{(3/4)}b^{(5/2)}}$
\bigskip
$a^{(11-3/4)}b^{(3-5/2)}=$\colorbox{yellow}{$a^{41/4}b^{1/2}$}
\end{solutionorbox}
{\vspace{0.5cm}}
%%% Prob #39
\task
$\biggl((a^2a^{1/2})\strut^2a\biggr)^{1/2}$
\vspace{0.25cm}
\begin{solutionorbox}[5cm]
$\biggl((a^{2+1/2})\strut^2a\biggr)^{1/2}$
\bigskip
$\biggl((a^{5/2})\strut^2a\biggr)\strut^{1/2}=(a^5a)\strut^{1/2}$
\bigskip
$a^{(6\bm{\cdot}1/2)}$
=\colorbox{yellow}{$a^3$}
\end{solutionorbox}
{\vspace{0.5cm}}
\end{tasks}
\end{document}
答案1
添加代码来测试解决方案是否正在打印。在第二种情况下,框被移除。
请注意 被[5cm]
替换为[\SolutionSpace]
并被{\vspace{0.5cm}}
注释掉。还可\usepackage{color}
按照\usepackage{xcolor}
类的要求使用 代替exam
。
和%\printanswers
和\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{color}% changed <<<<<<<<<<<
\usepackage{soul}
\pagestyle{head}
\header{Algebra II: Unit 13 A\&B Fractional Exponents}
{}
{Due 05/02/23}
\newcommand{\pagetop}{%
%\noindent
\bigskip
\vspace{0.5mm}
}
\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](3)
\task![]\fullwidth{\textbf{Change to fractional exponents.}}
\task![]\fullwidth{\textbf{Simplify. }}
%% Prob #34
\task
$\dfrac{a^{3/4}\bm{\cdot}a^{1/2}}{a^{3/8}}$
\vspace{0.25cm}
\begin{solutionorbox}[\SolutionSpace] % changed <<<<<<<<<<<
$\dfrac{a^{(3/4\bm{+}1/2)}}{a^{3/8}}=\dfrac{a^{(3/4\bm{+}2/4)}}{a^{3/8}}$
\bigskip
$a^{(5/4\bm{-}3/8)}=$
\colorbox{yellow}{$a^{7/8}$}
\end{solutionorbox}
%% {\vspace{0.5cm}}
%%
%% Problem #35
\task
$\dfrac{(b^{4/5}c^{3/4})\strut^{20}}{(b^{1/2}c)\strut^2}$
\vspace{0.25cm}
\begin{solutionorbox}[\SolutionSpace] % changed <<<<<<<<<<<
$\dfrac{b^{(4/5\bm{\cdot}20)}c^{(3/4\bm{\cdot}{20})}}{b^{(1/2\bm{\cdot}2)}c^{(1\bm{\cdot}2)}}$
\bigskip
$\dfrac{b^{16}c^{15}}{bc^2}=$
\colorbox{yellow}{$b^{15}c^{13}$}
\end{solutionorbox}
%% {\vspace{0.5cm}}
%%% Prob #36
\task
$\dfrac{(a^4b^6)\strut^{2/3}}{(a^{10}b^5)\strut^{1/5}}$
\vspace{0.25cm}
\begin{solutionorbox}[\SolutionSpace] % changed <<<<<<<<<<<
$\dfrac{a^{(4\bm{\cdot}2/3)}b^{(6\bm{\cdot}2/3)}}{a^{(10\bm{\cdot}1/5)}b^{(5\bm{\cdot}1/5)}}=\dfrac{a^{8/3}b^4}{a^2b^1}$
\bigskip
$a^{(8/3-6/3)}b^{(4-1)}=$
\colorbox{yellow}{$a^{2/3}b^3$}
\end{solutionorbox}
%% {\vspace{0.5cm}}
%%% Prob #37
\task
$\dfrac{(a^{24}b^{16})\strut^{3/4}}{(a^{10}b^{14})\strut^{1/2}}$
\vspace{0.25cm}
\begin{solutionorbox}[\SolutionSpace] % changed <<<<<<<<<<<
$\dfrac{a^{(24\bm{\cdot}3/4)}b^{(16\bm{\cdot}3/4)}}{a^{(10\bm{\cdot}1/2)}b^{(14\bm{\cdot}1/2)}}=\dfrac{a^{18}b^{12}}{a^5b^7}$
\bigskip
$a^{(18-5)}b^{(12-7)}=$
\colorbox{yellow}{$a^{13}b^5$}
\end{solutionorbox}
%% {\vspace{0.5cm}}
%%% Prob #38
\task
$\dfrac{(a^4b^{1/2})\strut^{2}(a^6b^4)\strut^{1/2}}{(ab^4)\strut^{1/2}(ab^2)\strut^{1/4}}$
\vspace{0.25cm}
\begin{solutionorbox}[\SolutionSpace] % changed <<<<<<<<<<<
$\dfrac{\bigl(a^{(4\bm{\cdot}2)}b^{(1/2\bm{\cdot}2)}\bigr)\bigl(a^{(6\bm{\cdot}1/2)}b^{(4\bm{\cdot}1/2)}\bigr)}{\bigl(a^{(1\bm{\cdot}1/2)}b^{(4\bm{\cdot}1/2)}\bigr)\bigl(a^{(1\bm{\cdot}1/4)}b^{(2\bm{\cdot}1/4}\bigr)}$
\bigskip
$\dfrac{\bigl(a^8b^1\bigr)\bigl(a^3b^2\bigr)}{\bigl(a^{(1/2)}b^2\bigr)\bigl(a^{(1/4)}b^{(1/2)}\bigr)}$
\bigskip
$\dfrac{a^{(8+3)}b^{(1+2)}}{a^{(1/2+1/4)}b^{(2+1/2)}}=
\dfrac{a^{11}b^4}{a^{(3/4)}b^{(5/2)}}$
\bigskip
$a^{(11-3/4)}b^{(3-5/2)}=$\colorbox{yellow}{$a^{41/4}b^{1/2}$}
\end{solutionorbox}
%% {\vspace{0.5cm}}
%%% Prob #39
\task
$\biggl((a^2a^{1/2})\strut^2a\biggr)^{1/2}$
\vspace{0.25cm}
\begin{solutionorbox}[\SolutionSpace] % changed <<<<<<<<<<<
$\biggl((a^{2+1/2})\strut^2a\biggr)^{1/2}$
\bigskip
$\biggl((a^{5/2})\strut^2a\biggr)\strut^{1/2}=(a^5a)\strut^{1/2}$
\bigskip
$a^{(6\bm{\cdot}1/2)}$
=\colorbox{yellow}{$a^3$}
\end{solutionorbox}
%% {\vspace{0.5cm}}
\end{tasks}
\end{document}
笔记。如果您的学生总是使用单独的答题纸,您可以删除所有出现的[\SolutionSpace]
。如果您想在问题下方保留一个空间来写解决方案,这是一个可选参数。
所以代码可以简化。
\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{color}% changed <<<<<<<<<<<
\usepackage{soul}
\pagestyle{head}
\header{Algebra II: Unit 13 A\&B Fractional Exponents}
{}
{Due 05/02/23}
\newcommand{\pagetop}{%
%\noindent
\bigskip
\vspace{0.5mm}
}
\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 <<<<<<<<<<
\ifthenelse{\boolean{printanswers}}
{\colorsolutionboxes \definecolor{SolutionBoxColor}{gray}{0.8}}% solutions are printed
{\nocolorsolutionboxes} % solutions are not beign printed
%*********************************************
\begin{document}
%definition for bigskip = 1 line to replace all \bigskip
\def\bigskip{\vskip\bigskipamount}
\begin{tasks}
[style=enumerate](3)
\task![]\fullwidth{\textbf{Change to fractional exponents.}}
\task![]\fullwidth{\textbf{Simplify. }}
%% Prob #34
\task
$\dfrac{a^{3/4}\bm{\cdot}a^{1/2}}{a^{3/8}}$
\vspace{0.25cm}
\begin{solutionorbox}
$\dfrac{a^{(3/4\bm{+}1/2)}}{a^{3/8}}=\dfrac{a^{(3/4\bm{+}2/4)}}{a^{3/8}}$
\bigskip
$a^{(5/4\bm{-}3/8)}=$
\colorbox{yellow}{$a^{7/8}$}
\end{solutionorbox}
%% {\vspace{0.5cm}}
%%
%% Problem #35
\task
$\dfrac{(b^{4/5}c^{3/4})\strut^{20}}{(b^{1/2}c)\strut^2}$
\vspace{0.25cm}
\begin{solutionorbox}
$\dfrac{b^{(4/5\bm{\cdot}20)}c^{(3/4\bm{\cdot}{20})}}{b^{(1/2\bm{\cdot}2)}c^{(1\bm{\cdot}2)}}$
\bigskip
$\dfrac{b^{16}c^{15}}{bc^2}=$
\colorbox{yellow}{$b^{15}c^{13}$}
\end{solutionorbox}
%% {\vspace{0.5cm}}
%%% Prob #36
\task
$\dfrac{(a^4b^6)\strut^{2/3}}{(a^{10}b^5)\strut^{1/5}}$
\vspace{0.25cm}
\begin{solutionorbox}
$\dfrac{a^{(4\bm{\cdot}2/3)}b^{(6\bm{\cdot}2/3)}}{a^{(10\bm{\cdot}1/5)}b^{(5\bm{\cdot}1/5)}}=\dfrac{a^{8/3}b^4}{a^2b^1}$
\bigskip
$a^{(8/3-6/3)}b^{(4-1)}=$
\colorbox{yellow}{$a^{2/3}b^3$}
\end{solutionorbox}
%% {\vspace{0.5cm}}
%%% Prob #37
\task
$\dfrac{(a^{24}b^{16})\strut^{3/4}}{(a^{10}b^{14})\strut^{1/2}}$
\vspace{0.25cm}
\begin{solutionorbox}
$\dfrac{a^{(24\bm{\cdot}3/4)}b^{(16\bm{\cdot}3/4)}}{a^{(10\bm{\cdot}1/2)}b^{(14\bm{\cdot}1/2)}}=\dfrac{a^{18}b^{12}}{a^5b^7}$
\bigskip
$a^{(18-5)}b^{(12-7)}=$
\colorbox{yellow}{$a^{13}b^5$}
\end{solutionorbox}
%% {\vspace{0.5cm}}
%%% Prob #38
\task
$\dfrac{(a^4b^{1/2})\strut^{2}(a^6b^4)\strut^{1/2}}{(ab^4)\strut^{1/2}(ab^2)\strut^{1/4}}$
\vspace{0.25cm}
\begin{solutionorbox}
$\dfrac{\bigl(a^{(4\bm{\cdot}2)}b^{(1/2\bm{\cdot}2)}\bigr)\bigl(a^{(6\bm{\cdot}1/2)}b^{(4\bm{\cdot}1/2)}\bigr)}{\bigl(a^{(1\bm{\cdot}1/2)}b^{(4\bm{\cdot}1/2)}\bigr)\bigl(a^{(1\bm{\cdot}1/4)}b^{(2\bm{\cdot}1/4}\bigr)}$
\bigskip
$\dfrac{\bigl(a^8b^1\bigr)\bigl(a^3b^2\bigr)}{\bigl(a^{(1/2)}b^2\bigr)\bigl(a^{(1/4)}b^{(1/2)}\bigr)}$
\bigskip
$\dfrac{a^{(8+3)}b^{(1+2)}}{a^{(1/2+1/4)}b^{(2+1/2)}}=
\dfrac{a^{11}b^4}{a^{(3/4)}b^{(5/2)}}$
\bigskip
$a^{(11-3/4)}b^{(3-5/2)}=$\colorbox{yellow}{$a^{41/4}b^{1/2}$}
\end{solutionorbox}
%% {\vspace{0.5cm}}
%%% Prob #39
\task
$\biggl((a^2a^{1/2})\strut^2a\biggr)^{1/2}$
\vspace{0.25cm}
\begin{solutionorbox}
$\biggl((a^{2+1/2})\strut^2a\biggr)^{1/2}$
\bigskip
$\biggl((a^{5/2})\strut^2a\biggr)\strut^{1/2}=(a^5a)\strut^{1/2}$
\bigskip
$a^{(6\bm{\cdot}1/2)}$
=\colorbox{yellow}{$a^3$}
\end{solutionorbox}
%% {\vspace{0.5cm}}
\end{tasks}
\end{document}