Typst: `margin: y` is ignored when the document has margin content
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Read src/resources/formats/typst/pandoc/quarto/page.typ around lines 29–30, where the issue says the marginalia setup reads margin.top and margin.bottom; compare that path with meta.lua, which maps margin.x. Reproduce using the provided Quarto document with a .column-margin block and inspect the generated .typ output. Done when margin: {x: 2cm, y: 2cm} produces top and bottom margins of 2cm with marginalia enabled.
由索引模型根據 Issue 內容生成。
描述
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 Typst output, margin: {x, y} is applied as is when the document has no margin content.
Once there is a .column-margin block (or any content that turns on the marginalia layout), y is dropped and the top and bottom margins go back to 1.25in.
Only margin.top and margin.bottom are read for the marginalia setup:
margin.x takes a different path (meta.lua maps it to inner.sep and outer.far), covered by #14573.
Steps to reproduce
---
title: Margins
format:
typst:
keep-typ: true
papersize: a4
margin:
x: 2cm
y: 2cm
---
Text.
::: {.column-margin}
A note.
:::
Actual behavior
The .typ file has no margin: in set page, and:
#show: marginalia.setup.with(
inner: (far: 0.634in, width: 0.792in, sep: 0.787in),
outer: (far: 0.787in, width: 1.582in, sep: 0.316in),
top: 1.25in,
bottom: 1.25in,
Without the .column-margin block, the same document gets margin: (x: 2cm,y: 2cm,).
Expected behavior
top: 2cm and bottom: 2cm, the same as with margin: {top: 2cm, bottom: 2cm}.
Your environment
- IDE: none (terminal)
- OS: Windows 11
- Same values with Quarto 1.11.9, 1.12.3 and current
main(cda4102).
Quarto check output
Quarto 1.12.3
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.13.0: OK
Dart Sass version 1.107.1: OK
Deno version 2.9.8: OK
Typst version 0.15.1: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.12.3
[>] Checking tools....................OK
TinyTeX: v2026.11
VeraPDF: 1.30.3
Chrome Headless Shell: (not installed)
- 主要語言
- JavaScript
- 星號
- 6.2k
- 分支
- 492
- 平均合併
- 15 小時 15 分鐘
- 30 天內合併 PR
- 94
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
quarto-dev/quarto-cli 的其他 Issue
-
bootstrap enhancement themes
難度 2/5 1-3 小時 新手友好度 70/100
quarto-dev/quarto-cli#15421 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 85/100
quarto-dev/quarto-cli#15408 ·
維護者通常 1 天內回覆
-
accessibility bug
難度 2/5 1-3 小時 新手友好度 79/100
quarto-dev/quarto-cli#15401 · 1 個 reaction ·
維護者通常 1 天內回覆
-
bug callouts docx regression
難度 2/5 1-3 小時 新手友好度 81/100
quarto-dev/quarto-cli#15394 · 2 則留言 ·
維護者通常 1 天內回覆
-
bug lightbox
難度 2/5 1-3 小時 新手友好度 76/100
quarto-dev/quarto-cli#15393 ·
維護者通常 1 天內回覆
查看 quarto-dev/quarto-cli 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 75/100
testing-library/jest-dom#749 ·
-
bug
難度 2/5 1-3 小時 新手友好度 65/100
-
ernst:4-klein prio:3-wacht ui
難度 2/5 1-3 小時 新手友好度 70/100
NewspeedyNL/PidLane#767 ·
維護者通常 1 天內回覆
-
bug for-agent ready
難度 2/5 1-3 小時 新手友好度 62/100
WenyuChiou/agent-board#1812 · 2 則留言 ·
維護者通常 1 天內回覆
-
bug help wanted Should Have ui
難度 2/5 1-3 小時 新手友好度 82/100
hannahro15/Musical-Match-Saga#327 · 1 則留言 ·
維護者通常 1 天內回覆