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 am using longtable instead of tabular environment and noticed that it puts some additional whitespace at the top and at the bottom of the table. Is there some way to remove it (something less hacky than \vskip -\baselineskip before the table)?

Small piece of code for illustration:

\documentclass[12pt]{book}
\usepackage{longtable}

\begin{document}

Linelineline

\begin{longtable}{l l} cell1 & cell2 \end{longtable}

Linelineline

\begin{tabular}{l l} cell1 & cell2 \end{tabular}

Linelineline

\end{document}

And that's what I am getting:

tables

Common tabular environment does not have any additional margins, but longtable does.

share|improve this question
add comment

1 Answer 1

up vote 10 down vote accepted

To remove the whitespace before and after a longtable, you may change the lengths \LTpre and \LTpost:

\setlength{\LTpre}{0pt}
\setlength{\LTpost}{0pt}

Their default value is \bigskipamount.

share|improve this answer
    
Just what I needed, thanks. May I also ask what I have to write to get rid of the top and bottom space when using enumerate? –  Leon Lampret Nov 7 '11 at 3:00
add comment

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.