Skip to content

Commit f627bf2

Browse files
committed
feat: allow to set maxbibnames for publications.
1 parent 900a590 commit f627bf2

File tree

5 files changed

+46
-0
lines changed

5 files changed

+46
-0
lines changed

Diff for: bithesis.dtx

+18
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,17 @@
10271027
% \textit{一般不需要用户自行修改。}
10281028
% \end{function}
10291029
%
1030+
% \begin{function}[added=2023-02-18]{publications/maxbibnames}
1031+
% \begin{bitsyntax}[emph={[1]maxbibnames}]
1032+
% maxbibnames = (*(3)|\marg{正整数}*)
1033+
% \end{bitsyntax}
1034+
%
1035+
% 修改「攻读学位期间发表论文与研究成果清单」中最大作者数量。
1036+
% 默认为 3,即最多显示 3 个作者。
1037+
% 比如,你是第四个作者,那么可以设置为 4。
1038+
%
1039+
% \end{function}
1040+
%
10301041
%
10311042
% \subsubsection{其他配置}
10321043
%
@@ -2224,6 +2235,8 @@
22242235
sorting .initial:n = {true},
22252236
omit .bool_set:N = \l_@@_publications_omit_bool,
22262237
omit .initial:n = {false},
2238+
maxbibnames .int_set:N = \l_@@_publications_maxbibnames_int,
2239+
maxbibnames .initial:n = {3},
22272240
}
22282241
% \end{macrocode}
22292242
% 在宏加载时,处理 |bithesis/option| 中的值。使得 |bithesis|
@@ -4175,6 +4188,11 @@
41754188
\newrefcontext
41764189
}
41774190

4191+
% 根据 maxbibnames 的设置,覆盖 \blx@maxbibnames 选项,保证所有作者都能显示。
4192+
\cs_set:Npn \blx@maxbibnames {
4193+
\l_@@_publications_maxbibnames_int
4194+
}
4195+
41784196
\chapter{\c_@@_label_publications_tl}
41794197
#1
41804198
\end{blindPeerReview}

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

+7
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@
395395
sorting .initial:n = {true},
396396
omit .bool_set:N = \l__bithesis_publications_omit_bool,
397397
omit .initial:n = {false},
398+
maxbibnames .int_set:N = \l__bithesis_publications_maxbibnames_int,
399+
maxbibnames .initial:n = {3},
398400
}
399401
\ProcessKeysOptions { bithesis / option }
400402
\__bithesis_if_thesis_english:T {
@@ -1956,6 +1958,11 @@
19561958
\newrefcontext
19571959
}
19581960

1961+
% 根据 maxbibnames 的设置,覆盖 \blx@maxbibnames 选项,保证所有作者都能显示。
1962+
\cs_set:Npn \blx@maxbibnames {
1963+
\l__bithesis_publications_maxbibnames_int
1964+
}
1965+
19591966
\chapter{\c__bithesis_label_publications_tl}
19601967
#1
19611968
\end{blindPeerReview}

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

+7
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@
395395
sorting .initial:n = {true},
396396
omit .bool_set:N = \l__bithesis_publications_omit_bool,
397397
omit .initial:n = {false},
398+
maxbibnames .int_set:N = \l__bithesis_publications_maxbibnames_int,
399+
maxbibnames .initial:n = {3},
398400
}
399401
\ProcessKeysOptions { bithesis / option }
400402
\__bithesis_if_thesis_english:T {
@@ -1956,6 +1958,11 @@
19561958
\newrefcontext
19571959
}
19581960

1961+
% 根据 maxbibnames 的设置,覆盖 \blx@maxbibnames 选项,保证所有作者都能显示。
1962+
\cs_set:Npn \blx@maxbibnames {
1963+
\l__bithesis_publications_maxbibnames_int
1964+
}
1965+
19591966
\chapter{\c__bithesis_label_publications_tl}
19601967
#1
19611968
\end{blindPeerReview}

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

+7
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@
395395
sorting .initial:n = {true},
396396
omit .bool_set:N = \l__bithesis_publications_omit_bool,
397397
omit .initial:n = {false},
398+
maxbibnames .int_set:N = \l__bithesis_publications_maxbibnames_int,
399+
maxbibnames .initial:n = {3},
398400
}
399401
\ProcessKeysOptions { bithesis / option }
400402
\__bithesis_if_thesis_english:T {
@@ -1956,6 +1958,11 @@
19561958
\newrefcontext
19571959
}
19581960

1961+
% 根据 maxbibnames 的设置,覆盖 \blx@maxbibnames 选项,保证所有作者都能显示。
1962+
\cs_set:Npn \blx@maxbibnames {
1963+
\l__bithesis_publications_maxbibnames_int
1964+
}
1965+
19591966
\chapter{\c__bithesis_label_publications_tl}
19601967
#1
19611968
\end{blindPeerReview}

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

+7
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@
395395
sorting .initial:n = {true},
396396
omit .bool_set:N = \l__bithesis_publications_omit_bool,
397397
omit .initial:n = {false},
398+
maxbibnames .int_set:N = \l__bithesis_publications_maxbibnames_int,
399+
maxbibnames .initial:n = {3},
398400
}
399401
\ProcessKeysOptions { bithesis / option }
400402
\__bithesis_if_thesis_english:T {
@@ -1956,6 +1958,11 @@
19561958
\newrefcontext
19571959
}
19581960

1961+
% 根据 maxbibnames 的设置,覆盖 \blx@maxbibnames 选项,保证所有作者都能显示。
1962+
\cs_set:Npn \blx@maxbibnames {
1963+
\l__bithesis_publications_maxbibnames_int
1964+
}
1965+
19591966
\chapter{\c__bithesis_label_publications_tl}
19601967
#1
19611968
\end{blindPeerReview}

0 commit comments

Comments
 (0)