Move element styling and smartypants to lib

This commit is contained in:
Marty Oehme 2025-02-05 15:15:55 +01:00 committed by Marty Oehme
parent b333e2f2db
commit 948510fb13
3 changed files with 19 additions and 6 deletions

2
cv.typ
View file

@ -1,6 +1,8 @@
#import "lib.typ": * #import "lib.typ": *
#let cv(contents, use_sidebar: false) = { #let cv(contents, use_sidebar: false) = {
show: style
show: smartypants
set text(lang: lang) set text(lang: lang)
let date_formatting = { let date_formatting = {

21
lib.typ
View file

@ -1,10 +1,19 @@
#show heading: set text(font: "New Computer Modern")
#show link: underline
// smartypants and latex compatibility // set some styles
#show "--": [#sym.dash.en] #let style(it) = {
#show "---": [#sym.dash.em] show heading: set text(font: "New Computer Modern")
#show "\&": [#sym.amp] show link: underline
it
}
// transform md-similes to actual symbols
#let smartypants(it) = {
// smartypants and latex compatibility
show "--": [#sym.dash.en]
show "---": [#sym.dash.em]
show "\&": [#sym.amp]
it
}
// Choose the compiled language through cli by doing // Choose the compiled language through cli by doing
// //

View file

@ -34,6 +34,8 @@
} }
#let resume(contents, main: ("experience", "education"), sidebar: ("volunteering", "languages", "skills")) = { #let resume(contents, main: ("experience", "education"), sidebar: ("volunteering", "languages", "skills")) = {
show: style
show: smartypants
set text(lang: lang) set text(lang: lang)
let date_formatting = { let date_formatting = {