quarto-dev / quarto-dev/quarto-cli
Figure width not transferred into layout (typst)
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 I try to pass width=50% to an image as in {width=10%), the Typst file does not contain the width when used within a layout= container.
Steps to reproduce
Minimal working example:
---
format:
typst:
keep-typ: true
---
<!-- works -->
{width=40% fig-align="center"}
<!-- does not work -->
:::{layout="[50, 50]"}
{width=40% fig-align="center"}
- description of image
- another bullet point next to the image
:::
Actual behavior
The typst file for the second included file looks as follows:
#grid(
columns: (50fr), gutter: 1em, rows: 1,
rect(stroke: none, width: 100%)[
#align(center)[#box(image("pics/jos7tnew/rlmw2.png"))]
],)
Expected behavior
It should look like this:
#grid(
columns: (50fr), gutter: 1em, rows: 1,
rect(stroke: none, width: 100%)[
#align(center)[#box(image("pics/jos7tnew/rlmw2.png", width: 40%))]
],)
Your environment
No response
Quarto check output
Quarto 1.7.28
[✓] Checking environment information...
Quarto cache location: /home/mmi041/.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.28
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: 2024
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /usr/bin/google-chrome
Source: PATH
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.12.2 (Conda)
Path: /home/mmi041/miniconda3/bin/python
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with conda install jupyter
[✓] Checking R installation...........OK
Version: 4.4.1
Path: /usr/lib/R
LibPaths:
- /home/mmi041/R/x86_64-pc-linux-gnu-library/4.4
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.48
rmarkdown: 2.28
[✓] 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
Start with the minimal reproducible document in the issue and inspect the generated Typst for the image inside the layout container. Trace how the image width is handled differently inside and outside the layout, then verify that the generated Typst includes the requested width of 40%.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100