improve title page layout and extract natural language to separate file
This commit is contained in:
@@ -9,3 +9,14 @@
|
||||
assert_in_dict(lang_abbr, lang_ids, "language abbreviation");
|
||||
return lang_ids.at(lang_abbr);
|
||||
};
|
||||
|
||||
// Typst will usually cache this - so we don't have to re-read the file each time
|
||||
#let fetch_lang_items() = {
|
||||
return json("lang.json");
|
||||
}
|
||||
|
||||
#let get_lang_item(lang_abbr, item_name) = {
|
||||
assert_in_dict(lang_abbr, lang_ids, "language abbreviation");
|
||||
let lang_items = fetch_lang_items();
|
||||
return lang_items.at(lang_abbr).at(item_name);
|
||||
}
|
||||
|
Reference in New Issue
Block a user