File size: 846 Bytes
546c71a
 
 
 
 
b4d4ae8
 
 
 
 
546c71a
 
0fd6fc2
546c71a
 
 
b4d4ae8
 
 
 
 
 
 
 
 
 
 
b64e030
67e0ad3
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

#import "./lib.typ": *

#set text(dir: rtl)

// 隐藏内置的 heading 样式,使其不影响实际排版,仅用于生成目录和 PDF 书签
#show heading: none

// 提取共用的排版参数,方便复用
#let style-args = (
  miao: false,
  type: "AllV",
  font: ("FSung-p", "FSung-m", "FSung-1", "FSung-2", "FSung-3", "FSung-F", "FSung-X"),
  spacing-rate: 25%,
  col-gutter: 0.35em,
  y-rate: 100%, // 调整 y-rate(原为26%)以增加上边距,修复顶部文字超出边框的问题
)

// 1. 生成目录页(独立的 calligraphy-work 块会单独分页)
#calligraphy-work(..style-args)[
   #v(0.1em)目录#v(18em)
  // 目录条目缩进半个字,使用强制换列,防止后续内容冲突
  #h(0.5em)#outline(title: none)
]

// 2. 生成正文
#calligraphy-work(..style-args)[
  #include "chapters/ch01.typ"
]