# How to make equations, figures and theorems use the same numbering scheme

It was asked a while ago how to make equation use the same counter as a theorem for example and one solution was to make the theorem counter use the equation instead by using

\newtheorem{thm}[equation]{Theorem}


Now what if I also want figures to follow the same pattern? Figures use the counter figure and theorem can’t have two counters.

-
This is lockstep again. :-) Please split your question/answer into one question and one answer (self-answers are allowed, although one should normally wait some time to give other users a chance to answer). BTW, I have a (hopefully) better solution. – lockstep Apr 19 '11 at 20:29

Adding \addtocounter{equation}{1} before every figure environment is cumbersome and error-prone. Assuming you have succeeded in connecting theorem counters to the equation counter, here's how to make equations and figures share a counter (add this to your preamble):

\makeatletter
\let\c@equation\c@figure
\makeatother

-

Note: The OP provided an answer to his own question as part of the question. I cut and pasted his text into a separate answer.

After some digging I found a (not so satisfactory) solution: put this in a preamble to the document

\renewcommand{\thefigure}{\arabic{chapter}.\arabic{equation}}


and whenever you have a figure, just before the \begin{figure}, put the following:

\addtocounter{equation}{1}


Funny enough moving the above command (which increments the equation counter) inside the \renewcommand above doesn’t work! All figures will remain with the same number... :/

-