typora 進階用法

最近用 typora 碼字的時候發(fā)現(xiàn)了一些有趣的功能,上網(wǎng)搜了一部分資料,再結(jié)合之前的筆記,整理成這篇進階用法,方便后面需要的時候查找。需要注意的是,某些語句在不同的平臺可能會出現(xiàn)無法顯示的情況,這里不再多講,只單純列出所有的語句。在這篇文章中,引用部分通過\ 轉(zhuǎn)義,給出了示例語句的源碼,并在下方附上了實際效果。
[toc]

0. 目 錄

[toc]

1. 清 單

- [ ]

- [x]

  • 別忘了最后的空格
  • 打叉為已勾選,空格為未勾選

2. 刪除線

~~刪除線~~

刪除線

3. 高 光

==高光==

==高光==

4. 上下標(biāo)

^上標(biāo)^regular~下標(biāo)~

上標(biāo)regular下標(biāo)

5. 段 落

段落內(nèi)換行:
在結(jié)尾使用兩個及以上 SPACEENTER


段落換行:
直接 ENTER

6. 縮 寫

*[IC]: Integrated Circuit

IC 是 Integrated Circuit 的縮寫
*[IC]: Integrated Circuit

7. 代碼相關(guān)

`單行代碼用反引號括住`
~~~
多行代碼
用3個連續(xù)的反引號或是~包住
~~~

單行代碼用反引號括住

多行代碼
用3個連續(xù)的反引號或是~包住

8. 引 用

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

引用文字

也可以嵌套引用

9. 頁內(nèi)錨點

[錨點](#3. 高 光)

[錨點](#3. 高 光)

12. 轉(zhuǎn)義符號(反斜杠)

\*\~\>

*~>

11. 表情符號

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

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

12. 分割線

***


13. 畫 圖

通過 mermaid flow sequence實現(xiàn)

13.1 mermaid

縱向流程圖

```mermaid
graph TD
A[方形] --> B(圓角)
B --> C{條件a}
C --> |a=1| D[結(jié)果1]
C --> |a=2| E[結(jié)果2]
F[豎向流程圖]

```

graph TD
A[方形] --> B(圓角)
    B --> C{條件a}
    C --> |a=1| D[結(jié)果1]
    C --> |a=2| E[結(jié)果2]
    F[豎向流程圖]
橫向流程圖

```mermaid
graph LR
A[方形] -->B(圓角)
B --> C{條件a}
C -->|a=1| D[結(jié)果1]
C -->|a=2| E[結(jié)果2]
F[橫向流程圖]
```


graph LR
A[方形] -->B(圓角)
    B --> C{條件a}
    C -->|a=1| D[結(jié)果1]
    C -->|a=2| E[結(jié)果2]
    F[橫向流程圖]
UML 標(biāo)準(zhǔn)時序圖

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

sequenceDiagram
    Alice->>John: Hello John, how are you?
    John-->>Alice: Great!
狀態(tài)圖

```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 任務(wù)計劃
dateFormat YYYY-MM-DD
section 流程1
任務(wù)A1 :1996-03-02, 48h
任務(wù)A2 :17d
section 流程2
任務(wù)B1 :1996-03-05 , 6d
任務(wù)B2 :5d
section 流程3
任務(wù)C1 :1996-03-16 , 6d
任務(wù)C2 :1996-03-16 , 10d

```

gantt
    title 任務(wù)計劃
    dateFormat  YYYY-MM-DD
    section 流程1
    任務(wù)A1            :1996-03-02, 48h
    任務(wù)A2       :17d
    section 流程2
    任務(wù)B1   :1996-03-05  , 6d
    任務(wù)B2      :5d
    section 流程3
    任務(wù)C1   :1996-03-16  , 6d
    任務(wù)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

縱向標(biāo)準(zhǔn)流程圖

```flow
st=>start: 開始框
op=>operation: 處理框
cond=>condition: 判斷框(是或否?)
sub1=>subroutine: 子流程
io=>inputoutput: 輸入輸出框
e=>end: 結(jié)束框
st->op->cond
cond(yes)->io->e
cond(no)->sub1(right)->op

```

st=>start: 開始框
op=>operation: 處理框
cond=>condition: 判斷框(是或否?)
sub1=>subroutine: 子流程
io=>inputoutput: 輸入輸出框
e=>end: 結(jié)束框
st->op->cond
cond(yes)->io->e
cond(no)->sub1(right)->op
橫向標(biāo)準(zhǔn)流程圖

```flow
st=>start: 開始框
op=>operation: 處理框
cond=>condition: 判斷框(是或否?)
sub1=>subroutine: 子流程
io=>inputoutput: 輸入輸出框
e=>end: 結(jié)束框
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: 結(jié)束框
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: 我很好(響應(yīng))
對象A->對象B: 你真的好嗎?

```

對象A->對象B: 對象B你好嗎?(請求)
Note right of 對象B: 對象B的描述
Note left of 對象A: 對象A的描述(提示)
對象B-->對象A: 我很好(響應(yīng))
對象A->對象B: 你真的好嗎?

14. epub 電子書

今天從博客往下扒文章的時候突然想到 typora 可以做電子書啊,直接導(dǎo)出 epub 格式就完事了,回頭寫一篇教程記錄。

參考文獻

  1. typora利用內(nèi)置mermaid實現(xiàn)簡單作圖
  2. 使用typora編寫Markdown你真的會了嗎
  3. mermaid官網(wǎng)在線編輯
  4. emoji官網(wǎng):更多表情
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容