0

I have a table with 4 columns like this:

\begin{table}[H]
 \begin{tabular}{l l l l}
    \caption{Test} 
    \resizebox{\textwidth}{!}{%
        \begin{tabular}{l l l l}
            Column Name 1 & \ Column Name 2 & Column Name 3 & Column Name 4 \\
            v1 & \ v1 & v1 & v1 \\
 \end{tabular}}
\end{table}

Now, I want my table to span multiple pages since there are a lot of rows. I have read that I could use the longtable function for this as described here. However, simply exchanging table with longtable (as I had hoped) does not work.

Is there a convenient way to achieve this without changing the code too much?

Thanks!

  • 2
    The syntax should be \begin{longtable}{l l l l} \caption{Test} \\ Column Name 1 & …. In other words, you exchange table with longtable, and remove the tabular environment. You also can add a table head at each new page. – Bernard Jan 14 '21 at 20:59
  • https://tex.stackexchange.com/a/301249/134144 contains an easy to follow step-by-step recipe that might help you to switch from table+tabular to longtable. – leandriis Jan 14 '21 at 21:09

0 Answers0