在考试解决方案环境中对齐评分方案

在考试解决方案环境中对齐评分方案

我正在尝试编写一个有效的代码,在考试风格的解决方案环境中编写一个表格标记方案作为这个问题的示例。在此处输入图片描述

我并没有取得很大成功,使用下面的代码进行临时实现。我如何将答案标记和最后一列与精确的行对齐,并使实现更直接、更高效?

\documentclass[answers]{exam}
\usepackage{xstring, xcolor}

\usepackage{amsmath}
\usepackage{xfrac}
\usepackage{amssymb, amsfonts}
\usepackage[flushleft]{threeparttable}
\usepackage{makecell}
\usepackage{ragged2e} 
\usepackage{tabularx}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{-5pt}}p{#1}}

\usepackage{booktabs}
\usepackage{multirow}

\pointsdroppedatright
\marksnotpoints
\marginpointname{ \points}
\pointformat{\hspace{5mm} \color{black}\big(\textbf{\themarginpoints}\big)}
\renewcommand{\solutiontitle}{\noindent\textbf{Solution:}\par\noindent}
\SolutionEmphasis{\color{blue}}
\unframedsolutions

\renewcommand{\arraystretch}{1.5}    % Stretch the table (vertically)
\renewcommand{\bottomrule}{\Xhline{0.5 mm}}
\renewcommand{\toprule}{\Xhline{0.3 mm}}
\renewcommand{\midrule}{\Xhline{0.3 mm}}
%\renewcommand{\cmidrule}{\Xhline{0.5 mm}}

\begin{document}
\begin{questions}
\question[3] Some question
\droppoints
\begin{solution}
\begin{tabular}{|L{75mm}|c|L{54mm}|}
\toprule
\textbf{Marking scheme } & \textbf{marks}& comments\\ 
\midrule 
\makecell{$\begin{aligned}
\text{P(MW or WM)} = & \frac{6}{10}\times\frac{4}{9} + \frac{4}{10}\times\frac{6}{9} \\[2mm]
= & \frac{24}{90} + \frac{24}{90}\\[2mm]
= & \frac{8}{15}
\end{aligned}$} 
&\makecell{M1} 
 & \makecell[lt]{
Any one MW or WM}\\
&\makecell{M1} 
 & \makecell[lt]{
Attempt to add}\\
&\makecell{A1} 
 & \makecell[lt]{ }\\
\cmidrule{2-2}
& \LARGE{3}&\\  % total marks here

\bottomrule
\end{tabular}
\end{solution}

\end{questions}
\end{document}

在此处输入图片描述

相关内容