Problem
tex-to-docx converter 有三個格式問題:
- 不認識 starred commands —
\section*{}, \subsection*{}, \subsubsection*{} 的 * 沒被解析,*{ 洩漏到輸出文字中(2610 處)
- Heading style 未套用 — 所有 7584 段都是 Normal,沒有任何 Heading2/3/4
- 篇名只匹配
\篇名 — 但實際 .tex 裡 \篇名 後面跟著分行,不在同一行上
Root Cause
matchCommand("section", ...) 用的 pattern 是 \\section\{...\},不匹配 \\section*\{...\}。
Expected
| LaTeX |
DOCX Style |
\section*{title} |
Heading2 + dark background |
\subsection*{title} |
Heading3 + brown |
\subsubsection*{title} |
Heading4 + blue + 【】 |
\篇名{line1}{line2} |
Page break + centered title |
Reproduction
macdoc tex-to-docx 排版/馬老師/輕導讀/main.tex -o test.docx
# Open test.docx → all paragraphs are Normal, *{ visible in text
Problem
tex-to-docx converter 有三個格式問題:
\section*{},\subsection*{},\subsubsection*{}的*沒被解析,*{洩漏到輸出文字中(2610 處)\篇名— 但實際 .tex 裡\篇名後面跟著分行,不在同一行上Root Cause
matchCommand("section", ...)用的 pattern 是\\section\{...\},不匹配\\section*\{...\}。Expected
\section*{title}\subsection*{title}\subsubsection*{title}\篇名{line1}{line2}Reproduction
macdoc tex-to-docx 排版/馬老師/輕導讀/main.tex -o test.docx # Open test.docx → all paragraphs are Normal, *{ visible in text