diff --git a/layout/.anarsec_article.typ.swp b/layout/.anarsec_article.typ.swp new file mode 100644 index 0000000..268750d Binary files /dev/null and b/layout/.anarsec_article.typ.swp differ diff --git a/layout/anarsec_article.typ b/layout/anarsec_article.typ index d6ee16a..6ccafef 100644 --- a/layout/anarsec_article.typ +++ b/layout/anarsec_article.typ @@ -88,27 +88,27 @@ it.body if type(it.dest) == "string" { if it.dest == "https://anarsec.guide/recommendations" or it.dest == "/recommendations" { - text[ (#emph()[Recommendations])] + text[ (#emph()[Recommendations])] } else if it.dest.starts-with("/recommendations#") or it.dest.starts-with("/recommendations/#") { - locate(location => { - let elements = query(label(it.dest.trim("/recommendations#", at: start).trim("/recommendations/#", at: start)), location) - text[ (#emph()[Recommendations:] #emph(elements.first().body))] - }) + context { + let elements = query(label(it.dest.trim("/recommendations#", at: start).trim("/recommendations/#", at: start))) + text[ (#emph()[Recommendations:] #emph(elements.first().body))] + } } else if it.dest.starts-with("https://") or it.dest.starts-with("http://") { footnote[#it.dest.trim("https://", at: start).trim("http://", at: start)] } else if it.dest.starts-with("/glossary#") or it.dest.starts-with("/glossary/#") { - locate(location => { - let elements = query(heading.where(label: label(it.dest.trim("/glossary#", at: start).trim("/glossary/#", at: start)), level: 2), location) + context { + let elements = query(heading.where(label: label(it.dest.trim("/glossary#", at: start).trim("/glossary/#", at: start)), level: 2)) if elements.len() != 0 { text[#super[†]] } else { footnote[anarsec.guide/glossary] } - }) + } } else if it.dest.starts-with("/") { footnote({text[anarsec.guide] + it.dest}) @@ -174,4 +174,3 @@ ] ] -