Hi,
I have a appendix in my document which contains figures and I wanted them to be numbered like: Fig. A.1, Fig. A.2 etc., where A is from appendix. To achieve that I used:
\appendix
\numberwithin{figure}{section}
\section{Appendix}
but after appendix I have other sections with figures inside and I don't want them to be numbered with section number like: Fig. 1.1, Fig. 1.2 etc. but just Fig 1, Fig. 2. My question is how can I unbind figure and section counters? I'll appreciate any help.
Graphics, Figures & Tables ⇒ How to remove \numberwithn?
How to remove \numberwithn?
Last edited by zwierz on Thu Feb 03, 2011 7:37 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

How to remove \numberwithn?
A minimal working example should always be given. Otherwise, I don't see the problem. The \numberwithin command shouldn't take effect until the appendix -- and at least in the article class, prior to that, you'd just get "Figure 1" and "Figure 2" by default.
However, there are plenty of options. One option would be to load the chngcntr package which defines a pair of commands and (which work just like \numberwithin from amsmath) -- with these you could turn it on and off at will.
Finally you could use to just get "Figure 1" wherever you needed to.
However, there are plenty of options. One option would be to load the chngcntr package which defines a pair of commands
Code: Select all
\counterwithin{figure}{section}
Code: Select all
\counterwithout{figure}{section}
Finally you could use
Code: Select all
\renewcommand{\thefigure}{\arabic{figure}}
Re: How to remove \numberwithn?
Thank U
\renewcommand{\thefigure}{\arabic{figure}} works fine for me. And sorry for the lack of MWE - I just thought that description would be enough in this case.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to remove \numberwithn?
Then please mark the topic (not the last post) accordingly as written in Section 3 of the Board Rules (to be read before posting).
Best regards and welcome to the board
Thorsten
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