Help us improve
Share bugs, ideas, or general feedback.
From medsci-presentation
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.
npx claudepluginhub aperivue/medsci-skills --plugin medsci-literatureHow this skill is triggered — by the user, by Claude, or both
Slash command
/medsci-presentation:render-pdf-docinheritThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Markdown + frontmatter → publication-quality academic PDF (English or Korean).
references/known_pitfalls.mdreferences/pandoc_korean_cheatsheet.mdscripts/check_deps.shscripts/infer_colwidths.pyscripts/render_pdf.shskill.ymltemplates/anchor-doc.mdtemplates/anchor-doc_ko.mdtemplates/briefing-handout.mdtemplates/briefing-handout_ko.mdtemplates/proposal-cover.mdtemplates/proposal-cover_ko.mdtemplates/reference-table.mdtemplates/reference-table_ko.mdConverts 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 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.
Converts Markdown to professionally styled PDFs with Mermaid diagrams, LaTeX/KaTeX math, tables, and syntax-highlighted code blocks.
Share bugs, ideas, or general feedback.
Markdown + frontmatter → publication-quality academic PDF (English or Korean).
In real circulation cycles for academic PDFs, two recurring failure patterns appear:
Manual fixes work but the same pattern recurs across proposals, briefings, IRB covers, exemption applications. This skill focuses on layout (CJK fonts + table column widths). Bibliography and CSL are handled by /manage-refs.
| Task | Skill |
|---|---|
| Manuscript + bibliography → DOCX/PDF | /manage-refs scripts/render_pandoc.sh (CSL + .bib) |
| Filling an institutional .docx form | /fill-protocol |
| ICMJE COI form | /fill-icmje-coi |
| Figure / PPTX | /make-figures, /present-paper |
| This skill: non-bib academic markdown → PDF (proposal, briefing, anchor doc, IRB cover) | /render-pdf-doc |
mainfont + CJKmainfont. The default fallback is OS-detected.redact_internal: true option.tbl-colwidths has reported PDF regressions (issues 6089/9200).# Required
brew install pandoc # macOS
brew install --cask mactex-no-gui # xelatex + xeCJK (~5 GB)
# Linux
sudo apt-get install pandoc texlive-xetex texlive-lang-cjk fonts-noto-cjk
Detection:
bash scripts/check_deps.sh
---
title: "Paper 2 Calibration Anchor — Q&A Grid"
author: "<Author Group>"
date: "2026-05-01"
mainfont: "Apple SD Gothic Neo" # macOS default
CJKmainfont: "Apple SD Gothic Neo"
geometry: "margin=0.85in"
fontsize: 11pt
linestretch: 1.25
colorlinks: true
---
For Linux/CI, use Noto Sans CJK KR instead. The render script auto-detects.
python scripts/infer_colwidths.py input.md > input.colwidths.md
The script:
max(len(header), max(len(cell))) (CJK = 2 cells, ASCII = 1).Override per-table via attribute: {tbl-colwidths="[20,40,40]"} after caption — passes through unchanged.
bash scripts/render_pdf.sh -i input.colwidths.md -o output.pdf
Or one-shot:
bash scripts/render_pdf.sh -i input.md -o output.pdf --infer-colwidths
Open the PDF. Check:
Starter markdown in templates/ (English default; a Korean variant *_ko.md ships alongside each):
anchor-doc.md — Q&A gridproposal-cover.md — research-proposal cover pagebriefing-handout.md — meeting brief (1-page)reference-table.md — comparison-table formatEach template marks slots with a <!-- TODO: --> marker.
| Anti-pattern | Consequence |
|---|---|
Equal dash split (|---|---|---|) | A column with only a short label gets the same width → cramped data columns |
CJKmainfont not set | Hangul falls back to Times New Roman (broken Latin glyphs or blanks) |
| Change history / version (e.g. v3.2.2) / PI attribution exposed in a circulation PDF | Confuses the first recipient; leaks internal information |
Quarto tbl-colwidths for PDF | PDF regression in Quarto 1.4+ — trust HTML only |
scripts/render_pdf.sh — pandoc + xelatex wrapper, OS font detectionscripts/infer_colwidths.py — auto-generates pipe-table separator dash ratiosscripts/check_deps.sh — checks for pandoc / xelatex / CJK fonttemplates/ — 4 starters (English) + their *_ko.md Korean variantsreferences/pandoc_korean_cheatsheet.md — collection of frontmatter patterns (Korean-PDF reference)references/known_pitfalls.md — em-dash line breaks, smart quotes, etc. (Korean-PDF reference)~/.claude/rules/numerical-safety.md. Read from CSV./manage-refs separately — this skill does not handle bib.~/.claude/rules/senior-mentor-circulation.md (preserve the primary source) + ~/.claude/rules/ai-drafted-document-policy.md.