![在考试解决方案环境中对齐评分方案](https://linux22.com/image/411392/%E5%9C%A8%E8%80%83%E8%AF%95%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%E7%8E%AF%E5%A2%83%E4%B8%AD%E5%AF%B9%E9%BD%90%E8%AF%84%E5%88%86%E6%96%B9%E6%A1%88.png)
我正在尝试编写一个有效的代码,在考试风格的解决方案环境中编写一个表格标记方案作为这个问题的示例。
我并没有取得很大成功,使用下面的代码进行临时实现。我如何将答案标记和最后一列与精确的行对齐,并使实现更直接、更高效?
\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}