609 字
3 分钟
Markdown 基础示例

一级标题#

段落之间使用空行分隔。

第二段文字。支持 斜体粗体等宽文字。无序列表示例:

  • 第一项
  • 第二项
  • 第三项

注意:不考虑星号的话,实际文本内容从第 4 列开始。

Block quotes are written like so.

They can span multiple paragraphs, if you like.

使用 3 个短横线表示破折号,使用 2 个短横线表示范围(例如“第 12—14 章”)。连续 3 个点 ... 会转换为省略号。 支持 Unicode 字符。☺

二级标题#

下面是有序列表:

  1. 第一项
  2. 第二项
  3. 第三项

再次注意,实际文本从第 4 列开始(也就是左侧第 4 个字符)。下面是一个代码示例:

# Let me re-iterate ...
for i in 1 .. 10 { do-something(i) }

如你所见,这段代码缩进了 4 个空格。除了缩进代码块,也可以使用带分隔符的代码块:

define foobar() {
print "欢迎来到示例代码世界!";
}

(这种写法更方便复制和粘贴)。也可以为代码块标记语言,以便进行语法高亮:

import time
# 快速数到十!
for i in range(10):
# (但不要*太*快)
time.sleep(0.5)
print i

三级标题#

下面是嵌套列表:

  1. 首先准备以下材料:

    • 胡萝卜
    • 芹菜
    • 小扁豆
  2. 烧开一些水。

  3. 将所有材料放入锅中,并按照以下步骤操作:

    找到木勺
    打开锅盖
    搅拌
    盖上锅盖
    将木勺小心地架在锅柄上
    等待 10 分钟
    回到第一步(或完成后关闭炉火)

    不要碰到木勺,否则它会掉下来。

Notice again how text always lines up on 4-space indents (including that last line which continues item 3 above).

Here’s a link to a website, to a local doc, and to a section heading in the current doc. Here’s a footnote 1.

Tables can look like this:

size material color


9 leather brown 10 hemp canvas natural 11 glass transparent

Table: Shoes, their sizes, and what they’re made of

(The above is the caption for the table.) Pandoc also supports multi-line tables:


keyword text


red Sunsets, apples, and other red or reddish things.

green Leaves, grass, frogs and other things it’s not easy being.


A horizontal rule follows.


Here’s a definition list:

apples : Good for making applesauce. oranges : Citrus! tomatoes : There’s no “e” in tomatoe.

Again, text is indented 4 spaces. (Put a blank line between each term/definition pair to spread things out more.)

Here’s a “line block”:

| Line one | Line too | Line tree

and images can be specified like so:

Inline math equations go in like so: ω=dϕ/dt\omega = d\phi / dt. Display math should get its own line and be put in in double-dollarsigns:

I=ρR2dVI = \int \rho R^{2} dV

π=3.1415926535  8979323846  2643383279  5028841971  6939937510  5820974944  5923078164  0628620899  8628034825  3421170679  \begin{equation*} \pi =3.1415926535 \;8979323846\;2643383279\;5028841971\;6939937510\;5820974944 \;5923078164\;0628620899\;8628034825\;3421170679\;\ldots \end{equation*}

And note that you can backslash-escape any punctuation characters which you wish to be displayed literally, ex.: `foo`, *bar*, etc.

Footnotes#

  1. Footnote text goes here.

Markdown 基础示例
https://www.uuz.io/posts/markdown/
作者
Yooyi
发布于
2023-10-01
许可协议
CC BY-NC-SA 4.0