H.S.
2006-02-10 06:17:59 UTC
Hi,
I am using the exam class to make solutions and question papers. I have
noticed that if I include any graphic using \includegraphics command
within the 'solution' environment, Latex gives the error:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
! LaTeX Error: Not in outer par mode.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.6 \begin{figure}[htb]
?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
Here is a minimal example:
%%%%%%%%%%%%%%%%% example starts %%%%%%%%%%%%%%%%%%%%%%%%%%5
\documentclass[11pt,answers]{exam}
\usepackage{graphicx}
\usepackage{float}
\begin{document}
\begin{questions}
\question Question statement here.
\begin{solution}
Solution here and the figure below:
\begin{figure}[htb]
\begin{center}
\input{j-8_51-phasordia.pstex_t}
\caption{\label{fig:j8.51:phasordia} Schematic drawing show here.}
\end{center}
\end{figure}
\end{solution}
\end{questions}
\end{document}
%%%%%%%%%%%%%%%%%% example ends %%%%%%%%%%%%%%%%%%%%%%
Any suggestions how to include figures within the solutions env?
Currently I am just including them outside the environment but there are
situations where I must include the figures only in the solutions env.
thanks,
->HS
I am using the exam class to make solutions and question papers. I have
noticed that if I include any graphic using \includegraphics command
within the 'solution' environment, Latex gives the error:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
! LaTeX Error: Not in outer par mode.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.6 \begin{figure}[htb]
?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
Here is a minimal example:
%%%%%%%%%%%%%%%%% example starts %%%%%%%%%%%%%%%%%%%%%%%%%%5
\documentclass[11pt,answers]{exam}
\usepackage{graphicx}
\usepackage{float}
\begin{document}
\begin{questions}
\question Question statement here.
\begin{solution}
Solution here and the figure below:
\begin{figure}[htb]
\begin{center}
\input{j-8_51-phasordia.pstex_t}
\caption{\label{fig:j8.51:phasordia} Schematic drawing show here.}
\end{center}
\end{figure}
\end{solution}
\end{questions}
\end{document}
%%%%%%%%%%%%%%%%%% example ends %%%%%%%%%%%%%%%%%%%%%%
Any suggestions how to include figures within the solutions env?
Currently I am just including them outside the environment but there are
situations where I must include the figures only in the solutions env.
thanks,
->HS
--
Please remove the underscores ( the '_' symbols), if any, from my email
address to obtain the correct one. Apologies, but the fudging is to
reduce spam.
Please remove the underscores ( the '_' symbols), if any, from my email
address to obtain the correct one. Apologies, but the fudging is to
reduce spam.