次の最小限の動作例はから までresizebox
長いですが、 の上のキャプションと文章はそれに応じて縮小されません。 の下の単純な ではなく、内のフォント サイズを参照して、これらのキャプションと文章を正確に縮小する方法があるかどうか疑問に思っています。ご協力ありがとうございます。tabular
textwidth
tabular
resizebox
small
\documentclass{article}
\usepackage{graphicx}
\usepackage[font=normalsize]{subcaption}
\begin{document}
\begin{table}
% How could one exactly downsize this caption?
\caption{\small This is a caption.}
% How could one exactly downsize these sentences?
{\small This is sentence 1. This is sentence 2. This is sentence 3.
This is sentence 4. This is sentence 5. This is sentence 6.\par}
% based on the font size inside this resizebox
\resizebox{\textwidth}{!}{
\subcaptionbox{This is a subcaption.}{
\begin{tabular}{*{12}c}\hline
1.1111&2.2222&3.3333&4.4444&5.5555&6.6666&
7.7777&8.8888&9.9999&0.0000&1.1111&2.2222\\
1.1111&2.2222&3.3333&4.4444&5.5555&6.6666&
7.7777&8.8888&9.9999&0.0000&1.1111&2.2222\\\hline
\end{tabular}
}
}
\end{table}
\end{document}
答え1
申し訳ありませんが、あなたの例にはいくつか悪い点があります。
テーブルをスケーリングするのは、最終結果をまったく制御できないため、良くありません。
表内のフォント サイズを縮小して収まるようにした場合でも、キャプションは他のすべてのキャプションと同じである必要があります。
内部のフォント変更コマンドは
\caption
絶対に使用しないでください。
ただし、サブキャプションのフォントを拡大縮小することには反対しません。
\documentclass{article}
\usepackage[font=normalsize]{subcaption}
\usepackage{booktabs}
\begin{document}
\begin{table}[htp]
\caption{This is a caption.}
\captionsetup[subtable]{font=footnotesize}
\subcaptionbox{This is a subcaption.}{%
\footnotesize
\setlength{\tabcolsep}{0pt}%
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}*{12}c}
\toprule
1.1111 & 2.2222 & 3.3333 & 4.4444 & 5.5555 & 6.6666 &
7.7777 & 8.8888 & 9.9999 & 0.0000 & 1.1111 & 2.2222 \\
1.1111 & 2.2222 & 3.3333 & 4.4444 & 5.5555 & 6.6666 &
7.7777 & 8.8888 & 9.9999 & 0.0000 & 1.1111 & 2.2222 \\
\bottomrule
\end{tabular*}%
}
\end{table}
\end{document}