davidcarlisle / dpctex

Assorted TeX packages
93 stars 30 forks source link

Get two longtables with the same width #14

Open maieul opened 6 years ago

maieul commented 6 years ago

On https://tex.stackexchange.com/questions/63535/align-columns-in-multiple-tables/63544#63544 you show us a solution to get two longtables with the same width.

  1. Should it be possible to include this feature directly in longtable.
  2. Should it be possible to make it compatible with arydshln?

For the point 2, cf this problematic MWE.

\documentclass[]{article}
\usepackage[margin=0.5cm,landscape,a4paper]{geometry}
\usepackage{longtable}

\usepackage{arydshln}
\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}
\centering

{\dontchopLT
\begin{longtable}{|c|c*{26}{|c}|}
  \hline
  ms&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s\\
  \hline
\end{longtable}}

{\resumeLT
\begin{longtable}{|c|c*{26}{|c}|}
  \hline
  ms&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s&s\\
  \hline
\end{longtable}}

\end{document}
davidcarlisle commented 6 years ago

Thanks I'll add to the (growing!) list of feature requests.

David