forked from EduCraft/curriculum-project-hub
84 lines
2.2 KiB
Typst
84 lines
2.2 KiB
Typst
// 共享样式与语义框:两份规范(超严格版 / 考试版)共用
|
|
|
|
#let rule-color = rgb("#0b4f6c")
|
|
#let note-color = rgb("#6a4c00")
|
|
#let warn-color = rgb("#b3261e")
|
|
|
|
// 规范条目框(蓝色):本规范选定的做法
|
|
#let rule(body) = block(
|
|
width: 100%,
|
|
inset: 10pt,
|
|
radius: 4pt,
|
|
fill: rgb("#eaf2f6"),
|
|
stroke: (left: 3pt + rule-color),
|
|
body,
|
|
)
|
|
|
|
// 批注 / 出处框(黄色)
|
|
#let sidenote(body) = block(
|
|
width: 100%,
|
|
inset: 9pt,
|
|
radius: 4pt,
|
|
fill: rgb("#fbf6e8"),
|
|
stroke: (left: 3pt + note-color),
|
|
text(size: 9.5pt, body),
|
|
)
|
|
|
|
// 提醒框(红色)
|
|
#let warn(body) = block(
|
|
width: 100%,
|
|
inset: 9pt,
|
|
radius: 4pt,
|
|
fill: rgb("#fdeeec"),
|
|
stroke: (left: 3pt + warn-color),
|
|
text(size: 9.5pt, body),
|
|
)
|
|
|
|
// 例子框(灰色)
|
|
#let example(body) = block(
|
|
width: 100%,
|
|
inset: 9pt,
|
|
radius: 4pt,
|
|
fill: rgb("#f3f3f3"),
|
|
stroke: (left: 3pt + rgb("#999")),
|
|
text(size: 9.5pt, body),
|
|
)
|
|
|
|
// 全局配置 + 封面
|
|
#let conf(title: "", subtitle: "", badge: "", badge-color: rgb("#0b4f6c"), doc) = {
|
|
set document(title: title, author: "竞赛实验教研组")
|
|
set page(
|
|
paper: "a4",
|
|
margin: (top: 2.4cm, bottom: 2.4cm, left: 2.4cm, right: 2.4cm),
|
|
numbering: "1 / 1",
|
|
number-align: center,
|
|
)
|
|
set text(font: ("Noto Serif CJK SC",), size: 10.5pt, lang: "zh", region: "cn")
|
|
set par(justify: true, leading: 0.85em, first-line-indent: (amount: 2em, all: true))
|
|
show heading: set text(font: ("Noto Sans CJK SC",))
|
|
show heading: set block(above: 1.2em, below: 0.7em)
|
|
set heading(numbering: "1.1")
|
|
show math.equation: set text(font: "New Computer Modern Math")
|
|
|
|
// 封面
|
|
align(center)[
|
|
#v(3cm)
|
|
#box(
|
|
inset: (x: 12pt, y: 6pt),
|
|
radius: 6pt,
|
|
fill: badge-color,
|
|
text(font: ("Noto Sans CJK SC",), size: 13pt, weight: "bold", fill: white, badge),
|
|
)
|
|
#v(0.9cm)
|
|
#text(font: ("Noto Sans CJK SC",), size: 24pt, weight: "bold", title)
|
|
#v(0.5cm)
|
|
#text(size: 13pt, fill: rgb("#555"), subtitle)
|
|
#v(1.4cm)
|
|
#text(size: 11pt)[竞赛实验数据处理 · 评分口径规范]
|
|
#v(0.3cm)
|
|
#text(size: 10pt, fill: rgb("#777"))[供教练出题与学生研读使用]
|
|
]
|
|
pagebreak()
|
|
doc
|
|
}
|