See https://pandoc.org/MANUAL.html#pandocs-markdown
Math
单行公式
如果a ≠ 0, 那么方程 ax2 + bx + c = 0 存在两个解
多行公式:
渲染出多行$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$
单行需要强制增加行
\\$$ f(x) = \int_{-\infty}^\infty \hat{f}(\xi)\,e^{2 \pi i \xi x} \,d\xi \\ $$$$ f(x) = \int_{-\infty}^\infty \hat{f}(\xi)\,e^{2 \pi i \xi x} \,d\xi \\ $$
fitch proof1
Demo1
$$ \begin{aligned} 1.\\[-3pt] 2.\\[-3pt] 3.\\[-3pt] 4.\\[-3pt] 5.\\[-3pt] 6.\\[-3pt]\end{aligned} \; \begin{array}{|l} A \to B \\ B \to C \\ \hline \quad \left. \begin{array}{|l} A \\\hline B \\ C\end{array} \right. \\ A\to C \\ \end{array} \quad \begin{aligned} \\[-3pt] \\[-3pt] \\[-3pt] &(\to E)\space1,3 \\[-3pt] &(\to E) \space 2,4 \\[-3pt] &(\to I)\space\text{3-5} \end{aligned} $$
Demo2
$$ \begin{array}{rll} \begin{array}{c} 1.\\ 2.\\ 3.\\ 4.\\ 5.\\ 6.\\ \end{array} \begin{array}{|l} A \to B \\ B \to C \\ \hline \quad \begin{array}{|l} A \\ \hline B \\ C \end{array} \\ A \to C \end{array} {\tiny \color{gray} \begin{array}{rl} \\ \\ \\[15px] \;\; (\to E) & 1,3 \\[6px] \;\; (\to E) & 2,4 \\[6px] \;\; (\to I) & \text{3 - 5} \\ \end{array} } \end{array} $$
Demo3
$$ \begin{array}{c} \begin{array}{|l} \vdash (P \to Q) \to P \to Q \\ \hline \begin{array}{|l} \quad \text{1. } P \to Q \\ \hline \quad \begin{array}{|l} \qquad \text{2. } P \\ \hline \qquad \text{3. } Q \quad \to\!\text{E}, 1,2 \\ \end{array} \\ \quad \text{4. } P \to Q \quad \to\!\text{I}, 2-3 \\ \end{array} \\ \text{5. } (P \to Q) \to (P \to Q) \quad \to\!\text{I}, 1-4 \\ \end{array} \end{array} $$
equation align
$$ \begin{array}{rclcl} 2x + 5 &=& 4x -3 &&\\ 2x + 5 - 4x &=& 4x -3 - 4x &&\\ -2x +5 &=& -3 &&\\ -2x +5 -5&=& -3 -5&&\\ -2x &=& -8&&\\ x &=& 4&& \end{array} $$
proof tree
$$ \dfrac{ \dfrac{A \qquad B}{A \land B} \quad C }{(A \land B) \land C} $$
不支持 code block math display
```math
x = {-b \pm \sqrt{b^2-4ac} \over 2a}
```
效果:
x = {-b \pm \sqrt{b^2-4ac} \over 2a}
KaTeX支持的符号: https://katex.org/docs/supported.html
Footnots,Citation
Here is a simple footnote2.
A footnote can also have multiple lines3.
https://pandoc.org/MANUAL.html#citation-syntax
Code block
data Document = Document
{ docExt :: Maybe String,
docTitle :: Text,
docAuthor :: Maybe Text,
docTags :: Maybe [Text],
docDate :: Maybe Text,
docContent :: Maybe Text,
docPath :: Maybe Text,
docAttrs :: Maybe Value
}
deriving (Show, Generic)
deriving (FromJSON, ToJSON) via PrefixedSnake "doc" Documentfenced code attribute
Table
| | Sites | |
| ---------------------------- | ----------------------------------- | ----------------------------------- |
| [Github](https://github.com) | [Koka](https://koka-lang.github.io) | [Haskell](https://www.haskell.org/) |Pandoc Grid Tables
| Fruit | Price | Advantages |
|---|---|---|
| Bananas | $1.34 |
|
| Oranges | $2.10 |
|
Cells can span multiple columns or rows:
| Property | Earth | |
|---|---|---|
| Temperature1961-1990 | min | -89.2 °C |
| mean | 14 °C | |
| max | 56.7 °C | |
A table header may contain more than one row:
| Location | Temperature 1961-1990in degree Celsius | ||
|---|---|---|---|
| min | mean | max | |
| Antarctica | -89.2 | N/A | 19.8 |
| Earth | -89.2 | 14 | 56.7 |
Quoting text
> Text that is a quoteText that is a quote
Definitions
- Term 1
-
Definition 1
Term 2 with *inline markup*-
Definition 2
{ some code, part of Definition 2 }Third paragraph of definition 2.
https://pandoc.org/MANUAL.html#definition-lists
Numbered example lists
- My first example will be numbered.
- My second example will be numbered.
Explanation of examples.
My third example will be numbered.
This is a good example.
As (4) illustrates, …
- Sample sentence.
Intervening text…
This theory can explain the case we saw earlier (repeated):
- Sample sentence.
Task list items
- example1
-
- example2
-
-
Divs and Spans
Fenced divs can be nested. Opening fences are distinguished because they must have attributes:
This is a warning.
This is a warning within a warning.
Admonitions (TODO)
github style
[!NOTE]Highlights information that users should take into account, even when skimming.
[!WARNING]Warning: This operation will delete all data.
pandoc style
!!! note
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
mkdocs detail 4
???+ note “Open styled details”
??? danger "Nested details!"
And more content again.
??? success Content.
??? warning classes Content.
Mkdocs Emoji (TODO)
@octocat :+1: This PR looks great - it’s ready to merge! :shipit:
Links
这是一个访问 Google 的链接, 你也可以在 GitHub 上找到开源项目,或者参考 Markdown指南 学习语法。