{"id":"11baef81-8143-4376-9c41-917505630e81","shortId":"a9bssU","kind":"skill","title":"lovstudio:any2pdf","tagline":"Convert Markdown documents to professionally typeset PDF files. Primary engine: reportlab (cover pages, frontispiece, back cover, bookmarks). Fallback engine: pandoc + XeLaTeX (better table handling, LaTeX-quality typesetting). Handles CJK/Latin mixed text, fenced code blocks, ta","description":"# any2pdf — Markdown to Professional PDF\n\nThis skill converts any Markdown file into a publication-quality PDF using Python's\nreportlab library. It was developed through extensive iteration on real Chinese\ntechnical reports and solves several hard problems that naive MD→PDF converters\nget wrong.\n\n## When to Use\n\n- User wants to convert `.md` → `.pdf`\n- User has a markdown report/document and wants professional typesetting\n- Document contains CJK characters (Chinese/Japanese/Korean) mixed with Latin text\n- Document has fenced code blocks, markdown tables, or nested lists\n- User wants a cover page, table of contents, or watermark in their PDF\n\n## Quick Start\n\n```bash\npython md2pdf/scripts/md2pdf.py \\\n  --input report.md \\\n  --output report.pdf \\\n  --title \"My Report\" \\\n  --author \"Author Name\" \\\n  --theme warm-academic\n```\n\nAll parameters except `--input` are optional — sensible defaults are applied.\n\n## Pre-Conversion Options (MANDATORY)\n\n**IMPORTANT: You MUST use the `AskUserQuestion` tool to ask these questions BEFORE\nrunning the conversion. Do NOT list options as plain text — use the tool so the user\ngets a proper interactive prompt. Ask all options in a SINGLE `AskUserQuestion` call.**\n\nUse `AskUserQuestion` with the following template. The tone should be friendly and\nconcise — like a design assistant, not a config form:\n\n```\n开始转 PDF！先帮你确认几个选项 👇\n\n━━━ 📐 设计风格 ━━━\n a) 暖学术    — 陶土色调，温润典雅，适合人文/社科报告\n b) 经典论文  — 棕色调，灵感源自 LaTeX classicthesis，适合学术论文\n c) Tufte     — 极简留白，深红点缀，适合数据叙事/技术写作\n d) 期刊蓝    — 藏蓝严谨，灵感源自 IEEE，适合正式发表风格\n e) 精装书    — 咖啡色调，书卷气，适合长篇专著/技术书\n f) 中国红    — 朱红配暖纸，适合中文正式报告/白皮书\n g) 水墨      — 纯灰黑，素雅克制，适合文学/设计类内容\n h) GitHub    — 蓝白极简，程序员熟悉的风格\n i) Nord 冰霜 — 蓝灰北欧风，清爽现代\n j) 海洋      — 青绿色调，清新自然\n k) LaTeX 清爽 — pandoc+XeLaTeX 原生排版，无封面无装饰，干净学术风（需装 pandoc+texlive）\n l) 咨询深蓝  — 深海军蓝色块 + 白底 + 大写左对齐标题，麦肯锡 / BCG / Deloitte 研究报告风格\n\n━━━ 🖼 扉页图片（封面之后的全页插图） ━━━\n 1) 跳过\n 2) 我提供本地图片路径\n 3) AI 根据内容自动生成一张\n\n━━━ 💧 水印 ━━━\n 1) 不加\n 2) 自定义文字（如 \"DRAFT\"、\"内部资料\"）\n    可选调整：字号(默认52)、透明度(0-1)、角度(默认35°)、间距\n\n━━━ 📇 封底物料（名片/二维码/品牌） ━━━\n 1) 跳过\n 2) 我提供图片\n 3) 纯文字信息\n\n示例回复：\"a, 扉页跳过, 水印:仅供学习参考, 封底图片:/path/qr.png\"\n直接说人话就行，不用记编号 😄\n```\n\n### Mapping User Choices to CLI Args\n\n| Choice | CLI arg |\n|--------|---------|\n| Design style a-k | `--theme` with value from table below (k uses pandoc engine) |\n| Frontispiece local | `--frontispiece <path>` |\n| Frontispiece AI | Generate image first, then `--frontispiece /tmp/frontispiece.png` |\n| Watermark text | `--watermark \"文字\"` |\n| Watermark style | `--wm-size 30 --wm-opacity 0.1 --wm-angle 45` (all optional) |\n| Image as cover | `--image-cover true` (requires `--frontispiece`) |\n| Back cover image | `--banner <path>` |\n| Back cover text | `--disclaimer \"声明\"` and/or `--copyright \"© 信息\"` |\n\n### Theme Name Mapping\n\n| Choice | `--theme` value | Inspiration |\n|--------|----------------|-------------|\n| a) 暖学术 | `warm-academic` | Lovstudio design system |\n| b) 经典论文 | `classic-thesis` | LaTeX classicthesis |\n| c) Tufte | `tufte` | Edward Tufte's books |\n| d) 期刊蓝 | `ieee-journal` | IEEE journal format |\n| e) 精装书 | `elegant-book` | LaTeX ElegantBook |\n| f) 中国红 | `chinese-red` | Chinese formal documents |\n| g) 水墨 | `ink-wash` | 水墨画 / ink wash painting |\n| h) GitHub | `github-light` | GitHub Markdown style |\n| i) Nord | `nord-frost` | Nord color scheme |\n| j) 海洋 | `ocean-breeze` | — |\n| k) LaTeX 清爽 | `latex-clean` | pandoc+XeLaTeX 原生排版，无封面 |\n| l) 咨询深蓝 | `consulting-navy` | McKinsey / BCG / Deloitte deep-research report |\n\n### Handling AI-Generated Frontispiece\n\nIf user chose AI generation: read the document title + first paragraphs, use an\nimage generation tool to create a themed illustration matching the chosen design\nstyle, show for approval, then pass via `--frontispiece /path/to/image.png`\n\n## Architecture\n\n```\nMarkdown → Preprocess (split merged headings) → Parse (code-fence-aware) → Story (reportlab flowables) → PDF build\n```\n\nKey components:\n1. **Font system**: Palatino (Latin body), Songti SC (CJK body), Menlo (code) on macOS; auto-fallback on Linux\n2. **CJK wrapper**: `_font_wrap()` wraps CJK character runs in `<font>` tags for automatic font switching\n3. **Mixed text renderer**: `_draw_mixed()` handles CJK/Latin mixed text on canvas (cover, headers, footers)\n4. **Code block handler**: `esc_code()` preserves indentation and line breaks in reportlab Paragraphs\n5. **Smart table widths**: Proportional column widths based on content length, with 18mm minimum\n6. **Bookmark system**: `ChapterMark` flowable creates PDF sidebar bookmarks + named anchors\n7. **Heading preprocessor**: `_preprocess_md()` splits merged headings like `# Part## Chapter` into separate lines\n\n## Hard-Won Lessons\n\n### CJK Characters Rendering as □\n\nreportlab's `Paragraph` only uses the font in ParagraphStyle. If `fontName=\"Mono\"` but\ntext contains Chinese, they render as □. **Fix**: Always apply `_font_wrap()` to ALL text\nthat might contain CJK, including code blocks.\n\n### Code Blocks Losing Line Breaks\n\nreportlab treats `\\n` as whitespace. **Fix**: `esc_code()` converts `\\n` → `<br/>` and\nleading spaces → `&nbsp;`, applied BEFORE `_font_wrap()`.\n\n### CJK/Latin Word Wrapping\n\nDefault reportlab breaks lines only at spaces, causing ugly splits like \"Claude\\nCode\".\n**Fix**: Set `wordWrap='CJK'` on body/bullet styles to allow breaks at CJK character boundaries.\n\n### Canvas Text with CJK (Cover/Footer)\n\n`drawString()` / `drawCentredString()` with a Latin font can't render 年/月/日 etc.\n**Fix**: Use `_draw_mixed()` for ALL user-content canvas text (dates, stats, disclaimers).\n\n### Images Silently Dropped (Relative Paths)\n\n`![alt](charts/chart_01.png)` in a markdown file used to get skipped without warning\nbecause the image path was resolved against the current working directory, not the\nmarkdown's directory. **Fix**: `main()` now passes `input_dir` (the .md's directory)\ninto the builder, and the image handler resolves relative paths against it. Missing\nimages now also emit a `WARN: image not found: ...` to stderr instead of silently\ndropping.\n\n### Multi-Line Image References (pandoc `--wrap=auto`)\n\nWhen feeding pandoc's output into md2pdf, pandoc's default `--wrap=auto` (72 cols)\nwraps long `![alt text very long](path.png)` across multiple lines, which defeated\nthe single-line image regex. **Fix**: `_preprocess_md()` now collapses multi-line\nimage references into one line (outside code fences) before parsing.\n\n**Pipeline tip:** If you're piping HTML → markdown via pandoc, use\n`pandoc --wrap=none input.html -o output.md` to avoid wrap-related parsing issues\nfor images and tables alike.\n\n## Input Format\n\nThis skill takes **Markdown files only** as input. If you have HTML, DOCX, or\nother formats, convert them to markdown first (e.g. `pandoc --wrap=none`).\nEmbedded HTML blocks in markdown are passed through as text — pre-process any\nvisual content (charts, complex tables) into plain markdown tables or image\nreferences before invoking md2pdf.\n\n## Configuration Reference\n\n| Argument | Default | Description |\n|----------|---------|-------------|\n| `--input` | (required) | Path to markdown file |\n| `--output` | `output.pdf` | Output PDF path |\n| `--title` | From first H1 | Document title for cover page |\n| `--subtitle` | `\"\"` | Subtitle text |\n| `--author` | `\"\"` | Author name |\n| `--date` | Today | Date string |\n| `--version` | `\"\"` | Version string for cover |\n| `--watermark` | `\"\"` | Watermark text (empty = none) |\n| `--theme` | `warm-academic` | Color theme name |\n| `--theme-file` | `\"\"` | Custom theme JSON file path |\n| `--cover` | `true` | Generate cover page |\n| `--toc` | `true` | Generate table of contents |\n| `--page-size` | `A4` | Page size (A4 or Letter) |\n| `--frontispiece` | `\"\"` | Full-page image after cover |\n| `--banner` | bundled `assets/backcover-banner.jpg` | Back cover banner image (pass `none` to disable) |\n| `--header-title` | `\"\"` | Report title in page header |\n| `--footer-left` | author | Brand/author in footer |\n| `--stats-line` | `\"\"` | Stats on cover |\n| `--stats-line2` | `\"\"` | Second stats line |\n| `--edition-line` | `\"\"` | Edition line at cover bottom |\n| `--disclaimer` | `\"\"` | Back cover disclaimer |\n| `--copyright` | `\"\"` | Back cover copyright |\n| `--code-max-lines` | `30` | Max lines per code block |\n| `--image-cover` | `false` | Use frontispiece as full-bleed cover (page 1), text cover becomes page 2 |\n| `--heading-top-spacer` | `5` | Top spacer before H1/H2 chapter titles in mm |\n| `--wm-size` | auto (half page width) | Watermark font size; auto-scales so text width ≈ 50% of page width |\n| `--wm-opacity` | `0.1` | Watermark opacity (0.0–1.0) |\n| `--wm-angle` | `35` | Watermark rotation angle in degrees |\n| `--wm-spacing-x` | `9999` | Watermark horizontal spacing in pt (≥2000 = single centered per page) |\n| `--wm-spacing-y` | `9999` | Watermark vertical spacing in pt (≥2000 = single centered per page) |\n\n## Themes\n\nAvailable: `warm-academic`, `nord-frost`, `github-light`, `solarized-light`,\n`paper-classic`, `ocean-breeze`, `consulting-navy`.\n\nEach theme defines: page background, ink color, accent color, faded text, border, code background, watermark tint.\n\n## Fallback: pandoc + XeLaTeX\n\nWhen reportlab fails (e.g. wide/complex tables cause infinite loops in table width\ncalculation), fall back to pandoc with XeLaTeX. This produces high-quality CJK PDFs\nwith proper table handling.\n\n### When to use pandoc engine\n\n- User chose `latex-clean` theme (k) — pandoc is the primary engine, not a fallback\n- Document has many wide multi-column tables (reportlab's table layout may hang)\n- Document needs LaTeX-quality typesetting (justified text, hyphenation)\n- reportlab md2pdf.py hangs or crashes on the input\n\n### Basic command\n\n    pandoc input.md -o output.pdf \\\n      --pdf-engine=xelatex \\\n      -V CJKmainfont=\"Songti SC\" -V mainfont=\"Palatino\" -V monofont=\"Menlo\" \\\n      -V geometry:margin=2.5cm -V fontsize=11pt \\\n      --toc -V toc-title=\"目录\" -V documentclass=article\n\n### Adding watermark + headers/footers\n\n    pandoc input.md -o output.pdf \\\n      --pdf-engine=xelatex \\\n      -V CJKmainfont=\"Songti SC\" -V mainfont=\"Palatino\" -V monofont=\"Menlo\" \\\n      -V geometry:margin=2.5cm -V fontsize=11pt \\\n      -V colorlinks=true -V linkcolor=red -V toccolor=red -V urlcolor=red \\\n      --toc -V toc-title=\"目录\" -V documentclass=article \\\n      -V header-includes='\n    \\usepackage{fancyhdr}\n    \\pagestyle{fancy}\n    \\fancyhf{}\n    \\fancyhead[L]{\\small 页眉左侧文字}\n    \\fancyhead[R]{\\small 页眉右侧文字}\n    \\fancyfoot[C]{\\thepage}\n    \\usepackage{draftwatermark}\n    \\SetWatermarkText{水印文字}\n    \\SetWatermarkScale{0.5}\n    \\SetWatermarkColor[gray]{0.9}\n    '\n\n### Pandoc theme presets\n\nEach preset defines a complete set of pandoc `-V` flags. Use the full command from\n\"Adding watermark + headers/footers\" above, replacing the color/link flags per preset.\n\n| Theme | linkcolor | toccolor | urlcolor | Watermark color | Notes |\n|-------|-----------|----------|----------|-----------------|-------|\n| chinese-red | `red` | `red` | `red` | `[gray]{0.9}` | 朱红正式，适合政企报告、白皮书 |\n| warm-academic | `brown` | `brown` | `brown` | `[gray]{0.9}` | 陶土色调，温润学术风 |\n| classic-thesis | `brown` | `brown` | `brown` | `[gray]{0.85}` | LaTeX classicthesis 灵感 |\n| ieee-journal | `blue` | `blue` | `blue` | `[gray]{0.9}` | 藏蓝严谨，期刊风格 |\n| github-light | `blue` | `blue` | `blue` | `[gray]{0.92}` | 极简蓝白，程序员友好 |\n| ink-wash | `black` | `black` | `black` | `[gray]{0.92}` | 水墨素雅，文学/设计类 |\n| nord-frost | `teal` | `teal` | `teal` | `[gray]{0.9}` | 北欧冰霜蓝灰 |\n| consulting-navy | `blue` | `blue` | `blue` | `[gray]{0.88}` | 咨询深蓝，研究报告风 |\n\n#### chinese-red 完整示例（本次一滕项目实际使用）\n\n    pandoc input.md -o output.pdf \\\n      --pdf-engine=xelatex \\\n      -V CJKmainfont=\"Songti SC\" -V mainfont=\"Palatino\" -V monofont=\"Menlo\" \\\n      -V geometry:margin=2.5cm -V fontsize=11pt \\\n      -V colorlinks=true -V linkcolor=red -V toccolor=red -V urlcolor=red \\\n      --toc -V toc-title=\"目录\" -V documentclass=article \\\n      -V header-includes='\n    \\usepackage{fancyhdr}\n    \\pagestyle{fancy}\n    \\fancyhf{}\n    \\fancyhead[L]{\\small 报告标题 | 品牌名}\n    \\fancyhead[R]{\\small 商业机密}\n    \\fancyfoot[C]{\\thepage}\n    \\usepackage{draftwatermark}\n    \\SetWatermarkText{商业机密}\n    \\SetWatermarkScale{0.5}\n    \\SetWatermarkColor[gray]{0.9}\n    '\n\n#### latex-clean 完整示例（最简洁的 LaTeX 学术风格）\n\n选择 `latex-clean` 时，**跳过 reportlab**，直接使用 pandoc 生成。特点：无封面、无扉页、\n无装饰色块，纯 LaTeX 排版 + 点线 TOC 引导符，适合内容为王的学术/技术文档。\n\n    pandoc input.md -o output.pdf \\\n      --pdf-engine=xelatex \\\n      -V CJKmainfont=\"Songti SC\" -V mainfont=\"Palatino\" -V monofont=\"Menlo\" \\\n      -V geometry:margin=2.5cm -V fontsize=11pt \\\n      -V colorlinks=true -V linkcolor=brown -V toccolor=brown -V urlcolor=brown \\\n      --toc -V toc-title=\"目录\" -V documentclass=article\n\n如需添加页眉页脚或水印，参考上方 \"Adding watermark + headers/footers\" 追加 `-V header-includes`。\n\n### Known limitations (pandoc fallback)\n\n- No cover page (pandoc article class has no built-in cover — use `--include-before-body` with a LaTeX snippet if needed)\n- Frontispiece/back cover not supported (use md2pdf.py for these)\n- `→` `★` `☆` symbols may warn in Palatino — they render via CJK font fallback, safe to ignore\n- ASCII art diagrams render as code blocks (same as md2pdf.py)\n\n### Dependencies (pandoc fallback)\n\nRequires `pandoc` and a TeX distribution with XeLaTeX:\n\n    brew install pandoc\n    brew install --cask mactex-no-gui   # or basictex\n\n## Dependencies\n\n```bash\npip install reportlab --break-system-packages\n```","tags":["any2pdf","skills","lovstudio","agent-skills","ai-coding-assistant","cjk","claude-code","cursor","gemini-cli","markdown-to-docx","markdown-to-pdf"],"capabilities":["skill","source-lovstudio","skill-any2pdf","topic-agent-skills","topic-ai-coding-assistant","topic-cjk","topic-claude-code","topic-cursor","topic-gemini-cli","topic-markdown-to-docx","topic-markdown-to-pdf"],"categories":["skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/lovstudio/skills/any2pdf","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add lovstudio/skills","source_repo":"https://github.com/lovstudio/skills","install_from":"skills.sh"}},"qualityScore":"0.470","qualityRationale":"deterministic score 0.47 from registry signals: · indexed on github topic:agent-skills · 40 github stars · SKILL.md body (13,424 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T00:56:33.970Z","embedding":null,"createdAt":"2026-04-18T22:18:52.100Z","updatedAt":"2026-04-22T00:56:33.970Z","lastSeenAt":"2026-04-22T00:56:33.970Z","tsv":"'-1':331 '/path/qr.png':351 '/path/to/image.png':572 '/tmp/frontispiece.png':388 '0':330 '0.0':1241 '0.1':402,1238 '0.5':1517,1716 '0.85':1584 '0.88':1635 '0.9':1520,1563,1574,1595,1626,1719 '0.92':1605,1615 '1':311,319,339,591,1196 '1.0':1242 '11pt':1432,1470,1668,1774 '18mm':666 '2':313,321,341,610,1201 '2.5':1428,1466,1664,1770 '2000':1262,1277 '3':315,343,625 '30':398,1178 '35':1246 '4':640 '45':406 '5':654,1206 '50':1231 '6':668 '7':679 '72':910 '9999':1256,1271 'a-k':365 'a4':1107,1110 'academ':152,441,1081,1286,1569 'accent':1312 'across':919 'ad':1442,1539,1798 'ai':316,382,536,542 'ai-gener':535 'alik':976 'allow':781 'also':877 'alt':824,914 'alway':721 'anchor':678 'and/or':427 'angl':405,1245,1249 'any2pdf':2,39 'appli':162,722,753 'approv':567 'architectur':573 'arg':359,362 'argument':1035 'art':1856 'articl':1441,1491,1689,1795,1814 'ascii':1855 'ask':176,201 'askuserquest':173,207,210 'assets/backcover-banner.jpg':1122 'assist':225 'author':146,147,1061,1062,1142 'auto':606,897,909,1218,1226 'auto-fallback':605 'auto-scal':1225 'automat':622 'avail':1283 'avoid':966 'awar':583 'b':240,445 'back':17,418,422,1123,1167,1171,1338 'background':1309,1318 'banner':421,1120,1125 'base':661 'bash':136,1889 'basic':1405 'basictex':1887 'bcg':306,528 'becom':1199 'better':24 'black':1611,1612,1613 'bleed':1193 'block':37,115,642,734,736,1006,1183,1861 'blue':1591,1592,1593,1601,1602,1603,1631,1632,1633 'bodi':596,600,1826 'body/bullet':778 'book':458,471 'bookmark':19,669,676 'border':1316 'bottom':1165 'boundari':786 'brand/author':1143 'break':650,739,762,782,1894 'break-system-packag':1893 'breez':511,1301 'brew':1876,1879 'brown':1570,1571,1572,1580,1581,1582,1780,1783,1786 'build':588 'builder':864 'built':1819 'built-in':1818 'bundl':1121 'c':247,452,1510,1709 'calcul':1336 'call':208 'canva':636,787,814 'cask':1881 'caus':767,1330 'center':1264,1279 'chapter':689,1211 'chaptermark':671 'charact':105,617,698,785 'chart':1020 'charts/chart_01.png':825 'chines':69,477,479,716,1557,1639 'chinese-r':476,1556,1638 'chinese/japanese/korean':106 'choic':356,360,433 'chose':541,1360 'chosen':562 'cjk':104,599,611,616,697,731,776,784,790,1348,1849 'cjk/latin':32,632,757 'cjkmainfont':1416,1454,1652,1758 'class':1815 'classic':448,1298,1578 'classic-thesi':447,1577 'classicthesi':245,451,1586 'claud':771 'clean':517,1363,1722,1730 'cli':358,361 'cm':1429,1467,1665,1771 'code':36,114,581,602,641,645,733,735,747,944,1175,1182,1317,1860 'code-fence-awar':580 'code-max-lin':1174 'col':911 'collaps':934 'color':505,1082,1311,1313,1554 'color/link':1545 'colorlink':1472,1670,1776 'column':659,1380 'command':1406,1537 'complet':1528 'complex':1021 'compon':590 'concis':221 'config':228 'configur':1033 'consult':525,1303,1629 'consulting-navi':524,1302,1628 'contain':103,715,730 'content':128,663,813,1019,1103 'convers':165,182 'convert':3,46,81,90,748,995 'copyright':428,1170,1173 'cover':14,18,124,411,414,419,423,637,1056,1072,1093,1096,1119,1124,1151,1164,1168,1172,1186,1194,1198,1811,1821,1834 'cover/footer':791 'crash':1401 'creat':556,673 'current':844 'custom':1088 'd':253,459 'date':816,1064,1066 'deep':531 'deep-research':530 'default':160,760,907,1036 'defeat':923 'defin':1307,1526 'degre':1251 'deloitt':307,529 'depend':1865,1888 'descript':1037 'design':224,363,443,563 'develop':63 'diagram':1857 'dir':857 'directori':846,851,861 'disabl':1130 'disclaim':425,818,1166,1169 'distribut':1873 'document':5,102,111,481,546,1053,1374,1388 'documentclass':1440,1490,1688,1794 'docx':991 'draft':324 'draftwatermark':1513,1712 'draw':629,807 'drawcentredstr':793 'drawstr':792 'drop':821,889 'e':259,467 'e.g':1000,1327 'edit':1159,1161 'edition-lin':1158 'edward':455 'eleg':470 'elegant-book':469 'elegantbook':473 'embed':1004 'emit':878 'empti':1076 'engin':12,21,377,1358,1370,1413,1451,1649,1755 'esc':644,746 'etc':804 'except':155 'extens':65 'f':265,474 'fade':1314 'fail':1326 'fall':1337 'fallback':20,607,1321,1373,1809,1851,1867 'fals':1187 'fanci':1499,1697 'fancyfoot':1509,1708 'fancyhdr':1497,1695 'fancyhead':1501,1505,1699,1704 'fancyhf':1500,1698 'feed':899 'fenc':35,113,582,945 'file':10,49,829,983,1043,1087,1091 'first':385,548,999,1051 'fix':720,745,773,805,852,930 'flag':1533,1546 'flowabl':586,672 'follow':213 'font':592,613,623,707,723,755,797,1223,1850 'fontnam':711 'fontsiz':1431,1469,1667,1773 'footer':639,1140,1145 'footer-left':1139 'form':229 'formal':480 'format':466,978,994 'found':883 'friend':219 'frontispiec':16,378,380,381,387,417,538,571,1113,1189 'frontispiece/back':1833 'frost':503,1289,1621 'full':1115,1192,1536 'full-ble':1191 'full-pag':1114 'g':270,482 'generat':383,537,543,553,1095,1100 'geometri':1426,1464,1662,1768 'get':82,196,832 'github':277,492,494,496,1291,1599 'github-light':493,1290,1598 'gray':1519,1562,1573,1583,1594,1604,1614,1625,1634,1718 'gui':1885 'h':276,491 'h1':1052 'h1/h2':1210 'half':1219 'handl':26,31,534,631,1353 'handler':643,868 'hang':1387,1399 'hard':75,694 'hard-won':693 'head':578,680,686,1203 'header':638,1132,1138,1494,1692,1804 'header-includ':1493,1691,1803 'header-titl':1131 'headers/footers':1444,1541,1800 'heading-top-spac':1202 'high':1346 'high-qual':1345 'horizont':1258 'html':954,990,1005 'hyphen':1396 'ieee':257,462,464,1589 'ieee-journ':461,1588 'ignor':1854 'illustr':559 'imag':384,409,413,420,552,819,838,867,875,881,893,928,938,973,1028,1117,1126,1185 'image-cov':412,1184 'import':168 'includ':732,1495,1693,1805,1824 'include-before-bodi':1823 'indent':647 'infinit':1331 'ink':485,488,1310,1609 'ink-wash':484,1608 'input':139,156,856,977,986,1038,1404 'input.html':962 'input.md':1408,1446,1644,1750 'inspir':436 'instal':1877,1880,1891 'instead':886 'interact':199 'invok':1031 'issu':971 'iter':66 'j':285,507 'journal':463,465,1590 'json':1090 'justifi':1394 'k':289,367,374,512,1365 'key':589 'known':1806 'l':300,522,1502,1700 'latex':28,244,290,450,472,513,516,1362,1391,1585,1721,1725,1729,1742,1829 'latex-clean':515,1361,1720,1728 'latex-qu':27,1390 'latin':109,595,796 'layout':1385 'lead':751 'left':1141 'length':664 'lesson':696 'letter':1112 'librari':60 'light':495,1292,1295,1600 'like':222,687,770 'limit':1807 'line':649,692,738,763,892,921,927,937,942,1148,1157,1160,1162,1177,1180 'line2':1154 'linkcolor':1475,1550,1673,1779 'linux':609 'list':120,185 'local':379 'long':913,917 'loop':1332 'lose':737 'lovstudio':1,442 'maco':604 'mactex':1883 'mactex-no-gui':1882 'main':853 'mainfont':1420,1458,1656,1762 'mandatori':167 'mani':1376 'map':354,432 'margin':1427,1465,1663,1769 'markdown':4,40,48,96,116,497,574,828,849,955,982,998,1008,1025,1042 'match':560 'max':1176,1179 'may':1386,1842 'mckinsey':527 'md':79,91,683,859,932 'md2pdf':904,1032 'md2pdf.py':1398,1838,1864 'md2pdf/scripts/md2pdf.py':138 'menlo':601,1424,1462,1660,1766 'merg':577,685 'might':729 'minimum':667 'miss':874 'mix':33,107,626,630,633,808 'mm':1214 'mono':712 'monofont':1423,1461,1659,1765 'multi':891,936,1379 'multi-column':1378 'multi-lin':890,935 'multipl':920 'must':170 'n':742,749 'naiv':78 'name':148,431,677,1063,1084 'navi':526,1304,1630 'ncode':772 'need':1389,1832 'nest':119 'none':961,1003,1077,1128 'nord':281,500,502,504,1288,1620 'nord-frost':501,1287,1619 'note':1555 'o':963,1409,1447,1645,1751 'ocean':510,1300 'ocean-breez':509,1299 'one':941 'opac':401,1237,1240 'option':158,166,186,203,408 'output':141,902,1044,1046 'output.md':964 'output.pdf':1045,1410,1448,1646,1752 'outsid':943 'packag':1896 'page':15,125,1057,1097,1105,1108,1116,1137,1195,1200,1220,1233,1266,1281,1308,1812 'page-s':1104 'pagestyl':1498,1696 'paint':490 'palatino':594,1421,1459,1657,1763,1845 'pandoc':22,292,298,376,518,895,900,905,957,959,1001,1322,1340,1357,1366,1407,1445,1521,1531,1643,1735,1749,1808,1813,1866,1869,1878 'paper':1297 'paper-class':1296 'paragraph':549,653,703 'paragraphstyl':709 'paramet':154 'pars':579,947,970 'part':688 'pass':569,855,1010,1127 'path':823,839,871,1040,1048,1092 'path.png':918 'pdf':9,43,55,80,92,133,231,587,674,1047,1412,1450,1648,1754 'pdf-engin':1411,1449,1647,1753 'pdfs':1349 'per':1181,1265,1280,1547 'pip':1890 'pipe':953 'pipelin':948 'plain':188,1024 'pre':164,1015 'pre-convers':163 'pre-process':1014 'preprocess':575,682,931 'preprocessor':681 'preserv':646 'preset':1523,1525,1548 'primari':11,1369 'problem':76 'process':1016 'produc':1344 'profession':7,42,100 'prompt':200 'proper':198,1351 'proport':658 'pt':1261,1276 'public':53 'publication-qu':52 'python':57,137 'qualiti':29,54,1347,1392 'question':178 'quick':134 'r':1506,1705 're':952 'read':544 'real':68 'red':478,1476,1479,1482,1558,1559,1560,1561,1640,1674,1677,1680 'refer':894,939,1029,1034 'regex':929 'relat':822,870,969 'render':628,699,718,800,1847,1858 'replac':1543 'report':71,145,533,1134 'report.md':140 'report.pdf':142 'report/document':97 'reportlab':13,59,585,652,701,740,761,1325,1382,1397,1733,1892 'requir':416,1039,1868 'research':532 'resolv':841,869 'rotat':1248 'run':180,618 'safe':1852 'sc':598,1418,1456,1654,1760 'scale':1227 'scheme':506 'second':1155 'sensibl':159 'separ':691 'set':774,1529 'setwatermarkcolor':1518,1717 'setwatermarkscal':1516,1715 'setwatermarktext':1514,1713 'sever':74 'show':565 'sidebar':675 'silent':820,888 'singl':206,926,1263,1278 'single-lin':925 'size':397,1106,1109,1217,1224 'skill':45,980 'skill-any2pdf' 'skip':833 'small':1503,1507,1701,1706 'smart':655 'snippet':1830 'solar':1294 'solarized-light':1293 'solv':73 'songti':597,1417,1455,1653,1759 'source-lovstudio' 'space':752,766,1254,1259,1269,1274 'spacer':1205,1208 'split':576,684,769 'start':135 'stat':817,1147,1149,1153,1156 'stats-lin':1146 'stats-line2':1152 'stderr':885 'stori':584 'string':1067,1070 'style':364,394,498,564,779 'subtitl':1058,1059 'support':1836 'switch':624 'symbol':1841 'system':444,593,670,1895 'ta':38 'tabl':25,117,126,372,656,975,1022,1026,1101,1329,1334,1352,1381,1384 'tag':620 'take':981 'teal':1622,1623,1624 'technic':70 'templat':214 'tex':1872 'texliv':299 'text':34,110,189,390,424,627,634,714,727,788,815,915,1013,1060,1075,1197,1229,1315,1395 'theme':149,368,430,434,558,1078,1083,1086,1089,1282,1306,1364,1522,1549 'theme-fil':1085 'thepag':1511,1710 'thesi':449,1579 'tint':1320 'tip':949 'titl':143,547,1049,1054,1133,1135,1212,1437,1487,1685,1791 'toc':1098,1433,1436,1483,1486,1681,1684,1745,1787,1790 'toc-titl':1435,1485,1683,1789 'toccolor':1478,1551,1676,1782 'today':1065 'tone':216 'tool':174,192,554 'top':1204,1207 'topic-agent-skills' 'topic-ai-coding-assistant' 'topic-cjk' 'topic-claude-code' 'topic-cursor' 'topic-gemini-cli' 'topic-markdown-to-docx' 'topic-markdown-to-pdf' 'treat':741 'true':415,1094,1099,1473,1671,1777 'tuft':248,453,454,456 'typeset':8,30,101,1393 'ugli':768 'urlcolor':1481,1552,1679,1785 'use':56,86,171,190,209,375,550,705,806,830,958,1188,1356,1534,1822,1837 'usepackag':1496,1512,1694,1711 'user':87,93,121,195,355,540,812,1359 'user-cont':811 'v':1415,1419,1422,1425,1430,1434,1439,1453,1457,1460,1463,1468,1471,1474,1477,1480,1484,1489,1492,1532,1651,1655,1658,1661,1666,1669,1672,1675,1678,1682,1687,1690,1757,1761,1764,1767,1772,1775,1778,1781,1784,1788,1793,1802 'valu':370,435 'version':1068,1069 'vertic':1273 'via':570,956,1848 'visual':1018 'want':88,99,122 'warm':151,440,1080,1285,1568 'warm-academ':150,439,1079,1284,1567 'warn':835,880,1843 'wash':486,489,1610 'watermark':130,389,391,393,1073,1074,1222,1239,1247,1257,1272,1319,1443,1540,1553,1799 'whitespac':744 'wide':1377 'wide/complex':1328 'width':657,660,1221,1230,1234,1335 'without':834 'wm':396,400,404,1216,1236,1244,1253,1268 'wm-angl':403,1243 'wm-opac':399,1235 'wm-size':395,1215 'wm-spacing-i':1267 'wm-spacing-x':1252 'won':695 'word':758 'wordwrap':775 'work':845 'wrap':614,615,724,756,759,896,908,912,960,968,1002 'wrap-rel':967 'wrapper':612 'wrong':83 'x':1255 'xelatex':23,293,519,1323,1342,1414,1452,1650,1756,1875 'y':1270 '不加':320 '不用记编号':353 '中国红':266,475 '书卷气':262 '二维码':337 '仅供学习参考':349 '信息':429 '先帮你确认几个选项':232 '内部资料':325 '冰霜':282 '北欧冰霜蓝灰':1627 '原生排版':294,520 '参考上方':1797 '可选调整':326 '名片':336 '咖啡色调':261 '咨询深蓝':301,523,1636 '品牌':338 '品牌名':1703 '商业机密':1707,1714 '声明':426 '大写左对齐标题':304 '如':323 '如需添加页眉页脚或水印':1796 '字号':327 '学术风格':1726 '完整示例':1641,1723 '封底图片':350 '封底物料':335 '封面之后的全页插图':310 '干净学术风':296 '年':801 '开始转':230 '引导符':1746 '我提供图片':342 '我提供本地图片路径':314 '扉页图片':309 '扉页跳过':347 '技术书':264 '技术写作':252 '技术文档':1748 '报告标题':1702 '排版':1743 '文字':392 '文学':1617 '无封面':521,1738 '无封面无装饰':295 '无扉页':1739 '无装饰色块':1740 '日':803 '时':1731 '暖学术':235,438 '最简洁的':1724 '月':802 '期刊蓝':254,460 '期刊风格':1597 '本次一滕项目实际使用':1642 '朱红正式':1564 '朱红配暖纸':267 '极简留白':249 '极简蓝白':1606 '根据内容自动生成一张':317 '棕色调':242 '水印':318,348 '水印文字':1515 '水墨':271,483 '水墨画':487 '水墨素雅':1616 '海洋':286,508 '深海军蓝色块':302 '深红点缀':250 '清新自然':288 '清爽':291,514 '清爽现代':284 '温润典雅':237 '温润学术风':1576 '灵感':1587 '灵感源自':243,256 '点线':1744 '特点':1737 '生成':1736 '白底':303 '白皮书':269,1566 '目录':1438,1488,1686,1792 '直接使用':1734 '直接说人话就行':352 '研究报告风':1637 '研究报告风格':308 '示例回复':345 '社科报告':239 '程序员友好':1607 '程序员熟悉的风格':279 '精装书':260,468 '素雅克制':273 '纯':1741 '纯文字信息':344 '纯灰黑':272 '经典论文':241,446 '自定义文字':322 '蓝灰北欧风':283 '蓝白极简':278 '藏蓝严谨':255,1596 '角度':332 '设计类':1618 '设计类内容':275 '设计风格':233 '跳过':312,340,1732 '追加':1801 '适合中文正式报告':268 '适合人文':238 '适合内容为王的学术':1747 '适合学术论文':246 '适合政企报告':1565 '适合数据叙事':251 '适合文学':274 '适合正式发表风格':258 '适合长篇专著':263 '选择':1727 '透明度':329 '间距':334 '陶土色调':236,1575 '需装':297 '青绿色调':287 '页眉右侧文字':1508 '页眉左侧文字':1504 '麦肯锡':305 '默认35':333 '默认52':328","prices":[{"id":"46f524af-1c10-495d-bd23-e2261b7b1e45","listingId":"11baef81-8143-4376-9c41-917505630e81","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"lovstudio","category":"skills","install_from":"skills.sh"},"createdAt":"2026-04-18T22:18:52.100Z"}],"sources":[{"listingId":"11baef81-8143-4376-9c41-917505630e81","source":"github","sourceId":"lovstudio/skills/any2pdf","sourceUrl":"https://github.com/lovstudio/skills/tree/main/skills/any2pdf","isPrimary":false,"firstSeenAt":"2026-04-18T22:18:52.100Z","lastSeenAt":"2026-04-22T00:56:33.970Z"}],"details":{"listingId":"11baef81-8143-4376-9c41-917505630e81","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"lovstudio","slug":"any2pdf","github":{"repo":"lovstudio/skills","stars":40,"topics":["agent-skills","ai-coding-assistant","cjk","claude-code","cursor","gemini-cli","markdown-to-docx","markdown-to-pdf"],"license":"mit","html_url":"https://github.com/lovstudio/skills","pushed_at":"2026-04-21T15:57:51Z","description":"Agent skills for AI coding assistants — Markdown to PDF/DOCX with 14 themes, CJK support","skill_md_sha":"5cf78e3b9d00571842b9fdf068866c2322f4f59c","skill_md_path":"skills/any2pdf/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/lovstudio/skills/tree/main/skills/any2pdf"},"layout":"multi","source":"github","category":"skills","frontmatter":{"name":"lovstudio:any2pdf","license":"MIT","description":"Convert Markdown documents to professionally typeset PDF files. Primary engine: reportlab (cover pages, frontispiece, back cover, bookmarks). Fallback engine: pandoc + XeLaTeX (better table handling, LaTeX-quality typesetting). Handles CJK/Latin mixed text, fenced code blocks, tables, blockquotes, clickable TOC, watermarks, headers/footers, and page numbers. Supports multiple color themes and is battle-tested for Chinese technical reports. Trigger when user mentions \"markdown to PDF\", \"md2pdf\", \"any2pdf\", \"md转pdf\", \"报告生成\", \"导出pdf\", or wants a professionally formatted PDF from markdown.","compatibility":"Requires Python 3.8+ and reportlab (`pip install reportlab`). macOS: uses Palatino, Songti SC, Menlo (pre-installed). Linux: uses Carlito, Liberation Serif, Droid Sans Fallback, DejaVu Sans Mono."},"skills_sh_url":"https://skills.sh/lovstudio/skills/any2pdf"},"updatedAt":"2026-04-22T00:56:33.970Z"}}