-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.typ
More file actions
36 lines (34 loc) · 1.08 KB
/
main.typ
File metadata and controls
36 lines (34 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#import "utils/dir.typ": *
#import "utils/func.typ": *
#import "@preview/cuti:0.2.1": show-cn-fakebold
#set text(size: 12pt)
#set par(leading: 1.5em, justify: true)
#set page(numbering: none)
#set heading(numbering: "1.1")
#set footnote.entry(indent: 0em)
#show: show-cn-fakebold
#show heading.where(level: 1): set block(below: 1.2em)
#show heading.where(level: 2): set block(below: 1.2em)
#show heading.where(level: 3): set block(below: 1.2em)
#show heading.where(level: 4): set block(below: 1.2em)
#show raw.where(block: true): block.with(
fill: luma(240),
inset: 10pt,
radius: 4pt,
width: 100%,
)
#outline(depth: 4)
#pagebreak()
#counter(page).update(1)
#set page(numbering: "1", number-align: center, margin: (x: 4em))
#let prev_dirs = ()
#for (idx, path) in paths.enumerate() {
if path == "" { continue }
let (dirs, _) = split_path(path)
let same = common_len(prev_dirs, dirs)
for (off, d) in dirs.slice(same, dirs.len()).enumerate() {
heading(level: 1 + same + off)[#text(font: ("Times New Roman", "KaiTi"))[#d]]
}
add_note(path, 1 + dirs.len())
(prev_dirs,) = (dirs,)
}