Logo: Markdown Pdf Skill

Markdown Pdf Skill

Communautéit
GanymedeNil
markdown-pdf-skill

Convert Markdown into polished, print-ready PDF documents with deliberate typography, automatic or user-selected style templates, reliable local and remote image handling, robust CJK support, page headers and footers, and pagination-aware layout. Use when Codex needs to export, typeset, restyle, or visually QA Markdown as PDF, especially for long documents containing headings, tables, code blocks, images, lists, blockquotes, footnotes, math, or content that must cross pages cleanly.

Iwwersiicht

EditeurGanymedeNil
Repositorypoxiaoxing-skills
Skill-Nummmarkdown-pdf-skill
Stären
75
Forks
7
Matgeliwwert Dateien
21
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 21 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    GanymedeNil huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Markdown Pdf Skill an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/GanymedeNil/poxiaoxing-skills/tree/main/markdown-pdf-skill
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/GanymedeNil/poxiaoxing-skills.git /tmp/poxiaoxing-skills
mkdir -p .claude/skills
cp -r /tmp/poxiaoxing-skills/markdown-pdf-skill .claude/skills/markdown-pdf-skill
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Markdown Pdf Skill an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Markdown Pdf Skill automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Markdown Pdf Skill net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Markdown PDF Skill

Turn Markdown into a professional PDF and prove that the rendered pages are sound. Treat pagination as part of the design, not as a final conversion step.

Workflow

  1. Ask about the table of contents before doing any layout work.

    • Ask the user: 是否需要加入目录?
    • Wait for the answer. Do not infer the choice from document length.
    • Skip the question only when the current request already says to include or omit a table of contents.
    • Pass --toc for yes or --no-toc for no. The exporter rejects an omitted choice.
  2. Inspect the source before exporting.

    • Identify the language, title hierarchy, long tables, long code blocks, local or remote images, raw HTML, footnotes, math, and explicit page-break requests.
    • Preserve the author's words and structure unless the user asks for editorial changes.
    • Read references/markdown-support.md when the document uses unusual Markdown, diagrams, math, raw HTML, or oversized media.
  3. Choose print geometry and style deliberately.

    • Default to A4 portrait for CJK and international documents.
    • Use Letter only for US-facing material.
    • Use landscape for genuinely wide tables; do not shrink normal prose to rescue one table.
    • Honor an explicitly requested theme. Otherwise keep --theme auto and report the selected theme and reason.
    • Run python3 scripts/export_markdown_pdf.py --list-themes or read references/themes.md when the user wants choices.
    • Read references/pagination.md before tuning a long or layout-sensitive document.
  4. Export with the bundled renderer.

    bash
    python3 scripts/export_markdown_pdf.py INPUT.md -o OUTPUT.pdf --toc --theme auto

    Use --remote-images freeze (the default) to download and embed online images. Add --orientation landscape, an explicit --theme, --math, or --css custom.css only when the content requires it. Use <!-- pagebreak --> for an intentional hard break. Use <div class="keep-together" markdown="1">...</div> sparingly for a short block that must remain intact.

  5. Inspect the actual PDF, not only the HTML.

    bash
    python3 scripts/inspect_pdf.py OUTPUT.pdf --output-dir tmp/pdfs/review

    Open the generated contact sheet, then inspect suspicious pages at full resolution. Check every page for clipped content, awkward whitespace, orphaned headings, lonely final lines, table row breaks, repeated table headers, split captions, image scale, code wrapping, page numbering, and CJK glyph fallback.

  6. Iterate until clean.

    • Fix the source structure first, then CSS.
    • Prefer local, targeted classes or page breaks over global font reduction.
    • Re-export and re-run inspection after every meaningful layout change.
    • Deliver only after the latest rendered pages show no visible defects.

Installation

Create an isolated environment and install the pinned capability set when imports are missing:

bash
python3 -m venv .venv
.venv/bin/python -m pip install -r scripts/requirements.txt

The renderer uses Python-Markdown, WeasyPrint, and Matplotlib's vector math renderer. The inspector uses PyMuPDF, pypdf, and Pillow. If WeasyPrint installation fails because native libraries are absent, follow the platform instructions printed by WeasyPrint rather than silently switching renderers; pagination differs across engines.

Rendering Rules

  • Keep headings with at least the next content block.
  • Apply widows and orphans controls to prose and list items.
  • Keep short tables, code blocks, quotes, and figures together; allow oversized blocks to split so they do not overflow or create blank pages.
  • Repeat table headers across pages and never split a table row.
  • Keep captions with their media.
  • Preserve readable type size. Change orientation or restructure an oversized table before reducing body text.
  • Use system CJK font fallbacks and verify every glyph visually.
  • Keep links clickable, footnotes legible, and syntax highlighting printable in grayscale.
  • Avoid a hard page break unless semantic grouping or visual balance clearly benefits.

Inputs and Outputs

  • Accept UTF-8 Markdown and resolve relative images from the Markdown file's directory.
  • Read optional YAML frontmatter keys: title, subtitle, author, date, and lang.
  • Resolve local images from the Markdown directory. Download and embed remote images by default; use live URLs only when the user explicitly accepts non-reproducible output.
  • Preserve raw HTML supported by WeasyPrint. Expect JavaScript-dependent content to require pre-rendering.
  • Write final PDFs to the path requested by the user. Place temporary HTML, page images, and reports under tmp/pdfs/ and remove them after final approval.
  • Keep filenames stable and descriptive.

Manual Controls

  • Insert <!-- pagebreak --> for an explicit new page.
  • Wrap a short unit in <div class="keep-together" markdown="1">...</div> to prohibit an internal break.
  • Wrap content in <div class="avoid-break-before" markdown="1">...</div> to keep it near the preceding block.
  • Add a user stylesheet with --css; keep overrides narrow and document-specific.
  • Save intermediate HTML with --html-output PATH when diagnosing selector or asset problems.

Quality Gate

Require all of the following before delivery:

  • The exporter completes without missing-asset or unsupported-feature warnings.
  • The inspector reports the expected page size, no blank pages, no out-of-bounds text or image blocks, and no heading stranded at a page bottom.
  • Contact-sheet review covers every page.
  • Full-size review covers the first page, final page, every page transition around a table or code block, and every page reported as suspicious.
  • Extracted text is non-empty and major headings appear in the expected order.
  • The final PDF contains no placeholders, debug paths, tool tokens, or accidental intermediate content.

Use references/qa-checklist.md for the final visual pass.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Markdown Pdf Skill?

Convert Markdown into polished, print-ready PDF documents with deliberate typography, automatic or user-selected style templates, reliable local and remote image handling, robust CJK support, page headers and footers, and pagination-aware layout. Use when Codex needs to export, typeset, restyle, or visually QA Markdown as PDF, especially for long documents containing headings, tables, code blocks, images, lists, blockquotes, footnotes, math, or content that must cross pages cleanly.

Firwat Markdown Pdf Skill op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Markdown Pdf Skill besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Markdown Pdf Skill an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/GanymedeNil/poxiaoxing-skills/tree/main/markdown-pdf-skill an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Markdown Pdf Skill benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Markdown Pdf Skill benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Markdown Pdf Skill domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Markdown Pdf Skill gratis?

Jo. GanymedeNil huet de Skill ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇