0

When formatting the exam question number via \qformat in an exam how can I force vertical space between the question number text and the actual question?

\documentclass[a4paper,12pt,addpoints]{exam} 
\usepackage[margin=2.5cm]{geometry}

\begin{document} 
This is what happens by default when configuing question layout in the exam format
\begin{questions}
\qformat{Question \thequestion{}  \hfill}
\question[3]What time is it?
\end{questions}

\par\noindent\rule{\textwidth}{1mm}
\par\vspace*{0.5cm}
\par ... when what I really want is
\newline
\par\noindent \vspace*{1cm}
Question 2

What is the time?
\par\noindent\rule{\textwidth}{1mm}
\par\vspace*{0.5cm}
So the question is how do you configure the question to leave a vertical space between the question number line and the actual question? 
\end{document}
2
  • Don't really understand your intention. Do want it only once like using \question[3]\mbox{}\vspace{1cm} What time is it?? Or should it be part of the format?
    – cabohah
    Nov 15, 2022 at 12:51
  • Currently I have \qformat{Question \thequestion{} \hfill} \question What time is it? But I want \qformat{Question \thequestion{} \vspace{1cm} \hfill} \question What time is it? The problem is that the vspace I insert doesn't get put between the question number line and the actual question. I would prefer to modify the qformat so that it changes for all questions.
    – Gary Horan
    Nov 15, 2022 at 12:59

1 Answer 1

1

This is one way. a

\qformat{\parbox{\textwidth}{Question \thequestion{}  \hfill  \vspace*{0.5cm}}} 

will add a 0.5cm of blank space.

\documentclass[a4paper,12pt,addpoints]{exam} 
\usepackage[margin=2.5cm]{geometry}

\begin{document} 
    This is what happens by default when configuring  question layout in the exam format    
    
    \qformat{\parbox{\textwidth}{Question \thequestion{}  \hfill  \vspace*{0.5cm}}}
            
    \begin{questions}   
        \question[3]What time is it?
    \end{questions}

\end{document}
1
  • Thank you @simondispa, that is exactly what I was after.
    – Gary Horan
    Nov 15, 2022 at 21:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .