Hi,
I have a table numbered as "4(a)" and I want my next table to be numbered as "4(b)", but the result is "5(a)" instead. Any idea would be appreciate, many thanks!
ZG
Graphics, Figures & Tables ⇒ Reorganize Table Numbering
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Reorganize Table Numbering
There are many possible reasons for this behaviour. I guess you put the second picture into an extra
Best regards
Johannes
{figure}
environment. If this is not the case, please provide a minimal working example. We need to see some code, or everybody would just guess. Best regards
Johannes
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
-
- Posts: 3
- Joined: Mon Oct 21, 2013 2:03 pm
Reorganize Table Numbering
Here is my code. The second table is just named as "Table 5(b)" rather than "Table 4(b)".
Many thanks!
Code: Select all
\begin{table}
\renewcommand{\thetable}{\arabic{table}(a)}
\small
\caption{This is table 4(a)}
\label{t:4(a)}
\begin{tabular}{r|rrrrr|rrrrr}\hline
~ & \multicolumn{5}{c|}{1}& \multicolumn{5}{|c}{2)} \\ \hline
& & & & & & & & & &
\end{tabular}
\end{table}
\begin{table}
\renewcommand{\thetable}{\arabic{table}(b)}
\caption{This is table 4(b).}
\label{t:4(b)}
\begin{tabular}{r|rrrr|rrrr}\hline
~ & \multicolumn{4}{c|}{1)}& \multicolumn{4}{|c}{2)} \\ \hline
& & & & & & & &
\end{tabular}
\end{table}
Many thanks!
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Reorganize Table Numbering
Seems to me as if you want some kind of sub-numbering for floats (tables here). This can be done by the subfloat package.
For details please refer to the package manual. Click on "Open in writeLaTeX" in the head of the above code box to see the output instantly.
Best regards and welcome to the board
Thorsten
Code: Select all
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{caption} % customization of float captions
\usepackage[countmax]{subfloat} % subnumbering of floats
\renewcommand*\thesubfloatfigure{\themainfigure(\alph{subfloatfigure})}
\renewcommand*\thesubfloattable{\themaintable(\alph{subfloattable})}
\begin{document}
\begin{subtables}\label{tabs:dummy}
\begin{table}[!ht]
\caption{Dummy table}
\label{tab:dummy-a}
\centering
\rule{4in}{2.25in} % replace with actual table code
\end{table}
\begin{table}[!ht]
\caption{Dummy table}
\label{tab:dummy-b}
\centering
\rule{4in}{2.25in} % replace with actual table code
\end{table}
\end{subtables}
\end{document}
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10