0

I have a custom qformat in my exam class for the question title. For questions which have text, I want their to be space between the question and the text. \vspace does not seem to work, and from this question \vrule depth 2cm width 0pt only seems to work properly if I put it in the qformat, which I do not want to do because I have some questions with text and some without - the ones without will then have too much space between the question part and the question title.

enter image description here

\documentclass[addpoints]{exam}
\usepackage[utf8]{inputenc}

\usepackage{tikz}

\usepackage{showframe}

\begin{document}

\qformat{\textbf{Question \thequestion} (\totalpoints\ marks)\hfill}

% supposed to have a \newpage and different spacing between ones with no question text and ones with question text.
\newcommand{\newquestion}{\question}
% There should be a command which works and adds sapce.
%\newcommand{\newquestionwithtext}{\newquestion????}

\begin{questions}
% vpsace just doesn't seem to work.
\newquestion\vspace{5cm}
Small Sister is a character in Orge Georwell's book 4891. They famously use the quote "Happy is sad. Is this loss? Lorem Ipsus".

\begin{parts}
\part[2] Explain how the rapid inflation following the big bang has affected the intertextuality of 4891.
\end{parts}

% This adds space between the first line and the second line.
% From https://tex.stackexchange.com/a/353157/200609, it works in qformat but that's not a solution for me.
\newquestion\vrule depth 2cm width 0pt
Small Sister is a character in Orge Georwell's book 4891. They famously use the quote "Happy is sad. Is this loss? Lorem Ipsus".
\begin{parts}
\part[2] Explain how the rapid inflation following the big bang has affected the intertextuality of 4891.
\end{parts}

\newquestion
% This spacing is fine.

\begin{parts}
\part[2] How do you count to 3?
\end{parts}


\end{questions}

\end{document}

1 Answer 1

1

I redefined \newquestion as \newquestion{<vertical space>} to add some vertical blank space after the custom \qformat and before the text.

For a question without text just \question works fine.

x

% !TeX TS-program = pdflatex

\documentclass[addpoints]{exam}
\usepackage[utf8]{inputenc}

\usepackage{tikz}
\usepackage{showframe}

\qformat{\textbf{Question \thequestion} (\totalpoints\ marks)\hfill}

\newcommand{\newquestion}[1]{\question\parbox[t][#1]{\linewidth}{}\par}% changed <<<<<<

\begin{document}
    
    \begin{questions}
        \newquestion{5cm} % adds 5cm of blank space     
        Small Sister is a character in Orge Georwell's book 4891. They famously use the quote "Happy is sad. Is this loss? Lorem Ipsus".
        
        \begin{parts}
            \part[2] Explain how the rapid inflation following the big bang has affected the intertextuality of 4891.
        \end{parts}     
        
        \newquestion{2cm} % adds 2cm of blank space     
        Small Sister is a character in Orge Georwell's book 4891. They famously use the quote "Happy is sad. Is this loss? Lorem Ipsus".
        \begin{parts}
            \part[2]  Explain how the rapid inflation following the big bang has affected the intertextuality of 4891.
        \end{parts}
        
        \question % normal question, no space added
        
        \begin{parts}
            \part[2] How do you count to 3?
        \end{parts}     
        
    \end{questions}
    
\end{document}

You must log in to answer this question.

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