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: needs-fix
Last updated: 2026-08-14 by idd-verify R3
Dashboard: For Reviewer / Collaborator
Key Decisions
- Markdown → DOCX 維持向後相容的 literal 預設;原生 Word math 只由
--math omath 選擇性啟用。
- v1 使用保守 dollar delimiter scanner 與
latex-math-swift v0.2.0 子集,unsupported/malformed formula 以具來源位置的公開錯誤 fail-loud。
- inline/display 分別輸出
m:oMath/m:oMathPara,並在任何目的檔寫入前完成全部掃描與解析。
Scope Changes
Blocking
- R3:multiline display span可跨原始CommonMark block/container,成功轉檔時改變文件結構。
- R3:multiline reference label與angle destination grammar不完整,可把generated placeholder寫進relationship target。
- R3:multiline/quoted HTML boundary未完整排除,可造成隱藏公式失敗或可見placeholder外洩。
- R3:
$*x*$等跨formatting-node delimiter與frozen proposal non-goal不一致。
Closed since R2
- Marker allocation O(N²)已以一次預索引與Set lookup關閉。
- 普通multiline inline link/image destination regression已綠,但完整destination grammar仍由R3阻擋。
- transformed AST display validation已加入,但原始跨block span仍須在替換前拒絕。
Commits
- d79e6a5 — native Markdown OMath conversion, CLI surface, specs, tests, and documentation.
- 3365faf — archived namespace、已知 container/reference 邊界與 render-time token lookup remediation.
- 68c7403 — multiline link、AST display validation與linear marker remediation.
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: needs-fix
Last updated: 2026-08-14 by idd-verify R3
Dashboard: For Reviewer / Collaborator
Key Decisions
--math omath選擇性啟用。latex-math-swiftv0.2.0 子集,unsupported/malformed formula 以具來源位置的公開錯誤 fail-loud。m:oMath/m:oMathPara,並在任何目的檔寫入前完成全部掃描與解析。Scope Changes
Blocking
$*x*$等跨formatting-node delimiter與frozen proposal non-goal不一致。Closed since R2
Commits
Verification
Pull Request