fasdfsa commited on
Commit
58f19a2
·
1 Parent(s): f282eeb

add hlm_auto.typ

Browse files
Files changed (1) hide show
  1. hlm_auto.typ +31 -0
hlm_auto.typ ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ #import "./lib.typ": *
3
+
4
+ #set text(dir: rtl)
5
+
6
+ // 隐藏内置的 heading 样式,使其不影响实际排版,仅用于生成目录和 PDF 书签
7
+ #show heading: none
8
+
9
+ // 提取共用的排版参数,方便复用
10
+ #let style-args = (
11
+ miao: false,
12
+ type: "AllV",
13
+ font: ("FSung-p", "FSung-m", "FSung-1", "FSung-2", "FSung-3", "FSung-F", "FSung-X"),
14
+ spacing-rate: 25%,
15
+ col-gutter: 0.35em,
16
+ y-rate: 100%, // 调整 y-rate(原为26%)以增加上边距,修复顶部文字超出边框的问题
17
+ )
18
+
19
+ // 1. 生成目录页(独立的 calligraphy-work 块会单独分页)
20
+ #calligraphy-work(..style-args)[
21
+  #v(0.1em)目录#v(18em)
22
+ // 目录条目缩进半个字,使用强制换列,防止后续内容冲突
23
+ #h(0.5em)#outline(title: none)
24
+ ]
25
+
26
+ // 2. 生成正文
27
+ #calligraphy-work(..style-args)[
28
+ #include "auto_chapters/ch01.typ"
29
+ ]
30
+
31
+