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