0

I want to have the footnote of a table to right side of it so I used the minipage environment. For some reason, the footnote takes half of the space of the table instead of being entirely to the right of it. How do I avoid this overlap?

\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}
  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – erik Mar 25 '16 at 3:38
  • A warm welcome to TeX.SE! – A Feldman Mar 25 '16 at 3:39
  • try with \resizebox{\textwidth}{!} and you can replace \begin{minipage}{0.2\textwidth} with \begin{minipage}{0.48\textwidth} – touhami Mar 25 '16 at 6:18
  • @erik, thank you for your remark and apologies for making it inconvenient. Since it's my first time using TEX.SE, I forgot about that. Will do next time. – Sev T. Mar 25 '16 at 12:06
  • @SevT. No worries. It was just a reminder (to readers and potential future posters as well). – erik Mar 25 '16 at 14:45
1

The key point is to use: \resizebox{\textwidth}{!}. The best is to define new length and set it to 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}

enter image description here

| improve this answer | |
  • Thank you so much touhami for your help! That solved my problem. – Sev T. Mar 25 '16 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.