使用 \printeranswers 环境,如何在不带标题“解决方案”的框中打印解决方案

使用 \printeranswers 环境,如何在不带标题“解决方案”的框中打印解决方案

我正在为高中预科演算课程创建一些工作表/问题集,并包含打印解决方案的选项。

是否可以将答案打印在框中没有标题“解决方案”。

我在 stackexchange 中搜索了答案,并查看了 Hirschhorn 的使用考试文档类。

要么是我没理解“考试文档”类,要么是我的代码有错误,导致每个答案框都打印标题“解决方案”。希望你们中有人能同情我,并为这个问题提供解决方案,我在下面发布了代码的相关部分。

非常感谢大家花时间阅读这篇文章!

\documentclass[12pt]{exam}

%\printanswers % uncomment to print solutions.
\printanswers
% MACROS
%Not sure all of these packages are necessary...but the 'taks package is certainly necessary
\usepackage{amsmath}
\usepackage{cancel}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{pgfplots}
\usepackage{caption} % allows captions in minipage envir (issue w/solutions envir)
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{framed} %box para
\usepackage{tkz-euclide}
\usepackage{multicol}
\usepackage{tasks}
\pgfplotsset{compat=1.10}
%\displaystyle for all $$ math environments use \lim\limits for other environments

\usepackage[margin=0.5in]{geometry}

\everymath{\displaystyle}

%\unframedsolutions % uncomment to remove boxes from solutions
\setlength{\parindent}{0pt} % removes paragraph indentation

\pagestyle{head}
\header{Pre-Alg Pd #5: Exponent Concepts Covered in Class on 04-04-19 (D11)}
       {}
       {04/05/19} 

\newcommand{\pagetop}{%
  \makebox[\textwidth]{Name:\enspace\hrulefill}\par
  \vspace{4mm}
  \fbox{\fbox{\parbox{\dimexpr\textwidth-4\fboxsep-4\fboxrule}{
    \textbf {Simplify by expansion and steps shown in class. Your answer should have only POSITIVE EXPONENTS.
     \bigskip
    \\Show all work/steps on this page.}


  }}}\par
  \bigskip
  \vspace{0.5mm}
}

\settasks{after-item-skip=15em,
          after-skip=2cm,
          label-width=2em,
          item-indent=3em,
          %change '1' to 'a' if you want letters instead of numbers
          counter-format=(tsk[1]),
          column-sep=2em
          }



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% -------------------------- DOCUMENT STARTS HERE -------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
https://www.overleaf.com/project/5ca66096f91606440362a785
\pagetop

\begin{tasks}(2)

% Prob #1
\task $4y\cdot 2y^3\cdot3x^{-2}$
\begin{solution}
$4^1$
\end{solution}

% Prob #2
\task $4xy^0\cdot x^{-2}y^{-3}\cdot
y^0$
\begin{solution}
solution
\end{solution}

% Prob #3
\task $\frac{3y\cdot2xy^2}{3x^{-2}y^4}$
\begin{solution}
solution
\end{solution}

% Prob #4
\task $\frac{xy^{-3}}{3x^3y^{-2}\cdot2x^{-3}y}$
\begin{solution}
solution
\end{solution}

% Prob #5
\task $\frac{m^{-4}n^4\cdot(mn^2)\strut^{-3}}{(m^2n^4)\strut^0}$
\begin{solution}
solution
\end{solution}

\end{tasks}

\clearpage

答案1

您可以添加规则:

\renewcommand{\solutiontitle}{THIS_IS_THE_WORD_YOU_WANT_TO_DELETE}

完整代码:

    \documentclass[12pt,addpoints]{exam}
\printanswers
\renewcommand{\solutiontitle}{}
\begin{document} 
\begin{questions}
\question question1
\begin{solutionorbox}[5cm]
Your answer 
\end{solutionorbox}
\end{questions}
\end{document}

结果是:

在此处输入图片描述

相关内容