add definition to first abbreviation instance
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#import "template/template.typ": *
|
||||
|
||||
#show: tultemplate.with(
|
||||
"classic", "fm", "en",
|
||||
"classic", "fm", "cs",
|
||||
title: "Návod na použití Typst TUL šablony",
|
||||
author: "Ondřej Mekina",
|
||||
)
|
||||
|
@@ -11,10 +11,18 @@
|
||||
);
|
||||
}
|
||||
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(",") + ")"
|
||||
});
|
||||
abbreviation;
|
||||
if type(text) != type(none) {
|
||||
text + " (" + abbreviation + ")";
|
||||
} else {
|
||||
abbreviation;
|
||||
}
|
||||
}
|
||||
|
||||
#let abbrlist() = {
|
||||
|
Reference in New Issue
Block a user