Skip to content

Commit f14ec56

Browse files
feat(UTE): 支持英文模板采用中文封面
还参照书写规范微调了封面中论文标题的行距,并避免标题太长时封面挤成两页。
1 parent b302128 commit f14ec56

File tree

4 files changed

+170
-23
lines changed

4 files changed

+170
-23
lines changed

bithesis-doc.tex

+22
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,28 @@ \subsubsection{封面选项} \label{sec:cover}
721721
因为美观原因默认关闭,和研究生院确认过这个信息框重要程度比较低。
722722
\end{function}
723723

724+
\begin{function}[added=2024-07-11]{cover/prefer-zh}
725+
\begin{bitsyntax}[emph={[1]prefer-zh}]
726+
prefer-zh = (*(false)|true*)
727+
\end{bitsyntax}
728+
729+
是否强制使用中文封面,只适用于\BIThesisTemplates{UTE}。该模板默认封面是英文,而有些学院要求采用中文。
730+
731+
注意设置 |prefer-zh = true| 不会影响 |const/info/major| 等选项的默认值,请参考英文模板的 README 搭配使用。
732+
\end{function}
733+
734+
\begin{function}[added=2024-07-11]{cover/reverse-titles}
735+
\begin{bitsyntax}[emph={[1]reverse-titles}]
736+
reverse-titles = (*(false)|true*)
737+
\end{bitsyntax}
738+
739+
是否调换中英文标题顺序,只适用于本科中文封面。
740+
若为 |false|,中文在上,英文在下;若为 |true|,中文在下,英文在上。
741+
742+
适用于\BIThesisTemplates{UT},此外\BIThesisTemplates{UTE}设置了 |cover/prefer-zh = true| 时也适用。
743+
不适用于\BIThesisTemplates{PT}和硕士、博士学位论文。
744+
\end{function}
745+
724746
\subsubsection{论文基本信息}
725747

726748
\begin{function}{info}

bithesis.dtx

+38-11
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,13 @@
628628
hideCoverInPeerReview .initial:n = {from-thesis-type},
629629
% 研究生的「特殊类型」
630630
showSpecialTypeBox .bool_set:N = \l_@@_cover_show_special_type_box_bool,
631-
showSpecialTypeBox .initial:n = {false}
631+
showSpecialTypeBox .initial:n = {false},
632+
% 本科英文模板也可以使用中文封面
633+
prefer-zh .bool_set:N = \l_@@_cover_prefer_zh_bool,
634+
prefer-zh .initial:n = {false},
635+
% 本科英文模板使用中文封面时可能需要调换中英文标题顺序
636+
reverse-titles .bool_set:N = \l_@@_cover_reverse_titles_bool,
637+
reverse-titles .initial:n = {false},
632638
}
633639
% \end{macrocode}
634640
%
@@ -2306,7 +2312,15 @@
23062312
\begin{blindPeerReview}[\l_@@_cover_hide_cover_in_peer_review_bool]
23072313
\group_begin:
23082314

2309-
\int_case:nn {\g_@@_thesis_type_int}
2315+
% 封面使用的 thesis-type 可能与整体不同。
2316+
\int_new:N \l_@@_thesis_type_int
2317+
\bool_if:NTF \l_@@_cover_prefer_zh_bool {
2318+
\int_set:Nn \l_@@_thesis_type_int {1}
2319+
} {
2320+
\int_set:Nn \l_@@_thesis_type_int \g_@@_thesis_type_int
2321+
}
2322+
2323+
\int_case:nn {\l_@@_thesis_type_int}
23102324
{
23112325
{1}
23122326
{
@@ -2324,17 +2338,28 @@
23242338

23252339
\zihao{-0}\textbf{\ziju{0.12}\songti{\l_@@_style_headline_tl}}\par
23262340

2327-
\vspace{16mm}
2328-
2329-
\zihao{2}\textbf{\xihei:n \l_@@_value_title_tl}\par
2341+
\vspace{0.5em plus 1fill}
23302342

2331-
\vspace{3mm}
2343+
\group_begin:
2344+
% 中文标题
2345+
\tl_set:Nn \l_tmpa_tl {
2346+
\linespread{1.46}\selectfont
2347+
\zihao{2}\textbf{\xihei:n \l_@@_value_title_tl}\par
2348+
}
2349+
% 英文标题
2350+
\tl_set:Nn \l_tmpb_tl {
2351+
\linespread{1.65}\selectfont
2352+
\zihao{3}\textbf{\l_@@_value_title_en_tl}\par
2353+
}
23322354

2333-
\begin{spacing}{1.2}
2334-
\zihao{3}\selectfont{\textbf{\l_@@_value_title_en_tl}}\par
2335-
\end{spacing}
2355+
\bool_if:NTF \l_@@_cover_reverse_titles_bool {
2356+
\l_tmpb_tl \vspace{3mm} \l_tmpa_tl
2357+
} {
2358+
\l_tmpa_tl \vspace{3mm} \l_tmpb_tl
2359+
}
2360+
\group_end:
23362361

2337-
\vspace{15mm}
2362+
\vspace{0em plus 1fill}
23382363

23392364

23402365
\begin{spacing}{1.8}
@@ -2372,10 +2397,12 @@
23722397
\end{center}
23732398
\end{spacing}
23742399

2375-
\vspace*{\fill}
2400+
\vspace*{1.5em plus 1.5fill}
23762401
\centering
23772402
\zihao{3}\ziju{0.5}\songti{
23782403
\tl_if_empty:NTF \l_@@_cover_date_tl {
2404+
% 英文模板中 ctex 不会预设日期格式,但仍要保证中文封面的日期按中文习惯
2405+
\ctexset{today=small}
23792406
\today
23802407
} {
23812408
\l_@@_cover_date_tl

templates/undergraduate-thesis-en/README.md

+105
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,105 @@
66

77
> :warning: 重要提示:建议 macOS 用户使用最新版的 [texlive 2023](https://www.tug.org/mactex/mactex-download.html),否则可能会遇到参考文献被查重的情况。详见 https://github.com/BITNP/BIThesis/issues/326
88
9+
## BITSetup 学院变体
10+
11+
### 中文封面
12+
13+
默认封面是英文,有些学院要求采用中文。这时请编辑`main.tex`,找到`\BITSetup{…}`,替换为以下内容。此外注意中文封面比英文封面多班号信息(`info/class`)。
14+
15+
```latex
16+
\BITSetup{
17+
% 以下三项切换封面为中文。
18+
cover/prefer-zh = {true},
19+
const/info/major = {专\qquad 业},
20+
style/headline = {本科生毕业设计(论文)},
21+
%
22+
cover = {
23+
% 封面需要「北京理工大学」字样图片,如无必要请勿修改该项。
24+
headerImage = images/header.png,
25+
% 封面标题需要“华文细黑”,如无必要请勿修改该项。
26+
xiheiFont = STXIHEI.TTF,
27+
% 可用以下参数自定义封面日期。
28+
% date = 1955年11月,
29+
},
30+
info = {
31+
% 想要删除某项封面信息,直接删除该项即可。
32+
% 想要让某项封面信息留空(但是保留下划线),请传入空白符组成的字符串,如"{~}"。
33+
% 如需要换行,则用 “\\” 符号分割。
34+
title = 北京理工大学本科生毕业设计(论文)题目,
35+
titleEn = {The Subject of Undergraduate Graduation Project (Thesis) of Beijing Institute of Technology},
36+
school = 计算机学院,
37+
major = 计算机科学与技术,
38+
class = 0561xxxx,
39+
author = 惠计算,
40+
studentId = 11xxxxxxxx,
41+
supervisor = 张哈希,
42+
keywords = {北京理工大学;本科生;毕业设计(论文)——请在“main.tex”开头设置},
43+
keywordsEn = {BIT; Undergraduate; Graduation Project (Thesis)},
44+
% 如果你的毕设为校外毕设,请将下面这一行语句解除注释(删除第一个百分号字符)并填写你的校外毕设导师名字
45+
% externalSupervisor = 左偏树,
46+
},
47+
style = {
48+
% 页眉若要改为中文,请解除下一行的注释。
49+
% head = {北京理工大学本科生毕业设计(论文)},
50+
%
51+
% 开启该选项后,将用 Times New Roman 的开源字体 TeX Gyre Termes 作为正文字体。
52+
% 这个选项适用于以下情况:
53+
% 1. 不想在系统中安装 Times New Roman。
54+
% 2. 在 Linux/macOS 下遇到 `\textsc` 无法正常显示的问题。
55+
% betterTimesNewRoman = true,
56+
},
57+
misc = {
58+
% 微调表格行间距
59+
tabularRowSeparation = 1.25,
60+
},
61+
}
62+
```
63+
64+
### 管理与经济学院
65+
66+
经管学院还有些特殊要求,请:
67+
68+
1. 编辑`main.tex`,按[上文](#中文封面)替换`\BITSetup{…}`
69+
70+
2.`\BITSetup{…}`的中,解除`style/head`的注释。
71+
72+
3.`\BITSetup{…}`结尾,继续添加几项设置:
73+
74+
```latex
75+
\BITSetup{
76+
77+
misc = {…},
78+
%
79+
% 经管学院特殊要求:
80+
%
81+
% 调换中英文标题顺序
82+
cover/reverse-titles = {true},
83+
% 更改标题
84+
TOC/title = {Contents}, % 删掉“Table of ”
85+
appendices/title = {Appendix}, % 将“Appendices”改为单数
86+
appendices/TOCTitle = {Appendix}, % 将“Appendices”改为单数
87+
}
88+
```
89+
90+
4. 编辑`chapters/0_abstract.tex`,调换`abstract`、`abstractEn`环境的顺序。
91+
92+
```latex
93+
% 先英文摘要
94+
\begin{abstractEn}
95+
96+
\end{abstractEn}
97+
98+
% 再中文摘要
99+
\begin{abstract}
100+
101+
\end{abstract}
102+
```
103+
104+
此外,经管学院要求《原创性声明》《关于使用授权的声明》也是中文(而非双语)。
105+
106+
- 盲审版要求删去声明,故不用考虑。
107+
- 答辩版、最终存档版要求声明有签字,可让 LaTeX 导入 PDF。到时请参考`main.tex`中“原创性声明”相关注释。
9108
10109
## 特性
11110
@@ -64,9 +163,15 @@ latexmk
64163

65164
## 排版参考
66165

166+
- 《北京理工大学本科生毕业设计(论文)书写规范及打印装订要求》
167+
- 《北京理工大学本科生毕业设计(论文)模板》
168+
- 《北京理工大学管理与经济学院本科生毕业设计(论文)模板(英文论文)》
169+
- 计算机学院《全英班论文封面》
67170
- 《本科-全英文 Thesis Format 2022》
68171
- 《本科-全英文 Thesis Sample 2021 with signature》
69172

173+
此外还参考了信息与电子、集成电路与电子、机电等学院的通知。
174+
70175
[^1]: 关于如何升级模板的版本,请参考[手册][manual]中「版本号与升级」这一章节内容。
71176

72177
[manual]: ./bithesis.pdf

templates/undergraduate-thesis-en/main.tex

+5-12
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
\documentclass[type=bachelor_english]{bithesis}
2929

30+
% 若需中文封面或在经管学院,请参考 ./README.md 中「BITSetup 学院变体」一节。
3031
% 此处仅列出常用的配置。全部配置用法请见「bithesis.pdf」手册。
3132
\BITSetup{
3233
cover = {
@@ -53,6 +54,10 @@
5354
% 如果你的毕设为校外毕设,请将下面这一行语句解除注释(删除第一个百分号字符)并填写你的校外毕设导师名字
5455
% externalSupervisor = 左偏树,
5556
},
57+
% 有些专业名带上“Bachelor of…”太长,学院可能建议把 degree 改成 major。
58+
% 若要将封面的“Degree:”改为“Major:”,请解除下一行的注释。
59+
% const/info/major = {Major},
60+
%
5661
style = {
5762
% 页眉若要改为中文,请解除下一行的注释。
5863
% head = {北京理工大学本科生毕业设计(论文)},
@@ -67,18 +72,6 @@
6772
% 微调表格行间距
6873
tabularRowSeparation = 1.25,
6974
},
70-
const = {
71-
% 有些专业名带上“Bachelor of…”太长,学院可能建议把 degree 改成 major。
72-
% 若要将封面的“Degree:”改为“Major:”,请解除下一行的注释。
73-
% info/major = {Major},
74-
},
75-
%
76-
% 标题若要按经管学院的要求,请解除以下几行的注释。
77-
% % 将“Appendices”改为单数:
78-
% appendices/title = {Appendix},
79-
% appendices/TOCTitle = {Appendix},
80-
% % 删掉“Table of ”:
81-
% TOC/title = {Contents},
8275
}
8376

8477
% 使用 listings 宏包进行代码块使用,并使用了预定义的样式,

0 commit comments

Comments
 (0)