Skip to content

bug: tex-to-docx 封面文字殘留 {} 括號 #59

Description

@kiki830621

Problem

封面(titlepage)文字帶有 LaTeX 的 {} 分組括號:

  • {賽斯書輕導讀} → 應為 賽斯書輕導讀
  • {《個人實相的本質》} → 應為 《個人實相的本質》
  • { 馬老師讀書會} → 應為 馬老師讀書會

Root Cause

TeXPreambleParser.extractText() 移除了 \fontsize、\color 等命令,但沒有清掉外層的 {} 分組符號。

Fix

在 extractText() 最後加上移除殘餘 {}:

.replacingOccurrences(of: "{", with: "")
.replacingOccurrences(of: "}", with: "")

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