Skip to content

Commit 9de5df6

Browse files
feat: Customizable headline
headline 原先叫 cover_title(有的也叫 title),可 title 也在封面出现,容易混淆。因此改成 headline 了。 - 论文标题`info / title`,由使用者指定。 - 页眉标题`style / head`,默认如“北京理工大学本科生毕业设计(论文)”。 - 封面论文标题、校徽之间大标题`style / headline`,默认如“本科生毕业设计(论文)” 此功能一般不用,因此未在`main.tex`的注释中提示。 Relates-to: #359
1 parent 63fc60a commit 9de5df6

File tree

6 files changed

+57
-37
lines changed

6 files changed

+57
-37
lines changed

Diff for: bithesis-doc.tex

+10
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,16 @@ \subsubsection{样式信息}
905905
页眉文字。
906906
\end{function}
907907

908+
\begin{function}{style/headline}
909+
\begin{bitsyntax}[emph={[1]headline}]
910+
headline = (*\marg{字符串}*)
911+
\end{bitsyntax}
912+
913+
\textit{此选项一般不需要用户自行修改。}
914+
915+
封面校徽下方、论文标题上方的大标题。
916+
\end{function}
917+
908918
\begin{function}{style/bibliographyIndent}
909919
\begin{bitsyntax}[emph={[1]bibliographyIndent}]
910920
bibliographyIndent = (*(true)|false*)

Diff for: bithesis.dtx

+11-9
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@
322322
% \begin{macrocode}
323323
\clist_map_inline:nn
324324
{
325-
{title} {本科生毕业设计(论文)},
326325
{originality} {原创性声明},
327326
{originality_clause} {本人郑重声明:所呈交的毕业设计(论文),
328327
是本人在指导老师的指导下独立进行研究所取得的成果。除文中已经注明引用的内容外,
@@ -347,7 +346,6 @@
347346
% \begin{macrocode}
348347
\clist_map_inline:nn
349348
{
350-
{title} {},
351349
{originality} {原创性声明~Statement~of~Originality},
352350
{originality_clause} {
353351
本人郑重声明:所呈交的毕业设计(论文),
@@ -484,16 +482,16 @@
484482
% \end{macrocode}
485483
% \end{variable}
486484
%
487-
% \begin{variable}{\c_@@_bachelor_thesis_header_clist,\c_@@_bachelor_thesis_cover_title_clist}
488-
% 本科生模板的封面标题与页眉标题常量列表
485+
% \begin{variable}{\c_@@_bachelor_thesis_header_clist,\c_@@_bachelor_thesis_headline_clist}
486+
% 本科生模板的封面大标题与页眉标题常量列表
489487
% \begin{macrocode}
490488
\clist_const:Nn \c_@@_bachelor_thesis_header_clist
491489
{
492490
北京理工大学本科生毕业设计(论文),
493491
北京理工大学本科生毕业设计(论文)外文翻译,
494492
Beijing~Institute~of~Technology~Bachelor's~Thesis
495493
}
496-
\clist_const:Nn \c_@@_bachelor_thesis_cover_title_clist
494+
\clist_const:Nn \c_@@_bachelor_thesis_headline_clist
497495
{
498496
本科生毕业设计(论文),
499497
本科生毕业设计(论文)外文翻译,
@@ -737,6 +735,11 @@
737735
{5} {北京理工大学博士学位论文}
738736
}
739737
},
738+
headline .tl_set:N = \l_@@_style_headline_tl,
739+
headline .initial:n = {
740+
% todo 没有适配硕士、博士学位论文
741+
\clist_item:Nn \c_@@_bachelor_thesis_headline_clist \g_@@_thesis_type_int
742+
},
740743
bibliographyIndent .bool_set:N = \l_@@_style_bibliography_indent_bool,
741744
bibliographyIndent .initial:n = {true},
742745
pageVerticalAlign .choices:nn = {top, scattered} {
@@ -2061,7 +2064,7 @@
20612064

20622065
\vspace*{-3mm}
20632066

2064-
\zihao{-0}\textbf{\ziju{0.12}\songti{\c_@@_bachelor_label_title_tl}}\par
2067+
\zihao{-0}\textbf{\ziju{0.12}\songti{\l_@@_style_headline_tl}}\par
20652068

20662069
\vspace{16mm}
20672070

@@ -2130,7 +2133,7 @@
21302133

21312134
\vspace{1.2mm}
21322135

2133-
\zihao{2}\textbf{\songti{本科生毕业设计(论文)外文翻译}}
2136+
\zihao{2}\textbf{\songti{\l_@@_style_headline_tl}}
21342137

21352138
\vspace{10mm}
21362139

@@ -2217,8 +2220,7 @@
22172220

22182221
\vspace*{-3mm}
22192222

2220-
\zihao{1}\textbf{\ziju{0.12}Beijing\nobreak{~}Institute
2221-
\nobreak{~}of\nobreak{~}Technology~Bachelor's~Thesis}\par
2223+
\zihao{1}\textbf{\ziju{0.12}\l_@@_style_headline_tl}\par
22222224

22232225
\vspace{18mm}
22242226

Diff for: templates/graduate-thesis/bithesis.cls

+9-7
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@
131131
{\__bithesis_define_label:nn #1}
132132
\clist_map_inline:nn
133133
{
134-
{title} {本科生毕业设计(论文)},
135134
{originality} {原创性声明},
136135
{originality_clause} {本人郑重声明:所呈交的毕业设计(论文),
137136
是本人在指导老师的指导下独立进行研究所取得的成果。除文中已经注明引用的内容外,
@@ -150,7 +149,6 @@
150149
} {\__bithesis_define_label_by_thesis_type:nnn {bachelor} #1}
151150
\clist_map_inline:nn
152151
{
153-
{title} {},
154152
{originality} {原创性声明~Statement~of~Originality},
155153
{originality_clause} {
156154
本人郑重声明:所呈交的毕业设计(论文),
@@ -272,7 +270,7 @@
272270
北京理工大学本科生毕业设计(论文)外文翻译,
273271
Beijing~Institute~of~Technology~Bachelor's~Thesis
274272
}
275-
\clist_const:Nn \c__bithesis_bachelor_thesis_cover_title_clist
273+
\clist_const:Nn \c__bithesis_bachelor_thesis_headline_clist
276274
{
277275
本科生毕业设计(论文),
278276
本科生毕业设计(论文)外文翻译,
@@ -485,6 +483,11 @@
485483
{5} {北京理工大学博士学位论文}
486484
}
487485
},
486+
headline .tl_set:N = \l__bithesis_style_headline_tl,
487+
headline .initial:n = {
488+
% todo 没有适配硕士、博士学位论文
489+
\clist_item:Nn \c__bithesis_bachelor_thesis_headline_clist \g__bithesis_thesis_type_int
490+
},
488491
bibliographyIndent .bool_set:N = \l__bithesis_style_bibliography_indent_bool,
489492
bibliographyIndent .initial:n = {true},
490493
pageVerticalAlign .choices:nn = {top, scattered} {
@@ -1440,7 +1443,7 @@
14401443

14411444
\vspace*{-3mm}
14421445

1443-
\zihao{-0}\textbf{\ziju{0.12}\songti{\c__bithesis_bachelor_label_title_tl}}\par
1446+
\zihao{-0}\textbf{\ziju{0.12}\songti{\l__bithesis_style_headline_tl}}\par
14441447

14451448
\vspace{16mm}
14461449

@@ -1508,7 +1511,7 @@
15081511

15091512
\vspace{1.2mm}
15101513

1511-
\zihao{2}\textbf{\songti{本科生毕业设计(论文)外文翻译}}
1514+
\zihao{2}\textbf{\songti{\l__bithesis_style_headline_tl}}
15121515

15131516
\vspace{10mm}
15141517

@@ -1595,8 +1598,7 @@
15951598

15961599
\vspace*{-3mm}
15971600

1598-
\zihao{1}\textbf{\ziju{0.12}Beijing\nobreak{~}Institute
1599-
\nobreak{~}of\nobreak{~}Technology~Bachelor's~Thesis}\par
1601+
\zihao{1}\textbf{\ziju{0.12}\l__bithesis_style_headline_tl}\par
16001602

16011603
\vspace{18mm}
16021604

Diff for: templates/paper-translation/bithesis.cls

+9-7
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@
131131
{\__bithesis_define_label:nn #1}
132132
\clist_map_inline:nn
133133
{
134-
{title} {本科生毕业设计(论文)},
135134
{originality} {原创性声明},
136135
{originality_clause} {本人郑重声明:所呈交的毕业设计(论文),
137136
是本人在指导老师的指导下独立进行研究所取得的成果。除文中已经注明引用的内容外,
@@ -150,7 +149,6 @@
150149
} {\__bithesis_define_label_by_thesis_type:nnn {bachelor} #1}
151150
\clist_map_inline:nn
152151
{
153-
{title} {},
154152
{originality} {原创性声明~Statement~of~Originality},
155153
{originality_clause} {
156154
本人郑重声明:所呈交的毕业设计(论文),
@@ -272,7 +270,7 @@
272270
北京理工大学本科生毕业设计(论文)外文翻译,
273271
Beijing~Institute~of~Technology~Bachelor's~Thesis
274272
}
275-
\clist_const:Nn \c__bithesis_bachelor_thesis_cover_title_clist
273+
\clist_const:Nn \c__bithesis_bachelor_thesis_headline_clist
276274
{
277275
本科生毕业设计(论文),
278276
本科生毕业设计(论文)外文翻译,
@@ -485,6 +483,11 @@
485483
{5} {北京理工大学博士学位论文}
486484
}
487485
},
486+
headline .tl_set:N = \l__bithesis_style_headline_tl,
487+
headline .initial:n = {
488+
% todo 没有适配硕士、博士学位论文
489+
\clist_item:Nn \c__bithesis_bachelor_thesis_headline_clist \g__bithesis_thesis_type_int
490+
},
488491
bibliographyIndent .bool_set:N = \l__bithesis_style_bibliography_indent_bool,
489492
bibliographyIndent .initial:n = {true},
490493
pageVerticalAlign .choices:nn = {top, scattered} {
@@ -1440,7 +1443,7 @@
14401443

14411444
\vspace*{-3mm}
14421445

1443-
\zihao{-0}\textbf{\ziju{0.12}\songti{\c__bithesis_bachelor_label_title_tl}}\par
1446+
\zihao{-0}\textbf{\ziju{0.12}\songti{\l__bithesis_style_headline_tl}}\par
14441447

14451448
\vspace{16mm}
14461449

@@ -1508,7 +1511,7 @@
15081511

15091512
\vspace{1.2mm}
15101513

1511-
\zihao{2}\textbf{\songti{本科生毕业设计(论文)外文翻译}}
1514+
\zihao{2}\textbf{\songti{\l__bithesis_style_headline_tl}}
15121515

15131516
\vspace{10mm}
15141517

@@ -1595,8 +1598,7 @@
15951598

15961599
\vspace*{-3mm}
15971600

1598-
\zihao{1}\textbf{\ziju{0.12}Beijing\nobreak{~}Institute
1599-
\nobreak{~}of\nobreak{~}Technology~Bachelor's~Thesis}\par
1601+
\zihao{1}\textbf{\ziju{0.12}\l__bithesis_style_headline_tl}\par
16001602

16011603
\vspace{18mm}
16021604

Diff for: templates/undergraduate-thesis-en/bithesis.cls

+9-7
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@
131131
{\__bithesis_define_label:nn #1}
132132
\clist_map_inline:nn
133133
{
134-
{title} {本科生毕业设计(论文)},
135134
{originality} {原创性声明},
136135
{originality_clause} {本人郑重声明:所呈交的毕业设计(论文),
137136
是本人在指导老师的指导下独立进行研究所取得的成果。除文中已经注明引用的内容外,
@@ -150,7 +149,6 @@
150149
} {\__bithesis_define_label_by_thesis_type:nnn {bachelor} #1}
151150
\clist_map_inline:nn
152151
{
153-
{title} {},
154152
{originality} {原创性声明~Statement~of~Originality},
155153
{originality_clause} {
156154
本人郑重声明:所呈交的毕业设计(论文),
@@ -272,7 +270,7 @@
272270
北京理工大学本科生毕业设计(论文)外文翻译,
273271
Beijing~Institute~of~Technology~Bachelor's~Thesis
274272
}
275-
\clist_const:Nn \c__bithesis_bachelor_thesis_cover_title_clist
273+
\clist_const:Nn \c__bithesis_bachelor_thesis_headline_clist
276274
{
277275
本科生毕业设计(论文),
278276
本科生毕业设计(论文)外文翻译,
@@ -485,6 +483,11 @@
485483
{5} {北京理工大学博士学位论文}
486484
}
487485
},
486+
headline .tl_set:N = \l__bithesis_style_headline_tl,
487+
headline .initial:n = {
488+
% todo 没有适配硕士、博士学位论文
489+
\clist_item:Nn \c__bithesis_bachelor_thesis_headline_clist \g__bithesis_thesis_type_int
490+
},
488491
bibliographyIndent .bool_set:N = \l__bithesis_style_bibliography_indent_bool,
489492
bibliographyIndent .initial:n = {true},
490493
pageVerticalAlign .choices:nn = {top, scattered} {
@@ -1440,7 +1443,7 @@
14401443

14411444
\vspace*{-3mm}
14421445

1443-
\zihao{-0}\textbf{\ziju{0.12}\songti{\c__bithesis_bachelor_label_title_tl}}\par
1446+
\zihao{-0}\textbf{\ziju{0.12}\songti{\l__bithesis_style_headline_tl}}\par
14441447

14451448
\vspace{16mm}
14461449

@@ -1508,7 +1511,7 @@
15081511

15091512
\vspace{1.2mm}
15101513

1511-
\zihao{2}\textbf{\songti{本科生毕业设计(论文)外文翻译}}
1514+
\zihao{2}\textbf{\songti{\l__bithesis_style_headline_tl}}
15121515

15131516
\vspace{10mm}
15141517

@@ -1595,8 +1598,7 @@
15951598

15961599
\vspace*{-3mm}
15971600

1598-
\zihao{1}\textbf{\ziju{0.12}Beijing\nobreak{~}Institute
1599-
\nobreak{~}of\nobreak{~}Technology~Bachelor's~Thesis}\par
1601+
\zihao{1}\textbf{\ziju{0.12}\l__bithesis_style_headline_tl}\par
16001602

16011603
\vspace{18mm}
16021604

Diff for: templates/undergraduate-thesis/bithesis.cls

+9-7
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@
131131
{\__bithesis_define_label:nn #1}
132132
\clist_map_inline:nn
133133
{
134-
{title} {本科生毕业设计(论文)},
135134
{originality} {原创性声明},
136135
{originality_clause} {本人郑重声明:所呈交的毕业设计(论文),
137136
是本人在指导老师的指导下独立进行研究所取得的成果。除文中已经注明引用的内容外,
@@ -150,7 +149,6 @@
150149
} {\__bithesis_define_label_by_thesis_type:nnn {bachelor} #1}
151150
\clist_map_inline:nn
152151
{
153-
{title} {},
154152
{originality} {原创性声明~Statement~of~Originality},
155153
{originality_clause} {
156154
本人郑重声明:所呈交的毕业设计(论文),
@@ -272,7 +270,7 @@
272270
北京理工大学本科生毕业设计(论文)外文翻译,
273271
Beijing~Institute~of~Technology~Bachelor's~Thesis
274272
}
275-
\clist_const:Nn \c__bithesis_bachelor_thesis_cover_title_clist
273+
\clist_const:Nn \c__bithesis_bachelor_thesis_headline_clist
276274
{
277275
本科生毕业设计(论文),
278276
本科生毕业设计(论文)外文翻译,
@@ -485,6 +483,11 @@
485483
{5} {北京理工大学博士学位论文}
486484
}
487485
},
486+
headline .tl_set:N = \l__bithesis_style_headline_tl,
487+
headline .initial:n = {
488+
% todo 没有适配硕士、博士学位论文
489+
\clist_item:Nn \c__bithesis_bachelor_thesis_headline_clist \g__bithesis_thesis_type_int
490+
},
488491
bibliographyIndent .bool_set:N = \l__bithesis_style_bibliography_indent_bool,
489492
bibliographyIndent .initial:n = {true},
490493
pageVerticalAlign .choices:nn = {top, scattered} {
@@ -1440,7 +1443,7 @@
14401443

14411444
\vspace*{-3mm}
14421445

1443-
\zihao{-0}\textbf{\ziju{0.12}\songti{\c__bithesis_bachelor_label_title_tl}}\par
1446+
\zihao{-0}\textbf{\ziju{0.12}\songti{\l__bithesis_style_headline_tl}}\par
14441447

14451448
\vspace{16mm}
14461449

@@ -1508,7 +1511,7 @@
15081511

15091512
\vspace{1.2mm}
15101513

1511-
\zihao{2}\textbf{\songti{本科生毕业设计(论文)外文翻译}}
1514+
\zihao{2}\textbf{\songti{\l__bithesis_style_headline_tl}}
15121515

15131516
\vspace{10mm}
15141517

@@ -1595,8 +1598,7 @@
15951598

15961599
\vspace*{-3mm}
15971600

1598-
\zihao{1}\textbf{\ziju{0.12}Beijing\nobreak{~}Institute
1599-
\nobreak{~}of\nobreak{~}Technology~Bachelor's~Thesis}\par
1601+
\zihao{1}\textbf{\ziju{0.12}\l__bithesis_style_headline_tl}\par
16001602

16011603
\vspace{18mm}
16021604

0 commit comments

Comments
 (0)