From c10d7ed52a840e4bd79efb71ef3af79b8c26a574 Mon Sep 17 00:00:00 2001 From: arkady shaldov <49839603+retroflexivity@users.noreply.github.com> Date: Tue, 2 Sep 2025 03:33:47 +0300 Subject: [PATCH] Subexample numbering customization (#9) * add subexample numbering customization * add subexample numbering customization * first-level numbering patterns --- leipzig-gloss.typ | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/leipzig-gloss.typ b/leipzig-gloss.typ index 3446122..65666ad 100644 --- a/leipzig-gloss.typ +++ b/leipzig-gloss.typ @@ -121,6 +121,8 @@ left-padding: 0.5em, numbering: false, breakable: false, + num-pattern: "(1)", + sub-num-pattern: "(a)", ..args ) = { let add-subexample(subexample, count) = { @@ -142,7 +144,7 @@ supplement: it => {if "label-supplement" in subexample {return subexample.label-supplement} else {return "example"}}, stack( dir: ltr, //TODO this needs to be more flexible - [(#context count.display("a"))], + [#context count.display(sub-num-pattern)], left-padding, gloss(..subexample-internal) ) @@ -156,7 +158,7 @@ } let example-number = if numbering { - [(#context example-count.display())] + [#context example-count.display(num-pattern)] } else { none }