Generallongtable vs. nice captions

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
k.m.
Posts: 3
Joined: Fri Mar 28, 2008 11:10 am

longtable vs. nice captions

Post by k.m. »

Hi,
I've a problem with the caption in longtable environment...

The caption in longtable are embedded in a different way than in other table environments. Now, the problem is that in longtables the caption is above the table with ~one line spacing between the caption and the actual table which does not appear in the "normal" table environments where the caption is directly above the table...

Here is the starting code for my longtable...
\begin{longtable}{ll.}
\caption{bla jkag} \\
\toprule
1 & 2 & 3 \\\midrule
\endfirsthead

\caption{(...continued)}\\\toprule
1 & 2 & 3 \\\midrule
\endhead

\multicolumn{3}{r}{{...}continues on next page} \\
\endfoot

\endlastfoot

4 & 5 & 6\\*

.......................................and so on...............


I tried for two days now to trick Latex into another format but so far Latex won and kept on showing the space...

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Re: longtable vs. nice captions

Post by sommerfee »

The space between longtable caption and contents is hard coded into the longtable package. So you need to utilize a package which patches this (like the caption package for example), or you need to patch the \LT@makecaption command (the command inside the longtable which is responsible for typesetting the caption) on your own.
k.m.
Posts: 3
Joined: Fri Mar 28, 2008 11:10 am

Re: longtable vs. nice captions

Post by k.m. »

Thanks again :) I just figured that you're the same guy I'm discussing with in the other forum in german :) so no need to expand it ...

So I will just go back to the other one in german as it is more convinient anyway
Post Reply