From d21e0d385760bc1718dda775f0e4c2bf9239fa09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Mekina?= Date: Fri, 5 Dec 2025 11:23:57 +0100 Subject: [PATCH] sort abbreviations alphabetically --- template/classic/common.typ | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/template/classic/common.typ b/template/classic/common.typ index 13bebff..cf2a7f1 100644 --- a/template/classic/common.typ +++ b/template/classic/common.typ @@ -473,12 +473,13 @@ let max_abbr_width = if abbrs.len() > 0 { calc.max(abbrs.keys().map((v) => measure(v).width)).at(0) } else { return }; + let abbr_pairs = abbrs.pairs().sorted(key: it => it.at(0)) pagebreak(weak: true); heading(get_lang_item(language, "abbrs"), numbering: none); align(center, grid( columns: 2, gutter: 1em, - ..abbrs.pairs().map((a) => { + ..abbr_pairs.map((a) => { ( align(left, { [ @@ -486,7 +487,7 @@ #label("abbr_" + a.at(0)) ] }), - text(a.at(1)) + align(left, text(a.at(1))) ) }).flatten() ));