Markdown语法测试文章
关于Mdmdt主题
Mdmdt 是 markdown minimalism document theme 的缩写,意为: Markdown极简文档主题。 Mdmdt[^1]是深度定制的个性化Typora主题,其目的是打造一个清爽极简的文档样式。
Note
**注意:**mdmdt.css
文件中包含了亮色和暗色两者主题,会跟随系统模式自动切换亮暗主题。
This is a single line code style
Attention: The MDMDT.CSS file contains both light and dark themes, which will automatically switch between light and dark themes according to the system mode.
文本
这是一段正文内容样式,以下是不同文本样式效果:这是加粗文本样式,
这是下划线样式, 这是斜体字样式, 这是超链接样式:
https://github.com/cayxc/mdmdt,
This is a single line code style
,
这是删除线效果样式, ==这是文字高亮效果==,上下标样式: \(\LaTeX\), X2, H2O,
这是鼠标选中效果 ,
键盘键样式:Command+Q 🐳 😀 🇨🇳
This is a text content style and the following are the effects of
different text styles: This is a bold text style, This is a hyperlink style:
https://github.com/cayxc/mdmdt, This is the italic font
style, This is the strikethrough effect style, This
is the underline style,
This is a single line code style
, keyboard key style:
Command+Q, \(\text{LaTeX}\)
X2H2O, ==This is the text highlighting effect==,
This is the mouse selection
effect 🐳 😀 🇨🇳
数学公式
直接使用公式:
\[ \begin{aligned} I &=\int_0^{ct}\frac{r}{\sqrt{c^2t^2 -r^2}}\int_0^{2\pi} m^2(m+n) d\theta dr\&=\int_0^{ct}\frac{r}{\sqrt{c^2t^2 -r^2}}\end{aligned} \]
\[代入公式得到:\] \[u(t,x,y) = (3x+y) c^2 t^2 + x^2(x+y)\]
\[ u(t,x,y) = \frac{1}{2\pi c} \frac{\partial}{\partial t} \iint\limits_{r<ct} \frac{m^2(m+n)}{\sqrt{c^2t^2 -r^2 }}dmdn \]
列表
这些是列表样式效果:
- 这是有序列表 A
- 这是有序列表 B
- This is Item 1.
- This is Item 2.
- [ ] Something is Not TODO.
- [x] Something is DONE.
- 这是有序列表 A
- 这是有序列表 B
- 这是有序列表 A
- 这是有序列表 B
- This is Item 1.
- This is Item 2.
- This is Item 1.
- This is Item 2.
这是嵌套列表样式:
- 这是有序列表 A
- 这是有序列表 B
- This is Item 1.
- This is Item 2.
- [x] Something is Not TODO.
- [ ] Something is DONE.
- 这是有序列表 A
- 这是有序列表 B
- This is Item 1.
- This is Item 2.
- [ ] Something is Not TODO.
- [x] Something is DONE.
代码
单行代码样式:composer require --dev barryvdh/laravel-ide-helper
大段代码块样式:
1 | /** |
表格样式
Left-Aligned | Center Aligned | Right Aligned |
---|---|---|
This is the first line | this is code some wordy
text and some code |
$160 |
This is the second line | some code: this is code
centered |
$1200.99 |
This is the third line | These are some texts | $125.5 |
引用文本框
Note
This is a Note text box …… this is code style
This is a Note text box ……
Tip
this is code
This is a Tip text box ……代码段:
1
2 these are codes...
...
- This is a Tip text box ……
- This is itemA
- This is itemB
- This is itemC
Important
This is a Important text box ……
Warning
This is a Warning text box ……
Caution
this is code
This is a Caution text box ……
个性化图文布局
单张图片
多图并排
图片的个性化排列使用方式是将图片放到一个容器中,该容器为
<section>
标签,如下所示:
直接输入
<section>
然后回车,如下:<section> </section>
1
2
3
4
5
6
7
8
9
10
3. 在 `<section>` 标签中插入图片,如下:
```html
<section>
<!-- 想要几张图并排,就在此处插入几个 <img> 标签: <img src="图片的相对路径/绝对路径"></img> -->
<img src="https://raw.gitcode.com/Li2112183373/image/raw/main/mdmdt-code.png"></img>
<img src="https://raw.gitcode.com/Li2112183373/image/raw/main/mdmdt-source.png" style="width: 200px"></img> <!-- 单独设置图片的宽度为200px -->
<img src="https://raw.gitcode.com/Li2112183373/image/raw/main/mdmdt-title.png"></img>
</section>
效果预览:
多张图其他排列方式
一张大图在左,多张小图在右的图片排列,如下:
1 | <!-- 一张大图在左,多张小图在右 --> |
效果预览:
一张大图在右,多张小图在左的图片排列,如下:
1 | <!-- 一张大图在右,多张小图在左 --> |
效果预览:
图文并排
图文的个性化排列使用方式是将图片和文字放到一个容器中,该容器为
<section>
标签,如下所示:
直接输入
<section>
然后回车,如下:<section> </section>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
3. 在 `<section>` 标签中插入图片和文字,如下:
4. ```html
<!-- 图片和单段文字排列示例 -->
<section>
<img src="https://cdn.jsdelivr.net/gh/LiDaoKuan/image@main/note/mdmdt-title.png"></img> <!-- 这是第1列 -->
<span>这是文字在右,图片在左,图片和文字各占总宽度的50%的图文并排的样式。</span> <!-- 这是第2列 -->
</section>
<!-- 图片和单段文字排列示例 -->
<section>
<span>这是文字在左,图片在右,图片和文字各占总宽度的50%的图文并排的样式。</span>
<img src="https://cdn.jsdelivr.net/gh/LiDaoKuan/image@main/note/mdmdt-title.png"></img>
</section>
<!-- 图片和多段文字排列示例 -->
<section>
<img src="https://cdn.jsdelivr.net/gh/LiDaoKuan/image@main/note/mdmdt-title.png"></img> <!-- 这是第1列 -->
<span style="width: 150px"> <!-- 这是第2列,且单独设置该列的宽度为150px -->
<span>这是多段文字......</span>
<span>这是文字在右,图片在左,图片和文字各占总宽度的50%的图文并排的样式。</span>
<span>这是多段文字......</span>
</span>
</section>
<!-- 图片居中,文字在两边的排列示例 -->
<section>
<span>这是第1列,这是图片居中,文字在两边的样式</span> <!-- 这是第1列 -->
<img src="https://cdn.jsdelivr.net/gh/LiDaoKuan/image@main/note/mdtht-dark.png"></img> <!-- 这是第2列, 单独设置图片的宽度为200px -->
<span>这是第3列,列的宽度比第1列小</span> <!-- 这是第3列 -->
</section>
效果预览:
这是图片居中,两边是文字,且两边文字设置相同宽度的样式
这是图片居中,两边是文字,且两边文字设置相同宽度的样式
需要注意:该列文字内容较多,且未设置宽度。列的宽度比第3列大
图片和文字,图片设置宽度示例:
1 | <!-- 这是文字在右,图片在左的示例 --> |
效果预览:
Important
注意:
由于图片排列的容器 <section>
采用的是grid布局,会根据 <section>
中有几列和每列里的内容自动分配每一列的宽度。
在进行图片、图片和文字排列时,如果将某一列的宽度设置为
xx%的形式,则该列的实际宽度并不一定是内容区宽度的 xx%,而是
<section>
容器中当前列宽度的
xx%,且当前列的宽度还受到了里面内容的影响。
基于以上原因,建议在单独设置某一列宽度的时候,尽可能采用具体的值(如: style=“width: 200px”),不要采用 xx%(如: style=“width: 50%”)的形式。
示例:
1 | <!-- <section> 排列图片的容器,宽度为内容区(也就是书写区)的宽度 --> |
除了以上展示的排列方式,更多的排列形式,还请自行探索 ……
图表Mermaid
以下是 Mermaid图表 部分示例,更多图表类型请参考:Mermaid图表
flowchart LR
A[Hard edge] -->|Link text| B(Round edge)
B --> C{Decision}
C -->|One| D[Result one]
C -->|Two| E[Result two]
stateDiagram-v2
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvScrollLockPressed
ScrollLockOn --> ScrollLockOff : EvScrollLockPressed
}
gantt
dateFormat YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid
excludes weekends
%% (`excludes` accepts specific dates in YYYY-MM-DD format, days of the week ("sunday") or "weekends", but not the word "weekdays".)
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :until isadded
Functionality added :milestone, isadded, 2014-01-25, 0d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page :20h
Add another diagram to demo page :48h
Flowchart
Sequence Diagram
State Diagram
一级标题1
二级标题2
三级标题3
四级标题4
五级标题5
六级标题6
TOC目录
以下是 [TOC] 目录样式
[TOC]