merged with-ctx-style and get-ctx

This commit is contained in:
2025-07-18 17:30:42 +02:00
parent ff8ec72a42
commit a5e8194d59
2 changed files with 11 additions and 18 deletions

View File

@ -112,6 +112,13 @@
#let get-ctx(func) = draw.get-ctx(c => {
let ctx = extract-ctx(c)
ctx.style = styles.resolve(
c.style,
root: "chronos",
base: default-style
)
// Normalize because it is used very frequently
ctx.style.y-space = normalize-units(ctx.style.y-space)
func(ctx)
})
@ -129,17 +136,3 @@
}
return ctx
})
#let with-ctx-style(func) = draw.get-ctx(cetz-ctx => {
let ctx = extract-ctx(cetz-ctx)
let glob-style = styles.resolve(
cetz-ctx.style,
root: "chronos",
base: default-style
)
// Normalize because it is used very frequently
glob-style.y-space = normalize-units(glob-style.y-space)
func(ctx, glob-style)
})