Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

lov-any2pdf

БесплатноЗапускает вложенные скриптыНе проверен

Convert Markdown to polished PDF with CJK typography, code, tables, images, covers, TOC, bookmarks, and reading themes. Trigger on md2pdf, Chinese report…

lovstudioот lovstudio★ 72 звезды на GitHub1 установка в других каталогах

Об этом скилле

PDF大师 · PDF Master

This skill converts any Markdown file into a publication-quality PDF using Python's reportlab library. It was developed through extensive iteration on real Chinese technical reports and solves several hard problems that naive MD→PDF converters get wrong.

Triggers

Activate when

  • User wants to convert .md → .pdf
  • User has a markdown report/document and wants professional typesetting
  • Document contains CJK characters (Chinese/Japanese/Korean) mixed with Latin text
  • Document has fenced code blocks, markdown tables, or nested lists
  • Document has local/remote images, Obsidian callouts, emoji, or math formulas
  • User wants a cover page, table of contents, or watermark in their PDF

Do not activate when

  • The user only wants to revise Markdown content and does not need a PDF output.
  • The source is HTML, DOCX, or another format and the user has not authorized a Markdown conversion step.
  • The user needs a slide deck, editable Word document, or image export rather than a PDF.

Quick Start

python md2pdf/scripts/md2pdf.py \
  --input report.md \
  --output report.pdf \
  --title "My Report" \
  --author "Author Name"

All parameters except --input are optional. When no theme is supplied, the renderer selects one from the document's content and structure.

Configuration Resolution (MANDATORY)

Do not present a full configuration form before every conversion. Resolve each setting independently in this order:

  1. the user's explicit instruction in the current request, then CLI arguments or document frontmatter;
  2. the user's last explicitly confirmed value from the lov_any2pdf preference namespace;
  3. a content-aware decision for the theme, or the documented safe default for non-visual settings.

Proceed without asking when this resolves the conversion. Ask at most one concise question only when an unresolved choice would materially change the result, such as a missing local asset path or permission to generate a new image. Do not ask the user to choose from every theme unless they explicitly request the theme catalog.

After the user explicitly confirms or changes a reusable parameter, record that value as the latest preference. Reuse it next time when the user is silent. Never persist an inferred value as though the user confirmed it, and honor requests to reset or ignore saved preferences.

Reusable parameters include theme, cover/TOC, page size, frontispiece mode, watermark text and geometry, image-cover mode, back-cover mode/banner, disclaimer, copyright, header, and footer. Revalidate saved file paths before use; if an asset no longer exists, ask for a replacement instead of silently substituting one.

Content-Aware Theme Decision

When neither the current request nor the saved preferences specify a theme, read the title, opening, headings, document length, code blocks, tables, imagery, and publishing context, then select the theme that best serves the article. The following are decision cues, not a fixed keyword router:

Content character Good starting theme
Long Chinese prose, knowledge notes, dense tables songti-reading
Strategy, business, market, or research report consulting-navy
Academic paper with abstract/method/results/references ieee-journal or classic-thesis
Code-heavy technical guide or API documentation github-light
Data narrative with charts and metrics tufte
Literary, art, photography, or design essay ink-wash
Formal Chinese policy or institutional document chinese-red
Neutral English prose or print-first document paper-classic

warm-academic remains available when its tone genuinely fits the article, but it is never the default merely because the user omitted a style.

Mapping User Choices to CLI Args

Choice CLI arg
Design style --theme with value from table below (latex-clean uses pandoc engine)
Frontispiece local --frontispiece <path>
Frontispiece AI Generate image first, then --frontispiece /tmp/frontispiece.png
Watermark text --watermark "文字"
Watermark style --wm-size 30 --wm-opacity 0.1 --wm-angle 45 (all optional)
Image as cover --image-cover true (requires --frontispiece)
Back cover image --banner <path>
Back cover text --disclaimer "声明" and/or --copyright "© 信息"

Theme Name Mapping

Style --theme value Inspiration
暖学术 warm-academic Warm editorial-academic palette
经典论文 classic-thesis LaTeX classicthesis
Tufte tufte Edward Tufte's books
期刊蓝 ieee-journal IEEE journal format
精装书 elegant-book LaTeX ElegantBook
中国红 chinese-red Chinese formal documents
水墨 ink-wash 水墨画 / ink wash painting
GitHub github-light GitHub Markdown style
Nord nord-frost Nord color scheme
海洋
Полный SKILL.md на GitHub

Установить lov-any2pdf в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

CHANGELOG.mdREADME.mdassets/backcover-banner.jpgassets/fonts/NotoSansSC-SemiBold.ttfassets/fonts/OFL.txtcases/cases.jsoncases/issue-regressions.mdreferences/themes.mdscripts/md2pdf.pyskill.yaml

FAQ

Что делает скилл lov-any2pdf?

Convert Markdown to polished PDF with CJK typography, code, tables, images, covers, TOC, bookmarks, and reading themes. Trigger on md2pdf, Chinese report typesetting, or print-ready PDF requests.

Как установить скилл lov-any2pdf?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл lov-any2pdf запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить lov-any2pdf с