forked from typst/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.typ
More file actions
109 lines (87 loc) · 2.44 KB
/
main.typ
File metadata and controls
109 lines (87 loc) · 2.44 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#import "@preview/simple-handout:0.2.0": define-config
/// 以下字体配置适用于安装了 Windows 10/11 字体及 Windows 10/11 简体中文字体扩展的设备,
/// 请勿修改 font-family 中定义的键值,一般情况下,其含义为:
/// - SongTi: 宋体,正文字体,通常对应西文中的衬线字体
/// - HeiTi: 黑体,标题字体,通常对应西文中的无衬线字体
/// - KaiTi: 楷体,用于说明性文本和主观性的表达
/// - FangSong: 仿宋,通常用于注释、引文及权威性阐述
/// - Mono: 等宽字体,对于代码,会优先使用此项,推荐中文字体使用黑体或楷体,或者一些流行的中文等宽字体
/// - Math: 数学字体,通常用于数学公式和符号,中文字体默认使用楷体
#let font-family = (
SongTi: ((name: "Times New Roman", covers: "latin-in-cjk"), "NSimSun"),
HeiTi: ((name: "Arial", covers: "latin-in-cjk"), "SimHei"),
KaiTi: ((name: "Times New Roman", covers: "latin-in-cjk"), "KaiTi"),
FangSong: ((name: "Times New Roman", covers: "latin-in-cjk"), "FangSong"),
Mono: ((name: "DejaVu Sans Mono", covers: "latin-in-cjk"), "SimHei"),
Math: ("New Computer Modern Math", "KaiTi"),
)
#let (
..config,
/// entry options
twoside,
use-fonts,
/// layouts
meta,
doc,
front-matter,
main-matter,
back-matter,
/// pages
fonts-display,
cover,
preface,
outline-wrapper,
notation,
master-list,
figure-list,
table-list,
equation-list,
bilingual-bibliography,
) = define-config(
info: (
title: "标题",
subtitle: "副标题",
authors: (
(name: "作者", email: "mail@example.com"),
),
version: "0.0.0",
date: datetime.today(),
),
fonts: font-family,
twoside: false,
bibliography: read("refs.bib"),
)
/// Document Configuration
#show: it => meta(it)
/// Font Display Page
#fonts-display()
/// Cover Page
#cover()
/// After Cover Layout, basical layout for Front Matter, Main Matter and Back Matter
#show: doc
/// ------------ ///
/// Front Matter ///
/// ------------ ///
#show: front-matter
// Preface Page
#preface[]
// Outline Page
#outline-wrapper()
/// ----------- ///
/// Main Matter ///
/// ----------- ///
#show: main-matter
= 第一部分
== 第1.1章
=== 第1.1.1节
/// ----------- ///
/// Back Matter ///
/// ----------- ///
#show: back-matter
#notation[
/ D#sub[m]: 预混通道外径 (mm)
]
#figure-list()
#table-list()
#equation-list()
#bilingual-bibliography()