amsmath 和格式化问题:方程式超出解决方案框

amsmath 和格式化问题:方程式超出解决方案框

在此数学练习解决方案集中,解决方案超出解决方案框。这是当前的渲染:

在此处输入图片描述

后面应该立即有一个换行符=。我无法使用 或 来实现这\\一点\bigskip

非常感谢您花时间阅读并回复这篇文章!

母语:

\documentclass[12pt]{exam}
\printanswers
% un-comment to print solutions.
\renewcommand{\solutiontitle}{}
\usepackage{amsmath}
\usepackage{cancel}
\usepackage{framed}
\usepackage{bm}
\usepackage{multicol}
\usepackage{tasks}
\usepackage[a4paper,margin=0.5in,include head]{geometry}
\usepackage{systeme}
\usepackage{xcolor}
\usepackage{soul}
\pagestyle{head}
\header{Algebra II: Problem Set D}
       {}
       {Due 04/07/23} 

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

\settasks{after-item-skip=1em,
          after-skip=2cm,
          label-width=1.5em, %<---------
          item-indent=2em,   %<---------
          label=(\arabic*),
          column-sep=1em     %<----------
          }
\begin{document}
%definition for bigskip = 1 line to replace all \bigskip
\def\bigskip{\vskip\bigskipamount}

\textbf{Solve each system algebraically.}
\begin{tasks}
[style=enumerate](2)
% Prob #1
\task 
\systeme{
  x^2+y^2 = 41,
  x^2-y^2 = 9
  }
\bigskip
\begin{solutionorbox}[3cm]
Add the equations to eliminate $y^2$ term.
\bigskip
$2x^2=50$
\bigskip
$\dfrac{\cancel{2}x^2}{\cancel{2}} = {\dfrac{50}{2}}$
\bigskip
$\sqrt{x^2}=\pm\sqrt{25}$
\bigskip
\colorbox{yellow}{$\bm{x=\pm5}$}
\bigskip
Substitute $x=5$ into one of the equations and solve for $y$.
\bigskip
Alternatively, substituting $x=-5$ produces the same result ($y=\pm4$).\\ 
\\
$(5)^2+y^2=41$
\bigskip
$25+y^2=41$
\bigskip
$y^2=16$
\bigskip
$\sqrt{y^2}=\pm\sqrt{16}$
\bigskip
\colorbox{yellow}{$\bm{y=\pm4}$}
\bigskip
\colorbox{yellow}{$\bm{Solutions:(\pm5,\pm4)=
(5,4)(5,-4)(-5,4)(-5,-4}$}
\end{solutionorbox}
\vspace{0.25cm}


\end{tasks}
\end{document}

答案1

导致您想要修复的问题的 LaTeX 代码是:

\colorbox{yellow}{$\bm{Solutions:(\pm5,\pm4)=(5,4)(5,-4)(-5,4)(-5,-4}$}

至少存在三个问题:(i)的第二个参数\colorbox不会自动换行;(ii)为什么“解决方案:”在数学模式下呈现?(iii)为什么同时使用两者大胆的 用颜色突出显示来强调?使用其中一种方法来吸引读者的注意力就足够了。

以下截图显示了原始问题以及两个可能的解决方法:(a)引入明确的换行符;(b)不要同时使用\bm 颜色突出显示。两种解决方案均在文本模式而不是数学模式下呈现单词“解决方案:”。

在此处输入图片描述

\documentclass[12pt]{exam}
\printanswers
\renewcommand{\solutiontitle}{}
\usepackage{amsmath}
\usepackage{bm}
\usepackage{systeme}
\usepackage{cancel}
\usepackage{framed}
\usepackage{tasks}
\usepackage[a4paper,margin=0.5in,includehead]{geometry}
\usepackage{xcolor}
\usepackage{soul}
\pagestyle{head}
\header{Algebra II: Problem Set D}{}{Due 04/07/23} 

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

\settasks{after-item-skip=1em,
          after-skip=2cm,
          label-width=1.5em, %<---------
          item-indent=2em,   %<---------
          label=(\arabic*),
          column-sep=1em     %<----------
          }

%definition for bigskip = 1 line to replace all \bigskip
\def\bigskip{\vskip\bigskipamount}

\begin{document}

\textbf{Solve each system algebraically.}

\begin{tasks}[style=enumerate](2)

% Prob #1
\task 
\systeme{
  x^2+y^2 = 41,
  x^2-y^2 = 9
  }
\bigskip
\begin{solutionorbox}[3cm]
\bigskip
\dots
\bigskip
\colorbox{yellow}{$\bm{Solutions:(\pm5,\pm4)=(5,4)(5,-4)(-5,4)(-5,-4)}$}
\bigskip
\textbf{Solutions: }\colorbox{yellow}{$\bm{(\pm5,\pm4)=(5,4)\,(5,-4)}$} 

\hspace{3.5cm}\colorbox{yellow}{$\bm{\,(-5,4)\,(-5,-4)}$}
\bigskip
\textbf{Solutions:}

\colorbox{yellow}{$(\pm5,\pm4)=(5,4)\,(5,-4)\,(-5,4)\,(-5,-4)$}
\end{solutionorbox}
\vspace{0.25cm}

\end{tasks}

\end{document}

相关内容