-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use hborders from the head and the foot when splitting lontblr #493
base: main
Are you sure you want to change the base?
Conversation
…bove the foot to the current page when splitting longtblr.
There is a bugreport for this: #424 |
I tried reducing number of rows required to demonstrate the problem, but only got the first page break of Example: number of rows reduced
\documentclass[a5paper,12pt]{article}
\usepackage[margin=0.5cm, paperheight=10cm]{geometry}
\usepackage{booktabs}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}
\usepackage{paracol}
\usepackage{xtab}
\setlength{\aboverulesep}{10pt}
\setlength{\belowrulesep}{10pt}
\begin{document}
\begin{paracol}{2}
\begin{longtabs}
[
caption = {A Table},
label = {tblr:test},
]{
colspec = {lll},
rowhead = 2,
rowfoot = 1,
rows = {rowsep=0pt},
}
\toprule
Head & Head & Head \\
Head & Head & Head \\
\midrule
Alpha & Beta & Gamma \\
Epsilon & Zeta & Eta \\
Iota & Kappa & Lambda \\
Nu & Xi & Omicron \\
Rho & Sigma & Tau \\
Phi & Chi & Psi \\
Alpha & Beta & Gamma \\
Epsilon & Zeta & Eta \\
Iota & Kappa & Lambda \\
Nu & Xi & Omicron \\
Rho & Sigma & Tau \\
Phi & Chi & Psi \\
\midrule
Foot & Foot & Foot \\
\bottomrule
\end{longtabs}
\switchcolumn
\centering
\topcaption{A Table} \label{tab:xtab}
\tablefirsthead{
\\[-2ex]
\toprule
Head & Head & Head \\
Head & Head & Head \\
\midrule}
\tablehead{\multicolumn{3}{c}{{\tablename\ \thetable: A Table (Continued)}}\\[0.87ex]
\toprule
Head & Head & Head \\
Head & Head & Head \\
\midrule}
\tabletail{\midrule
Foot & Foot & Foot \\
\bottomrule}
\tablelasttail{\midrule
Foot & Foot & Foot \\
\bottomrule}
\begin{xtabular}{lll}
\shrinkheight{-2.9in}
Alpha & Beta & Gamma \\
Epsilon & Zeta & Eta \\
Iota & Kappa & Lambda \\
Nu & Xi & Omicron \\
Rho & Sigma & Tau \\
Phi & Chi & Psi \\
Alpha & Beta & Gamma \\
Epsilon & Zeta & Eta \\
Iota & Kappa & Lambda \\
Nu & Xi & Omicron \\
Rho & Sigma & Tau \\
Phi & Chi & Psi \\
\end{xtabular}
\end{paracol}
\end{document} |
Unfortunately, |
Reducing the number of head rows helps:
|
Hi! It's rather a request for comment than a pull request: Currently, the
longtblr
(andlongtabs
) environment produces inconsistent hborders for hlines separating the head and the foot from the rest of the table when splitting it into pages. I'm attaching an example (a bit exaggerated) to show this.tblr.pdf
What I've tried in this PR, is to copy the hborder (actually, the corresponding abovesep and belowsep since they are the only information left after parsing the table initially) from the first page (for the head) and from the last page (for the foot) to the rest of the pages.
The patch is fairly simple, but may be there is a better way.
Here is the test file (the second column is for comparison with booktabs).