bokuweb / docx-rs

:memo: A .docx file writer with Rust/WebAssembly.
https://bokuweb.github.io/docx-rs/
MIT License
334 stars 57 forks source link

Issue collecting Tabs from Paragraph #655

Closed gjblajian closed 10 months ago

gjblajian commented 10 months ago

The tabs are present in the paragraph xml but are not in the output.

Screenshot 2023-10-09 at 4 10 40 PM

We need the tabs to be available to calculate the correct indent(s) for lists.

image

These values are not present in the output

      <w:tabs>
        <w:tab w:val="clear" w:pos="720"/>
        <w:tab w:val="num" w:pos="432"/>
      </w:tabs>

document.xml

    <w:p w:rsidRPr="00F536AC" w:rsidR="003A243B" w:rsidP="003A243B" w:rsidRDefault="003A243B" w14:paraId="6346A35E" w14:textId="77777777">
      <w:pPr>
        <w:pStyle w:val="SchHeading3"/>
        <w:numPr>
          <w:ilvl w:val="2"/>
          <w:numId w:val="19"/>
        </w:numPr>
        <w:rPr>
          <w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman" w:eastAsia="Arial"/>
          <w:b/>
          <w:i/>
          <w:sz w:val="22"/>
          <w:szCs w:val="22"/>
        </w:rPr>
      </w:pPr>
      <w:r w:rsidRPr="00F536AC">
        <w:rPr>
          <w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman" w:eastAsia="Arial"/>
          <w:b/>
          <w:i/>
          <w:sz w:val="22"/>
          <w:szCs w:val="22"/>
        </w:rPr>
        <w:t>Fundraising and Share capital:</w:t>
      </w:r>
    </w:p>

styles.xml

  <w:style w:type="paragraph" w:styleId="SchHeading3" w:customStyle="1">
    <w:name w:val="Sch.Heading 3"/>
    <w:basedOn w:val="Normal"/>
    <w:rsid w:val="003A243B"/>
    <w:pPr>
      <w:numPr>
        <w:ilvl w:val="2"/>
        <w:numId w:val="32"/>
      </w:numPr>
      <w:tabs>
        <w:tab w:val="clear" w:pos="720"/>
        <w:tab w:val="num" w:pos="432"/>
      </w:tabs>
      <w:autoSpaceDE/>
      <w:autoSpaceDN/>
      <w:adjustRightInd/>
      <w:spacing w:after="240"/>
      <w:ind w:left="360" w:hanging="288"/>
      <w:jc w:val="both"/>
    </w:pPr>
    <w:rPr>
      <w:rFonts w:ascii="Arial" w:hAnsi="Arial" w:eastAsia="Times New Roman"/>
      <w:sz w:val="21"/>
      <w:lang w:val="en-GB" w:eastAsia="en-US"/>
    </w:rPr>
  </w:style>

numbering.xml

  <w:abstractNum w:abstractNumId="19" w15:restartNumberingAfterBreak="0">
    <w:nsid w:val="16E03D85"/>
    <w:multiLevelType w:val="multilevel"/>
    <w:tmpl w:val="348427E4"/>
    <w:lvl w:ilvl="0">
      <w:start w:val="1"/>
      <w:numFmt w:val="decimal"/>
      <w:lvlText w:val="%1."/>
      <w:lvlJc w:val="left"/>
      <w:rPr>
        <w:rFonts w:hAnsi="Arial Unicode MS"/>
        <w:caps w:val="0"/>
        <w:smallCaps w:val="0"/>
        <w:strike w:val="0"/>
        <w:dstrike w:val="0"/>
        <w:color w:val="000000"/>
        <w:spacing w:val="0"/>
        <w:w w:val="100"/>
        <w:kern w:val="0"/>
        <w:position w:val="0"/>
        <w:highlight w:val="none"/>
        <w:u w:val="none"/>
        <w:effect w:val="none"/>
        <w:vertAlign w:val="baseline"/>
      </w:rPr>
    </w:lvl>
    <w:lvl w:ilvl="1">
      <w:start w:val="1"/>
      <w:numFmt w:val="decimal"/>
      <w:lvlText w:val="%2."/>
      <w:lvlJc w:val="left"/>
      <w:rPr>
        <w:rFonts w:hAnsi="Arial Unicode MS"/>
        <w:caps w:val="0"/>
        <w:smallCaps w:val="0"/>
        <w:strike w:val="0"/>
        <w:dstrike w:val="0"/>
        <w:color w:val="000000"/>
        <w:spacing w:val="0"/>
        <w:w w:val="100"/>
        <w:kern w:val="0"/>
        <w:position w:val="0"/>
        <w:highlight w:val="none"/>
        <w:u w:val="none"/>
        <w:effect w:val="none"/>
        <w:vertAlign w:val="baseline"/>
      </w:rPr>
    </w:lvl>
    <w:lvl w:ilvl="2">
      <w:start w:val="1"/>
      <w:numFmt w:val="decimal"/>
      <w:lvlText w:val="%2.%3."/>
      <w:lvlJc w:val="left"/>
      <w:rPr>
        <w:rFonts w:hAnsi="Arial Unicode MS"/>
        <w:caps w:val="0"/>
        <w:smallCaps w:val="0"/>
        <w:strike w:val="0"/>
        <w:dstrike w:val="0"/>
        <w:color w:val="000000"/>
        <w:spacing w:val="0"/>
        <w:w w:val="100"/>
        <w:kern w:val="0"/>
        <w:position w:val="0"/>
        <w:highlight w:val="none"/>
        <w:u w:val="none"/>
        <w:effect w:val="none"/>
        <w:vertAlign w:val="baseline"/>
      </w:rPr>
    </w:lvl>
    <w:lvl w:ilvl="3">
      <w:start w:val="1"/>
      <w:numFmt w:val="lowerLetter"/>
      <w:lvlText w:val="(%4)"/>
      <w:lvlJc w:val="left"/>
      <w:rPr>
        <w:rFonts w:hAnsi="Arial Unicode MS"/>
        <w:caps w:val="0"/>
        <w:smallCaps w:val="0"/>
        <w:strike w:val="0"/>
        <w:dstrike w:val="0"/>
        <w:color w:val="000000"/>
        <w:spacing w:val="0"/>
        <w:w w:val="100"/>
        <w:kern w:val="0"/>
        <w:position w:val="0"/>
        <w:highlight w:val="none"/>
        <w:u w:val="none"/>
        <w:effect w:val="none"/>
        <w:vertAlign w:val="baseline"/>
      </w:rPr>
    </w:lvl>
    <w:lvl w:ilvl="4">
      <w:start w:val="1"/>
      <w:numFmt w:val="lowerRoman"/>
      <w:lvlText w:val="(%5)"/>
      <w:lvlJc w:val="left"/>
      <w:rPr>
        <w:rFonts w:hAnsi="Arial Unicode MS"/>
        <w:caps w:val="0"/>
        <w:smallCaps w:val="0"/>
        <w:strike w:val="0"/>
        <w:dstrike w:val="0"/>
        <w:color w:val="000000"/>
        <w:spacing w:val="0"/>
        <w:w w:val="100"/>
        <w:kern w:val="0"/>
        <w:position w:val="0"/>
        <w:highlight w:val="none"/>
        <w:u w:val="none"/>
        <w:effect w:val="none"/>
        <w:vertAlign w:val="baseline"/>
      </w:rPr>
    </w:lvl>
    <w:lvl w:ilvl="5">
      <w:start w:val="1"/>
      <w:numFmt w:val="upperLetter"/>
      <w:lvlText w:val="(%6)"/>
      <w:lvlJc w:val="left"/>
      <w:rPr>
        <w:rFonts w:hAnsi="Arial Unicode MS"/>
        <w:caps w:val="0"/>
        <w:smallCaps w:val="0"/>
        <w:strike w:val="0"/>
        <w:dstrike w:val="0"/>
        <w:color w:val="000000"/>
        <w:spacing w:val="0"/>
        <w:w w:val="100"/>
        <w:kern w:val="0"/>
        <w:position w:val="0"/>
        <w:highlight w:val="none"/>
        <w:u w:val="none"/>
        <w:effect w:val="none"/>
        <w:vertAlign w:val="baseline"/>
      </w:rPr>
    </w:lvl>
    <w:lvl w:ilvl="6">
      <w:start w:val="1"/>
      <w:numFmt w:val="decimal"/>
      <w:lvlText w:val="%7."/>
      <w:lvlJc w:val="left"/>
      <w:rPr>
        <w:rFonts w:hAnsi="Arial Unicode MS"/>
        <w:caps w:val="0"/>
        <w:smallCaps w:val="0"/>
        <w:strike w:val="0"/>
        <w:dstrike w:val="0"/>
        <w:color w:val="000000"/>
        <w:spacing w:val="0"/>
        <w:w w:val="100"/>
        <w:kern w:val="0"/>
        <w:position w:val="0"/>
        <w:highlight w:val="none"/>
        <w:u w:val="none"/>
        <w:effect w:val="none"/>
        <w:vertAlign w:val="baseline"/>
      </w:rPr>
    </w:lvl>
    <w:lvl w:ilvl="7">
      <w:start w:val="1"/>
      <w:numFmt w:val="decimal"/>
      <w:lvlText w:val="%8."/>
      <w:lvlJc w:val="left"/>
      <w:rPr>
        <w:rFonts w:hAnsi="Arial Unicode MS"/>
        <w:caps w:val="0"/>
        <w:smallCaps w:val="0"/>
        <w:strike w:val="0"/>
        <w:dstrike w:val="0"/>
        <w:color w:val="000000"/>
        <w:spacing w:val="0"/>
        <w:w w:val="100"/>
        <w:kern w:val="0"/>
        <w:position w:val="0"/>
        <w:highlight w:val="none"/>
        <w:u w:val="none"/>
        <w:effect w:val="none"/>
        <w:vertAlign w:val="baseline"/>
      </w:rPr>
    </w:lvl>
    <w:lvl w:ilvl="8">
      <w:start w:val="1"/>
      <w:numFmt w:val="decimal"/>
      <w:lvlText w:val="%9."/>
      <w:lvlJc w:val="left"/>
      <w:rPr>
        <w:rFonts w:hAnsi="Arial Unicode MS"/>
        <w:caps w:val="0"/>
        <w:smallCaps w:val="0"/>
        <w:strike w:val="0"/>
        <w:dstrike w:val="0"/>
        <w:color w:val="000000"/>
        <w:spacing w:val="0"/>
        <w:w w:val="100"/>
        <w:kern w:val="0"/>
        <w:position w:val="0"/>
        <w:highlight w:val="none"/>
        <w:u w:val="none"/>
        <w:effect w:val="none"/>
        <w:vertAlign w:val="baseline"/>
      </w:rPr>
    </w:lvl>
  </w:abstractNum>

Desktop (please complete the following information)

bokuweb commented 10 months ago

@gjblajian Please try 0.0.278-rc24