Using footnotesize in ctable package
ctable
provides the doinside
key-value option, so simply use doinside=\footnotesize
. (The caption font size won't be affected.)
\documentclass{article}
\usepackage{ctable}
\usepackage{booktabs}
\begin{document}
\ctable[
caption = {cap1},
label = {tab:tabu},
pos = ht,
doinside = \footnotesize,
]{lcc}{
\tnote[$\ast$]{footnote is here}
}{ \FL
Variable & Estimate & p-value \ML
var1 & 4.4 & 0.02 \\
var2 \tmark[a] & 2.4 & 0.01 \\
var3 & -6.2 & 0.08 \LL
}
\end{document}
It's not usually recommended to change the fontsize to fit the table, but if you must you can just surround the table in braces and put \footnotesize
inside. In fact, ctable
provides a hook for this doinside
(as lockstep points out in his answer), so this is actually the better way. This will not affect the size of the caption, which is probably what you want. Since you are typesetting numerical data with signs and decimals, you probably not use the c
column type but instead use a column type more suited for this sort of data. The S
column provided by the siunitx
package does a nice job of this. Since it tries to automatically recognize numerical data, it's helpful to enclose column headings in braces
\documentclass{article}
\usepackage{ctable}
\usepackage{booktabs}
\usepacakge{siunitx}
\begin{document}
\ctable[
caption = {cap1},
label = {tab:tabu},
pos = ht,
doinside=\footnotesize
]{lSS}{
\tnote[$\ast$]{footnote is here}
}{ \FL
Variable & {Estimate} & {p-value} \ML
var1 & 4.4 & 0.02 \\
var2 \tmark[a] & 2.4 & 0.01 \\
var3 & -6.2 & 0.08 \LL
}
\end{document}