Markdown使用范例
markdown支持html语法,所以很多样式其实都可以用内置style写法实现
文字修饰
<u><u>
underline this, you can ctrl+u </u></u>
i want to delete this line
bold this,you can ctrl + b
lean this line, you can ctrl + l
<span style='color:blue;background:pink;font-size:28px;font-family:幼圆;'>html+内置style包围</span>
效果如下:
html+内置style包围
<a href="#spch">
跳转:其他特殊字符 </a>
用Markdown语法,链接用 [text](#your-id)
,锚点用span标签包裹,然后为span标签添加id属性。
居中
分割线(需要独占一行)
Latex以及特殊字符
可在$$…$$公式块中编辑公式,或者用$…$行内显示。
分段、分式函数
c(u)=⎩⎨⎧N1⋅c2,u=0N2,u=0
矩阵
M=x11x21⋮xn1x12x22⋮xn2⋯⋯⋱⋯ x1mx2m⋮xnm
分栏
fY(y)=fX[h(y)]∣h′(y)∣=fX[h(y)]h′(y)=θ1e−θx[dydx(−ln(1−y)θ)]=θ1e−θ−ln(1−y)θ1−yθ=θ1eln(1−y)1−yθ=θ1−y1−yθ=1
指数、对数
eloge+55+e2
极限、求和、累积
n→+∞lim∫−∞+∞f(x)=2⋅3x13n=1∑100ann=1∏99xn
向量
3a
竖式计算
this is 1001 0101B+0100 1010B1101 1111Bdfddfdfdfdf
\ce{}
可以让括号内紧接着字母的数字自动变下标,一些符号自动变上标(由于渲染问题,可能无法正常显示)
\ce{H2O,H,Ca^2+}
希腊字母
大写 |
Markdown |
小写 |
Markdown |
A |
A |
α α |
\alpha |
B |
B |
β β |
\beta |
Γ |
\Gamma |
γ γ |
\gamma |
Δ |
\Delta |
δ δ |
\delta |
E |
E |
ϵ ϵ |
\epsilon |
|
|
ε ε |
\varepsilon |
Z |
Z |
ζ ζ |
\zeta |
H |
H |
η η |
\eta |
Θ |
\Theta |
θ θ |
\theta |
I |
I |
ι ι |
\iota |
K |
K |
κ κ |
\kappa |
Λ |
\Lambda |
λ λ |
\lambda |
M |
M |
μ μ |
\mu |
N |
N |
ν ν |
\nu |
Ξ |
\Xi |
ξ ξ |
\xi |
O |
O |
ο ο |
\omicron |
Π |
\Pi |
π π |
\pi |
P |
P |
ρ ρ |
\rho |
Σ |
\Sigma |
σ σ |
\sigma |
T |
T |
τ τ |
\tau |
Υ |
\Upsilon |
υ υ |
\upsilon |
Φ |
\Phi |
ϕ ϕ |
\phi |
|
|
φ φ |
\varphi |
X |
X |
χ χ |
\chi |
Ψ |
\Psi |
ψ ψ |
\psi |
Ω |
\Omega |
ω ω |
\omega |
$ |
|
|
|
运算符
运算符 |
latex |
运算符 |
latex |
± |
\pm |
∓ |
\mp |
× |
\times |
⋅ |
\cdot |
÷ |
\div |
|
|
= |
\neq |
≡ |
\equiv |
≤ |
\leq |
≥ |
\geq |
≪ |
\ll |
≫ |
\gg |
∼ |
\sim |
≅ |
\cong |
⊂ |
\subset |
⊆ |
\subseteq |
⊃ |
\supset |
⊇ |
\supseteq |
∈ |
\in |
∋ |
\ni |
∈/ |
\notin |
|
|
∩ |
\cap |
∪ |
\cup |
∨ |
\vee |
∧ |
\wedge |
∘ |
\circ |
⊕ |
\oplus |
⊗ |
\otimes |
⊙ |
\odot |
△ |
\bigtriangleup |
▽ |
\bigtriangledown |
⊥ |
\perp |
|
|
∑ |
\sum |
∏ |
\prod |
∫ |
\int |
∮ |
\oint |
∝ |
\propto |
|
|
∣ |
\mid |
|
|
其它特殊字符
符号 |
Markdown |
∀ |
\forall |
∃ |
\exists |
∵ |
\because |
∴ |
\therefore |
∠ |
\angle |
⊥ |
\bot |
∇ |
\nabla |
∞ |
\infty |
∅ |
\emptyset |
R |
\mathbb{R} |
z |
\mathbb{z} |
单字符音标符号
xˉηˊαˇηˋa˘y¨x˙α^ι~
flow
一种简单的流程图语法。这里介绍一种先“定义/声明“,后”连接“的代码组织形式。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| st=>start: Start i=>inputoutput: 输入年份n cond1=>condition: n能否被4整除? cond2=>condition: n能否被100整除? cond3=>condition: n能否被400整除? o1=>inputoutput: 输出非闰年 o2=>inputoutput: 输出非闰年 o3=>inputoutput: 输出闰年 o4=>inputoutput: 输出闰年 e=>end
st->i->cond1 cond1(no)->o1->e cond1(yes)->cond2 cond2(no)->o3->e cond2(yes)->cond3 cond3(yes)->o2->e cond3(no)->o4->e
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| st=>start: Start i=>inputoutput: 输入年份n cond1=>condition: n能否被4整除? cond2=>condition: n能否被100整除? cond3=>condition: n能否被400整除? o1=>inputoutput: 输出非闰年 o2=>inputoutput: 输出非闰年 o3=>inputoutput: 输出闰年 o4=>inputoutput: 输出闰年 e=>end
st->i->cond1 cond1(no)->o1->e cond1(yes)->cond2 cond2(no)->o3->e cond2(yes)->cond3 cond3(yes)->o2->e cond3(no)->o4->e
|
mermaid
flowchart
看着和flow差不多,都是方形(或者其他形状)节点相互连线
定义布局方向
- TB - top to bottom
- TD - top-down/ same as top to bottom
- BT - bottom to top
- RL - right to left
- LR - left to right
节点形状以及连接
flowchart TB
n3[[子例]]o--o|文本写法1|n1(圆角矩形)--文本写法2---n2([大圆角矩形])
subgraph global [bigone]
subgraph u [un]
n6>非对称标签] & n7{菱形} ==>|m| n8{{六边形}} & n4[(圆柱)]
end
n8{{六边形}} & n4[(圆柱)]x---x n2([大圆角矩形])
subgraph p [平行四边形]
n9[/平行四边形1/] -->|s| n10[\平行四边形2\]
end
end
u-->|subgraph to subgraph|p o---o|subgraph to node| n6>非对称标签]
n10[\平行四边形2\] ==>|sd|n11[/正梯形\] & n12[\倒梯形/]<-.->|sd|n5((圆形))
%%点击圆角矩形,打开链接
click n2 "https://www.baidu.com" _blank
%%目前Typora里只能设置圆角矩形的样式
style n1 fill:#f9f,stroke:#333,stroke-width:4px
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| flowchart TB n3[[子例]]o--o|文本写法1|n1(圆角矩形)--文本写法2---n2([大圆角矩形]) subgraph global [bigone] subgraph u [un] n6>非对称标签] & n7{菱形} ==>|m| n8{{六边形}} & n4[(圆柱)] end n8{{六边形}} & n4[(圆柱)]x---x n2([大圆角矩形]) subgraph p [平行四边形] n9[/平行四边形1/] -->|s| n10[\平行四边形2\] end end u-->|subgraph to subgraph|p o---o|subgraph to node| n6>非对称标签] n10[\平行四边形2\] ==>|sd|n11[/正梯形\] & n12[\倒梯形/]<-.->|sd|n5((圆形)) %%点击圆角矩形,打开链接 click n2 "https://www.baidu.com" _blank %%目前Typora里只能设置圆角矩形的样式 style n1 fill:#f9f,stroke:#333,stroke-width:4px
|
Sequence diagram
Class Diagram
参考
Markdown语法
颜色表
更多公式用法
更多公式&符号
特殊符号
Markdown绘制流程图的方法 - JackPeng博客 (yuanfentiank789.github.io)
mermaid Doc