quarto-dev / quarto-dev/quarto-cli
Mermaid fig-width no longer works
@cscheid is already working on this.
Since Jan 15, 2023.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
Following the documentation on sizing mermaid diagram, the latest nightly build (1.3.107) running on Ubuntu 20.04 no longer sizes the diagrams differently regardless of the fig-width parameter. I also tried this with the latest stable (1.2.313) and it has the same issue.
For example, in the following script the diagram under #Slide 1 is the exact same size as the diagram in #Slide 2. I have tried playing with both and fig-width and fig-height but neither seems to have any effect.
---
title: Bad Mermaid Sizing
format:
revealjs
---
# Slide 1
```{mermaid}
%%| fig-width: 5
flowchart LR
A[Hard edge] --> B(Round edge)
B --> C{Decision}
```
# Slide 2
```{mermaid}
%%| fig-width: 15
flowchart LR
A[Hard edge] --> B(Round edge)
B --> C{Decision}
```
Maybe related to some of the fixes for https://github.com/quarto-dev/quarto-cli/issues/2607?
Checklist
- Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- Please format your issue so it is easier for us to read the bug report.
- Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- Please document the operating system you're running. If on Linux, please provide the specific distribution.
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.
Assessment
This issue has not been assessed yet.