Code: Select all
\begin{figure}[!h]
\centering
\includegraphics{figure.jpg}
\end{figure}
Code: Select all
\begin{figure}[!h]
\centering
\includegraphics{figure.jpg}
\end{figure}
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
\captionof
command provided by the caption package.Code: Select all
\renewcommand{\solutiontitle}{}
\qformat{Question #\thequestion\quad\hrulefill}
\shadedsolutions
...
\begin{questions}
\question The question..
\begin{solution}
The solution..
\begin{figure}
\centering
\includegraphics{Figure.jpg}
\end{figure}
\end{solution}
\end{questions}
{figure}
environment like the {table}
environment is a floating environment. Their purpose is not to have the user be bothered with looking for the best place to place a figure or a table but let LaTeX decide. In order to be able to float a floating environment cannot be placed inside boxes, lists or similar constructs. That's why you get the error: you placed the float somewhere where it can't float and the consequence is that the float is lost.{figure}
environment. ReplaceCode: Select all
\begin{figure}
\centering
\includegraphics{Figure.jpg}
\end{figure}
Code: Select all
\begin{center}
\includegraphics{Figure.jpg}
\end{center}
scrartcl
then there is a command \captionof{<float>}{<caption>}
that you could use. If you're using a different class then have a look at the caption packages which also provides this command.Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis