下面的 MWE 指定了 2 列格式 - 每列一个问题。按照目前的编码,分步解决方案框有点窄,导致连字符对可读性产生负面影响(IMHO)并且不必要地延长了解决方案框的长度/深度。
由于我没有创建此代码,所以我对参数感到困惑,特别是关于如何稍微增加解决方案框的大小,同时仍然保留2列格式,即每列顶部有1个问题。
非常感谢您的帮助。
\documentclass[12pt]{exam}
\printanswers
% un-comment to print solutions.
\renewcommand{\solutiontitle}{}
\usepackage{multirow, tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\usepackage[table]{xcolor}
\usepackage{amsmath}
\usepackage{cancel}
\usepackage{framed}
\usepackage{multicol}
\usepackage{tasks}
\usepackage[a4paper,margin=0.5in,include head]{geometry}
\everymath{\displaystyle}
\setlength\parindent{1em}
\pagestyle{head}
\header{Algebra II Review Ch 3.2: Operations Rational Expressions and Equations: K E Y}
{}
{01/13-14/21}
\newcommand{\pagetop}{%
\noindent
\fbox{\fbox{\parbox{\dimexpr\textwidth-4\fboxsep-4\fboxrule}{
\textbf {Obj. 3.2.a: I can simplify factored rational expressions and find their restrictions.
\bigskip
\bigskipSimplify expression and state the excluded values (+1 pt numerator, +1 pt denominator, +1 pt restrictions.) each equation. Show all work/steps on this page.}
}}}
\bigskip
\vspace{0.5mm}
}
\settasks{after-item-skip=1em,
after-skip=2cm,
label-width=2em,
item-indent=3em,
label=(\arabic*),
column-sep=2em
}
% ------------ DOCUMENT STARTS HERE---------- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%definition for bigskip = 1 line to replace all \bigskip
\def\bigskip{\vskip\bigskipamount}
%macro \diamondscheme. The lines are drawn too, you need not tikz. The size is controlled by the \diaw parameter. It is set to 1.5cm in this example.
% definition
\newdimen\diaw \diaw=1.5cm
\def\diamondscheme#1#2#3#4{%
\vbox to\diaw{
\kern-1ex
\hbox to\diaw{\hss$#1$\hss}
\vss
\hbox to\diaw{\hbox to0pt{\hss$#2$\hss}\hss
\raise.7ex\hbox{\diacross}\hss
\hbox to0pt{\hss$#3$\hss}}
\vss
\hbox to\diaw{\hss$#4$\hss}
\kern-1ex
}
}
\newcount\tmpnum
\tmpnum=\diaw
\divide\tmpnum by65781 % tmpnum is now equal to \diaw in bp units
\divide\tmpnum by2
\def\tmp{\the\tmpnum\space}
\edef\diacross{\pdfliteral
{q 0.4 w -\tmp \tmp m \tmp -\tmp l S -\tmp -\tmp m \tmp \tmp l S Q}}
\begin{tasks}
[style=enumerate](2)
% Prob #1
\task $\dfrac{10k^2+32k+24}{15k+18}$
\begin{solutionorbox}[5cm]
Factor 2 out of the numerator.\bigskip
$\dfrac{2(5k^2+16k+12)} {15k+18}$\bigskip
Now factor the numerator using diamond method.
\bigskip
%call diamondscheme macro
\hspace{2cm}
\diamondscheme{60}{10}{6}{16}
\bigskip
The 5 in front of $5k^2$ means this is a non-monic quadratic trinomial. So use the box method to complete the factorization.
\newcommand\mcc[1]{\multicolumn{1}{c}{#1}}
\hspace{1cm}
\renewcommand\arraystretch{2}
\begin{tabular}{ c | c | c | }
\mcc{} & \mcc{\textcolor{red}{$5k$}} & \mcc{\textcolor{red}{$+6$}} \\
\cline{2-3}
\textcolor{red}{$k$} & $5k^2$ & $6$ \\
\cline{2-3}
\textcolor{red}{$+2$} & $10k$ & $12$ \\
\cline{2-3}
\end{tabular}
\vspace{0.2cm}
Numerator factors to $\color{red}\dfrac{(5k+6)(k+2)}{\color{black} 15k+18}$
Now factor the bottom:
\hspace{2cm}$3(5k+6)$
\vspace{0.25cm}
Cancel common factors (this creates a HOLE in the graph):
\hspace{2cm}
$\dfrac{\cancel{(5k+6)}(k+2)}{3\cancel{(5k+6)}}$
\vspace{0.25cm}
Simplified form: $\dfrac{(k+2)}{3}$
\textcolor{blue}{\textbf {Reminder:}}
\textbf{Zeros occur on top} (in the numerator).
\textbf{VA's (vertical asymptotes) are restrictions in the denominator}...to prevent division by $0$.
\textcolor{red}
{Zeros: $k=-2$}
\textcolor{red}
{Holes: $k=-6/5$}
\textcolor{red}
{VA: $none$}
\end{solutionorbox}
\vspace{0.25cm}
% Prob #1
\task $\dfrac{5k^2+10k+24}{6k+12}$
\begin{solutionorbox}[5cm]
step-by-step solution goes here
\end{solutionorbox}
\end{tasks}
\end{document}
答案1
不知道我是否理解清楚了这个问题!
也许您可以像这样修改任务环境选项:
\settasks{after-item-skip=1em,
after-skip=2cm,
label-width=1.5em, % <---------
item-indent=2em, % <----------
label=(\arabic*),
column-sep=1em % <----------
}
该图来自任务包文档
完整代码
\documentclass[12pt]{exam}
\printanswers
% un-comment to print solutions.
\renewcommand{\solutiontitle}{}
\usepackage{multirow, tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\usepackage[table]{xcolor}
\usepackage{amsmath}
\usepackage{cancel}
\usepackage{framed}
\usepackage{multicol}
\usepackage{tasks}
\usepackage[a4paper,margin=0.5in,include head]{geometry}
\everymath{\displaystyle}
\setlength\parindent{1em}
\pagestyle{head}
\header{Algebra II Review Ch 3.2: Operations Rational Expressions and Equations: K E Y}
{}
{01/13-14/21}
\newcommand{\pagetop}{%
\noindent
\fbox{\fbox{\parbox{\dimexpr\textwidth-4\fboxsep-4\fboxrule}{
\textbf {Obj. 3.2.a: I can simplify factored rational expressions and find their restrictions.
\bigskip
\bigskipSimplify expression and state the excluded values (+1 pt numerator, +1 pt denominator, +1 pt restrictions.) each equation. Show all work/steps on this page.}
}}}
\bigskip
\vspace{0.5mm}
}
\settasks{after-item-skip=1em,
after-skip=2cm,
label-width=1.5em, %<---------
item-indent=2em, % <---------
label=(\arabic*),
column-sep=1em % <----------
}
% ------------ DOCUMENT STARTS HERE---------- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%definition for bigskip = 1 line to replace all \bigskip
\def\bigskip{\vskip\bigskipamount}
%macro \diamondscheme. The lines are drawn too, you need not tikz. The size is controlled by the \diaw parameter. It is set to 1.5cm in this example.
% definition
\newdimen\diaw \diaw=1.5cm
\def\diamondscheme#1#2#3#4{%
\vbox to\diaw{
\kern-1ex
\hbox to\diaw{\hss$#1$\hss}
\vss
\hbox to\diaw{\hbox to0pt{\hss$#2$\hss}\hss
\raise.7ex\hbox{\diacross}\hss
\hbox to0pt{\hss$#3$\hss}}
\vss
\hbox to\diaw{\hss$#4$\hss}
\kern-1ex
}
}
\newcount\tmpnum
\tmpnum=\diaw
\divide\tmpnum by65781 % tmpnum is now equal to \diaw in bp units
\divide\tmpnum by2
\def\tmp{\the\tmpnum\space}
\edef\diacross{\pdfliteral
{q 0.4 w -\tmp \tmp m \tmp -\tmp l S -\tmp -\tmp m \tmp \tmp l S Q}}
\begin{tasks}
[style=enumerate](2)
% Prob #1
\task $\dfrac{10k^2+32k+24}{15k+18}$
\begin{solutionorbox}[5cm]
Factor 2 out of the numerator.\bigskip
$\dfrac{2(5k^2+16k+12)} {15k+18}$\bigskip
Now factor the numerator using diamond method.
\bigskip
%call diamondscheme macro
\hspace{2cm}
\diamondscheme{60}{10}{6}{16}
\bigskip
The 5 in front of $5k^2$ means this is a non-monic quadratic trinomial. So use the box method to complete the factorization.
\newcommand\mcc[1]{\multicolumn{1}{c}{#1}}
\hspace{1cm}
\renewcommand\arraystretch{2}
\begin{tabular}{ c | c | c | }
\mcc{} & \mcc{\textcolor{red}{$5k$}} & \mcc{\textcolor{red}{$+6$}} \\
\cline{2-3}
\textcolor{red}{$k$} & $5k^2$ & $6$ \\
\cline{2-3}
\textcolor{red}{$+2$} & $10k$ & $12$ \\
\cline{2-3}
\end{tabular}
\vspace{0.2cm}
Numerator factors to $\color{red}\dfrac{(5k+6)(k+2)}{\color{black} 15k+18}$
Now factor the bottom:
\hspace{2cm}$3(5k+6)$
\vspace{0.25cm}
Cancel common factors (this creates a HOLE in the graph):
\hspace{2cm}
$\dfrac{\cancel{(5k+6)}(k+2)}{3\cancel{(5k+6)}}$
\vspace{0.25cm}
Simplified form: $\dfrac{(k+2)}{3}$
\textcolor{blue}{\textbf {Reminder:}}
\textbf{Zeros occur on top} (in the numerator).
\textbf{VA's (vertical asymptotes) are restrictions in the denominator}...to prevent division by $0$.
\textcolor{red}
{Zeros: $k=-2$}
\textcolor{red}
{Holes: $k=-6/5$}
\textcolor{red}
{VA: $none$}
\end{solutionorbox}
\vspace{0.25cm}
% Prob #1
\task $\dfrac{5k^2+10k+24}{6k+12}$
\begin{solutionorbox}[5cm]
step-by-step solution goes here
\end{solutionorbox}
\end{tasks}
\end{document}