当前位置:网站首页>MarkDown高阶语法手册
MarkDown高阶语法手册
2022-07-29 11:31:00 【代码的路】
更多语法请参见:
1. 内容目录
在段落中填写 [TOC] 以显示全文内容的目录结构。
2. 标签分类
在编辑区任意行的列首位置输入以下代码给文稿标签:
标签: 数学 英语 Markdown
或者
Tags: 数学 英语 Markdown
3. 删除线
使用 ~~ 表示删除线。
这是一段错误的文本。
4. 注脚
使用 [^keyword] 表示注脚。
这是一个注脚[^footnote]的样例。
这是第二个注脚[^footnote2]的样例。
5. LaTeX 公式
“$” 表示行内公式:
质能守恒方程可以用一个很简洁的方程式 来表达。
“$$” 表示整行公式:
访问 MathJax 参考更多使用方法。
6. 加强的代码块
支持四十一种编程语言的语法高亮的显示,行号显示。
非代码示例:
$ sudo apt-get install vim-gnome
Python 示例:
@requires_authorization
def somefunc(param1='', param2=0):
'''A docstring'''
if param1 > param2: # interesting
print 'Greater'
return (param2 - param1 + 1) or None
class SomeClass:
pass
>>> message = '''interpreter
... prompt'''
JavaScript 示例:
/**
* nth element in the fibonacci series.
* @param n >= 0
* @return the nth element, >= 0.
*/
function fib(n) {
var a = 1, b = 1;
var tmp;
while (--n >= 0) {
tmp = a;
a += b;
b = tmp;
}
return a;
}
document.write(fib(10));
7. 流程图
示例
st=>start: Start:>https://www.zybuluo.com
io=>inputoutput: verification
op=>operation: Your Operation
cond=>condition: Yes or No?
sub=>subroutine: Your Subroutine
e=>end
st->io->op->cond
cond(yes)->e
cond(no)->sub->io
更多语法参考:流程图语法参考
8. 序列图
示例 1
Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!
示例 2
Title: Here is a title
A->B: Normal line
B-->C: Dashed line
C->>D: Open arrow
D-->>A: Dashed open arrow
更多语法参考:序列图语法参考
9. 甘特图
甘特图内在思想简单。基本是一条线条图,横轴表示时间,纵轴表示活动(项目),线条表示在整个期间上计划和实际的活动完成情况。它直观地表明任务计划在什么时候进行,及实际进展与计划要求的对比。
title 项目开发流程
section 项目确定
需求分析 :a1, 2016-06-22, 3d
可行性报告 :after a1, 5d
概念验证 : 5d
section 项目实施
概要设计 :2016-07-05 , 5d
详细设计 :2016-07-08, 10d
编码 :2016-07-15, 10d
测试 :2016-07-22, 5d
section 发布验收
发布: 2d
验收: 3d
更多语法参考:甘特图语法参考
10. Mermaid 流程图
A[Hard edge] -->|Link text| B(Round edge)
B --> C{Decision}
C -->|One| D[Result one]
C -->|Two| E[Result two]
更多语法参考:Mermaid 流程图语法参考
11. Mermaid 序列图
Alice->John: Hello John, how are you?
loop every minute
John-->Alice: Great!
end
更多语法参考:Mermaid 序列图语法参考
12. 表格支持
| 项目 | 价格 | 数量 |
|---|---|---|
| 计算机 | $1600 | 5 |
| 手机 | $12 | 12 |
| 管线 | $1 | 234 |
13. 定义型列表
- 名词 1
定义 1(左侧有一个可见的冒号和四个不可见的空格)
- 代码块 2
这是代码块的定义(左侧有一个可见的冒号和四个不可见的空格)
代码块(左侧有八个不可见的空格)
14. Html 标签
本站支持在 Markdown 语法中嵌套 Html 标签,譬如,你可以用 Html 写一个纵跨两行的表格:
<table>
<tr>
<th rowspan="2">值班人员</th>
<th>星期一</th>
<th>星期二</th>
<th>星期三</th>
</tr>
<tr>
<td>李强</td>
<td>张明</td>
<td>王平</td>
</tr>
</table>
| 值班人员 | 星期一 | 星期二 | 星期三 |
|---|---|---|---|
| 李强 | 张明 | 王平 |
15. 内嵌图标
本站的图标系统对外开放,在文档中输入
<i class="icon-weibo"></i>
即显示微博的图标:
替换 上述 i 标签 内的 icon-weibo 以显示不同的图标,例如:
<i class="icon-renren"></i>
即显示人人的图标:
更多的图标和玩法可以参看 font-awesome 官方网站。
16. 待办事宜 Todo 列表
使用带有 [ ] 或 [x] (未完成或已完成)项的列表语法撰写一个待办事宜列表,并且支持子列表嵌套以及混用Markdown语法,例如:
- [ ] **Cmd Markdown 开发**
- [ ] 改进 Cmd 渲染算法,使用局部渲染技术提高渲染效率
- [ ] 支持以 PDF 格式导出文稿
- [x] 新增Todo列表功能 [语法参考](https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments)
- [x] 改进 LaTex 功能
- [x] 修复 LaTex 公式渲染问题
- [x] 新增 LaTex 公式编号功能 [语法参考](http://docs.mathjax.org/en/latest/tex.html#tex-eq-numbers)
- [ ] **七月旅行准备**
- [ ] 准备邮轮上需要携带的物品
- [ ] 浏览日本免税店的物品
- [x] 购买蓝宝石公主号七月一日的船票
对应显示如下待办事宜 Todo 列表:
[ ] Cmd Markdown 开发 [ ] 七月旅行准备 [ ] 准备邮轮上需要携带的物品 [ ] 浏览日本免税店的物品 [x] 购买蓝宝石公主号七月一日的船票
[^footnote]: 这是一个 注脚 的 文本。
[^footnote2]: 这是另一个 注脚 的 文本。
学习更多编程知识,请关注我的公众号:

边栏推荐
- Design and implementation of gbase8s Informix dodker high availability cluster self recovery cluster startup command oninitdb
- WeChat red envelope test case
- Learn weekly - 64 - a v2ex style source BBS program
- Starrocks technology insider: how to have both real-time update and fast query
- sql join中on条件后接and和where
- DNS protocol, ICMP protocol, NAT technology
- LeetCode_1049_最后一块石头的重量Ⅱ
- Package delivery (greedy)
- HMS Core Discovery第16期回顾|与虎墩一起,玩转AI新“声”态
- Alluxio为Presto赋能跨云的自助服务能力
猜你喜欢

【图像处理】基于中轴变换实现图像骨架提取附matlab代码

MySql启动、连接sqlog、主从复制、双机热备(开机时)

什么是 Kubernetes 自定义资源定义 (CRD)?

Qt 之自定义界面(实现无边框、可移动)

如何开始为您的 Kubernetes 应用程序编写 Helm 图表

Sunwenlong, Secretary General of the open atom open source foundation, worked together to expand open source

开源峰会抢先看 | 7 月 29 日分论坛 & 活动议程速览

How to use "copy – link" to accelerate docker to build and optimize cache

IPV6基础

One click blog building: how to use WordPress plug-in to build a dedicated blog
随机推荐
593. 有效的正方形
【图像检测】基于灰度图像的积累加权边缘检测方法研究附matlab代码
Exclusive interview | Cheng Li, chief technology officer of Alibaba: cloud + open source together form a credible foundation for the digital world
一键搭建博客:如何使用WordPress插件搭建专属博客
大伟 Golang之路
MyCat中间件高可用、读写分离、分片、主从切换、ER分片
SkiaSharp of WPF custom painting to bounce ball (case)
LeetCode_ 1049_ Weight of the last stone II
『知识集锦』一文搞懂mysql索引!!(建议收藏)
std::vector 拷贝、追加、嵌套访问
DNS protocol, ICMP protocol, NAT technology
Deep understanding of c # nullable types
精通音视频开发是真的可以为所欲为
ECCV 2022 | ssp: a new idea of small sample tasks with self-supporting matching
TCP and UDP
It is recommended to collect a thousand ways to write sql row to column!!
Summer vacation training week1
Std:: vector copy, append, nested access
How to use grep to display file names and line numbers before matching lines
Building and sharing the root of the digital world: Alibaba Cloud builds a comprehensive cloud-native open source ecosystem