Skip to content

Commit

Permalink
mermaid update
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffatoptics committed May 2, 2022
1 parent 732c6b8 commit 29cd101
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 91 deletions.
67 changes: 1 addition & 66 deletions _posts/2022-04-28-test-katex-with-mermaid.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ author:
- jeffatoptics
---

test latex
katex equation and mermaid in `mermaid: forest` theme

$$
K(a,b) = \int \mathcal{D}x(t) \exp(2\pi i S[x]/\hbar)
Expand Down Expand Up @@ -47,46 +47,18 @@ $$
BER= erfc(\frac{Q}{\sqrt(2)})
$$

this is to test mermaid:

```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```

<div class="mermaid">
graph TD;
A-->B; A-->C; B-->D; C-->D;
</div>


<div class="mermaid">
%%{init: {'theme':'forest', 'themeVariables': { 'lineColor': 'green'}}}%%
graph LR;
A-->B;
</div>


<div class="mermaid">
%%{init: {'theme':'forest'}}%%
graph LR;
A-->B;
</div>


<div class="mermaid">
%%{init: {'theme':'dark'}}%%
graph LR;
A-->B;
</div>

<!-- <script async src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script> -->




<div class="mermaid">
graph LR
Expand All @@ -108,45 +80,8 @@ style B fill:#bbf,stroke:#000,stroke-width:4px,color:#f00,stroke-dasharray: 10 2
linkStyle 0 stroke:#f00,stroke-width:4px
</div>

<div class="mermaid">
flowchart LR
A<==>B<-..->C
A[this is a text]
B[this is demo]
style B fill:#bbf

</div>

<div class="mermaid">
%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': false}}}%%

pie
title Bugs in Software
"transmission" : 15.00
"alarm" : 25
"management" : 66
"performance" : 5
</div>

<div class="mermaid">
%%{init: {'theme':'dark'}}%%

gantt
title A Gantt Diagram
dateFormat YY-MM-DD
axisFormat %y-%m-%d
section Section 1
A task :done, a1, 21-12-01, 20d
Another task :active, after a1, 60d
section Section 2
B :crit,22-02-12, 20d
milestone: milestone,20d
</div>


<div class="mermaid">
%%{init: {'theme':'dark'}}%%

sequenceDiagram
participant Local
participant Remote
Expand Down
35 changes: 10 additions & 25 deletions _posts/2022-05-01-test-mermaid.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ author:
- jeffatoptics
---

this is to test mermaid in dark theme
front matter is specified as:
This is to test mermaid in dark theme.

The front matter is specified as:

```
---
mermaid: dark
---
```

sytax is used as following:
The syntax is used with `<div>`

```
<div class="mermaid">
Expand All @@ -29,39 +31,22 @@ graph TD;
```


<div class="mermaid">
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
A-->B;
A-->C;
B-->D;
C-->D;
</div>


<div class="mermaid">
%%{init: {'theme':'default', 'themeVariables': { 'lineColor': 'green' }}}%%
graph LR;
A-->B;
</div>


<div class="mermaid">
%%{init: {'theme':'forest'}}%%
%%{init: {'theme':'forest', 'themeVariables': { 'lineColor': 'green' }}}%%
graph LR;
A-->B;
</div>


<div class="mermaid">
%%{init: {'theme':'dark'}}%%
graph LR;
A-->B;
</div>

<!-- <script async src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script> -->




<div class="mermaid">
Expand Down

0 comments on commit 29cd101

Please sign in to comment.