diff --git a/lapreprint.typ b/lapreprint.typ
index fde21dd..60fe156 100644
--- a/lapreprint.typ
+++ b/lapreprint.typ
@@ -47,14 +47,14 @@
) = {
/* Logos */
- let orcidSvg = ``````.text
+ let orcidSvg = bytes(``````.text)
let spacer = text(fill: gray)[#h(8pt) | #h(8pt)]
let dates;
- if (type(date) == "datetime") {
+ if (type(date) == datetime) {
dates = ((title: "Published", date: date),)
- }else if (type(date) == "dictionary") {
+ }else if (type(date) == dictionary) {
dates = (date,)
} else {
dates = date
@@ -80,19 +80,19 @@
set page(
paper-size,
margin: (left: 25%),
- header: locate(loc => {
- if(loc.page() == 1) {
+ header: context {
+ if(here().page() == 1) {
let headers = (
if (open-access) {smallcaps[Open Access]},
if (doi != none) { link("https://doi.org/" + doi, "https://doi.org/" + doi)}
)
- return align(left, text(size: 8pt, fill: gray, headers.filter(header => header != none).join(spacer)))
+ align(left, text(size: 8pt, fill: gray, headers.filter(header => header != none).join(spacer)))
} else {
- return align(right, text(size: 8pt, fill: gray.darken(50%),
+ align(right, text(size: 8pt, fill: gray.darken(50%),
(short-title, short-citation).join(spacer)
))
}
- }),
+ },
footer: block(
width: 100%,
stroke: (top: 1pt + gray),
@@ -109,7 +109,11 @@
#text(
size: 9pt, fill: gray.darken(50%)
)[
- #counter(page).display() of #locate((loc) => {counter(page).final(loc).first()})
+ #context {
+ counter(page).display()
+ [ of ]
+ str(counter(page).final().first())
+ }
]
]
)
@@ -129,9 +133,9 @@
// Configure headings.
set heading(numbering: heading-numbering)
- show heading: it => locate(loc => {
+ show heading: it => context {
// Find out the final number of the heading counter.
- let levels = counter(heading).at(loc)
+ let levels = counter(heading).at(here())
set text(10pt, weight: 400)
if it.level == 1 [
// First-level headings are centered smallcaps.
@@ -168,7 +172,7 @@
}
_#(it.body):_
]
- })
+ }
if (logo != none) {
@@ -179,7 +183,7 @@
box(
width: 27%,
{
- if (type(logo) == "content") {
+ if (type(logo) == content) {
logo
} else {
image(logo, width: 100%)
@@ -206,7 +210,7 @@
super(author.affiliations)
}
if "orcid" in author {
- link("https://orcid.org/" + author.orcid)[#box(height: 1.1em, baseline: 13.5%)[#image.decode(orcidSvg)]]
+ link("https://orcid.org/" + author.orcid)[#box(height: 1.1em, baseline: 13.5%)[#image(orcidSvg)]]
}
}).join(", ", last: ", and ")
})
@@ -228,7 +232,7 @@
dy: -10pt,
box(width: 27%, {
if (kind != none) {
- show par: set block(spacing: 0em)
+ set par(spacing: 0em)
text(11pt, fill: theme, weight: "semibold", smallcaps(kind))
parbreak()
}
@@ -267,7 +271,7 @@
let abstracts
- if (type(abstract) == "content") {
+ if (type(abstract) == content) {
abstracts = (title: "Abstract", content: abstract)
} else {
abstracts = abstract
@@ -292,7 +296,7 @@
}
v(10pt)
- show par: set block(spacing: 1.5em)
+set par(spacing: 1.5em)
// Display the paper's contents.
body