add definition to first abbreviation instance

This commit is contained in:
2025-09-23 22:36:31 +02:00
parent 89ab7ef100
commit bbfb64ef8c

View File

@@ -11,11 +11,19 @@
); );
} }
abbrs.insert(abbreviation, text); abbrs.insert(abbreviation, text);
} else {
if type(text) != type(none) {
panic("redefinition of abbreviation '" + abbreviation + "'");
}
} }
"(" + abbrs.pairs().map((v) => { v.at(0) + ":\"" + v.at(1) + "\"" }).join(",") + ")" "(" + abbrs.pairs().map((v) => { v.at(0) + ":\"" + v.at(1) + "\"" }).join(",") + ")"
}); });
if type(text) != type(none) {
text + " (" + abbreviation + ")";
} else {
abbreviation; abbreviation;
} }
}
#let abbrlist() = { #let abbrlist() = {
let abbreviations = abbreviations.final(); let abbreviations = abbreviations.final();