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
Incorrect Headings Numbering for Docx #1305
Comments
I see that I can change the Heading styles (in Word) so that It would be useful to have detailed instructions (including |
John, Well the problem is twofold:
When I get back home this afternoon I can attach the reference.docx, Niels On 16 May 2014 07:57, John MacFarlane notifications@github.com wrote:
|
Hi, OK, so here are four files, that hopefully should show the issue: In the pandoc output, notice how the sub-headers (level 2 and 3) are Also, after having created the output from pandoc, the styles are messed Hope this can help in finding what the issue is. Niels On 16 May 2014 11:17, Niels Berglund niels.it.berglund@gmail.com wrote:
|
Confirmed the reported behavior with these files (the files you uploaded to pandoc-discuss). It's very strange. If you look at the reference.docx you supplied, and view the Heading 2 style, it shows 0" indentation. If you then create my.docx using this reference.docx, and view the Heading 2 style in Word, it shows 0.5" indentation. That suggests that the style is somehow being changed. However, the style.xml files inside the zip containers are the same (well, one contains styles for syntax highlighting that the other lacks, but that is the only difference). So I have no idea what is going on. |
Ah, okay. I think I see what is happening. It has to do with numbering.xml, which is generated by pandoc (replacing what is found in the reference.docx). There are links in the styles.xml file to numIds, and these point to the wrong things when the numbering.xml file is replaced. |
Ah, OK - glad you found the issue. Is there anything I can do to help? Niels |
This opens up the possiblity (with further code changes) of preserving some numbering from the reference.docx (e.g. header numbering.) See #1305.
So it seems that Pandoc does not correctly handle numbering and positioning of sub headings (level 2+), in a docx output. From a post on the pandoc group by Helmut Zechmann:
<<<<<<<<<<<<<<<<
What I configure in my template is the following numbering style:
1 Section One
1.1 Subsection One in Section One
1.1.1 SubSubsection One in Subsection One in Section One
1.2 Subsection Two in Section One
No matter, what numbing style I configure, pandoc always produces the
following heading numbering style:
1 Section One
1 Subsection One in Section One
1 SubSubsection One in Subsection One in Section One
1 Subsection Two in Section One
I have attached two images showing the expected behaviour: .
and the output from pandoc:
The reference.docx file I use is extremely simple, I can share it / email it if anyone wants it.
Niels
The text was updated successfully, but these errors were encountered: