# Consecutive caption numbers without chngcntr?

As many before me I need consecutive caption numbers for figures and tables instead of chapter-based numbers like Figure 1.2. I use scrreprt and the caption-package for my document. I also need roman table numbers and achieved it by changing the caption label format like this:

\DeclareCaptionLabelFormat{table}{#1~#2}
\captionsetup[table]{labelformat=table}
\renewcommand\thetable{\Roman{table}}


Since they start again with Table I for every chapter looking very oddly in the list of tables I tried the chngcntr-package. It solved the numbers of figures nicely but it overrides the roman numbers. What can I do?

-
thx, your speed is awesome. :) I chose the second alternative because I tried different places for the chngcntr-package before I posted the question without any change in result. And now it works great. –  fortunecookies Feb 11 '13 at 17:09

There are two alternatives. The first possibility is

\usepackage{chngcntr}
\counterwithout{table}{chapter}
\renewcommand{\thetable}{\Roman{table}}


that I consider clearer. The second is

\usepackage{chngcntr}
\renewcommand{\thetable}{\Roman{table}}
\counterwithout*{table}{chapter}


which is slightly more efficient (maybe some nanoseconds faster).

The difference is that the *-version of \counterwithout doesn't change the definition of \thetable, while the plain \counterwithout applies the default definition with \arabic.

-

Since you load the caption package anyway you could load it with either within=none (to get figure and table numbering consecutive) or tablewithin=none (to get table numbering consecutive only), e.g.

\documentclass{scrreprt}
\usepackage[within=none]{caption}
\renewcommand\thetable{\Roman{table}}
\begin{document}
\chapter{A}
\begin{table}
\caption{A}
\end{table}
\chapter{B}
\begin{table}
\caption{B}
\end{table}
\end{document}


This way you need no extra package and don't need to fiddle around with chngcntr-hyperref load order.

-
that works, too. thanks. with that many possibilities it looks like I didn't try to solve it by myself.. I really did but I didn't find the within-option. ;) –  fortunecookies Feb 11 '13 at 19:26