.png)
Estoy intentando crear un flotante que contenga tres figures
as subfigures
y a threeparttable
. Al final, quiero crear un título conjunto basado en el ejemplo dado en la caption
documentación del paquete. Sin embargo, NO quiero el título encima de la tabla (porque eso anula el propósito del título conjunto). Sin embargo , no utilizar el entorno captionof
interno table
hace que sea (aparentemente) imposible hacer referencia a la tabla por separado. Entonces, ¿cómo puedo hacer referencia a la tabla sin crear el título adicional?
MWE:
\documentclass{scrartcl}
\usepackage{threeparttable}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{graphicx}
\DeclareCaptionLabelFormat{andtable}{#1~#2 \& \tablename~\thetable} % combined Figure and Table
\begin{document}
\section{some section}
\begin{figure}[ht]
\begin{subfigure}[t]{.45\linewidth}
\includegraphics[width=.1\linewidth]{example}
\caption{Figure 1 of a couple more\label{fig:subfigure}}
\end{subfigure}
\begin{minipage}[b]{.54\textwidth}
\centering
\begin{threeparttable}[b]
\captionof{table}{\label{tab:table}}
\begin{tabular}{@{}p{0.8\linewidth}@{}}
\begin{tabular}{cc}
A\tnote{1} & B \\
C & D\\
\end{tabular}
\end{tabular}
\begin{tablenotes}
\item [1] Some footnote.
\end{tablenotes}
\end{threeparttable}
\end{minipage}
\captionlistentry[table]{This is a table.}\addtocounter{figure}{-1}
\captionsetup{labelformat=andtable}
\caption{Joint caption for the figure and the table.\label{fig:figure}}
\end{figure}
This is some text for referencing Figure~\ref{fig:figure} and Subfigure~\ref{fig:subfigure}.
More text referencing Table~\ref{tab:table}.
\end{document}
Respuesta1
\captionlistentry
parece crear una referencia también, por lo que podrías poner un \label
derecho detrás de ella:
\documentclass{scrartcl}
\usepackage{threeparttable}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{graphicx}
\DeclareCaptionLabelFormat{andtable}{#1~#2 \& \tablename~\thetable} % combined Figure and Table
\begin{document}
\section{some section}
\begin{figure}[ht]
\begin{subfigure}[t]{.45\linewidth}
\includegraphics[width=.1\linewidth]{example}
\caption{Figure 1 of a couple more\label{fig:subfigure}}
\end{subfigure}
\begin{minipage}[b]{.54\textwidth}
\centering
\begin{threeparttable}[b]
%%% \captionof{table}{\label{tab:table}}
\begin{tabular}{@{}p{0.8\linewidth}@{}}
\begin{tabular}{cc}
A\tnote{1} & B \\
C & D\\
\end{tabular}
\end{tabular}
\begin{tablenotes}
\item [1] Some footnote.
\end{tablenotes}
\end{threeparttable}
\end{minipage}
\captionlistentry[table]{This is a table.}\label{tab:table}
\addtocounter{figure}{-1}
\captionsetup{labelformat=andtable}
\caption{Joint caption for the figure and the table.\label{fig:figure}}
\end{figure}
This is some text for referencing Figure~\ref{fig:figure} and Subfigure~\ref{fig:subfigure}.
More text referencing Table~\ref{tab:table}.
\end{document}