this is my first post, so don't tear me up if my MWE isn't correct.
Moreover, I'm not a native speaker, so my english might sound a bit strange sometime.
I use mainly tabularx tables in my Latex-File but I tried to use the longtable environment once today. I wouldn't need it, because the table is only 1/5 of a page but this is more of a training thing to get used to the different latex-tables, so I know how to use them, when I need to.
The problem: tabularx-tables increase the tablecount +1 (normal behavior) but longtable-tables increase the count +2. That means if I create a document with 1. tabularx 2. longtable 3. tabularx, they will be automatically numbered in the captions like that: Tab. 1 - Tab. 2 - Tab. 4.
At the moment, I counter this behavior by inserting a " {\addtocounter{table}{-1}} " at the end of every longtable, but this can't be the right thing.
Here's my MWE, i hope it fits the convetions
Code: Select all
\documentclass[11pt,a4paper,oneside]{article}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{longtable}
\begin{document}
\begin{table}[htbp]
\caption{Add caption}
\begin{tabularx}{\textwidth}{cccc}
\toprule
\bottomrule
\end{tabularx}
\label{tab:addlabel}
\end{table}
\begin{table}[htbp]
\caption{Add caption}
\begin{longtable}{cccc}
\toprule
\midrule
\bottomrule
\end{longtable}
\label{x}
\end{table}
\begin{table}[htbp]
\caption{Add caption}
\begin{tabularx}{\textwidth}{cccc}
\toprule
\bottomrule
\end{tabularx}
\label{tab:addlabel}
\end{table}
\end{document}