0.8.0 pypi

This commit is contained in:
跨越晨昏 2024-09-17 10:39:01 +08:00
parent b570b61bd9
commit 8b29728fd0
3 changed files with 11 additions and 1 deletions

View File

@ -318,7 +318,6 @@ class Syllabus:
def __call__(self, *args, **kwargs): def __call__(self, *args, **kwargs):
for num, txt in self.syllabus.items(): for num, txt in self.syllabus.items():
self.text = re.sub(f'{".".join(num)} {re.escape(txt)}', f'{"#" * len(num)}{".".join(num)} {txt}{{#' + '.'.join(num) + f'}}\n', self.text) # 按照层级为提纲添加不同等级的标题并创建锚点 self.text = re.sub(f'{".".join(num)} {re.escape(txt)}', f'{"#" * len(num)}{".".join(num)} {txt}{{#' + '.'.join(num) + f'}}\n', self.text) # 按照层级为提纲添加不同等级的标题并创建锚点
print(self.text)
return self.text return self.text

Binary file not shown.

View File

@ -29,17 +29,22 @@ ___
1.3.2 图片 1.3.2 图片
![链接图片](链接地址) ![链接图片](链接地址)
![sea](https://crossdark.com/wp-content/uploads/2024/05/1715259682-sea.jpg) ![sea](https://crossdark.com/wp-content/uploads/2024/05/1715259682-sea.jpg)
1.3.3 变量链接
[链接文本][变量]
[变量]: https://crossdark.com
2 变量 2 变量
2.1 定义 2.1 定义
{变量名} = 值 {变量名} = 值
2.2 赋值 2.2 赋值
{变量名} {锚点名} {变量名} {锚点名}
提纲的编号已经自动配置为了锚点,可直接使用{2}
2.3 添加锚点 2.3 添加锚点
{#锚点名} {#锚点名}
3 代码块 3 代码块
3.1 `单行` 3.1 `单行`
3.1.1 LaTex 3.1.1 LaTex
`$CO_2$` `$CO_2$`
`$H_2O$`
3.2 多行 3.2 多行
3.2.1 YAML 3.2.1 YAML
` `
@ -93,3 +98,9 @@ graph LR
- B - B
- C - C
- D - D
9 表格
| 表头1 | 表头2 | 表头3 |
| :--: | :--: | :--: |
| 单元格1 | 单元格2 | 单元格3 |
| 单元格4 | 单元格5 | 单元格6 |