Marmare314 / lemmify

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

Definition not working #18

Closed porcaror closed 7 months ago

porcaror commented 7 months ago

Hi. I'm trying to use a definion as:

definition(name: "Elemento invertibile")[Dato un insieme numerico $A$ (con $A = ZZ$ o $A = QQ$ o $A = RR$ o $A = CC$), si dice che un elemento $x in A$, con $x eq.not 0$ è invertibile (o anche che è una unità) se $exists y in A$ tale che $x y = y x = 1$. Tale elemento $y$ si denota con $x^(-1)$ e si dice inverso di $x$.]

but I have the following error message: irriducibilita.typ|120 col 1| error: unknown variable: definition

I tried to add definition also to

let (

theorem, lemma, corollary, remark, proposition, example, proof, rules, definition: thm-rules ) = default-theorems("thm-group", lang: "it")

show: thm-rules

but it didn't work. Can you help me?

Marmare314 commented 7 months ago

I think the problem is definition: thm-rules, which takes the definition key and assigns it to thm-rules. It should probably be this instead:

#let (
theorem, lemma, corollary,
remark, proposition, example,
proof, definition, rules: thm-rules
) = default-theorems("thm-group", lang: "it")
#show: thm-rules
porcaror commented 7 months ago

Yes great, It works. Maybe in the next version you could write it in the right place in the example. Thanks a lot. Roberto