diff --git a/NITLOAD-STANDARD-NITRAC/NITRAC-doc-1b-preview-1.png b/NITLOAD-STANDARD-NITRAC/NITRAC-doc-1b-preview-1.png deleted file mode 100644 index 8520594..0000000 Binary files a/NITLOAD-STANDARD-NITRAC/NITRAC-doc-1b-preview-1.png and /dev/null differ diff --git a/NITLOAD-STANDARD-NITRAC/NITRAC-doc-1b-preview-2.png b/NITLOAD-STANDARD-NITRAC/NITRAC-doc-1b-preview-2.png deleted file mode 100644 index 556d9b1..0000000 Binary files a/NITLOAD-STANDARD-NITRAC/NITRAC-doc-1b-preview-2.png and /dev/null differ diff --git a/NITLOAD-STANDARD-NITRAC/NITRAC-doc-1b-preview.pdf b/NITLOAD-STANDARD-NITRAC/NITRAC-doc-1b.pdf similarity index 63% rename from NITLOAD-STANDARD-NITRAC/NITRAC-doc-1b-preview.pdf rename to NITLOAD-STANDARD-NITRAC/NITRAC-doc-1b.pdf index 87b3e5f..121edd3 100644 Binary files a/NITLOAD-STANDARD-NITRAC/NITRAC-doc-1b-preview.pdf and b/NITLOAD-STANDARD-NITRAC/NITRAC-doc-1b.pdf differ diff --git a/NITLOAD-STANDARD-NITRAC/NITRAC-doc-1b.typ b/NITLOAD-STANDARD-NITRAC/NITRAC-doc-1b.typ index c819875..70dd983 100644 --- a/NITLOAD-STANDARD-NITRAC/NITRAC-doc-1b.typ +++ b/NITLOAD-STANDARD-NITRAC/NITRAC-doc-1b.typ @@ -47,7 +47,7 @@ place(top + left, dx: i-left-indent, dy: 0pt, box( width: i-width, 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( width: trac-width, @@ -61,12 +61,14 @@ #cover( title: "确定性自动化 实时与集成", - title-en: "Deterministic Automation - Realtime and Integration", + 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 1: Overview and fundamental principles", ) #show: conf.with(number-pages: true) diff --git a/NITLOAD-STANDARD-NITRAC/NITRAC-doc-2b.typ b/NITLOAD-STANDARD-NITRAC/NITRAC-doc-2b.typ new file mode 100644 index 0000000..caab9f2 --- /dev/null +++ b/NITLOAD-STANDARD-NITRAC/NITRAC-doc-2b.typ @@ -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 的技术要求。 \ No newline at end of file diff --git a/NLI-doc-template.typ b/NLI-doc-template.typ index eb18fc6..1ba3875 100644 --- a/NLI-doc-template.typ +++ b/NLI-doc-template.typ @@ -49,13 +49,17 @@ #let cover( title: none, // 主标题(中文) 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") number: none, // 文档编号 author: none, // 作者(可为单个字符串或数组) classification: none, // 密级,如 "内部"、"秘密" info: (:), // 附加信息字典,如 (学号: "123", 指导教师: "张三") date: none, // 日期 + part-info: none, // 兼容旧调用:分册题名 fill: white, // 封面背景色 decorate: true, // 是否绘制天蓝/暖橙网格装饰色块 ) = { @@ -165,6 +169,53 @@ let title-rows = cn-rows + en-rows 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 = () if number != none { metadata.push(("编号", number)) } if author != none { @@ -177,7 +228,7 @@ if value != none { metadata.push((str(key), value)) } } 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 = () for (label, value) in metadata { @@ -191,7 +242,9 @@ )[#value]) } 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( columns: (auto, 1fr), column-gutter: 0.6em, @@ -205,11 +258,7 @@ // 左侧笔画与右侧笔画一样保持固定高度,不再随标题行数拉伸。 // 标志在第七格独立收尾;下方长条依据文档信息的实际高度紧凑起笔。 tri(0, 6, "tr", sky) - let strip-y = if metadata.len() > 0 { - info-y + info-height + 0.18 * unit - } else { - 7 * unit - } + let strip-y = part-end-y + 0.18 * unit let strip-height = 29.7cm - strip-y place(top + left, dy: strip-y, polygon( fill: sky, stroke: none, @@ -240,17 +289,23 @@ )[signed] let signed-size = measure(signed-label) place(top + left, - dx: unit + signature-line-length - signed-size.width, + dx: unit, dy: meta-y + apex-y - signed-size.height - 0.04 * unit, 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)