Marmare314 / lemmify

A library for typesetting mathematical theorems in typst.
GNU General Public License v3.0
11 stars 7 forks source link

Split the codebase into "core" and "defaults" #23

Open marc-thieme opened 4 months ago

marc-thieme commented 4 months ago

When I diving into the codebase, I feel like I had a hard time distinguishing between code which belonged to "lemmify-core" and code which was already given sane defaults.

In this package, I would put the translations.typ, default-theorems in lib.typ, all of the styles.typ.

The reason I think this would have helped me is because I could basically skip all the aforementioned stuff when it comes to understanding the code. Or at least, I could search for it decidedly when I was looking for examples of how to define a style or theorem-kind.

Marmare314 commented 4 months ago

As you have mentioned, there really are two features of this package. One is adding more numbering features to typst (ie numbering depending on headings, other theorems, ...) and the other is providing default styles, numbering patterns etc for theorems. Right now lemmify is really not great at either and they are quite entangled (even in the refactor). I would love to separate them, but I'm not quite sure how to do that yet. There is already a package concerning the numbering i-figured, and there has been discussions on integrating that into typst natively. Unfortunately it looks like the native support might still take some time. I'm not sure if it would be possible to depend on i-figured for numberings.