agentsclimarketplace

Pdf

Skill magnusrodseth/dotfiles/.claude/skills/pdf

⚙️ There are many like them, but these dotfiles are mine. A stow-managed macOS setup: Zsh, Neovim, tmux, Ghostty, and a pile of Claude Code tooling.

Install
npx -y skills add magnusrodseth/dotfiles --skill pdf

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Export markdown as professional PDF using pandoc + typst (no LaTeX needed). Use when the user asks to: create a PDF, export markdown to PDF, generate a report/handout/document as PDF, or when they mention PDF, pandoc, print-ready, or document export.

SKILL.md

6.3 KB, ~1.8k tokens by cl100k_base, as published. Nobody here has run it

Markdown to PDF

Export markdown files as professional PDFs using pandoc + typst. Typst is the default engine: it needs no LaTeX toolchain, is fast, and handles full Unicode (including æ/ø/å) out of the box. An optional eisvogel + xelatex path is available for a branded colored title page when a LaTeX install is present.

Prerequisites

  • pandoc (3.0+): brew install pandoc
  • typst (0.11+): brew install typst

That's it for the default path. Everything below works with just pandoc + typst.

Optional (only for the branded --engine xelatex title-page path):

  • LaTeX with xelatex: brew install --cask basictex
  • Eisvogel template: download eisvogel.latex from https://github.com/Wandmalfarbe/pandoc-latex-template/releases into ~/.local/share/pandoc/templates/
  • LaTeX packages: tlmgr --usermode install adjustbox babel-german background bidi collectbox csquotes everypage filehook footmisc footnotebackref framed fvextra letltxmacro ly1 mdframed mweights needspace pagecolor sourcecodepro sourcesanspro titling ucharcat ulem unicode-math upquote xecjk xurl zref

Mermaid diagrams (optional): npm install -g @mermaid-js/mermaid-cli

Quick Export

bash ~/.claude/skills/pdf/scripts/md-to-pdf.sh \
  -o report.pdf \
  -t "Report Title" \
  -s "Subtitle" \
  -a "Author Name" \
  --lang nb \
  --toc \
  input.md

Defaults to the typst engine. Hyperlinks render blue automatically. For the branded colored title page instead, add --engine xelatex (requires the optional LaTeX install above).

Script Flags

FlagDefaultDescription
-o, --output(required)Output PDF path
-t, --title"Untitled"Document title
-s, --subtitle""Subtitle
-a, --author""Author name
-d, --datetodayDate (DD.MM.YYYY)
--enginetypsttypst (default) or xelatex (branded title page)
--langenDocument language code (e.g. nb for Norwegian Bokmål)
--tocoffInclude table of contents
--highlight-styletangoCode syntax theme
--mainfontengine defaultBody font (e.g. "Helvetica Neue")
--monofontengine defaultCode font (e.g. "Menlo")
--fontsize11ptFont size
--margin1inPage margins
--mermaidoffPre-render mermaid diagrams (requires mmdc)
--title-color1e293bTitle-page background hex (xelatex only)
--text-colorffffffTitle-page text hex (xelatex only)
--no-titlepageoffSkip title page (xelatex only; typst has no separate title page)

Multiple input files are concatenated with page breaks between them.

Custom Export Workflow (typst)

When assembling a document by hand or needing fine control, call pandoc directly.

Step 1: Write or Assemble Markdown

Standard markdown features:

  • # for major sections, ## for subsections
  • Standard markdown tables
  • Fenced code blocks with a language ID for syntax highlighting
  • [colored text]{color="red"} for colored text (via color-spans.lua; works in typst)
  • Markdown links render blue automatically

Step 2: Run Pandoc with the typst engine

pandoc input.md -o output.pdf \
  --from=markdown+bracketed_spans \
  --pdf-engine=typst \
  --syntax-highlighting=tango \
  --toc --toc-depth=3 \
  --lua-filter=~/.claude/skills/pdf/scripts/color-spans.lua \
  -V margin-x=2cm \
  -V margin-y=2.2cm \
  -V fontsize=11pt \
  -V 'header-includes=#show link: set text(fill: blue)' \
  --metadata title="Title" \
  --metadata subtitle="Subtitle" \
  --metadata author="Author" \
  --metadata date="19.06.2026" \
  --metadata lang=nb

The header-includes show rule is what makes links blue under typst. Drop it for default black links.

typst variables (via -V)

VariableExampleNotes
margin-x / margin-y2cmHorizontal / vertical page margins
papersizea4Defaults to a4
fontsize11ptBody font size
mainfontHelvetica NeueSystem font name (macOS resolves these)
monofontMenloCode font
section-numbering1.1.1Numbered headings
header-includes#show link: set text(fill: blue)Raw typst injected into the preamble

Title, subtitle, author, and date come from --metadata; the typst template renders them as a centered heading block at the top of page one.

Optional: Branded Title Page (eisvogel + xelatex)

Only when you specifically want the colored full-page title and a LaTeX toolchain is installed (see optional Prerequisites). Add --engine xelatex to the script, or run pandoc directly:

pandoc input.md -o output.pdf \
  --from=markdown+bracketed_spans \
  --template=eisvogel \
  --pdf-engine=xelatex \
  --syntax-highlighting=tango \
  --toc --toc-depth=3 \
  --lua-filter=~/.claude/skills/pdf/scripts/color-spans.lua \
  -V titlepage=true \
  -V titlepage-color="1e293b" \
  -V titlepage-text-color="ffffff" \
  -V titlepage-rule-color="ffffff" \
  -V titlepage-rule-height=2 \
  -V toc-own-page=true \
  -V colorlinks=true -V linkcolor=blue -V urlcolor=blue \
  -V mainfont="Helvetica Neue" -V monofont="Menlo" \
  -V fontsize=11pt -V geometry:margin=1in \
  --metadata title="Title" --metadata author="Author"

If xelatex is not installed this path fails with xelatex not found — use the default typst engine instead.

Mermaid Diagrams

If the markdown contains mermaid code blocks, use the --mermaid flag with md-to-pdf.sh. It pre-processes mermaid blocks into SVG before PDF generation. Requires mmdc (mermaid-cli): npm install -g @mermaid-js/mermaid-cli.

Highlight Styles

Available syntax themes: pygments, tango, espresso, zenburn, kate, monochrome, breezedark, haddock.

Bundled Scripts

FilePurpose
scripts/md-to-pdf.shOne-command markdown to PDF export (typst default, --engine xelatex optional)
scripts/color-spans.luaEnables [text]{color="red"} syntax (typst + LaTeX + HTML)
scripts/render-mermaid.shPre-renders mermaid blocks to SVG

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.