typora 进阶用法

最近用 typora 码字的时候发现了一些有趣的功能,上网搜了一部分资料,再结合之前的笔记,整理成这篇进阶用法,方便后面需要的时候查找。需要注意的是,某些语句在不同的平台可能会出现无法显示的情况,这里不再多讲,只单纯列出所有的语句。在这篇文章中,引用部分通过\ 转义,给出了示例语句的源码,并在下方附上了实际效果。
[toc]

0. 目 录

[toc]

1. 清 单

- [ ]

- [x]

  • 别忘了最后的空格
  • 打叉为已勾选,空格为未勾选

2. 删除线

~~删除线~~

删除线

3. 高 光

==高光==

==高光==

4. 上下标

^上标^regular~下标~

上标regular下标

5. 段 落

段落换行:
在结尾使用两个及以上 SPACEENTER


段落换行:
直接 ENTER

6. 缩 写

*[IC]: Integrated Circuit

IC 是 Integrated Circuit 的缩写
*[IC]: Integrated Circuit

7. 代码相关

`单行代码用反引号括住`
~~~
多行代码
用3个连续的反引号或是~包住
~~~

单行代码用反引号括住

多行代码
用3个连续的反引号或是~包住

8. 引 用

>引用文字
>> 也可以嵌套引用

引用文字

也可以嵌套引用

9. 页内锚点

[锚点](#3. 高 光)

[锚点](#3. 高 光)

12. 转义符号(反斜杠)

\*\~\>

*~>

11. 表情符号

:sm ile: :+ 1: :- 1: :cl ap: :la ughing:

:smile::+1::-1::clap::laughing:

12. 分割线

***


13. 画 图

通过 mermaid flow sequence实现

13.1 mermaid

纵向流程图

```mermaid
graph TD
A[方形] --> B(圆角)
B --> C{条件a}
C --> |a=1| D[结果1]
C --> |a=2| E[结果2]
F[竖向流程图]

```

graph TD
A[方形] --> B(圆角)
    B --> C{条件a}
    C --> |a=1| D[结果1]
    C --> |a=2| E[结果2]
    F[竖向流程图]
横向流程图

```mermaid
graph LR
A[方形] -->B(圆角)
B --> C{条件a}
C -->|a=1| D[结果1]
C -->|a=2| E[结果2]
F[横向流程图]
```


graph LR
A[方形] -->B(圆角)
    B --> C{条件a}
    C -->|a=1| D[结果1]
    C -->|a=2| E[结果2]
    F[横向流程图]
UML 标准时序图

```mermaid
sequenceDiagram
Alice->>John: Hello John, how are you?
John-->>Alice: Great!
```

sequenceDiagram
    Alice->>John: Hello John, how are you?
    John-->>Alice: Great!
状态图

```mermaid
stateDiagram
[*] --> s1
s1 --> middle
middle-->s2
s2 --> [*]
```

stateDiagram
    [*] --> s1
    s1 --> middle
    middle-->s2
    s2 --> [*]
类图

```mermaid
classDiagram

classDiagram
      Animal <|-- Duck
      Animal <|-- Fish
      Animal <|-- Zebra
      Animal : +int age
      Animal : +String gender
      Animal: +isMammal()
      Animal: +mate()
      class Duck{
          +String beakColor
          +swim()
          +quack()
      }
      class Fish{
          -int sizeInFeet
          -canEat()
      }
      class Zebra{
          +bool is_wild
          +run()
      }
甘特图

```mermaid
gantt
title 任务计划
dateFormat YYYY-MM-DD
section 流程1
任务A1 :1996-03-02, 48h
任务A2 :17d
section 流程2
任务B1 :1996-03-05 , 6d
任务B2 :5d
section 流程3
任务C1 :1996-03-16 , 6d
任务C2 :1996-03-16 , 10d

```

gantt
    title 任务计划
    dateFormat  YYYY-MM-DD
    section 流程1
    任务A1            :1996-03-02, 48h
    任务A2       :17d
    section 流程2
    任务B1   :1996-03-05  , 6d
    任务B2      :5d
    section 流程3
    任务C1   :1996-03-16  , 6d
    任务C2      :1996-03-16  , 10d    
饼 图

```mermaid
pie
title Key elements in Product X
"Calcium" : 42.96
"Potassium" : 50.05
"Magnesium" : 10.01
"Iron" : 5

```

pie
    title Key elements in Product X
    "Calcium" : 42.96
    "Potassium" : 50.05
    "Magnesium" : 10.01
    "Iron" :  5
git 图

```mermaid
gitGraph:
options
{
"nodeSpacing": 150,
"nodeRadius": 10
}
end
commit
branch newbranch
checkout newbranch
commit
commit
checkout master
commit
commit
merge newbranch

```

gitGraph:
options
{
    "nodeSpacing": 150,
    "nodeRadius": 10
}
end
commit
branch newbranch
checkout newbranch
commit
commit
checkout master
commit
commit
merge newbranch

13.2 flow

纵向标准流程图

```flow
st=>start: 开始框
op=>operation: 处理框
cond=>condition: 判断框(是或否?)
sub1=>subroutine: 子流程
io=>inputoutput: 输入输出框
e=>end: 结束框
st->op->cond
cond(yes)->io->e
cond(no)->sub1(right)->op

```

st=>start: 开始框
op=>operation: 处理框
cond=>condition: 判断框(是或否?)
sub1=>subroutine: 子流程
io=>inputoutput: 输入输出框
e=>end: 结束框
st->op->cond
cond(yes)->io->e
cond(no)->sub1(right)->op
横向标准流程图

```flow
st=>start: 开始框
op=>operation: 处理框
cond=>condition: 判断框(是或否?)
sub1=>subroutine: 子流程
io=>inputoutput: 输入输出框
e=>end: 结束框
st(right)->op(right)->cond
cond(yes)->io(bottom)->e
cond(no)->sub1(right)->op

```

st=>start: 开始框
op=>operation: 处理框
cond=>condition: 判断框(是或否?)
sub1=>subroutine: 子流程
io=>inputoutput: 输入输出框
e=>end: 结束框
st(right)->op(right)->cond
cond(yes)->io(bottom)->e
cond(no)->sub1(right)->op

13.3 sequence

UML 时序图

```sequence
对象A->对象B: 对象B你好吗?(请求)
Note right of 对象B: 对象B的描述
Note left of 对象A: 对象A的描述(提示)
对象B-->对象A: 我很好(响应)
对象A->对象B: 你真的好吗?

```

对象A->对象B: 对象B你好吗?(请求)
Note right of 对象B: 对象B的描述
Note left of 对象A: 对象A的描述(提示)
对象B-->对象A: 我很好(响应)
对象A->对象B: 你真的好吗?

14. epub 电子书

今天从博客往下扒文章的时候突然想到 typora 可以做电子书啊,直接导出 epub 格式就完事了,回头写一篇教程记录。

参考文献

  1. typora利用内置mermaid实现简单作图
  2. 使用typora编写Markdown你真的会了吗
  3. mermaid官网在线编辑
  4. emoji官网:更多表情
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容