quarto-dev / quarto-dev/quarto-cli
`.landscape` does not keep page size for Word (enforce "A4" in landscape whilst default doc is US Letter)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
I don't think there an easy or even a fix for this at least not by simply injecting OpenXML code.
Using the landscape shortcode for Word document will also have another issue: the page/section dimension might me different to the portrait page/section because the dimension is hardcoded in the shortcode.
In OpenXML, a new section has to contains height, width, etc. and as far as I know don't inherits elements, thus since footer is not defined in the section, it's not there in the end.
For instance, here is what the community contributed landscapes shortcode does for Word:
Originally posted by @mcanouil in #12628
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked src/resources/filters/quarto-post/landscape.lua implementation and reproduce a Word document whose default page size is US Letter before applying the landscape shortcode. Inspect the generated section properties and footer behavior in the OpenXML output. Done means landscape preserves the intended page size and required section content without hardcoding A4.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100