forked from EduCraft/curriculum-project-hub
6f46aa708a
Fixes the numbering bug (single pattern "一、" reused across levels → level-2
rendered "二、一、…"). display now takes a `config` dict; heading numbering uses
numbly per level — framework default ("{1:一}、","{1:1}.{2:1}","{1:1}.{2:1}.{3:1}")
→ 一、 / 1.1 / 1.1.1 — overridable via config.numbering.heading from the
engineering file (ADR-0009's file-resident override path, the layer whose absence
caused the bug). Verified: grep "二、一" = 0 across all smoke PDFs.
Adds @preview/numbly:0.1.0 (pure typst, zero transitive deps), VENDORED in-repo
at render/vendor/typst-packages/preview/numbly/0.1.0/ for network-free CI;
resolve via --package-cache-path render/vendor/typst-packages. parts contract +
student/teacher field visibility unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
15 lines
585 B
Typst
15 lines
585 B
Typst
// Smoke test — exercises the per-target presentation `config` override path
|
|
// (ADR-0009). Here the engineering-file-supplied `config.numbering.heading`
|
|
// overrides the framework-default heading numbering. The patterns happen to
|
|
// match the correct per-level scheme (level-1 `一、`, level-2 `1.1`), proving
|
|
// the override is wired AND yields correct (NOT `二、一、`) output.
|
|
#import "../lib.typ": display
|
|
#import "smoke-parts.typ": info, parts
|
|
|
|
#display(
|
|
info: info,
|
|
target: "teacher",
|
|
parts: parts,
|
|
config: (numbering: (heading: ("{1:一}、", "{1:1}.{2:1}"))),
|
|
)
|