// Minimal stand-in for the real `cph-render` package, used so cph-typst's // World / compile / PDF path can be proven independently of WU-2. // // It exercises the same call shape as the real entry: it reads `info`, walks // `parts` IN ORDER, and renders each part's content fields by `kind`. Content // values are already-evaluated content (the driver produced them via include). #let display(info: (:), target: "student", parts: ()) = { set document(title: info.at("title", default: "")) [= #info.at("title", default: "")] [target: #target] for p in parts { let kind = p.at("kind", default: none) [== #kind] if kind == "segment" { p.textbook } else if kind == "lemma" { p.stmt let proof = p.at("proof", default: none) if proof != none { proof } } else if kind == "example" { p.problem p.solution let src = p.at("source", default: none) if src != none [来源:#src] } else if kind == "sop" { p.sop } } }