Hi all, I want to set up an argument which can modify my theorem numbering. Like for a note without sections, I hope the theorem numbering starts with theorem1. On the other hand, if there is a section 1, all the theorems in section 1 should be theorem 1.x.
Right now I'm using the ctheorem package and the theorem numbering depends on the variable base_level. I hope to set the base_level at the beginning of my note. Can anyone help me this?
#Set theorem style numbering
11 messages · Page 1 of 1 (latest)
What about just utilizing an adaptedly defined let thm-indie = thmbox(base: {}) for those independent notes?
Thank you for your advice. This is something I don't wont to do. I hope there is a global variable to control the behavior of all thmboxes. I only need to import the package instead of redefining those environments.
While state()-based behavior would be implementable without much fuss and is utilized by packages like @unreal birch's /codly, this ‘higher order factory’ pattern seems to be the intended way of customization here: https://raw.githubusercontent.com/sahasatvik/typst-theorems/main/manual.pdf#[{"num"%3A8%2C"gen"%3A0}%2C{"name"%3A"XYZ"}%2C70.86625%2C400.4736%2C0]
In terms of deduplication/recyclability, this would allow for even more conciseness in the concrete document, as you would only need to import that one files with your adapting definitions.
*file
Mind you, the state based settings leads to codly being very brittle, and it can cause your document not to converge
As soon as we have custom types, I am changing it to using that
Like imagine doing:
#set codly(languages: (...), zebra-colors: none)
And then:
#[
#set codly(offset: 4);
#raw("...");
]
Would be so much nicer
Thx for your development insights!
Concerning non-convergence: Are you talking about the usual suspect—i.e. updating state context-dependently—or do I miss some aspect adding to said ‘brittleness’?