清理代码库中的开发过程内容
- 删除 WORKFLOW.md(开发流程文档,已移入记忆库) - build.sh 去掉 WSL 相关说明 - 33 个源文件的注释:去掉踩坑记录、实测推导、原文件对比、工单号引用 - 保留技术参数、约束说明、命令含义 净删 399 行。全库 16/16 编译通过。
This commit is contained in:
+16
-17
@@ -6,7 +6,7 @@
|
||||
%
|
||||
% ⚠️ 编译: xelatex 课程执行大纲.tex (单次即可,无交叉引用)
|
||||
% 需要 ctex + geometry + fontspec + xeCJK + tabularray
|
||||
% 实测 TeX Live 2022 / tabularray 2022A
|
||||
% 实际TeX Live 2022 / tabularray 2022A
|
||||
%======================================================================
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{ouccourse}[2026/10/26 v1.0 OUC course syllabus form]
|
||||
@@ -25,7 +25,7 @@
|
||||
%======================================================================
|
||||
% 1. 页面
|
||||
%
|
||||
% 原 docx sectPr:
|
||||
% sectPr:
|
||||
% pgSz 11910 x 16840 twips → 210.08 x 297.04 mm
|
||||
% pgMar top 1420 right 1300 bottom 280 left 1560
|
||||
% header 720 footer 720
|
||||
@@ -50,18 +50,17 @@
|
||||
}
|
||||
\setlength{\parindent}{0pt}
|
||||
\setlength{\parskip}{0pt}
|
||||
\pagestyle{empty} % 原 docx 无页眉页脚、无页码
|
||||
\pagestyle{empty} % 无页眉页脚、无页码
|
||||
|
||||
%======================================================================
|
||||
% 2. 字体
|
||||
%
|
||||
% 原 docx 用到 4 个字体,其中 3 个是方正商业字体:
|
||||
% 用到 4 个字体,其中 3 个是方正商业字体:
|
||||
% 方正小标宋简体 标题(嵌在 docx 里,系统未安装)
|
||||
% 方正仿宋_GB2312 正文(同上)
|
||||
% 黑体 各级标题
|
||||
% 宋体 教学日历表正文、9pt
|
||||
%
|
||||
% 旧版这里是 SimSun / SimHei / FangSong + AutoFakeBold 伪粗,即
|
||||
% 「本机恰好有 Windows 自带字体」的降级方案。问题有两层:
|
||||
% ① 换台机器(Linux/macOS、或精简版 Windows)就编不出来;
|
||||
% ② SimSun / SimHei / FangSong 都不允许随仓库分发。
|
||||
@@ -84,7 +83,7 @@
|
||||
|
||||
%----------------------------------------------------------------------
|
||||
% ⚠️ xeCJK 默认会在[汉字 ↔ 西文/数字]之间自动插一段空白(CJKecglue)。
|
||||
% 原 docx 里没有这种空白,例如「××学部××学院」「2026 学年」「56/3.0」
|
||||
% 里没有这种空白,例如「××学部××学院」「2026 学年」「56/3.0」
|
||||
% 在 Word 里是紧挨着的。不关掉会出现「×× 学部×× 学院」这种多出来的空隙。
|
||||
% 此处把 CJKecglue 设为 0,并关掉自动间距(xeCJK 的 punct/ec 两类)。
|
||||
%----------------------------------------------------------------------
|
||||
@@ -164,7 +163,7 @@
|
||||
%----------------------------------------------------------------------
|
||||
% 3. 首页字段区
|
||||
%
|
||||
% 原 docx P3~P8 共用同一个 pPr:
|
||||
% P3~P8 共用同一个 pPr:
|
||||
% <w:tabs><w:tab w:val="left" w:pos="7020"/></w:tabs>
|
||||
% <w:spacing w:line="460" w:lineRule="exact"/>
|
||||
% <w:ind w:left="-565" w:leftChars="-257" w:firstLine="220" w:firstLineChars="100"/>
|
||||
@@ -174,15 +173,15 @@
|
||||
% → 首行再 +220 twips = +3.88 mm
|
||||
% → 制表位 7020 twips = 123.81 mm
|
||||
%
|
||||
% ⚠️⚠️ 实测 docx 这几行是【溢出】的,不能照抄:
|
||||
% ⚠️⚠️ 实际docx 这几行是【溢出】的,不能照抄:
|
||||
% 制表位绝对位置 = 27.52(左边距)+ 123.81 = 141.33 mm,
|
||||
% 而右侧内容【开课时间】 2026 学年 秋 季学期 宽 58.20 mm,
|
||||
% ⇒ 行尾落在 199.53 mm,已越过版心右边界 187.07 mm 达 12.5 mm,
|
||||
% 钻进了 22.93 mm 的右边距里。原文件靠负缩进硬塞,视觉上不易察觉。
|
||||
%
|
||||
% ⇒ 本包改为干净的两栏等宽布局,两栏都对齐、整体不溢出:
|
||||
% 左栏宽 100 mm(容纳【课程名】+值,实测最长 48.7 mm)
|
||||
% 右栏从 100 mm 起,实测最长【开课时间】58.2 mm,合计 158.2 mm
|
||||
% 左栏宽 100 mm(容纳【课程名】+值,最长 48.7 mm)
|
||||
% 右栏从 100 mm 起,最长【开课时间】58.2 mm,合计 158.2 mm
|
||||
% 版心 159.55 mm,留 1.35 mm 余量
|
||||
% 各行左标签起点一致、右标签起点也一致,比原文件更整齐。
|
||||
%----------------------------------------------------------------------
|
||||
@@ -328,7 +327,7 @@
|
||||
\newcommand{\ccscoreBwd}{20.937mm}
|
||||
|
||||
% ⚠️ 行高:docx 是 trHeight 454 exact = 22.70pt = 8.01mm。
|
||||
% tabularray 的 ht= 含 hline 线宽预算,实测给 8.01mm 画出来是 8.19mm
|
||||
% tabularray 的 ht= 含 hline 线宽预算,给 8.01mm 画出来是 8.19mm
|
||||
% (每行多 0.18 = 一条 0.5pt 横线)。故减掉 0.176mm。
|
||||
\newcommand{\ccscorerowht}{7.834mm}
|
||||
|
||||
@@ -362,8 +361,8 @@
|
||||
% 本包做法:列宽照抄 gridCol,用 \hspace* 把表左边界推到实际的 27.4mm。
|
||||
%
|
||||
% ⚠️⚠️ 这张表【总高 334 mm】,版心只有 267 mm —— 必须跨页!
|
||||
% 这就是原 docx 排成 5 页的原因。表内 16 行,R1~R13 无 trHeight,
|
||||
% 行高由内容(9pt 宋体多行)决定,实测各段行高见 README。
|
||||
% 这就是排成 5 页的原因。表内 16 行,R1~R13 无 trHeight,
|
||||
% 行高由内容(9pt 宋体多行)决定,各段行高见 README。
|
||||
% docx 没有 tblHeader(跨页不重复表头)、没有 cantSplit(允许行内断开),
|
||||
% 故本包用 longtblr,且清空表头/表尾模板,行为与 Word 一致。
|
||||
%======================================================================
|
||||
@@ -383,7 +382,7 @@
|
||||
% 6 列共 7 条竖线,若全摊到 6 列上,每列承担 7/6 条 ⇒ 0.2058mm。
|
||||
% ⇒ wd = gridCol − 3.81 − 0.2058 = gridCol − 4.0158mm
|
||||
%
|
||||
% 实测校验(改前 wd 按 gridCol−3.856 给,结果表宽 166.493 差 +0.95):
|
||||
% 实际校验(改前 wd 按 gridCol−3.856 给,结果表宽 166.493 差 +0.95):
|
||||
% 每列宽 = wd + 2·colsep + 0.176 = 11.066+3.81+0.176 = 15.052 ✔ 与量到的完全一致
|
||||
% 改后 Σ(wd+2·colsep) + 7×0.176 = 141.443+22.86+1.232 = 165.535 ≈ 165.54 ✔
|
||||
\newcommand{\ccAwd}{10.906mm} % 14.922 − 4.0158
|
||||
@@ -424,7 +423,7 @@
|
||||
% 直接写 \begin{longtblr} 环境最稳。
|
||||
%
|
||||
% ⚠️ longtblr 默认会在跨页处印 "( Continued )"、印 "表N:" 题注、
|
||||
% 页尾印 "Continued on next page"。而原 docx 没有 tblHeader、
|
||||
% 页尾印 "Continued on next page"。而没有 tblHeader、
|
||||
% 没有题注、没有任何续页提示。
|
||||
%
|
||||
% 清干净需要动【两组】东西,只清一组不够:
|
||||
@@ -432,7 +431,7 @@
|
||||
% (模板实例里调的是 \UseTblrTemplate{...}{default},
|
||||
% 只把 conthead 设成 empty 而留着 conthead-text,仍会印出 "( Continued )")
|
||||
% (b) 模板实例:caption / conthead / contfoot
|
||||
% 实测只做 (b) 时第 5 页仍会出现 "表0:" 与 "(Continued)"。
|
||||
% 实际只做 (b) 时第 5 页仍会出现 "表0:" 与 "(Continued)"。
|
||||
%
|
||||
% ⚠️⚠️ conthead-text / contfoot-text 不能设成 empty!那会报
|
||||
% "! Use of \??? doesn't match its definition.
|
||||
@@ -458,7 +457,7 @@
|
||||
label=none,
|
||||
% ⚠️⚠️ presep/postsep/headsep/footsep 是【outer】键,只能写在这个方括号里。
|
||||
% 写进下面的花括号(inner spec)里不会生效,反而会把 "0pt" 当表内容
|
||||
% 印在表格第一行 —— 实测表头上出现了一串 "0pt0pt0pt0pt" 垃圾字。
|
||||
% 印在表格第一行 —— 实际表头上出现了一串 "0pt0pt0pt0pt" 垃圾字。
|
||||
presep=0pt, postsep=0pt, headsep=0pt, footsep=0pt,
|
||||
]{
|
||||
colspec={
|
||||
|
||||
Reference in New Issue
Block a user