-
-
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
Trivial DOCX writer doesn't work for reference doc with header #10201
Comments
Can you check other versions? It would be very helpful to know which version caused this change. |
It breaks at version 3.2.1 (3.2 is still fine). |
In the changelog, this looks like the most relevant entry for that version:
I will have to investigate. |
OK, right before the end of the body in document.xml we have: <w:sectPr w:rsidR="00FF1A1A">
<w:headerReference w:type="even" r:id="rId8"/>
<w:headerReference w:type="default" r:id="rId9"/>
<w:footerReference w:type="even" r:id="rId10"/>
<w:footerReference w:type="default" r:id="rId11"/>
<w:headerReference w:type="first" r:id="rId12"/>
<w:footerReference w:type="first" r:id="rId13"/>
<w:pgSz w:w="12240" w:h="15840"/>
<w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/>
<w:cols w:space="720"/>
</w:sectPr>
</w:body> My guess is that we are clobbering this with the new openxml templates, and we need to make sure that the sectPr on body is preserved. EDIT: Maybe not. There is a |
The header works with standard |
@tarleb can you think of any Lua changes in 3.2.1 that might affect this? |
Nothing comes to mind. Does adding Template = pandoc.template.default 'docx' to the custom writer make a difference? |
Just adding the line at the top of the writer lua script does not change anything. |
Explain the problem.
If I use the following (trivial) DOCX writer all resulting files are missing their headers in version 3.4. If I use the same writer in 3.1.12 (which is the version I was using before I'm trying to update) then it works correctly.
The (trivial) DOCX writer, writer.docx.lua:
Then if I use the command
ref_doc_with_header.docx
I have no header in v3.4 and I do have the header in v3.1.12.
Pandoc version?
Version 3.4, Windows 11
The text was updated successfully, but these errors were encountered: