md-to-pdflisted
Install: claude install-skill WeAIClub/md-to-pdf
# md-to-pdf
Convert Markdown into beautifully typeset PDFs. Use this skill whenever the user wants a polished PDF out of a Markdown source.
## Usage
```bash
./scripts/md_to_pdf.sh <input.md> <output.pdf> [theme]
```
Arguments:
- `input.md`: path to the Markdown file (absolute or relative)
- `output.pdf`: destination PDF path
- `theme`: theme name, defaults to `claude-white`. Available: `claude-white` (recommended), `claude-white-bold`
On success, the script prints `[OK] /absolute/path.pdf`.
## Architecture
```
md-to-pdf/
├── SKILL.md # this file
├── scripts/
│ └── md_to_pdf.sh # main pipeline: pandoc → sed → typst compile
├── themes/
│ ├── claude-white/ # default theme (recommended)
│ │ ├── DESIGN.md # design reference
│ │ ├── README.md # theme notes (typography, color tokens)
│ │ └── theme.typ # Typst template (show / set / color tokens)
│ └── claude-white-bold/ # variant with stronger synthetic bold
│ ├── DESIGN.md
│ ├── README.md
│ └── theme.typ
└── fonts/ # bundled fonts loaded via typst --font-path
```
### Pipeline
1. `pandoc input.md --to typst` → `body.typ` (Typst body fragment, no template)
2. `perl` replaces `columns: N,` with `columns: (1fr,)*N,` so Markdown tables span the page width
3. `cat theme.typ body.typ > run.typ` (**must concatenate, not `#include`** — `#include` isolates