# Using threeparttable with mn2e class

I would like to use the threeparttable package to include table footnotes in an article that uses the mn2e class. I have used this code from the threeparttable documentation:

\documentclass{mn2e}

\usepackage{threeparttable}

\begin{document}

\begin{table}
\begin{threeparttable}[b]
\caption{...}
\begin{tabular}{cc}
42\tnote{1}& \\
\end{tabular}
\begin{tablenotes}
\item [1] the first note
\end{tablenotes}
\end{threeparttable}
\end{table}

\end{document}


I get the error message below because abovecaptionskip is not defined

! Undefined control sequence.
\Hy@tempa ...l \TPT@gatherlabel \abovecaptionskip
\z@skip \else \TPT@docapt ...


Is it possible to use the threeparttable package with mn2e class?

-
You should provide a MWE for this. –  Christian Hupfer Aug 26 '14 at 20:22
I have added the preamble –  Miguel de Val-Borro Aug 26 '14 at 20:28
You could add the missing length –  Christian Hupfer Aug 26 '14 at 20:29
Is there a documentation of this class. Obviously the author(s) do not want to have captions above tables? –  Christian Hupfer Aug 26 '14 at 20:34
The documentation is at tex.ac.uk/tex-archive/macros/latex/contrib/mnras/mn2eguide.pdf (captions are above table) –  Miguel de Val-Borro Aug 26 '14 at 20:36

Adding the missing length helps. I used the standard value from scrbook class. (it uses the value 10\p@, so \makeatletter...\makeatother pair is needed). It could be changed to any other length of course.

Obviously the class mn2e does not provide this length.

\documentclass{mn2e}

\makeatletter
\newlength{\abovecaptionskip}%
\setlength{\abovecaptionskip}{10\p@}
\makeatother
\usepackage{threeparttable}%

%\usepackage{caption}

\begin{document}

\begin{table}
\begin{threeparttable}[b]
\caption{...}
\begin{tabular}{cc}%
42\tnote{1}& \\
\end{tabular}
\begin{tablenotes}
\item [1] the first note
\end{tablenotes}
\end{threeparttable}
\end{table}

\end{document}%


## some explanation

From threeparttable.sty:

% Note that the \caption formatting is not adjusted by threeparttable. % You should use one of the caption-control packages to get captions % that work well as table titles. In truth, threeparttable sets % \abovecaptionskip to zero for captions above the table, but more % complete changes are called for.

The package does set \abovecaptionskip to zero, but obviously does not test if this length is defined at all. So, it is a double failure... mn2e does not define the length and threeparttable ungraciously assume, it's available.

-
Thanks, that works well for me –  Miguel de Val-Borro Aug 26 '14 at 20:34