TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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

share|improve this question
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):

share|improve this answer

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


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


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... :/

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.