pandoc-unicode-workaround
하는 일
이 스킬은 특수 문자 때문에 pandoc이 실패할 때 Markdown을 PDF로 바꾸는 절차를 설명합니다. 문서에 체크 표시, 화살표, 대시 같은 기호가 있는 사람에게 맞습니다.
사용하는 경우
- ✓유니코드나 LaTeX 오류로 pandoc이 PDF 만들기에 실패할 때.
- ✓오류가 체크 표시, 화살표, 긴 대시 같은 특수 문자를 가리킬 때.
- ✓PDF가 필요하고 기호의 평범한 텍스트 버전을 받아들일 수 있는 경우.
스킬 링크
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pandoc-unicode-workaround/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“메모에 있는 체크 표시와 화살표 때문에 PDF 내보내기가 실패합니다. 평범한 텍스트로 바꾸고 PDF를 다시 만들어 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 먼저 기본 pandoc 명령으로 변환하고, 실패하면 특수 문자를 표에 있는 ASCII 대체 문자로 바꾼 뒤 다시 변환합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Pandoc Unicode Workaround
This skill provides a workflow for generating PDFs from Markdown using pandoc when LaTeX compilation fails due to Unicode character errors.
When to Use
Use this skill when:
pandoc document.md -o document.pdffails with LaTeX/Unicode errors- Error messages mention "Unicode character", "LaTeX Error", or specific characters like ✓, →, —, etc.
- You need to produce PDF output but pandoc's default LaTeX engine cannot handle special characters
Step-by-Step Procedure
Step 1: Attempt Initial PDF Generation
pandoc input.md -o output.pdf
If this succeeds, you're done. If it fails with Unicode/LaTeX errors, proceed to Step 2.
Step 2: Normalize Unicode Characters
Replace problematic Unicode characters with ASCII equivalents. Common replacements:
| Unicode Character | ASCII Replacement | Alternative |
|---|---|---|
| ✓ (checkmark) | [Y] or [X] | OK, ✓ removed |
| ✗ or ✘ (cross) | [N] | FAIL |
| → (arrow right) | -> | => |
| ← (arrow left) | <- | |
| — (em dash) | -- or - | --- |
| – (en dash) | - | |
| • (bullet) | - | * |
| © (copyright) | (c) | Copyright |
| ® (registered) | (R) | |
| ™ (trademark) | (TM) | |
| … (ellipsis) | ... | |
| " (smart quotes) | " or ' |
Step 3: Apply Replacements
Option A - Manual edit: Open the Markdown file and manually replace the characters using find/replace.
Option B - Automated with sed (Linux/Mac):
sed -i 's/✓/[Y]/g' input.md
sed -i 's/✗/[N]/g' input.md
sed -i 's/→/->/g' input.md
sed -i 's/—/--/g' input.md
Option C - Automated with Python:
replacements = {
'✓': '[Y]',
'✗': '[N]',
'→': '->',
'—': '--',
'–': '-',
'…': '...',
'"': '"',
'"': '"',
}
with open('input.md', 'r', encoding='utf-8') as f:
content = f.read()
for orig, repl in replacements.items():
content = content.replace(orig, repl)
with open('input.md', 'w', encoding='utf-8') as f:
f.write(content)
Step 4: Regenerate PDF
pandoc input.md -o output.pdf
Step 5: Verify Output
Check that the PDF was generated successfully and review the content to ensure character replacements are acceptable for your use case.
Alternative Approaches
If Unicode normalization is not acceptable:
Use a different PDF engine:
pandoc input.md -o output.pdf --pdf-engine=wkhtmltopdfUse XeLaTeX (better Unicode support):
pandoc input.md -o output.pdf --pdf-engine=xelatexAdd LaTeX packages for Unicode:
pandoc input.md -o output.pdf -H header.texWhere header.tex contains:
\usepackage{fontspec} \usepackage{xunicode}
Tips
- Keep the original Markdown file before normalization if you need to preserve characters
- Document which characters were replaced for future reference
- Test with a small sample first if working with large documents
- For Word documents (.docx), Unicode issues are less common; this pattern is primarily for PDF generation
Error Indicators
Common LaTeX Unicode errors to watch for:
- ! LaTeX Error: Unicode character ... not set up for use with LaTeX
- Package inputenc Error: Unicode character ... not set up
- ! Missing character: There is no ... in font ...
자주 묻는 질문
먼저 일반 변환을 시도하나요?
네, 가이드는 기본 pandoc 명령으로 시작하고 실패할 때만 텍스트를 정리합니다.
체크 표시는 무엇으로 바꾸나요?
가이드는 대괄호 안의 Y나 X 같은 표시를 제안합니다.
대체 목록이 있나요?
네, 가이드에는 각 기호를 평범한 대체 문자에 연결하는 표가 있습니다.
상세 정보
작성자의 원본 설명
Handle LaTeX Unicode errors in pandoc PDF generation by normalizing special characters to ASCII
repo: HKUDS/AgentPilot
인기도
- GitHub 스타
- 7.8k
- 순위
- #12907
- 라이선스
- 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 파일에 누가 접근할 수 있는지 확인하고 바꾸도록 돕습니다.