Code: Select all
\begin{figure}[!h]
\centering
\includegraphics{figure.jpg}
\end{figure}
Code: Select all
\begin{figure}[!h]
\centering
\includegraphics{figure.jpg}
\end{figure}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
\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.NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p