fword

AI-powered bidirectional Word ↔ LaTeX converter. Supports multiple AI providers (Anthropic, OpenAI, Qwen, Kimi, MiniMax, DeepSeek, Zhipu). Converts Word to clean LaTeX with AI refinement, and converts back preserving original styles.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "fword" with this command: npx skills add fword-skill

Fword — Word ↔ LaTeX Converter

You are an AI assistant equipped with the Fword skill for bidirectional Word ↔ LaTeX conversion.

When to Activate

Activate this skill when the user:

  • Wants to convert a .docx / Word file to LaTeX
  • Wants to convert a .tex / LaTeX file back to Word
  • Asks you to edit a Word document (convert to LaTeX first, edit, convert back)
  • Mentions "fword" by name

Setup

Before first use, ensure dependencies are installed:

bash {SKILL_DIR}/scripts/setup.sh

Check if setup is needed by testing: python3 -c "import pypandoc, anthropic, openai, docx". If this fails, run setup.

Supported AI Providers

ProviderEnv VariableDefault ModelFlag
Anthropic (Claude)ANTHROPIC_API_KEYclaude-sonnet-4-20250514-p anthropic
OpenAIOPENAI_API_KEYgpt-4o-p openai
Qwen (Alibaba)DASHSCOPE_API_KEYqwen-plus-p qwen
Kimi (Moonshot)MOONSHOT_API_KEYmoonshot-v1-8k-p kimi
MiniMaxMINIMAX_API_KEYMiniMax-Text-01-p minimax
DeepSeekDEEPSEEK_API_KEYdeepseek-chat-p deepseek
Zhipu (GLM)ZHIPU_API_KEYglm-4-plus-p zhipu

Any OpenAI-compatible API can also be used via --base-url.

Commands

Word → LaTeX

cd {SKILL_DIR}/scripts && python3 convert.py /absolute/path/to/document.docx /absolute/path/to/output.tex

Options:

  • -p, --provider PROVIDER — AI provider (default: anthropic)
  • --model MODEL — AI model (default: provider's default)
  • --api-key KEY — API key (or set provider's env var)
  • --base-url URL — Custom API base URL
  • --raw — Pandoc-only conversion, no AI refinement (no API key needed)
  • --keep-intermediate — Save Pandoc's raw output as .raw.tex

Examples:

# Default (Anthropic Claude)
cd {SKILL_DIR}/scripts && python3 convert.py /path/to/doc.docx

# Use Qwen
cd {SKILL_DIR}/scripts && python3 convert.py /path/to/doc.docx -p qwen

# Use DeepSeek with specific model
cd {SKILL_DIR}/scripts && python3 convert.py /path/to/doc.docx -p deepseek --model deepseek-chat

# Pandoc only (no AI)
cd {SKILL_DIR}/scripts && python3 convert.py /path/to/doc.docx --raw

LaTeX → Word

cd {SKILL_DIR}/scripts && python3 back.py /absolute/path/to/document.tex /absolute/path/to/output.docx

Options:

  • --reference-doc PATH — Use a specific Word template for styles (overrides workspace)

Workflow

Standard conversion

  1. Run convert.py on the .docx file — this creates a .fword/ workspace and outputs .tex
  2. The .fword/ workspace stores the original document as a style reference
  3. Edit the LaTeX as needed
  4. Run back.py to convert back — it automatically finds the workspace and recovers styles

AI-assisted editing workflow

When the user wants to edit a Word document with AI help:

  1. Convert: convert.py document.docx → produces document.tex
  2. Read the .tex file and make the requested edits directly in LaTeX
  3. Convert back: back.py document.tex → produces document.docx with original styles

Quick reference

User wants...Action
Convert Word to LaTeXconvert.py input.docx
Convert with Qwenconvert.py input.docx -p qwen
Convert with DeepSeekconvert.py input.docx -p deepseek
Convert without AIconvert.py input.docx --raw
Convert LaTeX to Wordback.py input.tex
Edit Word doc with AIconvert → edit .tex → back

Important Notes

  • Always use absolute paths for input/output files
  • Always cd {SKILL_DIR}/scripts before running scripts (they import each other)
  • Set the appropriate environment variable for your chosen provider's API key
  • If no API key is available, use --raw flag for Pandoc-only conversion
  • The .fword/ workspace is created next to the output file
  • For large documents, AI refinement processes in chunks automatically

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Huo15 Openclaw Enhance

火一五·克劳德·龙虾增强插件 v5.7.8 — 全面适配 openclaw 2026.4.24:peerDep ^4.24 + build/compat 同步到 4.24 + 14 处 api.on 全部去掉 as any 改成 typed hook(hookName 联合类型 + handler 自动推断 Pl...

Registry SourceRecently Updated
General

Content Trend Analyzer

Aggregates and analyzes content trends across platforms to identify hot topics, user intent, content gaps, and generates data-driven article outlines.

Registry SourceRecently Updated
General

Prompt Debugger

Debug prompts that produce unexpected AI outputs — diagnose failure modes, identify ambiguity and conflicting instructions, test variations, compare model re...

Registry SourceRecently Updated
General

Indie Maker News

独行者 Daily - 变现雷达。读对一条新闻,少走一年弯路。每天5分钟,给创业者装上商业雷达。聚焦一人公司、副业、创业变现资讯,智能分类,行动导向。用户下载即能用,无需本地部署!

Registry SourceRecently Updated