aboutsummaryrefslogtreecommitdiff
path: root/book/book.typ
diff options
context:
space:
mode:
Diffstat (limited to 'book/book.typ')
-rw-r--r--book/book.typ6
1 files changed, 6 insertions, 0 deletions
diff --git a/book/book.typ b/book/book.typ
index 14e617a0..2dc7bdf5 100644
--- a/book/book.typ
+++ b/book/book.typ
@@ -5,6 +5,8 @@
#show list: set text(font: "Gluten", fill: rgb(46, 73, 0), size: 20pt)
#show heading.where(level: 2): set text(font: "Great Vibes", size: 40pt)
+#let document_flags = ("image_attribution",)
+
#let load_locale(name) = {
read("locale/"+name+".ini")
.split("\n")
@@ -51,6 +53,10 @@
#par(..elem.es.map(element))
] else if elem.t == "table" [
#table(columns: elem.es.at(0).len(), ..elem.es.flatten().map(element))
+ ] else if elem.t == "conditional" [
+ #if (elem.cond in document_flags) == elem.value [
+ #element(elem.e)
+ ]
] else [
#elem
]