md-to-pdf
Installation
SKILL.md
Markdown to PDF
Convert markdown to PDF using pandoc with xelatex. Produces clean sans-serif output with syntax-highlighted code blocks.
Prerequisites
pandoc(brew install pandoc)basictex(brew install --cask basictex)- LaTeX packages:
sudo tlmgr install fontspec unicode-math selnolig upquote microtype parskip xurl bookmark fancyvrb csquotes framed
Command
pandoc INPUT.md -o OUTPUT.pdf \
--resource-path=DIRECTORY_CONTAINING_IMAGES \
--pdf-engine=xelatex \
-V mainfont="Helvetica Neue" \
-V monofont="Menlo" \
-V fontsize=11pt \
-V geometry:margin=1in \
-V colorlinks=true \
-V linkcolor=NavyBlue \
-V urlcolor=NavyBlue \
--syntax-highlighting=tango
Usage Notes
--resource-pathmust point to the directory containing any images referenced in the markdown (relative paths). Usually the directory the markdown file lives in.- On macOS,
Helvetica NeueandMenloare always available. On Linux, substitute withDejaVu Sans/DejaVu Sans Mono. On Windows,Segoe UI/Cascadia Code. - For long code blocks that overflow, add
-V geometry:margin=0.75into give more horizontal room. - The
tangosyntax highlighting theme works well with light backgrounds. Other options:kate,monochrome,espresso,haddock,zenburn.
Related skills
More from jancbeck/dotfiles
osascript
Use when user wants to control Mac, automate macOS, interact with Apple apps (Notes, Safari, Finder, etc), or run AppleScript commands.
46memento
Extract session memories into CLAUDE.md - because Claude forgets, but your notes don't
10cfg
Sync dotfiles - pull, resolve conflicts, commit changes, and push
5docs
Execute the Claude Code Docs helper script at ~/.claude-code-docs/claude-docs-helper.sh
3