Help us improve
Share bugs, ideas, or general feedback.
From thinking-frameworks-skills
Renders a polished markdown report to a letter-size PDF using pandoc with xelatex (11pt serif, 1-inch margins, numbered footnotes). Fails loudly with install instructions if pandoc or xelatex is missing.
npx claudepluginhub lyndonkl/claude --plugin thinking-frameworks-skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/thinking-frameworks-skills:markdown-to-pdfThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Converts a finished markdown report to a PDF using pandoc and the xelatex engine, with formatting tuned for analyst-style output.
Converts Markdown to professionally styled PDFs with Mermaid diagrams, LaTeX/KaTeX math, tables, and syntax-highlighted code blocks.
Converts Markdown documents to professionally typeset PDFs using reportlab (primary) or pandoc+XeLaTeX (fallback). Handles CJK/Latin mixed text, code blocks, tables, Obsidian callouts, math formulas, and 14 color themes. Triggered by "markdown to PDF", "md2pdf", "any2pdf", or export requests.
Renders academic Markdown documents (English or Korean) to publication-quality PDF via pandoc + xelatex, with auto-inferred pipe-table column widths and CJK font fallback. Targets non-bibliography artifacts: proposals, IRB covers, briefings, anchor docs, reference tables.
Share bugs, ideas, or general feedback.
Converts a finished markdown report to a PDF using pandoc and the xelatex engine, with formatting tuned for analyst-style output.
This skill assumes pandoc and a LaTeX engine are already on the user's PATH. It does not install anything. If either tool is missing, the render command exits with the exact install instructions and the user installs once.
macOS:
brew install pandoc basictex
sudo tlmgr update --self
sudo tlmgr install xetex
basictex is about 90 MB. Do not install mactex unless the user specifically needs the full LaTeX stack (~5 GB).
Linux (Debian/Ubuntu):
sudo apt install pandoc texlive-xetex texlive-fonts-recommended
After installation, open a new shell so xelatex is on PATH.
Copy this checklist into the working response and tick each step as it completes:
Markdown-to-PDF render:
- [ ] Step 1: Verify the input markdown file exists.
- [ ] Step 2: Verify pandoc is on PATH. If missing, print the pandoc install block and stop.
- [ ] Step 3: Verify xelatex is on PATH. If missing, print the xelatex install block and stop.
- [ ] Step 4: Create the output directory if it does not already exist.
- [ ] Step 5: Run the pandoc command exactly as specified below.
- [ ] Step 6: Confirm the output PDF file exists. Report its path.
command -v pandoc
If this exits non-zero, print the block in "Failure messages" labelled pandoc-missing and stop. Do not proceed to Step 5.
command -v xelatex
If this exits non-zero, print the block in "Failure messages" labelled xelatex-missing and stop. Do not proceed to Step 5.
Substitute the input and output paths but do not modify any flag:
pandoc <INPUT_MD> \
--from markdown+footnotes+yaml_metadata_block \
--pdf-engine=xelatex \
--output <OUTPUT_PDF> \
--variable geometry:margin=1in \
--variable papersize=letter \
--variable fontsize=11pt \
--variable linestretch=1.2 \
--variable colorlinks=true \
--variable linkcolor=black \
--variable urlcolor=black \
--variable toccolor=black
The variables are tuned for analyst-style output: letter-size paper, 1-inch margins, 11pt body at 1.2 line height, all hyperlinks rendered in black so the printed page reads cleanly.
test -s <OUTPUT_PDF> && echo "PDF rendered: <OUTPUT_PDF>"
If the output file does not exist or is empty after pandoc returns success, treat that as a render failure and surface the pandoc stderr to the user.
Print these blocks exactly as written. They are the contract with the user.
ERROR: pandoc is not installed.
This skill requires pandoc and a LaTeX engine.
Install on macOS:
brew install pandoc basictex
sudo tlmgr update --self
sudo tlmgr install xetex
Install on Linux (Debian/Ubuntu):
sudo apt install pandoc texlive-xetex texlive-fonts-recommended
Open a new shell after installing so the new binaries are on PATH, then re-run.
ERROR: xelatex is not installed.
pandoc is present, but the LaTeX engine (xelatex) is missing.
Install on macOS:
brew install basictex
sudo tlmgr update --self
sudo tlmgr install xetex
Install on Linux (Debian/Ubuntu):
sudo apt install texlive-xetex texlive-fonts-recommended
Open a new shell after installing, then re-run.
text.[^1] in the body with [^1]: ... definitions later in the file. These render as proper LaTeX footnotes.title:, subtitle:, and date: fields, those will appear in the rendered title block.