Yuno Wang

md2pdf-xelatex

Officev1.0.0
By Yuno WangUpdated 2026-05-17@clawhub_huaruoji/md2pdf-xelatex
DocumentsPDF#PDF

According to AlphaMoat, as of 2026-09, md2pdf-xelatex has 1,977 downloads and 0 stars — ranked #4,443 of 5,078 AI skills overall, and #346 of 435 in Office.

Installs
133
Downloads
2.0K
Stars
-
Overall Rank
#4,443
Top 88% overall · Top 80% in Office
PlatformInstallsDownloadsStarsComments
ClawHub ↗511.8K--
SkillHub ↗1332.0K-—

Platforms count differently and update at different times.

What this skill does

The skill handles code blocks, tables, and mixed CJK and Latin text; conversion depends on local Pandoc, XeLaTeX, and suitable fonts. Untrusted Markdown may contain raw TeX interpreted by XeLaTeX, so use trusted documents or isolate external files in a container or sandbox. Fontconfig is also required.

Profile published 2026-10-29

What you can do with it

  • Users converting Markdown with math, code, tables, or CJK text into printable PDFs.

When to use it

  • Confirm local dependencies and fonts first. Convert only Markdown you created or trust; use an isolated environment for downloaded or user-submitted files.

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Convert this trusted Markdown document to PDF while preserving math, tables, and CJK text, and report any missing local dependencies.

Monthly Trend

Downloads2.0K
5461.3K2.1K2026-03 · Downloads 6522026-05 · Downloads 1.2K2026-06 · Downloads 1.3K2026-07 · Downloads 1.6K2026-08 · Downloads 1.7K2026-09 · Downloads 2.0K26-0326-09
Stars-
0112026-03 · Stars -2026-05 · Stars -2026-06 · Stars -2026-07 · Stars -2026-08 · Stars -2026-09 · Stars -26-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-092.0K—-
2026-081.7K+9.8%-
2026-071.6K+18.0%-
2026-061.3K+14.2%-
2026-051.2K—-
2026-03652—-

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

2.3 KB · ClawHub v1.0.0
---
name: md2pdf
description: Convert Markdown files to PDF with full LaTeX math formula rendering and CJK (Chinese/Japanese/Korean) support. Use when the user asks to convert markdown to PDF, render a report as PDF, export notes to PDF, or generate a printable document from markdown. Handles $...$ inline and $$...$$ display math, code blocks, tables, and mixed CJK/Latin text. Requires pandoc + texlive-xetex.
---

# md2pdf

Convert Markdown → PDF via Pandoc + XeLaTeX. Full LaTeX math + CJK support.

## Prerequisites
Show all (67 lines)

System packages (apt):

```
pandoc texlive-xetex texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra texlive-lang-chinese
```

## Quick Convert

```bash
bash <skill_dir>/scripts/md2pdf.sh input.md output.pdf
```

The script auto-detects CJK content, picks suitable fonts, sanitizes emoji, adds TOC, and configures XeLaTeX.

## Manual Pandoc Command

For fine-grained control, run pandoc directly:

```bash
pandoc input.md -o output.pdf \
  --pdf-engine=xelatex \
  -f markdown-smart \
  -H header.tex \
  -V mainfont="DejaVu Sans" \
  -V monofont="DejaVu Sans Mono" \
  -V geometry:margin=20mm \
  -V fontsize=10pt \
  -V colorlinks=true \
  --highlight-style=tango \
  --toc -V toc-title="Table of Contents"
```

Where `header.tex` contains:

```latex
\usepackage{xeCJK}
\setCJKmainfont{<CJK font name>}
```

## Key Details

- **Math**: Pandoc natively converts `$...$` (inline) and `$$...$$` (display) to LaTeX math. No MathJax/KaTeX needed.
- **CJK fonts**: Script auto-detects from: Noto Sans CJK SC > WenQuanYi Micro Hei > Droid Sans Fallback > AR PL UMing CN.
- **Emoji**: Replaced with text equivalents (`✅` → `[Y]`, `❌` → `[N]`, `⭐` → `*`) since most LaTeX fonts lack emoji glyphs.
- **Smart quotes**: Use `-f markdown-smart` to avoid curly quote rendering issues.
- **Long tables**: Pandoc may struggle with complex tables; keep tables simple or use `longtable` LaTeX package.

## Troubleshooting

| Problem | Fix |
|---------|-----|
| Missing character warnings | Check `fc-list :lang=zh` for available CJK fonts; install `fonts-noto-cjk` if needed |
| `xelatex not found` | Install `texlive-xetex` |
| PDF has no math rendering | Ensure markdown uses `$...$` / `$$...$$` (not HTML math tags) |
| Broken table layout | Simplify table or add `-V geometry:margin=15mm` for more width |

Popular in Office

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.