I want to add the longtabu caption bottom of the table. I know this is not good. But I was told to do so. When I do it as in the code sample, the caption comes too close to the table. But after the caption there is a big vertical space.

I have used \captionsetup[longtable]{skip=10pt} as well. It doesn't help.

\documentclass[a4paper,12pt, oneside]{book}

%tweek font spacing for better look

%enable linespacing commands%

%enable H option that prevent figure floats

%used to import graphics%

%used for referencing%

%customise chapter styles%

%set margins%

%allows to create tables with different column widths%

%allows to create tables that can span across pages%
\usepackage{longtable}%dependency of longtabu (bug fix patch applied)
\usepackage{tabu}%contains longtabu

%enable table row colors
\usepackage{color, colortbl}

%enable listing customizations

%enable pyglist code blocks

%enables itemize space customization options

%enable caption customizations ie:\captionsetup












%keep only the page number%

%set onehalf line spacing

%customise chapter styles from titlesec%

%set bibliography listing style to agsm%

%monospace font in listing



%%%%%%%%%%%%%%%% Table Start %%%%%%%%%%%%%%%%%%%%
\begin{longtabu} to \textwidth { |>{\columncolor{gray}}X[1, l] | X[4 , l ]| }
%%%%%%%%%%%%%%%% Heading Start %%%%%%%%%%%%%%%%%%
%Next page headings
%Before page break text
%\multicolumn{2}{r}{Continued on next page} \\
\caption[xxxx xxx xxx xxx xxxx xxxxxxx xxxxx xxxx xxxxx]
{xxxx xxx xxx xxx xxxx xxxxxxx xxxxx xxxx xxxxx}
%%%%%%%%%%%%%%%% Heading End %%%%%%%%%%%%%%%%%%
& xxxx xxx xxx xxx xxxx xxxxxxx x xxx xxxx xxxxxxx xxxxx xxxx xxx xxxxx xxxx xxxxx \\
& xxxx xxx xxx xxx xxxx xxxxxxx x xxx xxxx xxxxxxx xxxxx xxxx xxx xxxxx xxxx xxxxx \\
%%%%%%%%%%%%%%%%% Body End %%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%% Table End %%%%%%%%%%%%%%%%%%%%
xxxxx xxxx xxxx xxxxx xxxx xxxxx xxxx xxxx

  • 1
    I strongly recommend not using tabu. Its author has promised backwards-incompatible changes and refuses to fix serious bugs in the current version in the meantime. – cfr Apr 21 '15 at 1:29
  • @cfr what alternative do you suggest to achieve the same longtabu behaviour? – Makmeksam Apr 21 '15 at 8:37
  • 2
    If you want a table that breaks across pages, you should try ltablex, which combines longtable and tabularx. – Bernard Apr 21 '15 at 9:25
  • @Bernard longtabu had even more issues such as tex.stackexchange.com/questions/235418/…. Will ltablex fix them too? – Makmeksam Apr 21 '15 at 10:57
  • 1
    If the problem is going under the bottom margin, any table environment will brea cells across pages, as far as I know, so it's up to you to adapt the contents of rows. For instance, you can replace a multined row with two row without an \hline in between. – Bernard Apr 21 '15 at 11:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.