I am writing an exam using \usepackage{exercise}
. I have been using this package for some time with great results.
However, this time, I would like to insert a small image on the right side of the exercise's questions.
I've been trying several options, and finally settled for the minipage
environment, since it is mentioned to work fine in the doc of the exercise
package.
But I get the following unintended result
If I replace the image with text, things work fine : I do get the 2 intended columns.
Here is a mwe
\documentclass{article}
\usepackage{exercise}
\usepackage{graphicx}
\begin{document}
\begin{minipage}[t]{.7\textwidth}
\begin{Exercise}[label=ex6, origin={1.5 points}]
\Question This is question 1.
\vspace{1cm}
\Question This is question 2.
\vspace{1cm}
\Question This is question 3.
\vspace{1cm}
\end{Exercise}
\end{minipage}
\begin{minipage}[t]{.3\textwidth}
\centering
\includegraphics[width=\textwidth]{dyn.jpg}
\end{minipage}
\end{document}
The \vspace
is to allow some space for the student to write the answer.
related
orlinked
questions there.\vspace{0pt}
just before the image allows the vertical alignment of the two columns as described by Jubobs.