본문으로 건너뛰기
cccskills
무료GitHub에 공개

academic-formula-inserter

Insert, format, and number math formulas in Word and LaTeX academic papers. Supports Chinese core journals and international journal formats. Invoke when user needs to insert LaTeX formulas into Word (OMML), validate formula formats per journal standards, or auto-number equations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Word
설치 방법 보기

포함된 파일(12)

  • SKILL.md5.8 KB
  • scripts/build_docx_raw.py18.2 KB
  • scripts/build_ole_docx.py22.3 KB
  • scripts/convert_omml_to_mathtype.py6.2 KB
  • scripts/convert_omml_to_mathtype.vbs3.5 KB
  • scripts/convert_to_mathtype.py4.6 KB
  • scripts/formula_inserter.py11.4 KB
  • scripts/formula_numbering.py5.2 KB
  • scripts/latex_omml_converter.py9.5 KB
  • scripts/mathtype_integration.py11.3 KB
  • scripts/run_tests.py5.5 KB
  • scripts/utils/journal_profiles.py2.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Academic Formula Inserter

Insert, format, number, and validate math formulas in academic papers. Supports Word (.docx) with native OMML equations and LaTeX (.tex) output, with automatic formatting per journal standards.

Supported Journal Formats

CategoryFormatsExamples
Chinese CoreGB/T 7714 formula style中文核心、CSCD、CSSCI
InternationalIEEE, APA, Nature, ScienceElsevier, Springer, Taylor & Francis
General AcademicCustom numbering & styleThesis, dissertation, report

Formula Numbering Styles

StyleExampleUsed By
chinese式(1) 式(2)Chinese core journals
parentheses(1) (2)IEEE, general
brackets[1] [2]Some physics journals
section(1.1) (2.3)Thesis with section-based numbering
latex-tag\tag{1} \label{eq:1}LaTeX native

Commands

insert-formula — Insert LaTeX formula into Word document

Converts LaTeX string to native Word OMML equation and inserts at cursor or specified location.

Usage:

python insert_formula.py insert-formula <docx_path> --latex "<formula>" [--display] [--style <style>] [--number <num>]

Options:

ArgumentDescription
<docx_path>Path to .docx file
--latexLaTeX formula string (e.g. "E=mc^2")
--displayDisplay equation (centered, default: inline)
--styleNumbering style: chinese, parentheses, brackets, section, none
--numberSpecific number for the equation
--positionParagraph index to insert at
--labelEquation label for cross-reference
--interactiveInteractive mode: prompt to choose numbering style from a menu

batch-convert — Batch convert all LaTeX in document

Scans the document for $...$ and $$...$$ patterns and converts them to native OMML equations.

Usage:

python insert_formula.py batch-convert <docx_path> [--backup] [--mode quick|safe|full]

number-formulas — Auto-number all equations

Detects all equations in the document and numbers them sequentially according to the specified style.

Usage:

# 指定编号风格
python insert_formula.py number-formulas <docx_path> --style parentheses

# 交互模式: 程序提示用户选择编号风格
python insert_formula.py number-formulas <docx_path> --interactive

支持编号风格 (交互提示):

  编号   名称          示例              说明
  ----------------------------------------------
    1    中文核心      式(1)             适用于中文核心期刊
    2    圆括号        (1)               适用于 IEEE、Elsevier 等国际期刊
    3    方括号        [1]               适用于部分物理/数学期刊
    4    章节编号      (1.1)             适用于学位论文/多章节文档
    5    LaTeX标签     \tag{1}           LaTeX 原生格式
    6    中文+括号     式(1)             中文括号组合
    7    无编号        无                不添加编号
  ----------------------------------------------
  输入编号 (1-7),或按 Enter 使用默认 [2-圆括号]

validate-format — Validate formula format for journal

Checks if all formulas in the document conform to the target journal's style requirements.

Usage:

python insert_formula.py validate-format <docx_path> --journal <journal>

export-latex — Export formulas as LaTeX

Extracts all OMML equations from a Word document and exports them as LaTeX code.

Usage:

python insert_formula.py export-latex <docx_path> [--output <output.tex>]

list-styles — List all supported journal styles

python insert_formula.py list-styles

Conversion Pipeline

LaTeX string
    │
    ▼
latex2mathml ──── LaTeX → MathML
    │
    ▼
pandoc/mml2omml ── MathML → OMML (Office Math Markup Language)
    │
    ▼
python-docx ────── Insert OMML into .docx paragraph
    │
    ▼
Word native equation (editable, scalable)

Architecture

academic-formula-inserter/
├── SKILL.md                           # Skill definition
├── scripts/
│   ├── formula_inserter.py            # Main entry (CLI)
│   ├── latex_omml_converter.py        # LaTeX ↔ OMML conversion
│   ├── formula_numbering.py           # Auto-numbering engine
│   ├── format_validator.py            # Journal format validation
│   └── utils/
│       ├── docx_utils.py              # Word document utilities
│       ├── journal_profiles.py        # Journal format definitions
│       └── omml_builder.py            # Low-level OMML XML building

Requirements

  • Python 3.8+
  • python-docx
  • latex2mathml
  • lxml

Optional:

  • pandoc (for advanced MathML→OMML conversion)
  • pylatex (for LaTeX export)

Examples

Insert a display equation with Chinese numbering

python insert_formula.py insert-formula paper.docx ^
    --latex "\sum_{i=1}^{n} x_i = \mu" ^
    --display --style chinese --number 5

Result: centered equation with 式(5) right-aligned

Batch convert for IEEE submission

python insert_formula.py batch-convert paper.docx --backup
python insert_formula.py number-formulas paper.docx --style parentheses
python insert_formula.py validate-format paper.docx --journal ieee

Export to LaTeX

python insert_formula.py export-latex paper.docx --output formulas.tex

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Inserts, formats, and cross-references academic citations in docx. Invoke when user needs to insert references, fix citation order, add cross-reference hyperlinks, or reformat bibliography to Chinese (GB/T 7714) or international (IEEE/APA) standards.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

fuwenhao12/academic-ref-inserter602026년 6월 1일 업데이트

Insert, format, and cross-reference academic citations in Word (.docx) documents. Supports GB/T 7714-2015 (Chinese), IEEE, and APA 7th.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

fuwenhao12/academic-ref-inserter602026년 6월 1일 업데이트

Insert, format, and cross-reference academic citations in Word (.docx) documents. Supports GB/T 7714-2015, IEEE, APA 7th.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

fuwenhao12/academic-ref-inserter602026년 6월 1일 업데이트

fuwenhao12의 스킬 모두 보기

이 스킬의 문제 신고