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 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?

share|improve this question
1  
You should provide a MWE for this. –  Christian Hupfer Aug 26 at 20:22
    
I have added the preamble –  Miguel de Val-Borro Aug 26 at 20:28
    
You could add the missing length –  Christian Hupfer Aug 26 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 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 at 20:36

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
    
Thanks, that works well for me –  Miguel de Val-Borro Aug 26 at 20:34

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.