How to enforce plain theorem numbering with package `theoretic`?

@nleanba

I searched through the documentation of your package, but couldn’t find an answer.

I want to number my math environments (theorems, definitions, etc.) as follows: all math environments should be numbered with a single integer that doesn’t distinguish between environment types, and doesn’t care about sections. For example, if I have a document with the following:

#set heading(numbering: "1.1.1.1")

= abc
#theorem[def]
#definition[ghi]
= jkl
#theorem[mno]

This assigns numbers in the form “1.1”, etc.
But I want it to number the math environments as “Theorem 1. def”, “Definition 2. ghi” and “Theorem 3. mno”. How do I achieve that?

I don’t think this is currently supported, so you’ll have to add the numbers manually. Luckily, this is easily achieved by using counters:

#import "@preview/theoretic:0.3.1"
#show ref: theoretic.show-ref      // this is necessary for references to theorems to work

#set heading(numbering: "1.1.1.1")

#let thmcounter = counter("autothm")

#let theorem(..args) = thmcounter.step() + context theoretic.presets.basic.theorem(number: thmcounter.display("1"), ..args)
#let definition(..args) = thmcounter.step() + context theoretic.presets.basic.definition(number: thmcounter.display("1"), ..args)
// and so on..


= abc
#theorem[def]
#definition[ghi]

= jkl
#theorem[mno]
1 Like

Thanks, that works perfectly!