Skip to content

Render transitions as Mermaid #159

@redeboer

Description

@redeboer

GitHub now supports Mermaid diagrams in Markdown text. See Mermaid syntax specifications.

Some benefits:

  • Can be rendered without Graphviz, which needs to be installed system-wide.
  • Related: can be rendered in the documentation with sphinxcontrib-mermaid.
  • Supports unicode.
  • Can be rendered in GitHub.

An example:

```mermaid
graph LR
    A["𝐽/𝜓"] --> N0[ ]
    N0 --> N1["𝑓₀(980)"]
    N0 --> 0["𝛾"]
    N1 --> 1["𝜋⁰"]
    N1 --> 2["𝜋⁰"]
    style A fill:#FFFFFF, stroke:#FFFFFF;
    style N0 fill:#FFFFFF, stroke:#FFFFFF;
    style N1 fill:#FFFFFF, stroke:#FFFFFF;
    style 0 fill:#FFFFFF, stroke:#FFFFFF;
    style 1 fill:#FFFFFF, stroke:#FFFFFF;
    style 2 fill:#FFFFFF, stroke:#FFFFFF;
```
graph LR
    A["𝐽/𝜓"] --> N0[ ]
    N0 --> N1["𝑓₀(980)"]
    N0 --> 0["𝛾"]
    N1 --> 1["𝜋⁰"]
    N1 --> 2["𝜋⁰"]
    style A fill:#FFFFFF, stroke:#FFFFFF;
    style N0 fill:#FFFFFF, stroke:#FFFFFF;
    style N1 fill:#FFFFFF, stroke:#FFFFFF;
    style 0 fill:#FFFFFF, stroke:#FFFFFF;
    style 1 fill:#FFFFFF, stroke:#FFFFFF;
    style 2 fill:#FFFFFF, stroke:#FFFFFF;
Loading

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Wishlist

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions