0

Placing a figure in the solutionbox doesn't seem to work... Any suggestions?

\documentclass[a4paper,addpoints,12pt,answers]{exam}

\qformat{\textbf{Oefening \thequestion}. \hrulefill \thepoints} 

\begin{questions}

\question [5] 
here's the question

\begin{solutionorbox}[\stretch{1}]
    \begin{figure}[h]
    \centering
    \includegraphics[width=0.9\linewidth]{Figures/Oef_Saturn_001}
    \caption{Saturn}
    \label{fig:oefsaturn001}
    \end{figure}
\end{solutionorbox}
\end{questions}

When i only place this it works, but the "Solution"is centered as well

\begin{solutionorbox}[\stretch{1}] \\
    \centering
    \includegraphics[width=0.9\linewidth]{Figures/Oef_Saturn_001}
    
\end{solutionorbox}

I only seem to work with this

\begin{solutionorbox}[\stretch{1}] \\
    \begin{center}
    \includegraphics[width=0.9\linewidth]{Figures/Oef_Saturn_001}
    \end{center}
\end{solutionorbox}
1
  • Figures (even h figures) are floats and have to run in outer par mode. See \captionof from the caption or capt-of packages. Commented Apr 12 at 12:41

0

You must log in to answer this question.

Browse other questions tagged .