From 203bb168f703b9f731f16302c1dda4c639135057 Mon Sep 17 00:00:00 2001 From: ssotoen <68116836+ssotoen@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:35:56 +0100 Subject: [PATCH 1/2] Fix paragraph spacing --- lapreprint.typ | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lapreprint.typ b/lapreprint.typ index fde21dd..b9c53e3 100644 --- a/lapreprint.typ +++ b/lapreprint.typ @@ -228,7 +228,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() } @@ -292,7 +292,7 @@ } v(10pt) - show par: set block(spacing: 1.5em) + set par(spacing: 1.5em) // Display the paper's contents. body From e725bd1995c5fdfdee6b026c3d63de554a09f6e8 Mon Sep 17 00:00:00 2001 From: ssotoen <68116836+ssotoen@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:49:01 +0100 Subject: [PATCH 2/2] Replace deprecated locate calls with context --- lapreprint.typ | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lapreprint.typ b/lapreprint.typ index b9c53e3..7c61d92 100644 --- a/lapreprint.typ +++ b/lapreprint.typ @@ -80,8 +80,8 @@ set page( paper-size, margin: (left: 25%), - header: locate(loc => { - if(loc.page() == 1) { + header: context { + if(here().position().page == 1) { let headers = ( if (open-access) {smallcaps[Open Access]}, if (doi != none) { link("https://doi.org/" + doi, "https://doi.org/" + doi)} @@ -92,8 +92,8 @@ (short-title, short-citation).join(spacer) )) } - }), - footer: block( + }, + footer: context block( width: 100%, stroke: (top: 1pt + gray), inset: (top: 8pt, right: 2pt), @@ -109,7 +109,7 @@ #text( size: 9pt, fill: gray.darken(50%) )[ - #counter(page).display() of #locate((loc) => {counter(page).final(loc).first()}) + #counter(page).display() of #counter(page).final().first() ] ] ) @@ -129,9 +129,9 @@ // Configure headings. set heading(numbering: heading-numbering) - show heading: it => locate(loc => { + show heading: it => { // 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 +168,7 @@ } _#(it.body):_ ] - }) + } if (logo != none) {