Here's what I'm looking for: I need a table and a figure to stay on the same page, while keeping captions & labels fully functional. Both the table and the figure need their own caption and their own label.
The \afterpage
command almost made it work (which I found in Join figure and table on the same page), but the labels to reference them in the text don't work anymore (no matter where I place my \afterpage
environment. The table & figure together make up almost a full page, if that helps.
Best Answer
To guarantee that they will remain together, use either one
minipage
(if the object doesn't have to be treated as floating) or just one floating environment for both the figure and the table; the right type of caption can then be obtained, in both cases, using\captionof
from thecapt-of
(orcaption
) packages; the example below shows both possibilities: