Code: Select all
\newcommand{\sol}[1]{\begin{solution} #1 \end{solution}\vspace{\stretch{1}}\droppoints}
But the sequence is defined just as it always has been.! Undefined control sequence.
Can someone explain what I'm doing wrong?
Here's my MWE
Code: Select all
\documentclass[fleqn,addpoints
,answers
]{exam}
\usepackage{amsfonts,amsmath,amssymb,amsthm,mathtools,commath}
\usepackage{color} % Necessary for \shaded solutions and color solutions
\usepackage{array} % Provides for a more flexible array and tabular environment, like the column defs below
\usepackage{booktabs} % For fancy stuff in arrays and tables
\usepackage{multicol}
\newcolumntype{L}{>{\begin{math}}l<{\end{math}}}%
\newcolumntype{C}{>{\begin{math}}c<{\end{math}}}%
\newcolumntype{R}{>{\begin{math}}r<{\end{math}}}%
\everymath{\displaystyle}
\setlength{\parindent}{0pt}
\setlength{\parskip}{\baselineskip}
\shadedsolutions
% For the exam package
\newcommand{\sol}[1]{\begin{solution} #1 \end{solution}\vspace{\stretch{1}}\droppoints}
\setlength\answerclearance{0.4ex}
\CorrectChoiceEmphasis{\itshape\color{red}}
\begin{document}
\begin{questions}
\question Solve the system, if possible.
%\begin{tabular}{RRRRRRR}
%& & x_2 & - & x_3 & = & 0 \\
%x_1 & & & - & 3x_3 & = & 1 \\
%-x_1 & + & 3x_2 & & & = & -1
%\end{tabular}
\sol{$x_1=3t-1, x_2=x_3=t$.}
\end{questions}
\end{document}