This is the screen shot of my customized multiple choice questions. (I have some modification to the exam class's multiple choice question, so that they can have images, see How can I put a figure to the right of a multiple-choice question? and the four choices are automatically aligned, see How to automatically align the four choices of a multiple choice question in exam?) enter image description here

You see, there are three vertical spaces need to be adjusted. But I still don't know how to adjust those three spaces. Here is the minimal test code

\documentclass[a4paper, addpoints]{exam}


% the accumulated answers text

% adjust the lengths


% True or False questions
% One optional argument, the default value of which is empty.
    \hbox to \answerspace{(\hfil#1\hfil)}%
    \hbox to \answerspace{(\hfil)}%
}% dottedanswerline

% multiply choice questions
% https://tex.stackexchange.com/questions/140923/how-to-automatically-align-the-four-choices-of-a-multiple-choice-question-in-exa
% also it support adding figures in the right corner
% https://tex.stackexchange.com/questions/141870/how-can-i-put-a-figure-to-the-right-of-a-multiple-choice-question
\newif\ifshowsolution \showsolutiontrue

%\def\makechoicelabel#1{#1\uline{\thechoiceitem.}\else\thechoiceitem.\fi\space} %underline the answer item label if we want to print the answer
\def\makechoicelabel#1{#1\framebox[1.25em][l]{\thechoiceitem.}\else\makebox[1.25em][l]{\thechoiceitem.}\fi} %underline the answer item label if we want to print the answer


%measure the choices, this is the first time we need to parse the \BODY
  {\choice@mesureitem\ifprintanswers \xappto\theanswer{\thechoiceitem}\ignorespaces}%

  \hbox to \choiceitemwidth\bgroup\hss\refstepcounter{choiceitem}\makechoicelabel#1}


  \par\noindent\refstepcounter{choiceitem}\makechoicelabel#1\hangindent=1.25em\hangafter=1\relax}% only the first line need indent


  \endgroup \dottedanswerline[\theanswer]
  % handle large images (leaving less than 30% space)
    %\strut\hfill% uncomment to right-align large images
    %\hfill\strut% uncomment this too to center them
  % end of handling for large images
  \else % \choiceitemwidth > 0.5\columnwidth


\section {Multiply Choice Questions}
\question 1111 text text text text text text text 
    \item foo
    \item bar
    \item text text text text text text text 

\question 2222 text text text text text text text text text text text text text text text text text text text
    \item*   foo
    \item   bar
    \item   baz
    \item   text



    % do nothing
    % this print the answertext


The minimal code may look a bit complex, because the customized item environment has a lot of code.

As I know, change the code


will change the whole three kinds a vertical spaces simultaneously. But I don't know how to adjust them individually. From the sample code, you will see the items were put in a minipage, but any one know how to adjust the margins before and after the minipage?



If I follow egreg's advice(in comments), and change the code like below

\setlist[trivlist,1]{ topsep=0cm}

space bug2

But the space before and after the items are still quite big.

If I change to the code below(topsep is -1cm):

\setlist[trivlist,1]{ topsep=-1cm}

Then, I see it get a litter smaller space before the items. space bug 2

So, I wondering why a -1cm is needed here? I mean I want to know how to exactly control the space before and after the items. Thanks.


I create a minimal test code and try to see how minipage and trivlist work, it looks like I can get the expect space, especially the space between question text and items are quite small, see below the code and the screen shot.


\noindent Question Question Question Question Question\par
    \trivlist %
    \item A.abc
    \item B.def

This is the screen shot:

space looks quite good

It looks like this pure code does not expose the space issue.

  • Aside: I think it's called "multiple choice", not "multiply choice".
    – Mico
    Jan 2, 2017 at 3:39
  • @JohnKormylo I want to make those vertical space the same length, and also make them a litter smaller value, so that the multiple choice questions looks quite compact. So, not adding spaces, but reduce spaces.
    – ollydbg23
    Jan 2, 2017 at 3:57
  • There is no space added between the choices; what you see is due the larger baseline skip that you impose. Before and after the choices, the added space is the standard \topsep.
    – egreg
    Jan 2, 2017 at 10:07
  • @egreg thanks for the hint. If I comment out the line\renewcommand{\baselinestretch}{1.5} and add a line \setlength{\topsep}{0pt}, I still get unequal spaces between items and before or after the items.
    – ollydbg23
    Jan 2, 2017 at 12:23
  • I see that \setlist[trivlist,1]{ topsep=0cm} this command can control the space after the question line and the choices, but still the space is a litter larger than vertical space between each items.
    – ollydbg23
    Jan 2, 2017 at 12:56

2 Answers 2


Refer to the answer of this question\topsep, \itemsep, \partopsep and \parsep - what does each of them mean (and what about the bottom)?, I understand that the first vertical space is controlled by \parsep, and the third space is controlled by \itemsep+\parsep, so here is the setting code snippet I use, which gives such expected result. Thanks for the help and hint.


Here is the screen shot:

good space between items and questions


I understand what you don't like in the vertical spaces (marked red). I'm not sure how you want to fix it. The following will make the marked vertical spaces look nice (although my "nice" is not necessarily the same as yours).



  • thanks for the help, I remembered you help me three years ago when I'm trying to adding images for the multiple choice questions. It looks like controlling the space before and after the choices are not quite simple, you can see my updated question. The main problem is that it's hard the set the space before and after the items.
    – ollydbg23
    Jan 3, 2017 at 13:43

You must log in to answer this question.

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