From 98aebbd10392f1773f43fb6dcc7a082af144ca3a Mon Sep 17 00:00:00 2001 From: Yu Xiong <y-xiong22@mails.tsinghua.edu.cn> Date: Mon, 15 Apr 2024 23:47:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8C=B9=E9=85=8D=E6=96=B0=E7=89=88?= =?UTF-8?q?=E7=9B=B2=E5=AE=A1=E6=A8=A1=E6=9D=BF=20(#185)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 8 ++++ docs/njuthesis-sample.tex | 3 +- source/njuthesis.dtx | 89 +++++++++++++++++++++++++++------------ 3 files changed, 73 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10be169..1cf5066 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ ## [鏈彂甯僝 +### 鏂板 + +- 鍖归厤鏂扮増鐩插妯℃澘 - [#185] + - 浣滆€呭拰瀵煎笀濮撳悕鐢ㄥ崰浣嶇浠f浛 + - 鎭㈠鏄剧ず鏍″悕鏍″窘 + - 鎭㈠鏄剧ず鎽樿椤电殑骞寸骇 + - 鎴愭灉鍒楄〃涓粎鏄剧ず鏈熷垔鍜屽勾浠� + ### 淇 - 淇鎴愭灉鍒楄〃涓枃濮撳悕鍔犵矖鐨勯棶棰� - [#192] diff --git a/docs/njuthesis-sample.tex b/docs/njuthesis-sample.tex index 56693cf..281d1bd 100644 --- a/docs/njuthesis-sample.tex +++ b/docs/njuthesis-sample.tex @@ -5,7 +5,8 @@ % 璐$尞鑰� % Yu XIONG @atxy-blip Yichen ZHAO @FengChendian % Song GAO @myandeg Chang MA @glatavento -% Yilun SUN @HermitSun Yinfeng LIN @linyinfeng +% Yilun SUN @HermitSun Yinfeng LIN @ +% Yukai Chou @Muzimuzhi % % 璁稿彲璇� % LaTeX Project Public License锛堢増鏈� 1.3c 鎴栨洿楂橈級 diff --git a/source/njuthesis.dtx b/source/njuthesis.dtx index cb4bbb6..eba83b5 100644 --- a/source/njuthesis.dtx +++ b/source/njuthesis.dtx @@ -185,6 +185,7 @@ To produce the documentation run the original source files ending with % \changes{v1.1}{2023/01/05}{閫傞厤鏂扮増鍗楀ぇ \LaTeX 鍦ㄧ嚎缂栬緫鍣ㄣ€倉 % \changes{v1.4}{2024/03/11}{鎬绘槸鍏ㄥ眬淇敼鍏ㄥ眬鍙橀噺銆倉 % \changes{v1.4}{2024/03/18}{灏嗗彉閲忕粺涓€涓� |l| 绫诲瀷銆倉 +% \changes{v1.4}{2024/04/15}{鐩插妯″紡涓嬩粛鐒舵樉绀烘牎鍚嶆牎寰姐€倉 % % \maketitle % @@ -2825,7 +2826,7 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \clist_const:Nn \c_@@_name_anon_clist { - author, chairman, email, grade, student-id, reviewer, + author, chairman, email, student-id, reviewer, supervisor-contact, supervisor, supervisor-ii } \clist_const:Nn \c_@@_name_anon_en_clist @@ -4731,13 +4732,23 @@ To produce the documentation run the original source files ending with % \end{macrocode} % \end{variable} % -% 鐩插妯″紡涓嬫姽鍘诲鏍″悕绉般€� +% \changes{v1.4}{2024/04/15}{鐩插妯″紡涓嬪鍚嶄娇鐢ㄥ崰浣嶇銆倉 +% 鐩插妯″紡涓嬩綔鑰呭拰瀵煎笀濮撳悕鐢� $\times\times\times$ 浠f浛銆� % \begin{macrocode} %<*class> \bool_if:NT \g_@@_opt_anon_bool { - \tl_clear:N \l_@@_name_nju_tl - \tl_clear:N \l_@@_name_nju_en_tl + \keys_set:nn { nju / info } + { + author = \@@_name:n { anonymous a }, + author* = \@@_name:n { anonymous a }, + supervisor = + { \@@_name:n { anonymous a }, \@@_name:n { anonymous b } }, + supervisor* = + { \@@_name:n { anonymous c } \@@_quad: \@@_name:n { anonymous a } }, + supervisor-ii = , + supervisor-ii* = + } } % \end{macrocode} % @@ -7752,11 +7763,6 @@ To produce the documentation run the original source files ending with \msg_warning:nn { njuthesis } { missing-image } \RequirePackage { njuvisual } } - \bool_if:NT \g_@@_opt_anon_bool - { - \RenewDocumentCommand \njuemblem { o m m } { } - \RenewDocumentCommand \njuname { o m m } { } - } } % \end{macrocode} % @@ -8216,40 +8222,68 @@ To produce the documentation run the original source files ending with % \changes{v0.14}{2021/12/20}{鎴愭灉鍒楄〃涓彲绐佸嚭鎸囧畾浣滆€呭鍚嶅強骞翠唤銆倉 % \changes{v1.2}{2023/04/07}{淇鎴愭灉鍒楄〃涓庣珷鏈弬鑰冩枃鐚〃鐨勫啿绐併€倉 % \changes{v1.4}{2024/03/21}{淇鎴愭灉鍒楄〃涓枃濮撳悕鍔犵矖鐨勯棶棰樸€倉 +% \changes{v1.4}{2024/04/15}{鐩插妯″紡涓嬫垚鏋滃垪琛ㄥ彧鏄剧ず鏈熷垔鍜屽勾浠姐€倉 % 鎴愭灉鍒楄〃銆� % \begin{macrocode} -\NewDocumentCommand \njupaperlist - { O { \l_@@_name_paperlist_tl } m } +\bool_if:NTF \g_@@_opt_anon_bool { - \group_begin: + \ctex_at_end_package:nn { biblatex } + { + \DeclareBibliographyDriver { anonymous } + { + \usebibmacro { begentry } + \usebibmacro { journal },~ + \usebibmacro { date } + \usebibmacro { finentry } + } + } + \NewDocumentCommand \njupaperlist + { O { \l_@@_name_paperlist_tl } m } + { + \group_begin: + \newrefsection + \nocite {#2} + \printbiblist + [ title = #1, driver = anonymous, env = bibliography, + heading = subbibliography ] { anonymous } + \endrefsection + \group_end: + } + } + { + \NewDocumentCommand \njupaperlist + { O { \l_@@_name_paperlist_tl } m } + { + \group_begin: % \end{macrocode} % 淇敼濮撳悕鐨勬樉绀烘柟寮忥紝浣胯娉ㄨВ鐨勫鍚嶅彲琚姞绮椾笅鍒掔嚎琛ㄧず銆� % 鐢变簬 \pkg{biblatex} 鎻愪緵鐨� \tn{MakeCapital} 鏄竴涓� robust 鍛戒护锛� % 鍦ㄧ粯鍒朵笅鍒掔嚎杩囩▼涓棤娉曡瀹屽叏灞曞紑锛屾垜浠皢鍏舵浛鎹负 % 鍙灞曞紑鐨� \cs{str_uppercase:f} 浠ラ伩鍏嶉€犳垚閿欒銆� % \begin{macrocode} - \cs_set_eq:NN \MakeCapital \str_uppercase:f - \RenewDocumentCommand \mkbibnamegiven { m } - { \ifitemannotation { thesisauthor } - { \bfseries \njuline {##1} } {##1} } - \RenewDocumentCommand \mkbibnamefamily { m } - { \ifitemannotation { thesisauthor } - { \bfseries \njuline {##1} } {##1} } + \cs_set_eq:NN \MakeCapital \str_uppercase:f + \RenewDocumentCommand \mkbibnamegiven { m } + { \ifitemannotation { thesisauthor } + { \bfseries \njuline {##1} } {##1} } + \RenewDocumentCommand \mkbibnamefamily { m } + { \ifitemannotation { thesisauthor } + { \bfseries \njuline {##1} } {##1} } % \end{macrocode} % 淇敼骞翠唤鐨勬樉绀烘柟寮忥紝榛樿杩涜鍔犵矖銆� % \begin{macrocode} - \RenewDocumentCommand \mkbibdateshort { m m m } - { \textbf { \thefield {##1} } } + \RenewDocumentCommand \mkbibdateshort { m m m } + { \textbf { \thefield {##1} } } % \end{macrocode} % \changes{v1.1}{2023/04/07}{淇绔犳湯鍙傝€冩枃鐚〃涓庢垚鏋滃垪琛ㄧ殑鍐茬獊闂銆倉 % 鐩歌緝浜庣洿鎺ヤ娇鐢� \env{refsection} 鐜锛孿tn{newrefsection} 鍛戒护鍙互 % 鑷姩缁撴潫涓婁竴涓� \env{refsection}锛屼笌绔犳湯鍙傝€冩枃鐚〃鏍煎紡鍏煎鏇村ソ銆� % \begin{macrocode} - \newrefsection - \nocite {#2} - \printbibliography [ heading = subbibliography, title = #1 ] - \endrefsection - \group_end: + \newrefsection + \nocite {#2} + \printbibliography [ heading = subbibliography, title = #1 ] + \endrefsection + \group_end: + } } % \end{macrocode} % \end{macro} @@ -8352,6 +8386,9 @@ To produce the documentation run the original source files ending with { { acknowledgement } { 鑷� \qquad{} 璋� }, { acknowledgement a } { 鑷磋阿锛堢洸瀹¢樁娈碉紝鏆傛椂闅愬幓锛� }, + { anonymous a } { \ensuremath { \times\times\times } }, + { anonymous b } { \ensuremath { \times\times\times } }, + { anonymous c } { \ensuremath { \times\times\times } }, %<def-g> { auth decl } { 瀛︿綅璁烘枃鍑虹増鎺堟潈涔� }, %<def-p> { auth decl } { 鐮旂┒鎶ュ憡浣跨敤鎺堟潈涔� }, %<def-p> { author } { 浣滆€� }, -- GitLab