← 返回 Skills 市场
tianyedavid

word-latex-formula

作者 DavidTian · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
53
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install word-latex-formula
功能描述
Convert manually typed formulas in Word documents (.doc, .docx, .wps) into editable Word equations while preserving layout through local Microsoft Word or Li...
使用说明 (SKILL.md)

Word Formula Conversion

Use this skill when a user wants manually typed formula text in a Word document converted into editable Word equations while preserving the original document layout as much as possible.

Resource Layout

The runnable project is bundled at resources/latex_convert_project/.

  • Core CLI: python3 -m latex_convert.cli
  • Web UI starter: python scripts/start_web.py
  • Security notes: read references/SECURITY_AND_PRIVACY.md before enabling AI review or configuring any external model endpoint.
  • Operational details: read references/USAGE.md when a user asks for installation, web UI, or advanced parameters.

Default Workflow

  1. Keep the source document unchanged.
  2. Work from resources/latex_convert_project/ unless the user provides another checkout path.
  3. For .doc or .wps, use --engine auto by default. macOS and Windows try Microsoft Word first; if Word automation fails, the code falls back to LibreOffice. Linux uses LibreOffice.
  4. For important manuscripts, prefer the staged pipeline: scan, review or decide, then apply.
  5. Leave bibliography protection enabled unless the user explicitly says formulas appear inside the bibliography section.
  6. Modify only OOXML formula targets. Do not rebuild the document with high-level document libraries.
  7. Verify output by checking the JSON report and confirming Word math nodes exist.

Common Commands

One-step local conversion:

cd resources/latex_convert_project
python3 -m latex_convert.cli convert input.docx -o output.docx --report report.json

Staged review:

cd resources/latex_convert_project
python3 -m latex_convert.cli scan input.docx --out candidates.json --review-doc candidates.docx
python3 -m latex_convert.cli decide candidates.json -o decisions.json --provider rule
python3 -m latex_convert.cli apply input.docx --decisions decisions.json -o output.docx --report apply_report.json

Optional AI-assisted decision:

cd resources/latex_convert_project
python3 -m latex_convert.cli decide candidates.json \
  -o ai_decisions.json \
  --provider ai \
  --api-key "$OPENAI_API_KEY" \
  --base-url "https://api.openai.com/v1" \
  --model "gpt-4.1-mini"

Quick Web UI:

cd resources/latex_convert_project
python scripts/start_web.py

Open http://127.0.0.1:5173.

Data and Network Policy

Default rule-based conversion is local-only. It reads the user's document, invokes local Word or LibreOffice when needed, edits OOXML locally, and writes local output files.

External network requests occur only when the user explicitly chooses AI review, clicks AI conversion in the Web UI, or tests a configured AI model. In that mode, the tool sends only formula-candidate data needed for classification and LaTeX normalization to the user-provided base_url: candidate id, formula text, nearby context, local LaTeX draft, confidence/default action, and model metadata. The whole Word file is not uploaded by the built-in AI review path. API keys are read from user input or local environment files and are not bundled in this skill.

If an AI request times out or fails, the tool retries once by default and then falls back to local rule decisions, preserving task completion without requiring further external calls.

Quality Checks

  • Confirm the output .docx opens in Word.
  • Confirm converted formulas are editable Word equations, not images.
  • Check formulas_converted, formulas_kept, and failed in the report.
  • Spot-check fractions, subscripts, superscripts, Greek letters, sums, and inequalities.
安全使用建议
Review before installing. Use the local rule-based workflow for confidential manuscripts, or use a trusted/self-hosted AI endpoint. Avoid saving valuable API keys in the Web UI unless the machine and browser session are trusted, stop the local web server after use, and remove the project .env and storage files when finished.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The document reading, OOXML editing, Word/LibreOffice automation, and optional AI review fit the stated formula-conversion purpose, and the docs disclose that AI mode sends candidate text and nearby context rather than whole documents.
Instruction Scope
Implicit invocation is enabled and the Web UI can start AI review without a strong point-of-action privacy confirmation, which is under-scoped for unpublished or sensitive manuscripts.
Install Mechanism
Dependencies and local start scripts are ordinary for a Python/FastAPI/Vite tool; no package install hooks or hidden startup mechanism were found.
Credentials
The localhost API has no authentication, allows broad CORS, returns API keys from OPENAI_API_KEY or generic API_KEY, and accepts arbitrary base URLs for AI requests, creating credential and document-snippet exposure risk.
Persistence & Privilege
The web configuration writes API keys to a plaintext project .env file and keeps uploaded documents, extracted candidates, AI decisions, previews, and outputs in local storage; this is partly disclosed but high impact.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install word-latex-formula
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /word-latex-formula 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of word-latex-formula: convert manually typed formulas in Word documents into editable Word equations. - Supports .doc, .docx, and .wps formats using local Microsoft Word or LibreOffice automation. - Preserves original document layout and modifies only OOXML formula targets for accuracy. - Offers both one-step and staged (scan/review/apply) workflows for academic manuscripts or batch conversion. - Optional AI-assisted formula classification with privacy controls and no document upload by default. - Includes command-line interface and quick-launch Web UI for local use.
元数据
Slug word-latex-formula
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

word-latex-formula 是什么?

Convert manually typed formulas in Word documents (.doc, .docx, .wps) into editable Word equations while preserving layout through local Microsoft Word or Li... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 53 次。

如何安装 word-latex-formula?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install word-latex-formula」即可一键安装,无需额外配置。

word-latex-formula 是免费的吗?

是的,word-latex-formula 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

word-latex-formula 支持哪些平台?

word-latex-formula 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 word-latex-formula?

由 DavidTian(@tianyedavid)开发并维护,当前版本 v1.0.0。

💬 留言讨论