diff options
author | Karl Berry <karl@freefriends.org> | 2023-04-19 20:11:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-04-19 20:11:39 +0000 |
commit | d529e97b80a83d8a5b94a1e551c8ecaf931164d6 (patch) | |
tree | 535a2591d183a2aa9efe5578c08c2eaa4964c0e0 /Master/texmf-dist/tex/latex/nwafuthesis | |
parent | de17f76b81d0ca8f2e18bca124397307ac2b5353 (diff) |
nwafuthesis (19apr23)
git-svn-id: svn://tug.org/texlive/trunk@66895 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/nwafuthesis')
-rw-r--r-- | Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls | 373 |
1 files changed, 269 insertions, 104 deletions
diff --git a/Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls b/Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls index 12f70c4c7ac..3cdb6fe3a06 100644 --- a/Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls +++ b/Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls @@ -6,7 +6,7 @@ %% %% nwafuthesis.dtx (with options: `class') %% -%% Copyright (C) 2019--2022 by Nan Geng <nangeng@nwafu.edu.cn> +%% Copyright (C) 2019--2023 by Nan Geng <nangeng@nwafu.edu.cn> %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -30,7 +30,7 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo $Id: nwafuthesis.dtx 1.15 2022-05-29 Nan Geng <nangeng@nwafu.edu.cn> $ +\GetIdInfo $Id: nwafuthesis.dtx 1.25 2023-04-18 Nan Geng <nangeng@nwafu.edu.cn> $ {Thesis template for Northwest A\&F University} \ProvidesExplClass{\ExplFileName} {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -86,6 +86,7 @@ \bool_new:N \g__nwafu_draft_bool \bool_new:N \l__nwafu_withchap_bool \bool_new:N \l__nwafu_withsignature_bool +\bool_new:N \l__nwafu_anonymous_bool \int_new:N \g__nwafu_chapnum_int \cs_generate_variant:Nn \file_input:n { V } \cs_generate_variant:Nn \int_to_arabic:n { v } @@ -302,7 +303,14 @@ \__nwafu_define_orig_decl_text: \tl_const:Nn \c__nwafu_super_decl_text_tl { - 本人承诺{\c__nwafu_fwid_colon_tl}我的研究生{\__nwafu_text_uline:V \l__nwafu_info_author_tl}% + 本人承诺{\c__nwafu_fwid_colon_tl}我的研究生{% + \bool_if:NTF \l__nwafu_anonymous_bool + { + \__nwafu_text_uline:V \c__nwafu_name_anonname_tl + }{ + \__nwafu_text_uline:V \l__nwafu_info_author_tl + } + }% 所呈交的学位论文是在我指导下独立开展研究工作及取得的研究结果% {\c__nwafu_fwid_comma_tl}属于我现岗职务工作的结果{\c__nwafu_fwid_comma_tl}% 并严格按照学校{\c__nwafu_fwid_left_title_tl}关于规范西北农林科技大学研% @@ -461,7 +469,9 @@ \__nwafu_define_name_const_zh: \clist_map_inline:nn { - { supervisor } { 指导教师 } { Supervisor }, + { supervisor } { 指导教师 } { Supervisor }, + { anonid } { ********** } { ********** }, + { anonname } { **** } { **** }, } { \__nwafu_define_name:nnn #1 } \cs_new_protected:Npn \__nwafu_define_name_const_zh_en: @@ -1295,11 +1305,15 @@ withchapter .bool_set:N = \l__nwafu_withchap_bool, withchapter .default:n = true, withchapter .initial:n = true, - + } +\keys_define:nn { nwafu / style } + { withsig .bool_set:N = \l__nwafu_withsignature_bool, withsig .default:n = true, withsig .initial:n = false, - + } +\keys_define:nn { nwafu / style } + { chapnum .choice:, chapnum .value_required:n = true, chapnum .choices:nn = @@ -1307,6 +1321,12 @@ { \int_set_eq:NN \g__nwafu_chapnum_int \l_keys_choice_int }, chapnum .initial:n = en, } +\keys_define:nn { nwafu / style } + { + anonymous .bool_set:N = \l__nwafu_anonymous_bool, + anonymous .default:n = true, + anonymous .initial:n = false, + } \cs_new_protected:Npn \__nwafu_ctexset_caption: { \int_compare:nNnTF{ \g__nwafu_thesis_type_int } < { 3 } @@ -1832,6 +1852,7 @@ } \cs_new:Npn \__nwafu_blank_underline:n #1 { \rule [ -0.5 ex ] {#1} { 0.4 pt } } +\cs_generate_variant:Nn \__nwafu_blank_underline:n { V } \cs_new:Npn \__nwafu_text_uline:n #1 { \__nwafu_get_text_width:Nn \l__nwafu_tmpt_dim {#1} @@ -1871,12 +1892,22 @@ { \c__nwafu_name_student_id_tl } } \__nwafu_get_max_text_width:NN \l__nwafu_tmpc_dim \l__nwafu_tmpc_clist - \clist_set:Nx \l__nwafu_tmpd_clist - { - { \l__nwafu_info_school_id_tl }, - { }, - { \l__nwafu_info_student_id_tl } - } + \bool_if:NTF \l__nwafu_anonymous_bool + { + \clist_set:Nx \l__nwafu_tmpd_clist + { + { \l__nwafu_info_school_id_tl }, + { }, + { \c__nwafu_name_anonid_tl } + } + }{ + \clist_set:Nx \l__nwafu_tmpd_clist + { + { \l__nwafu_info_school_id_tl }, + { }, + { \l__nwafu_info_student_id_tl } + } + } \__nwafu_get_max_text_width:NN \l__nwafu_tmpd_dim \l__nwafu_tmpd_clist \begin{minipage} [ c ] { \textwidth } \bool_until_do:nn { \clist_if_empty_p:N \l__nwafu_tmpa_clist } @@ -1917,7 +1948,12 @@ { \tl_use:c { c__nwafu_name_ #1 _tl } \c__nwafu_fwid_colon_tl - \__nwafu_text_uline:n {\tl_use:c { l__nwafu_info_ #1 _tl }} + \bool_if:NTF \l__nwafu_anonymous_bool + { + \__nwafu_text_uline:V \c__nwafu_name_anonid_tl + }{ + \__nwafu_text_uline:n {\tl_use:c { l__nwafu_info_ #1 _tl }} + } } \cs_new_protected:Npn \__nwafu_cover_logo: { @@ -1974,15 +2010,28 @@ { \c__nwafu_name_date_tl } } \__nwafu_get_max_text_width:NN \l__nwafu_tmpa_dim \l__nwafu_tmpa_clist - \clist_set:Nx \l__nwafu_tmpb_clist - { - { \l__nwafu_info_major_tl }, - { \l__nwafu_info_researchfield_tl }, - { \l__nwafu_info_author_tl }, - { \l__nwafu_info_supervisor_tl }, - { \l__nwafu_info_cosupervisor_tl }, - { \l__nwafu_info_date_tl } - } + \bool_if:NTF \l__nwafu_anonymous_bool + { + \clist_set:Nx \l__nwafu_tmpb_clist + { + { \l__nwafu_info_major_tl }, + { \l__nwafu_info_researchfield_tl }, + { \c__nwafu_name_anonname_tl }, + { \c__nwafu_name_anonname_tl }, + { \c__nwafu_name_anonname_tl }, + { \l__nwafu_info_date_tl } + } + }{ + \clist_set:Nx \l__nwafu_tmpb_clist + { + { \l__nwafu_info_major_tl }, + { \l__nwafu_info_researchfield_tl }, + { \l__nwafu_info_author_tl }, + { \l__nwafu_info_supervisor_tl }, + { \l__nwafu_info_cosupervisor_tl }, + { \l__nwafu_info_date_tl } + } + } \__nwafu_get_max_text_width:NN \l__nwafu_tmpb_dim \l__nwafu_tmpb_clist } {2}{ @@ -1999,15 +2048,28 @@ { \c__nwafu_name_date_tl } } \__nwafu_get_max_text_width:NN \l__nwafu_tmpa_dim \l__nwafu_tmpa_clist - \clist_set:Nx \l__nwafu_tmpb_clist - { - { \l__nwafu_info_major_tl }, - { \l__nwafu_info_researchfield_tl }, - { \l__nwafu_info_author_tl }, - { \l__nwafu_info_supervisor_tl }, - { \l__nwafu_info_cosupervisor_tl }, - { \l__nwafu_info_date_tl } - } + \bool_if:NTF \l__nwafu_anonymous_bool + { + \clist_set:Nx \l__nwafu_tmpb_clist + { + { \l__nwafu_info_major_tl }, + { \l__nwafu_info_researchfield_tl }, + { \c__nwafu_name_anonname_tl }, + { \c__nwafu_name_anonname_tl }, + { \c__nwafu_name_anonname_tl }, + { \l__nwafu_info_date_tl } + } + }{ + \clist_set:Nx \l__nwafu_tmpb_clist + { + { \l__nwafu_info_major_tl }, + { \l__nwafu_info_researchfield_tl }, + { \l__nwafu_info_author_tl }, + { \l__nwafu_info_supervisor_tl }, + { \l__nwafu_info_cosupervisor_tl }, + { \l__nwafu_info_date_tl } + } + } \__nwafu_get_max_text_width:NN \l__nwafu_tmpb_dim \l__nwafu_tmpb_clist } {2}{ @@ -2021,15 +2083,28 @@ { \c__nwafu_name_date_tl } } \__nwafu_get_max_text_width:NN \l__nwafu_tmpa_dim \l__nwafu_tmpa_clist - \clist_set:Nx \l__nwafu_tmpb_clist - { - { \l__nwafu_info_professionaltype_tl }, - { \l__nwafu_info_professionalfield_tl }, - { \l__nwafu_info_author_tl }, - { \l__nwafu_info_supervisor_tl }, - { \l__nwafu_info_cosupervisor_tl }, - { \l__nwafu_info_date_tl } - } + \bool_if:NTF \l__nwafu_anonymous_bool + { + \clist_set:Nx \l__nwafu_tmpb_clist + { + { \l__nwafu_info_professionaltype_tl }, + { \l__nwafu_info_professionalfield_tl }, + { \c__nwafu_name_anonname_tl }, + { \c__nwafu_name_anonname_tl }, + { \c__nwafu_name_anonname_tl }, + { \l__nwafu_info_date_tl } + } + }{ + \clist_set:Nx \l__nwafu_tmpb_clist + { + { \l__nwafu_info_professionaltype_tl }, + { \l__nwafu_info_professionalfield_tl }, + { \l__nwafu_info_author_tl }, + { \l__nwafu_info_supervisor_tl }, + { \l__nwafu_info_cosupervisor_tl }, + { \l__nwafu_info_date_tl } + } + } \__nwafu_get_max_text_width:NN \l__nwafu_tmpb_dim \l__nwafu_tmpb_clist } } @@ -2046,16 +2121,30 @@ { \c__nwafu_name_date_tl } } \__nwafu_get_max_text_width:NN \l__nwafu_tmpa_dim \l__nwafu_tmpa_clist - \clist_set:Nx \l__nwafu_tmpb_clist - { - { \l__nwafu_info_department_tl }, - { \l__nwafu_info_major_tl }, - { \l__nwafu_info_enroll_tl 级 \l__nwafu_info_class_id_tl 班 }, - { \l__nwafu_info_author_tl }, - { \l__nwafu_info_supervisor_tl }, - { \l__nwafu_info_cosupervisor_tl }, - { \l__nwafu_info_date_tl } - } + \bool_if:NTF \l__nwafu_anonymous_bool + { + \clist_set:Nx \l__nwafu_tmpb_clist + { + { \l__nwafu_info_department_tl }, + { \l__nwafu_info_major_tl }, + { \l__nwafu_info_enroll_tl 级 \l__nwafu_info_class_id_tl 班 }, + { \c__nwafu_name_anonname_tl }, + { \c__nwafu_name_anonname_tl }, + { \c__nwafu_name_anonname_tl }, + { \l__nwafu_info_date_tl } + } + }{ + \clist_set:Nx \l__nwafu_tmpb_clist + { + { \l__nwafu_info_department_tl }, + { \l__nwafu_info_major_tl }, + { \l__nwafu_info_enroll_tl 级 \l__nwafu_info_class_id_tl 班 }, + { \l__nwafu_info_author_tl }, + { \l__nwafu_info_supervisor_tl }, + { \l__nwafu_info_cosupervisor_tl }, + { \l__nwafu_info_date_tl } + } + } \__nwafu_get_max_text_width:NN \l__nwafu_tmpb_dim \l__nwafu_tmpb_clist } } @@ -2098,15 +2187,28 @@ { \c__nwafu_name_cosupervisor_en_tl }, { \c__nwafu_name_date_en_tl } } - \clist_set:Nx \l__nwafu_tmpb_clist - { - { \l__nwafu_info_major_en_tl }, - { \l__nwafu_info_researchfield_en_tl }, - { \l__nwafu_info_author_en_tl }, - { \l__nwafu_info_supervisor_en_tl }, - { \l__nwafu_info_cosupervisor_en_tl }, - { \l__nwafu_info_date_en_tl } - } + \bool_if:NTF \l__nwafu_anonymous_bool + { + \clist_set:Nx \l__nwafu_tmpb_clist + { + { \l__nwafu_info_major_en_tl }, + { \l__nwafu_info_researchfield_en_tl }, + { \c__nwafu_name_anonname_en_tl }, + { \c__nwafu_name_anonname_en_tl }, + { \c__nwafu_name_anonname_en_tl }, + { \l__nwafu_info_date_en_tl } + } + }{ + \clist_set:Nx \l__nwafu_tmpb_clist + { + { \l__nwafu_info_major_en_tl }, + { \l__nwafu_info_researchfield_en_tl }, + { \l__nwafu_info_author_en_tl }, + { \l__nwafu_info_supervisor_en_tl }, + { \l__nwafu_info_cosupervisor_en_tl }, + { \l__nwafu_info_date_en_tl } + } + } \bool_until_do:nn { \clist_if_empty_p:N \l__nwafu_tmpa_clist } { @@ -2145,15 +2247,28 @@ { \c__nwafu_name_cosupervisor_en_tl }, { \c__nwafu_name_date_en_tl } } - \clist_set:Nx \l__nwafu_tmpb_clist - { - { \l__nwafu_info_major_en_tl }, - { \l__nwafu_info_researchfield_en_tl }, - { \l__nwafu_info_author_en_tl }, - { \l__nwafu_info_supervisor_en_tl }, - { \l__nwafu_info_cosupervisor_en_tl }, - { \l__nwafu_info_date_en_tl } - } + \bool_if:NTF \l__nwafu_anonymous_bool + { + \clist_set:Nx \l__nwafu_tmpb_clist + { + { \l__nwafu_info_major_en_tl }, + { \l__nwafu_info_researchfield_en_tl }, + { \c__nwafu_name_anonname_en_tl }, + { \c__nwafu_name_anonname_en_tl }, + { \c__nwafu_name_anonname_en_tl }, + { \l__nwafu_info_date_en_tl } + } + }{ + \clist_set:Nx \l__nwafu_tmpb_clist + { + { \l__nwafu_info_major_en_tl }, + { \l__nwafu_info_researchfield_en_tl }, + { \l__nwafu_info_author_en_tl }, + { \l__nwafu_info_supervisor_en_tl }, + { \l__nwafu_info_cosupervisor_en_tl }, + { \l__nwafu_info_date_en_tl } + } + } \bool_until_do:nn { \clist_if_empty_p:N \l__nwafu_tmpa_clist } { @@ -2189,15 +2304,28 @@ { \c__nwafu_name_cosupervisor_en_tl }, { \c__nwafu_name_date_en_tl } } - \clist_set:Nx \l__nwafu_tmpb_clist - { - { Master ~ of ~ \l__nwafu_info_professionaltype_en_tl }, - { \l__nwafu_info_professionalfield_en_tl }, - { \l__nwafu_info_author_en_tl }, - { \l__nwafu_info_supervisor_en_tl }, - { \l__nwafu_info_cosupervisor_en_tl }, - { \l__nwafu_info_date_en_tl } - } + \bool_if:NTF \l__nwafu_anonymous_bool + { + \clist_set:Nx \l__nwafu_tmpb_clist + { + { Master ~ of ~ \l__nwafu_info_professionaltype_en_tl }, + { \l__nwafu_info_professionalfield_en_tl }, + { \c__nwafu_name_anonname_en_tl }, + { \c__nwafu_name_anonname_en_tl }, + { \c__nwafu_name_anonname_en_tl }, + { \l__nwafu_info_date_en_tl } + } + }{ + \clist_set:Nx \l__nwafu_tmpb_clist + { + { Master ~ of ~ \l__nwafu_info_professionaltype_en_tl }, + { \l__nwafu_info_professionalfield_en_tl }, + { \l__nwafu_info_author_en_tl }, + { \l__nwafu_info_supervisor_en_tl }, + { \l__nwafu_info_cosupervisor_en_tl }, + { \l__nwafu_info_date_en_tl } + } + } \bool_until_do:nn { \clist_if_empty_p:N \l__nwafu_tmpa_clist } { @@ -2245,12 +2373,22 @@ \skip_vertical:n { 1 ex } \end{minipage} }{ - \clist_set:Nx \l__nwafu_tmpb_clist - { - {\l__nwafu_info_author_tl }, - {\l__nwafu_info_supervisor_tl }, - {\l__nwafu_tmpa_tl }, - } + \bool_if:NTF \l__nwafu_anonymous_bool + { + \clist_set:Nx \l__nwafu_tmpb_clist + { + { \c__nwafu_name_anonname_tl }, + { \c__nwafu_name_anonname_tl }, + { \c__nwafu_name_anonname_tl }, + } + }{ + \clist_set:Nx \l__nwafu_tmpb_clist + { + {\l__nwafu_info_author_tl }, + {\l__nwafu_info_supervisor_tl }, + {\l__nwafu_tmpa_tl }, + } + } \__nwafu_get_max_text_width:NN \l__nwafu_tmpb_dim \l__nwafu_tmpb_clist \dim_set_eq:NN \l__nwafu_tmpt_dim \l__nwafu_tmpa_dim \dim_add:Nn \l__nwafu_tmpt_dim { \l__nwafu_tmpb_dim } @@ -2291,11 +2429,20 @@ \skip_vertical:n { 1 ex } \end{minipage} }{ - \clist_set:Nx \l__nwafu_tmpb_clist - { - {\l__nwafu_info_author_tl }, - {\l__nwafu_info_supervisor_tl }, - } + \bool_if:NTF \l__nwafu_anonymous_bool + { + \clist_set:Nx \l__nwafu_tmpb_clist + { + { \c__nwafu_name_anonname_tl }, + { \c__nwafu_name_anonname_tl }, + } + }{ + \clist_set:Nx \l__nwafu_tmpb_clist + { + {\l__nwafu_info_author_tl }, + {\l__nwafu_info_supervisor_tl }, + } + } \__nwafu_get_max_text_width:NN \l__nwafu_tmpb_dim \l__nwafu_tmpb_clist \dim_add:Nn \l__nwafu_tmpb_dim { \l__nwafu_tmpb_dim } \dim_set_eq:NN \l__nwafu_tmpt_dim \l__nwafu_tmpa_dim @@ -2341,19 +2488,22 @@ \__nwafu_get_max_text_width:NN \l__nwafu_tmpa_dim \l__nwafu_tmpa_clist \__nwafu_get_max_text_width:NN \l__nwafu_tmpb_dim \l__nwafu_tmpb_clist \__nwafu_get_max_text_width:NN \l__nwafu_tmpc_dim \l__nwafu_tmpc_clist - \begin{minipage} [ c ] { \textwidth } - \centering - \bool_until_do:nn { \clist_if_empty_p:N \l__nwafu_tmpa_clist } - { - \clist_pop:NN \l__nwafu_tmpa_clist \l__nwafu_tmpa_tl - \clist_pop:NN \l__nwafu_tmpb_clist \l__nwafu_tmpb_tl - \clist_pop:NN \l__nwafu_tmpc_clist \l__nwafu_tmpc_tl - \__nwafu_spread_box:Vn \l__nwafu_tmpa_dim { \l__nwafu_tmpa_tl } - \__nwafu_center_box:Vn \l__nwafu_tmpb_dim { \l__nwafu_tmpb_tl } - \__nwafu_spread_box:Vn \l__nwafu_tmpc_dim { \l__nwafu_tmpc_tl } - \skip_vertical:n { 0.5 ex } - } - \end{minipage} + \bool_if:NF \l__nwafu_anonymous_bool + { + \begin{minipage} [ c ] { \textwidth } + \centering + \bool_until_do:nn { \clist_if_empty_p:N \l__nwafu_tmpa_clist } + { + \clist_pop:NN \l__nwafu_tmpa_clist \l__nwafu_tmpa_tl + \clist_pop:NN \l__nwafu_tmpb_clist \l__nwafu_tmpb_tl + \clist_pop:NN \l__nwafu_tmpc_clist \l__nwafu_tmpc_tl + \__nwafu_spread_box:Vn \l__nwafu_tmpa_dim { \l__nwafu_tmpa_tl } + \__nwafu_center_box:Vn \l__nwafu_tmpb_dim { \l__nwafu_tmpb_tl } + \__nwafu_spread_box:Vn \l__nwafu_tmpc_dim { \l__nwafu_tmpc_tl } + \skip_vertical:n { 0.5 ex } + } + \end{minipage} + } } \cs_new_protected:Npn \__nwafu_cover_foundation: { @@ -2384,11 +2534,26 @@ \indent \__nwafu_qquad: 本研究得到 - \l__nwafu_tmpa_tl + \bool_if:NTF \l__nwafu_anonymous_bool + { + \c__nwafu_name_anonname_tl, + }{ + \l__nwafu_tmpa_tl + } \c__nwafu_fwid_colon_tl - \l__nwafu_tmpb_tl + \bool_if:NTF \l__nwafu_anonymous_bool + { + \c__nwafu_name_anonname_tl, + }{ + \l__nwafu_tmpb_tl + } (编号\c__nwafu_fwid_colon_tl - \l__nwafu_tmpc_tl + \bool_if:NTF \l__nwafu_anonymous_bool + { + \c__nwafu_name_anonname_tl, + }{ + \l__nwafu_tmpc_tl + } )资助 \par } |