mithilfe folgendes typst Code lassen sich Formel Nummerierungen (1.1) erzeugen nach…
- User
mithilfe folgendes typst Code lassen sich Formel Nummerierungen (1.1) erzeugen nach Kapiteln
/// original author: laurmaedje #set heading(numbering: "1.")
// reset counter at each chapter // if you want to change the number of displayed // section numbers, change the level there #show heading.where(level:1): it => { counter(math.equation).update(0) it }
#set math.equation(numbering: n => { numbering("(1.1)", counter(heading).get().first(), n) // if you want change the number of number of displayed // section numbers, modify it this way: /* let count = counter(heading).get() let h1 = count.first() let h2 = count.at(1, default: 0) numbering("(1.1.1)", h1, h2, n) */ })
Kombiniere das mit folgendem Code, wo die Nummerierungen nur angezeigt werden, sofern die Gleichungen gelabelt sind
// author: gijsleb #show math.equation:it => { if it.has("label") { // Don't forget to change your numbering style in
numbering// to the one you actually want to use. math.equation(block: true, numbering: "(1)", it) } else { it } }#show ref: it => { let el = it.element if el != none and el.func() == math.equation { link(el.location(), numbering( // don't forget to change the numbering according to the one // you are actually using (e.g. section numbering) "(1)", counter(math.equation).at(el.location()).at(0) + 1 )) } else { it } }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.