quarto-dev / quarto-dev/quarto-cli

layout-valign="bottom" with Typst subfigures

Open
#9,752 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Bug description

Using the latest nightly of quarto, subfigure cations are now working (thanks @cscheid!). But when I use layout-valign="bottom" the figures are not bottom-aligning (see example below).

The typst grid uses align: auto, and your code does not add any align attributes. One problem is that if you set align: bottom on grid, then captions will align to the bottom, so it may be that you need to specify grid.cell and then specify the alignment only for figure-containing cells?

Steps to reproduce

Sample code from a working document:

::: {#fig-locking layout-ncol="2" layout-valign="bottom"}

![The locking holes on the implant plate](img/simia_locking_hole.png){#fig-simiaLockingHole}

![Locking hole unit](img/simia_locking_unit.png){#fig-simiaLockingUnit}

In our optimized design, we introduced a locking mechanism.

:::
image
Expected behavior

Typst output follows layout-valign

Actual behavior

layout-valign is not currently implemented AFAICT.

Your environment

Quarto 1.5.39

Quarto check output
▶︎ quarto check
Quarto 1.5.39
[✓] 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.39
      Path: /Applications/quarto/bin

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

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

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

[✓] Checking Python 3 installation....OK
      Version: 3.12.1
      Path: /Users/ian/.pyenv/versions/3.12.1/bin/python3
      Jupyter: (None)

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

[✓] Checking R installation...........OK
      Version: 4.4.0
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
      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")

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 provided Quarto example to Typst and compare its output with the expected bottom alignment. Then trace how layout-valign is handled for Typst grids and captions; done means figure-containing cells follow bottom alignment while captions remain correctly placed.

Written by the indexing model from the issue text.

Assessment

Domain
cli
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.