MarkDown语法教程

PS:Pc上都是用VScode markdownpreviewenhace插件写markdown的,复制过来后,可以看见对markdown很多特性都还没有支持= =!. 只能说继续加油了!
需要这些功能,可以去马克飞象进行导出成图片.
貌似CSS不能自定义呢... 代码块样式也挺丑的


1.标题

“#” 后加个空格。除此之外,还有 5 级标题,依次有不同的字体大小,即
# 一级标题
## 二级标题

2.文字

粗体

**粗体**

斜体

*斜体*

删除号

~~删除号~~

文字内部区分

文字内部`区分`

上标下标
30th
H2O

30^th^
H~2~O

脚注
Content [^1]

[^1]: Hi! This is a footnote

缩略

*[缩略]:这是一个缩略

*[缩略]:这是一个缩略

==标记==

==标记==

2.表格

Day Meal Price
Monday pasta $6
Tuesday chicken $8
| Day     | Meal     | Price   
:--------|---------:|:-------:
| Monday  | pasta    | $6      
| Tuesday | chicken  | $8

3.Checkbox

  • [x] @mentions, #refs, links, formatting, and tags supported
  • [x] list syntax required (any unordered or ordered list supported)
  • [x] this is a complete item
  • [ ] this is an incomplete item
- [x] @mentions, #refs, [links](), **formatting**, and tags supported 
- [x] list syntax required (any unordered or ordered list supported)
- [x] this is a complete item
- [ ] this is an incomplete item

4.层次

  • 一层
    • 二层
      • 三层
* 一层
    * 二层
        * 三层

5.链接

这是一个链接

[这是一个链接](http://)

6.代码块

#include "stdio.h" 

void main()
{
    int i = 0;
    if()
}
c++ {.line-numbers}
#include "stdio.h" 

void main()
{
    int i = 0;
    if()
}

7.数学公式(MathJax插件)

x = {-b \pm \sqrt{b^2-4ac} \over 2a}

$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$

8.图片

推荐使用html语言来插入图片,因为markdown语法无法调整图片大小

图片名称

>推荐使用html语言来插入图片,因为markdown语法无法调整图片大小

图片名称

9.图表

9.1.流程图

st=>start: Start
op=>operation: Your Operation
cond=>condition: Yes or No?
e=>end
st->op->cond
cond(yes)->e
cond(no)->op

9.2.时序图

graph LR
    A --> B
    B --> C
    A --> C

9.3.vega

{
"$schema": "https://vega.github.io/schema/vega/v3.0.json",
  "width": 400,
  "height": 200,
  "padding": 5,

  "data": [
    {
      "name": "table",
      "values": [
        {"category": "A", "amount": 28},
        {"category": "B", "amount": 55},
        {"category": "C", "amount": 43},
        {"category": "D", "amount": 91},
        {"category": "E", "amount": 81},
        {"category": "F", "amount": 53},
        {"category": "G", "amount": 19},
        {"category": "H", "amount": 87}
      ]
    }
  ],

  "signals": [
    {
      "name": "tooltip",
      "value": {},
      "on": [
        {"events": "rect:mouseover", "update": "datum"},
        {"events": "rect:mouseout",  "update": "{}"}
      ]
    }
  ],

  "scales": [
    {
      "name": "xscale",
      "type": "band",
      "domain": {"data": "table", "field": "category"},
      "range": "width",
      "padding": 0.05,
      "round": true
    },
    {
      "name": "yscale",
      "domain": {"data": "table", "field": "amount"},
      "nice": true,
      "range": "height"
    }
  ],

  "axes": [
    { "orient": "bottom", "scale": "xscale" },
    { "orient": "left", "scale": "yscale" }
  ],

  "marks": [
    {
      "type": "rect",
      "from": {"data":"table"},
      "encode": {
        "enter": {
          "x": {"scale": "xscale", "field": "category"},
          "width": {"scale": "xscale", "band": 1},
          "y": {"scale": "yscale", "field": "amount"},
          "y2": {"scale": "yscale", "value": 0}
        },
        "update": {
          "fill": {"value": "steelblue"}
        },
        "hover": {
          "fill": {"value": "red"}
        }
      }
    },
    {
      "type": "text",
      "encode": {
        "enter": {
          "align": {"value": "center"},
          "baseline": {"value": "bottom"},
          "fill": {"value": "#333"}
        },
        "update": {
          "x": {"scale": "xscale", "signal": "tooltip.category", "band": 0.5},
          "y": {"scale": "yscale", "signal": "tooltip.amount", "offset": -2},
          "text": {"signal": "tooltip.amount"},
          "fillOpacity": [
            {"test": "datum === tooltip", "value": 0},
            {"value": 1}
          ]
        }
      }
    }
  ]
}

10.ppt

预览要新建一个单独的md


# hi there


i'v got you

.

你可能感兴趣的:(MarkDown语法教程)