I have a document with two tables. I want my second table to be Table 1 both in List of Tables and caption.
\documentclass{article}
\usepackage{tabu}
\usepackage{longtable}
\begin{document}
\begin{longtabu}{|l|l|}
\hline
1 & 2\\
\hline
%\caption{my table}
\end{longtabu}
\begin{longtabu}{|l|l|}
\hline
1 & 2\\
\hline
\caption{my table}
\end{longtabu}
\end{document}
Resetting the counter does not solve my problem because my content is dynamic and I cannot exclude having a small table inside my first table. And I may want this small table to be numbered. So I just want to tell the compiler to ignore some tables.
Best Answer
A 'dirty' workaround: Use a wrapper environment named
Longtabu
having the same parameters and say\addtocounter{table}{-1}
in the environment end code, in conjunction with\caption*{}
, which does not make an entry to the LoT.Small drawback
A better setup would test, if the figure number is already larger than 0, otherwise this could lead to bad counter values ;-)