
\minipage
環境内にテーブル ノートを配置しました。幅引数を渡して、ノートが配置されている環境の任意の幅に一致するようにしたいと\table
思います。\minipage
\table
MWE:
\documentclass[12pt]{article}
\usepackage{booktabs}
\begin{document}
\begin{table}
\centering
\begin{tabular}{l*{4}{c}}
\toprule
& (1) & (2) & (3) & (4) \\
\midrule
Outcome & 0.057 & 0.066 & 0.054 & 0.051 \\
& (0.025) & (0.032) & (0.041) & (0.028) \\
\bottomrule
\end{tabular}
\begin{minipage}{\linewidth}
% \begin{minipage}{\textwidth} -- what should go in this width argument?
\footnotesize \textit{This is my footnote explaining the table. I would like to substitute something in for minipage's width argument such that this minipage footnote will have the same width as the table in whose environment it sits. }
\end{minipage}
\end{table}
Here's some text just to show how wide a paragraph is for comparison. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{document}
スクリーンショット:
私はすでに と を試しましたlinewidth
が\textwidth
、結果は同じでした。 を使わずに私の目的を達成するためのより良い設定があればminipage
、ぜひ教えてください。ただし、tabular
可能であれば と互換性がある必要があります。
私の表は Stata のコマンドによって作成されていますesttab
。これが回答に影響するとは思いませんが、同じ質問を検索する他の Stata ユーザーの役に立つかもしれないので、言及しておきます。
答え1
パッケージの助けを借りてthreeparttable
:
\documentclass[12pt]{article}
\usepackage{booktabs}
\usepackage{threeparttable}
\begin{document}
\begin{table}
\centering
\begin{threeparttable}
\begin{tabular}{l*{4}{c}}
\toprule
& (1) & (2) & (3) & (4) \\
\midrule
Outcome & 0.057 & 0.066 & 0.054 & 0.051 \\
& (0.025) & (0.032) & (0.041) & (0.028) \\
\bottomrule
\end{tabular}
\begin{tablenotes}[flushleft]
\setlength\labelsep{0pt}
\footnotesize
\itshape
\item This is my footnote explaining the table. I would like to substitute something in for minipage's width argument such that this minipage footnote will have the same width as the table in whose environment it sits.
\end{tablenotes}
\end{threeparttable}
\end{table}
Here's some text just to show how wide a paragraph is for comparison. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{document}
\end{document}