Skip to content

Commit 87a9939

Browse files
committed
themes/university: Fix section handling when no title is given
Now always register new section if new-section argument is set, and display the header additionally if there is a current section but no title. Closes polylux-typ#169.
1 parent 19eb47e commit 87a9939

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

themes/university.typ

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,13 @@
121121
})
122122

123123
let header-text = {
124+
if new-section != none {
125+
utils.register-section(new-section)
126+
}
127+
124128
if header != none {
125129
header
126-
} else if title != none {
127-
if new-section != none {
128-
utils.register-section(new-section)
129-
}
130+
} else if title != none or utils.current-section != none {
130131
locate( loc => {
131132
let colors = uni-colors.at(loc)
132133
block(fill: colors.c, inset: (x: .5em), grid(

0 commit comments

Comments
 (0)