Skip to content
Agentmart
Submit a tool

math-latex-renderer

数学试卷LaTeX渲染器v2——Standard Exam JSON→编译PDF+Word。答案位置可配,图形代码驱动。

Skill by dingxiaodongtech

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/dingxiaodongtech-math-latex-renderer

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

数学试卷LaTeX渲染器v2——Standard Exam JSON→编译PDF+Word。答案位置可配,图形代码驱动。

Use cases: documents

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/math-latex-renderer

What's inside

Skill name
math-latex-renderer
Description
数学试卷LaTeX渲染器v2——Standard Exam JSON→编译PDF+Word。答案位置可配,图形代码驱动。
License
MIT
Instructions
117 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# 数学试卷 LaTeX 渲染器 v2

> 借鉴:Anthropic Skills 的"代码做确定性计算"原则、BHCexam中文试卷排版实践

## 设计原则

本 Skill 是**纯代码编译器**,不调用 LLM。输入 Standard Exam JSON,输出 PDF+Word。

## 题型 LaTeX 模板 (含Few-shot)

### 选择题 (MC)
```latex
% 模板
\item {stem} \score{{{score}}}
\choice{{{opt_a}}}{{{opt_b}}}{{{opt_c}}}{{{opt_d}}}

% 示例输出
\item 下列方程中,是一元二次方程的是 \score{3}
\choice{$x^2+2x+1=0$}{$2x-3=0$}{$x^3-1=0$}{$x+\frac{1}{x}=2$}
```

### 填空题 (FB)
```latex
% 模板
\item {stem} \score{{{score}}}
\blank{3cm}

% 示例输出
\item 方程 $2x+3=7$ 的解是 $x=$ \score{4}
\blank{3cm}
```

### 简答题/计算题 (SA)
```latex
% 模板
\item {stem} \score{{{score}}}

\textbf{解:}
\vspace{{5cm}}

% 示例输出
\item 用公式法解方程 $2x^2-5x+2=0$ \score{10}

\textbf{解:}
\vspace{5cm}
```

### 证明题 (PR)
```latex
% 模板
\item {stem} \score{{{score}}}

\textbf{证明:}
\vspace{{7cm}}

% 示例输出
\item 求证:对角线相等的平行四边形是矩形 \score{12}

\textbf{证明:}
\vspace{7cm}
```

## 答案模式

### 卷末模式 (answer_mode=end)
```latex
\newpage
\section*{参考答案}
\begin{enumerate}
  \item {answer_1}
  \item {answer_2}
  ...
\end{enumerate}
```

### 题下模式 (answer_mode=inline)
```latex
\item {stem} \score{{{score}}}
\textbf{\small 答案:}{answer}
```

## 图形嵌入
```latex
% 函数图像:matplotlib→PGF
\input{figures/func_plot.pgf}

% 几何图形:TikZ原生
\begin{tikzpicture}[scale=0.8]
  \coordinate (A) at (0,0);
  \coordinate (B) at (4,0);
  \coordinate (C) at (2,3);
  \draw[thick] (A) -- (B) -- (C) -- cycle;
  \node[below] at (A) {$A$};
  \node[below] at (B) {$B$};
  \node[above] at (C) {$C$};
\end{tikzpicture}

% 统计图表:matplotlib→matplot2tikz→PGF
\input{figures/bar_chart.pgf}
```

## 编译命令
```bash
# PDF (需要 xelatex + 中文字体)
xelatex -shell-escape -interaction=nonstopmode exam.tex

# Word (需要 pandoc)
pandoc exam.tex -o exam.docx --mathjax
```

## 关键原则
1. **纯代码,不调 LLM** — 编译不需要智能,需要精确
2. **先渲染再嵌入** — 图形先生成 PGF/TikZ 文件,LaTeX只做引用
3. **答案与试卷分离** — 两份 LaTeX 源文件,编译两份 PDF
4. **中文支持** — 必须用 xelatex (非 pdflatex),字体用 SimSun/SimHei

From dingxiaodongtech/math-exam-platform, MIT.

Signals

Stars
1
Forks
1
Open issues
0
Last commit (this folder)
Sep 4, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from dingxiaodongtech

Cite this page

math-latex-renderer skill. Agent Mart. https://agentmart.dev/skills/dingxiaodongtech-math-latex-renderer (last updated 2026-10-24)