diff --git a/contrib/typst/gh-pages.typ b/contrib/typst/gh-pages.typ index f0e09c3..8e8b752 100644 --- a/contrib/typst/gh-pages.typ +++ b/contrib/typst/gh-pages.typ @@ -22,9 +22,9 @@ #let main-font = ( "Charter", "Source Han Serif SC", - "Source Han Serif TC", + // "Source Han Serif TC", // shiroa's embedded font - "Linux Libertine", + "Libertinus Serif", ) #let code-font = ( "BlexMono Nerd Font Mono", diff --git a/packages/shiroa/supports-link.typ b/packages/shiroa/supports-link.typ index 064527f..e43b258 100644 --- a/packages/shiroa/supports-link.typ +++ b/packages/shiroa/supports-link.typ @@ -33,15 +33,15 @@ } assert(content != none, message: "invalid label content") - locate(loc => { - let link-result = link2page.final(loc) + context { + let link-result = link2page.final() if path-lbl in link-result { link((page: link-result.at(path-lbl), x: 0pt, y: 0pt), content) return } if reference != none { - let result = query(reference, loc) + let result = query(reference) // whether it is internal link if result.len() > 0 { link(reference, content) @@ -61,5 +61,5 @@ }, content, ) - }) + } } diff --git a/packages/shiroa/utils.typ b/packages/shiroa/utils.typ index 56a69a4..99e29f1 100644 --- a/packages/shiroa/utils.typ +++ b/packages/shiroa/utils.typ @@ -1,16 +1,18 @@ #import "supports-text.typ": plain-text -#let _labeled-meta(label) = locate(loc => { - let res = query(label, loc) - if res.len() <= 0 { - none - } else if res.len() == 1 { - res.at(0).value - } else { - res.map(it => it.value) +#let _labeled-meta(label) = ( + context { + let res = query(label) + if res.len() <= 0 { + none + } else if res.len() == 1 { + res.at(0).value + } else { + res.map(it => it.value) + } } -}) +) #let _store-content(ct) = ( kind: "plain-text",