quarto-dev / quarto-dev/quarto-cli
Landscape div creates unwanted blank page at end of Word document
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
When using the .landscape div to create landscape-oriented pages in Word output, an extra blank page is automatically added at the end of the document.
Steps to reproduce
Reproducible Example:
Save the following code block as test.qmd
---
title: "Landscape Test"
format: docx
---
## Regular Content
This is some regular portrait content.
::: {.landscape}
## Landscape Section
```{r}
library(flextable)
ft <- flextable(mtcars[1:10, 1:8])
ft
```
:::
Run:
quarto render test.qmd -t docx
Open test.docx to view in MS Word.
Actual behavior
An extra blank page (page 3 in my case) appears after the landscape section. This blank page contains only the section break required for the landscape formatting.
Screenshots:
Expected behavior
The document should end immediately after the landscape section without any trailing blank pages.
Your environment
- IDE: VS Code
- OS: macOS 26.0.1
Quarto check output
$ quarto check
Quarto 1.9.3
[✓] Checking environment information...
Quarto cache location: /Users/username/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.6.3: OK
Dart Sass version 1.87.0: OK
NOTE: Deno version 2.4.5 does not strictly match 2.3.1 and strict checking is enabled. Please use 2.3.1.
Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.9.3
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: v2025.10
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/username/Library/TinyTeX/bin/universal-darwin
Version: 2025
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Source: MacOS known location
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.12.2
Path: /Users/username/.pyenv/versions/3.12.2/bin/python3
Jupyter: 5.8.1
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.5.1
Path: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources
LibPaths:
- /Users/username/.R/packages
- /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library
knitr: 1.49
rmarkdown: 2.29
[✓] Checking Knitr engine render......OK
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
Reproduce the issue with the provided test.qmd and quarto render test.qmd -t docx, then inspect how the landscape div and section breaks are represented in the generated Word document. The work is done when the landscape section renders without a trailing blank page while preserving the required orientation change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, r
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100