amsmath\enumitem\solutionbox:如何减少解决方案框内的垂直间距

amsmath\enumitem\solutionbox:如何减少解决方案框内的垂直间距

解决方案盒,我用它\bigskip来创造一步一步解决每行之间的水平空间作为一种促进可读性的手段。

但间距似乎有点过大:

在此处输入图片描述

此外,即使有自动填充功能,重复输入\bigskip似乎也不是特别有效。

所以有两个问题:

  1. 重新定义是\bigskip减少间距的最佳方法吗(仅针对解决方案框内的数学步骤)?
  2. 有什么方法可以自动化间距以避免\bigskip在每一行之后都进行打字?
\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 radicals.}}
%%%% Prob #15
\task $(a^3b^5)^{1/6}$
\begin{solutionorbox}[5cm]
$(a^{3\bm{\cdot}1/6})(b^{5\bm{\cdot}1/6})$
\bigskip
$(a^{1/2})(b^{5/6})$
\bigskip
%>>>>adding \vphantom causes bot radicals to be same height
\colorbox{yellow}{$\sqrt{\vphantom{b}a}\sqrt[6]{b^5}$  or $\sqrt[6]{a^3b^5}$}
\end{solutionorbox}
\vspace{0.25cm}
%%
%%%% Prob #16
\task
$(a^7b^3)^{1/8}$
\begin{solutionorbox}[5cm]
$(a^{7\bm{\cdot}1/8})(b^{3\bm{\cdot}1/8})$
\bigskip
$(a^{7/8})(b^{3/8})$
\bigskip
%>>>>adding \vphantom causes bot radicals to be same height
\colorbox{yellow}{$\sqrt[8]{a^7b^3}$}
\end{solutionorbox}
\vspace{0.25cm}
%%
\newpage
\task![]\fullwidth{\textbf{Simplify. (Add exponents)}}
%% Prob #17
\task
$x^{3/4}\bm{\cdot}x^{1/4}$
\begin{solutionorbox}[5cm]
$x^{3/4+1/4}$
\bigskip
\colorbox{yellow}{$x^{4/4}=x$}
\end{solutionorbox}
%% Prob #18
\task
$a^{1/2}\bm{\cdot}a^{2/3}$
\begin{solutionorbox}[5cm]
$x^{1/2+2/3}$
\bigskip
\colorbox{yellow}{$x^{3/6+4/6}=x^{7/6}$}
\end{solutionorbox}
%% Prob #19
\task
$b^{3/4}\bm{\cdot}b^{1/10}$
\begin{solutionorbox}[5cm]
$b^{3/4+1/10}$
\bigskip
\colorbox{yellow}{$b^{15/20+2/20}=x^{17/20}$}
\end{solutionorbox}
%% Prob #20
\task
$5^{1/4}\bm{\cdot}5^{3/4}$
\begin{solutionorbox}[5cm]
$5^{1/4+3/4}$
\bigskip
\colorbox{yellow}{$5^{4/4}=5$}
\end{solutionorbox}
%% Prob #21
\task
$8^{1/3}\bm{\cdot}8^{1/4}$
\begin{solutionorbox}[5cm]
$8^{1/3+1/4}$
\bigskip
\colorbox{yellow}{$8^{4/12+3/12}=x^{7/12}$}
\end{solutionorbox}
%% Prob #22
\task
$z^{3/4}\bm{\cdot}z^{1/2}\bm{\cdot}z$
\begin{solutionorbox}[5cm]
$z^{3/4+1/2+1}$
\bigskip
\colorbox{yellow}{$z^{3/4+2/4+4/4}=x^{9/4}$}
\end{solutionorbox}
\task![]\fullwidth{\textbf{Simplify.(Subtract exponents)}}
%% Prob #23
\task
$\dfrac{a^{3/4}b^{1/10}}{a^{1/4}b^{1/20}}$
\vspace{0.25cm}
\begin{solutionorbox}[5cm]
$a^{(3/4-1/4)}b^{(1/10-1/20)}$
\bigskip
\colorbox{yellow}{$a^{(2/4)}b^{(1/20)}=a^{1/2}b^{1/20}$}
\end{solutionorbox}
%% Prob #24
\task
$\dfrac{a^{3/4}b}{a^{1/6}b^{1/3}}$
\vspace{0.25cm}
\begin{solutionorbox}[5cm]
$a^{(3/4-1/6)}b^{(1-1/3)}$
\bigskip
\colorbox{yellow}{$a^{(2/4)}b^{(1/20)}=a^{1/2}b^{1/20}$}
\end{solutionorbox}

\end{tasks}
\end{document}

相关内容