-
Notifications
You must be signed in to change notification settings - Fork 5
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 conversion: is it possible to display some pages in landscape format? #1165
Comments
s. also jgm/pandoc#7255 |
There is a solution with lua filter, but as described in this discussion it destroys header/footer. I tried it out: indeed, required pages are inserted as landscape, but the header is destroyed (e.g. "Page X/Y" is not displayed on some pages): |
@Yuri05 I had a look at the .lua file. <w:p>
<w:pPr>
<w:sectPr>
<w:pgSz w:h="11906" w:w="16838" w:orient="landscape" />
</w:sectPr>
</w:pPr>
</w:p> to end a landscape section. I tested that out including the raw openxml code block |
Did you use our references.docx during the conversion and were the headers/footers (particularly the page numbering) kept? |
I used the reference, I get the same results as test2.docx: page number is only printed on the last page |
To include the footer/header from the default, we need to add the following within the section break (ie
I got the header/footer identifiers from the openxml content of the reference document, so it is not certain that the trick will work for user-defined reference documents. |
Risky... |
When I first tested, I did not check the reference openxml content, so I used the wrong ids (1, 2, 3). I also tried to modify the reference document by changing header and footer, both were rendered correctly. |
While the word report converted via pandoc still should be in the portrait format: is it possible to display only the pages with tables in landscape format?
Theoretically should be possible via openXML, but I did not manage to get it working.
E.g. this did not work for me (in the converted word document all pages still had the same (portrait) orientation:
Landscape Section
This is some text. This page is in Landscape layout.
::: {custom-style="PageBreak"}
\
:::
Portrait Section
This is some text. The page is back to Portrait layout.
The text was updated successfully, but these errors were encountered: