18

I want the figures and tables to be numbered 1, 2, 3, ... until the end of the document instead of 1.1, 1.2, ... in chapter I, 2.1, 2.2, ... in chapter II and so on.

I know how to convert the "chapter" part of figure/table numbers from Roman to arabic:

\renewcommand \thefigure
    {\ifnum \c@chapter>\z@ \@arabic\c@chapter.\fi \@arabic\c@figure}
\renewcommand \thetable
    {\ifnum \c@chapter>\z@ \@arabic\c@chapter.\fi \@arabic\c@table}

One could modify the above code in order to remove the "chapter" part, but the figure/table counters would still be reset to 0 at the start of new chapters.

23

Use the chngcntr package for avoiding the counter reset per chapter:

\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}

It's very similar to @lockstep's answer here, and you can do it similarly regarding sections in classes which are not based on chapter, such as here also with LyX: How to control figure numbering in LyX.

  • From now on, this should be used as canonical answer. ;-) – lockstep Sep 10 '11 at 13:24
  • sorry Stefan and Lockstep. my english is so bad (I'm Indonesian, so difficult to find some help about latex in my countri). Your answer is great. :-) – Verly Sep 10 '11 at 13:44
  • Tried this code and worked but it now has for example Figure 1, Figure 2, Table 3. Is there a way that it can output Figure 1, Figure 2, Table 1 or should I ask another question. – gman Oct 18 '14 at 17:20
  • Same comment as under lockstep's linked answer: In a current LaTeX (not older than 2018-04-01), \counterwithout is part of the kernel, so the \usepackage{chngcntr} is not needed any more. See latex-project.org/news/latex2e-news/ltnews28.pdf – moewe Jan 11 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.