diff --git a/leipzig-gloss-examples.pdf b/leipzig-gloss-examples.pdf index 1dd8793..a85b6fe 100644 Binary files a/leipzig-gloss-examples.pdf and b/leipzig-gloss-examples.pdf differ diff --git a/leipzig-gloss-examples.typ b/leipzig-gloss-examples.typ index 8fba7d2..1aab6b0 100644 --- a/leipzig-gloss-examples.typ +++ b/leipzig-gloss-examples.typ @@ -1,4 +1,4 @@ -#import "leipzig-gloss.typ": gloss, numbered-gloss, gloss_count +#import "leipzig-gloss.typ": gloss, numbered-gloss, gloss-count #import "linguistic-abbreviations.typ": * #show link: x => underline[*#x*] @@ -143,11 +143,20 @@ The displayed number for numbered glosses is iterated for each numbered gloss that appears throughout the document. Unnumbered glosses do not increment the counter for the numbered glosses. -The gloss count is controlled by the Typst counter variable `gloss_count`. This -variable can be imported from the `leipzig-gloss` package and reset using the -standard Typst counter functions to control gloss numbering. +The gloss count is controlled by the Typst counter variable `gloss-count`. This +variable can be imported from the `leipzig-gloss` package and manipulated using the +standard Typst counter functions to control gloss numbering: -//TODO add examples here +#codeblock( +" +#gloss-count.update(20) + +#numbered-gloss( + header_text: [from _Standard Basque: A Progressive Grammar_ by Rudolf de Rijk], + source_text: ([Bada beti guregan zorion handi baten nahia.],), + source_text_style: none, + translation: [There always is in us a will for a great happiness.], +)", addl-bindings: (gloss-count: gloss-count)) == Styling lines of a gloss @@ -183,7 +192,7 @@ These are the first twelve example glosses given in #link("https://www.eva.mpg.d along with the Typst markup needed to generate them: #{ - gloss_count.update(0) + gloss-count.update(0) } #codeblock( diff --git a/leipzig-gloss.typ b/leipzig-gloss.typ index 5297806..09e450e 100644 --- a/leipzig-gloss.typ +++ b/leipzig-gloss.typ @@ -1,4 +1,4 @@ -#let gloss_count = counter("gloss_count") +#let gloss-count = counter("gloss_count") #let build_gloss(spacing_between_items, formatters, gloss_line_lists) = { assert(gloss_line_lists.len() > 0, message: "Gloss line lists cannot be empty") @@ -107,11 +107,11 @@ } if numbering { - gloss_count.step() + gloss-count.step() } let gloss_number = if numbering { - [(#gloss_count.display())] + [(#gloss-count.display())] } else { none }