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.

Can anyone help me to solve my problem with threeparttable, TPTMinimum redefinition and centering environment? I haven't seen in any other topic what I was trying to do.

I have something like this:

\begin{table}
\centering
\begin{threeparttable}
\renewcommand\TPTminimum{\linewidth}
\captionsetup{font=small}

\begin{tabular}{|c|c|c|c|}
\hline\hline
{\scriptsize \textbf{Parameter}} & {\scriptsize \textbf{Value}}    & {\scriptsize \textbf{Unity}}   & {\scriptsize \textbf{Reference/Comment}}\\\hline
$\scriptstyle \tau_1$            & $\scriptstyle 10^{-2}$          & $\scriptstyle\text{dia}^{-1}$  & {\scriptsize \citet{Spratt}}\\\hline
$\scriptstyle \tau_2$            & $\scriptstyle 10^{-3}$          & $\scriptstyle\text{dia}^{-1}$  & $\scriptstyle \tau_2 \; < \; \tau_1$\\\hline
%some more lines...
$\scriptstyle \lambda$           & $\scriptstyle 4.16$             & $\scriptstyle\text{dia}^{-1}$  & {\scriptsize \citet{REF2}\tnote{2}}\\\hline
$\scriptstyle a$                 & $\scriptstyle 2 \times 10^{3}$  & {\scriptsize mg}               & {\scriptsize \citet{REF1}\tnote{1}}\\\hline
$\scriptstyle b$                 & $\scriptstyle 5 \times 10^{6}$  & {\scriptsize mg}               & {\scriptsize \citet{REF1}\tnote{1}}\\
\hline\hline
\end{tabular}
%NOTES:
\begin{tablenotes}[flushleft]\footnotesize
\item[1] I want it that way because my table isn't so big and the footnotes are getting weird the original way...
\item[2] \,Second Note!
\end{tablenotes}
\end{threeparttable}
\caption{Parameters...}
\end{table}

How does it look like: IMG

How could I centralize this table? Thanks!

share|improve this question
    
I don't think your table is too small and that the footnotes should be as wide as the line width. –  egreg Dec 27 '13 at 21:26
    
Why not rewrite the table instead. Loose all vertical lines, most of the horizontal ones, and add space between the columns. Makes it more readable, and wider such that the notes fit better. Some of the problems may also come from flush left option –  daleif Dec 27 '13 at 21:35
    
@Habsy My opinion is that too long table footnotes are best an explanation in the document. Table footnote should be comparatively short. –  egreg Dec 27 '13 at 21:40
    
@daleif: I tried it in the first place, but it didn't seem agreeable to me... –  Habsy Dec 27 '13 at 21:42

2 Answers 2

Set the tabular inside a \makebox[\linewidth] box, similar to the suggestion in Centre an image, ignoring margins:

\documentclass{article}
\usepackage{amsmath,caption,threeparttable,booktabs}
\newcommand{\citet}[1]{#1}% Just for this example
\begin{document}
\begin{table}
  \begin{threeparttable}
    \renewcommand\TPTminimum{\linewidth}
    \captionsetup{font=small}
    \makebox[\linewidth]{\scriptsize%
    \begin{tabular}{cccc}
      \toprule
      \textbf{Parameter} & \textbf{Value}    & \textbf{Unity} & \textbf{Reference/Comment} \\
      \midrule
      $\tau_1$            & $10^{-2}$          & $\text{dia}^{-1}$  & \citet{Spratt} \\
      $\tau_2$            & $10^{-3}$          & $\text{dia}^{-1}$  & $\tau_2 \; < \; \tau_1$ \\
      %some more lines...
      $\lambda$           & $4.16$             & $\text{dia}^{-1}$  & \citet{REF2}\tnote{2} \\
      $a$                 & $2 \times 10^{3}$  & mg               & \citet{REF1}\tnote{1} \\
      $b$                 & $5 \times 10^{6}$  & mg               & \citet{REF1}\tnote{1} \\
      \bottomrule
    \end{tabular}}
    %NOTES:
    \begin{tablenotes}[flushleft]\footnotesize
      \item[1] I want it that way because my table isn't so big and the footnotes are getting weird the original way...
      \item[2] \,Second Note!
    \end{tablenotes}
  \end{threeparttable}
  \caption{Parameters...}
\end{table}
\end{document}

enter image description here

share|improve this answer
    
Extremelly helpful, thank you very much! –  Habsy Dec 27 '13 at 21:26
1  
@Habsy: I've added a booktabs version... –  Werner Dec 27 '13 at 22:00
1  
That just show @egreg's point even more. My solution is usually to make the table wider, and reconsider the note text. –  daleif Dec 27 '13 at 22:08

My take on it. Also consider threeparttablex, among other features, it can globally set the font size for the notes.

I've placed the caption at the top, notes and caption at the bottom just confuse readers. Please don't use \text setting non-text upright in math. It is a unit, and it really ought to be handled like that i.e. (siunitx).

\documentclass{article}
\usepackage{amsmath,threeparttable}
\usepackage[tableposition=top]{caption}
\usepackage{booktabs}
\captionsetup{font=small}
\newcommand{\citet}[1]{#1}% Just for this example
\begin{document}
\begin{table}
  \centering
  \caption{Parameters...}
  \begin{threeparttable}
    \scriptsize
    \begin{tabular}{
        c l c l c l c
      }
      \toprule
      {\textbf{Parameter}} && {\textbf{Value}}
      && {\textbf{Unity}} && {\textbf{Reference/Comment}}
      \\
      \midrule
      $ \tau_1$            && $ 10^{-2}$
      && $\mathrm{dia}^{-1}$  && {\citet{Spratt}}
      \\
      $ \tau_2$            && $ 10^{-3}$
      && $\mathrm{dia}^{-1}$  && $ \tau_2 < \tau_1$
      \\
      % some more lines...
      $ \lambda$           && $ 4.16$
      && $\mathrm{dia}^{-1}$  && {\citet{REF2}\tnote{2}}
      \\
      $ a$                 && $ 2 \times
      10^{3}$  && {mg}               && {\citet{REF1}\tnote{1}}
      \\
      $ b$                 && $ 5 \times
      10^{6}$  && {mg}               && {\citet{REF1}\tnote{1}}
      \\
      \bottomrule
    \end{tabular}
    %NOTES:
    \begin{tablenotes}%[flushleft]
      \footnotesize
      \item[1] I want it that way because my table isn't so big and the footnotes are getting weird the original way...
      \item[2] Second Note!
    \end{tablenotes}
  \end{threeparttable}
\end{table}
\end{document}

(image does not match code 100%)

enter image description here

share|improve this answer

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.