Agent skill

Pandoc Unicode Workaround

by HKUDS in HKUDS/OpenSpace

Handle LaTeX Unicode errors in pandoc PDF generation by normalizing special characters to ASCII

MITAuto-check passedDocuments & Office

Install Pandoc Unicode Workaround

skills CLI
$ npx skills add HKUDS/OpenSpace --skill pandoc-unicode-workaround -a claude-code

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

GitHub CLI
$ gh skill install HKUDS/OpenSpace pandoc-unicode-workaround --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/HKUDS/OpenSpace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/benchmarks/gdpval/skills/pandoc-unicode-workaround .claude/skills/pandoc-unicode-workaround && 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
pandoc-unicode-workaround
GitHub stars
7.8k
Token cost
~917 tokens
SKILL.md length
311 words
Files
2
Skills in repo
199
Repo updated
First seen
Licence
MIT

At a glance

Handle LaTeX Unicode errors in pandoc PDF generation by normalizing special characters to ASCII

  • Works in 5 steps: Attempt Initial PDF Generation → Normalize Unicode Characters → Apply Replacements → …
  • Tasks that involve PDF
  • SKILL.md covers When to Use, Step-by-Step Procedure, Alternative Approaches and Tips, plus 1 more section
  • Calls pandoc

What it does

Pandoc Unicode Workaround is an agent skill from HKUDS/OpenSpace. Handle LaTeX Unicode errors in pandoc PDF generation by normalizing special characters to ASCII

Its SKILL.md is about 920 tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.

It sits in Documents & Office, covering PDF and LaTeX. It works with Pandoc and LaTeX. The repository describes itself as: "OpenSpace: The Skill Management Layer for AI Agents" -- https://open-space.cloud/. The licence is MIT.

When your agent uses it

  • Tasks that involve PDF
  • Tasks that involve LaTeX

Example prompts

  • “/pandoc-unicode-workaround”

Requirements

  • Python 3

Workflow steps

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

  1. Attempt Initial PDF Generation
  2. Normalize Unicode Characters
  3. Apply Replacements
  4. Regenerate PDF
  5. Verify Output

What it can do on your machine

Read from SKILL.md and the folder at commit 3827781. 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

    Shell commands in SKILL.md call:

    • pandoc

    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

Pandoc Unicode Workaround loads about 917 tokens when it runs. Until then it costs about 30 tokens; SKILL.md has 311 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~30
When it runs · the whole SKILL.md, loaded when a task matches
~917

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 passed

The automated check found no risky patterns in SKILL.md.

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from HKUDS/OpenSpace at commit 3827781, republished under its MIT licence (© HKUDS). 311 words, ~917 tokens.

Download SKILL.mdSave it as .claude/skills/pandoc-unicode-workaround/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
pandoc-unicode-workaround
description
Handle LaTeX Unicode errors in pandoc PDF generation by normalizing special characters to ASCII

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.pdf fails 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
bash
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 CharacterASCII ReplacementAlternative
✓ (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):

bash
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:

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
bash
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:

  1. Use a different PDF engine:

    bash
    pandoc input.md -o output.pdf --pdf-engine=wkhtmltopdf
  2. Use XeLaTeX (better Unicode support):

    bash
    pandoc input.md -o output.pdf --pdf-engine=xelatex
  3. Add LaTeX packages for Unicode:

    bash
    pandoc input.md -o output.pdf -H header.tex

    Where header.tex contains:

    latex
    \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 ...

© HKUDS, 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 1 other file in benchmarks/gdpval/skills/pandoc-unicode-workaround of HKUDS/OpenSpace.

  • SKILL.md
  • .skill_id

Open the folder on GitHubat commit 3827781

Compare with similar skills

Pandoc Unicode Workaround 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.

Pandoc Unicode Workaround compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pandoc Unicode Workaround this skillHKUDS/OpenSpace7.8k—~917Automated safety check: PassMIT
Md To PDFMathews-Tom/armory329—~2.4kAutomated safety check: PassMIT
Md To PDF Academicwentorai/research-plugins2981 repos~1.8kAutomated safety check: NotesMIT
Harness Book Best Practicewquguru/harness-books3.2k—~4.1kAutomated safety check: PassNone
AI Review SkillNeuroDong/Ai-Review628—~2.5kAutomated safety check: PassMIT
MineruNebutra/MinerU-Skill123—~504Automated safety check: PassMIT

Similar skills

  • Md To PDF

    Mathews-Tom/armory

    Convert Markdown to styled PDFs with Mermaid diagrams, LaTeX/KaTeX math, tables, and code highlighting.

    329 GitHub stars~2.4k tokensUpdated 4 days ago
    Documents & OfficeAuto-check passed
  • Md To PDF Academic

    wentorai/research-plugins

    Convert Markdown to publication-quality PDF with LaTeX math rendering

    298 GitHub starsUsed in 1 repo~1.8k tokens
    Documents & OfficeAuto-check: notes
  • 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
  • AI Review Skill

    NeuroDong/Ai-Review

    Generates structured AI paper reviews (SoT style) for LaTeX, PDF, and Word manuscripts.

    628 GitHub stars~2.5k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Mineru

    Nebutra/MinerU-Skill

    An AI-Native skill for parsing PDF / Office / image files into Markdown with MinerU — a fast, zero-config document parser for AI agents.

    123 GitHub stars~504 tokensUpdated 16 days ago
    Documents & OfficeAuto-check passed
  • Lecture To Md

    ysyecust/lecture-to-notes

    把课堂视频(本地或 B 站/YouTube)、文字稿、课件三者(任意组合)整理成一份详细的中文 Markdown 课堂笔记,输出按课程标题命名的 {titlename}.md(首行为 文档标题)+ 相对路径图片。Markdown 工作流,与上游 lecture-to-notes 的 LaTeX/PDF 输出并行存在;上游 skill 完全不动。触发词:markdown 笔记、md 笔记、视频转…

    273 GitHub stars~3.9k tokensUpdated 7 days ago
    Documents & OfficeAuto-check passed

More from HKUDS/OpenSpace

All 199 skills in this repo
  • Walks through producing a master audio track plus stems in Python, from checking a reference file and timing sections by BPM to effects, a zip archive and final verification.

    7.8k GitHub stars~2.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Handle cascading data retrieval tool failures by falling back to embedded knowledge generation

    7.8k GitHub stars~765 tokensUpdated 1 mo ago
    Auto-check passed
  • Gives an agent a workaround when its code-execution sandbox keeps failing: save the Python script to a file and run it through the shell instead.

    7.8k GitHub stars~588 tokensUpdated 1 mo ago
    Auto-check passed
  • A recovery routine for agents whose sandboxed code runner keeps failing: save the Python script to disk, then run it through the shell and read the output.

    7.8k GitHub stars~652 tokensUpdated 1 mo ago
    Auto-check passed
  • Fallback ladder for failed sandboxed code runs, plus the habit of fixing the working directory first so generated files land in the right place.

    7.8k GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Fallback workflow for executing Python code when executecodesandbox fails repeatedly

    7.8k GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Pandoc Unicode Workaround

What does Pandoc Unicode Workaround do?

Handle LaTeX Unicode errors in pandoc PDF generation by normalizing special characters to ASCII. Pandoc Unicode Workaround is an agent skill from HKUDS/OpenSpace.

When should I use Pandoc Unicode Workaround?

Pandoc Unicode Workaround fits situations like: tasks that involve PDF; tasks that involve LaTeX.

How do I install Pandoc Unicode Workaround in Claude Code?

Run `npx skills add HKUDS/OpenSpace --skill pandoc-unicode-workaround -a claude-code`. Or copy the skill folder (benchmarks/gdpval/skills/pandoc-unicode-workaround in HKUDS/OpenSpace) into .claude/skills/pandoc-unicode-workaround in your project. Claude Code loads it when a task matches its description.

How do I install Pandoc Unicode Workaround in Codex?

Run `npx skills add HKUDS/OpenSpace --skill pandoc-unicode-workaround -a codex`. Or copy the skill folder (benchmarks/gdpval/skills/pandoc-unicode-workaround in HKUDS/OpenSpace) into .agents/skills/pandoc-unicode-workaround in your project. Codex loads it when a task matches its description.

Can I use Pandoc Unicode Workaround 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 HKUDS/OpenSpace --skill pandoc-unicode-workaround -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pandoc-unicode-workaround, .gemini/skills/pandoc-unicode-workaround, .github/skills/pandoc-unicode-workaround and .opencode/skills/pandoc-unicode-workaround in your project.

What does Pandoc Unicode Workaround need to run?

Going by SKILL.md and its folder, Pandoc Unicode Workaround needs the command-line tools its instructions call (pandoc). Our summary lists: Python 3.

Does Pandoc Unicode Workaround 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 Pandoc Unicode Workaround safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pandoc Unicode Workaround use?

Pandoc Unicode Workaround 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 Pandoc Unicode Workaround use?

About 917 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Pandoc Unicode Workaround?

Skills that share tags, products or a category with Pandoc Unicode Workaround: Md To PDF (Mathews-Tom/armory, 329 stars), Md To PDF Academic (wentorai/research-plugins, 298 stars), Harness Book Best Practice (wquguru/harness-books, 3.2k stars) and AI Review Skill (NeuroDong/Ai-Review, 628 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pandoc Unicode Workaround?

HKUDS (a GitHub organization) maintains it in HKUDS/OpenSpace, which has 7,754 GitHub stars. The repository holds 199 skills in this directory. The repository was last updated on August 12, 2026.

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