流程图

代码

  1. ```flow
  2. st=>start: User login
  3. op=>operation: Operation
  4. cond=>condition: Successful Yes or No?
  5. e=>end: Into admin
  6. st->op->cond
  7. cond(yes)->e
  8. cond(no)->op
  9. ```

结果

流程图、数学公式、时序图支持 - 图1

时序图

代码

  1. ```seq
  2. .........
  3. ```
  4. # or
  5. ```sequence
  6. .........
  7. ```

结果

流程图、数学公式、时序图支持 - 图2

数学公式

行内的公式 Inline

代码

  1. $$E=mc^2$$
  2. Inline 行内的公式 $$E=mc^2$$ 行内的公式,行内的$$E=mc^2$$公式。
  3. $$c = \\pm\\sqrt{a^2 + b^2}$$
  4. $$x > y$$
  5. $$f(x) = x^2$$
  6. $$\alpha = \sqrt{1-e^2}$$
  7. $$\(\sqrt{3x-1}+(1+x)^2\)$$
  8. $$\sin(\alpha)^{\theta}=\sum_{i=0}^{n}(x^i + \cos(f))$$
  9. $$\\dfrac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}$$
  10. $$f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi$$
  11. $$\displaystyle \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }$$
  12. $$\displaystyle \left( \sum\_{k=1}^n a\_k b\_k \right)^2 \leq \left( \sum\_{k=1}^n a\_k^2 \right) \left( \sum\_{k=1}^n b\_k^2 \right)$$
  13. $$a^2$$
  14. $$a^{2+2}$$
  15. $$a_2$$
  16. $${x_2}^3$$
  17. $$x_2^3$$
  18. $$10^{10^{8}}$$
  19. $$a_{i,j}$$
  20. $$_nP_k$$
  21. $$c = \pm\sqrt{a^2 + b^2}$$
  22. $$\frac{1}{2}=0.5$$
  23. $$\dfrac{k}{k-1} = 0.5$$
  24. $$\dbinom{n}{k} \binom{n}{k}$$
  25. $$\oint_C x^3\, dx + 4y^2\, dy$$
  26. $$\bigcap_1^n p \bigcup_1^k p$$
  27. $$e^{i \pi} + 1 = 0$$
  28. $$\left ( \frac{1}{2} \right )$$
  29. $$x_{1,2}=\frac{-b\pm\sqrt{\color{Red}b^2-4ac}}{2a}$$
  30. $${\color{Blue}x^2}+{\color{YellowOrange}2x}-{\color{OliveGreen}1}$$
  31. $$\textstyle \sum_{k=1}^N k^2$$
  32. $$\dfrac{ \tfrac{1}{2}[1-(\tfrac{1}{2})^n] }{ 1-\tfrac{1}{2} } = s_n$$
  33. $$\binom{n}{k}$$
  34. $$0+1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+\cdots$$
  35. $$\sum_{k=1}^N k^2$$
  36. $$\textstyle \sum_{k=1}^N k^2$$
  37. $$\prod_{i=1}^N x_i$$
  38. $$\textstyle \prod_{i=1}^N x_i$$
  39. $$\coprod_{i=1}^N x_i$$
  40. $$\textstyle \coprod_{i=1}^N x_i$$
  41. $$\int_{1}^{3}\frac{e^3/x}{x^2}\, dx$$
  42. $$\int_C x^3\, dx + 4y^2\, dy$$
  43. $${}_1^2\!\Omega_3^4$$

结果

E=mc^2

Inline 行内的公式 E=mc^2 行内的公式,行内的E=mc^2公式。

c = \pm\sqrt{a^2 + b^2}

x > y

f(x) = x^2

\alpha = \sqrt{1-e^2}

(\sqrt{3x-1}+(1+x)^2)

\sin(\alpha)^{\theta}=\sum_{i=0}^{n}(x^i + \cos(f))

\dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}

f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi

\displaystyle \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }

\displaystyle \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)

a^2

a^{2+2}

a_2

{x_2}^3

x_2^3

10^{10^{8}}

a_{i,j}

_nP_k

c = \pm\sqrt{a^2 + b^2}

\frac{1}{2}=0.5

\dfrac{k}{k-1} = 0.5

\dbinom{n}{k} \binom{n}{k}

\oint_C x^3\, dx + 4y^2\, dy

\bigcap_1^n p \bigcup_1^k p

e^{i \pi} + 1 = 0

\left ( \frac{1}{2} \right )

x_{1,2}=\frac{-b\pm\sqrt{\color{Red}b^2-4ac}}{2a}

{\color{Blue}x^2}+{\color{YellowOrange}2x}-{\color{OliveGreen}1}

\textstyle \sum_{k=1}^N k^2

\dfrac{ \tfrac{1}{2}[1-(\tfrac{1}{2})^n] }{ 1-\tfrac{1}{2} } = s_n

\binom{n}{k}

0+1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+\cdots

\sum_{k=1}^N k^2

\textstyle \sum_{k=1}^N k^2

\prod_{i=1}^N x_i

\textstyle \prod_{i=1}^N x_i

\coprod_{i=1}^N x_i

\textstyle \coprod_{i=1}^N x_i

\int_{1}^{3}\frac{e^3/x}{x^2}\, dx

\int_C x^3\, dx + 4y^2\, dy

{}_1^2!\Omega_3^4

多行公式 Multi line

代码

```math or ```latex or ```katex

  1. ```math
  2. f(x) = \int_{-\infty}^\infty
  3. \hat f(\xi)\,e^{2 \pi i \xi x}
  4. \,d\xi
  5. ```
  6. ```math
  7. \displaystyle
  8. \left( \sum\_{k=1}^n a\_k b\_k \right)^2
  9. \leq
  10. \left( \sum\_{k=1}^n a\_k^2 \right)
  11. \left( \sum\_{k=1}^n b\_k^2 \right)
  12. ```
  13. ```math
  14. \dfrac{
  15. \tfrac{1}{2}[1-(\tfrac{1}{2})^n] }
  16. { 1-\tfrac{1}{2} } = s_n
  17. ```
  18. ```katex
  19. \displaystyle
  20. \frac{1}{
  21. \Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{
  22. \frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {
  23. 1+\frac{e^{-6\pi}}
  24. {1+\frac{e^{-8\pi}}
  25. {1+\cdots} }
  26. }
  27. }
  28. ```
  29. ```latex
  30. f(x) = \int_{-\infty}^\infty
  31. \hat f(\xi)\,e^{2 \pi i \xi x}
  32. \,d\xi
  33. ```

结果

f(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2 \pi i \xi x} \,d\xi

\displaystyle \left( \sum\_{k=1}^n a\_k b\_k \right)^2 \leq \left( \sum\_{k=1}^n a\_k^2 \right) \left( \sum\_{k=1}^n b\_k^2 \right)

\dfrac{ \tfrac{1}{2}[1-(\tfrac{1}{2})^n] } { 1-\tfrac{1}{2} } = s_n

\displaystyle \frac{1}{ \Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{ \frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} { 1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }

f(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2 \pi i \xi x} \,d\xi

KaTeX vs MathJax

https://jsperf.com/katex-vs-mathjax