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.

How best to change the font size (etc) of the threeparttable table notes ?

Google returned these (duplicate) unanswered stubs (in English and German, but with pictures ;)

I tried \renewcommand{\TPTnoteSettings}{\small\linespread{1}}, and surely enough: the result looks like in the screenshots of the above links.

Elsewhere I spotted \renewcommand{\TPTnoteSettings}{\small\linespread{1}\selectfont}, though I'm not sure what the \selectfont part does: what does it do?

Edit

To add another link (which I had already opened but overlooked):

Re: threeparttable: multicolumn table notes

Postby Bil Kleb » Sat, 10 Apr 2004 16:37:35 GMT

Arseneau assisted me offline. The conclusion: the whole idea of the \tablenotes list environment is set to be 'tablewidth' wide. Therefore, merely make your own list that inherits the existing \linewidth set by the multicols environment. A lame example:

...

   \setlength{\columnsep}{0pt}
   \setlength{\columnseprule}{1pt}
   \setlength{\multicolsep}{0pt}
   \newcommand{\mcmakelabel}[1]{\textsuperscript#1}
   \newenvironment{mctablenotes}%
    {\begin{footnotesize}\begin{list}{}{\topsep 0pt \partopsep  0pt
     \setlength\itemsep{4pt plus 1pt minus 1pt} \leftmargin 0pt
     \parsep 0pt \itemindent 0pt \labelsep 0pt \raggedright}%
     \settowidth{\labelwidth}{\textsuperscript 1}%
     \renewcommand{\makelabel}{\mcmakelabel}}%
    {\end{list}\end{footnotesize}}%

   \begin{multicols}{2}
    \begin{mctablenotes}
     \item[1] Also known as code-n-fix.
     \item[2] For teams of ``code monkeys''
    \end{mctablenotes}
   \end{multicols}

-- enter code hereBil Kleb, Hampton, {filter}ia

As a beginner, I still don't understand it all: does this already contain "the" answer? Help appreciated!

share|improve this question
    
You've added lots of links but you haven't supplied a working example nor said what change you want to make. Make a small document using this environment and if \renewcommand{\TPTnoteSettings}{\small} doesn't do what you want then describe in what way you want it to do something different. –  David Carlisle Apr 13 '13 at 21:43

1 Answer 1

up vote 5 down vote accepted

The right command to act on is indeed \TPTnoteSettings, but its standard definition must be preserved, because it contains essential information for typesetting the notes. The best is to add to it and etoolbox provides a simple way.

\documentclass{article}
\usepackage{threeparttable,booktabs}
\usepackage{etoolbox}
\appto\TPTnoteSettings{\footnotesize}

\begin{document}
\begin{table}
\begin{threeparttable}[b]
\caption{A caption}
\begin{tabular}{llll}
\toprule
42\tnote{1} & some & text & to have room\\
\bottomrule
\end{tabular}
\begin{tablenotes}
\item [1] the first note
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}

enter image description here

share|improve this answer
    
"Elsewhere I spotted \renewcommand{\TPTnoteSettings}{\small\linespread{1}\selectfont}, though I'm not sure what the \selectfont part does: what does it do?" –  nutty about natty Apr 14 '13 at 5:25
    
using \appto\TPTnoteSettings{\footnotesize} would allow me to drop \small from the previous comment's code; but what about \linespread{1} - where should that be included best? Should that (still) be included, or are there better ways (of making those linespacings narrower)? –  nutty about natty Apr 14 '13 at 6:12
1  
@nuttyaboutnatty Add \linespread{1} before \footnotesize. –  egreg Apr 14 '13 at 8:15

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.