0

I want to align the columns of multiple longtables.

David Carlisle already provided a solution over a decade ago, but it is not working (any longer), if the last table is narrower than the first one.

\documentclass{article}

\usepackage{longtable} \makeatletter \def\dontchopLT{\let\LT@entry@chop\relax} \def\resumeLT{% \let\zzz\stepcounter \def\yyy{LT@tables} \def\stepcounter##1{% \def\xxx{##1}% \ifx\xxx\yyy\else\zzz{##1}\fi}} \makeatother

\begin{document}

{\dontchopLT \begin{longtable}{ll} abcdefghijklmnopqrstuvwxyz & 10 \ 5 & 6 \ \end{longtable}}

{\resumeLT \begin{longtable}{ll} 1 & 2 \ 3 & 4 \ \end{longtable}}

\end{document}

enter image description here

Can someone figure what is wrong?

Pygmalion
  • 6,387
  • 4
  • 34
  • 68
  • If you look at the aux file, \LT@i is being redefined as what would narmally be \LT@ii, except the {1} (chunk number?) is reset to {2}. But the redefinition loses all the information from \LT@i. – John Kormylo Mar 01 '24 at 16:38
  • 1
    actually I'm not sure it ever worked, as @JohnKormylo says I reset the main counter but the chunk counter is out of sync, I may look at that at the weekend. essentially this is a duplicate but no harm in repositing it gives others a chance to answer rather than relying on a comment just to me in the old question. – David Carlisle Mar 01 '24 at 17:17
  • @DavidCarlisle I fear that no one else has the knowledge to solve this problem. Perhaps this could be solved as a request for a new functionality of the package? – Pygmalion Mar 19 '24 at 16:30
  • it can't just be me in 30+years that can do this, you can make a feature request, but my time is limited a feature request in github less likely to get lost than one here, but maybe someone will answer here... – David Carlisle Mar 19 '24 at 18:15
  • @DavidCarlisle OK, I just realised that there is no place to put a feature request as there is no github longtable project. I will just give up. – Pygmalion Mar 26 '24 at 15:15
  • there are two github repositories for longtable the latex3/latex2e repository (as longtable is part of the core tools release) or a more speculative repository under davidcarlisle/dpctex for a possible more radical longtable v5 that may or may not ever happen. – David Carlisle Mar 26 '24 at 15:18
  • @DavidCarlisle Thanks – Pygmalion Mar 28 '24 at 11:26

0 Answers0