Skip to content

Releases: AllenWang2005/Word-typesetting

v1.3.0 — formula italic/number fixes + appendix code font

Choose a tag to compare

@AllenWang2005 AllenWang2005 released this 29 Jun 09:07

Targets three real formatting failures seen in generated reports.

Since v1.2.2

Formulas

  • The whole equation was being italicized, so digits and operators came out slanted — fixed: only variable letters are italic; digits/operators/parentheses/units stay upright (do not add <w:i/> to the whole equation).
  • Multi-letter coefficients (CI, CG, CS) must be one variable + upright subscript (C_I, C_G, C_S), not adjacent italic letters.
  • The equation number was centered; it must be right-aligned. Use a left-aligned paragraph with a center tab (equation) + right tab (number), not a centered line.

Appendix code

  • Now pinned to Times New Roman 小四 for English/numbers (Songti 小四 for Chinese); added to the font-size table.

Auditor

  • New FORMULA_DIGIT_ITALIC (italic number/operator in a formula) and EQUATION_NUMBER_CENTER (centered numbered formula) checks. 55 unit tests.

v1.2.2 — three-line table OOXML recipe

Choose a tag to compare

@AllenWang2005 AllenWang2005 released this 28 Jun 14:26

Makes the three-line table rule actually implementable.

Since v1.2.1

Models were applying a gridded / header-shaded table style and producing a table with no top/bottom rule and a thick middle line — the opposite of a three-line table. The line-width numbers alone weren't enough guidance.

  • New references/three-line-table-ooxml.md — a concrete recipe: exactly which borders to set (thick top/bottom w:sz≈12, a single thin header rule w:sz≈6, all other borders none), the w:sz width table (eighths of a point), a python-docx note, and how to avoid gridded/header-shaded styles.
  • SKILL.md + formatting-standard.md spell out: top and bottom rules visible and thicker, a single thinner middle (header) rule, every other border none, and no gridded/header-shaded table style.
  • Standard version → 2026-06-28.

v1.2.1 — in-table formulas use the 五号 table size

Choose a tag to compare

@AllenWang2005 AllenWang2005 released this 27 Jun 11:46

A small but visible consistency fix for tables.

Since v1.2.0

  • Standard: formulas, variables, and quantity symbols inside a table now follow the table text size (五号 / 10.5 pt), not the body size (小四 / 12 pt). Formula font size follows its context everywhere (body → 小四, table → 五号), and the OMML conversion step sets the size explicitly.
  • Auditor: TABLE_SIZE now also inspects OMML math runs (m:r), so an in-table formula left at the wrong (larger) size is flagged, not just ordinary cell text.
  • 50 standard-library unit tests.

v1.2.0 — fewer false positives, three-line + heading-style checks

Choose a tag to compare

@AllenWang2005 AllenWang2005 released this 26 Jun 08:53

False-positive cleanup plus two new structural checks, a compliant example, and a changelog.

Highlights since v1.1.0

Auditor

  • Paragraph-based checks now exclude table-cell text — removes the H1_CENTER / H1_GAP / punctuation / formula false positives caused by numbers and short fragments inside table cells.
  • New TABLE_BORDERS: flags a table with direct vertical/inner borders instead of a white three-line layout.
  • New HEADING_NO_STYLE: flags a heading-looking line that uses no Word heading style (so it never enters the TOC).
  • Tightened the bare-symbol formula heuristic so prose like "为 A 方案" / "取 N 个" is no longer flagged; BODY_FONT no longer flags centered cover titles.

Examples & docs

  • examples/make_sample.py --compliant builds a document the auditor reports as PASS, with captured output.
  • CHANGELOG.md added; standard version bumped to 2026-06-26; both READMEs list the new codes.
  • 48 standard-library unit tests; CI on Python 3.9 / 3.12.

v1.1.0 — spec refinements + bilingual README

Choose a tag to compare

@AllenWang2005 AllenWang2005 released this 26 Jun 04:53

Refinements to the formatting standard and the audit tooling, aligned to a common Chinese thesis/course-design spec, plus a bilingual README.

Highlights since v1.0.0

Standard

  • Headings: level 1–2 in Heiti, not bold; level-3 in bold Songti; cover title 二号 Heiti bold. Line spacing default 1.5×.
  • Numbers & units: the number–unit gap is a half-width (non-breaking) space, not full-width; %, °, /°C attach directly with no space (50%, 30°, 25℃).
  • Tables: content font 五号 (10.5 pt) — one size below the body (小四 still accepted, never larger than body); table notes 小五.
  • Page margins default to top 2.54 / bottom 2.5 / left 3 / right 2.5 cm.

Auditor

  • TABLE_SIZE now accepts 五号 (w:sz=21) and 小四 (24) and flags oversized table text.
  • HEADING_FONT only flags level 1–2 Songti headings (level-3 is intentionally Songti).
  • COLOR ignores hyperlink and theme colors (no more TOC/link false positives).
  • Checks added in this line: HEADING_PUNCT, HEADING_FONT/BODY_FONT, CAPTION_POSITION, CITATION_NO_BRACKETS.

Docs & repo

  • Bilingual README: README.md (English) + README.zh-CN.md (简体中文) with a click-to-switch language link.
  • normalize_docx.py safe auto-fixer (full-width citation brackets, ASCII-punctuation-between-CJK).
  • 40 stdlib unittest tests; CI on Python 3.9 / 3.12.

v1.0.0 — Word Report Formatting skill

Choose a tag to compare

@AllenWang2005 AllenWang2005 released this 25 Jun 14:41

First stable release of the Word Report Formatting skill — a reusable Codex / Claude Code skill that formats formal Chinese Word (.docx) reports to a consistent academic standard.

What's included

The standard (SKILL.md + references/)

  • Typography: Songti body / Heiti headings / Times New Roman for English, full font-size hierarchy, dominant-language punctuation, justified body.
  • Document structure & page setup: section order, A4 margins/gutter, headers/footers, Roman→Arabic page numbering via section breaks, auto TOC, multilevel heading numbering, widow/orphan control.
  • Tables (white three-line, caption above, header repeated), figures (caption below), by-chapter numbering, reference-before-appearance.
  • Formulas authored as LaTeX → native Word OMML (variables italic, units/operators upright); chapter equation numbers.
  • Citations as field-backed superscript cross-references to the whole bracketed [1]; bibliography per GB/T 7714—2015.
  • Numbers/units (GB 3100/3101/3102, GB/T 15835); appendix code with red comments.

Tooling (scripts/)

  • audit_docx_format.py — read-only guardrail with 16 machine checks (punctuation, headings, fonts, captions, tables, citations, formulas), --json output, FAIL/WARN summary. Domain-neutral.
  • normalize_docx.py — safe auto-fixer for full-width citation brackets and ASCII-punctuation-between-CJK.

Quality

  • 36 stdlib unittest tests; GitHub Actions CI (py_compile + tests on Python 3.9 / 3.12).
  • examples/ with a non-compliant sample generator and its captured audit report.

Standard version: 2026-06-25.