-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ordered List And UnOrdered List seems not work #59
Comments
+1 The unordered list starts to work with the godocx-produced document if I add the following into the
Though it's not indented, so then if I also add the
And this is the final OOXML form of a list item that appears to work <w:p>
<w:pPr>
+ <w:numPr>
+ <w:ilvl w:val="0"/>
+ <w:numId w:val="1"/>
+ </w:numPr>
+ <w:ind w:left="720" w:hanging="360"/>
<w:pStyle w:val="List Bullet">
</w:pStyle>
</w:pPr>
<w:r>
<w:t>item2
</w:t>
</w:r>
</w:p> As for numbered lists, I can't get them to work, somehow the only difference should be the numId value: - <w:numId w:val="1"/>
+ <w:numId w:val="2"/> But it doesn't appear to do the trick, it may be down to different schema versions, but the goocx-produced document schema version
google-docs-produced document schema version
So just for reference, I tried the following for a numbered list but it produced an unordered list instead. The difference between the two is that this does not seem to require the <w:p>
<w:pPr>
+ <w:numPr>
+ <w:ilvl w:val="0"/>
+ <w:numId w:val="2"/>
+ </w:numPr>
<w:pStyle w:val="List Number">
</w:pStyle>
</w:pPr>
<w:r>
<w:t>Numbered item3
</w:t>
</w:r>
</w:p> Env details grep "godocx" go.mod
github.com/gomutex/godocx v0.1.5
Word processors used
|
Having experimented a bit more with a few documents, I think the issue is not just the Numering and Indent, but also the list identification that is consistently present in new Word Processors, like below:
+ <w:p w:rsidR="00000000" w:rsidDel="00000000" w:rsidP="00000000" w:rsidRDefault="00000000" w:rsidRPr="00000000" w14:paraId="00000001">
<w:pPr>
<w:numPr>
<w:ilvl w:val="0"/>
<w:numId w:val="1"/>
</w:numPr>
<w:ind w:left="720" w:hanging="360"/>
<w:rPr>
<w:u w:val="none"/>
</w:rPr>
</w:pPr>
+ <w:r w:rsidDel="00000000" w:rsidR="00000000" w:rsidRPr="00000000">
<w:rPr>
<w:rtl w:val="0"/>
</w:rPr>
<w:t xml:space="preserve">item1
</w:t>
</w:r>
</w:p>
+ <w:p w:rsidR="00000000" w:rsidDel="00000000" w:rsidP="00000000" w:rsidRDefault="00000000" w:rsidRPr="00000000" w14:paraId="00000002">
<w:pPr>
<w:numPr>
<w:ilvl w:val="0"/>
<w:numId w:val="1"/>
</w:numPr>
<w:ind w:left="720" w:hanging="360"/>
<w:rPr>
<w:u w:val="none"/>
</w:rPr>
</w:pPr>
+ <w:r w:rsidDel="00000000" w:rsidR="00000000" w:rsidRPr="00000000">
<w:rPr>
<w:rtl w:val="0"/>
</w:rPr>
<w:t xml:space="preserve">item2
</w:t>
</w:r>
</w:p>
+ <w:p w14:paraId="44A2FF17" w14:textId="71A5AF8B" w:rsidR="002A5934" w:rsidRDefault="002A5934" w:rsidP="002A5934">
<w:pPr>
<w:pStyle w:val="ListParagraph"/>
<w:numPr>
<w:ilvl w:val="0"/>
<w:numId w:val="1"/>
</w:numPr>
<w:rPr>
<w:lang w:val="en-US"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:lang w:val="en-US"/>
</w:rPr>
<w:t xml:space="preserve">Point 1
</w:t>
</w:r>
</w:p>
+ <w:p w14:paraId="6C6D5F18" w14:textId="0B0661EE" w:rsidR="002A5934" w:rsidRDefault="002A5934" w:rsidP="002A5934">
<w:pPr>
<w:pStyle w:val="ListParagraph"/>
<w:numPr>
<w:ilvl w:val="0"/>
<w:numId w:val="1"/>
</w:numPr>
<w:rPr>
<w:lang w:val="en-US"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:lang w:val="en-US"/>
</w:rPr>
<w:t>Point 2
</w:t>
</w:r>
</w:p> It'd appear we can choose whichever id option (int, hex) as long as it's consistent with the xmlns schemas choosen for the document. An observation re word processors: in MS Word and Google Docs - without any list identification - the numbered lists appear as if they're 'global', ie. continue incrementing the same list even if separated by a paragraph. @gomutex the |
Issue Description
Ordered List And UnOrdered List seems not work, it just appears as normal paragraph.
Steps to Reproduce
Just use the hello-world example in godocx-example project.
And the generated docx in the godocx-example has no List Effect either.
Expected Behavior
Just like the demo.png
https://github.com/gomutex/godocx-examples/blob/main/demo.png
Actual Behavior
Environment Details
Sample Code
// Your sample code here
Additional Information
The text was updated successfully, but these errors were encountered: