Justify report prose while preserving card spacing
This commit is contained in:
parent
006d45c890
commit
77a7830ed5
|
|
@ -39,6 +39,7 @@ I/O failure, and 2 for invalid invocation. Typst 0.15+ and selected fonts are
|
|||
runtime dependencies. Python, PyYAML, and jsonschema are test-only dependencies.
|
||||
PDF bytes can vary with
|
||||
Typst and font versions; record them when historical reproduction matters.
|
||||
Report body paragraphs are justified; cards and code blocks stay left aligned.
|
||||
|
||||
## Required and optional content
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,8 @@
|
|||
else if kind == "callout" { callout([#as-text(get(item, "text", default: ""))],
|
||||
kind: get(item, "kind", default: "info"), title: get(item, "title", default: none)) }
|
||||
else if kind == "code" { block(width: 100%, inset: 7pt, fill: soft,
|
||||
stroke: 0.5pt + line-color)[#text(font: get(theme, "mono_font", default: "DejaVu Sans Mono"),
|
||||
stroke: 0.5pt + line-color)[#set par(justify: false)
|
||||
#text(font: get(theme, "mono_font", default: "DejaVu Sans Mono"),
|
||||
size: 8pt)[#as-text(get(item, "text", default: ""))]] }
|
||||
else if kind == "subsection" {
|
||||
block(above: 5pt, below: 3pt)[#text(weight: "bold", fill: ink)[#as-text(get(item, "title", default: ""))]]
|
||||
|
|
@ -71,6 +72,7 @@
|
|||
let background = if tone == none { soft } else { border.lighten(93%) }
|
||||
block(width: 100%, inset: 9pt, radius: 3pt, below: 6pt,
|
||||
fill: background, stroke: 0.6pt + border)[
|
||||
#set par(justify: false)
|
||||
#text(weight: "bold", fill: if tone == none { accent } else { border })[#as-text(item.title)]
|
||||
#parbreak()
|
||||
#for child in item.content { render-block(child); v(3pt) }
|
||||
|
|
@ -90,7 +92,7 @@
|
|||
text(size: 7pt, fill: muted)[#if "id" in report { [Report #as-text(report.id)] }],
|
||||
text(size: 7pt, fill: muted)[Page #counter(page).display()]))
|
||||
#set text(font: get(theme, "font", default: "DejaVu Sans"), size: 9.5pt, fill: ink)
|
||||
#set par(leading: 0.58em, spacing: 0.55em)
|
||||
#set par(leading: 0.58em, spacing: 0.55em, justify: true)
|
||||
#show raw.where(block: false): box.with(
|
||||
fill: soft, stroke: 0.5pt + line-color, radius: 3pt,
|
||||
inset: (x: 4pt, y: 1pt), outset: (y: 1pt),
|
||||
|
|
|
|||
Loading…
Reference in New Issue