Update to replace deprecated features with modern ones:

- Use Linux Libertine's sucessor Libertinus Serif by default
- use `context`/`here()` instead of deprecated `locate`
- Recommend Tinymist over deprecated Typst LSP
This commit is contained in:
Laurenz 2024-12-15 17:41:12 +01:00
parent 573e87a15d
commit bb437af760
Signed by: C0ffeeCode
SSH key fingerprint: SHA256:prvFOyBjButRypyXm7X8lbbCkly2Dq1PF7e/mrsPVjw
3 changed files with 20 additions and 20 deletions

View file

@ -10,8 +10,8 @@ To compile your document,
you need to take the `thesis.typ` file as the input file. you need to take the `thesis.typ` file as the input file.
To use the CLI, compile using `typst watch thesis.typ` To use the CLI, compile using `typst watch thesis.typ`
or `typst compile thesis.typ`. or `typst compile thesis.typ`.
If you intend to use the VS Code plug-in "Typst-LSP",
make sure it is either configured to only take the `thesis.typ` as input If you intend to use the VS Code extension "Typst-LSP", don't,
or not to perform compilation at all (to use the CLI). and use the Tinymist Typst extension instead.
This is a adapted version of a template by [@satoqz](https://github.com/satoqz/). This is a adapted version of a template by [@satoqz](https://github.com/satoqz/).

View file

@ -184,7 +184,7 @@
// suggested font and font size by the DHBW style guide // suggested font and font size by the DHBW style guide
#set text( #set text(
font: "Linux Libertine", font: "Libertinus Serif",
// font: "New Computer Modern Sans", // font: "New Computer Modern Sans",
size: 12pt, size: 12pt,
hyphenate: false, hyphenate: false,
@ -499,25 +499,25 @@
#let acro(short, pref: "normal", append: "") = { #let acro(short, pref: "normal", append: "") = {
let item = acronyms.at(short) let item = acronyms.at(short)
locate(loc => { context({
let entries = acroStates.at(loc).filter(e => e == short); let entries = acroStates.at(here()).filter(e => e == short);
// Already used once // Already used once
if entries.len() > 0 { if entries.len() > 0 {
if pref == "long" { if pref == "long" {
link(label(short))[#item#append] link(label(short))[#item#append]
} else {
link(label(short))[#short#append]
}
// First usage
} else { } else {
link(label(short))[#short#append] acroStates.update(e => {e.push(short); e;});
if pref == "short" {
link(label(short))[#short#append (#item)]
} else {
link(label(short))[#item#append (#short)]
}
} }
// First usage
} else {
acroStates.update(e => {e.push(short); e;});
if pref == "short" {
link(label(short))[#short#append (#item)]
} else {
link(label(short))[#item#append (#short)]
}
}
}); });
} }

BIN
thesis.pdf Normal file

Binary file not shown.