Skip to content

bug: tex-to-docx 不認識 starred commands (\section*{}) 且 heading style 未套用 #58

Description

@kiki830621

Problem

tex-to-docx converter 有三個格式問題:

  1. 不認識 starred commands — \section*{}, \subsection*{}, \subsubsection*{} 的 * 沒被解析,*{ 洩漏到輸出文字中(2610 處)
  2. Heading style 未套用 — 所有 7584 段都是 Normal,沒有任何 Heading2/3/4
  3. 篇名只匹配 \篇名 — 但實際 .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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions