Problema extraño con `longtabu`

Problema extraño con `longtabu`

Me gustaría compartir con ustedes un ejemplo bastante simple que LaTeX no puede compilar.

Utilizo el longtabuentorno proporcionado por tabuel paquete. Estoy usando comandos de booktabscomo se recomienda en la documentación de tabu.

\documentclass[11pt]{book}
\usepackage[a4paper,showframe]{geometry}

\RequirePackage[latin1]{inputenc}


\usepackage{booktabs}
\usepackage{tabu}
\usepackage{longtable}

\usepackage[english]{babel}

\begin{document}



\begin{footnotesize}

\begin{longtabu} to 0.75\textwidth{cX[L]ll}
% We use commands from 'booktabs' package because it is recommended by 'tabu'.
%
\caption[Short caption for index.]{Long caption to be shown at the top of the first page of the table.\label{tab:label}}
\toprule
Col 1 & Col 2 & Col 3 & Col 4\\
\midrule
\endfirsthead
%
\caption[]{(Cont.) Long caption to be shown at the top of the rest of the table.}
\toprule
Col 1 & Col 2 & Col 3 & Col 4\\
\midrule
\endhead
%
\bottomrule
\endfoot
%
\endlastfoot
% Now the regular content :
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
\bottomrule
\end{longtabu}
\end{footnotesize}

\end{document} 

En el .logarchivo me sale este error:

! Misplaced \noalign.
\toprule ->\noalign 
                    {\ifnum 0=`}\fi \@aboverulesep =\abovetopsep \global \@b...
l.88 \end{longtabu}

I expect to see \noalign only after the \cr of
an alignment. Proceed, and I'll ignore this case.

! Missing } inserted.
<inserted text> 
                }
l.88 \end{longtabu}

I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.

y muchos otros errores similares. Y el compilador no termina. Tengo que obligarlo a parar.

El problema podría estar relacionado con captionlas frases, porque si las borro, el ejemplo se compila y se produce un documento adecuado.

¿Qué me estoy perdiendo? Tal vez sea una pregunta tonta, pero no soy capaz de entender lo que está pasando, así que agradecería mucho su ayuda.

Gracias de antemano.

Respuesta1

Ha olvidado terminar el título con un final de línea \\. longtabuse basa en el código demesa larga(verel manualpágina 1 segundo párrafo), por lo queel manual de mesa largaen realidad es parte de la documentación de longtabu. La necesidad de \\subtítulos está documentada en la página 11 de ese manual.

Una sugerencia: si agregas una línea

\tabulinesep=3pt

delante de la mesa, se obtiene un espacio más agradable. Prueba este:

\documentclass[11pt,a4paper]{book}
\usepackage[a4paper,showframe]{geometry}

\RequirePackage[latin1]{inputenc}


\usepackage{booktabs}
\usepackage{tabu}
\usepackage{longtable}

\usepackage[english]{babel}

\begin{document}
\begin{footnotesize}

\tabulinesep=3pt
\begin{longtabu} to 0.75\textwidth{cX[L]ll}
% We use commands from 'booktabs' package 
% because it is recommended by 'tabu'.
%
\caption[Short caption for index.]{Long caption to be %
shown at the top of the first page %
of the table.\label{tab:label}}\\ % **NB**
\toprule
Col 1 & Col 2 & Col 3 & Col 4\\
\midrule
\endfirsthead
%
\caption[]{(Cont.) Long caption to be shown at %
the top of the rest of the table.}\\  % **NB**
\toprule
Col 1 & Col 2 & Col 3 & Col 4\\
\midrule
\endhead
%
\bottomrule
\endfoot
%
\endlastfoot
% Now the regular content :
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
$\Phi(z)$ &
Description wich is quite long, normally. &
$]0,1[$ &
This is a reference page.
\\
\addlinespace
\bottomrule
\end{longtabu}
\end{footnotesize}

\end{document} 

información relacionada