[Tex/LaTex] Multiple choice with figure options in exam class

exammulticol

I am creating multiple choice questions using exam class however I faced two issues: 1). Want to have two columns choices but it displays by default as A, C, B, D, and 2). Figures in choices are bottom aligned instead of top alignment. Any suggestion? Below is my MWE:

\documentclass{exam}
\usepackage{multicol}
\usepackage{graphicx}
\begin{document}
    \begin{questions}
        \question
        \begin{minipage}[t]{0.65\linewidth}
        Consider the network graph shown in the figure, which of the following is NOT a \textit{tree} of this graph?
            \begin{multicols}{2}
                \begin{choices}
                    \choice
                        \includegraphics[scale=0.2]{example-image-a}
                    \choice
                        \includegraphics[scale=0.2]{example-image-b}
                    \choice
                        \includegraphics[scale=0.2]{example-image-c}
                    \CorrectChoice
                        \includegraphics[scale=0.2]{example-image-a}
                \end{choices}
            \end{multicols}
    \end{minipage}
    \hspace{2em}%
    \begin{minipage}[t]{0.35\linewidth}
        \vspace{-\baselineskip}
        \includegraphics[scale=0.4]{example-image-a}
    \end{minipage}
\end{questions}
\end{document}

Output after running the above code gives as:
enter image description here

However, I wish to have something like this:
enter image description here

Best Answer

Here's one option:

\documentclass{exam}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{adjustbox}

\begin{document}
    \begin{questions}
        \question
        \begin{minipage}[t]{0.65\linewidth}
        Consider the network graph shown in the figure, which of the following is NOT a \textit{tree} of this graph?
                \begin{choices}
            \begin{multicols}{2}
                    \choice
                        \adjustbox{valign=t}{\includegraphics[scale=0.2]{example-image-a}}
                    \choice
                        \adjustbox{valign=t}{\includegraphics[scale=0.2]{example-image-b}}
            \end{multicols}\par
            \begin{multicols}{2}
                    \choice
                        \adjustbox{valign=t}{\includegraphics[scale=0.2]{example-image-c}}
                    \CorrectChoice
                        \adjustbox{valign=t}{\includegraphics[scale=0.2]{example-image-a}}
            \end{multicols}
                \end{choices}
    \end{minipage}\hfill%
        \begin{adjustbox}{minipage={0.30\linewidth},valign=t}
        \includegraphics[width=\linewidth]{example-image-a}
    \end{adjustbox}
\end{questions}
\end{document}

enter image description here

I used the adjustbox package to get the desired top alignment. For the numbering schema I used two multicols environments instead of just one.

I also changed the scale option for \includegraphics to widthand changed some spaces to prevent overfull\hbox`es.

Related Question