AgentSkillsCN

paper-translate

在论文导入完成后,将 Markdown 格式的论文翻译成中文,同时保留 LaTeX 公式、代码、图片及原有格式。适用于论文导入后的翻译与转译操作。

SKILL.md
--- frontmatter
name: paper-translate
description: Translate research paper markdown files to Chinese while preserving LaTeX, code, images, and formatting. Use after paper-ingestion to translate an ingested paper.

Paper Translation Tool

Translate research paper markdown files (from paper-ingestion) to Chinese while preserving all formatting.

Quick Reference

bash
# Translate using DeepSeek (default, recommended)
uv run scripts/translate_paper.py /path/to/paper_folder/full_text.md

# Translate using TensorBlock
uv run scripts/translate_paper.py /path/to/paper_folder/full_text.md --backend tensorblock

# Specify target language (default: Chinese)
uv run scripts/translate_paper.py /path/to/paper_folder/full_text.md --target-lang Japanese

Backend Selection

BackendAPINotes
deepseek (default)DeepSeek APIHigh quality, fast
tensorblockTensorBlock Forge APIAlternative backend

What Gets Translated

ElementTranslatedNotes
Body text✅ YesMain content
Headings✅ YesAll heading levels
YAML frontmatter❌ NoPreserved, language tag added
LaTeX formulas❌ No$...$, $$...$$ preserved
Code blocks❌ NoFenced and inline code preserved
Image references❌ NoPaths preserved exactly
Link URLs❌ NoURLs preserved, text translated
HTML tables❌ NoStructure preserved
Citations❌ No[1], [17] preserved

Output Structure

The translated file is saved alongside the original:

code
20260202-Paper_Title/
  reference.pdf        # Original PDF
  full_text.md         # Original markdown
  full_text_zh.md      # NEW: Translated markdown
  notes.md             # Notes file
  assets/              # Images (unchanged)

JSON Output

Success:

json
{"status": "success", "output_path": "...", "backend": "deepseek", "target_lang": "Chinese"}

Error:

json
{"status": "error", "message": "..."}

Error Handling

ErrorAction
API rate limitAutomatic retry with backoff
Token limit exceededText automatically chunked
Network errorRetry up to 3 times