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 -:
Fix Suggestion
- Extract
lvlText from numbering definitions and store per-level marker info
- Extend the IR
List or ListItem to carry custom marker characters
- In Typst codegen, use
#list(marker: [●]) or #set list(marker: [●]) to override default markers
Description
DOCX bullet lists always render with Typst's default markers (
-) regardless of the custom bullet characters defined innumbering.xml. ThelvlTextvalues (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 isOrderedorUnorderedby checking if the format is"bullet". The actuallvlTextvalue that defines the marker character is never extracted.The codegen (
crates/office2pdf/src/render/typst_gen.rsline ~1197) then uses Typst's#list()for unordered lists, which renders with the default-marker.numbering.xml example:
Expected
●Item text○Sub-item text■Sub-sub-item textActual
All levels render with
-:-Item text-Sub-item text-Sub-sub-item textFix Suggestion
lvlTextfrom numbering definitions and store per-level marker infoListorListItemto carry custom marker characters#list(marker: [●])or#set list(marker: [●])to override default markers