· updated Jan 27, 2025 · 11 min read
Markdown 学习
本文涉及学习 Markdown 文本标记语言的一些练习笔记。
Note Tag 测试
/**
* note.js | global hexo script.
*
* ATTENTION! No need to write this tag in 1 line if u don't want see probally bugs.
*
* Usage:
*
* {% note [class] %}
* Any content (support inline tags too).
* {% endnote %}
*
* [class] : default | primary | success | info | warning | danger.
* May be not defined.
*/
Test note default
昏鴉盡,小立恨因誰?急雪乍翻香閣絮,輕風吹到膽瓶梅,心字已成灰。
Test note primary
昏鴉盡,小立恨因誰?急雪乍翻香閣絮,輕風吹到膽瓶梅,心字已成灰。
Test note success
昏鴉盡,小立恨因誰?急雪乍翻香閣絮,輕風吹到膽瓶梅,心字已成灰。
Test note info
昏鴉盡,小立恨因誰?急雪乍翻香閣絮,輕風吹到膽瓶梅,心字已成灰。
Test note warning
昏鴉盡,小立恨因誰?急雪乍翻香閣絮,輕風吹到膽瓶梅,心字已成灰。
Test note danger
昏鴉盡,小立恨因誰?急雪乍翻香閣絮,輕風吹到膽瓶梅,心字已成灰。
Button 标签测试
Usage: {% button /path/to/url/, text, icon [class], title %}
Alias: {% btn /path/to/url/, text, icon [class], title %}
Button 内嵌文字
{% button #, Text %}{% button #插入不同颜色的字体, 插入不同颜色的字体,heart %}
Button 内嵌 logo
{% btn ##插入不同颜色的字体,, header %}{% btn #,, edge %}{% btn #,, times %}{% btn #,, circle-o %}
{% btn #,, italic %}{% btn #,, scribd %}
{% btn #,, google %}{% btn #,, chrome %}{% btn #,, opera %}{% btn #,, diamond fa-rotate-270 %}
Button Margin
{% btn #, Almost, adn fa-fw fa-lg %} {% btn #, Over, terminal fa-fw fa-lg %}
{% btn #, Test is finished., check fa-fw fa-lg, Button tag test is finished. %}
Label Tag 测试文中字体颜色
From {% label @fairest creatures %} we desire increase,
That thereby {% label primary@beauty's rose %} might never die,
But as the {% label success@riper %} should by time decease,
His tender heir might {% label info@bear his memory %}:
But thou contracted to thine own bright eyes,
Feed'st thy light's flame with *{% label warning @self-substantial fuel%}*,
Making a famine where ~~{% label default @abundance lies %}~~,
Thy self thy foe, to thy <mark>sweet self too cruel</mark>:
Thou that art now the world's fresh ornament,
And only herald to the gaudy spring,
Within thine own bud buriest thy content,
And {% label danger@tender churl mak'st waste in niggarding %}:
Pity the world, or else this glutton be,
{% label warning@To eat the world's due, by the grave and thee %}.
From fairest creatures we desire increase, That thereby beauty’s rose might never die, But as the riper should by time decease, His tender heir might bear his memory: But thou contracted to thine own bright eyes, Feed’st thy light’s flame with self-substantial fuel, Making a famine where abundance lies, Thy self thy foe, to thy sweet self too cruel: Thou that art now the world’s fresh ornament, And only herald to the gaudy spring, Within thine own bud buriest thy content, And tender churl mak’st waste in niggarding: Pity the world, or else this glutton be, To eat the world’s due, by the grave and thee.
表格 Tag 测试
{% tabs First unique name %}
<!-- tab -->
**This is Tab 1.**
<!-- endtab -->
<!-- tab -->
**This is Tab 2.**
<!-- endtab -->
<!-- tab -->
**This is Tab 3.**
<!-- endtab -->
{% endtabs %}
This is Tab 1.
This is Tab 2.
This is Tab 3.
插入不同颜色的字体
<table><tr><td bgcolor=LimeGreen><font color=white size=3>我是白色的字体,背景是色的~</font></td></tr></table>
我是白色的字体,背景是色的~
我是白色的字体,背景是深灰色的~
我是白色的字体,背景是浅海绿的~
我是白色的字体,背景是蓝色的~
我是白色的字体,背景是银色的~
我是白色的字体,背景是淡灰色的~
我是白色的字体,背景是深灰色的~
插入代码
这里是代码区域
% The following is the Matlab Code
% I want to see the result
function demo()
temp=zeros(5,6);
for i=1:size(temp,1)
for j=1:size(temp,2)
temp(i,j)=rand(1);
if temp(i,j)>0.5
temp(i,j)=1;
end
end
end
return temp
插入标题
# 一级标题
## 二级标题
### 三级标题
#### 四级标题
##### 五级标题
###### 六级标题
列表
- 文本1
- 文本2
- 文本3
1. 文本一
2. 文本二
3. 文本三
- 文本1
- 文本2
- 文本3
- 文本一
- 文本二
- 文本三
插入图像

或者:
<center><img src="http://i2.wp.com/posturemag.com/online/wp-content/uploads/2015/07/Kaz7.jpg" width="100%" ></center>
插入链接
- segmentfault 上的一个 Markdown 学习手册
- 有道云笔记的 Markdown 学习指南-基础篇
- Git 学习手册
插入公式
$$E=mc^2$$
Hexo 文档使用 Markdown 语言对文档进行编辑,Hexo 自身对公式可以进行渲染但是效果不佳,我们采用的是 MathJax 对 Markdown 中的公式进行渲染。首先修复 Hexo 与 MathJax 之间的渲染冲突,然后可以参考 MathJax 的说明文档编辑公式。
希腊字母对应表
| 字母名称 | 大写 | Markdown 原文 | 小写 | Markdown 原文 |
|---|---|---|---|---|
| alpha | A | \alpha | ||
| beta | B | \beta | ||
| gamma | \Gamma | \gamma | ||
| delta | \Delta | \delta | ||
| epsilon | E | \epsilon | ||
| - | - | - | \varepsilon | |
| zeta | Z | \zeta | ||
| eta | H | \eta | ||
| theta | \Theta | \theta | ||
| - | - | - | \vartheta | |
| iota | I | \iota | ||
| kappa | K | \kappa | ||
| lambda | \Lambda | \lambda | ||
| mu | M | \mu | ||
| nu | N | \nu | ||
| xi | \Xi | \xi | ||
| omicron | O | o | ||
| pi | \Pi | \pi | ||
| rho | P | \rho | ||
| - | - | - | \varrho | |
| sigma | \Sigma | \sigma | ||
| - | - | - | \varsigma | |
| tau | T | \tau | ||
| upsilon | \Upsilon | \upsilon | ||
| phi | \Phi | \phi | ||
| - | - | - | \varphi | |
| chi | X | \chi | ||
| psi | \Psi | \psi | ||
| omega | \Omega | \omega |