考试类别:试卷设置,包括卷号、部分和子部分

考试类别:试卷设置,包括卷号、部分和子部分

我想知道在考试课上如何打印以下格式的试卷

11  a)(i)   State and prove Baye’s theorem.                                 (Applying)         CO1
                                                                    
    a)(ii)  Four boxes A, B, C, D contain fuses. The boxes contain 5000,    (Applying)         CO2
            3000,2000 and 1000 fuses respectively. The percentages of fuses  (7 Marks)
            in the boxes which are defective are 3%, 2%, 1% and 0.5%
            respectively. One fuse is selected at random arbitrarily from one
            of the boxes. It is found to be a defective fuse. 
            Find the probability that it has come from the box D.       

答案1

这里有两种可能的解决方案。在第一个解决方案中,我用 解决了注释在右侧的位置问题tabularx。在第二个解决方案中,我将它们放在 中\marginpar,同时增加了 marginpar 空间并\textwidth相应地减少了 。如果只有一些问题有这些注释,则第一个解决方案会更好。

  1. 使用tabularx
\documentclass{exam}
\usepackage{tabularx}
\usepackage{makecell}

\renewcommand{\questionlabel}{\arabic{question}}
\renewcommand{\partlabel}{}
\renewcommand{\subpartlabel}{\makebox[1cm][l]{\alph{partno})~(\roman{subpart})}}

\begin{document}
\begin{questions}

% First solution with tabularx
% 
\question

\begin{parts}
\part 
\begin{subparts}
  \subpart
  \begin{tabularx}{\linewidth}[t]{X l l}
    State and prove Baye’s theorem. & (Applying) & CO1
  \end{tabularx}

  \subpart
  \begin{tabularx}{\linewidth}[t]{X l l}
    Four boxes A, B, C, D contain fuses. The boxes contain 5000,
  3000, 2000 and 1000 fuses respectively. The percentages of fuses in the
  boxes which are defective are 3\%, 2\%, 1\% and 0.5\% respectively.
  One fuse is selected at random arbitrarily from one of the boxes. It
  is found to be a defective fuse. Find the probability that it has come
  from the box D. & \makecell[t]{(Applying)\\(7 Marks)} & CO2
  \end{tabularx}
\end{subparts}
\end{parts}

\end{questions}
\end{document}

在此处输入图片描述

  1. 使用\marginpar
\documentclass{exam}
\usepackage[marginparwidth=3cm,textwidth=\dimexpr\textwidth-3cm]{geometry}

\renewcommand{\questionlabel}{\arabic{question}}
\renewcommand{\partlabel}{}
\renewcommand{\subpartlabel}{\makebox[1cm][l]{\alph{partno})~(\roman{subpart})}}

\begin{document}
\begin{questions}

% Second solution with \marginpar

\question

\begin{parts}
\part 
\begin{subparts}
  \subpart
    State and prove Baye’s theorem. \marginpar{(Applying) \quad CO1}

  \subpart \marginpar{
    \begin{tabular}[t]{@{}ll@{}}
      (Applying) & CO2 \\
      (7 marks) &
    \end{tabular}
  }% or \marginpar{(Applying) \quad CO2 \\ (7 marks)}
    Four boxes A, B, C, D contain fuses. The boxes contain 5000,
  3000, 2000 and 1000 fuses respectively. The percentages of fuses in the
  boxes which are defective are 3\%, 2\%, 1\% and 0.5\% respectively.
  One fuse is selected at random arbitrarily from one of the boxes. It
  is found to be a defective fuse. Find the probability that it has come
  from the box D. 
\end{subparts}
\end{parts}

\end{questions}
\end{document}

在此处输入图片描述

相关内容