From what I understand, it's pretty much impossible to include floats within an fbox/minipage. I basically want a paragraph of framed text with a couple of subfigures included within the frame. Any ideas as to how I might implement this?
Asked
Active
Viewed 2,960 times
4
1 Answers
6
For such things you can use packages like framed, mdframed, adjustbox or tcolorbox.
Every package has its own benefits and drawbacks: you can read the related documentation to get more information.
The following example uses tcolorbox. To provide subfigures I am using subcaption.
\documentclass[12pt]{article}
\usepackage{caption,subcaption}
\usepackage{tcolorbox}
\usepackage{kantlipsum}
\begin{document}
\begin{tcolorbox}
\kant[1]
\begin{center}
\captionsetup{type=figure}
\begin{subfigure}[b]{.5\linewidth}
\centering
\rule{3cm}{1cm}
\caption{A subfigure}\label{fig:1a}
\end{subfigure}%
\begin{subfigure}[b]{.5\linewidth}
\centering
\rule{3cm}{1cm}
\caption{B subfigure}\label{fig:2a}
\end{subfigure}
\caption{FIGURES}
\end{center}
\kant[2]
\end{tcolorbox}
\end{document}

egreg
- 1,121,712
Marco Daniel
- 95,681
\captionsetup{type=figure}as 1st line. Afterwards\caption,\subcaption(box),\subfloatetc. should work fine. (I'm assuming you are using either thesubcaptionor thesubfigpackage for typesetting sub-figures.) – Jan 04 '12 at 11:29