如何在考试环境中微调问题与问题文本开头之间的间距

如何在考试环境中微调问题与问题文本开头之间的间距

我想在考试中出一些题目,有些题目只提出一个问题,有些题目有一个介绍然后分几个部分,有些题目直接进入各个部分。

如果我使用以下内容:

\documentclass[addpoints,12pt,a4]{exam}  
\usepackage{mathptmx}  
\qformat{\textbf{\thequestion .} \hspace{0.2cm} \slshape [Maximum mark: \thepoints] \hfill}  
% \renewcommand{\questionshook}{\setlength{\parsep}{4mm}} I'm not using this bit but I know %   
% how to adjust the space to the parts %  
\begin{document}  
  Blah blah blah...  
  \begin{questions}  
    \question[3]  
      This question has got quite a wordy introduction that may spill over onto a second or even   
      a higher number of successive lines all chock full of vital information.  
      \newline Given that this question has some parts, how would you:  
      \begin{parts}  
        \part Answer this. \hfill \textit{[1 mark]}  
        \part Answer that. \hfill \textit{[2 marks]}  
      \end{parts}  
    \question[16]  
      \begin{parts}  
        \part This question doesn't have an intro so just answer it. \hfill   \textit{[1 mark]}  
        \part And then answer this bit. \hfill \textit{[15 marks]}  
      \end{parts}  
    \question[2]  
      This one is dead easy, so just answer it.  
  \end{questions}  
  \end{document}

然后我不喜欢水平间距。如果将 [最高分数:...] 到引言和非分题(1 和 3)中文本的距离与问题 2 中的距离进行比较,会发现两者有所不同。我希望能够将问题 1 和 3 中的距离增加到至少与 Q2 中的距离相同,或者最好增加到我选择的距离。

我可以通过改变行距来做到这一点,但 Q1 介绍中的多行文本也会变得同样间隔开 - 这也不是我想要的。

我想要控制只是点与问题的间距。可以吗?

答案1

这可能接近于您要寻找的内容。我\mystrut在定义中添加了一条规则 () \qformat。问题是parts环境会自行添加额外的空间。我尝试使用否定的\vspacewhenparts来消除这种情况。

\documentclass[addpoints,12pt,a4]{exam}  
\usepackage{mathptmx} 
\def\mystrut{\protect\rule[-2.2ex]{0ex}{2.2ex}} 
\qformat{\textbf{\thequestion .} \hspace{0.2cm} \slshape [Maximum mark: \thepoints]\mystrut\hfill}  
\let\svparts\parts
\def\parts{\svparts\vspace{-.5ex}}
% \renewcommand{\questionshook}{\setlength{\parsep}{4mm}} I'm not using this bit but I know %   
% how to adjust the space to the parts %  
\begin{document}  
  Blah blah blah...  
  \begin{questions}  
    \question[3]  
      This question has got quite a wordy introduction that may spill over onto a second or even   
      a higher number of successive lines all chock full of vital information.  
      \newline Given that this question has some parts, how would you:  
      \begin{parts}  
        \part Answer this. \hfill \textit{[1 mark]}  
        \part Answer that. \hfill \textit{[2 marks]}  
      \end{parts}  
    \question[16]  
      \begin{parts}  
        \part This question doesn't have an intro so just answer it. \hfill   \textit{[1 mark]}  
        \part And then answer this bit. \hfill \textit{[15 marks]}  
      \end{parts}  
    \question[2]  
      This one is dead easy, so just answer it.  
  \end{questions}  
  \end{document}

在此处输入图片描述

相关内容