summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls')
-rw-r--r--Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls196
1 files changed, 129 insertions, 67 deletions
diff --git a/Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls b/Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls
index 057ec3a74dc..12f70c4c7ac 100644
--- a/Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls
+++ b/Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls
@@ -30,7 +30,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo $Id: nwafuthesis.dtx 1.14 2022-05-28 Nan Geng <nangeng@nwafu.edu.cn> $
+\GetIdInfo $Id: nwafuthesis.dtx 1.15 2022-05-29 Nan Geng <nangeng@nwafu.edu.cn> $
{Thesis template for Northwest A\&F University}
\ProvidesExplClass{\ExplFileName}
{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -85,6 +85,7 @@
\bool_set_true:N \g__nwafu_twoside_bool
\bool_new:N \g__nwafu_draft_bool
\bool_new:N \l__nwafu_withchap_bool
+\bool_new:N \l__nwafu_withsignature_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 }
@@ -1295,6 +1296,10 @@
withchapter .default:n = true,
withchapter .initial:n = true,
+ withsig .bool_set:N = \l__nwafu_withsignature_bool,
+ withsig .default:n = true,
+ withsig .initial:n = false,
+
chapnum .choice:,
chapnum .value_required:n = true,
chapnum .choices:nn =
@@ -2222,41 +2227,48 @@
}
\__nwafu_get_max_text_width:NN \l__nwafu_tmpa_dim \l__nwafu_tmpa_clist
\tl_set:Nn \l__nwafu_tmpa_tl {\clist_use:Nn \l__nwafu_info_instructors_clist {\__nwafu_quad: }}
- \clist_set:Nx \l__nwafu_tmpb_clist
+ \bool_if:NTF \l__nwafu_withsignature_bool
{
- {\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 }
- \dim_add:Nn \l__nwafu_tmpt_dim {2.5em}
- \begin{minipage} [ c ] { \l__nwafu_tmpt_dim }
- \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
- \l__nwafu_tmpa_tl
+ \begin{minipage} [ c ] { 17em }
+ \flushleft
+ \c__nwafu_name_author_tl
+ \c__nwafu_fwid_colon_tl
+ \__nwafu_blank_underline:n{ 12em }
+ \skip_vertical:n { 1.6 ex }
+ \c__nwafu_name_supervisor_tl
\c__nwafu_fwid_colon_tl
- \__nwafu_center_box:Vn \l__nwafu_tmpb_dim { \l__nwafu_tmpb_tl }
+ \__nwafu_blank_underline:n{ 12em }
+ \skip_vertical:n { 1.6 ex }
+ \c__nwafu_name_instructors_tl
+ \c__nwafu_fwid_colon_tl
+ \__nwafu_blank_underline:n{ 12em }
\skip_vertical:n { 1 ex }
- }
- % \c__nwafu_name_author_tl
- % \c__nwafu_fwid_colon_tl
- % \__nwafu_blank_underline:n{ 12em }
- % \skip_vertical:n { 1 ex }
- % \c__nwafu_name_supervisor_tl
- % \c__nwafu_fwid_colon_tl
- % \__nwafu_blank_underline:n{ 12em }
- % \skip_vertical:n { 1 ex }
- % \c__nwafu_name_instructors_tl
- % \c__nwafu_fwid_colon_tl
- % \__nwafu_blank_underline:n{ 12em }
- % \skip_vertical:n { 1 ex }
- \end{minipage}
+ \end{minipage}
+ }{
+ \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 }
+ \dim_add:Nn \l__nwafu_tmpt_dim {2.5em}
+ \begin{minipage} [ c ] { \l__nwafu_tmpt_dim }
+ \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
+ \l__nwafu_tmpa_tl
+ \c__nwafu_fwid_colon_tl
+ \__nwafu_center_box:Vn \l__nwafu_tmpb_dim { \l__nwafu_tmpb_tl }
+ \skip_vertical:n { 1.6 ex }
+ }
+ \skip_vertical:n { -0.6 ex }
+ \end{minipage}
+ }
}
{2}{
\clist_set:Nx \l__nwafu_tmpa_clist
@@ -2265,39 +2277,44 @@
{\c__nwafu_name_supervisor_tl },
}
\__nwafu_get_max_text_width:NN \l__nwafu_tmpa_dim \l__nwafu_tmpa_clist
- \clist_set:Nx \l__nwafu_tmpb_clist
+ \bool_if:NTF \l__nwafu_withsignature_bool
{
- {\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
- \dim_add:Nn \l__nwafu_tmpt_dim { \l__nwafu_tmpb_dim }
- \dim_add:Nn \l__nwafu_tmpt_dim {2.5em}
- \begin{minipage} [ c ] { \l__nwafu_tmpt_dim }
- \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
- \l__nwafu_tmpa_tl
+ \begin{minipage} [ c ] { 17em }
+ \flushleft
+ \c__nwafu_name_author_tl
\c__nwafu_fwid_colon_tl
- \__nwafu_center_box:Vn \l__nwafu_tmpb_dim { \l__nwafu_tmpb_tl }
+ \__nwafu_blank_underline:n{ 12em }
+ \skip_vertical:n { 1.6 ex }
+ \c__nwafu_name_supervisor_tl
+ \c__nwafu_fwid_colon_tl
+ \__nwafu_blank_underline:n{ 12em }
\skip_vertical:n { 1 ex }
- }
- % \begin{minipage} [ c ] { 17em }
- % \flushleft
- % \c__nwafu_name_author_tl
- % \c__nwafu_fwid_colon_tl
- % \__nwafu_blank_underline:n{ 12em }
- % \skip_vertical:n { 1 ex }
- % \c__nwafu_name_supervisor_tl
- % \c__nwafu_fwid_colon_tl
- % \__nwafu_blank_underline:n{ 12em }
- % \skip_vertical:n { 1 ex }
- \end{minipage}
+ \end{minipage}
+ }{
+ \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
+ \dim_add:Nn \l__nwafu_tmpt_dim { \l__nwafu_tmpb_dim }
+ \dim_add:Nn \l__nwafu_tmpt_dim {2.5em}
+ \begin{minipage} [ c ] { \l__nwafu_tmpt_dim }
+ \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
+ \l__nwafu_tmpa_tl
+ \c__nwafu_fwid_colon_tl
+ \__nwafu_center_box:Vn \l__nwafu_tmpb_dim { \l__nwafu_tmpb_tl }
+ \skip_vertical:n { 1.6 ex }
+ }
+ \skip_vertical:n { -0.6 ex }
+ \end{minipage}
+ }
}
}
}
@@ -3315,16 +3332,16 @@
\cs_new_protected:Npn \__nwafu_biblatex_pre_setup:
{
\__nwafu_pass_options_to_biblatex:n { style = gb7714-NWAFU }
- \__nwafu_pass_options_to_biblatex:n
- {
+ % \__nwafu_pass_options_to_biblatex:n
+ % {
% backend = biber,
% sortlocale=zh__pinyin, gbtype=false,
% maxbibnames=99, maxcitenames=2, mincitenames=1,
% gbpub=false, uniquename=false, uniquelist=false,
- gbnamefmt=lowercase,
+ % gbnamefmt=lowercase,
% doi=false, isbn=false,
% gbfieldtype=true, gbpunctin=false,
- }
+ % }
}
\cs_new_protected:Npn \__nwafu_biblatex_post_setup:
{
@@ -3341,6 +3358,51 @@
}
}
}
+ \def\gbcaselocalset{%
+ \renewrobustcmd*{\bibinitperiod}{}%
+ \renewcommand*{\revsdnamepunct}{}%
+ %\renewrobustcmd*{\bibinitdelim}{}%
+ }
+
+ \renewbibmacro*{name:family-given}[4]{%
+ \gbcaselocalset%
+ \ifuseprefix{%
+ \usebibmacro{name:delim}{##3##1}%
+ \usebibmacro{name:hook}{##3##1}%
+ \mkbibcompletenamefamilygiven{%
+ \ifdefvoid{##3}{}
+ {%
+ \ifcapital
+ {\mkbibnameprefix{\MakeCapital{##3}}\isdot}
+ {\mkbibnameprefix{##3}\isdot}%
+ \ifprefchar{}{\bibnamedelimc}
+ }%
+ \mkbibnamefamily{##1}\isdot
+ \ifdefvoid{##4}{}
+ {\bibnamedelimd\mkbibnamesuffix{##4}\isdot}%
+ \ifdefvoid{##2}{}
+ {\revsdnamepunct\bibnamedelimd\mkbibnamegiven{##2}\isdot}
+ }
+ }{%
+ \usebibmacro{name:delim}{##1}%
+ \usebibmacro{name:hook}{##1}%
+ \mkbibcompletenamefamilygiven{%
+ \mkbibnamefamily{##1}\isdot
+ \ifdefvoid{##4}{}
+ {\bibnamedelimd\mkbibnamesuffix{##4}\isdot}%
+ \ifboolexpe{%
+ test {\ifdefvoid{##2}}
+ and
+ test {\ifdefvoid{##3}}
+ }{}
+ {\revsdnamepunct}%
+ \ifdefvoid{##2}{}
+ {\bibnamedelimd\mkbibnamegiven{##2}\isdot}%
+ \ifdefvoid{##3}{}
+ {\bibnamedelimd\mkbibnameprefix{##3}\isdot}
+ }
+ }
+ }
}
\cs_new_protected:Npn \__nwafu_pass_options_to_biblatex:n #1
{ \PassOptionsToPackage {#1} { biblatex } }