-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
DOCX bullet lists always render with Typst's default markers (-) regardless of the custom bullet characters defined in numbering.xml. The lvlText values (e.g., ●, ○, ■) are not read or applied.
Root Cause
In crates/office2pdf/src/parser/docx.rs, build_num_kind_map() (line ~62) only determines whether a list is Ordered or Unordered by checking if the format is "bullet". The actual lvlText value that defines the marker character is never extracted.
The codegen (crates/office2pdf/src/render/typst_gen.rs line ~1197) then uses Typst's #list() for unordered lists, which renders with the default - marker.
numbering.xml example:
<w:abstractNum w:abstractNumId="1">
<w:lvl w:ilvl="0">
<w:numFmt w:val="bullet"/>
<w:lvlText w:val="●"/> <!-- filled circle -->
<w:pPr><w:ind w:left="720" w:hanging="360"/></w:pPr>
</w:lvl>
<w:lvl w:ilvl="1">
<w:numFmt w:val="bullet"/>
<w:lvlText w:val="○"/> <!-- open circle -->
<w:pPr><w:ind w:left="1440" w:hanging="360"/></w:pPr>
</w:lvl>
<w:lvl w:ilvl="2">
<w:numFmt w:val="bullet"/>
<w:lvlText w:val="■"/> <!-- filled square -->
<w:pPr><w:ind w:left="2160" w:hanging="360"/></w:pPr>
</w:lvl>
</w:abstractNum>Expected
- Level 0:
●Item text - Level 1:
○Sub-item text - Level 2:
■Sub-sub-item text
Actual
All levels render with -:
-Item text-Sub-item text-Sub-sub-item text
Fix Suggestion
- Extract
lvlTextfrom numbering definitions and store per-level marker info - Extend the IR
ListorListItemto carry custom marker characters - In Typst codegen, use
#list(marker: [●])or#set list(marker: [●])to override default markers
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working