quarto-dev / quarto-dev/quarto-cli

Typst: Unable to fit mermaid diagram into columns

Open
#8,543 4 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since Jun 5, 2024.

bug diagrams-mermaid typst
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Discussed in https://github.com/quarto-dev/quarto-cli/discussions/8542

Originally posted by jkub6 February 1, 2024

Description

I have been unable to find a way to get my figure to fit within its column in a 2 column Typst document. Is there a way to auto shrink-to-fit figures? (Or is this a bug with Typst in Quarto?)

Example

image

---
title: 2 Column Layout
format:
  typst:
    columns: 2
---


## Heading 1

Some text here. This should wrap when it hits the column.

```{mermaid}
graph LR
  A---B---C---D---E---F
```

```{mermaid}
graph LR
  A---B---C---D---E---F---G---H---I---J
```

More text here. This should also wrap when it hits the column.

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.