latex-to-word-workflow

在用户要求将学术 LaTeX 手稿、学位论文或报告转换为可编辑的 Word DOCX(并适配 Word 模板、保留引用或交叉引用,或诊断 LaTeX 到 Word 的转换问题)时加载;不用于仅编译 PDF、常规 Word 编辑或将 DOCX 转回 LaTeX 的任务。

仓库最近推送
GitHub Stars
140
Forks
10
Issues / PRs
0

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "latex-to-word-workflow":https://skillpi.com/zh/skills/deepskill-ce98539581d643903aab57b94fe7d0b9fac30d8d70bb54f1c370c4f2c54e5080。安装前核对上游来源和版本:https://github.com/hajimi-kun/latex-to-word-workflow。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

在用户要求将学术 LaTeX 手稿、学位论文或报告转换为可编辑的 Word DOCX(并适配 Word 模板、保留引用或交叉引用,或诊断 LaTeX 到 Word 的转换问题)时加载;不用于仅编译 PDF、常规 Word 编辑或将 DOCX 转回 LaTeX 的任务。

0 下载

介绍来源: third_party · hajimi-kun · 3.0.0 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: latex-to-word-workflow
description: >
  Load when the user asks to convert an academic LaTeX manuscript, thesis, or
  report into an editable Word DOCX, adapt it to a Word template, preserve
  citations or cross-references, or diagnose a LaTeX-to-Word conversion
  problem. Do not use for PDF-only LaTeX compilation, general Word editing,
  or DOCX-to-LaTeX conversion.
version: 3.0.0

LaTeX to Word

Produce a submission-grade Word candidate from a complete LaTeX project. The candidate must preserve scientific meaning, use the confirmed target semantics, remain editable where practical, and include an explicit status for the user-run Word/Zotero acceptance steps.

Non-negotiable defaults

  • Preserve the original LaTeX, bibliography, figures, and authoritative Word target. Work only on generated files or explicit copies.
  • Use Pandoc as the initial editable-structure converter. Add source annotations, Lua, OpenXML, or supported-adapter Word automation only for an observed bridge mismatch.
  • For a new project, initialize examples/bridge-starter/ into the generated build directory. Reuse docx_bridge.py for fields, bookmarks, styles, and DOCX packaging; adapt configuration or project_adapter.py instead of reimplementing those primitives.
  • For every new or changed target, distill the required roles (not unrelated template styles) and pass a representative probe before full conversion.
  • Treat object packaging and layout as target-owned contract values. Paragraphs, tab stops, borderless tables, caption segment sequences, label literals, and object order are possible representations, not generic skill defaults.
  • When citations exist, Zotero-live fields are mandatory. Run the fixed Zotero-live setup and probe in references/conversion-playbook.md#zotero-live-citations; repair agent-side configuration where possible and give the user exact manual steps for the remaining Word/Zotero setup.
  • Convert every LaTeX cross-reference occurrence to a verified native Word field by default. Static references require an informed, recorded user opt-out.
  • Treat desktop Microsoft Word as the authoritative environment for fields, numbering, layout behavior, and final validation. Word and Zotero actions are user-run acceptance steps unless the host explicitly provides a supported desktop adapter; never assume GUI, COM, or process access.
  • Prioritize: scientific fidelity, content completeness, citation/numbering semantics, editability, template structure, visual fidelity, then automation cost.

Capability boundary

  • Required for execution: access to the project files and a viable DOCX conversion path. If either is absent, provide diagnosis or a handoff plan and report the conversion as blocked.
  • Optional capabilities include shell or Python execution, LaTeX compilation, local application/process detection, Word rendering, GUI automation, and visual inspection. Attempt one only when the host explicitly exposes it.
  • An unavailable optional capability becomes a user-run gate, not a failed conversion. An unobservable capability remains unknown; never convert unknown into an installation or compatibility claim.

Read routing

Situation Required read
New, changed, example-only, or ambiguous Word target references/template-distillation.md, then references/conversion-playbook.md#build-the-semantic-bridge
First build for a project examples/bridge-starter/, then references/conversion-playbook.md#build-the-semantic-bridge
Zotero, cross-references, equations, captions, complex objects, or diagnosis Relevant section of references/conversion-playbook.md
Candidate validation or handoff references/conversion-playbook.md#validate-and-hand-off
Other conversion work Scan this file, then load only the relevant playbook section

Required workflow

  1. Read the user request and nearest project instructions. Identify the complete LaTeX entry point, authoritative Word target, output path, and capabilities exposed by the host.
  2. Compile the complete LaTeX project when the host exposes the toolchain; otherwise request the user's compiled reference or record compilation as a pending evidence gate. Inventory included sources, semantic roles, figures, tables, equations, citations, labels, reference occurrences, appendices, custom macros, and numbering behavior.
  3. If citations exist, complete the mandatory Zotero setup and probe before expensive manuscript post-processing. Never use the absence of a zotero CLI alone as evidence that Zotero is unavailable. If live fields cannot be generated, stop the citation-bearing build and hand off the exact setup gate.
  4. Classify and distill every new or changed Word target into an explicit role contract. Do not treat --reference-doc as an executable specification.
  5. For a new project, run python scripts/init_bridge.py <build-dir> and fill bridge_config.json from the role contract. Keep stable field, bookmark, and package operations in the copied docx_bridge.py; put only project-specific behavior in project_adapter.py or the semantic Lua filter.
  6. Build the bridge LaTeX role -> Pandoc output -> target Word representation -> method. Resolve every required role before full conversion.
  7. Convert a representative probe covering every high-risk role and transition. Inspect actual styles, formatting, fields, bookmarks, lists, and objects.
  8. Correct each mismatch at its responsible layer. Start the complete conversion only after the probe passes the applicable contract rows.
  9. Build the complete candidate and validate source, target-contract, and DOCX evidence. Counts are diagnostic; semantic correspondence is the gate.
  10. Follow references/conversion-playbook.md#validate-and-hand-off. Give the user a disposable candidate and exact Word/Zotero acceptance steps. If the user returns the refreshed file, re-run the audit and compare pre/post evidence.
  11. Deliver the candidate, agent-side evidence, user-refresh status, adaptations, unresolved items, and approved exceptions.

Bundled tools

Use the bundled standard-library scripts when Python 3 is available. init_bridge.py creates generated bridge files only; the manifest and audit scripts are read-only over source and DOCX inputs.

python scripts/latex_manifest.py <main.tex> --output <source-manifest.json>
python scripts/init_bridge.py <build-dir>
python scripts/docx_audit.py <candidate.docx> \
  --latex-manifest <source-manifest.json> \
  --require-native-crossrefs --require-zotero-fields \
  --output <candidate-audit.json>
python scripts/docx_audit.py <refreshed.docx> \
  --latex-manifest <source-manifest.json> \
  --baseline <candidate-audit.json> \
  --require-native-crossrefs --require-zotero-fields

--require-zotero-fields checks generated field presence, not that Refresh has occurred. Scripts provide package and semantic evidence; they cannot replace user-run Word rendering, field refresh, Zotero refresh, or user confirmation.

Stop conditions

Do not label the candidate fully verified when a required role is unmapped, a native field lacks a valid target, a REF target contains an entire drawing or table, the user reports a Word repair warning, live field generation is unverified, the user refresh/save/reopen gate is pending, or an unresolved scientific-content mismatch remains. A pending user gate may be delivered as a clearly labelled candidate; never silently downgrade it.

Known gotchas

  • Imported styles are not evidence that generated content uses them correctly. See references/template-distillation.md#build-the-role-contract.
  • ensuremath can turn prose formulae and units into unwanted OMML. See references/conversion-playbook.md#preserve-text-and-math-semantics.
  • A Pandoc bookmark can span a whole object, causing REF to reproduce it. See references/conversion-playbook.md#native-word-cross-references.
  • Raw OpenXML and field construction are starter-engine responsibilities, not project-adapter code. See examples/bridge-starter/.
  • Word/Zotero refresh can change fields and document structure. See references/conversion-playbook.md#validate-and-hand-off.
  • Zotero Refresh updates existing Zotero fields; it cannot create fields from non-Zotero citation text. See references/conversion-playbook.md#zotero-live-citations.
  • Field update can discard caption-run formatting or expose faulty equation packaging or alignment. See references/conversion-playbook.md#word-specific-objects.
  • Equation container (e.g. 1×3 borderless table) is not the same as column widths. Short template demos often use equal thirds; long OMML with fractions or \qquad secondaries needs a wide math cell or Word reflows mid-expression. Probe with a complex display equation. See references/conversion-playbook.md#numbered-equations.
  • PDF, EPS, TikZ, and PGFPlots artwork needs explicit Word-supported output. See references/conversion-playbook.md#high-risk-objects.

版本历史

  1. v3.0.0 GitHub ↗
    原版更新说明

    ## Highlights - Replace the fixed conversion pipeline with a template-first, role-contract workflow. - Add the canonical DOCX bridge starter with reusable native field, bookmark, style-remap, and package-preserving helpers. - Add five-layer template distillation and target-owned object packaging for equations, captions, tables, and transitions. - Add read-only LaTeX manifest and DOCX audit tools, Zotero/Word acceptance gates, and behavior-focused tests. - Renumber the post-v2 development history under v2.x; this release is v3.0.0. ## Verification - 10 repository unit tests passed. - Source and installed skill copies are synchronized.

  2. v2.0.0 GitHub ↗
    原版更新说明

    ## Highlights - Add native Word `SEQ`/`REF` promotion for figures, tables, and labeled equations. - Preserve LaTeX numbering across numbered-but-unlabeled predecessor objects. - Add cross-reference target, bookmark, occurrence, and LaTeX-to-DOCX fidelity audits. - Strengthen Zotero-live smoke validation and unresolved citation detection. - Upgrade the bundled Word template with editable equation, image, table, and cross-reference examples. - Expand bilingual workflow guidance, first-run setup, and ecosystem notes. See [`CHANGELOG.md`](https://github.com/hajimi-kun/latex-to-word-workflow/blob/v2.0.0/CHANGELOG.md) for details.

  3. v1.0.0 GitHub ↗
    原版更新说明

    Initial public release. - Convert LaTeX manuscripts to polished editable DOCX. - Support static CSL references and native Zotero live citation fields. - Include a reusable Word reference template, validation scripts, and a minimal example. - Include first-run onboarding for Word template and Zotero/Better BibTeX setup. - Provide English and Chinese skill documentation.

当前收录版本

3.0.0

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值78/100

亮点

  • 解决学术写作中 LaTeX 转 Word 的实际痛点,具备完整工具链和验证流程
  • 明确区分适用与不适用场景,避免误用
触发精准92/100

亮点

  • 触发词定义清晰,涵盖多种用户表达变体
  • 边界条件明确,有效防止与其他文本处理技能混淆
结构规范88/100

待提升项

  • 引用外部文件完整性 原报告严重程度:轻微

    主文档多次引用 references/conversion-playbook.md、examples/bridge-starter/ 等外部文件,但未确认是否包含在包内

    改进建议:确保所有被引用的 .md 和脚本文件均打包传入,或在文档中注明获取方式

亮点

  • 工作流程分阶段清晰,含11个具体步骤和停止条件
  • 提供完整的命令行工具调用示例
执行可靠94/100

亮点

  • 强调用户-run 关键步骤(如 Zotero 刷新),避免过度自动化假设
  • 对字段生成失败、模板不匹配等异常情况有明确处理路径
证据可验 (前四项均值)88/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。