Skip to content

Commit 1ab1fc8

Browse files
Merge branch 'main' into cleveref
2 parents 7d0d96a + bfdfc09 commit 1ab1fc8

34 files changed

+1485
-915
lines changed

.explcheckrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[defaults]
2+
ignored_issues = [
3+
# TODO: Improve styles after *.dtx is directly supported. https://github.com/Witiko/expltools/issues/20
4+
"S103", # line too long
5+
"S204", # missing stylistic whitespaces
6+
]

.github/tl_packages

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# TeX Live packages
2+
#
3+
# 注释 indirect 表示模板未直接使用,可能是被某个包依赖而未声明。
4+
15
# ----- 1. 编译基础中文文档需要 -----
26

37
scheme-minimal
@@ -20,13 +24,14 @@ biblatex-gb7714-2015
2024
# ----- 2. 编译 templates/* 需要 -----
2125

2226
# collection-latexextra
27+
datetime2
2328
enumitem
2429
fmtcount
2530
multirow
31+
mwe # for `example-image*` files
2632
titlesec
2733
xint # indirect
2834
xstring # indirect
29-
mwe # for `example-image*` files
3035

3136
# collection-latexrecommended
3237
booktabs
@@ -74,5 +79,8 @@ relsize
7479
was # for upgreek
7580
wrapfig
7681

82+
# collection-fontsextra
83+
doulossil # for https://www.internationalphoneticassociation.org/content/ipa-fonts
84+
7785
# Not included in any collection
7886
fancyvrb # indirect

.github/tl_packages_compat

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# 兼容旧版 TeX Live 需补充指定的包
2+
#
3+
# 这些包新版 TeX Live 可能也需安装,但模板只是间接使用,无需单独指定。
4+
5+
# ----- 2. 编译 templates/* 需要 -----
6+
7+
# Not included in any collection
8+
tracklang # indirect,因 datetime2——确定 2021 必需、2022 无需

.github/workflows/release.yml

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,36 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v4
15-
- uses: xu-cheng/texlive-action@v2
15+
- uses: teatimeguest/setup-texlive-action@v3
1616
with:
17-
scheme: full
18-
run: |
19-
apk add make msttcorefonts-installer fontconfig
20-
update-ms-fonts
21-
fc-cache -f
22-
make doc
23-
make handbooks
17+
version: 2024
18+
package-file: |
19+
.github/tl_packages
20+
- uses: taiki-e/install-action@v2
21+
with:
22+
tool: fd-find
23+
24+
- name: Restore Microsoft fonts cache
25+
id: microsoft-fonts
26+
uses: actions/cache@v4
27+
with:
28+
path: /usr/share/fonts/truetype/msttcorefonts
29+
key: microsoft-fonts
30+
- name: Install Microsoft fonts
31+
if: steps.microsoft-fonts.outputs.cache-hit != 'true'
32+
run: |
33+
echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | sudo debconf-set-selections
34+
sudo apt install ttf-mscorefonts-installer
35+
fc-cache --force
36+
37+
- name: Setup TeX Live fonts
38+
run: |
39+
mkdir -p ~/.fonts
40+
ln -s $(kpsewhich -var-value=TEXMFDIST)/fonts/ ~/.fonts/texmf-dist-fonts
41+
fc-cache
42+
43+
- run: make doc handbooks
44+
2445
- name: Upload bithesis.pdf for later usage.
2546
uses: actions/upload-artifact@v4
2647
with:
@@ -195,6 +216,10 @@ jobs:
195216
uses: actions/download-artifact@v4
196217
with:
197218
name: bithesis
219+
- name: Download handbooks
220+
uses: actions/download-artifact@v4
221+
with:
222+
name: handbooks
198223
- run: make pkg-only
199224
- name: Determine version
200225
id: version

.github/workflows/test.yaml

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,57 @@ on:
99
- main
1010

1111
jobs:
12-
build_latex:
12+
build-latex:
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
tl-version: [2021, 2022, 2023, 2024, 2025]
17+
fail-fast: false
1418
steps:
1519
- uses: actions/checkout@v4
1620
- uses: teatimeguest/setup-texlive-action@v3
1721
with:
22+
version: ${{ matrix.tl-version }}
1823
package-file: |
1924
.github/tl_packages
20-
- name: Setup fonts
25+
${{ matrix.tl-version < 2024 && '.github/tl_packages_compat' || '' }}
26+
- uses: taiki-e/install-action@v2
27+
with:
28+
tool: fd-find, ripgrep
29+
30+
- name: Restore Microsoft fonts cache
31+
id: microsoft-fonts
32+
uses: actions/cache@v4
33+
with:
34+
path: /usr/share/fonts/truetype/msttcorefonts
35+
key: microsoft-fonts
36+
- name: Install Microsoft fonts
37+
if: steps.microsoft-fonts.outputs.cache-hit != 'true'
2138
run: |
22-
sudo apt update
23-
sudo apt install make fontconfig
2439
echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | sudo debconf-set-selections
2540
sudo apt install ttf-mscorefonts-installer
26-
fc-cache -f
27-
- run: make test
41+
fc-cache --force
42+
43+
- name: Setup TeX Live fonts
44+
run: |
45+
mkdir -p ~/.fonts
46+
ln -s $(kpsewhich -var-value=TEXMFDIST)/fonts/ ~/.fonts/texmf-dist-fonts
47+
fc-cache
48+
49+
- run: ${{ matrix.tl-version < 2024 && 'TEST_SKIP_DOC="1"' || '' }} make test
50+
51+
check-latex:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
- uses: teatimeguest/setup-texlive-action@v3
56+
with:
57+
packages: |
58+
scheme-minimal
59+
xetex
60+
expltools
61+
- run: make cls
62+
- run: make check
2863

2964
check_typos:
3065
runs-on: ubuntu-latest
@@ -51,3 +86,15 @@ jobs:
5186
--no-progress
5287
--config .github/lychee.toml
5388
.
89+
90+
check-python:
91+
runs-on: ubuntu-latest
92+
steps:
93+
- uses: actions/checkout@v4
94+
- run: pipx install ruff
95+
- name: Ruff check
96+
run: |
97+
cd scripts && ruff check --output-format=github .
98+
- name: Ruff format
99+
run: |
100+
cd scripts && ruff format --check --diff

.gitignore

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ bithesis
288288
# Generated by `make copy`
289289
/templates/*/latexmkrc
290290
/tests/*/latexmkrc
291+
/tests/**/*.jpg
291292
/handbook/latexmkrc
292293

293294
# Generated by `make assets/faq.tex`
@@ -297,11 +298,7 @@ bithesis
297298
overleaf
298299
*.zip
299300

300-
scripts/*
301-
!scripts/*.sh
302-
!scripts/*.zsh
303-
!scripts/*.ps1
304-
!scripts/*.py
301+
/scripts/cache/
305302

306303
.DS_Store
307304

CHANGELOG.md

Lines changed: 86 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,87 @@ Acronyms:
1111

1212
**Bolded text highlights its importance.**
1313

14+
## [3.8.4] - 2025-04-18
15+
16+
### <!-- 0 -->🚀 Features
17+
18+
- 支持在PDF书签中隐去封面、书脊、题名页、声明,如`\MakeCover[bookmarked = false]` ([186e09a](https://github.com/BITNP/BIThesis/commit/186e09a741f2e4e8d712afc7db4dd59627554100)) by @YDX-2147483647
19+
- 支持用`title`修改`conclusion`环境内的标题 ([0eb90b6](https://github.com/BITNP/BIThesis/commit/0eb90b699246895cbb5a9b25dc00b27d6d33a92e)) by @YDX-2147483647
20+
21+
### <!-- 1 -->🐛 Bug Fixes
22+
23+
- `cover/delimiter`较宽时,封面信息整体不能向左偏 ([fd8efd2](https://github.com/BITNP/BIThesis/commit/fd8efd2f68a7ff95ea6fa93bc82938be7fb99f84)) by @YDX-2147483647
24+
- 封面信息整体居中时,不应计入隐藏项 ([8c17bf6](https://github.com/BITNP/BIThesis/commit/8c17bf666fd47f891eec4fb8db3446f7fe8c374e)) by @YDX-2147483647 in [#614](https://github.com/BITNP/BIThesis/pull/614)
25+
- *(GT)* 封皮、题名页标题的行距不应过小 ([0814adb](https://github.com/BITNP/BIThesis/commit/0814adb3117ddf3a1b078a753fc262e31477b1cf)) by @YDX-2147483647 in [#618](https://github.com/BITNP/BIThesis/pull/618)
26+
27+
### <!-- 3 -->📚 Documentation
28+
29+
- Fix IPA font ([c6b883a](https://github.com/BITNP/BIThesis/commit/c6b883a98412a553c5a47cf4d8b0a2cf5e110aa4)) by @YDX-2147483647
30+
- `make regression-test` ([e999609](https://github.com/BITNP/BIThesis/commit/e999609c93848e0760eb539ab85c0ad4a267e1ac)) by @YDX-2147483647
31+
- 改进 DocStrip 里的文档 ([05bc34f](https://github.com/BITNP/BIThesis/commit/05bc34f7f2a2acb502c48d58b3bf869f69301514)) by @YDX-2147483647
32+
- *(handbook)* 更新快速使用指南开头 ([e572618](https://github.com/BITNP/BIThesis/commit/e5726187b225d406c8b87fac89698866e635a38b)) by @YDX-2147483647
33+
- *(handbook)* Fix warnings and reformat ([390191c](https://github.com/BITNP/BIThesis/commit/390191cbd79121054f2f16e5db6333506d27ca6c)) by @YDX-2147483647 in [#627](https://github.com/BITNP/BIThesis/pull/627)
34+
35+
### <!-- 5 -->🎨 Styling
36+
37+
- Fix E300 unexpected function call argument ([42eb640](https://github.com/BITNP/BIThesis/commit/42eb640cbe498128383ecb0b01b732142ddb1e74)) by @YDX-2147483647
38+
- Fix S205 malformed function name ([23db46c](https://github.com/BITNP/BIThesis/commit/23db46c58cf6555f7d3871146fcea0dc07c7b8b3)) by @YDX-2147483647
39+
- Fix W302 unbraced n-type function call argument ([55f8b49](https://github.com/BITNP/BIThesis/commit/55f8b492df620480b32567a720b928d713d933ef)) by @YDX-2147483647
40+
41+
### <!-- 6 -->🧪 Testing
42+
43+
- Collect more errors ([d6a274b](https://github.com/BITNP/BIThesis/commit/d6a274bc09ffee905301425633a1af7cc0cd9a9f)) by @YDX-2147483647
44+
- 允许手动准备回归测试比较对象 ([39ee2d8](https://github.com/BITNP/BIThesis/commit/39ee2d8ecd6ab682dd4b097823597f7cba0b6fbf)) by @YDX-2147483647
45+
- 支持限制线程数 ([c97d797](https://github.com/BITNP/BIThesis/commit/c97d7975e8a7fc52ad5af64c82e84e22458437b2)) by @YDX-2147483647 in [#612](https://github.com/BITNP/BIThesis/pull/612)
46+
- `make regression-test` needs `*.cls` ([3ac2789](https://github.com/BITNP/BIThesis/commit/3ac278927c621274ae05a55525b5105ed693725e)) by @YDX-2147483647 in [#624](https://github.com/BITNP/BIThesis/pull/624)
47+
48+
### <!-- 7 -->⚙️ Miscellaneous Tasks
49+
50+
- Fix font cache ([92da744](https://github.com/BITNP/BIThesis/commit/92da7441ea3a4e647744e08f273ad5f056589fa7)) by @YDX-2147483647 in [#620](https://github.com/BITNP/BIThesis/pull/620)
51+
- 改写 zsh 为`scripts/regression_test.py` ([fbd02a1](https://github.com/BITNP/BIThesis/commit/fbd02a1711663f114a5397c287c6afa101dc374b)) by @YDX-2147483647
52+
- 并行化`scripts/regression_test.py` ([94a0b94](https://github.com/BITNP/BIThesis/commit/94a0b94c9d6c3b60e3c5e6bd8b3928cd40a7919a)) by @YDX-2147483647
53+
- 允许`make regression_test`提前中止 ([bb44f06](https://github.com/BITNP/BIThesis/commit/bb44f069d5fcaac9549681d77dc3b6cb1390dd6f)) by @YDX-2147483647 in [#619](https://github.com/BITNP/BIThesis/pull/619)
54+
- Check expl3 ([ecf90e2](https://github.com/BITNP/BIThesis/commit/ecf90e2929d1214c1dd93bd6adeab36f1d7a3220)) by @YDX-2147483647
55+
- `update_version.py` ([f3b7cc0](https://github.com/BITNP/BIThesis/commit/f3b7cc01b1d5908807f7fff413b3f8d163c5e0fb)) by @YDX-2147483647
56+
- 上传快速使用指南到 CTAN ([9a6b27f](https://github.com/BITNP/BIThesis/commit/9a6b27fd154c1fee17e351bb535ad6129cfdfe8c)) by @YDX-2147483647
57+
- Update version to 3.8.4 ([ac63574](https://github.com/BITNP/BIThesis/commit/ac635744e937baafc19db3b881974b17fdd09e9e)) by @YDX-2147483647
58+
59+
## [3.8.3] - 2025-04-08
60+
61+
### <!-- 0 -->🚀 Features
62+
63+
- *(GT)* 适应2025年三月末新研究生模板 ([03e05f9](https://github.com/BITNP/BIThesis/commit/03e05f94b3f7b433714b99e9ef64cd5eb08edefc)) by @YDX-2147483647 in [#605](https://github.com/BITNP/BIThesis/pull/605)
64+
65+
### <!-- 1 -->🐛 Bug Fixes
66+
67+
- *(GT)* 参照Word模板微调摘要、正文、结论等标题上下的间距,并展示省略号写法 ([3433a53](https://github.com/BITNP/BIThesis/commit/3433a539def1ed7ee85269a1d009047d3d73e411)) by @YDX-2147483647 in [#606](https://github.com/BITNP/BIThesis/pull/606)
68+
- 调大`cover/autoWidthPadding`时,题名页信息应该整体居中 ([3c5e397](https://github.com/BITNP/BIThesis/commit/3c5e39729497701ec52d70691058bffe99cd02d6)) by @YDX-2147483647 in [#611](https://github.com/BITNP/BIThesis/pull/611)
69+
70+
### <!-- 3 -->📚 Documentation
71+
72+
- 2023 → 2025 ([c82d688](https://github.com/BITNP/BIThesis/commit/c82d688249a521f01e011d10950b08d655d4e39c)) by @Aaron-Gp in [#599](https://github.com/BITNP/BIThesis/pull/599)
73+
- 更正文档类组成 ([af20679](https://github.com/BITNP/BIThesis/commit/af20679a1a3548e1f378ab7d1be783edf9733ebf)) by @YDX-2147483647
74+
- Fix 24 warnings ([e7ed4f8](https://github.com/BITNP/BIThesis/commit/e7ed4f8e23eddcca0799e403333623e93bc474a6)) by @YDX-2147483647 in [#600](https://github.com/BITNP/BIThesis/pull/600)
75+
- Update README to v3.8.3-alpha-1 ([ab73edb](https://github.com/BITNP/BIThesis/commit/ab73edbb7de5727a3132d9cfc1b3cbc8ef90a84b)) by @YDX-2147483647 in [#609](https://github.com/BITNP/BIThesis/pull/609)
76+
- *(handbook)* Clean obsolete codes, add manual `\clearpage` ([7200ebd](https://github.com/BITNP/BIThesis/commit/7200ebd3b54a0dbf9b9a96abae9835def28a73d8)) by @YDX-2147483647
77+
78+
### <!-- 6 -->🧪 Testing
79+
80+
- Refactor `make test` with `test.py` for easier debugging ([6f8a9f7](https://github.com/BITNP/BIThesis/commit/6f8a9f7bd2a6f9b38e10f34362cf3b4751184500)) by @YDX-2147483647
81+
- Move `make doc` into `test.py ([ae28957](https://github.com/BITNP/BIThesis/commit/ae2895755557b70b11a0e7254ff778724c59eb4d)) by @YDX-2147483647
82+
- Record durations ([c4bb27b](https://github.com/BITNP/BIThesis/commit/c4bb27bc27baa3f60126f2627891be296bdb2a0d)) by @YDX-2147483647
83+
- Force latexmk to process document fully ([c76efbb](https://github.com/BITNP/BIThesis/commit/c76efbba79ccf6df13be376e35682a17cfcbc1b5)) by @YDX-2147483647 in [#607](https://github.com/BITNP/BIThesis/pull/607)
84+
- Collect key errors from log files ([6e23060](https://github.com/BITNP/BIThesis/commit/6e230608e35a6942bd2b9c01dec222c9645ce816)) by @YDX-2147483647
85+
86+
### <!-- 7 -->⚙️ Miscellaneous Tasks
87+
88+
- Switch from xu-cheng/texlive-action to teatimeguest/setup-texlive-action ([08614f9](https://github.com/BITNP/BIThesis/commit/08614f9b906499c7f6f6ff8eeb9b6aac6f06e472)) by @YDX-2147483647
89+
- Minimize packages ([5685220](https://github.com/BITNP/BIThesis/commit/5685220a0b40c3ba3367239b35bdb1217f0e2b0e)) by @YDX-2147483647
90+
- Fix packages ([4ef7ce0](https://github.com/BITNP/BIThesis/commit/4ef7ce06aef9e9a8d01441a6553e4f566cbc62e3)) by @YDX-2147483647 in [#610](https://github.com/BITNP/BIThesis/pull/610)
91+
- Update version to 3.8.3 ([dfb29fe](https://github.com/BITNP/BIThesis/commit/dfb29fec28ff90ce0f4769dc2604ad79f1153d3e)) by @YDX-2147483647
92+
93+
## New Contributors
94+
* @Aaron-Gp made their first contribution in [#599](https://github.com/BITNP/BIThesis/pull/599)
1495
## [3.8.2] - 2025-03-25
1596

1697
### <!-- 1 -->🐛 Bug Fixes
@@ -213,7 +294,7 @@ Acronyms:
213294

214295
- Update version to 3.7.6 ([c5a624f](https://github.com/BITNP/BIThesis/commit/c5a624f3f8ecf453030c5437dcd1f47806b6129b)) by @fky2015
215296

216-
## [3.7.5] - 2024-04-24
297+
## [3.7.5] - 2024-04-25
217298

218299
### <!-- 1 -->🐛 Bug Fixes
219300

@@ -256,7 +337,7 @@ Acronyms:
256337
- Add star history in readme ([97195c0](https://github.com/BITNP/BIThesis/commit/97195c0576005a3bb19075256ab84d9a3b75df05)) by @fky2015 in [#458](https://github.com/BITNP/BIThesis/pull/458)
257338
- Update version to 3.7.4 ([8f6f509](https://github.com/BITNP/BIThesis/commit/8f6f5095708170362a14f3017dc7702b2b5dd9f5)) by @fky2015 in [#460](https://github.com/BITNP/BIThesis/pull/460)
258339

259-
## [3.7.3] - 2024-04-11
340+
## [3.7.3] - 2024-04-12
260341

261342
### <!-- 0 -->🚀 Features
262343

@@ -359,7 +440,7 @@ Acronyms:
359440

360441
## New Contributors
361442
* @Manpopp made their first contribution
362-
## [3.6.2] - 2024-02-26
443+
## [3.6.2] - 2024-02-27
363444

364445
### <!-- 1 -->🐛 Bug Fixes
365446

@@ -407,7 +488,7 @@ Acronyms:
407488

408489
## New Contributors
409490
* @lsylusiyao made their first contribution in [#391](https://github.com/BITNP/BIThesis/pull/391)
410-
## [3.6.0] - 2023-10-01
491+
## [3.6.0] - 2023-10-02
411492

412493
### <!-- 0 -->🚀 Features
413494

@@ -1384,7 +1465,7 @@ Acronyms:
13841465

13851466
- *(all)* Modify chapter style ([0e1bf37](https://github.com/BITNP/BIThesis/commit/0e1bf37d521ffc959c2a11bee672085b80183ade)) by @Silverster98
13861467

1387-
## [0.0.1] - 2020-02-29
1468+
## [0.0.1] - 2020-03-01
13881469

13891470
### <!-- 0 -->🚀 Features
13901471

DEVELOPMENT.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
> [!TIP]
2323
>
24-
> Windows 开发者若运行 Makefile 遇到问题,请参考[后文](#Windows)
24+
> 运行 Makefile 需要[安装 fd](https://github.com/sharkdp/fd/#installation),通常下载可执行文件即可。此外 Windows 开发者若遇到问题,请参考[后文](#Windows)
2525
2626
### 修改 `templates/` 中某个模板
2727

@@ -97,12 +97,13 @@ Makefile 主要针对 Linux 和 macOS 开发者;Windows 开发者要确保至
9797
9898
运行 `make test` 将对所有的模板进行编译测试(同样被用于 GitHub Actions)。
9999
100-
运行 `make regression-test` 进行回归测试,该命令将比较目前已发布的最新版本和本地版本生成的 PDF 的差异。
100+
运行 `make regression-test` 进行回归测试,该命令将比较目前已发布的最新版本和本地版本生成的 PDF 的差异。更多使用方式见 `make regression-test args='--help'`。
101+
101102
使用前请确保已经安装下面这些依赖。
102103
103-
- [Zsh](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH)(POSIX)或 [PowerShell 7](https://learn.microsoft.com/zh-cn/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.3)(Windows
104-
- [diff-pdf](https://vslavik.github.io/diff-pdf/)
105-
- [jq](https://jqlang.github.io/jq/)(仅用 Zsh 时需要)
104+
- [uv](https://docs.astral.sh/uv/)(或自己管理 python 环境
105+
- [GitHub CLI](https://cli.github.com/)(或手动下载文件)
106+
- [vslavik/diff-pdf](https://vslavik.github.io/diff-pdf/) 或 [rubypdf/diffpdf](https://soft.rubypdf.com/software/diffpdf)
106107
107108
### 打包
108109

0 commit comments

Comments
 (0)