quarto-dev / quarto-dev/quarto-cli

`::: {.landscape}` div overrides footer content in `reference-doc`

Open
#12,628 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug docx
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

I'm using Quarto to render a MS Word document (DOCX) and have modified the reference document to include page numbers in the footer (no other changes). When I use the {.landscape} class within a div (documented here), the newly added section overrides the footer content, and only displays in the very last section of the document. Below are screenshots for the actual and expected DOCX outputs.

Unfortunately, this behavior makes Quarto unusable for my requirements. I really hope I'm just doing something wrong or there is a simple fix, because I would love to use Quarto if possible.

Steps to reproduce
  1. Follow the instruction here to create a custom DOCX reference doc.

  2. Add page numbers to the reference doc, save, and close.

  3. Create a QMD file from the code below.

---
format: 
    docx: 
        reference-doc: custom-reference.docx
jupyter: python3
---

Portrait

::: { .landscape }

Landscape

:::
  1. Run the following command.
quarto render x.qmd
Actual behavior

Footer page number only appear in the last section.

Image

Expected behavior

Footer page numbers appear in all sections, not just the last one.

Image

Your environment
  • IDE: vscode 1.92.2
  • OS: WSL Ubuntu-22.04 (on Windows 11)
Quarto check output
quarto check
Quarto 1.7.29
[✓] Checking environment information...
      Quarto cache location: /home/todima01/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.6.3: OK
      Dart Sass version 1.85.1: OK
      Deno version 1.46.3: OK
      Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.7.29
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Tex:  (not detected)

[✓] Checking Chrome Headless....................OK
      Chrome:  (not detected)

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.15
      Path: /home/todima01/projects/dsbsvc-governance-govdocs/main/.venv/bin/python3
      Jupyter: 5.7.2
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with x.qmd, custom-reference.docx, and quarto render x.qmd, using the documented landscape div and page-number footer. Trace the DOCX section and footer handling responsible for the generated output, then verify that the page numbers appear in every section rather than only the last one.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.