← 返回 Skills 市场
wsyummy

论文常用的tex格式转换为word格式,核心是能转换数学公式(非图片),表格,图表等等

作者 huangchuzhi · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
29
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install tex2docx
功能描述
Convert LaTeX (.tex) academic papers to Word (.docx) with editable OMML equations, native Word tables, embedded figures, IEEE two-column format, and bibliogr...
使用说明 (SKILL.md)

tex2docx — LaTeX to Word Converter

Requirements

  • pandoc (system install): winget install pandoc or pandoc.org
  • Python packages: pip install python-docx lxml pypandoc_binary

Usage

python scripts/tex2docx.py input.tex [output.docx]

If output.docx is omitted, output is input.docx in the same directory.

How It Works (Three Phases)

.tex ──→ [pandoc] ──→ OMML equations (13+ Word-editable formulas)
  │
  └──→ [Custom parser] ──→ Native Word tables ├──→ Final .docx
                           Embedded figures     │   (merged)
                           Formatted refs       │
                           IEEE layout & font  ┘

Phase 1 — Pandoc

Runs pandoc via pypandoc. Input file must be in its own directory (with figures/ subfolder if images exist). The script chdirs to the tex directory before running pandoc so image paths resolve correctly.

Phase 2 — Custom LaTeX Parser

RegEx-based extraction of:

  • Tables: \begin{table} → Word Table objects (full borders, centered, 8pt TNR)
  • Figures: \includegraphics{} + \caption{} → PNG/PDF embeds with italic captions
  • References: hebibliography → formatted entries with hanging indent
  • Sections: \section{}, \subsection{} → bold headings
  • Metadata: itle, author, \abstract, \IEEEkeywords

Phase 3 — Merge

OMML equation paragraphs from pandoc are inserted into the cleanly-built document. Body paragraphs get 0.25in first-line indent. All LaTeX commands ( extbf, oprule, \ref, \cite, \begin{itemize}, etc.) are stripped from text content.

Output Format

Feature Detail
Font Times New Roman (10pt body, 9pt table/figure, 8pt refs)
Layout A4, two-column IEEE conference style
Equations OMML (double-click to edit in Word)
Tables Native Word tables, all borders
Figures PNG/PDF embedded with "Fig." captions
References Hanging indent, [bN] format
First indent 0.25in on body paragraphs

Verification

python scripts/verify.py output.docx

Reports paragraph/table/image/equation counts and checks for LaTeX residue.

Chinese (ctex) Support

Fully supports Chinese LaTeX documents using the ctex package:

  • Chinese section titles (引言, 方法, 实验, 结论等) are recognized
  • \section*{} (star variant) is supported
  • Chinese table headers preserved
  • Chinese text in titles rendered via w:eastAsia font fallback
  • itle{...} and \author{...} residue paragraphs are filtered

Limitations

  • Inline math ($...$) becomes plain text (italic), not OMML — only \begin{equation}, \begin{align}, and \[...\] become editable equations
  • No .bib support: references must be in hebibliography{} environment
  • PNG images preferred: script tries PNG then PDF fallback
  • Pandoc path: the system pandoc binary must be discoverable by pypandoc

Script: scripts/tex2docx.py

Self-contained (660+ lines). Key internal functions:

Function Role
extract_tex() Parse all structural elements from .tex
extract_omml() Pull OMML XML from pandoc output
build_docx() Construct final document with all components
clean() Strip LaTeX commands to plain text
add_table() Build Word table with borders
add_figure() Embed image + caption
安全使用建议
Before installing or using this skill, edit or remove the hard-coded company/email block in scripts/tex2docx.py, install dependencies only from trusted sources, run it in a working copy of your paper directory, and carefully review the generated DOCX before sharing or submitting it.
功能分析
Type: OpenClaw Skill Name: tex2docx Version: 1.0.0 The skill bundle provides a functional utility for converting LaTeX academic papers to Word (.docx) format using the 'pypandoc' library and 'python-docx'. The scripts (tex2docx.py and verify.py) perform standard file operations, regex-based parsing of LaTeX elements, and document generation without any indicators of data exfiltration, malicious command execution, or prompt injection. The hardcoded template information in the header generation appears to be a specific user's default configuration rather than a malicious indicator.
能力评估
Purpose & Capability
The LaTeX-to-DOCX workflow is coherent, but the conversion script adds hard-coded affiliation/contact text that is not disclosed and is not derived from the user's LaTeX file.
Instruction Scope
SKILL.md scopes use to user-requested conversion of a provided .tex file and does not contain prompt-injection-style role changes or autonomous high-impact instructions.
Install Mechanism
The registry has no install spec or declared required binaries, while SKILL.md asks users to install pandoc and unpinned Python packages manually. This is purpose-aligned but should be done from trusted sources.
Credentials
The script reads the input .tex file and figures folder, invokes pandoc, and writes temporary/output .docx files. This is expected for the converter, though users should run it on copies and inspect outputs.
Persistence & Privilege
No credentials, account access, browser/session stores, background persistence, privileged paths, or network exfiltration endpoints are shown in the provided artifacts.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install tex2docx
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /tex2docx 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of tex2docx — LaTeX to Word converter. - Converts academic LaTeX (.tex) files to Word (.docx) with IEEE-style formatting - Preserves editable OMML equations, native Word tables, embedded figures, and bibliography - Supports two-column layout, Times New Roman font, and paragraph/table formatting - Includes Chinese (ctex) document support for section titles, headers, and text - Requires Python, pandoc, and a few Python packages (python-docx, lxml, pypandoc_binary) - Provides a verification script to check output quality and LaTeX residue
元数据
Slug tex2docx
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

论文常用的tex格式转换为word格式,核心是能转换数学公式(非图片),表格,图表等等 是什么?

Convert LaTeX (.tex) academic papers to Word (.docx) with editable OMML equations, native Word tables, embedded figures, IEEE two-column format, and bibliogr... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 29 次。

如何安装 论文常用的tex格式转换为word格式,核心是能转换数学公式(非图片),表格,图表等等?

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

论文常用的tex格式转换为word格式,核心是能转换数学公式(非图片),表格,图表等等 是免费的吗?

是的,论文常用的tex格式转换为word格式,核心是能转换数学公式(非图片),表格,图表等等 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

论文常用的tex格式转换为word格式,核心是能转换数学公式(非图片),表格,图表等等 支持哪些平台?

论文常用的tex格式转换为word格式,核心是能转换数学公式(非图片),表格,图表等等 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 论文常用的tex格式转换为word格式,核心是能转换数学公式(非图片),表格,图表等等?

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

💬 留言讨论