ComPWA/qrules

Render transitions as Mermaid

Opened this issue ยท 2 comments

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

Interesting ๐Ÿ‘€

After suggestions by @grayson-helmholz @Smaldanerep1, this may look better:

```mermaid
graph LR
    N0["๐ฝ/๐œ“"] --> N1["๐‘“โ‚€(980)"]
    N0["๐ฝ/๐œ“"] --> 0["๐›พ"]
    N1 --> 1["๐œ‹โฐ"]
    N1 --> 2["๐œ‹โฐ"]
    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
    N0["๐ฝ/๐œ“"] --> N1["๐‘“โ‚€(980)"]
    N0["๐ฝ/๐œ“"] --> 0["๐›พ"]
    N1 --> 1["๐œ‹โฐ"]
    N1 --> 2["๐œ‹โฐ"]
    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