added border around raw figures and inline raws
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 27s Details
release / release (push) Successful in 1m7s Details

This commit is contained in:
Sven Vogel 2024-07-26 09:38:02 +02:00
parent dd8ed6e2f5
commit a90678ffab
2 changed files with 5 additions and 5 deletions

View File

@ -78,7 +78,7 @@
set raw( set raw(
tab-size: style.code.tab-size, tab-size: style.code.tab-size,
theme: style.code.theme) theme: style.code.theme)
show raw: set text(font: style.code.font, size: style.code.size) show raw.where(block: false): it => box(stroke: 1pt + ABB-GRAY-05, radius: 2pt, inset: (left: 2pt, right: 2pt), outset: (top: 4pt, bottom: 4pt), fill: ABB-GRAY-06, text(font: style.code.font, size: style.code.size, it.text))
show figure.where(kind: raw): it => align(left)[ show figure.where(kind: raw): it => align(left)[
#let content = it.body #let content = it.body
#let lang = if content.has("lang") { #let lang = if content.has("lang") {
@ -89,7 +89,7 @@
#block( #block(
width: 100%, width: 100%,
fill: ABB-GRAY-06, fill: ABB-GRAY-06,
stroke: none, stroke: 1pt + ABB-GRAY-05,
radius: 0.5em, radius: 0.5em,
inset: 0.75em, inset: 0.75em,
clip: false, clip: false,
@ -102,7 +102,7 @@
let (i, l) = e let (i, l) = e
let n = i + 1 let n = i + 1
let n_str = if (calc.rem(n, 1) == 0) or (true and i == 0) { text(font: style.code.font, size: style.code.size, fill: ABB-BLACK, str(n)) } else { none } let n_str = if (calc.rem(n, 1) == 0) or (true and i == 0) { text(font: style.code.font, size: style.code.size, fill: ABB-BLACK, str(n)) } else { none }
(n_str + h(0.5em), raw(lang: lang, l)) (n_str + h(0.5em), raw(block: true, lang: lang, l))
}) })
} }
else { else {
@ -110,7 +110,7 @@
( left, ), ( left, ),
e => { e => {
let (i, l) = e let (i, l) = e
raw( lang: lang, l) raw(block: true, lang: lang, l)
} }
) )
} }

View File

@ -50,7 +50,7 @@
= Lorem Ipsum 3 = Lorem Ipsum 3
#lorem(15) #lorem(15) t `Hello, World!` #lorem(50)
$ $
angle.l a, b angle.r &= arrow(a) dot arrow(b) \ angle.l a, b angle.r &= arrow(a) dot arrow(b) \