[Tex/LaTex] Adding Tables to a Minipage Like Environment


I'm trying to set up an environment to use for examples in my thesis document. I would like to increase margins, change the line spacing, open with "Example :", and close with $\Box$. Minipage works beautifully except I can't embed tables or figures within my examples.

This is what I have:

        \textbf{Example \arabic{examplecounter}:}

Any suggestions on how to accomplish what I'm looking for?

Best Answer

You cannot have a figure environment inside a minipage because its a float, same counts for table. However you can include an image using \includegraphics (graphicx package) and also add a caption using the capt-of package: \captionof{figuree}{<the caption text>}.

See also this answer which explains float environments vs. their content as well.