pandoc-pdf-error-recovery
하는 일
이 스킬은 불분명한 메시지로 실패하는 pandoc PDF 변환을 위한 단계별 복구 계획입니다. 문서에서 PDF를 얻어야 하는데 pandoc이 완료하지 못하는 사람에게 맞습니다.
사용하는 경우
- ✓pandoc이 PDF 변환에 실패하고 모호한 메시지를 줄 때.
- ✓pandoc이 설치되지 않았거나 컴퓨터에서 찾을 수 없을 때.
- ✓xelatex 같은 특정 엔진으로 PDF를 만들고 싶은 경우.
스킬 링크
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pandoc-pdf-error-recovery/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“pandoc PDF 변환이 모호한 오류로 실패합니다. 복구 단계를 차례로 진행해서 작동하는 PDF를 만들어 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 pandoc이 설치되었는지 확인하고, 있는 PDF 엔진을 찾고, 모든 출력을 기록하면서 xelatex로 다시 시도하며, 그 로그를 보고 다음 수정을 정합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Pandoc PDF Error Recovery
Overview
When pandoc fails to convert documents to PDF with an "unknown error" or similar vague message, follow this systematic diagnostic and recovery workflow.
Step-by-Step Procedure
1. Verify Pandoc Installation
First confirm pandoc is installed and accessible:
pandoc --version
If this fails, install pandoc before proceeding:
- macOS:
brew install pandoc - Linux:
sudo apt-get install pandocorsudo yum install pandoc - Windows: Download from https://pandoc.org/installing.html
2. Check Available PDF Engines
Identify which PDF rendering engines are available on the system:
which pdflatex xelatex lualatex wkhtmltopdf context
Common engines and their typical use cases:
- pdflatex: Standard LaTeX, fast but limited Unicode support
- xelatex: Full Unicode support, recommended for most modern documents
- lualatex: Lua scripting support, good for complex layouts
- wkhtmltopdf: HTML/CSS rendering, good for web-style documents
- context: ConTeXt typesetting system
3. Attempt Conversion with Explicit Engine
Try conversion with xelatex first (most versatile for general documents):
pandoc input.md -o output.pdf --pdf-engine=xelatex 2>&1 | tee conversion.log
The 2>&1 | tee pattern captures both stdout and stderr to a log file for analysis.
4. Analyze Error Output
If conversion fails, examine the captured log:
cat conversion.log
Common error patterns and solutions:
- Missing LaTeX packages: Install with
tlmgr install <package>or system package manager - Font issues: Specify fonts with
-V mainfont="Font Name" - Missing engine: Fall back to available engine (go to Step 5)
5. Try Alternative Engines
Systematically try other available engines:
# Fallback to pdflatex
pandoc input.md -o output.pdf --pdf-engine=pdflatex 2>&1 | tee conversion-pdflatex.log
# Or try wkhtmltopdf for HTML-rich content
pandoc input.md -o output.pdf --pdf-engine=wkhtmltopdf 2>&1 | tee conversion-wkhtmltopdf.log
# Or try lualatex for complex documents
pandoc input.md -o output.pdf --pdf-engine=lualatex 2>&1 | tee conversion-lualatex.log
6. Install Missing Dependencies
If all engines fail or are missing, install required packages:
# Full TeX Live installation (comprehensive but large)
sudo apt-get install texlive-full
# Or minimal installation with common packages
sudo apt-get install texlive-latex-base texlive-fonts-recommended
# For xelatex font support
sudo apt-get install fonts-noto fonts-dejavu
7. Simplify and Retry
If errors persist, try conversion with minimal options:
pandoc input.md -o output.pdf --pdf-engine=xelatex --standalone
Remove complex formatting, custom headers, or advanced LaTeX features that may be causing issues.
Quick Reference Command
Complete diagnostic one-liner:
pandoc --version && which pdflatex xelatex wkhtmltopdf && pandoc input.md -o output.pdf --pdf-engine=xelatex -v
Tips
- Always capture stderr (
2>&1) to see the actual error message - Use
-v(verbose) flag for more detailed output during troubleshooting - For non-English documents, xelatex or lualatex are usually required
- HTML/CSS-heavy documents may work better with wkhtmltopdf
- Check system disk space - PDF generation can require significant temporary space
자주 묻는 질문
pandoc은 어떻게 설치하나요?
가이드는 macOS용 brew, Linux용 apt 또는 yum 설치 명령과, Windows용 다운로드 링크를 나열합니다.
어떤 PDF 엔진이 나열되나요?
가이드는 pdflatex, xelatex, lualatex, wkhtmltopdf, ConTeXt를 나열합니다.
로그 파일은 무엇에 도움이 되나요?
전체 출력을 보관해서 실패한 단계를 찾을 수 있게 합니다.
상세 정보
작성자의 원본 설명
Systematic approach to diagnose and recover from pandoc PDF conversion unknown errors
repo: HKUDS/AgentPilot
인기도
- GitHub 스타
- 7.8k
- 순위
- #12904
- 라이선스
- MIT
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
agentpilot
7.8k작업을 준비하고 AgentPilot 루프를 실행해 변경을 제안, 테스트, 점수화하면서 프로젝트를 단계적으로 개선하도록 돕습니다.
openspace
7.8k에이전트 스킬을 저장하고 가져오는 도구인 OpenSpace를 설정하고, MCP를 통해 AI 앱에 연결하도록 돕습니다.
rsi-arena
7.8kAIME나 Terminal-Bench 같은 표준 AI 벤치마크 테스트를 설정하고 실행해 서로 다른 개선 방법을 비교하도록 돕습니다.
experiment-guide
7.8k프로그램을 개선하는 방법을 조사하면서 작은 실험을 계획하고, 결과를 읽고, 발견 사항을 기록하도록 돕습니다.
비슷한 스킬
feishu-doc
394k에이전트가 문서 도구를 사용해 텍스트, 이미지, 표를 포함한 Feishu 클라우드 문서를 읽고, 만들고, 편집하도록 돕습니다.
feishu-drive
394k에이전트가 봇과 공유된 Feishu 클라우드 폴더의 파일을 찾아보고, 정리하고, 댓글을 달도록 돕습니다.
feishu-perm
394k에이전트가 요청을 충족하는 가장 작은 권한을 골라, Feishu 파일에 누가 접근할 수 있는지 확인하고 바꾸도록 돕습니다.