Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问clear审计通过

pandoc-pdf-generationpandoc PDF generation 搜索

Agent Skill

pandoc-pdf-generation 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

7,960

周安装

322

GitHub Stars

37

下载量

2,499
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:pandoc-pdf-generation(pandoc PDF generation 搜索)
来源仓库:https://github.com/terrylica/cc-skills
仓库路径:skills/pandoc-pdf-generation
安装命令:
npx skills add https://github.com/terrylica/cc-skills --skill pandoc-pdf-generation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/terrylica/cc-skills --skill pandoc-pdf-generation

简介

pandoc-pdf-generation 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 适用于技术文档排版、报告自动生成及 PDF 输出定制等场景。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用该技能。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Pandoc PDF Generation

Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.

Overview

Generate professional PDF documents from Markdown using Pandoc with the XeLaTeX engine. This skill covers automatic section numbering, table of contents, bibliography management, LaTeX customization, and common troubleshooting patterns learned through production use.

When to Use This Skill

Use this skill when:

  • Converting Markdown to PDF with professional formatting requirements
  • Needing automatic section numbering and table of contents
  • Managing citations and bibliographies without manual duplication
  • Controlling table formatting and page breaks in LaTeX output
  • Building automated PDF generation workflows

Quick Start: Universal Build Script

Single Source of Truth Pattern

This skill provides production-proven assets in ${CLAUDE_PLUGIN_ROOT}/skills/pandoc-pdf-generation/assets/:

  • table-spacing-template.tex - Production-tuned LaTeX preamble (booktabs, colortbl, ToC fixes)
  • build-pdf.sh - Universal auto-detecting build script

From Any Project

/usr/bin/env bash << 'DETECT_EOF'
# Create symlink once per project (git-friendly)
ln -s ${CLAUDE_PLUGIN_ROOT}/skills/pandoc-pdf-generation/assets/build-pdf.sh build-pdf.sh

# Auto-detect single .md file in directory (landscape default)
./build-pdf.sh

# Portrait mode
./build-pdf.sh --portrait document.md

# Monospace font for ASCII diagrams
./build-pdf.sh --monospace diagrams.md

# Explicit input/output
./build-pdf.sh input.md output.pdf
DETECT_EOF

Options:

FlagDescription
--landscapeLandscape orientation (default)
--portraitPortrait orientation
--monospaceUse DejaVu Sans Mono - ideal for ASCII diagrams
--hide-detailsHide <details> blocks (e.g., graph-easy source) from PDF
-h, --helpShow help message

Features:

  • ✅ Auto-detects input file (if single.md exists)
  • ✅ Auto-detects bibliography (references.bib) and CSL files
  • ✅ Always uses production-proven LaTeX preamble from skill
  • ✅ Pre-flight checks (pandoc, xelatex, files exist)
  • ✅ Post-build validation (file size, page count)
  • ✅ Code blocks stay on same page (no splitting across pages)
  • ✅ Lua filter to hide <details> blocks from PDF output

Landscape PDF (Quick Command)

For landscape PDFs with blue hyperlinks (no build-pdf.sh dependency):

pandoc file.md -o file.pdf \
  --pdf-engine=xelatex \
  -V geometry:a4paper,landscape \
  -V geometry:margin=1in \
  -V fontsize=11pt \
  -V mainfont="DejaVu Sans" \
  -V colorlinks=true \
  -V linkcolor=blue \
  -V urlcolor=blue \
  --toc --toc-depth=2 \
  --number-sections

Use landscape for: Wide data tables, comparison matrices, technical docs with code blocks.

Manual Command (With LaTeX Preamble)

/usr/bin/env bash << 'SKILL_SCRIPT_EOF'
pandoc document.md \
  -o document.pdf \
  --pdf-engine=xelatex \
  --toc \
  --toc-depth=3 \
  --number-sections \
  -V geometry:margin=1in \
  -V mainfont="DejaVu Sans" \
  -H ${CLAUDE_PLUGIN_ROOT}/skills/pandoc-pdf-generation/assets/table-spacing-template.tex
SKILL_SCRIPT_EOF

ASCII Diagrams: Always Use graph-easy

CRITICAL: Never manually type ASCII diagrams. Always use the itp:graph-easy skill.

Manual ASCII art causes alignment issues in PDFs. The graph-easy skill ensures:

  • Proper boxart character alignment
  • Consistent spacing
  • Reproducible output
# Invoke the skill for general diagrams
Skill(itp:graph-easy)

# For ADR architecture diagrams
Skill(itp:adr-graph-easy-architect)

Also important: Keep annotations OUTSIDE code blocks. Don't add inline comments like # contains: file1, file2 inside diagram code blocks - they break alignment.


Hiding Content for PDF Output

Use --hide-details to remove <details> blocks from PDF output. This is useful when:

  • graph-easy source blocks: Keep source in markdown for diagram regeneration, but hide from printed PDFs
  • Technical implementation notes: Show in web/markdown view, hide from printed handouts
  • Collapsible sections: HTML <details> tags don't render as collapsible in PDF

Usage:

./build-pdf.sh --hide-details document.md

Markdown pattern:

## My Section

┌─────┐ ┌─────┐ │ Box │ ──> │ Box │ └─────┘ └─────┘

[Box] -> [Box]

With --hide-details, the entire <details> block is stripped from PDF output while remaining visible in markdown/HTML.


Verification Checklist

Before considering a PDF "done", verify:

Pre-Generation:

  • No manual section numbering in markdown (use --number-sections)
  • All ASCII diagrams generated via itp:graph-easy skill
  • Annotations are outside code blocks, not inside

Post-Generation:

  • Open PDF and visually inspect each page
  • Verify diagrams don't break across pages
  • Check section numbering is correct (no "1. 1. Title" duplication)
  • Confirm bullet lists render as bullets, not inline dashes

Pre-Print:

  • Get user approval before printing
  • Confirm orientation preference (landscape/portrait)
  • Confirm duplex preference (one-sided/two-sided)

Printing Workflow

Always let the user review the PDF before printing.

Open for review:

open output.pdf

Print one-sided (simplex):

lpr -P "PRINTER_NAME" -o Duplex=None output.pdf

Print two-sided (duplex):

lpr -P "PRINTER_NAME" -o Duplex=DuplexNoTumble output.pdf  # Long-edge binding
lpr -P "PRINTER_NAME" -o Duplex=DuplexTumble output.pdf    # Short-edge binding

Find printer name:

lpstat -p -d

Never print without user approval - this wastes paper if issues exist.


Reference Documentation

For detailed information, see:


Troubleshooting

IssueCauseSolution
Font not foundDejaVu Sans not installedbrew install font-dejavu
xelatex not foundMacTeX not installedbrew install --cask mactex
Table breaks across pagesMissing longtable packageInclude table-spacing-template.tex preamble
Double section numbersManual numbering in markdownRemove manual numbers, use --number-sections only
ASCII diagram misalignedManual ASCII artUse graph-easy skill for all diagrams
Bullet list renders as dashesMarkdown formatting issueCheck for proper blank lines before lists
Bibliography not renderingMissing references.bibCreate.bib file or remove --bibliography flag
PDF file size too largeEmbedded fontsUse --pdf-engine-opt=-dEmbedAllFonts=false

Post-Execution Reflection

After this skill completes, check before closing:

  1. Did the command succeed? — If not, fix the instruction or error table that caused the failure.
  2. Did parameters or output change? — If the underlying tool's interface drifted, update Usage examples and Parameters table to match.
  3. Was a workaround needed? — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.

Only update if the issue is real and reproducible — not speculative.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenCode

28.77%
按下载量换算719

Claude Code

21.31%
按下载量换算533

Gemini CLI

17.25%
按下载量换算431

Antigravity

11.83%
按下载量换算296

windsurf

8.37%
按下载量换算209

Codex

3.68%
按下载量换算92

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills