# Latex: Running table number

There are several tables in my paper, out of which one table is very long and need to be place on landscape page. This is my Table.4 and I want to put it on the last page. For that I used \setcounter command to caption it as a Table.4, but how can I arrange previous tables? In my text Table.5 becomes Table.4 etc.

-
\stepcounter{table} ? –  Axel Sommerfeldt Jan 11 '13 at 8:19

You can step the table counter and store the current table value by defining a new command using \edef. This way you ensure that your moved table has the correct number no matter what the other tables are.

\documentclass{article}

\begin{document}

\begin{table}[p]
\centering
\begin{tabular}{c}
TABLE
\end{tabular}
\caption{ONE}
\end{table}

\begin{table}[p]
\centering
\begin{tabular}{c}
TABLE
\end{tabular}
\caption{TWO}
\end{table}

\begin{table}[p]
\centering
\begin{tabular}{c}
TABLE
\end{tabular}
\caption{THREE}
\end{table}

% reserve "FOUR"
\stepcounter{table}
\edef\mysavedtablenumber{\thetable}

\begin{table}[p]
\centering
\begin{tabular}{c}
TABLE
\end{tabular}
\caption{FIVE}
\end{table}

\begin{table}[p]
\centering
\begin{tabular}{c}
TABLE
\end{tabular}
\caption{SIX}
\end{table}

% use "FOUR"
\begin{table}[p]
\def\thetable{\mysavedtablenumber}
\centering
\begin{tabular}{c}
TABLE
\end{tabular}
\caption{FOUR}
\end{table}

\end{document}


However, I would like to remark that this is in my opinion not a good idea. People will search Table.4 between Table.3 and Table.5 and they will be confused by the table not being there. I recommend you to put the table into appendix and number it as Table.A.1 for instance.

-