latex-document-skill — Claude Code skill: overview & setup
Generates, compiles, and converts LaTeX documents into PDF files with PNG previews, handling technical reports, resumes, posters, and Beamer slides.
npx skills add ndpvt-web/latex-document-skill --skill latex-document-skill -a claude-codeWhat latex-document-skill does
The skill manages drafting .tex source files, selecting templates, and running the compilation pipeline. Its core script, scripts/compile_latex.sh, detects the required engine automatically among pdflatex, xelatex, or lualatex, filters compile logs with texfot, and renders PNG preview images. For documents spanning five pages or more, it applies layout guidelines to compact lists and scale figures.
Visual assets run through dedicated scripts. Matplotlib plots and Mermaid diagrams are exported to images using Python and shell scripts before insertion into the document. The workflow supports Pandoc document conversions, PDF diff generation using latexdiff, and OCR parsing via pytesseract. Compilation requires a local TeX installation; missing packages cause immediate build failures.
What it helps with
- compile research papers and Beamer presentations to PDF
- generate version diffs between TeX files with latexdiff
- convert Markdown or DOCX documents to LaTeX format
- render matplotlib graphs and Mermaid charts for document inclusion
Example prompts for the agent
- Build a two-column IEEE paper from my draft and generate a matplotlib chart
- Compile report.tex using xelatex and show me a PNG preview of the first page
- Generate a diff PDF between version1.tex and version2.tex using latexdiff
How to install latex-document-skill
1Skills CLI (Vercel)
npx skills add ndpvt-web/latex-document-skill --skill latex-document-skill -a claude-code2Manually: put the files in place
~/.claude/skills/latex-document-skill/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/latex-document-skill/
1Skills CLI (Vercel)
npx skills add ndpvt-web/latex-document-skill --skill latex-document-skill -a codex2Manually: put the files in place
.agents/skills/latex-document-skill/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ndpvt-web/latex-document-skill --skill latex-document-skill -a cursor2Manually: put the files in place
.cursor/skills/latex-document-skill/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ndpvt-web/latex-document-skill latex-document-skill2Manually: put the files in place
.github/skills/latex-document-skill/SKILL.md1Skills CLI (Vercel)
npx skills add ndpvt-web/latex-document-skill --skill latex-document-skill -a gemini-cli2Platform CLI
gemini skills install https://github.com/ndpvt-web/latex-document-skillManually: put the files in place
.devin/skills/latex-document-skill/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ndpvt-web/latex-document-skill --skill latex-document-skill -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about latex-document-skill
How do I install latex-document-skill in Claude Code?
Run npx skills add ndpvt-web/latex-document-skill --skill latex-document-skill -a claude-code in your terminal.
What does latex-document-skill do?
It drafts LaTeX code, renders charts, converts document formats, and compiles .tex files into PDF output with PNG preview images.
Which TeX engine does the compilation script use?
The included scripts/compile_latex.sh script detects requirements automatically and chooses pdflatex, xelatex, or lualatex. It selects xelatex whenever multilingual or CJK scripts appear.