Skip to content

Mermaid Size Control Bug Report (html) #66

@liflux

Description

@liflux

Bug Report: Mermaid Diagram Size Control

This is a test case demonstrating the issue with Mermaid diagram size control when using Quarto's diagram filter.

Attachment Contents

This archive contains:

  • index.qmd: A Quarto document with multiple Mermaid diagrams using different size control methods
  • _quarto.yml: Configuration file enabling the diagram filter
  • index.html: Rendered output showing the sizing issue

Reproduction Steps

  1. Extract the archive

  2. Run quarto render index.qmd

  3. Open the generated index.html file in a browser

  4. Observe that all diagrams render with similar sizes despite different sizing approaches:

    ## Method 1: Using Quarto Block Options
    
    ```{.mermaid}
    %%| fig-width: 8
    %%| fig-height: 5
    %%| fig-align: center
    flowchart TD
        A[Start] --> B{Condition}
        B -- Yes --> C[Action A]
        B -- No --> D[Action B]
        C --> E[End]
        D --> E
    ```
    

Expected: Different sized diagrams based on the specified dimensions
Actual: All diagrams appear with approximately the same size

mermaid_size.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions