I am using Quarto in R to generate a docx output. However, I would like to have different page sizes (width and height) for individual pages, allowing me to customize the dimensions according to my needs. Currently, Quarto applies a consistent page size throughout the entire document.
I have explored the documentation and various options provided by Quarto but haven't found a straightforward solution for achieving this level of customization. Is there a way to control the page size on a per-page basis in Quarto's docx output?
Any guidance, code examples, or suggestions on how to approach this problem would be greatly appreciated. Thank you in advance!
I tried several methods that did not work for me. The steps suggested in Tarleb's comment were the only ones that worked. I adapted the code to change the output from normal margins to narrow margins. To modify other things than margins, documentation can be found here.
EDIT: Another way to proceed is to create a reference docx document with the desired margins. It is easier to implement, but the whole document will be formatted instead of being able to format only some parts. Just add the docx to the same folder and add the code below to the YAML header.