-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
pandoc doesn't preserve order of Xml elements in settings.xml #9264
Comments
One sensible approach might be to put all the elements that can go in settings.xml, in order, in the archive reference.docx. Then we could simply update the ones that are found in the user's reference.docx, leaving the order. But to do this I'd have to know what default values to give all these settings. |
I guess it's just as easy to embed the ordered list of element names in the Haskell code... |
I wrote a script that attempts to fix up the docx (and a small test document now successfully validates according to the .xsd, but not yet according to the .Net tool). |
I think I have it working now, but further testing always welcome! |
I ran docx-validator on all the golden tests in test/docx/golden. lists.docx
lists_div_bullets.docx
lists_multiple_initial.docx
table_one_row.docx
tables-default-widths.docx
tables.docx
|
@edwintorok Was endnotePr left out of the list for a reason? |
I don't see endnotePr anywhere in pandoc currently, and as you say tag order isn't the only thing missing in order to support it. |
Explain the problem.
Using docx-validator on settings the reference doc now validates:
However a newly created empty document does not:
It looks like the settings got reordered and the 'zoom' tag is now in the wrong place:
This is probably due to this code in
Writer/Docx.hs
:The order of elements in settings.xml can be seen in wml.xsd
Pandoc version?
I've built it from latest main:
The text was updated successfully, but these errors were encountered: