简历排版修正:项目经验整块右移、西文换 Cochineal、课程执行大纲漏网 × #12

一、项目经验整块右移(简历/awesome-source-cv.cls)
  \rightcolumnlength 算早了:geometry 的 1.5cm 边距要到导言区结束才生效,
  cls 里那句 \setlength 读到 article 默认 \textwidth=345pt,算出 249.87pt,
  比应有的 417.02pt 少 167.15pt。longtable 把窄表居中排,整块右移 83.6pt。
  修法:计算挪进 \AtBeginDocument 并减去 | 竖线的 \arrayrulewidth;
  R 列由 >{\hfill}m{2.5cm} 改为 >{\raggedright\arraybackslash}p{2.5cm}。
  日期左边缘 145.1 -> 48.5pt,与其余章节严格对齐。
  这类错误零 error 零 warning,只能量 PDF 坐标才能发现。

二、西文换 Cochineal(fonts/cochineal/ + fonts.tex + 简历 cls)
  中文思源宋体配 Termes 时西文笔画偏细,中英混排会「陷进去」。
  Cochineal 宽 225.42pt vs Termes 229.68pt,只窄 1.9%,断行位置基本不动;
  Pagella/XCharter 宽 7~11%,会把全库断行推着变,故不选。
  字体 920KB 入 fonts/cochineal/(SIL OFL 1.1,附 OFL.txt),
  fonts.tex 新增 \oucUseCochineal 开关,只简历调用,其余 10 个模板不受影响。

三、换字体后暴露的真实缺陷
  西文窄 1.9% 让断点整体前移,ICIEA 那条论文冲出 88.49pt(文字顶到纸边)。
  根因是中文紧跟英文的位置不是断开点,整串被当长单词。
  加 \emergencystretch=3em 解决。

四、课程执行大纲漏网占位符(ouccourse.sty)
  ××学部××学院 硬编码在 \ccschool 里,#11 只扫了 .tex 没扫 .sty 所以漏了。
  拆成 \ccdepartment / \cccollege 两个名称宏,默认「信息科学与工程学部 /
  计算机科学与技术学院」。重编后全文 × 归零。

「代码库 PDF 没更新」经核实不成立:本地/远程 HEAD 均为 8984b93,
从服务器下载 8 个 PDF 逐字节比对全部一致,简历.pdf 3 页 0 个 ×。

验证:简历 3 页 0 error/0 Overfull/0 Underfull;全库 12 项编译回归与基线一致。
This commit is contained in:
2026-10-27 13:13:54 +08:00
parent 8984b93ee7
commit 69da5b41a6
15 changed files with 455 additions and 27 deletions
+19
View File
@@ -62,6 +62,23 @@ CFF 层的 fontNames / FamilyName / FullName 与 name 表,并在 name 表
本仓库为原版直接分发,未修改。
--------------------------------------------------------------------------------
四之二、Cochineal-*.otf
--------------------------------------------------------------------------------
上游字体:Cochineal
设计者:Michael Sharpe(据 Sebastian Kosch 的 Crimson 衍化而来)
授权:SIL Open Font License 1.1
授权原文:随本目录分发于 cochineal/OFL.txt
Copyright (c) 2010-2014 Sebastian Kosch, with Reserved Font Name Crimson.
Copyright (c) 2016--2021, Michael Sharpe (msharpe@ucsd.edu),
with Reserved Font Name Cochineal.
本仓库为原版直接分发,未修改、未改名。
用途:仅 简历/ 模板的西文(由 fonts.tex 的 \oucUseCochineal 切换),
其余 10 个模板仍用 TeX Gyre Termes。
--------------------------------------------------------------------------------
五、HarmonyOS_Sans_*.ttf / HarmonyOS_Sans_SC_*.ttf
--------------------------------------------------------------------------------
@@ -92,6 +109,8 @@ CFF 层的 fontNames / FamilyName / FullName 与 name 表,并在 name 表
[x] 所有 OFL 字体均保留授权全文(name 表 13/14 号),符合 OFL 1.1 §1。
[x] 未使用上游作者名义作任何背书暗示。
[x] TeX Gyre Termes 的 GFL 允许随文档分发。
[x] Cochineal 为 SIL OFL 1.1,允许随仓库再分发;授权全文已随字体放入
cochineal/OFL.txt,并保留在 name 表 13/14 号。
[x] HarmonyOS Sans 为华为官方允许免费商用。
如对本目录内任何字体的授权有疑问,请以上游地址的授权原文为准。
+45 -2
View File
@@ -12,11 +12,12 @@ fonts/
├── ouc-kai/ OUC Kai 楷体 2 个,7.0 MB
├── zhuque-fangsong/ Zhuque Fangsong 仿宋 1 个,8.4 MB
├── tex-gyre-termes/ TeX Gyre Termes 西文 Times 等价 4 个,550 KB
├── cochineal/ Cochineal 西文 Minion 风格 4 个,920 KB
├── harmonyos-sans/ HarmonyOS Sans 鸿蒙(中英各一档) 6 个,16 MB
└── fontawesome/ FontAwesome 简历模板的图标符号 1 个,130 KB
```
合计约 **49 MB**(改造前是 141 MB:幻灯片 49 MB + 科技报告 92 MB 各自带一份,
合计约 **50 MB**(改造前是 141 MB:幻灯片 49 MB + 科技报告 92 MB 各自带一份,
外加两套重复的字体。现在全库只有这一份,省掉 65%)。
---
@@ -89,6 +90,42 @@ fonts/
用它是为了保证中文模板里原有的西文断行、表格列宽、行内公式对齐不漂移。
实测同一段英文,Termes 与 Times New Roman 的逐词宽度差在 0.03pt 量级。
**全库默认西文字体就是 Termes**(`fonts.tex` 的 `\setmainfont`)。除简历外的
10 个模板都用它。
### 3b. Cochineal —— 西文 Minion 风格(简历专用)
| | |
|---|---|
| 上游 | Cochineal(Michael Sharpe,据 Minion 设计) |
| 授权 | SIL OFL 1.1,可随仓库分发(`cochineal/OFL.txt`) |
| 特性 | 笔画比 Times 饱满,与思源宋体灰度更接近 |
**为什么加这一款**:中文用思源宋体(中等粗细),Termes 是 Times 的度量兼容替代,
笔画偏细偏紧,中英混排时西文那一段视觉上会「陷进去」。Cochineal 笔画更饱满。
**为什么只有简历用**:它的宽度与 Termes 只差 **1.9%**(225.42 vs 229.68pt @10pt),
断行位置基本不动,所以换过去风险最小。其余候选宽 2.2%~10.8%,会把全库的表格列宽
和断行推着变(数据见 `字体` 一节末尾的对照表)。
⚠️ **不是全局生效**。`fonts.tex` 里只做了声明:
```latex
\oucUseCochineal % 调它才切;不调就还是 Termes
```
目前只有 `简历/awesome-source-cv.cls` 在 `\AtBeginDocument` 里调用。
**度量对照**(10pt 下同一句英文的排印宽度,供将来换字体时参考):
| 字体 | 样句宽 | 相对 Termes | x 高 | cap 高 |
|---|---|---|---|---|
| Termes | 229.68pt | 100.0% | 0.450 | 0.662 |
| **Cochineal** | **225.42pt** | **98.1%** | 0.433 | 0.649 |
| Libertinus Serif | 234.62pt | 102.2% | 0.433 | 0.649 |
| XCharter | 246.69pt | 107.4% | 0.481 | 0.671 |
| TeX Gyre Pagella | 254.40pt | 110.8% | 0.472 | 0.695 |
### 4. HarmonyOS Sans —— 鸿蒙字体
| | |
@@ -189,8 +226,9 @@ fonts/
ouc-kai 7.0 MB
zhuque-fangsong 8.4 MB
tex-gyre-termes 0.55 MB
cochineal 0.92 MB
harmonyos-sans 16.4 MB
合计 49 MB (省 65%)
合计 50 MB (省 65%)
```
---
@@ -204,6 +242,7 @@ fonts/
| `劳务发放说明表/` | OUC Serif | OUC Sans | TeX Gyre Termes |
| `课程执行大纲/` | OUC Serif | OUC Sans | TeX Gyre Termes |
| `试卷/` | OUC Serif / OUC Kai | OUC Sans | TeX Gyre Termes |
| `简历/` | OUC Serif / OUC Kai | OUC Serif Bold | **Cochineal** |
| `幻灯片/` | HarmonyOS Sans SC | HarmonyOS Sans SC Bold | HarmonyOS Sans |
| `科技报告/` | OUC Serif | OUC Serif Bold / OUC Kai | HarmonyOS Sans |
@@ -276,6 +315,10 @@ print({f[3] for p in d for f in p.get_fonts()})
| `tex-gyre-termes/texgyretermes-bold.otf` | TeX Gyre Termes | 1053 | 139 KB |
| `tex-gyre-termes/texgyretermes-italic.otf` | TeX Gyre Termes | 1053 | 141 KB |
| `tex-gyre-termes/texgyretermes-bolditalic.otf` | TeX Gyre Termes | 1053 | 144 KB |
| `cochineal/Cochineal-Roman.otf` | Cochineal | 1237 | 227 KB |
| `cochineal/Cochineal-Bold.otf` | Cochineal | 1255 | 228 KB |
| `cochineal/Cochineal-Italic.otf` | Cochineal | 1186 | 228 KB |
| `cochineal/Cochineal-BoldItalic.otf` | Cochineal | 1198 | 219 KB |
| `harmonyos-sans/HarmonyOS_Sans_Regular.ttf` | HarmonyOS Sans | 874 | 147 KB |
| `harmonyos-sans/HarmonyOS_Sans_Bold.ttf` | HarmonyOS Sans | 874 | 146 KB |
| `harmonyos-sans/HarmonyOS_Sans_Regular_Italic.ttf` | HarmonyOS Sans | 807 | 141 KB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+96
View File
@@ -0,0 +1,96 @@
Copyright (c) 2010-2014 Sebastian Kosch, with Reserved Font Name Crimson.
Copyright (c) 2016--2021, Michael Sharpe (msharpe@ucsd.edu),
with Reserved Font Name Cochineal.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.