From 6371459259cb351a5350639a2932c570b555262e Mon Sep 17 00:00:00 2001 From: Sven Vogel Date: Thu, 18 Jul 2024 12:18:01 +0200 Subject: [PATCH 1/3] changed display supplement to bold text --- src/style.typ | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/style.typ b/src/style.typ index 0af11a0..0194996 100644 --- a/src/style.typ +++ b/src/style.typ @@ -82,6 +82,18 @@ show figure: set block(breakable: true) + // make figure supplements bold + // based on: https://github.com/typst/typst/discussions/3871 + show figure.caption: c => [ + #if c.body.fields().len() > 0 { + text(weight: "semibold")[ + #c.supplement #c.counter.display() + ] + c.separator + } + #c.body + ] + // APA style table set table( inset: 0.5em, From baba65ef41aaa27b3544ac0bca814fec3c0568a8 Mon Sep 17 00:00:00 2001 From: Sven Vogel Date: Thu, 18 Jul 2024 12:19:35 +0200 Subject: [PATCH 2/3] changed display supplement for code blocks --- src/style.typ | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/style.typ b/src/style.typ index 0194996..cae72ee 100644 --- a/src/style.typ +++ b/src/style.typ @@ -94,6 +94,16 @@ #c.body ] + // change the display supplement according to the text langugae + // based on: https://github.com/typst/typst/issues/3273 + show figure.where(kind: raw): set figure(supplement: context { + if text.lang == "de" { + "Quelltext" + } else { + "Listing" + } + }) + // APA style table set table( inset: 0.5em, From b80351fb7012c69aeb95e4eb4f879c57ae58583d Mon Sep 17 00:00:00 2001 From: Sven Vogel Date: Thu, 18 Jul 2024 12:20:38 +0200 Subject: [PATCH 3/3] added numbering format for listing caption --- src/style.typ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/style.typ b/src/style.typ index cae72ee..d7365a6 100644 --- a/src/style.typ +++ b/src/style.typ @@ -87,7 +87,7 @@ show figure.caption: c => [ #if c.body.fields().len() > 0 { text(weight: "semibold")[ - #c.supplement #c.counter.display() + #c.supplement #c.counter.display("1.1.1") ] c.separator }