# Double increment of table counter

I am currently setting up a skeleton for my thesis. I am using the KOMA Script report (scrreprt) documentclass:

\documentclass[titlepage,fonsize=10pt,a4paper,parskip=half,index=totoc,glossaries=totoc,bibliography=totoc,numbers=noenddot,dutch]{scrreprt}


For the captions of all the figures I use:

\usepackage[labelfont=bf,textformat=period]{caption}


For the references I have:

\usepackage[hidelinks]{hyperref}
\usepackage[noabbrev]{cleveref}


And something generates the following problem. The identifiers (Table 9.x et cetera) now are only even numbers: Table 9.2, Table 9.4, et cetera. I played around with moving the tables around, but that does not help. For my tables I use the following format:

\begin{table}[H]
\centering
\begin{tabularx}{\textwidth}{Xlr}
\toprule \textbf{Some column} & \textbf{Second column} & \textbf{Last column} \\
\midrule
Some row & with some & beautiful info \\
\bottomrule
\end{tabularx}
\caption{Very useful information in the table}
\label{tbl:usefultable}
\end{table}


Is this expected behavior or am I doing something wrong? Because I would prefer to just get table identifiers starting from 1 and incrementing by 1.

\documentclass[titlepage,fonsize=10pt,a4paper,parskip=half,index=totoc,glossaries=totoc,bibliography=totoc,numbers=noenddot,dutch]{scrreprt}
\usepackage{ltablex,booktabs,float}
\usepackage[labelfont=bf,textformat=period]{caption}
\usepackage[noabbrev]{cleveref}
\usepackage{blindtext}
\begin{document}

\chapter{Some chapter}
\blindtext
\section{Some section}
\begin{table}[H]
\centering
\begin{tabularx}{\textwidth}{Xlr}
\toprule \textbf{Some column} & \textbf{Second column} & \textbf{Last column} \\
\midrule
Some row & with some & beautiful info \\
\bottomrule
\end{tabularx}
\caption{Very useful information in the table}
\label{tbl:usefultable}
\end{table}
\end{document}

• Please provide a compilable document, not just fragments. Welcome to TeX.SE! From the given 'code' there is no usage of cleveref identifyable – user31729 Feb 13 '17 at 14:48
• @ChristianHupfer I added a compilable document. – Martin Feb 13 '17 at 14:51
• Changed it again, was some testing of myself trying to fix it. – Martin Feb 13 '17 at 14:54

Put the \caption inside the tabularx command here. The ltablex package uses longtable effectively and transforms tabularx accordingly, so \caption should be inside of the tabularx environment.

The same error would occur for longtable itself.

\documentclass[titlepage,fonsize=10pt,a4paper,parskip=half,index=totoc,glossaries=totoc,bibliography=totoc,numbers=noenddot,dutch]{scrreprt}
\usepackage{ltablex,longtable,booktabs,float}
\usepackage[labelfont=bf,textformat=period]{caption}
\usepackage[noabbrev]{cleveref}

\usepackage{blindtext}
\begin{document}

\chapter{Some chapter}
\blindtext
\section{Some section}
\begin{table}[H]
\centering
\begin{tabularx}{\linewidth}{Xlr}
\toprule \textbf{Column one} & \textbf{Column two} & \textbf{Column three} \\
\midrule
Some row & with some & useful content\\
Some row & with some & useful content\\
Some row & with some & useful content\\
Some row & with some & useful content\\
Some row & with some & useful content\\
Some row & with some & useful content\\
\bottomrule
\end{tabularx}
\end{table}

\begin{table}[H]
\centering
\begin{tabularx}{\linewidth}{Xlr}
\toprule \textbf{Column one} & \textbf{Column two} & \textbf{Column three} \\
\midrule
Some row & with some & useful content\\
Some row & with some & useful content\\
Some row & with some & useful content\\
Some row & with some & useful content\\
Some row & with some & useful content\\
Some row & with some & useful content\\
\bottomrule