0

Example:

\documentclass[]{article}

\usepackage{hhline,booktabs} \usepackage{tabularx} \usepackage{ltablex}

\begin{document}

\begin{table} \caption{My Table 1} \label{tab:mytable1} \begin{tabularx}{\textwidth}{lXX} \toprule a & b & c \ \midrule 1 & 2 & 3\ \hline \end{tabularx} \end{table}

\begin{table} \caption{My Table 2} \label{tab:mytable2} \begin{tabularx}{\textwidth}{lXX} \toprule d & e & f \ \midrule 4 & 5 & 6\ \hline \end{tabularx} \end{table}

\end{document}

This code result in this:

enter image description here

As you can see, the automatic enumeration does not count correctly here. I guess, it counts both \table and \tabularx.

In this very similar question it is stated that the reason is the ltablex package which should be removed. Well, I need it because some of my tables are really long and need to be spread over several pages.

Is there a way to solve this problem? I require:

  • long tables
  • flexible column widths (the X feature)
  • captions and labels

Thanks in advance.

S-Man
  • 275
  • 1
    the package (unforuately) makes tabularx in to longtables so you have to use longtable-ish syntax, remove the outer table a – David Carlisle Mar 17 '23 at 12:54
  • 1
    Probably xltabular might be what you are up to. It also combines features of both packages: tabularx and longtable meaning you would have access to X-type column with a table continuing on subsequent pages. – Celdor Mar 17 '23 at 13:30

0 Answers0