quarto-dev / quarto-dev/quarto-cli

Typst: `margin.left` doesn't control the left page margin for article layouts

Open
#14,573 3 comments 0 reactions 1 assignee View on GitHub

@gordonwoodhull is already working on this.

Since Jun 4, 2026.

bug triaged-to typst
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

In format: typst, margin.left and margin.right are mapped asymmetrically:

https://github.com/quarto-dev/quarto-cli/blob/e768e5c2d34381173aa3d43d8d3a332125647561/src/resources/filters/layout/meta.lua#L462-L477

  • margin.rightouter.far (gap between the page edge and the outer column) ✅
  • margin.leftinner.sep (gap between the inner column and the body) ❌

Because inner.far keeps a value derived purely from paper width, margin.left has no effect on the left page-edge margin. Setting margin.left equal to margin.right does not produce symmetric margins, and a full-width .column-page block (which extends out to far on each side) ends up visibly off-centre.

I think the fix is to map margin.leftinner.far

Steps to reproduce
---
title: "Untitled"
format:
  typst:
    margin:
      left: 2in
      right: 2in
---


::: {.column-page}
{{< lipsum 1 >}}
:::
Actual behavior

margin.left and margin.right are both 2in, so the .column-page block should have equal gaps on both sides. It doesn't:

Screenshot of PDF page showing large right margin and small left margin
Expected behavior

Symmetric 2" margins

Your environment
  • IDE: Positron
  • OS: macOS 15 (Darwin 25.5.0), Apple Silicon
Quarto check output
Quarto 1.9.38
[✓] Checking environment information...
      Quarto cache location: /Users/charlottewickham/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.8.3: OK
      Dart Sass version 1.87.0: OK
      Deno version 2.4.5: OK
      Typst version 0.14.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.9.38
      Path: /Applications/Positron.app/Contents/Resources/app/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2026.04
      VeraPDF: 1.28.2
      Chromium: (not installed)
      Chrome Headless Shell: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/charlottewickham/Library/TinyTeX/bin/universal-darwin
      Version: 2026

[✓] 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 R installation...........OK
      Version: 4.6.0
      Path: /Library/Frameworks/R.framework/Versions/4.6/Resources
      LibPaths:
        - /Users/charlottewickham/Documents/posit/quarto-tdg/renv/library/R-4.6/aarch64-apple-darwin23
        - /Users/charlottewickham/Library/Caches/org.R-project.R/R/renv/sandbox/R-4.6/aarch64-apple-darwin23/46003b10
      knitr: (None)
      rmarkdown: (None)

      The knitr package is not available in this R installation.
      Install with install.packages("knitr")
      The rmarkdown package is not available in this R installation.
      Install with install.packages("rmarkdown")

[✓] Checking Python 3 installation....OK
      Version: 3.12.2
      Path: /Users/charlottewickham/.pyenv/versions/3.12.2/bin/python3
      Jupyter: 5.9.1
      Kernels: python3

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

[✓] Checking Julia installation...

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.