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 a long table requiring the use of a \footnotesize. The table is made using a \ctable package as follows.

\documentclass{article}
\usepackage{ctable}
\usepackage{booktabs}


\begin{document}

\ctable[
    caption = {cap1},
    label   = {tab:tabu},
        pos = ht,
]{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}

I want to know how to use \footnotesize to help fit the contents my table in a page.

share|improve this question
    
Welcome to TeX-SX! Have a look at our starter page for a quick intro if you wish to familiarize yourself with our format. –  Claudio Fiandrino Jul 29 '13 at 15:02

2 Answers 2

up vote 3 down vote accepted

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}
share|improve this answer

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}

output of code

share|improve this answer
    
Just before your comment, I used \begin{footnotesize} ... and accomplished what I wanted. –  Duna Jul 29 '13 at 15:02

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.