6

I have a wide table that doesn't fit in one page so I split the table in 2. The problem is that I need to keep almost the same caption (the second one has to add the word Continued to the caption) and exactly the same table number on both tables. I tried labelling both tables the same but it didn't work.

Any idea how to do this?

These are my tables.

\begin {table}[H]
\begin{center}
\captionsetup{font={large}}
   \caption{Duración de procesamiento del método entero (Carga, Pre-procesamiento, Procesamiento). Tiempos en segundos. Paralelizado con OpenMP.}
   \label{cuadroMetodo}
\tabcolsep=0.003cm
  \begin{tabular}{| >{\small}C{2.5cm} >{\small}C{2.5cm} >{\small}C{2.5cm} >{\small}C{2.5cm} >{\small}C{2.5cm} >{\small}C{2.5cm} >{\small}C{2.5cm}|}
    \hline
    Tamaño Imagen (en píxeles) & 1 hilo (promedio de 5 corridas) & 2 hilos (promedio de 5 corridas) & 4 hilos (promedio de 5 corridas) & 6 hilos (promedio de 5 corridas) & 8 hilos (promedio de 5 corridas) & 10 hilos (promedio de 5 corridas) \\ \hline
    50 x 50 & 0.968 & 0.577 & 0.434 & 0.332 & 0.287 & 0.36 \\ \hline
    100 x 100 & 4.31 & 2.232 & 1.253 & 0.927 & 0.75 & 0.922 \\ \hline
    200 x 200 & 18.93 & 9.655 & 5.159 & 3.553 & 2.701 & 3.243 \\ \hline
    500 x 500 & 128.809 & 64.267 & 33.142 & 23.219 & 17.106 & 20.649 \\ \hline
    1000 x 1000 & 519.442 & 262.823 & 137.123 & 93.391 & 69.318 & 82.22 \\ \hline
    2000 x 2000 & 2118.952 & 1071.719 & 541.691 & 376.155 & 278.819 & 331.238 \\ \hline
    5000 x 5000 & 13404.611 & 6677.812 & 3392.367 & 2368.776 & 1754.587 & 2078.983 \\ \hline
    10000 x 10000 & 53261.461 & 26872.99 & 13591.092 & 9433.897 & 7022.0824 & 8115.5902 \\
    \hline
   \end{tabular}
\end{center}
\end {table}

\begin {table}[H]
\begin{center}
\captionsetup{font={large}}
\caption{Duración de procesamiento del método entero (Carga, Pre-procesamiento, Procesamiento). Tiempos en segundos. Paralelizado con OpenMP. (Continuación)}
   \label{cuadroMetodo}
\tabcolsep=0.006cm
  \begin{tabular}{| >{\small}C{2.5cm} >{\small}C{2.5cm} >{\small}C{2.5cm} >{\small}C{2.5cm} >{\small}C{2.5cm} >{\small}C{2.5cm}|}
    \hline
    Tamaño Imagen (en píxeles) & 12 hilos (promedio de 5 corridas) & 14 hilos (promedio de 5 corridas) & 16 hilos (promedio de 5 corridas) & 18 hilos (promedio de 5 corridas) & 20 hilos (promedio de 5 corridas) \\ \hline
    50 x 50 & 0.375 & 0.3 & 0.316 & 0.356 & 0.388\\ \hline
    100 x 100 & 0.807 & 0.791 & 0.772 & 0.822 & 0.865\\ \hline
    200 x 200 & 2.927 & 2.823 & 2.726 & 2.727 & 2.86\\ \hline
    500 x 500 & 17.895 & 17.195 & 16.667 & 16.759 & 16.782\\ \hline
    1000 x 1000 & 73.805 & 69.338 & 66.73 & 67.28 & 67.02\\ \hline
    2000 x 2000 & 293.657 & 281.142 & 268.252 & 270.269 & 268.739\\ \hline
    5000 x 5000 & 1872.82 & 1746.592 & 1683.274 & 1685.559 & 1689.839\\ \hline
    10000 x 10000 & 7360.177 & 6945.76 & 6742.854 & 6740.288 & 6757.892\\
    \hline
   \end{tabular}
\end{center}
\end {table}

3 Answers 3

14
% arara: pdflatex
% arara: pdflatex

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{microtype}
\usepackage[spanish]{babel}
\usepackage{float}
\usepackage{caption}
\usepackage{booktabs}
\usepackage{blindtext}
\usepackage{siunitx}
\usepackage{amssymb}

\begin{document}
\listoftables
\section{cualquier cosa}
\blindtext
\begin{table}[H]
    \centering
    \caption[Duración de procesamiento del método entero]{Duración de procesamiento del método entero (Carga, Pre-proce"-sa"-mien"-to, Procesamiento). Tiempos en segundos. Paralelizado con OpenMP. Promedio de $5$ corridas}
    \label{cuadroMetodo}
    \small
    \begin{tabular}{%
    c
    S[table-format=5.3, group-four-digits=true]
    S[table-format=5.3, group-four-digits=true]
    S[table-format=5.3, group-four-digits=true]
    S[table-format=4.3]
    S[table-format=4.4]
    S[table-format=4.4]}
    \toprule
    {Tam.\ imagen (px)} & {$1$ hilo} & {$2$ hilos} & {$4$ hilos} & {$6$ hilos} & {$8$ hilos} & {$10$ hilos} \\ 
    \midrule
    $50 \times 50$ & 0.968 & 0.577 & 0.434 & 0.332 & 0.287 & 0.36 \\ 
    $100 \times 100$ & 4.31 & 2.232 & 1.253 & 0.927 & 0.75 & 0.922 \\ 
    $200 \times 200$ & 18.93 & 9.655 & 5.159 & 3.553 & 2.701 & 3.243 \\ 
    $500 \times 500$ & 128.809 & 64.267 & 33.142 & 23.219 & 17.106 & 20.649 \\ 
    $1000 \times 1000$ & 519.442 & 262.823 & 137.123 & 93.391 & 69.318 & 82.22 \\ 
    $2000 \times 2000$ & 2118.952 & 1071.719 & 541.691 & 376.155 & 278.819 & 331.238 \\ 
    $5000 \times 5000$ & 13404.611 & 6677.812 & 3392.367 & 2368.776 & 1754.587 & 2078.983 \\ 
    $10000 \times 10000$ & 53261.461 & 26872.99 & 13591.092 & 9433.897 & 7022.0824 & 8115.5902 \\
    \bottomrule
    \end{tabular}
\end{table}
\addtocounter{table}{-1}
\begin{table}[H]
    \centering
    \captionsetup{list=no}
    \caption{Duración de procesamiento del método entero (Carga, Pre-proce"-sa"-mien"-to, Procesamiento). Tiempos en segundos. Paralelizado con OpenMP. Promedio de $5$ corridas (\emph{Continuación})}
    \small
    \begin{tabular}{%
    c
    S[table-format=4.3]
    S[table-format=4.3]
    S[table-format=4.3]
    S[table-format=4.3]
    S[table-format=4.3]}
    \toprule
    {Tamaño imagen (px)} & {$12$ hilos} & {$14$ hilos} & {$16$ hilos} & {$18$ hilos} & {$20$ hilos} \\ 
    \midrule
    $50 \times 50$ & 0.375 & 0.3 & 0.316 & 0.356 & 0.388 \\ 
    $100 \times 100$ & 0.807 & 0.791 & 0.772 & 0.822 & 0.865 \\ 
    $200 \times 200$ & 2.927 & 2.823 & 2.726 & 2.727 & 2.86 \\ 
    $500 \times 500$ & 17.895 & 17.195 & 16.667 & 16.759 & 16.782 \\ 
    $1000 \times 1000$ & 73.805 & 69.338 & 66.73 & 67.28 & 67.02 \\ 
    $2000 \times 2000$ & 293.657 & 281.142 & 268.252 & 270.269 & 268.739 \\ 
    $5000 \times 5000$ & 1872.82 & 1746.592 & 1683.274 & 1685.559 & 1689.839 \\ 
    $10000 \times 10000$ & 7360.177 & 6945.76 & 6742.854 & 6740.288 & 6757.892 \\
    \bottomrule
   \end{tabular}
\end{table}
\blindtext
\end{document}

enter image description here

4
  • 2
    For the sake of good typography, I think the ` x ` strings in the first column should be replaced with $\times$.
    – Mico
    Oct 24, 2014 at 18:54
  • @Mico oh, yes! Absolutely. Changed that.
    – LaRiFaRi
    Oct 24, 2014 at 19:13
  • Why using \addtocounter{table}{-1} when the caption package (which is used here anyway) offers \ContinuedFloat?
    – user2574
    Oct 14, 2016 at 9:37
  • @user2574: ContinuedFloat did not work for me (error with control sequence) but this one did.
    – Long
    Aug 28, 2022 at 12:34
0

You have to use longtable package. It's desined for long tables which are too long for one page. It automaticaly split table into several, manage captions and so on.

Here is example: exusers.sdsc.edu/~ssmallen/latex/longtable.htmlample:

EDIT: In order to keep the number of your table the same as previous, you can simply add \addtocounter{table}{-1} after first table and before second one. It should help you.

4
  • But, if I understand correctly, longtable will split a table that is too long not too wide. The problem with my table is that it is too wide.
    – Atirag
    Sep 25, 2014 at 3:11
  • 1
    Then, maybe you will just add \addtocounter{table}{-1} before second table? This will make the number of your table the same. Sep 25, 2014 at 3:14
  • Well that was simple. It worked! Thank you very much!
    – Atirag
    Sep 25, 2014 at 3:30
  • You should edit the body of your answer and build it around the suggestion currently contained in the follow-up comment.
    – Mico
    Sep 25, 2014 at 5:38
0

Since the (sub)Tables will be on the same page or anyway follow one another , I would not repeat the caption.... I did so:

 \begin{table}[]
 \centering
 \caption{My caption}
 \label{my-label}
 \begin{tabular}{lllllll}
  Title  &        &      &      &      &      &  \\
         &        &      &      &      &      &  \\
         &        &      &      &      &      &  \\
         &        &      &      &      &      &  \\
         &        &      &      &      &      &  \\
 \end{tabular}
 \end{table}

 \begin{table}[] %second part
 \centering
 \begin{tabular}{lllllll}
  Title (continued)  &        &      &      &      &      &  \\
         &        &      &      &      &      &  \\
         &        &      &      &      &      &  \\
         &        &      &      &      &      &  \\
         &        &      &      &      &      &  \\
 \end{tabular}
 \end{table}

So you only have one caption and one label.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .