thoughts
This commit is contained in:
parent
10d5d8bf6c
commit
d341c0b2a6
1 changed files with 10 additions and 0 deletions
34
figures.typ
34
figures.typ
|
@ -1,34 +0,0 @@
|
|||
#show link: it => if type(it.dest) == label {
|
||||
context {
|
||||
if query(it.dest).len() == 0 {
|
||||
it.body
|
||||
} else {
|
||||
it
|
||||
}
|
||||
}
|
||||
} else {
|
||||
it
|
||||
}
|
||||
|
||||
#let get_figures(body) = {
|
||||
if type(body) == array {
|
||||
body.map(get_figures).flatten()
|
||||
} else if type(body) == dictionary {
|
||||
body.values().map(get_figures).flatten()
|
||||
} else if type(body) != content {
|
||||
()
|
||||
}else if body.func() == figure {
|
||||
(body,)
|
||||
} else {
|
||||
body.fields().values().map(get_figures).flatten()
|
||||
}
|
||||
}
|
||||
|
||||
#let main = include("./main.typ")
|
||||
#let figs = get_figures(main)
|
||||
// #repr(figs)
|
||||
#for f in figs {
|
||||
f
|
||||
}
|
||||
|
||||
#bibliography("bibliography.bib")
|
Loading…
Add table
Add a link
Reference in a new issue