[Tex/LaTex] Making a longtable that does not interfere with table numbering

floatslongtabletables

I would like to use longtable to make list of abbreviations in the front matter of my thesis. I did not caption it, so it (rightly) does not show up in my list of tables. However, it does throw off the numbering of the rest of the tables — in other words, what should be Table 1 is now captioned and listed in the list of tables as Table 2.

\documentclass{report}
\usepackage{longtable}
\begin{document}
\listoftables

The table I don't want to be numbered:
\begin{longtable}{ll}
\textbf{acac} & acetylacetonate \\
\textbf{Ar} & aryl \\
\end{longtable}

\begin{table}
\begin{center}
\caption{The table that I want to be Table 1}
\begin{tabular}{|c|c|}
\hline
column 1 & column 2 \\ \hline
77 & 43 \\ \hline
\end{tabular}
\end{center}
\end{table} 

\end{document}

What is the best way to prevent this mis-numbering to happen? I considered creating a new float environment for this one case, but that seems inelegant.

Best Answer

After long table add \addtocounter{table}{-1} which will decrement temporery value of counter table:

\documentclass{report}
\usepackage{longtable}
\begin{document}
\listoftables

The table I don't want to be numbered:
\begin{longtable}{ll}
\textbf{acac} & acetylacetonate \\
\textbf{Ar} & aryl \\
\end{longtable}
    \addtocounter{table}{-1}%<-- decrement table counter

\begin{table}
\begin{center}
\caption{The table that I want to be Table 1}
\begin{tabular}{|c|c|}
\hline
column 1 & column 2 \\ \hline
77 & 43 \\ \hline
\end{tabular}
\end{center}
\end{table}

\end{document}
Related Question