Fix warnings when using typst 0.12.0 (#71)

* fixes for warnings with typst 0.12.0
* update tests for typst 0.12.0
* update github test workflow for typst 0.12
* chore: apply typst updates to test code
* chore: update compiler version in typst.toml
* chore: use the correct preview version in coverletter2
* chore: improve comments in coverletter template
* chore: update test references
* fix: issues with coverletter for typst `0.12.0`
* update test references with typst-test update

---------

Co-authored-by: Paul Tsouchlos <developer.paul.123@gmail.com>
This commit is contained in:
Jürgen Kleer
2024-10-22 13:39:01 +02:00
committed by GitHub
parent d12482c7fe
commit 4c417a7cbd
10 changed files with 67 additions and 77 deletions

View File

@@ -10,11 +10,11 @@ jobs:
strategy: strategy:
matrix: matrix:
# add any other Typst versions that your package should support # add any other Typst versions that your package should support
typst-version: ["0.11"] typst-version: ["0.12"]
# the docs don't need to build with all versions supported by the package; # the docs don't need to build with all versions supported by the package;
# the latest one is enough # the latest one is enough
include: include:
- typst-version: "0.11" - typst-version: "0.12"
doc: 1 doc: 1
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

44
lib.typ
View File

@@ -82,7 +82,9 @@
#linguify("cover-letter", from: lang_data) #linguify("cover-letter", from: lang_data)
] ]
][ ][
#counter(page).display() #context {
counter(page).display()
}
] ]
} }
@@ -104,7 +106,9 @@
#linguify("resume", from: lang_data) #linguify("resume", from: lang_data)
] ]
][ ][
#counter(page).display() #context {
counter(page).display()
}
] ]
} }
@@ -228,11 +232,10 @@
) )
// set paragraph spacing // set paragraph spacing
show par: set block( set par(
above: 0.75em, spacing: 0.75em,
below: 0.75em, justify: true,
) )
set par(justify: true)
set heading( set heading(
numbering: none, numbering: none,
@@ -244,17 +247,15 @@
size: 16pt, size: 16pt,
weight: "regular", weight: "regular",
) )
#set align(left)
#align(left)[ #set block(above: 1em)
#let color = if colored-headers { #let color = if colored-headers {
accent-color accent-color
} else { } else {
color-darkgray color-darkgray
} }
#text[#strong[#text(color)[#it.body.text]]] #text[#strong[#text(color)[#it.body.text]]]
#box(width: 1fr, line(length: 100%)) #box(width: 1fr, line(length: 100%))
]
] ]
show heading.where(level: 2): it => { show heading.where(level: 2): it => {
@@ -417,7 +418,7 @@
below: 1.25em, below: 1.25em,
) )
set par(leading: 0.65em) set par(leading: 0.65em)
block(above: 0.5em, below: 0.5em)[ block(above: 0.5em)[
#body #body
] ]
} }
@@ -453,7 +454,6 @@
] ]
] ]
] ]
} }
/// Show cumulative GPA. /// Show cumulative GPA.
@@ -558,11 +558,7 @@
) )
// set paragraph spacing // set paragraph spacing
show par: set block( set par(spacing: 0.75em, justify: true)
above: 0.75em,
below: 0.75em,
)
set par(justify: true)
set heading( set heading(
numbering: none, numbering: none,

0
scripts/uninstall Normal file → Executable file
View File

View File

@@ -19,7 +19,9 @@
profile-picture: image("./profile.png"), profile-picture: image("./profile.png"),
language: "en", language: "en",
font: "Times New Roman", font: "Times New Roman",
// show-footer: false, // Uncomment to hide footer // Remove the following line to show the footer
// Or set the value to `true`
show-footer: false,
) )
#hiring-entity-info(entity-info: ( #hiring-entity-info(entity-info: (

View File

@@ -1,4 +1,4 @@
#import "@preview/modern-cv:0.5.0": * #import "@preview/modern-cv:0.7.0": *
#show: coverletter.with( #show: coverletter.with(
author: ( author: (

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -17,11 +17,7 @@
) )
// set paragraph spacing // set paragraph spacing
#show par: set block( #set par(spacing: 0.75em, justify: true)
above: 0.75em,
below: 0.75em,
)
#set par(justify: true)
#set heading( #set heading(
numbering: none, numbering: none,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -17,11 +17,7 @@
) )
// set paragraph spacing // set paragraph spacing
#show par: set block( #set par(spacing: 0.75em, justify: true)
above: 0.75em,
below: 0.75em,
)
#set par(justify: true)
#set heading( #set heading(
numbering: none, numbering: none,

View File

@@ -1,7 +1,7 @@
[package] [package]
name = "modern-cv" name = "modern-cv"
version = "0.7.0" version = "0.7.0"
compiler = "0.11.0" compiler = "0.12.0"
entrypoint = "lib.typ" entrypoint = "lib.typ"
authors = ["Paul Tsouchlos <https://github.com/DeveloperPaul123>"] authors = ["Paul Tsouchlos <https://github.com/DeveloperPaul123>"]
license = "MIT" license = "MIT"