diff options
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls b/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls index 9589608aa27..7a709219455 100644 --- a/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls +++ b/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls @@ -28,7 +28,7 @@ \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} \ProvidesExplClass{xdupgthesis} - {2022/12/06}{3.1.1.2} + {2022/12/11}{4.0.1.0} {Xidian University Postgraduate Thesis document class} \RequirePackage { xparse, l3keys2e } \PassOptionsToPackage { quiet } { xeCJK } @@ -460,6 +460,7 @@ \clist_new:N \l__xdu_keywords_zh_clist \clist_new:N \l__xdu_keywords_en_clist \clist_new:N \l__xdu_bib_file_clist +\clist_new:N \l__xdu_appendix_clist \tl_new:N \l__xdu_ack_tl \keys_define:nn { xdu / info } { @@ -475,6 +476,7 @@ keywords .clist_set:N = \l__xdu_keywords_zh_clist, keywords* .clist_set:N = \l__xdu_keywords_en_clist, bib-resource .clist_set:N = \l__xdu_bib_file_clist, + appendix .clist_set:N = \l__xdu_appendix_clist, acknowledgements .tl_set:N = \l__xdu_ack_tl } \keys_set:nn { xdu } @@ -491,6 +493,7 @@ info / keywords = { }, info / keywords* = { }, info / bib-resource = { }, + info / appendix = { }, info / acknowledgements = { } } \str_new:N \l__xdu_supv_str @@ -1587,8 +1590,7 @@ \dim_set:Nn \baselineskip { 20pt } } } -\RequirePackage { environ } -\NewEnviron { appendixes } +\cs_new:Npn \__xdu_appendix: { \cs_set:Npn \appendixname { \__xdu_lang_switch:nn { 附录 } { Appendix } } \tl_set_eq:NN \l__xdu_chaptername \appendixname @@ -1600,12 +1602,18 @@ { \cs_set:Npn \thealgorithm { \thechapter \arabic { algorithm } } } \cs_if_exist:NT \thealgocf { \cs_set:Npn \thealgocf { \thechapter \arabic { algocf } } } - \BODY - } -\ctex_at_end_preamble:n - { - \bool_if:NT \l__xdu_rm_appendix_bool - { \RenewEnviron { appendixes } { } } + \bool_if_exist:NTF \l__xdu_rm_appendix_bool + { + \bool_if:NF \l__xdu_rm_appendix_bool + { + \clist_map_inline:Nn \l__xdu_appendix_clist + { \file_if_exist_input:n { ##1 } } + } + } + { + \clist_map_inline:Nn \l__xdu_appendix_clist + { \file_if_exist_input:n { ##1 } } + } } \bool_new:N \l__xdu_phd \bool_new:N \l__xdu_master @@ -2408,7 +2416,8 @@ { \phantomsection \addcontentsline { zh.toc } { #1 } { \__xdu_sf_family: #2 } } { \phantomsection \addcontentsline { zh.toc } { #1 } { #2 } } } -\renewcommand { \frontmatter } +\RenewDocumentCommand { \frontmatter } { } { } +\cs_new:Npn \__xdu_frontmatter: { \loadgeometry { cover } \pagestyle { empty } @@ -2487,7 +2496,8 @@ } } } -\renewcommand { \mainmatter } +\RenewDocumentCommand { \mainmatter } { } { } +\cs_new:Npn \__xdu_mainmatter: { \__xdu_load_main_geometry: \pagestyle { plain } @@ -2562,8 +2572,10 @@ { \end { enumerate } } } } -\renewcommand { \backmatter } +\RenewDocumentCommand { \backmatter } { } { } +\cs_new:Npn \__xdu_backmatter: { + \__xdu_appendix: \__xdu_lang_switch:nn { } { \cs_set_eq:NN \chapter \__xdu_org_chapter:n @@ -2622,11 +2634,13 @@ subsection / indent = { \l__xdu_bio_indent_dim } } \setcounter { section } { 0 } - \addtocontents { toc } { \setcounter { tocdepth } { 0 } } + \addtocontents { toc } { \protect \setcounter { tocdepth } { 0 } } \file_if_exist_input:n { \l__xdu_bio_str } \group_end: } } +\ctex_after_end_preamble:n { \__xdu_frontmatter: \__xdu_mainmatter: } +\AtEndDocument { \__xdu_backmatter: } %% %% %% End of file `xdupgthesis.cls'. |