From e95ec8b1927bbee800a132cfd977182b1d67b106 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sun, 1 May 2022 20:12:37 +0000
Subject: njuthesis (1may22)

git-svn-id: svn://tug.org/texlive/trunk@63202 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/tex/latex/njuthesis/njuthesis.cls   | 303 ++++++++++++++-------
 1 file changed, 208 insertions(+), 95 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls')

diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls b/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
index 76fedcae47e..ea790df30ed 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
@@ -24,7 +24,7 @@
 %% `.dtx' through XeTeX.
 %% 
 \NeedsTeXFormat{LaTeX2e}
-\GetIdInfo $Id: njuthesis.dtx 0.17.0 2022-04-09 16:30:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
+\GetIdInfo $Id: njuthesis.dtx 0.18.0 2022-05-01 12:40:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
   {Thesis template for Nanjing University}
 \ProvidesExplClass{njuthesis}
   {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -86,23 +86,32 @@
     \int_to_arabic:n { \c_sys_month_int } -
     \int_to_arabic:n { \c_sys_day_int   }
   }
-\clist_const:Nn \g__nju_name_type_clist
+\clist_const:Nn \c__nju_name_type_clist
   { 毕业论文, 毕业设计 }
-\clist_const:Nn \g__nju_name_type_en_clist
+\clist_const:Nn \c__nju_name_type_en_clist
   { THESIS, DESIGN }
-\clist_const:Nn \g__nju_name_degree_clist
+\clist_const:Nn \c__nju_name_degree_clist
   { 学士, 硕士, 硕士专业, 博士 }
-\clist_const:Nn \g__nju_name_degree_en_clist
+\clist_const:Nn \c__nju_name_degree_en_clist
   { Bachelor, Master, Master, Doctor~of~Philosophy }
 \clist_const:Nn \c__nju_month_en_clist
   {
     January, February, March, April, May, June,
     July, August, September, October, November, December
   }
+\clist_const:Nn \c__nju_blind_info_clist
+  {
+    author, chairman, clc, dept, email, field, grade,
+    id, major, secretlv, supvcont, udc
+  }
+\clist_const:Nn \c__nju_blind_info_en_clist
+  { author, dept, field, major, supv, supv_ii }
+\clist_const:Nn \c__nju_blind_infolist_clist
+  { reviewer, supv, supv_ii }
 \cs_new:Nn \__nju_quad:  { \skip_horizontal:n { 1 em } }
 \cs_new:Nn \__nju_qquad: { \skip_horizontal:n { 2 em } }
-\cs_new:Nn \__nju_vskip: { \skip_vertical:N   \g__nju_smallvskip_dim }
-\cs_new:Nn \__nju_hskip: { \skip_horizontal:N \g__nju_smallhskip_dim }
+\cs_new:Nn \__nju_vskip: { \skip_vertical:N   \c__nju_smallvskip_dim }
+\cs_new:Nn \__nju_hskip: { \skip_horizontal:N \c__nju_smallhskip_dim }
 \cs_new_protected:Npn \__nju_vskip:N #1
   {
     \hrule height \c_zero_dim
@@ -111,38 +120,24 @@
     \skip_vertical:N #1
   }
 \cs_new_protected:Npn \__nju_define_name:nn #1#2
-  {
-    \tl_new:c   { g__nju_name_ #1    _tl }
-    \tl_gset:cn { g__nju_name_ #1    _tl } { #2 }
-  }
+  { \tl_const:cn { c__nju_name_ #1    _tl } { #2 } }
 \cs_new_protected:Npn \__nju_define_name:nnn #1#2#3
   {
-    \tl_new:c   { g__nju_name_ #1    _tl }
-    \tl_gset:cn { g__nju_name_ #1    _tl } { #2 }
-    \tl_new:c   { g__nju_name_ #1 _en_tl }
-    \tl_gset:cn { g__nju_name_ #1 _en_tl } { #3 }
+    \tl_const:cn { c__nju_name_ #1    _tl } { #2 }
+    \tl_const:cn { c__nju_name_ #1 _en_tl } { #3 }
   }
 \cs_new_protected:Npn \__nju_define_fmt:nn #1#2
-  {
-    \tl_new:c   { g__nju_fmt_ #1 _tl }
-    \tl_gset:cn { g__nju_fmt_ #1 _tl } { #2 }
-  }
+  { \tl_const:cn { c__nju_fmt_ #1 _tl } { #2 } }
 \cs_new_protected:Npn \__nju_define_dim:nn #1#2
-  {
-    \dim_new:c   { g__nju_ #1 _dim }
-    \dim_gset:cn { g__nju_ #1 _dim } { #2 }
-  }
+  { \dim_const:cn  { c__nju_ #1 _dim  } { #2 } }
 \cs_new_protected:Npn \__nju_define_skip:nn #1#2
-  {
-    \skip_new:c   { g__nju_ #1 _skip }
-    \skip_gset:cn { g__nju_ #1 _skip } { #2 }
-  }
+  { \skip_const:cn { c__nju_ #1 _skip } { #2 } }
 \cs_new_protected:Npn \__nju_add_theorem_type:nnn #1#2#3
   {
     \clist_gput_right:Nn \g__nju_theorem_type_clist { #1 }
     \__nju_define_name:nnn { #1 } { #2 } { #3 }
   }
-\cs_new:Npn \__nju_name:n #1 { \tl_use:c { g__nju_name_ #1 _tl } }
+\cs_new:Npn \__nju_name:n #1 { \tl_use:c { c__nju_name_ #1 _tl } }
 \cs_new:Npn \__nju_info:n #1 { \tl_use:c { g__nju_info_ #1 _tl } }
 \cs_new_protected:Npn \__nju_ulined_center_box:nn #1#2
   {
@@ -169,13 +164,6 @@
         \int_incr:N #1
       }
   }
-\cs_new_protected:Npn \__nju_put_inempty_seg:nnn #1#2#3
-  {
-    \tl_set:Nx \l__nju_tmpa_tl
-      { \tl_range:Nnn { #1 } { #2 } { #2 + #3 - 1 } }
-    \tl_if_empty:NF \l__nju_tmpa_tl
-      { \clist_put_right:NV \l__nju_tmp_clist { \l__nju_tmpa_tl } }
-  }
 \cs_new_protected:Npn \__nju_uline:n #1
   {
     \mode_leave_vertical:
@@ -242,13 +230,13 @@
   {
     \tl_if_empty:NT \g__nju_info_title_tl
       { \msg_error:nn { njuthesis } { missing-title } }
-    \__nju_spread_box:nnV { #2 } { \kaishu } \g__nju_name_title_tl
+    \__nju_spread_box:nnV { #2 } { \kaishu } \c__nju_name_title_tl
     \mode_leave_vertical: \__nju_hskip:
     \parbox [ t ] { #3 }
       {
-        \dim_set_eq:NN \baselineskip \g__nju_coverlineskip_dim
+        \dim_set_eq:NN \baselineskip \c__nju_coverlineskip_dim
         #1 \__nju_uline_title:
-        \dim_set_eq:NN \l__nju_tmpa_dim \prevdepth
+        \dim_gset_eq:NN \l__nju_tmpa_dim \prevdepth
       }
     \par \prevdepth \l__nju_tmpa_dim
   }
@@ -277,12 +265,16 @@
     \__nju_ulined_center_box:nn { #3 }
       { \clist_item:cn { g__nju_info_ #1 _clist } { 1 } }
     \__nju_hskip:
-    \__nju_spread_box:nnV { #2 } { \kaishu } \g__nju_name_supv_ttl_tl
+    \__nju_spread_box:nnV { #2 } { \kaishu } \c__nju_name_supv_ttl_tl
     \__nju_hskip:
     \__nju_ulined_center_box:nn { #3 }
       { \clist_item:cn { g__nju_info_ #1 _clist } { 2 } }
     \par
   }
+\cs_new_protected:Npn \__nju_emblem:N #1
+  { \njuemblem [ black ] { #1 } { ! } }
+\cs_new_protected:Npn \__nju_name:N   #1
+  { \njuname   [ black ] { #1 } { ! } }
 \cs_new_protected:Npn \__nju_abs_bookmark:nn #1#2
   {
     \phantomsection
@@ -396,7 +388,8 @@
   }
   {
     \AssignTemplateKeys
-    \newpage
+    \clearpage
+    \thispagestyle { empty }
     \__nju_vskip:N \l__njupage_top_skip
     \group_begin:
       \l__njupage_format_tl
@@ -426,6 +419,8 @@
     oneside   .value_forbidden:n  = true,
     twoside   .value_forbidden:n  = true,
     oneside .bool_gset_inverse:N  = \g__nju_twoside_bool,
+    blind     .value_forbidden:n  = true,
+    blind            .bool_set:N  = \g__nju_blind_bool,
     latin-font        .choices:nn =
       { gyre, mac, win, none }
       { \tl_set_eq:NN \g__nju_latin_font_tl \l_keys_choice_tl },
@@ -437,18 +432,26 @@
 \ProcessKeysOptions { nju }
 \keys_define:nn { nju }
   {
-    bib   .meta:nn = { nju / bib   } { #1 },
-    info  .meta:nn = { nju / info  } { #1 },
-    style .meta:nn = { nju / style } { #1 }
+    % abstract .meta:nn = { nju / abstract } { #1 },
+    bib      .meta:nn = { nju / bib      } { #1 },
+    % cover    .meta:nn = { nju / cover    } { #1 },
+    % font     .meta:nn = { nju / font     } { #1 },
+    % footer   .meta:nn = { nju / footer   } { #1 },
+    % footnote .meta:nn = { nju / footnote } { #1 },
+    % header   .meta:nn = { nju / header   } { #1 },
+    info     .meta:nn = { nju / info     } { #1 },
+    style    .meta:nn = { nju / style    } { #1 },
+    theorem  .meta:nn = { nju / theorem  } { #1 }
+    % toc      .meta:nn = { nju / toc      } { #1 }
   }
 \NewDocumentCommand \njusetup { m } { \keys_set:nn { nju } { #1 } }
 \NewDocumentCommand \njusetformat { m m }
-  { \tl_gset:cn { g__nju_fmt_ #1 _tl } { #2 } }
+  { \tl_gset:cn { c__nju_fmt_ #1 _tl } { #2 } }
 \NewDocumentCommand \njusetlength { s m m }
   {
     \bool_if:nTF { #1 }
-      { \skip_gset:cn { g__nju_ #2 _skip } { #3 } }
-      { \dim_gset:cn  { g__nju_ #2 _dim  } { #3 } }
+      { \skip_gset:cn { c__nju_ #2 _skip } { #3 } }
+      { \dim_gset:cn  { c__nju_ #2 _dim  } { #3 } }
   }
 \NewDocumentCommand \njusetname { s m o m }
   { \__nju_set_tokenlist:nnnnn {#1} {#2} {#3} {#4} { name } }
@@ -462,7 +465,7 @@
     \bool_if:nTF       { #1 }
       { \tl_set:Nn  \l__nju_tmpb_tl { _en  } }
       { \tl_clear:N \l__nju_tmpb_tl          }
-    \tl_gset:cn { g__nju_ #5 _ #2 \l__nju_tmpa_tl \l__nju_tmpb_tl _tl } {#4}
+    \tl_gset:cn { c__nju_ #5 _ #2 \l__nju_tmpa_tl \l__nju_tmpb_tl _tl } {#4}
   }
 \PassOptionsToClass
   {
@@ -480,7 +483,6 @@
   {
     { no-math           } { fontspec     },
     { perpage           } { footmisc     },
-    { amsmath, thmmarks } { ntheorem     },
     { hyphens           } { url          },
     { warnings-off={ mathtools-colon, mathtools-overbracket } }
                           { unicode-math },
@@ -493,10 +495,10 @@
   {
     geometry,
     fancyhdr,
+    footmisc,
     setspace,
     mathtools,
     unicode-math,
-    ntheorem,
     booktabs,
     caption,
     graphicx,
@@ -527,13 +529,34 @@
     Please~ update~ an~ up-to-date~ version~ of~ it~
     using~ your TeX~ package~ manager~ or~ from~ CTAN.
   }
-\cs_new_protected:Npn \__nju_check_package:nnn #1#2#3
+\cs_new_protected:Npn \__nju_check_pkg_version:nnn #1#2#3
   {
     \@ifpackagelater {#1} {#2}
       { } { \msg_error:nnnn { njuthesis } { package-too-old } {#1} {#3} }
   }
 \sys_if_engine_luatex:T
-  { \__nju_check_package:nnn { luatexja } { 2021/10/24 } { 20211024.0 } }
+  { \__nju_check_pkg_version:nnn { luatexja } { 2021/10/24 } { 20211024.0 } }
+\RequirePackage { filehook }
+\msg_new:nnn { njuthesis } { package-conflict }
+  {
+    The~ "#2"~ package~ is~ incompatible~ with~ "#1".\\
+    I~ have~ loaded~ "#1"~ by~ default.~ Maybe~ You~ should~
+    refer~ to~ section~ 4~ of~ the~ "njuthesis"~ manual.
+  }
+\cs_new_protected:Npn \__nju_check_pkg_conflict:nn #1#2
+  {
+    \AtEndOfPackageFile * { #1 }
+      {
+        \AtBeginOfPackageFile * { #2 }
+          { \msg_error:nnnn { njuthesis } { package-conflict } {#1} {#2} }
+      }
+  }
+\clist_map_inline:nn
+  {
+    amscd, amsfonts, amssymb, bbm, bm, eucal,
+    eufrak, mathrsfs, newtxmath, upgreek
+  }
+  { \__nju_check_pkg_conflict:nn { unicode-math } { #1 } }
 \int_compare:nTF { \g__nju_info_degree_int == 1 }
   { \file_input:n { njuthesis-undergraduate.def } }
   { \file_input:n { njuthesis-     graduate.def } }
@@ -575,23 +598,37 @@
     clc                 .tl_set:N = \g__nju_info_clc_tl,
     secret-level        .tl_set:N = \g__nju_info_secretlv_tl,
     udc                 .tl_set:N = \g__nju_info_udc_tl,
-    supervisor-contact  .tl_set:N = \g__nju_info_supv_cont_tl,
+    supervisor-contact  .tl_set:N = \g__nju_info_supvcont_tl,
     email               .tl_set:N = \g__nju_info_email_tl
   }
 \tl_set:Nx \g__nju_info_degree_tl
   {
-    \clist_item:Nn \g__nju_name_degree_clist
+    \clist_item:Nn \c__nju_name_degree_clist
       { \g__nju_info_degree_int }
   }
 \int_compare:nTF { \g__nju_info_degree_int == 1 }
   { \tl_set:Nn \g__nju_info_diploma_tl { ug } }
   { \tl_set:Nn \g__nju_info_diploma_tl { g  } }
 \tl_set:Nx \g__nju_info_type_tl
-  { \clist_item:Nn \g__nju_name_type_clist    { \g__nju_info_type_int } }
+  { \clist_item:Nn \c__nju_name_type_clist    { \g__nju_info_type_int } }
 \tl_set:Nx \g__nju_info_type_en_tl
-  { \clist_item:Nn \g__nju_name_type_en_clist { \g__nju_info_type_int } }
+  { \clist_item:Nn \c__nju_name_type_en_clist { \g__nju_info_type_int } }
 \tl_put_left:Nx \g__nju_info_type_tl
-  { \tl_use:c { g__nju_name_ \g__nju_info_diploma_tl _tl } }
+  { \tl_use:c { c__nju_name_ \g__nju_info_diploma_tl _tl } }
+\bool_if:NT \g__nju_blind_bool
+  {
+    \ctex_at_end_preamble:n
+      {
+        \clist_map_inline:Nn \c__nju_blind_info_clist
+          { \tl_gclear:c    { g__nju_info_ #1    _tl } }
+        \clist_map_inline:Nn \c__nju_blind_info_en_clist
+          { \tl_gclear:c    { g__nju_info_ #1 _en_tl } }
+        \clist_map_inline:Nn \c__nju_blind_infolist_clist
+          { \clist_gclear:c { g__nju_info_ #1 _clist } }
+        \tl_gclear:N \c__nju_name_nju_tl
+        \tl_gclear:N \c__nju_name_nju_en_tl
+      }
+  }
 \ctex_at_end_preamble:n
   {
     \bool_set:Nn \l__nju_second_supv_bool
@@ -938,7 +975,7 @@
     \pagenumbering { Roman }
   }
 \cs_new_protected:Npn \__nju_add_tocline:n #1
-  { \addcontentsline { toc } { chapter } { \g__nju_fmt_chapterintoc_tl #1 } }
+  { \addcontentsline { toc } { chapter } { \c__nju_fmt_chapterintoc_tl #1 } }
 \cs_generate_variant:Nn \__nju_add_tocline:n { V }
 \cs_new_protected:Npn \__nju_chapter:n #1
   {
@@ -958,14 +995,16 @@
   {
     chapter        / beforeskip = 10 pt,
     chapter        / afterskip  = 60 pt,
-    chapter        / format     = \g__nju_fmt_chapter_tl,
-    section        / format     = \g__nju_fmt_section_tl,
-    subsection     / format     = \g__nju_fmt_subsection_tl,
-    subsubsection  / format     = \g__nju_fmt_subsubsection_tl,
-    contentsname   = \g__nju_name_tableofcontents_tl,
-    listfigurename = \g__nju_name_listoffigures_tl,
-    listtablename  = \g__nju_name_listoftables_tl,
-    chapter / tocline = \g__nju_fmt_chapterintoc_tl \CTEXnumberline { #1 } #2
+    chapter        / format     = \c__nju_fmt_chapter_tl,
+    section        / format     = \c__nju_fmt_section_tl,
+    subsection     / format     = \c__nju_fmt_subsection_tl,
+    subsubsection  / format     = \c__nju_fmt_subsubsection_tl,
+    paragraph      / format     = \c__nju_fmt_paragraph_tl,
+    subparagraph   / format     = \c__nju_fmt_subparagraph_tl,
+    contentsname   = \c__nju_name_tableofcontents_tl,
+    listfigurename = \c__nju_name_listoffigures_tl,
+    listtablename  = \c__nju_name_listoftables_tl,
+    chapter / tocline = \c__nju_fmt_chapterintoc_tl \CTEXnumberline { #1 } #2
   }
 \keys_define:nn { nju / style }
   {
@@ -976,7 +1015,7 @@
   {
     \group_begin:
       \keys_set:nn { ctex }
-        { chapter/format = \g__nju_fmt_toctitle_tl }
+        { chapter/format = \c__nju_fmt_toctitle_tl }
       \bool_if:NTF \g__nju_toc_in_toc_bool
         { \__nju_chapter:n { #1 } }
         {
@@ -1076,7 +1115,7 @@
         pdftitle    = \g__nju_info_title_tl,
         pdfauthor   = \g__nju_info_author_tl,
         pdfkeywords = \g__nju_info_keywords_clist,
-        pdfcreator  = \g__nju_name_pdfcreator_tl
+        pdfcreator  = \c__nju_name_pdfcreator_tl
       }
   }
 \cs_new_protected:Npn \__nju_cref_name:n #1
@@ -1096,6 +1135,38 @@
 \crefformat { subsubsection } { 第~#2#1#3~小节 }
 \__nju_cref_name:n { figure, table, appendix, proof }
 \__nju_cref_name:V \g__nju_theorem_type_clist
+\tl_new:N \l__nju_fn_style_tl
+\keys_define:nn { nju / style }
+  {
+    footnote-style .choices:nn = { plain, pifont }
+      {
+        \tl_gset_eq:NN \l__nju_fn_style_tl \l_keys_choice_tl
+        \int_compare:nT { \l_keys_choice_int = 2 }
+          { \RequirePackage { pifont } }
+      }
+  }
+\cs_new:Npn \__nju_fn_symbol_pifont:n #1
+  { \ding { \int_eval:n { 171 + #1 } } }
+\tl_const:Nn \c__nju_fn_style_plain_tl  { plain  }
+\tl_const:Nn \c__nju_fn_style_pifont_tl { pifont }
+\cs_new:Npn \__nju_footnote_number:N #1
+  {
+    \tl_case:NnF \l__nju_fn_style_tl
+      {
+        \c__nju_fn_style_plain_tl
+          { \int_use:N #1 }
+        \c__nju_fn_style_pifont_tl
+          { \__nju_fn_symbol_pifont:n {#1} }
+      }
+      { \int_use:N #1 }
+  }
+\cs_set:Npn \thefootnote { \__nju_footnote_number:N \c@footnote }
+\cs_set:Npn \@makefntext #1
+  {
+    \mode_leave_vertical:
+    \hbox_to_wd:nn { 1.5 em } { \@thefnmark \hfil }
+    #1
+  }
 \DeclareGraphicsExtensions { .pdf, .eps, .jpg, .png }
 \BeforeBeginEnvironment { tabular } { \centering \zihao {5} }
 \DeclareCaptionStyle{njucap}
@@ -1108,18 +1179,49 @@
 \captionsetup [ figure ] { style = njucap }
 \captionsetup [ table  ] { style = njucap }
 \setlist { noitemsep }
-\cs_new_protected:Npn \__nju_new_theorem:N #1
+\keys_define:nn { nju / theorem }
+  {
+    predefine     .bool_set:N  = \g__nju_thm_predefine_bool,
+    style           .tl_set:N  = \l__nju_thm_style_tl,
+    header-font     .tl_set:N  = \l__nju_thm_header_font_tl,
+    body-font       .tl_set:N  = \l__nju_thm_body_font_tl,
+    qed-symbol      .tl_set:N  = \l__nju_thm_qed_symbol_tl,
+    counter         .tl_set:N  = \l__nju_thm_counter_tl,
+    predefine      .initial:n  = true,
+    style          .initial:n  = plain,
+    header-font    .initial:n  = \normalfont \bfseries,
+    body-font      .initial:n  = \itshape,
+    qed-symbol     .initial:n  = \ensuremath { \mdwhtsquare },
+    counter        .initial:n  = chapter
+  }
+\cs_new_protected:Npn \__nju_new_theorem:Nn #1#2
   {
-    \theoremsymbol { }
     \clist_map_inline:Nn #1
-      { \newtheorem { ##1 } { \__nju_name:n { ##1 } } }
-  }
-\theoremsymbol { \ensuremath { \mdwhtsquare } }
-\newtheorem* { proof } { \g__nju_name_proof_tl }
-\group_begin:
-  \clist_remove_all:Nn \g__nju_theorem_type_clist { proof }
-  \__nju_new_theorem:N \g__nju_theorem_type_clist
-\group_end:
+      { \newtheorem { ##1 } { \__nju_name:n { ##1 } } [#2] }
+  }
+\cs_generate_variant:Nn \__nju_new_theorem:Nn { NV }
+\cs_new_protected:Npn \__nju_ntheorem_post_setup:
+  {
+    \exp_args:NV \theoremstyle      \l__nju_thm_style_tl
+    \exp_args:NV \theoremheaderfont \l__nju_thm_header_font_tl
+    \exp_args:NV \theorembodyfont   \l__nju_thm_body_font_tl
+    \exp_args:NV \theoremsymbol     \l__nju_thm_qed_symbol_tl
+    \newtheorem* { proof } { \c__nju_name_proof_tl }
+    \theoremsymbol { }
+    \group_begin:
+      \clist_remove_all:Nn \g__nju_theorem_type_clist { proof }
+      \__nju_new_theorem:NV \g__nju_theorem_type_clist \l__nju_thm_counter_tl
+    \group_end:
+  }
+\ctex_at_end_preamble:n
+  {
+    \bool_if:NT \g__nju_thm_predefine_bool
+      {
+        \PassOptionsToPackage { amsmath, thmmarks } { ntheorem }
+        \RequirePackage { ntheorem }
+        \__nju_ntheorem_post_setup:
+      }
+  }
 \cs_new_protected:Npn \__nju_new_img_cmd:nn #1#2
   {
     \exp_args:Nc \NewDocumentCommand { #1 } { o m m }
@@ -1152,6 +1254,11 @@
         \msg_warning:nn { njuthesis } { missing-image }
         \RequirePackage { njuvisual }
       }
+    \bool_if:NT \g__nju_blind_bool
+      {
+        \RenewDocumentCommand \njuemblem { o m m } { \prg_do_nothing: }
+        \RenewDocumentCommand \njuname   { o m m } { \prg_do_nothing: }
+      }
   }
 \RenewDocumentCommand \maketitle { }
   {
@@ -1163,34 +1270,38 @@
           { \__nju_make_cover:    }
       }
     \tl_remove_all:Nn \g__nju_info_title_tl { \\ }
-\bool_if:NF \g__nju_draft_bool
-  {
-    \bool_if:NT \g__nju_decl_bool
+    \bool_if:NF \g__nju_draft_bool
       {
-        \__nju_make_origdecl:
-        \AtEndEnvironment { document }
-          { \__nju_make_authdecl: }
+        \bool_if:NT \g__nju_decl_bool
+          {
+            \__nju_make_origdecl:
+            \AtEndEnvironment { document }
+              {
+                \cleardoublepage
+                \__nju_make_authdecl:
+                \cleardoublepage
+              }
+          }
       }
-  }
     \cleardoublepage
     \exp_args:NV \pagestyle \c__nju_pagestyle_tl
     \pagenumbering { Roman }
   }
 \__nju_declare_element:nn { abstract / mark }
   {
-    content     = \g__nju_name_abstract_b_tl,
+    content     = \c__nju_name_abstract_b_tl,
     format      = \sffamily \zihao { -3 },
     bottom-skip = 1 cm
   }
 \__nju_declare_element:nn { abstract / en / mark }
   {
-    content     = \g__nju_name_abstract_b_en_tl,
+    content     = \c__nju_name_abstract_b_en_tl,
     format      = \sffamily \zihao { -3 },
     bottom-skip = 1 cm
   }
 \cs_new_protected:Npn \__nju_print_keywords:nn #1#2
   {
-    \tl_set:Nv \l__nju_tmpa_tl { g__nju_name_keywords #1 _tl }
+    \tl_set:Nv \l__nju_tmpa_tl { c__nju_name_keywords #1 _tl }
     \__nju_get_text_width:NV \l__nju_tmpa_dim \l__nju_tmpa_tl
     \list { \l__nju_tmpa_tl }
       {
@@ -1231,7 +1342,7 @@
   {
     \cleardoublepage
     \thispagestyle { plain }
-    \__nju_abs_bookmark:Vn \g__nju_name_abstract_a_tl { abstract }
+    \__nju_abs_bookmark:Vn \c__nju_name_abstract_a_tl { abstract }
     \__nju_make_abstract:
     \group_begin: \kaishu \zihao { -4 } #1
   }
@@ -1240,17 +1351,19 @@
   {
     \cleardoublepage
     \thispagestyle { plain }
-    \__nju_abs_bookmark:Vn \g__nju_name_abstract_a_en_tl { abstract-en }
+    \__nju_abs_bookmark:Vn \c__nju_name_abstract_a_en_tl { abstract-en }
     \__nju_make_abstract_en:
     \group_begin: \zihao { -4 } #1
   }
   { \__nju_print_keywords:nn { _en } { ;~ } \group_end: }
 \NewDocumentEnvironment { preface         } { +b }
-  { \__nju_chapter:V \g__nju_name_preface_tl         #1 } { }
+  { \__nju_chapter:V \c__nju_name_preface_tl         #1 }
+  { \cleardoublepage }
 \NewDocumentEnvironment { acknowledgement } { +b }
-  { \__nju_chapter:V \g__nju_name_acknowledgement_tl #1 } { }
+  { \__nju_chapter:V \c__nju_name_acknowledgement_tl #1 }
+  { \cleardoublepage }
 \NewDocumentCommand \njupaperlist
-  { O { \g__nju_name_paperlist_tl } m }
+  { O { \c__nju_name_paperlist_tl } m }
   {
     \group_begin:
     \RenewDocumentCommand \mkbibnamegiven  { m }
@@ -1285,13 +1398,13 @@
   }
 \NewDocumentEnvironment { notation } { O { 10 em } O { 5 em } }
   {
-    \__nju_chapter:V \g__nju_name_notation_tl
+    \__nju_chapter:V \c__nju_name_notation_tl
     \__nju_make_notation:nn { #1 } { #2 }
   }
-  { \endlist }
+  { \endlist \cleardoublepage }
 \NewDocumentEnvironment { notation* } { O { 10 em } O { 5 em } }
   {
-    \chapter * { \g__nju_name_notation_tl }
+    \chapter * { \c__nju_name_notation_tl }
     \__nju_make_notation:nn { #1 } { #2 }
   }
   { \endlist }
-- 
cgit v1.2.3

