From 9eafd7577f252d8070dd99d71c4779c935624e47 Mon Sep 17 00:00:00 2001 From: Zhengshou Lai Date: Fri, 8 May 2026 13:53:24 +0800 Subject: [PATCH] style(templates): increase list spacing for readability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Raise list/enum spacing to be ≥ leading line height across default and manual templates, improving visual separation between items. --- templates/md-to-pdf/default/template.typ | 5 +++-- templates/md-to-pdf/manual/template.typ | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/templates/md-to-pdf/default/template.typ b/templates/md-to-pdf/default/template.typ index 6b1fb76..4950b6c 100644 --- a/templates/md-to-pdf/default/template.typ +++ b/templates/md-to-pdf/default/template.typ @@ -86,8 +86,9 @@ // Body rhythm: spacing > leading; first-line indent = Typst default (none) set par(justify: true, leading: 0.78em, spacing: 1.12em) - set list(indent: 1.2em, body-indent: 0.45em, spacing: 0.62em) - set enum(indent: 1.2em, body-indent: 0.45em, spacing: 0.62em) + // List rhythm: spacing ≥ leading (0.78em), looser than line height for readability + set list(indent: 1.2em, body-indent: 0.45em, spacing: 0.90em) + set enum(indent: 1.2em, body-indent: 0.45em, spacing: 0.90em) // Headings: slightly tighter than long-form (manual/textbook) because H1 is 16pt here show heading.where(level: 1): it => { diff --git a/templates/md-to-pdf/manual/template.typ b/templates/md-to-pdf/manual/template.typ index b946750..2e5c135 100644 --- a/templates/md-to-pdf/manual/template.typ +++ b/templates/md-to-pdf/manual/template.typ @@ -100,8 +100,9 @@ number-align: right, ) - set list(tight: true, indent: 1.2em, body-indent: 0.45em, spacing: 0.52em) - set enum(tight: true, indent: 1.2em, body-indent: 0.45em, spacing: 0.52em) + // Tight list: spacing close to leading (0.76em) but not below it + set list(tight: true, indent: 1.2em, body-indent: 0.45em, spacing: 0.72em) + set enum(tight: true, indent: 1.2em, body-indent: 0.45em, spacing: 0.72em) // Same heading vertical scale as textbook (long-form); H sizes differ by template show heading.where(level: 1): it => {