Typora用法
文章目录
Typora 是一款简洁高效的 Markdown 编辑器,支持实时预览,适合写作、笔记、代码文档等
一:typora快捷键
1:任务列表
(减号 + 空格 + 左方括号 + X + 右方括号 + 空格 + 名称)
- 如果括号内是空格,则任务没有选中
- 如果括号内填入了英文字母X,表示任务选中
- 可以借助鼠标点击更换选中状态
- 早起
- 读书
2:文字常用修饰
- 斜体:将要进行斜体的文字左右两边各加入一个
*
,或者选中之后使用快捷键Ctrl + I
- 粗体:将要进行斜体的文字左右两边各加入两个
*
,或者选中之后使用快捷键Ctrl + B
- 下划线:将要进行下划线的文字左右两边分别加入
<u></u>
,或者选中之后使用快捷键Ctrl + U
- 删除线:将要进行删除线的文字左右两边各加入两个
~
,或者选中之后使用快捷键Ctrl + Shift + 5
- 高亮:将需要进行高亮的文字的做优两边各加入两个
=
,需要在设置中勾选(file -> refences -> markdown -> syntax surpport)
3:文本语法
3.1:标题层级
快捷键 | 作用 |
---|---|
Ctrl + 1/2/3/4/5/6 | 1-6号标题的切换 |
Ctrl + 0 或者 再按一下原来的标题【假设现在是Ctrl + 4,那就再按一下Ctrl + 4】 | 标题切换为正文 |
Ctrl + +/- | 1-6号标题的切换 |
Ctrl + Shift + + | 文本缩放放大 |
Ctrl + Shift + - | 文本缩放变小 |
3.2:水平分割线
三个+
或者三个-
或者三个*
有一个快捷用法,直接Ctrl
+ B
-> 四个*
号,直接就是水平分割线
3.3:表情
:
后面接入要输入的单词
3.4:超链接
Ctrl
+ K
[]
里面填入的是名称,()
中是具体的网址
3.5:插入图片
Ctrl
+ Shift
+ I
或者直接将图片拖入
3.6:代码
```+ 要高亮的语法
或者是Ctrl
+ Shift
+ K
3.7:引用
Ctrl
+ Shift
+ Q
或者直接使用 >
+ 回车
3.8:表注
1:名字 + []
中有一个^
2:[]
同^
相对应,[]
外边有一个冒号 —> name:[^1]
3.9:参考链接
1:名称 + 冒号 | [参考链接]
3.10:有序无序列表
ctrl
+ shift
+ [/]
进行切换
3.11:表格
ctrl
+ T
或者是|||
+ 回车进行创建
二:typora作图
https://mermaid-js.github.io/mermaid/#/
语法选择对应的mermaid
-> ```mermaid
1:流程图
graph TD;
A --> B
A --> C
B --> D
2:时序图
sequenceDiagram
A ->>B: hello B
B -->>A: 你好啊,A
B->>C: 我是B
C -->>A: 他是B
3:状态图
stateDiagram
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
4:类图
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()
}
5:饼状图
pie title Pets adopted by volunteers
"Dogs" : 386
"Cats" : 85
"Rats" : 15
6:甘特图
gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Section
A task :a1, 2014-01-01, 30d
Another task :after a1 , 20d
section Another
Task in sec :2014-01-12 , 12d
another task : 24d
如果是复杂的甘特图
gantt
dateFormat YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid
excludes weekends
%% (`excludes` accepts specific dates in YYYY-MM-DD format, days of the week ("sunday") or "weekends", but not the word "weekdays".)
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
Functionality added :milestone, 2014-01-25, 0d
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
三:数学公式
-
$$
(Shift+4 两次回车即可) 或者Ctrl +Shift +M
-
数学公式分行用两个斜线
\
,空格用一个\
1:分数和乘法
分数:frac;乘法:times
\frac{a}{b} \times \frac{2}{3}\\
a b × 2 3 \frac{a}{b} \times \frac{2}{3}\\ ba×32
2:开根号
\sqrt{x} \ or\ \sqrt[5]{x}
大括号包值,中括号包n次(开几次根)
x
o
r
x
5
\sqrt{x} \ or\ \sqrt[5]{x}
x or 5x
3:上下标
下标用的是_
,上标是^
x^2 + y_3
x 2 + y 3 x^2 + y_3 x2+y3
4:向量点乘平均
向量:\vec
点乘:\cdot
平均:\overline
\vec{a} \cdot \vec{b} = 0 \\ \overline{x}
a ⃗ ⋅ b ⃗ = 0 x ‾ \vec{a} \cdot \vec{b} = 0 \\ \overline{x} a⋅b=0x
5:极限、积分、求和
limit:\lim
指向,到:\to
无穷大:\infty
\lim_{n\to+\infty}n \\ \lim_{-\infty\to n}n
lim
n
→
+
∞
n
lim
−
∞
→
n
n
\lim_{n\to+\infty}n \\ \lim_{-\infty\to n}n
n→+∞limn−∞→nlimn
积分:\int
\int_0^n f(x) dx \\ \int f(x) dx
∫
0
n
f
(
x
)
d
x
∫
f
(
x
)
d
x
\int_0^n f(x) dx \\ \int f(x) dx
∫0nf(x)dx∫f(x)dx
求和:\sum
\sum_{i=1}^n a_i \\ \sum a_i
∑ i = 1 n a i ∑ a i \sum_{i=1}^n a_i \\ \sum a_i i=1∑nai∑ai
6:矩阵
\begin{bmatrix}
6&2&1&3 \\
7&4&7&5 \\
\end{bmatrix}
[ 6 2 1 3 7 4 7 5 ] \begin{bmatrix} 6&2&1&3 \\ 7&4&7&5 \\ \end{bmatrix} [67241735]
如果不想要框线
\begin{matrix}
6&2&1&3 \\
7&4&7&5 \\
\end{matrix}
6 2 1 3 7 4 7 5 \begin{matrix} 6&2&1&3 \\ 7&4&7&5 \\ \end{matrix} 67241735
7:常用符号