forked from bai/curriculum-project-hub
feat(cph): implement nested outline manifest and batch/combined export
ADR-0029 — nested outline manifest, supersedes ADR-0008's flat [[parts]]:
- cph-model: recursive loader over manifest.toml containers / element.toml
leaves; Lesson.parts (pure elements, DFS order) + Lesson.outline (elements
interleaved with section headings at their DFS-open position); rejects
ambiguous/incomplete folders and root-vs-container table misplacement
- cph-diag: new DiagCode::ManifestMalformed for carrier-document structure
errors (discharges an existing TODO)
- cph-typst: augmented manifest now serializes the outline (element/section
entries) instead of a flat parts array
- render/lib.typ: render-lesson renders section headings at their depth
- examples/TH-141 migrated to 5 nested section containers + 3 root segments,
byte-identical element order; smoke-verified via cph check/build + pdftotext
ADR-0030 — batch & combined export, extends ADR-0009/0011:
- cph build with no --target batches every declared target (repeatable
--target for an explicit subset); any target failure => non-zero exit,
per-target ledger, independent per-target execution
- cph-model: bundle.toml loader (directory + [info]/[targets.*]/ordered
lessons with per-lesson target overrides)
- cph-typst: augmented bundle manifest (path-prefixed member outlines),
Engine::{compile_check_bundle,build_bundle_pdf}
- render/lib.typ: render-bundle assembles member lessons under per-lesson
headings, depth-shifts their own section headings, resets example/lemma
counters at each lesson boundary by default
- cph-cli: `cph bundle <path> --target <name>` subcommand, same batching
contract as `cph build`
- new bundle fixtures/tests (cph-model unit + cph-typst through-template PDF
compile), smoke-verified via a real 2-lesson merged PDF
Verification: cargo fmt/clippy/test clean across the workspace (68 tests);
real cph check/build/bundle runs against TH-141 and a bundle fixture, PDF
content inspected via pdftotext.
This commit is contained in:
+18
-142
@@ -6,161 +6,37 @@ name = "TH-141_表面张力的严肃理论"
|
||||
title = "TH-141:表面张力的严肃理论"
|
||||
author = "范式教育教研组"
|
||||
|
||||
[[parts]]
|
||||
[[children]]
|
||||
kind = "segment"
|
||||
path = "segments/开场对照导言"
|
||||
|
||||
[[parts]]
|
||||
[[children]]
|
||||
kind = "segment"
|
||||
path = "segments/胡克唯象模型回顾"
|
||||
|
||||
[[parts]]
|
||||
[[children]]
|
||||
kind = "segment"
|
||||
path = "segments/液面拉伸的本质"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/液气界面导言"
|
||||
[[children]]
|
||||
kind = "section"
|
||||
path = "液气界面"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/微观建模的共同骨架"
|
||||
[[children]]
|
||||
kind = "section"
|
||||
path = "固气界面"
|
||||
|
||||
[[parts]]
|
||||
kind = "lemma"
|
||||
path = "lemmas/量纲分析估计"
|
||||
[[children]]
|
||||
kind = "section"
|
||||
path = "固液界面"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/缺键模型导言"
|
||||
[[children]]
|
||||
kind = "section"
|
||||
path = "σTp态函数建模"
|
||||
|
||||
[[parts]]
|
||||
kind = "lemma"
|
||||
path = "lemmas/缺键模型一般公式"
|
||||
|
||||
[[parts]]
|
||||
kind = "example"
|
||||
path = "examples/41届复赛三-2-缺键模型"
|
||||
|
||||
[[parts]]
|
||||
kind = "lemma"
|
||||
path = "lemmas/Stefan极简估算"
|
||||
|
||||
[[parts]]
|
||||
kind = "lemma"
|
||||
path = "lemmas/立方格子下zeta具体值"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/LJ积分导言"
|
||||
|
||||
[[parts]]
|
||||
kind = "lemma"
|
||||
path = "lemmas/LJ对势积分标度"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/固气界面导言"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/表面能γ与表面应力f"
|
||||
|
||||
[[parts]]
|
||||
kind = "lemma"
|
||||
path = "lemmas/拉伸固体的总应力"
|
||||
|
||||
[[parts]]
|
||||
kind = "lemma"
|
||||
path = "lemmas/缺键模型迁移到固气"
|
||||
|
||||
[[parts]]
|
||||
kind = "lemma"
|
||||
path = "lemmas/固体表面能的晶面各向异性"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/不同物质γ量级对比"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/固液界面导言"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/固液界面能的物理图像"
|
||||
|
||||
[[parts]]
|
||||
kind = "lemma"
|
||||
path = "lemmas/Dupré关系"
|
||||
|
||||
[[parts]]
|
||||
kind = "lemma"
|
||||
path = "lemmas/Girifalco-Good公式"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/Fowkes极性修正"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/三相接触导言"
|
||||
|
||||
[[parts]]
|
||||
kind = "lemma"
|
||||
path = "lemmas/Young方程"
|
||||
|
||||
[[parts]]
|
||||
kind = "lemma"
|
||||
path = "lemmas/GGZ浸润判据"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/浸润全谱与高低能表面"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/σT建模导言"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/微观派Lm下降"
|
||||
|
||||
[[parts]]
|
||||
kind = "lemma"
|
||||
path = "lemmas/Eötvös规则"
|
||||
|
||||
[[parts]]
|
||||
kind = "lemma"
|
||||
path = "lemmas/Guggenheim-Katayama改良"
|
||||
|
||||
[[parts]]
|
||||
kind = "lemma"
|
||||
path = "lemmas/表面熵热力学关系"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/σTp态函数导言"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/σ作为态函数的图像"
|
||||
|
||||
[[parts]]
|
||||
kind = "example"
|
||||
path = "examples/41届复赛三-1-混注石油"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/收束导言"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/各模型对水的预测对照"
|
||||
|
||||
[[parts]]
|
||||
kind = "segment"
|
||||
path = "segments/算不准背后的真实物理"
|
||||
[[children]]
|
||||
kind = "section"
|
||||
path = "收束"
|
||||
|
||||
# Export targets (ADR-0009/0011): each target is a build producing a typed
|
||||
# artifact, run as an ordered list of typed steps. A `typst-compile` step names a
|
||||
|
||||
Reference in New Issue
Block a user