TransWikia.com

Theorem numbering - do I need a "dummy" environment in order to use shared counters?

TeX - LaTeX Asked on March 5, 2021

Apologies if this question has been asked before. It seems like it should have been, but I can’t find it.

I am numbers theorems, lemmata, corollaries, etc by subsubsection. At the moment, the commands I’m using in my pre-amble look (for example) like

newtheorem{Definitio}{Definition}[subsubsection]

and

newtheorem{Theorem}{Theorem}[subsubsection].

I want the numbering of definitions and theorems (etc) to take into account both previous definitions and theorems. For example, if I give Definition 4.1.1.1 at the start of a section, the subsequent theorem should be labelled Theorem 4.1.1.2. Similarly, if it were the other way around, I’d want Theorem 4.1.1.1 and then Definition 4.1.1.2.

What is the correct way to do this? In this answer, it says that I need to put something like

newtheorem{Definitio}[thm]{Definition}

where "thm" is an already-existing environment set up with a counter that I want. This makes sense, so then I need to set up the "thm" environment with the correct counter in the first place. How do I set that counter? Setting

newtheorem{Theorem}{Theorem}[subsubsection]

works, but then using that environment results in such theorems being numbered by section. In this situation I can set up a new, alternative theorem environment with

newtheorem{Theore}[Theorem]{Theorem}

and never use the original "theorem" environment, but this seems a little bit weird to set up some kind of "dummy" environment just to get the counter counting what I want. Is there a "proper" way to do this, without setting up an environment which I’ll never use?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP