I want to exend the line in xltabular
to cover as well the definitons of @{}
. For this question I found a solution with the optional parameter (lr)
which is more or less documented in the booktabs
documentation under Booktabs and longtables
. But somehow the fix doesn't work if the rule
is followed by a line which spans over the whole table width.
\documentclass[a4paper,11pt]{article}
\usepackage[margin=2.5cm]{geometry}
\usepackage[shorthands=off, bidi=basic, english, ngerman]{babel}%
\usepackage[table]{xcolor}
\usepackage{booktabs}
\aboverulesep=0pt
\belowrulesep=0pt
\cmidrulekern=-\tabcolsep
\usepackage{xltabular} % for tables with long lines & long tables (over >1 page)
\usepackage{luacolor,lua-ul} %for usage of style attributes - background color
\begin{document}
\begin{xltabular}{\textwidth}{@{} X X X @{}}
\cmidrule[1pt](lr){1-3}
\rowcolor[HTML]{b96ad9}
\textbf{Firstname} &
\textbf{Lastname} &
\textbf{Age} \\
\bottomrule(lr)
\cellcolor[HTML]{b96ad9}Jill &
Smith &
50 \\
\midrule(lr)
Eve &
\cellcolor[HTML]{b96ad9}Jackson &
94 \\
\midrule(lr)
\end{xltabular}
\begin{xltabular}{\textwidth}{@{} X X @{}}
% \midrule(lr) %<-------------------------- failure: Misplaced \omit. \end{xltabular}
\multicolumn{2}{@{}>{\hsize=\dimexpr2\hsize+2\tabcolsep\relax} X @{}}{
span over multiple rows with long text to fill in to cover the distance} \\
column 1 & column2 \\
\end{xltabular}
\begin{xltabular}{\textwidth}{@{} X X X @{}}
% \midrule(lr) %<-------------------------- failure: Misplaced \noalign. \end{xltabular}
\rowcolor[HTML]{b96ad9}
\textbf{Firstname} &
\textbf{Lastname} &
\textbf{Age} \\
\end{xltabular}
\end{document}
Is there a way to fix both of the errors?