# Formating captions in longtable tables

I'm typesetting my dissertation using Springer's svmono class. The class defines its own formatting of table and figure captions. I have a couple of multipage tables which I typesetted using longtable package, which has its own \caption command which is different than the one imposed by the class (longtable uses default formatting of the article class). I'm trying to make the caption formating consistent, without success so far.

I had a look at LaTeX Companion, but the only information I found there states that "[with the caption package] it is easy to customize longtable and table captions, keeping the style of captions consistent between those two environments". I don't find it easy.

Any help would be appreciated!

Here is a toy example of what I'm looking for. Link to the class svmonomb



\documentclass{svmonomb}
\usepackage{longtable}

\begin{document}

I would like to have the longtable version \ref{longtable} look like
the normal'' version \ref{table}.

\bigskip

\begin{table}
\centering
\begin{tabular}{rrrrrrrrr}
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1
\end{tabular}
\caption{Caption of the normal \texttt{table} environment.}
\label{table}
\end{table}

\begin{longtable}{rrrrrrrrr}
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\caption{Caption of the \texttt{longtable} environment.}
\label{longtable}
\end{longtable}

\end{document}

-
Could you please create a minimal compilable example. Also, it would be good if you link to classes which are not on CTAN. E.g. svmono seems to live here: springer.com/authors/book+authors?SGWID=0-154102-12-417900-0 – Martin Scharrer Feb 22 '11 at 12:40
Since I'm the author of the caption package I am very interested why you don't find it easy. I always try to improve the documentation, but am dependent on input, especially on what is not comprehensible, so I can change it (hopefully) for the better. – Axel Sommerfeldt Feb 22 '11 at 20:02
@Martin-Scharrer Sorry, you are perfectly right. Because I tempered with the svmono a little bit here is my modified version (bojan.3e.pl/etc/svmonomb.cls). – Michał Feb 23 '11 at 13:22
@Axel, caption's documentation is pretty clear how to create custom \caption commands. The problem is that the captions in the longtable package are different animals than the captions defined in, say, article class. I believe they are kind of \multicolumn commands. I'll try to post a small example in a moment. – Michał Feb 23 '11 at 13:26
Yes, longtable captions are different, and wrapfigure, and many other captions, too. But the caption package patches them all so a single macro is used for the typesetting of the captions, so all should have the same look & feel when using the caption package. – Axel Sommerfeldt Feb 26 '11 at 7:39

One possibility would be using the caption package:

\documentclass{svmonomb}
\usepackage{longtable}
\usepackage[small,bf,singlelinecheck=off]{caption}

\begin{document}

I would like to have the longtable version \ref{longtable} look like
the normal'' version \ref{table}.

\bigskip

\begin{table}
\centering
\begin{tabular}{rrrrrrrrr}
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1
\end{tabular}
\caption{Caption of the normal \texttt{table} environment.}
\label{table}
\end{table}

\begin{longtable}{rrrrrrrrr}
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\caption{Caption of the \texttt{longtable} environment.}
\label{longtable}
\end{longtable}

\end{document}


A different option would be redefining \LT@caption similar to the code of \@makecaption (which can be found inside svmonomb.cls).

-
@Alex, thanks a million! I did not know that your package works that way (perhaps I should have tried first). Anyway, thanks again. – Michał Feb 27 '11 at 12:03