界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
文档与办公 · SKILL.md

generate-pdf

generate-pdf

【文档与办公】Convert Markdown files to PDF format with professional formatting

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: generate-pdf description: Convert Markdown files to PDF format with professional formatting metadata: author: Zo category: Official display-name: Generate PDF from Markdown emoji: 📑

Generate PDF from Markdown

Purpose

Convert Markdown files to professionally formatted PDF documents using pandoc.

Input

  • Path to the Markdown file you want to convert

Steps

  1. Install pandoc and LaTeX:
apt-get update && apt-get install -y pandoc texlive-latex-base texlive-fonts-recommended texlive-xetex
  1. Convert the Markdown file to PDF with professional formatting:
pandoc "<user's_markdown_path>" \
  --pdf-engine=xelatex \
  --variable geometry:margin=1in \
  --variable fontsize=11pt \
  --variable linkcolor=blue \
  --highlight-style=tango \
  -o "<output_pdf_path>"
  1. Tell the user where the PDF file was saved.
我的收藏