quarto-dev / quarto-dev/quarto-cli

Support setting page size in ODT and DOCX output

Open
#11,163 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Bug description

Consider the following MWE:

---
title: "Title"
format:
  odt:
    page-width: 8.27
---

# Section 1

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Where 8.27 is the page width in inch of the A4 paper format.

The resulting document still has a letter paper format:

Image

Same considerations hold for docx output format.

Steps to reproduce

See above

Expected behavior

Paper format should be A4

Actual behavior

Paper format is letter.

Your environment
  • IDE: 2024.09.0 Build 375
  • OS: Arch Linux
Quarto check output
Quarto 1.5.57

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK

[✓] Checking versions of quarto dependencies......OK

[✓] Checking Quarto installation......OK
      Version: 1.5.57
      Path: /opt/quarto/bin


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


(|) Checking LaTeX....................
(/) Checking LaTeX....................
(-) Checking LaTeX....................
(\) Checking LaTeX....................
(|) Checking LaTeX....................
[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /usr/bin
      Version: undefined


(|) Checking basic markdown render....
(/) Checking basic markdown render....
(-) Checking basic markdown render....
(\) Checking basic markdown render....
[✓] Checking basic markdown render....OK


(|) Checking Python 3 installation....
[✓] Checking Python 3 installation....OK
      Version: 3.12.7
      Path: /usr/bin/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

Using 18 cores for parallelisation

(|) Checking R installation...........
(/) Checking R installation...........
[✓] Checking R installation...........OK
      Version: 4.4.1
      Path: /usr/lib64/R
      LibPaths:
        - /home/raffaele/R/x86_64-pc-linux-gnu-library/4.4
        - /usr/lib/R/library
      knitr: 1.48
      rmarkdown: 2.28


(|) Checking Knitr engine render......
(/) Checking Knitr engine render......
(-) Checking Knitr engine render......
(\) Checking Knitr engine render......
(|) Checking Knitr engine render......
(/) Checking Knitr engine render......
[✓] Checking Knitr engine render......OK

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

Start by rendering the supplied minimal example in both ODT and DOCX and trace the output-format handling. Done means page-width is honored so the generated documents use A4 rather than Letter, with coverage for both formats.

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.