I want to have a page-filling and -breaking longtable
, so I decided to try xltabular
. Unfortunately xltabular
seems to screw up the booktabs
rules in the normal tabular
environments, see:
\documentclass{article}
\usepackage{booktabs, xltabular}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tabular}
\begin{document}
\begin{tabular}{ccc}
\toprule
col1 & col2 & col3 \\
\midrule
row 2: & more and moooooooooooore & test \\
\bottomrule
\end{tabular}
\end{document}
Not loading xltabular
resolves the issue.
Did I miss some package option or some incompatibilities?
Is there a better package than xltabular
which doesn't break booktabs
?
(I am using TeXLive 2019 and compile with lualatex)
EDIT (by Skillmon)
I reduced the bug to the following MWE (which doesn't make much sense on its own), it looks like booktabs
tries to be smart detecting something, but fails badly.
\documentclass{article}
\usepackage{longtable}
\let\xltabular\relax
\usepackage{booktabs}
\begin{document}
\begin{tabular}{ccc}
\toprule
col1 & col2 & col3 \\
\midrule
row 2: & more and moooooooooooore & test \\
\bottomrule
\end{tabular}
\end{document}
It seems to suffice that longtable
is loaded and \xltabular
is defined (even if it's just \relax
).
booktabs
lines 87 to 91.