跳到正文
TakoAPI
返回技能列表

md2pdf-xelatex

由 huaruoji 提供

DevOps & Cloud
386下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Convert Markdown files to PDF with full LaTeX math formula rendering and CJK (Chinese/Japanese/Korean) support.

描述

该技能的功能

Converts Markdown files to PDF using Pandoc and XeLaTeX. Handles LaTeX math formulas ($...$ and $$...$$), CJK text (Chinese, Japanese, Korean), code blocks, and tables. Auto-detects CJK content and selects appropriate fonts.

Unlike browser-based Markdown-to-PDF tools, XeLaTeX renders LaTeX math natively and handles CJK fonts without extra configuration or plugins.

何时使用

  • Exporting a research report with equations to PDF
  • Converting Chinese-language notes to a printable document
  • Generating a PDF from a README with code blocks and tables
  • Rendering a math-heavy homework document from Markdown
  • Producing a formatted PDF from mixed CJK and Latin text

示例工作流

输入

User asks: convert my notes.md file (containing Chinese text and math formulas) to a PDF

智能体
  1. 1

    Run md2pdf.sh with notes.md as input

  2. 2

    Script scans content and detects CJK characters

  3. 3

    Script selects an available CJK font (e.g., Noto Sans CJK SC)

  4. 4

    Pandoc invokes XeLaTeX to render math and CJK text

  5. 5

    PDF is written to the specified output path

输出

A formatted PDF with rendered LaTeX equations, CJK text, syntax-highlighted code blocks, and a table of contents

前置要求

  • pandoc system package
  • texlive-xetex system package
  • texlive-fonts-recommended system package
  • texlive-fonts-extra system package
  • texlive-latex-extra system package
  • texlive-lang-chinese system package

安装

clawhub install huaruoji/md2pdf-xelatex

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接