1

I have a document with two longtabu tables. The problem is that there's too much vertical space between them (as marked by the red line):

Problematic space between tables

I'd like to reduce this space whilst otherwise preserving the layout. Here's the code:

\documentclass{scrartcl}
\usepackage{longtable}
\usepackage{tabu}
\usepackage{xcolor}
\usepackage{blindtext}
\newlength{\firstcolumn}
\setlength{\firstcolumn}{3.5cm}
\renewcommand*{\familydefault}{\sfdefault}
\begin{document}
\tabulinesep=1.5mm
\begin{longtabu} to
  \textwidth{@{}p{\firstcolumn}X}%
  \textcolor{gray}{\rule{\firstcolumn}{0.15cm}} &
  \textcolor{gray}{\Large\mdseries\upshape Test} \\
  A - B & My first line  \\
  & My second line \\
  D - F & \blindtext \\
\end{longtabu}
\begin{longtabu} to \textwidth{@{}p{\firstcolumn}X}%
  \textcolor{gray}{\rule{\firstcolumn}{0.15cm}} &
  \textcolor{gray}{\Large\mdseries\upshape Test 2} \\
  A - B & My first line  \\
  & My second line \\
  & My third line  \\
  & \blindtext \\ 
\end{longtabu}
\end{document}

2 Answers 2

1

If this is rare cases in your document, the simplest way is put \vskip-1em between tables. This will reduce vertical space for 1em:

  ...
  D - F & \blindtext \\
\end{longtabu}\vskip-1em
\begin{longtabu} to \textwidth{@{}p{\firstcolumn}X}%
  \textcolor{gray}{\rule{\firstcolumn}{0.15cm}} &
  ...
1

the \tabulinesep is used after the last row, too. Use \vspace*:

\documentclass{scrartcl}
\usepackage{longtable}
\usepackage{tabu}
\usepackage{xcolor}
\usepackage{blindtext}
\newlength{\firstcolumn}
\setlength{\firstcolumn}{3.5cm}
\renewcommand*{\familydefault}{\sfdefault}
\raggedbottom
\begin{document}
 \extrarowsep=1.5mm 
    \begin{longtabu} to 
        \textwidth{@{}p{\firstcolumn}X}%
        \textcolor{gray}{\rule{\firstcolumn}{0.15cm}} &
        \textcolor{gray}{\Large\mdseries\upshape Test} \\
        A - B & My first line  \\
        & My second line \\
        D - F & \blindtext 
    \end{longtabu}

\vspace*{\dimexpr-\extrarowdepth-\extrarowheight}
    \begin{longtabu} to \textwidth{@{}p{\firstcolumn}X}%
        \textcolor{gray}{\rule{\firstcolumn}{0.15cm}} &
        \textcolor{gray}{\Large\mdseries\upshape Test 2} \\
        A - B & My first line  \\
        & My second line \\
        & My third line  \\
        & \blindtext 
    \end{longtabu}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .