I'm currently having an issue with the \exercise environment of the Legrand Orange Book template. After inserting a table into the exercise environment, I get an error which says !LaTeX Error: Float(s) lost.
How do I format the environment to allow for tables and figures to be inserted into it without the error? Below is what causes the error.
\documentclass[11pt,fleqn]{book} % Default font size and left-justified equations
\begin{document}
\section*{Exercises}
\begin{exercise}
The following measurements have been recorded by a student in their notebook. However, this particular student has not kept a consistent notation scheme and has made a few errors. Comment where you find an error and correct errors where possible:
\begin{table}[h!]
\centering
\begin{tabular}{lll}
10 $\rightarrow$ 23 & 33 $\rightarrow$ 000 & 015$\rightarrow$ 14 \\
240/77 W & 21/60 W & 000/11 E
\end{tabular}
\end{table}
\end{exercise}
\end{document}
Below are the specifications for the exercise environment:
\newenvironment{exercise}{\begin{eBox}\begin{exerciseT}}
{\hfill{\color{ocre}\tiny\ensuremath{\blacksquare}}\end{exerciseT}\end{eBox}}
And the box for this environment is drawn with:
% Exercise box
\newmdenv[skipabove=7pt,
skipbelow=7pt,
rightline=false,
leftline=true,
topline=false,
bottomline=false,
backgroundcolor=ocre!10,
linecolor=ocre,
innerleftmargin=5pt,
innerrightmargin=5pt,
innertopmargin=5pt,
innerbottommargin=5pt,
leftmargin=0cm,
rightmargin=0cm,
linewidth=4pt]{eBox}
\documentclass
and ending with\end{document}
.\begin{table}[h!] \centering
..\end{table}
by\begin{center}..\end{center}