I know that my question below may be similar like this one, nevertheless I kindly ask you for your patience, as I am using some different tabular environments.
The appendix of my document based on the Springer class svjour3
is full of tables, which need proper caption, label and floating. After some experiments with different column types and environments, I came to the point that the setup in MWE below is working well for the table style. However, I face the issue of wrong increment in table numbering - every table seems to consume 2 counting steps instead of one.
What is going wrong here and how can the table definition be improved? Thank you in advance!
\RequirePackage{fix-cm}
\documentclass[smallextended]{svjour3}
\smartqed
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{tabularx}
\usepackage{multicol}
\usepackage{array}
\usepackage{booktabs}
\usepackage{footnote}
\usepackage{multirow}
\usepackage{ltablex}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\renewcommand\tabularxcolumn[1]{L{#1}}
\keepXColumns
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}
\begin{document}
\section{Normal section}
This is a standard main text.
\appendix
\setcounter{table}{0}
\renewcommand{\thetable}{\Alph{section}.\arabic{table}}
\section{Appendix Section 1}
\begin{table}[htb]
\caption{Appendix Table 1}
\label{tab:AppTable1}
\begin{tabularx}{\linewidth}{@{}L{2.5cm}|X@{}}
\toprule
\textbf{Col1} & \textbf{Col2} \\\midrule
a & b \\
\midrule
c & d \\
\bottomrule
\end{tabularx}
\end{table}
\begin{table}[htb]
\caption{Appendix Table 2}
\label{tab:AppTable2}
\begin{tabularx}{\linewidth}{@{}L{2.5cm}|X@{}}
\toprule
\textbf{Col1} & \textbf{Col2} \\\midrule
a & b \\
\midrule
c & d \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}
ltablex
package. For a suggestion on how to get rid of this issue, you might want to take a look at: tex.stackexchange.com/a/375104/134144. Personally, I'd suggest replacing theltablex
package withxltabular
, while also replacing alltabularx
envrironments that are supposed to stretch across multiple pages with thexltabular
environment.booktabs
package were designed to be used without vertical lines, hence the small gaps around all the intersections, that you can see in your output.