Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have the table below, in LyX. How can I add text that hugs the bottom line and I want it to be very small text, smaller than the font in the table.

\begin{table}
\begin{tabular}{c c c c c c c}
\hline
& \multicolumn{2}{c}{Model 1}&\multicolumn{2}{c}{Model 2}&\multicolumn{2}{c}{Model 3}\\
\hline
\hline
Variable 1 & 12.758 & *** &  13.822 & *** & 2.123 & ***\\
\hline
\fontsize{4}{4} \selectfont Blah Blah Blah and * $p \le 0.05$, ** $p \le 0.01$, *** $p \le 0.001$.
\end{tabular}
\end{table}

This works but there is white space between table end and footnote

share|improve this question

1 Answer 1

Always supply a complete, compilable document.

If you really want to use \texit, you have to load \usepackage[T1]{fontenc} in your preamble so that the < will render correctly. Or you can just put the whole thing in math environment and use \mathit instead.

Here is one method.

%\documentclass[10pt]{article}
\documentclass[preview,convert,border=5]{standalone}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{c c c c c c c}
\toprule
& \multicolumn{2}{c}{Model 1}&\multicolumn{2}{c}{Model 2}&\multicolumn{2}{c}{Model 3}\\
\midrule
Variable 1 & 12.758 & *** &  13.822 & *** & 2.123 & ***\\
\bottomrule
\multicolumn{7}{r}{\footnotesize$\mathit{*p < 0.05, ** p < 0.01, *** p < 0.001}$}\\
\end{tabular}
\end{document}

enter image description here

However, I don't like how the asterisks are separated from the p-values so I suggest that you eliminate some columns. This is what I did in the next method with the use of threepartable package. (There is also a threeparttablex package.)

%\documentclass[10pt]{article}
\documentclass[preview,convert,border=5]{standalone}
\usepackage{booktabs}
\usepackage[para]{threeparttable}
\begin{document}
\begin{table}
\centering
\caption{\label{tab:1} Your table}
\begin{threeparttable}
\begin{tabular}{c c c c c c c}
\toprule
& Model 1 & Model 2 & Model 3\\
\midrule
Variable 1 & 12.758\tnote{***} &  13.822\tnote{***} & 2.123\tnote{***}\\
\bottomrule
\end{tabular}
\begin{tablenotes}\footnotesize
\item [*] $p<0.05$
\item [**] $p<0.01$
\item [***] $p<0.001$
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}

enter image description here

Update

I have included \renewcommand{\arraystretch}{0.5} inside a scope to make the effect local. I have replaced \footnotesize with \tiny but it's up to you if you want to resort to a smaller font size. (Just a caution: be kind to your eyes. :)

%\documentclass[10pt]{article}
\documentclass[preview,convert,border=5]{standalone}
\usepackage[T1]{fontenc}
\usepackage{threeparttable}
\usepackage{booktabs}
\begin{document}
{\renewcommand{\arraystretch}{0.5}
\begin{threeparttable}
\begin{tabular}{c c c c}
\toprule
& Model 1 & Model 2 & Model 3\\
\midrule
Variable 1 & 12.758\tnote{***} &  13.822\tnote{***} & 2.123\tnote{***}\\
\bottomrule
\multicolumn{4}{r}{\tiny *$\mathit{p < 0.05}$, ** $\mathit{p < 0.01}$, *** $\mathit{p < 0.001}$}\\
\end{tabular}
\end{threeparttable}
}
\end{document}

enter image description here

share|improve this answer
    
The goal is to have the footnote right under the table in smaller font. Is there a way to start the footnote after \end{tabular} and have it a) hug the table and b) be in a small font (smaller than tiny if possible) –  Chris J Mar 20 '13 at 3:50
    
I actually used this \fontsize{4}{4} \selectfont Note: Blah Blah Blah and * $p \le 0.05$, ** $p \le 0.01$, *** $p \le 0.001$. and it works BUT there is a lot of white space between the table and the footnote, is there a way to reduce? –  Chris J Mar 20 '13 at 3:58
    
In that case, you just replace \footnotesize with \tiny. Then you can also put \renewcommand{\arraystretch}{0.5} in the first example to control the vertical spacing. –  hpesoj626 Mar 20 '13 at 5:30
    
@CJ12 See my edit –  hpesoj626 Mar 20 '13 at 5:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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