Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render transitions as Mermaid #159

Open
redeboer opened this issue Mar 1, 2022 · 2 comments
Open

Render transitions as Mermaid #159

redeboer opened this issue Mar 1, 2022 · 2 comments
Labels
✨ Feature New feature added to the package 💫 Good first issue Good for newcomers

Comments

@redeboer
Copy link
Member

redeboer commented Mar 1, 2022

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
@redeboer redeboer added 💫 Good first issue Good for newcomers ✨ Feature New feature added to the package labels Mar 1, 2022
@redeboer redeboer modified the milestone: Future Mar 1, 2022
@shenvitor
Copy link
Member

Interesting 👀

@redeboer
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature New feature added to the package 💫 Good first issue Good for newcomers
Projects
Status: Wishlist
Development

No branches or pull requests

2 participants