Problem
macdoc convert --to docx file.md 對 markdown 內的 LaTeX math($...$ / $$...$$)是純文字直通 ——docx 內公式以字面 LaTeX 呈現(實測 v0.5.0:\beta 進 document.xml 為文字 run,無 <m:oMath> 元素)。
Expected
md→docx 路徑支援 $...$ / $$...$$ → Word 原生 OMath 轉換(可為 opt-in flag,如 --math omath)。
Context
參考
轉換目標為 OMML(<m:oMath>);pandoc 的 texmath 是既有實作參考。
Current Status
Phase : closed
Last updated : 2026-09-01 by idd-close
Dashboard : For Reviewer / Collaborator
Key Decisions
Markdown → DOCX 維持向後相容的 literal 預設;原生 Word math 只由 --math omath 選擇性啟用。
v1 使用原始 CommonMark AST/source ranges 與保守 dollar delimiter scanner;unsupported/malformed formula 以具 UTF-8 source location 的公開錯誤 fail-loud。
inline/display 分別輸出有效的 m:oMath/m:oMathPara carrier;所有 token 必須恰有一個允許的 consumer。
全部公式掃描與解析在任何目的檔寫入前完成;失敗不建立或取代目的檔。
Scope Changes
source eligibility 覆蓋 code、HTML、autolink、link/reference/image destination、reference metadata、formatting boundary 與 CommonMark block/container。
multiline link/image fallback 以 enclosing paragraph、單調 cursor 與 KMP 維持 bounded-linear。
同行與跨行 display closing 必須是原始 AST 明確認定的可見 Text;reference continuation Target="$$" 維持 byte-exact。
乾淨套件基線的 42 個既有失敗由 bug: restore a green md-to-word-swift package test baseline #155 追蹤,不在本分支擴張處理。
Blocking
無。Final verify:0 blocking、0 follow-up。
模型多樣性限制:本環境無 Claude-family reviewer;已使用 5 個獨立 Codex agent lens 與 Codex CLI gpt-5.4 初審/delta 複審並揭露此限制。
Commits
5119c36 — visible OMath closing、reference metadata、same-line opaque boundary 與 multiline recovery 線性化。
c42f343 — CommonMark UTF-8 source column 對齊與 library/compiled CLI regression。
Verified snapshot:idd-141-verified。
Verification
Pull Request
Problem
macdoc convert --to docx file.md對 markdown 內的 LaTeX math($...$/$$...$$)是純文字直通——docx 內公式以字面 LaTeX 呈現(實測 v0.5.0:\beta進 document.xml 為文字 run,無<m:oMath>元素)。Expected
md→docx 路徑支援
$...$/$$...$$→ Word 原生 OMath 轉換(可為 opt-in flag,如--math omath)。Context
/bestocr:ocr-toskill(OCR → docx)。目前該 skill 對 math 密集文件走 pandoc(已驗證$...$→<m:oMath>可行)作為過渡;macdoc native 支援落地後可收斂回單一轉檔器——追蹤 ref:feat: ocr-to 輸出 docx 的 LaTeX → OMath 公式升級(sister concern from #1) bestOCR#3。參考
<m:oMath>);pandoc 的 texmath 是既有實作參考。Current Status
Phase: closed
Last updated: 2026-09-01 by idd-close
Dashboard: For Reviewer / Collaborator
Key Decisions
--math omath選擇性啟用。m:oMath/m:oMathParacarrier;所有 token 必須恰有一個允許的 consumer。Scope Changes
Text;reference continuationTarget="$$"維持 byte-exact。Blocking
gpt-5.4初審/delta 複審並揭露此限制。Commits
5119c36— visible OMath closing、reference metadata、same-line opaque boundary 與 multiline recovery 線性化。c42f343— CommonMark UTF-8 source column 對齊與 library/compiled CLI regression。idd-141-verified。Verification
closingIssuesReferences為空;尚未合併。Pull Request