improve NITRAC doc cover
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 81 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 74 KiB |
BIN
Binary file not shown.
@@ -47,7 +47,7 @@
|
|||||||
place(top + left, dx: i-left-indent, dy: 0pt, box(
|
place(top + left, dx: i-left-indent, dy: 0pt, box(
|
||||||
width: i-width,
|
width: i-width,
|
||||||
height: mark-height,
|
height: mark-height,
|
||||||
align(center + horizon, scale(x: 280%, y: i-stretch-y, reflow: false, i-mark)),
|
align(center + horizon, scale(x: 300%, y: i-stretch-y, reflow: false, i-mark)),
|
||||||
))
|
))
|
||||||
place(top + left, dx: trac-offset, dy: 0pt, box(
|
place(top + left, dx: trac-offset, dy: 0pt, box(
|
||||||
width: trac-width,
|
width: trac-width,
|
||||||
@@ -61,12 +61,14 @@
|
|||||||
|
|
||||||
#cover(
|
#cover(
|
||||||
title: "确定性自动化 实时与集成",
|
title: "确定性自动化 实时与集成",
|
||||||
title-en: "Deterministic Automation - Realtime and Integration",
|
title-en: "Deterministic Automation Real-time and Integration",
|
||||||
logo: nitrac-mark,
|
logo: nitrac-mark,
|
||||||
number: "NITRAC-DOC-1",
|
number: "NITRAC-DOC-1",
|
||||||
author: "Nitload Industry",
|
author: "Nitload Industry",
|
||||||
classification: "MID[中秘]SEC",
|
classification: "MID[中秘]SEC",
|
||||||
date: "2026 年 9 月",
|
date: "2026 年 9 月",
|
||||||
|
sub_title: "第一册:总则与基本原则",
|
||||||
|
sub_title_en: "Part 1: Overview and fundamental principles",
|
||||||
)
|
)
|
||||||
|
|
||||||
#show: conf.with(number-pages: true)
|
#show: conf.with(number-pages: true)
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
#import "../NLI-doc-template.typ": cover, conf
|
||||||
|
|
||||||
|
#let mark-unit = 1.2cm
|
||||||
|
#let mark-blue = rgb("#4FC3F7")
|
||||||
|
#let mark-font = "SimHei"
|
||||||
|
|
||||||
|
// 大号 ITRAC:横向填满标识右侧至页面右缘,纵向精确拉伸至 6 格高。
|
||||||
|
// 顶部对齐,第 7 行(三角形收尾行)保持留白。
|
||||||
|
#let nitrac-mark = context {
|
||||||
|
let mark-x = 3.3 * mark-unit
|
||||||
|
let mark-width = 21cm - mark-x - 0.3 * mark-unit
|
||||||
|
let mark-height = 6 * mark-unit
|
||||||
|
let i-left-indent = 0.1 * mark-unit
|
||||||
|
let i-right-indent = 0.15 * mark-unit
|
||||||
|
let i-width = 1.2 * mark-unit - i-left-indent - i-right-indent
|
||||||
|
let trac-width = mark-width - 1.2 * mark-unit
|
||||||
|
let trac-offset = 1.2 * mark-unit
|
||||||
|
let probe-size = 100pt
|
||||||
|
let i = text(font: mark-font, weight: "bold", size: probe-size, fill: mark-blue)[I]
|
||||||
|
let trac = text(font: mark-font, weight: "bold", size: probe-size, fill: mark-blue)[TRAC]
|
||||||
|
let i-size = probe-size * (i-width / measure(i).width)
|
||||||
|
let trac-size = probe-size * (trac-width / measure(trac).width)
|
||||||
|
let i-mark = text(
|
||||||
|
font: mark-font,
|
||||||
|
weight: "bold",
|
||||||
|
size: i-size,
|
||||||
|
fill: mark-blue,
|
||||||
|
stroke: (paint: mark-blue, thickness: 1pt),
|
||||||
|
)[I]
|
||||||
|
let trac-mark = text(
|
||||||
|
font: mark-font,
|
||||||
|
weight: "bold",
|
||||||
|
size: trac-size,
|
||||||
|
fill: mark-blue,
|
||||||
|
)[TRAC]
|
||||||
|
let i-stretch-y = mark-height / measure(i-mark).height * 100%
|
||||||
|
let trac-stretch-y = mark-height / measure(trac-mark).height * 100%
|
||||||
|
place(
|
||||||
|
top + left,
|
||||||
|
dx: mark-x,
|
||||||
|
dy: 0pt,
|
||||||
|
box(
|
||||||
|
width: mark-width,
|
||||||
|
height: mark-height,
|
||||||
|
inset: 0pt,
|
||||||
|
scale(x: 100%, y: 100%, reflow: false, {
|
||||||
|
place(top + left, dx: i-left-indent, dy: 0pt, box(
|
||||||
|
width: i-width,
|
||||||
|
height: mark-height,
|
||||||
|
align(center + horizon, scale(x: 300%, y: i-stretch-y, reflow: false, i-mark)),
|
||||||
|
))
|
||||||
|
place(top + left, dx: trac-offset, dy: 0pt, box(
|
||||||
|
width: trac-width,
|
||||||
|
height: mark-height,
|
||||||
|
align(center + horizon, scale(x: 100%, y: trac-stretch-y, reflow: false, trac-mark)),
|
||||||
|
))
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
#cover(
|
||||||
|
title: "确定性自动化 实时与集成",
|
||||||
|
title-en: "Deterministic Automation Real-time and Integration",
|
||||||
|
logo: nitrac-mark,
|
||||||
|
number: "NITRAC-DOC-1",
|
||||||
|
author: "Nitload Industry",
|
||||||
|
classification: "MID[中秘]SEC",
|
||||||
|
date: "2026 年 9 月",
|
||||||
|
sub_title: "第二册:数据描述和交换格式",
|
||||||
|
sub_title_en: "Part 2: Data description and exchange format",
|
||||||
|
)
|
||||||
|
|
||||||
|
#show: conf.with(number-pages: true)
|
||||||
|
|
||||||
|
= 第一章 总则
|
||||||
|
|
||||||
|
本文档为 NITRAC 系列标准文档第一册草案。
|
||||||
|
|
||||||
|
== 1.1 范围
|
||||||
|
|
||||||
|
本节规定文档的适用范围。
|
||||||
|
|
||||||
|
== 1.2 规范性引用文件
|
||||||
|
|
||||||
|
本节列出编制和实施本标准所需的规范性引用文件。
|
||||||
|
|
||||||
|
= 第二章 术语和定义
|
||||||
|
|
||||||
|
本节规定本文档使用的术语和定义。
|
||||||
|
|
||||||
|
= 第三章 技术要求
|
||||||
|
|
||||||
|
本节规定 NITRAC 的技术要求。
|
||||||
+66
-11
@@ -49,13 +49,17 @@
|
|||||||
#let cover(
|
#let cover(
|
||||||
title: none, // 主标题(中文)
|
title: none, // 主标题(中文)
|
||||||
title-en: none, // 主标题(英文,Source Code Pro 自行排版)
|
title-en: none, // 主标题(英文,Source Code Pro 自行排版)
|
||||||
subtitle: none, // 副标题
|
subtitle: none, // 兼容旧调用:英文分册题名
|
||||||
|
sub_title: none, // 中文分册题名
|
||||||
|
sub_title_en: none, // 英文分册题名
|
||||||
|
subtitle_en: none, // 兼容旧调用:英文分册题名
|
||||||
logo: none, // 图片路径,如 image("logo.png")
|
logo: none, // 图片路径,如 image("logo.png")
|
||||||
number: none, // 文档编号
|
number: none, // 文档编号
|
||||||
author: none, // 作者(可为单个字符串或数组)
|
author: none, // 作者(可为单个字符串或数组)
|
||||||
classification: none, // 密级,如 "内部"、"秘密"
|
classification: none, // 密级,如 "内部"、"秘密"
|
||||||
info: (:), // 附加信息字典,如 (学号: "123", 指导教师: "张三")
|
info: (:), // 附加信息字典,如 (学号: "123", 指导教师: "张三")
|
||||||
date: none, // 日期
|
date: none, // 日期
|
||||||
|
part-info: none, // 兼容旧调用:分册题名
|
||||||
fill: white, // 封面背景色
|
fill: white, // 封面背景色
|
||||||
decorate: true, // 是否绘制天蓝/暖橙网格装饰色块
|
decorate: true, // 是否绘制天蓝/暖橙网格装饰色块
|
||||||
) = {
|
) = {
|
||||||
@@ -165,6 +169,53 @@
|
|||||||
let title-rows = cn-rows + en-rows
|
let title-rows = cn-rows + en-rows
|
||||||
let title-end-y = (7 + title-rows) * unit + en-gap
|
let title-end-y = (7 + title-rows) * unit + en-gap
|
||||||
|
|
||||||
|
let part-title-text = if sub_title != none { sub_title } else { none }
|
||||||
|
let part-title-en = if sub_title_en != none {
|
||||||
|
sub_title_en
|
||||||
|
} else if subtitle_en != none {
|
||||||
|
subtitle_en
|
||||||
|
} else {
|
||||||
|
subtitle
|
||||||
|
}
|
||||||
|
let part-box = if part-title-text != none or part-title-en != none or part-info != none {
|
||||||
|
let part-lines = ()
|
||||||
|
if part-title-text != none {
|
||||||
|
part-lines.push(text(
|
||||||
|
font: (cover-cjk, cover-latin), size: 18pt, fill: black,
|
||||||
|
)[#part-title-text])
|
||||||
|
}
|
||||||
|
if part-title-en != none {
|
||||||
|
let part-en = text(
|
||||||
|
font: (cover-latin, cover-cjk), size: 18pt, fill: black,
|
||||||
|
)[#part-title-en]
|
||||||
|
let part-en-inner = {
|
||||||
|
set par(leading: 0.3em)
|
||||||
|
part-en
|
||||||
|
}
|
||||||
|
part-lines.push(box(
|
||||||
|
width: 10.5cm - unit - 0.0 * unit,
|
||||||
|
part-en-inner,
|
||||||
|
))
|
||||||
|
}
|
||||||
|
if part-lines.len() == 0 and part-info != none {
|
||||||
|
part-lines.push(text(
|
||||||
|
font: (cover-cjk, cover-latin), size: 18pt, fill: black,
|
||||||
|
)[#part-info])
|
||||||
|
}
|
||||||
|
let part-value = stack(dir: ttb, spacing: 0.35 * unit, ..part-lines)
|
||||||
|
box(
|
||||||
|
width: 10.5cm - unit,
|
||||||
|
inset: (left: 0.25 * unit, right: 0.25 * unit),
|
||||||
|
align(left + top, part-value),
|
||||||
|
)
|
||||||
|
} else { none }
|
||||||
|
let part-y = title-end-y + 0.5 * unit
|
||||||
|
let part-height = if part-box != none { measure(part-box).height } else { 0pt }
|
||||||
|
if part-box != none {
|
||||||
|
place(top + left, dx: unit, dy: part-y, part-box)
|
||||||
|
}
|
||||||
|
let part-end-y = part-y + part-height
|
||||||
|
|
||||||
let metadata = ()
|
let metadata = ()
|
||||||
if number != none { metadata.push(("编号", number)) }
|
if number != none { metadata.push(("编号", number)) }
|
||||||
if author != none {
|
if author != none {
|
||||||
@@ -177,7 +228,7 @@
|
|||||||
if value != none { metadata.push((str(key), value)) }
|
if value != none { metadata.push((str(key), value)) }
|
||||||
}
|
}
|
||||||
let marker-height = 2 * unit
|
let marker-height = 2 * unit
|
||||||
let info-y = title-end-y + 0.45 * unit
|
let info-y = part-end-y + 0.45 * unit
|
||||||
|
|
||||||
let cells = ()
|
let cells = ()
|
||||||
for (label, value) in metadata {
|
for (label, value) in metadata {
|
||||||
@@ -191,7 +242,9 @@
|
|||||||
)[#value])
|
)[#value])
|
||||||
}
|
}
|
||||||
let info-content = if metadata.len() > 0 {
|
let info-content = if metadata.len() > 0 {
|
||||||
box(width: 21cm - 1.5 * unit,
|
box(
|
||||||
|
width: 21cm - 8.5 * unit,
|
||||||
|
inset: (left: 0.25 * unit, right: 0.25 * unit),
|
||||||
align(left + top, grid(
|
align(left + top, grid(
|
||||||
columns: (auto, 1fr),
|
columns: (auto, 1fr),
|
||||||
column-gutter: 0.6em,
|
column-gutter: 0.6em,
|
||||||
@@ -205,11 +258,7 @@
|
|||||||
// 左侧笔画与右侧笔画一样保持固定高度,不再随标题行数拉伸。
|
// 左侧笔画与右侧笔画一样保持固定高度,不再随标题行数拉伸。
|
||||||
// 标志在第七格独立收尾;下方长条依据文档信息的实际高度紧凑起笔。
|
// 标志在第七格独立收尾;下方长条依据文档信息的实际高度紧凑起笔。
|
||||||
tri(0, 6, "tr", sky)
|
tri(0, 6, "tr", sky)
|
||||||
let strip-y = if metadata.len() > 0 {
|
let strip-y = part-end-y + 0.18 * unit
|
||||||
info-y + info-height + 0.18 * unit
|
|
||||||
} else {
|
|
||||||
7 * unit
|
|
||||||
}
|
|
||||||
let strip-height = 29.7cm - strip-y
|
let strip-height = 29.7cm - strip-y
|
||||||
place(top + left, dy: strip-y, polygon(
|
place(top + left, dy: strip-y, polygon(
|
||||||
fill: sky, stroke: none,
|
fill: sky, stroke: none,
|
||||||
@@ -240,17 +289,23 @@
|
|||||||
)[signed]
|
)[signed]
|
||||||
let signed-size = measure(signed-label)
|
let signed-size = measure(signed-label)
|
||||||
place(top + left,
|
place(top + left,
|
||||||
dx: unit + signature-line-length - signed-size.width,
|
dx: unit,
|
||||||
dy: meta-y + apex-y - signed-size.height - 0.04 * unit,
|
dy: meta-y + apex-y - signed-size.height - 0.04 * unit,
|
||||||
signed-label)
|
signed-label)
|
||||||
|
|
||||||
// 三角形保留在距页底七个单位的位置,作为独立的封面装饰。
|
// 三角形保留在距页底七个单位的位置,作为独立的封面装饰。
|
||||||
// 文档信息不再与三角形连线,而是跟随主标题实际高度,排列在标题正下方。
|
// 文档信息不再与三角形连线,而是跟随主标题实际高度,排列在标题正下方。
|
||||||
|
|
||||||
place(top + left, dx: 1.25 * unit, dy: info-y, info-content)
|
place(
|
||||||
|
top + left,
|
||||||
|
dx: unit + signature-line-length,
|
||||||
|
dy: meta-y + apex-y + 0.3 * unit,
|
||||||
|
info-content,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tri(2, 6, "tl", sky)
|
||||||
}
|
}
|
||||||
tri(2, 6, "tl", sky)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|||||||
Reference in New Issue
Block a user