I know that I can place two tabulars in a single table environment and reference both tabulars using the cref package, as in the following example:
\documentclass[oneside,11pt]{book}
\usepackage[semibold,tt=false]{libertine}
\usepackage{libertinust1math}
\usepackage[font={sf,small},labelsep=quad,labelfont=sc]{caption}
\usepackage[subrefformat=parens]{subcaption}
\usepackage[
expansion = false ,
tracking = smallcaps ,
letterspace = 40 ,
]{microtype}
\usepackage[capitalize]{cleveref}
\usepackage{graphicx}
\begin{document}
\begin{table}
\centering
\begin{tabular}{ll}
A & B\
C & D\
\end{tabular}
\caption{Table A}\label{tab:a}
\vspace*{2\floatsep}
\begin{tabular}{ll}
W & X\
Y & Z\
\end{tabular}
\caption{Table B}\label{tab:b}
\end{table}
Refer to \cref{tab:a} and \cref{tab:b}.
\end{document}
That is one way to force two tabulars to be on the same page.
Now, however, I want to force a tabular and an image to be on the same page. Is it possible to place a tabular and an image in the same float? I tried the following (similar to this answer):
\documentclass[oneside,11pt]{book}
\usepackage[semibold,tt=false]{libertine}
\usepackage{libertinust1math}
\usepackage[font={sf,small},labelsep=quad,labelfont=sc]{caption}
\usepackage[subrefformat=parens]{subcaption}
\usepackage[
expansion = false ,
tracking = smallcaps ,
letterspace = 40 ,
]{microtype}
\usepackage[capitalize]{cleveref}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\begin{tabular}{ll}
E & F\
G & H\
\end{tabular}
\caption{Table C}\label{tab:c}
\vspace*{2\floatsep}
\includegraphics[width=0.2\textwidth]{example-image}
\caption{Figure A}\label{fig:a}
\end{figure}
Refer to \cref{tab:c} and \cref{fig:a}.
\end{document}
However, the labels/captions are incorrect; "Figure 1" should be "Table 1". What can I do?





\captionof{table}>my caption}to put a table caption in a figure or\captionof{figure}{...]to put a figure in a table. Note that in either case the floats may float out of order. – David Carlisle Nov 23 '20 at 21:25[!]could help) o change the rules (for instance, allowing more than two top floats). See here for more about this. – Fran Nov 23 '20 at 21:39longtableor[H]tables, a table environment may float past them too. – David Carlisle Nov 23 '20 at 21:44