使用typora画图

1、序列图

  语法就是一张图:具体语法见:https://bramp.github.io/js-sequence-diagrams/

 
源码:
复制代码
````sequence
title: 序列图的展示 张三
-->李四:李四,吃了吗? 张三-->>李四:李四,吃了吗? Note right of 李四:在李四的右边(我是谁在哪里) 李四->张三:好久不见了,一起去喝一杯吧? 张三-->李四:不了,今天不是很方便,改天吧,拜。 Note left of 张三:老子才不想和你喝酒呢(腹诽)
```
复制代码

结果:

 

2、流程图,具体的http://flowchart.js.org/

  2.1成绩分等流程图:源码

复制代码
```flow
st=>start: 开始 op=>operation: 筛选 op1=>operation: 优秀 op2=>operation: 良好 op3=>operation: 及格 cond=>condition: 判断(是或否及格?) para=>parallel: 成绩分等 e1=>end: 修完学分 e2=>end: 补考 st->op->cond cond(yes,bottom)->para para(path1, right)->op1->e1 para(path2, left)->op2->e1 para(path3, bottom)->op3->e1 cond(no)->e2
复制代码

结果:

官方例程:代码

复制代码
st=>start: Start
e=>end: End
op1=>operation: My Operation
sub1=>subroutine: My Subroutine
cond=>condition: Yes or No?
para=>parallel: parallel tasks
io=>inputoutput: catch someThing

st->op1->cond
cond(yes)->io->e
cond(no)->para 
para(path1, bottom)->sub1(right)->op1
para(path2, top)->op1
复制代码

结果:

标准流程图代码纵向(上下):

复制代码
st=>start: 开始
op=>operation: 处理
cond=>condition: 判断(Yes or No)?
sub1=>subroutine: 子流程
io=>inputoutput: 输入/输出
e=>end: 结束

st->op->cond
cond(yes)->io->e
cond(no)->sub1(right)->op
复制代码

结果:

标准流程图代码横向(左右):

复制代码
st=>start: 开始
op=>operation: 处理
cond=>condition: 判断(Yes or No)?
sub1=>subroutine: 子流程
io=>inputoutput: 输入/输出
e=>end: 结束

st(right)->op(right)->cond 
cond(yes)->io(bottom)->e 
cond(no)->sub1(right)->op 
复制代码

结果:

 

复制代码
 1 ```flow
 2 st=>start: Start:>http://www.google.com[blank]
 3 e=>end:>http://www.google.com
 4 op1=>operation: My Operation
 5 sub1=>subroutine: My Subroutine
 6 cond=>condition: linear or polynomial :>http://www.google.com
 7 io=>inputoutput: catch something...
 8 para=>parallel: 3 possibilities
 9 
10 st->op1->cond
11 cond(true)->io->e
12 cond(false)->sub1(left)
13 sub1(right)->para
14 para(path1, top)->cond
15 para(path2, right)->op1
16 para(path3, bottom)->e
17 ```
复制代码

 

 

这里有个坑加上自己犯了一个弱智的错误,导致多花了将近一个小时才搞定:

1、typora中无法识别流程图中的并行关键字,para=>parallel: 成绩分等我开始一直以为是自己的空格还是等于是中文

2、实际到最后是发现,自己睡着了将st=>start: 开始 中的start写成Start,无法识别关键字,就一直出了个错误如下:

还是要仔细,仔细,再仔细些啊

3、Mermaid(美人鱼)生成图表的绝好东东

  项目地址:https://github.com/mermaid-js/mermaid

  教程地址:https://mermaid-js.github.io/mermaid/#/

 

posted @   叕叒双又  阅读(1006)  评论(0编辑  收藏  举报
编辑推荐:
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
点击右上角即可分享
微信分享提示