%EC%97%90%EC%84%9C%20%EC%BA%A1%EC%85%98%20%ED%8C%A8%ED%82%A4%EC%A7%80%EB%A5%BC%20%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC%20%ED%91%9C%20%EC%B0%B8%EC%A1%B0.png)
figures
as subfigures
와 3개가 포함된 float를 만들려고 합니다 threeparttable
. 결국 caption
패키지 문서에 제공된 예를 기반으로 하나의 공동 캡션을 만들고 싶습니다. 그러나 나는 표 위에 캡션을 원하지 않습니다(이것은 공동 캡션의 목적에 어긋나기 때문입니다). 그러나 captionof
내부 환경 을 사용하지 않으면 table
테이블을 별도로 참조하는 것이 (분명히) 불가능합니다. 그렇다면 추가 캡션을 만들지 않고 어떻게 표를 참조할 수 있습니까?
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}
답변1
\captionlistentry
참조도 생성하는 것 같으므로 \label
그 뒤에 바로 넣을 수 있습니다.
\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}