I am using this template, but when I add \begin{figure} in the '\problemAnswer{}' there always has a error "Float(s) lost. \end{document}". Is anyway to fix this bug?
Asked
Active
Viewed 721 times
1
Tony
- 11
1 Answers
2
The way the template is set up, you cannot use figure environments within \problemAnswers. Why would you in the first place? Just include the picture as is, if you want you can add a center environment.
\problemAnswer{ % Answer
\begin{center}
\includegraphics[width=0.75\columnwidth]{example_figure} % Example image
\end{center}
\lipsum[2]
}
I cannot recommend the template, see also Why should I avoid templates?
Johannes_B
- 24,235
- 10
- 93
- 248
\problemAnswer{\includegraphics{duck}}. – Johannes_B Apr 23 '17 at 08:43\includegraphicsis in afigureenvironment: think to it as creating a big letter in a fancy alphabet. – egreg Apr 23 '17 at 08:48