也有 Tuack 这些一点没用的渲染,这个不贴了。
然后下面的渲染在 bbcoj 都无效:
1 居中和居右
我是居中内容
我是居右内容
源码是
:::align{center}
### 我是居中内容
:::
:::align{right}
### 我是居右内容
:::
我发现这个 bbcoj 也有,但是语法是 hljs-center,这个比较旧,建议改用 align{center}。
类似的还有 hljs-right,这个改成 align{right} 即可。
2 代码行高亮
#include<bits/stdc++.h>
using namespace std;
int main(){
cout<<"Hello World";
return 0;
}Markdown 如下:
```cpp lines=4-5
#include<bits/stdc++.h>
using namespace std;
int main(){
cout<<"Hello World";
return 0;
}
``` // 这个注释不在 Markdown 内,但是不加的话渲染不出来3 行号显示(可选,主要用于搭配 2)
bbc 默认渲染就有行号,但是预览的时候偏偏看不到,就很鸡肋。
#include<bits/stdc++.h>
using namespace std;
int main(){
cout<<"Hello World";
return 0;
}Markdown 如下:
```cpp line-numbers
#include<bits/stdc++.h>
using namespace std;
int main(){
cout<<"Hello World";
return 0;
}
``` // 这个注释不在 Markdown 内,但是不加的话渲染不出来4 引言(可选)
All problems in computer science can be solved by another level of indirection.
Markdown 如下:
:::epigraph[——David Wheeler]
All problems in computer science can be solved by another level of indirection.
:::5 表格合并(可选)
| 1 | 2 | 3 |
|---|---|---|
| 我被横向合并了 | 我被纵向合并了 | |
| 没有合并 | 没有合并 | |
Markdown 如下:
| 1 | 2 | 3 |
|:-:|:-:|:-:|
| 我被横向合并了 | < | 我被纵向合并了 |
| 没有合并 | 没有合并 | ^ |