diff --git a/leipzig-gloss.typ b/leipzig-gloss.typ index a55ac54..8c2deb7 100644 --- a/leipzig-gloss.typ +++ b/leipzig-gloss.typ @@ -18,14 +18,14 @@ for item_index in range(0, len) { let args = () for (line_idx, formatter) in formatters.enumerate() { - let formatter_fn = if formatter == none { + let formatter_fn = if formatter.fn == none { (x) => x } else { - formatter + formatter.fn } let item = gloss_line_lists.at(line_idx).at(item_index) - args.push(formatter_fn(item)) + args.push([#formatter_fn(item) #label(formatter.label)]) } make_item_box(..args) h(spacing_between_items) @@ -72,19 +72,19 @@ linebreak() } - let formatters = (source_text_style,) + let formatters = (("fn": source_text_style, "label": "source_text"),) let gloss_line_lists = (source_text,) if transliteration != none { - formatters.push(transliteration_style) + formatters.push(("fn": transliteration_style, "label": "transliteration")) gloss_line_lists.push(transliteration) } - formatters.push(morphemes_style) + formatters.push(("fn": morphemes_style, "label": "morpheme")) gloss_line_lists.push(morphemes) for additional in additional_gloss_lines { - formatters.push(none) //TODO fix this + formatters.push(("fn": none, "label": none)) //TODO fix this gloss_line_lists.push(additional) } diff --git a/new-example.typ b/new-example.typ index e62d707..6758742 100644 --- a/new-example.typ +++ b/new-example.typ @@ -2,6 +2,7 @@ #import "linguistic-abbreviations.typ": * #show label("header_text"): set text(blue) +#show label("source_text"): set text(weight: "bold") = Saimiar