Render a document to PDF or Markdown
§ 1Purpose
Produce a paginated PDF or a folder of Markdown files (one per page) from the same wdoc source.
§ 2Prerequisites
- A WCL file declaring one or more page blocks
§ 3Flowchart
§ 4Steps
§ 4.11
§ 4.2Render a PDF
$ wcl wdoc pdf site.wcl --out out
Render each site to out/<name>.pdf — a pure-Rust PDF, no browser or external tools. Prose, headings and more paginate onto A4 by default; pass --page-size letter for US Letter.
§ 4.32
§ 4.4Render Markdown
$ wcl wdoc markdown site.wcl --out out/md
Render every page to one .md file per page under out/md. Diagrams, terminals and wireframes are written as standalone .svg files the Markdown references; equations stay as LaTeX and videos are skipped — aimed at AI / text consumers.
§ 4.53
§ 4.6Pick a single site
$ wcl wdoc markdown site.wcl --out out/md --site book
When a document declares several sites, pass --site <name> to render just one; otherwise each site renders into its own subdirectory.
Verification
out/<name>.pdf opens as a paginated document, and out/md/ holds one .md per page with referenced .svg assets alongside.