Render Pandoc-fenced-div Markdown lessons to print-quality PDF.
lesson-press is the source-of-truth renderer for curriculum authored
in Markdown with Pandoc fenced divs
(::: name … :::). It produces lesson packets via Pandoc + tectonic
using a bundled LaTeX template and Lua filter. The same assets are
designed to be embedded in other consumers (e.g., a Laravel app
rendering on demand) so a lesson written once renders identically
everywhere.
v0.1.0 — the CLI, asset pipeline, and three goldens (hello,
all-classes, image-sidecar) are stable. Multi-file packet
composition and theme overrides are not built yet.
- Node ≥ 20
pandoc≥ 3.1 on PATHtectonic≥ 0.15 on PATHpdftotext(poppler) — only needed if running the test suite
macOS install:
brew install pandoc tectonic popplerFrom a clone (current path — package is not yet published to npm):
git clone https://github.com/gig3m/lesson-press.git
cd lesson-press
npm install
npm run build
npm link # makes `lesson-press` callable globallyOnce published:
npm install -g lesson-presslesson-press doctor
lesson-press render lesson.md -o lesson.pdf
lesson-press render - -o lesson.pdf < lesson.md
lesson-press render lessons/*.md --separate -o out/See docs/contract.md for the input contract.
docs/examples/lesson-1.md is a complete
worked example exercising every major block class.
The assets/ directory (Lua filter + LaTeX template) is the same in
every consumer. To embed lesson-press in another application, point
its renderer at this directory:
assets/
├── filters/fenced-divs.lua
└── template.latex
The CLI's --asset-dir flag overrides the bundled location for
development.
One renderer, many hosts: the Lua filter (assets/filters/) and LaTeX
template (assets/) are the source of truth, and the CLI is a thin wrapper
around pandoc + tectonic that applies them. Anything that can shell out
to pandoc can reuse the same assets and render the same layout.
The input format is pinned down in docs/contract.md.
MIT — see LICENSE.
