孟祥瑞 commited on
Commit
b4099db
·
verified ·
1 Parent(s): fdbb2bf

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +9 -32
README.md CHANGED
@@ -1,35 +1,12 @@
1
- # Typst 参考手册 · 中文编译版
 
 
 
 
 
2
 
3
- 一份把 Typst 官方参考文档逐章转成 Typst 源码的中文手册,共 12 章,编译后约 1452 页。原始文本来自 Typst 官方文档,这里保留的是转换后的 `.typ` 源码与主题文件。
4
 
5
- ## 结构
6
 
7
- | 文件 | 内容 |
8
- |---|---|
9
- | `main.typ` | 入口:导入 `theme.typ` 与 `@preview/theorion`,按顺序 `include` 12 章 |
10
- | `chp01.typ` … `chp12.typ` | 各章正文;章节之间用 `<label>` 交叉引用,单独编译会报 “label does not exist” |
11
- | `theme.typ` | 文档主题:标题页、页眉页脚、配色的 `myconf` 配置 |
12
- | `setpage.typ` | 页面设置辅助函数 |
13
- | `test.typ`、`example.typ` | 语法试验与最小示例 |
14
- | `images/`、`data/` | 章节引用的图片与表格数据 |
15
- | `SExpressions.sublime-syntax`、`halcyon.tmTheme` | 编辑器语法高亮文件 |
16
-
17
- ## 编译
18
-
19
- ```sh
20
- typst compile --root . main.typ
21
- ```
22
-
23
- `--root .` 必须加:各章通过相对路径引用 `theme.typ` 与 `images/`,编译单章时相对路径会越出项目根。
24
-
25
- 依赖 `@preview/theorion:0.6.0`(首次编译自动下载)与 `@preview/cetz`。字体使用 TeX Gyre 系列;缺字体时 Typst 会回退并给出 warning。
26
-
27
- ## 代码风格
28
-
29
- 源码按统一规则整理:行尾空白、连续空行、制表符归零,数学间距改用符号名,超长行只在已有空格处折行;含行内代码(反引号)的行不折,避免把一段 inline raw 拆成两行。
30
-
31
- 整理后 `main.typ` 编译通过,1452 页不变,PDF 文本(NFKC + 空白归一化)逐字符多重集一致——差异仅来自 pdftotext 对同一行内并排文本块的读取顺序,不涉及内容或分页。
32
-
33
- ## License
34
-
35
- MIT
 
1
+ ---
2
+ license: mit
3
+ pretty_name: typst_reference
4
+ tags:
5
+ - corpus
6
+ ---
7
 
8
+ # typst_reference
9
 
10
+ typst_reference
11
 
12
+ 源仓库:[github.com/m-rui001/typst_reference](https://github.com/m-rui001/typst_reference)。统一入口:[m-rui/llm-corpus-hub](https://huggingface.co/datasets/m-rui/llm-corpus-hub)。