Skip to content

Commit bff25ca

Browse files
authored
Update markdown.md
1 parent 54e7628 commit bff25ca

File tree

1 file changed

+134
-0
lines changed

1 file changed

+134
-0
lines changed

docs/rules/academic/handbook/markdown.md

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,14 @@ Markdown 建立代码块的方法:将 \`\`\` 置于这段代码的首行和末
137137
#include<iostream>
138138
```
139139

140+
使用 `lines=` 可以标记选定行。
141+
142+
<img width="268" height="260" alt="image" src="https://github.com/user-attachments/assets/60dc1e02-f526-49ea-ba4f-e99f9e8c0991" />
143+
144+
这个示例标记了 6-7 行,显示的效果如下:
145+
146+
<img width="950" height="265" alt="image" src="https://github.com/user-attachments/assets/38fc4665-5f6d-4dd4-baf5-7e5e8457e2e6" />
147+
140148
### 小段代码
141149

142150
需要引用代码时,如果引用的语句只有一段,不分行,可以用 \` 将语句包起来。
@@ -328,6 +336,132 @@ _ 底线
328336
! 惊叹号
329337
```
330338

339+
## 表格
340+
341+
使用 `|` 划分单元格,并使用 `:` 与三个及以上的 `-` 在第二行用于调整对齐。
342+
343+
```md
344+
| 我是左对齐 | 我是居中对齐 | 我是右侧对齐 |
345+
|:---|:---:|---:|
346+
| 内容 | 内容 | 内容 |
347+
```
348+
349+
显示效果为
350+
351+
| 我是左对齐 | 我是居中对齐 | 我是右侧对齐 |
352+
|:---|:---:|---:|
353+
| 内容 | 内容 | 内容 |
354+
355+
### 合并单元格
356+
357+
使用 `^``<` 标记这个单元格将与上、左合并。
358+
359+
```
360+
|测试点|$n$ |$m$ |特殊性质|
361+
|:-:|:--------:|:--------:|:--:|
362+
|1 |$\le 10$ |$\le 10$ |无 |
363+
|2 |^ |^ |无 |
364+
|3 |< |^ |无 |
365+
|4 |$\le 3\times 10^5$|^ |无 |
366+
|5 |^ |^ |无 |
367+
|6 |^ |$\le 3\times 10^5$|无 |
368+
|7 |^ |^ |无 |
369+
|8 |^ |^ |无 |
370+
|9 |^ |^ |无 |
371+
|10 |^ |^ |无 |
372+
```
373+
374+
显示效果为:
375+
376+
<img width="404" height="428" alt="image" src="https://github.com/user-attachments/assets/47645156-c91e-43df-a076-236a2d275b40" />
377+
378+
## 排版
379+
380+
支持居中(`center`)与靠右(`right`),使用 `:::` 包裹。
381+
382+
```md
383+
:::align{center}
384+
385+
386+
![](https://cdn.luogu.com.cn/upload/usericon/1.png)
387+
388+
389+
## 我是居中
390+
391+
:::
392+
:::align{right}
393+
394+
395+
### 我是右居中
396+
397+
:::
398+
```
399+
400+
显示效果为:
401+
402+
<img width="751" height="231" alt="image" src="https://github.com/user-attachments/assets/550ed2ce-6e07-4e73-b477-de25c03bf29e" />
403+
404+
## CF 风格 epigraph
405+
406+
使用 `:::` 包裹。
407+
408+
```md
409+
:::epigraph[——otto]
410+
大家好啊,我是说的道理,今天来点大家想看的东西。
411+
:::
412+
```
413+
414+
显示效果为:
415+
416+
<img width="747" height="90" alt="image" src="https://github.com/user-attachments/assets/bafd4a31-c0a0-460b-b45f-9e4790232b00" />
417+
418+
## 折叠块
419+
420+
支持 `info``warning``success` 三种,使用多个 `:` 包裹。
421+
422+
嵌套语法:最深的一层是三个 `:`,每往外一层就增加一个 `:`
423+
424+
```md
425+
::::info[`info` 样式的折叠块(这里是标题)]
426+
内容
427+
::::
428+
429+
::::warning[`warning` 样式的折叠块(这里是标题)]
430+
内容
431+
::::
432+
433+
::::success[`success` 样式的折叠块(这里是标题)]
434+
内容
435+
::::
436+
437+
##### 一些特殊样式(嵌套、$\KaTeX$)
438+
439+
::::::warning[我是警告]
440+
441+
:::::warning[不要]
442+
443+
::::warning[滥用]
444+
445+
:::warning[嵌套]
446+
不然会被 chen_zhe 封号!!!!!
447+
:::
448+
::::
449+
:::::
450+
::::::
451+
452+
::::success[$$\displaystyle\sum_{i = 1}^n \sum_{j = 1}^n \gcd(i, j)$$]
453+
数学公式也是可以出现在标题上的。
454+
::::
455+
```
456+
457+
<img width="950" height="662" alt="image" src="https://github.com/user-attachments/assets/738018eb-dfb9-42a4-9c0c-1e436c07ac82" />
458+
459+
:::danger 敬告用户
460+
461+
请勿滥用嵌套折叠块,否则您可能面临管理员的封禁!
462+
463+
:::
464+
331465
## 插入 Bilibili 视频
332466

333467
[https://www.luogu.com.cn/paste/okqcziz9](https://www.luogu.com.cn/paste/okqcziz9)

0 commit comments

Comments
 (0)