diff --git a/bin/commands/convert.py b/bin/commands/convert.py index 7c41347..48ed490 100644 --- a/bin/commands/convert.py +++ b/bin/commands/convert.py @@ -33,7 +33,7 @@ from bin.utils import handle_errors, run_command @click.option( "--bookmark-depth", type=int, - default=1, + default=2, help="PDF bookmark expansion depth (md→pdf only). 1=top-level only, 2=expand to second level, etc.", ) @click.option("--dry-run", "-n", is_flag=True, help="Show what would be done") diff --git a/bin/md_to_pdf.py b/bin/md_to_pdf.py index 7dd16bf..09bec06 100644 --- a/bin/md_to_pdf.py +++ b/bin/md_to_pdf.py @@ -222,12 +222,12 @@ def build_pdf( template: str, inputs: list[Path], output: Path, - bookmark_depth: int = 1, + bookmark_depth: int = 2, ) -> None: """Build PDF from Markdown using Typst. ``bookmark_depth`` controls outline expansion: ``1`` keeps only top-level - bookmarks visible (default), ``2`` expands to second level, and so on. + bookmarks visible, ``2`` expands to second level (default), and so on. """ templates_dir = templates_registry.get_md_to_pdf_root() template_file = templates_dir / template / "template.typ" diff --git a/templates/md-to-docx/default/template.docx b/templates/md-to-docx/default/template.docx index c30e09b..b6af6d4 100644 Binary files a/templates/md-to-docx/default/template.docx and b/templates/md-to-docx/default/template.docx differ diff --git a/templates/md-to-docx/review/template.docx b/templates/md-to-docx/review/template.docx index 96c291a..bf01fa5 100644 Binary files a/templates/md-to-docx/review/template.docx and b/templates/md-to-docx/review/template.docx differ diff --git a/templates/md-to-pdf/default/template.typ b/templates/md-to-pdf/default/template.typ index 4950b6c..d17a60c 100644 --- a/templates/md-to-pdf/default/template.typ +++ b/templates/md-to-pdf/default/template.typ @@ -83,8 +83,8 @@ lang: "zh", ) - // Body rhythm: spacing > leading; first-line indent = Typst default (none) - set par(justify: true, leading: 0.78em, spacing: 1.12em) + // Body rhythm: spacing > leading; first-line indent = 2em for Chinese paragraphs + set par(justify: true, leading: 0.78em, spacing: 1.12em, first-line-indent: (amount: 2em, all: true)) // List rhythm: spacing ≥ leading (0.78em), looser than line height for readability set list(indent: 1.2em, body-indent: 0.45em, spacing: 0.90em)