
Я хочу, чтобы сноска таблицы была справа от нее, поэтому я использовал среду мини-страницы. По какой-то причине сноска занимает половину пространства таблицы, а не находится полностью справа от нее. Как избежать этого наложения?
\begin{table}[ht!]
\caption{Descriptive Statistics}
\begin{minipage}{0.2\textwidth}
\resizebox{8cm}{!} {\begin{tabular}{cccc}
\hline \hline
Variables & Mean & Std. dev. & Range \\
\hline \\
\textit{variable1} & 0.50 & 0.42 & 0-1 \vspace{1mm} \\
\textit{variable2} & 0.11 & 0.76 & 0-1 \vspace{1mm} \\
\textit{variable3} & 34.95 & 9.99 & 25-65 \vspace{1mm} \\
\textit{variable4} & 34.95 & 9.99 & 25-65 \vspace{4mm} \\
\hline Observations & & & 256
\end{tabular}}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\footnotesize \textit{Notes}: Description of variable1, variable2, variable3, variable4
\end{minipage}
\end{table}
решение1
Ключевым моментом является использование: \resizebox{\textwidth}{!}
. Лучше всего определить новую длину и установить ее на 8cm
.
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{table}[ht!]
\caption{Descriptive Statistics}
\begin{minipage}{0.49\linewidth}
\resizebox{\textwidth}{!} {\begin{tabular}{cccc}
\hline \hline
Variables & Mean & Std. dev. & Range \\
\hline \\
\textit{variable1} & 0.50 & 0.42 & 0-1 \vspace{1mm} \\
\textit{variable2} & 0.11 & 0.76 & 0-1 \vspace{1mm} \\
\textit{variable3} & 34.95 & 9.99 & 25-65 \vspace{1mm} \\
\textit{variable4} & 34.95 & 9.99 & 25-65 \vspace{4mm} \\
\hline Observations & & & 256
\end{tabular}}
\end{minipage}% %<----- no space
\begin{minipage}{0.5\linewidth}
\footnotesize \textit{Notes}: Description of variable1, variable2, variable3, variable4
\end{minipage}
\end{table}
\newlength{\mytabularwidth}
\setlength{\mytabularwidth}{8cm}
\begin{table}[ht!]
\caption{Descriptive Statistics}
\begin{minipage}{\mytabularwidth}
\resizebox{\textwidth}{!} {\begin{tabular}{cccc}
\hline \hline
Variables & Mean & Std. dev. & Range \\
\hline \\
\textit{variable1} & 0.50 & 0.42 & 0-1 \vspace{1mm} \\
\textit{variable2} & 0.11 & 0.76 & 0-1 \vspace{1mm} \\
\textit{variable3} & 34.95 & 9.99 & 25-65 \vspace{1mm} \\
\textit{variable4} & 34.95 & 9.99 & 25-65 \vspace{4mm} \\
\hline Observations & & & 256
\end{tabular}}
\end{minipage}% %<----- no space
\begin{minipage}{\dimexpr\linewidth-\mytabularwidth\relax}
\footnotesize \textit{Notes}: Description of variable1, variable2, variable3, variable4
\end{minipage}
\end{table}
\end{document}