首页 > 其他分享 >Typora--Draw Diagrams With Markdown

Typora--Draw Diagrams With Markdown

时间:2022-12-14 10:00:27浏览次数:59  
标签:Draw after -- section Typora diagram Bob diagrams

 

Typora

Typora supports some Markdown extension for diagrams, you could enable this feature from preference panel.

When exporting as HTML, PDF, epub, docx, those rendered diagrams will also be included, but diagrams features are not supported when exporting markdown into other file formats in current version. Besides, you should also notice that diagrams is not supported by standard Markdown, CommonMark or GFM. Therefore, we still recommend you to insert an image of these diagrams instead of write them in Markdown directly.

Sequence

It is powered by ​​js-sequence​​, which would turn following code block into rendered diagrams:

```sequence
Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!
```

Please refer ​​here​​ for syntax explanation.

Flowchart

It is powered by ​​flowchart.js​​, which would turn following code block into rendered diagrams:

```flow
st=>start: Start
op=>operation: Your Operation
cond=>condition: Yes or No?
e=>end

st->op->cond
cond(yes)->e
cond(no)->op
```

Mermaid

Typora also has integration with ​​mermaid​​, which supports sequence, flowchart and Gantt.

Sequence

see ​​this doc​

```mermaid
%% Example of sequence diagram
sequenceDiagram
Alice->>Bob: Hello Bob, how are you?
alt is sick
Bob->>Alice: Not so good :(
else is well
Bob->>Alice: Feeling fresh like a daisy
end
opt Extra response
Bob->>Alice: Thanks for asking
end
```

Flowchart

see ​​this doc​

```mermaid
graph LR
A[Hard edge] -->B(Round edge)
B --> C{Decision}
C -->|One| D[Result one]
C -->|Two| E[Result two]
```

Gantt

see ​​this doc​

```mermaid
%% Example with slection of syntaxes
gantt
dateFormat YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid

section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d

section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d

section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h

section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page : 20h
Add another diagram to demo page : 48h
```

​https://support.typora.io/Draw-Diagrams-With-Markdown/​

 



标签:Draw,after,--,section,Typora,diagram,Bob,diagrams
From: https://blog.51cto.com/u_15147537/5935520

相关文章

  • 搭建Eureka Client订单微服务
    在9.3节中我们搭建好了一个商品微服务,本节我们来搭建一个订单(order)微服务,实现简单的查询订单的功能。 通常订单只保存商品的ID,而我们在查询订单的时候需要看到商品的详......
  • 推断统计 | 学习笔记 (全)
    OverridetheentrypointofanimageIntroducedinGitLabandGitLabRunner9.4.Readmoreaboutthe extendedconfigurationoptions.Beforeexplainingtheav......
  • 通过ffmpeg将16k采样率的wav文件转换成采样率为8k的wav
    一安装win10的ffmpeg 二进入所在文件夹文件名字:temp.wavtrans_temp.pcmwav_name.wav先将wav转换成pcm文件ffmpeg-itemp.wav-acodecpcm_s16le-fs16l......
  • 长春吉林BGP物理机租用供应
    惊人的10至15Gb每秒(即Gbps)——这相当于我们正常传输速率的250倍。当我打电话给从业银行及电信工作的朋友需求帮助时,恐怖的数字令我们也呆立当场。对于大多数商业企业来......
  • VCL界面组件DevExpress VCL v22.1 - 支持新的格式标签和矢量图标
    DevExpressVCL是Devexpress公司旗下最老牌的用户界面套包,所包含的控件有:数据录入、图表、数据分析、导航、布局等。该控件能帮助您创建优异的用户体验,提供高影响力的业务......
  • .eslintrc、.npmrc配置文件以rc结尾什么意思
    前言例如:随着对项目的不断学习,我们有必要清楚项目根目录文件的前世今生。一、rc是什么?对于的rc的起源‘rc’后缀可以追溯到Unix的祖父母CTSS。它有一个名为“runco......
  • jqGrid 选择多行
    多选获取多行的idvargr=jQuery("#tbList").jqGrid('getGridParam','selarrrow');循环遍历将值存为数组对象varrowData=[];for(i=0;i<gr.length;i++)......
  • C++获取文件信息
    官方文档:https://learn.microsoft.com/zh-cn/cpp/c-runtime-library/reference/stat-functions?view=msvc-170推荐使用_tstat方法,会根据编译环境选择适合的方法。该方法会......
  • JS控制元素的显示和隐藏
    利用来JS控制页面控件显示和隐藏有两种方法,两种方法分别利用HTML的style中的两个属性,两种方法的不同之处在于控件隐藏后是否还在页面上占空位。方法一:document.getEle......
  • 长春吉林BGP物理机托管
    储数据?需要多大空间来存储数据?我们需要从两个角度来计算这个问题,一个角度是有哪些类别的数据,包括,你至少要为未来1年(我们建议2~3年)的数据增长做个准确的测算,这可能仍然需要......