Loading...
Loading...
PDF generation from markdown via Pandoc/XeLaTeX. TRIGGERS - markdown for PDF, print document, pandoc, xelatex, section numbering, table of contents, page breaks.
npx skill4agent add terrylica/cc-skills pandoc-pdf-generation${CLAUDE_PLUGIN_ROOT}/skills/pandoc-pdf-generation/assets/table-spacing-template.texbuild-pdf.sh/usr/bin/env bash << 'DETECT_EOF'
# Create symlink once per project (git-friendly)
ln -s ${CLAUDE_PLUGIN_ROOT}/skills/pandoc-pdf-generation/assets/build-pdf.sh build-pdf.sh
# Auto-detect single .md file in directory (landscape default)
./build-pdf.sh
# Portrait mode
./build-pdf.sh --portrait document.md
# Monospace font for ASCII diagrams
./build-pdf.sh --monospace diagrams.md
# Explicit input/output
./build-pdf.sh input.md output.pdf
DETECT_EOF| Flag | Description |
|---|---|
| Landscape orientation (default) |
| Portrait orientation |
| Use DejaVu Sans Mono - ideal for ASCII diagrams |
| Hide |
| Show help message |
references.bib<details>pandoc file.md -o file.pdf \
--pdf-engine=xelatex \
-V geometry:a4paper,landscape \
-V geometry:margin=1in \
-V fontsize=11pt \
-V mainfont="DejaVu Sans" \
-V colorlinks=true \
-V linkcolor=blue \
-V urlcolor=blue \
--toc --toc-depth=2 \
--number-sections/usr/bin/env bash << 'SKILL_SCRIPT_EOF'
pandoc document.md \
-o document.pdf \
--pdf-engine=xelatex \
--toc \
--toc-depth=3 \
--number-sections \
-V geometry:margin=1in \
-V mainfont="DejaVu Sans" \
-H ${CLAUDE_PLUGIN_ROOT}/skills/pandoc-pdf-generation/assets/table-spacing-template.tex
SKILL_SCRIPT_EOFitp:graph-easy# Invoke the skill for general diagrams
Skill(itp:graph-easy)
# For ADR architecture diagrams
Skill(itp:adr-graph-easy-architect)# contains: file1, file2--hide-details<details><details>./build-pdf.sh --hide-details document.md## My Section
```diagram
┌─────┐ ┌─────┐
│ Box │ ──> │ Box │
└─────┘ └─────┘
```[Box] -> [Box]--hide-details<details>--number-sectionsitp:graph-easyopen output.pdflpr -P "PRINTER_NAME" -o Duplex=None output.pdflpr -P "PRINTER_NAME" -o Duplex=DuplexNoTumble output.pdf # Long-edge binding
lpr -P "PRINTER_NAME" -o Duplex=DuplexTumble output.pdf # Short-edge bindinglpstat -p -d| Issue | Cause | Solution |
|---|---|---|
| Font not found | DejaVu Sans not installed | |
| xelatex not found | MacTeX not installed | |
| Table breaks across pages | Missing longtable package | Include table-spacing-template.tex preamble |
| Double section numbers | Manual numbering in markdown | Remove manual numbers, use --number-sections only |
| ASCII diagram misaligned | Manual ASCII art | Use graph-easy skill for all diagrams |
| Bullet list renders as dashes | Markdown formatting issue | Check for proper blank lines before lists |
| Bibliography not rendering | Missing references.bib | Create .bib file or remove --bibliography flag |
| PDF file size too large | Embedded fonts | Use --pdf-engine-opt=-dEmbedAllFonts=false |