How can I make a common numbering for my figures and tables?
For instance, I want to obtain in Section 1 something like: Table 1.1, Figure 1.2, Table 1.3, Table 1.4, Figure 1.5
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityHow can I make a common numbering for my figures and tables?
For instance, I want to obtain in Section 1 something like: Table 1.1, Figure 1.2, Table 1.3, Table 1.4, Figure 1.5
You could make the figure and table environments use the same counter simply by
\let\c@figure\c@table
But if you do that, they are still independent float types so they can float past each other resulting in the floats being numbered in arbitrary order, eg
\documentclass{article}
\makeatletter
\let\c@figure\c@table
\makeatother
\begin{document}
\begin{table}[p]
\centering
\caption{ttttt}
\end{table}
zzzzz
\begin{figure}[t]
\centering
ffff
\caption{ffff}
\end{figure}
\end{document}
If you add
\let\ftype@figure\ftype@table
Then the figure environment will use the same float sequence as tables, so be kept in sequence.
That may be enough, however the figures and tables will be listed separately showing "gaps" in the numbering as here:
\listoffigures
\listoftables
So you may prefer to use a combined list in \listoftables
by using
\makeatletter
\let\c@figure\c@table
\let\ftype@figure\ftype@table
\let\ext@figure\ext@table
\renewcommand\listtablename{List of Tables and Figures}
\makeatother
\makeatletter\let\c@figure\c@table\makeatother