Agent skill

Render PDF Doc

by Aperivue in Aperivue/medsci-skills

A skill your agent uses when rendering a Markdown document (English or Korean) such as a proposal, IRB cover letter, handout or reference table to PDF via pandoc and xelatex, with auto-fitted table…

MITAuto-check: notesDocuments & Office

Install Render PDF Doc

skills CLI
$ npx skills add Aperivue/medsci-skills --skill render-pdf-doc -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Aperivue/medsci-skills render-pdf-doc --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Aperivue/medsci-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/render-pdf-doc .claude/skills/render-pdf-doc && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
render-pdf-doc
GitHub stars
329
Token cost
~2.1k tokens
SKILL.md length
901 words
Files
22 (incl. scripts, references)
Skills in repo
54
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when rendering a Markdown document (English or Korean) such as a proposal, IRB cover letter, handout or reference table to PDF via pandoc and xelatex, with auto-fitted table…

  • Works in 5 steps: Author markdown with frontmatter → Infer column widths → Render → …
  • Rendering a Markdown document (English
  • SKILL.md covers Dependencies, Workflow and Templates
  • Runs Shell and Python scripts from its folder; calls python3, bash and brew

What it does

Render PDF Doc is an agent skill from Aperivue/medsci-skills. Use when rendering a Markdown document (English or Korean) such as a proposal, IRB cover letter, handout or reference table to PDF via pandoc and xelatex, with auto-fitted table widths and CJK fonts. Not for manuscripts with a bibliography (/manage-refs) or Word forms.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 25 other files, including scripts and reference files (for example `references/known_pitfalls.md`, `references/pandoc_korean_cheatsheet.md` and `scripts/check_deps.sh`).

It sits in Documents & Office, covering PDF, Citation management and Resume and CV writing. It works with LaTeX and Pandoc. The repository describes itself as: Agent Skills for medical research — literature search, reporting-guideline & citation checks, statistics, publication figures, submission. Works with Claude Code, Codex, Cursor &… The licence is MIT.

When your agent uses it

  • Rendering a Markdown document (English
  • Korean) such as a proposal
  • IRB cover letter
  • Reference table to PDF via pandoc and xelatex

Example prompts

  • “/render-pdf-doc”

Requirements

  • Python 3
  • A Bash shell

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Author markdown with frontmatter
  2. Infer column widths
  3. Render
  4. 5 — Scientific-symbol + CJK glyph scan (before render)
  5. Visual verify

What it can do on your machine

Read from SKILL.md and the folder at commit 3b14ae2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 4 files in scripts/ (Shell and Python, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • bash
    • brew
    • winget
    • apt-get

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Render PDF Doc loads about 2.1k tokens when it runs, and up to ~3.3k if it reads all its reference files. Until then it costs about 71 tokens; SKILL.md has 901 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:27
    sudo apt-get install pandoc texlive-xetex texlive-lang-cjk fonts-noto-cjk

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from Aperivue/medsci-skills at commit 3b14ae2, republished under its MIT licence (© Aperivue). 901 words, ~2,062 tokens.

Download SKILL.mdSave it as .claude/skills/render-pdf-doc/SKILL.md (or your agent's skills folder). This skill also uses 21 other files; get the full folder from GitHub.
name
render-pdf-doc
description
Use when rendering a Markdown document (English or Korean) such as a proposal, IRB cover letter, handout or reference table to PDF via pandoc and xelatex, with auto-fitted table widths and CJK fonts. Not for manuscripts with a bibliography (/manage-refs) or Word forms.
metadata.triggers
render PDF, PDF 렌더, korean PDF, 한글 PDF, anchor doc PDF, briefing PDF, proposal PDF, 연구계획서 PDF, 표 정렬 PDF, 표 폭 자동, tbl-colwidths, 학술 PDF

Render-PDF-Doc Skill

This skill handles layout only (CJK fonts, table column widths) with raw pandoc + xelatex — no Quarto, whose tbl-colwidths has reported PDF regressions (issues 6089/9200). Not for: a manuscript with a bibliography (/manage-refs scripts/render_pandoc.sh), an institutional .docx form (/fill-protocol), the ICMJE COI form (/fill-icmje-coi), figures or PPTX (/make-figures, /present-paper).

Dependencies

Python 3 is required by the wrapper. FontTools is optional for the font-file coverage check (python3 -m pip install fonttools).

bash
# macOS
brew install pandoc
brew install --cask mactex-no-gui          # xelatex + xeCJK (~5 GB)

# Linux
sudo apt-get install pandoc texlive-xetex texlive-lang-cjk fonts-noto-cjk

# Windows (PowerShell) — run in Git Bash afterwards
winget install --id JohnMacFarlane.Pandoc
winget install --id MiKTeX.MiKTeX          # xelatex; installs missing LaTeX packages on demand
# No CJK font download needed: Malgun Gothic ships with Windows 7+ and is the default here.

Detection:

bash
bash scripts/check_deps.sh

On Windows / Git Bash, MiKTeX's bin directory (%LOCALAPPDATA%\Programs\MiKTeX\miktex\bin\x64) is often not on PATH; both check_deps.sh and render_pdf.sh probe it. If xelatex still reads [MISS], add that directory to PATH.

Workflow

Step 1 — Author markdown with frontmatter
yaml
---
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
---
  • Set both mainfont and CJKmainfont: without CJKmainfont, Hangul falls back to Times New Roman (broken glyphs or blanks). Use Noto Sans CJK KR on Linux/CI and Malgun Gothic on Windows; the render script auto-detects the per-OS default when the fields are absent.
  • Read every number in a table from the source CSV or analysis output. Do not retype a number from prose or carry one forward from an earlier draft — a table correct in v3 is not evidence it is correct in v4.
  • A circulation PDF carries no change history, internal version numbers (e.g. v3.2.2) or PI attribution: put them in a separate circulation file or a supplementary. Keep the received primary source (the .docx or .eml a co-author sent) unmodified as its own artifact — the PDF is a derivative, and the next round is diffed against the source. If that source was AI-drafted by a collaborator, re-derive every number, denominator and author-year in it from the underlying paper or analysis output before it reaches the PDF.
Step 2 — Infer column widths

Never split pipe-table columns equally: a column holding only short labels then gets the same width as the data columns, which cramps them. Size from content instead:

bash
python3 scripts/infer_colwidths.py input.md > input.colwidths.md

For each pipe table it computes per-column display width = max(len(header), max(len(cell))) (CJK = 2 cells, ASCII = 1) and rewrites the separator row with proportional dash counts. To set widths by hand, write the separator dashes yourself and render without --infer-colwidths.

Step 3 — Render
bash
bash scripts/render_pdf.sh -i input.colwidths.md -o output.pdf

Or one-shot:

bash
bash scripts/render_pdf.sh -i input.md -o output.pdf --infer-colwidths

Frontmatter wins over wrapper defaults, including --font / --cjk-font. Missing fields use the wrapper or OS defaults. This also applies to geometry, fontsize, linestretch and colorlinks (including false). Explicit pandoc -V / -M arguments after -- still override frontmatter; for example, -- -V fontsize=10pt. The wrapper logs font fallbacks, not the final fonts.

The standard article class honours only 10pt, 11pt and 12pt and silently ignores any other size. When the effective fontsize is anything else and no documentclass is set, the wrapper switches to KOMA-Script scrartcl (pandoc's documented route), adds classoption: fontsize=<size> when you set no classoption (KOMA reads a fractional size such as 8.5pt only that way), and logs the switch. Set documentclass yourself to override it.

Show full SKILL.md (436 more words)Show less
Step 3.5 — Scientific-symbol + CJK glyph scan (before render)

xelatex can finish successfully with missing glyphs. render_pdf.sh counts the Missing character warnings pandoc relays: if there are any, it lists each glyph (code point, count, font) and exits 4 — the PDF is written but incomplete. It reads them from pandoc's JSON --log (yours if you pass one after --), so a pass-through --quiet does not hide them. --allow-missing-glyphs prints the same list and exits 0. Academic markdown routinely carries glyphs a default Latin font misses: transition arrows (→ ↑ ↓), math operators (− ≤ ≥ ± √ ∪ × ≈ ≠), stats Greek (κ μ σ β), bullets/marks (• ★ ✓), and CJK. Scan the source first so a silent drop is caught before it ships:

bash
python3 scripts/scan_glyph_coverage.py input.md --strict
# real cmap check when you have the font file + fonttools:
python3 scripts/scan_glyph_coverage.py input.md --font "/path/to/body.otf" --strict
# TTC/OTC collections require the zero-based face index used by the renderer:
python3 scripts/scan_glyph_coverage.py input.md --font "/path/to/body.ttc" --font-index 0 --strict --json glyphs.json

Without --font it groups the risky glyphs by class (advisory); with --font + fonttools it checks every non-ASCII character of the source that the font is asked to draw — not only the five classes, so °, µ, ², ‰, ∞ and – are covered too — and reports which are absent from one face's preferred Unicode cmap (format characters such as a BOM or zero-width joiner, and the no-break spaces and … that pandoc writes as ASCII TeX, are not looked up), never combining coverage across collection faces — choose the face (index and PostScript name are in the report) that matches the rendered font. A missing dependency, unreadable font, missing face selection or invalid index is reported as font_checked: false with a reason in font_check; an empty missing_in_font list then means unverified, not full coverage. Default mode exits 0; --strict exits 1 when risky glyphs are unverified or missing (ASCII-only input still exits 0). The scan does not verify shaping, fallback fonts, math fonts or final PDF glyphs.

If risky glyphs are present, make sure mainfont/CJKmainfont cover them — a CJK-capable font such as Apple SD Gothic Neo / Noto Sans CJK usually covers arrows and Hangul but can still miss the true-minus − U+2212 and ★. The DOCX is authoritative; the PDF is a convenience copy — never let a PDF render drop a glyph the document needs.

Step 4 — Visual verify

Open the PDF and check:

  • First-column labels stay on one line; data columns have enough width.
  • No broken Korean glyphs (a Times New Roman fallback means CJKmainfont was not applied).
  • No missing scientific symbols (arrows, −, ≤, ±, √) — the Step 3.5 scan flags candidates.
  • No change history or internal version numbers exposed.

Read references/known_pitfalls.md when a render still looks wrong (em-dash overflow, smart quotes under CJKmainfont, | inside a cell), and references/pandoc_korean_cheatsheet.md for Korean frontmatter and font patterns.

Templates

Starter markdown in templates/ (English default; a Korean variant *_ko.md ships alongside each), with slots marked <!-- TODO: -->:

  • anchor-doc.md — Q&A grid
  • proposal-cover.md — research-proposal cover page
  • briefing-handout.md — meeting brief (1-page)
  • reference-table.md — comparison-table format

© Aperivue, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 21 other files (scripts, references) in skills/render-pdf-doc of Aperivue/medsci-skills.

  • SKILL.md
  • references/known_pitfalls.md
  • references/pandoc_korean_cheatsheet.md
  • scripts/check_deps.sh
  • scripts/infer_colwidths.py
  • scripts/render_pdf.sh
  • scripts/scan_glyph_coverage.py
  • skill.yml
  • templates/anchor-doc.md
  • templates/anchor-doc_ko.md
  • templates/briefing-handout.md
  • templates/briefing-handout_ko.md
  • templates/proposal-cover.md
  • templates/proposal-cover_ko.md
  • templates/reference-table.md
  • templates/reference-table_ko.md
  • tests/fixtures
  • … and 5 more

Open the folder on GitHubat commit 3b14ae2

Compare with similar skills

Render PDF Doc next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Render PDF Doc compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Render PDF Doc this skillAperivue/medsci-skills329—~2.1kAutomated safety check: NotesMIT
Harness Book Best Practicewquguru/harness-books3.2k—~4.1kAutomated safety check: PassNone
Pandic OfficeTeam-Commonly/commonly1.4k—~642Automated safety check: PassApache-2.0
Pdf2texCalix-L/awesome-latex-skills180—~1.4kAutomated safety check: PassMIT
Evidence Ledgerwanshuiyin/Anti-Autoresearch161—~11kAutomated safety check: NotesMIT
Literature Statisticsaipoch/medical-research-skills2k—~1.9kAutomated safety check: PassMIT

Similar skills

  • Harness Book Best Practice

    wquguru/harness-books

    Best practices for working on the Harness books repo. An agent skill from wquguru/harness-books.

    3.2k GitHub stars~4.1k tokensUpdated 5 mo ago
    Documents & OfficeAuto-check passed
  • Pandic Office

    Team-Commonly/commonly

    Convert Markdown to PDF (or DOCX/EPUB/HTML) using the pandoc CLI.

    1.4k GitHub stars~642 tokensUpdated today
    Documents & OfficeAuto-check passed
  • Pdf2tex

    Calix-L/awesome-latex-skills

    Reconstruct editable LaTeX from PDF content using page-aware extraction and visual comparison.

    180 GitHub stars~1.4k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Evidence Ledger

    wanshuiyin/Anti-Autoresearch

    Build the deterministic evidence ledger (artifactmanifest.json + claims.json) that every other Anti-Autoresearch auditor reads.

    161 GitHub stars~11k tokensUpdated yesterday
    Documents & OfficeAuto-check: notes
  • Literature Statistics

    aipoch/medical-research-skills

    Generate statistics for publication-year and journal distributions from local references or PDFs; use when you need standardized Year/Journal tables and a summary without any network access.

    2k GitHub stars~1.9k tokensUpdated 21 days ago
    Documents & OfficeAuto-check passed
  • Quarto Clean

    brycewang-stanford/Auto-Empirical-Research-Skills

    Cleans a Quarto (.qmd) file by replacing LaTeX holdovers with proper Quarto/Pandoc syntax so the document renders correctly to HTML, PDF (Typst/LaTeX), and Word.

    4.5k GitHub stars~3.3k tokensUpdated 2 days ago
    Documents & OfficeAuto-check passed

More from Aperivue/medsci-skills

All 54 skills in this repo
  • Model Assessment

    Aperivue/medsci-skills

    A skill your agent uses when validating or evaluating a trained medical-imaging model.

    329 GitHub starsUsed in 1 repo~4.5k tokens
    Auto-check passed
  • Obsidian Paper Vault

    Aperivue/medsci-skills

    A skill your agent uses when turning a folder of research PDFs into Obsidian notes, even if Obsidian is not named.

    329 GitHub stars~1.6k tokensUpdated 2 days ago
    Auto-check passed
  • Radiomics ML

    Aperivue/medsci-skills

    A skill your agent uses when building or auditing a radiomics or tabular clinical-ML prediction model with a classical learner (LASSO, SVM, random forest, XGBoost and similar).

    329 GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Verify Refs

    Aperivue/medsci-skills

    A skill your agent uses when checking whether a manuscript's references are real.

    329 GitHub starsUsed in 1 repo~3.1k tokens
    Auto-check passed
  • Clean Data

    Aperivue/medsci-skills

    A skill your agent uses when a clinical CSV/Excel dataset needs profiling and cleaning before analysis (missing values, outliers, duplicates, type mismatches).

    329 GitHub stars~2k tokensUpdated 2 days ago
    Auto-check passed
  • Design Study

    Aperivue/medsci-skills

    A skill your agent uses when checking a radiology or medical AI study design before drafting or submission.

    329 GitHub stars~3.9k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Render PDF Doc

What does Render PDF Doc do?

A skill your agent uses when rendering a Markdown document (English or Korean) such as a proposal, IRB cover letter, handout or reference table to PDF via pandoc and xelatex, with auto-fitted table…. Render PDF Doc is an agent skill from Aperivue/medsci-skills. Use when rendering a Markdown document (English or Korean) such as a proposal, IRB cover letter, handout or reference table to PDF via pandoc and xelatex, with auto-fitted table widths and CJK fonts.

When should I use Render PDF Doc?

Render PDF Doc fits situations like: rendering a Markdown document (English; korean) such as a proposal; IRB cover letter; reference table to PDF via pandoc and xelatex.

How do I install Render PDF Doc in Claude Code?

Run `npx skills add Aperivue/medsci-skills --skill render-pdf-doc -a claude-code`. Or copy the skill folder (skills/render-pdf-doc in Aperivue/medsci-skills) into .claude/skills/render-pdf-doc in your project. Claude Code loads it when a task matches its description.

How do I install Render PDF Doc in Codex?

Run `npx skills add Aperivue/medsci-skills --skill render-pdf-doc -a codex`. Or copy the skill folder (skills/render-pdf-doc in Aperivue/medsci-skills) into .agents/skills/render-pdf-doc in your project. Codex loads it when a task matches its description.

Can I use Render PDF Doc in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Aperivue/medsci-skills --skill render-pdf-doc -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/render-pdf-doc, .gemini/skills/render-pdf-doc, .github/skills/render-pdf-doc and .opencode/skills/render-pdf-doc in your project.

What does Render PDF Doc need to run?

Going by SKILL.md and its folder, Render PDF Doc needs a shell and Python for the scripts in its folder and the command-line tools its instructions call (python3, bash, brew, winget and apt-get). Our summary lists: Python 3; A Bash shell.

Does Render PDF Doc access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Render PDF Doc safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Render PDF Doc use?

Render PDF Doc is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Render PDF Doc use?

About 2.1k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.2k tokens, read only when the agent opens those files.

What are the alternatives to Render PDF Doc?

Skills that share tags, products or a category with Render PDF Doc: Harness Book Best Practice (wquguru/harness-books, 3.2k stars), Pandic Office (Team-Commonly/commonly, 1.4k stars), Pdf2tex (Calix-L/awesome-latex-skills, 180 stars) and Evidence Ledger (wanshuiyin/Anti-Autoresearch, 161 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Render PDF Doc?

Aperivue (a GitHub organization) maintains it in Aperivue/medsci-skills, which has 329 GitHub stars. The repository holds 54 skills in this directory. The repository was last updated on October 5, 2026.

Source: Aperivue/medsci-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.