Logo di Markdown Pdf Skill

Markdown Pdf Skill

Community
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.

Panoramica

Pubblicato daGanymedeNil
Repositorypoxiaoxing-skills
Nome della skillmarkdown-pdf-skill
Stelle
75
Fork
7
File inclusi
21
LicenzaApache-2.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 21

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da GanymedeNil su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Markdown Pdf Skill in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/GanymedeNil/poxiaoxing-skills/tree/main/markdown-pdf-skill
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Markdown Pdf Skill in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Markdown Pdf Skill non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Markdown Pdf Skill non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA 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.

Perché usare Markdown Pdf Skill su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Markdown Pdf Skill è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Markdown Pdf Skill in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/GanymedeNil/poxiaoxing-skills/tree/main/markdown-pdf-skill. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Markdown Pdf Skill?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Markdown Pdf Skill?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Markdown Pdf Skill: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Markdown Pdf Skill è gratuita?

Sì. È pubblicata su GitHub da GanymedeNil con licenza Apache-2.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇