fix(glossy): fixes page numbering thanks to Fevol
Bug fix thanks to [@Fevol](https://github.com/Fevol). See PR: https://github.com/swaits/typst-collection/pull/9
This commit is contained in:
27 files changed
+1360
No files matched your search
@@ -0,0 +1,50 @@
|
||||
// Inspired by academic textbook glossaries
|
||||
#let theme-academic = (
|
||||
section: (title, body) => {
|
||||
set text(font: "New Computer Modern")
|
||||
heading(level: 1, title)
|
||||
v(1em)
|
||||
body
|
||||
},
|
||||
|
||||
group: (name, index, total, body) => {
|
||||
if name != "" and total > 1 {
|
||||
v(1.5em)
|
||||
align(left, text(weight: "bold", size: 1.2em, name))
|
||||
v(0.75em)
|
||||
line(length: 100%, stroke: 0.5pt)
|
||||
v(0.75em)
|
||||
}
|
||||
body
|
||||
},
|
||||
|
||||
entry: (entry, index, total) => {
|
||||
let short-display = text(weight: "bold", entry.short)
|
||||
let long-display = if entry.long == none {
|
||||
[]
|
||||
} else {
|
||||
[. #entry.long]
|
||||
}
|
||||
|
||||
let description = if entry.description == none {
|
||||
[]
|
||||
} else {
|
||||
[. #entry.description]
|
||||
}
|
||||
|
||||
block(
|
||||
below: 1em,
|
||||
text(
|
||||
size: 0.95em,
|
||||
{
|
||||
grid(
|
||||
columns: (1fr, auto),
|
||||
gutter: 0.75em,
|
||||
[#short-display#long-display#description],
|
||||
text(fill: rgb("#666666"), entry.pages)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
},
|
||||
)
|
||||
Reference in new issue
Block a user