
Я поместил заметки таблицы внутри \minipage
среды, внутри \table
среды. Я хочу передать \minipage
аргумент ширины так, чтобы он соответствовал любой произвольной ширине , \table
в которой он находится.
МВЭ:
\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
если это возможно.
Моя таблица создана с помощью esttab
команды Stata — не думаю, что это должно повлиять на ответ, но я упоминаю об этом на случай, если это поможет другим пользователям 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}