%%
%% This is file `hdu-pg.config.code.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% hduthesis.dtx  (with options: `pg.config')
%% -----------------------------------------------------------------------
%%   Copyright (C) 2023-2025 by Mingyu Xia <myhsia@outlook.com>          *
%%                                                                       *
%%   It may be distributed and/or modified under the conditions of the   *
%%   LaTeX Project Public License (LPPL), either version 1.3c of this    *
%%   license or (at your option) any later version. The latest version   *
%%   of this license is in the file                                      *
%%                                                                       *
%%       http://www.latex-project.org/lppl.txt                           *
%%                                                                       *
%%   This work has the LPPL maintenance status `maintained'.             *
%%                                                                       *
%%   The Current Maintainer of this work is Mingyu Xia.                  *
%% -----------------------------------------------------------------------
\ExplSyntaxOn \makeatletter
\__hdu_provide_module:n {pg.config}
\geometry { top = 2.8cm, bottom = 3.2cm, left = 3.2cm, right = 3.2cm,
            headheight = 15pt, headsep = .72cm, footskip = 1.5cm }
\fancyhead[C]
  { \raisebox { .12ex } { \small 杭州电子科技大学硕士学位论文 } }
\hook_gput_code:nnn { cmd/tableofcontents/after } { . }
  {
    \clearpage
    \pagenumbering{arabic}
    \cfoot{\small \thepage}
  }
\RenewDocumentCommand \maketitle {}
  {
    \newgeometry{margin = 2.75cm}
    \begin{titlepage}
      \__hdu_maketitle_pg_auxi:
    \end{titlepage}
    \titlepage
      \__hdu_maketitle_pg_auxii:
    \endtitlepage
    \titlepage
      \__hdu_maketitle_pg_auxiii:
    \endtitlepage
    \restoregeometry
    \pagenumbering{Roman}
    \cfoot {\small \thepage}
  }
\cs_new_protected_nopar:Nn \__hdu_maketitle_pg_auxi:
  {
    \begin{center}
      \null
      \includegraphics[height = 2.35cm]{hdu-title}
      \par \vspace*{40\p@}
        {
          \LARGE
          \__hdu_cover_spread_box:nn {.575\linewidth} {硕士学位论文}
        }
      \par\vspace*{100\p@}
      \__hdu_font_semiLarge: 题 \qquad 目：
      \__hdu_cover_center_box:nn { .75\linewidth } { \kaishu \@title }
      \vspace*{24\p@}\par
      \begin{tabular}
        {
          >{ \__hdu_font_semiLarge: \centering \arraybackslash }
            p{4\ccwd}@{}
          >{ \__hdu_font_semiLarge: \centering \arraybackslash \kaishu }
            p{.65\linewidth}@{}
        }
        \__hdu_cover_spread_box:nn { 4\ccwd } { 研究生 } &
        \__hdu_cover_center_box:nn { .96\linewidth } { \@author }\\
        \__hdu_cover_spread_box:nn { 4\ccwd } { 专业 } &
        \__hdu_cover_center_box:nn { .96\linewidth }
          { \l__hdu_set_major_tl }\\
        \__hdu_cover_spread_box:nn { 4\ccwd } { 指导教师 } &
        \__hdu_cover_center_box:nn { .96\linewidth }
          {
            \l__hdu_set_cnsupervisor_tl \qquad \l__hdu_set_cnrole_tl
          }\\[13.5ex]
        \__hdu_font_semilarge: 完成日期 &
        \__hdu_cover_center_box:nn { .96\linewidth }
          {
            \__hdu_font_semilarge:
            \textsf { \int_use:N \c_sys_year_int } 年
            \textsf { \int_use:N \c_sys_month_int } 月
          }
      \end{tabular}
    \end{center}
  }
\cs_new_protected_nopar:Nn \__hdu_maketitle_pg_auxii:
  {
    \begin{center}
      \vspace*{25\p@}
        { \LARGE 杭州电子科技大学硕士学位论文 }
        \vspace*{140\p@} \par
        \begin{spacing}{1.15}
          \huge\textsf{ \@title }
        \end{spacing}
        \vspace*{128\p@} \par
        \begin{tabular}
          {
            >{ \__hdu_font_semiLarge: } p{6.25\ccwd}
            >{ \__hdu_font_semiLarge: \kaishu } l
          }
          \__hdu_cover_spread_box:nn { 4\ccwd } { 研究生 }：&
          \__hdu_cover_spread_box:nn { 4\ccwd } { \@author }\\[2ex]
          \__hdu_cover_spread_box:nn { 4\ccwd } { 指导教师 }：&
          \__hdu_cover_spread_box:nn { 4\ccwd }
            { \l__hdu_set_cnsupervisor_tl }
          \hskip 1.5em \l__hdu_set_cnrole_tl
        \end{tabular}
        \par \vspace{60\p@} \__hdu_font_semilarge:
        \textsf { \int_use:N \c_sys_year_int } \kaishu 年
        \textsf { \int_use:N \c_sys_month_int } \kaishu 月
    \end{center}
  }
\cs_new_protected_nopar:Nn \__hdu_maketitle_pg_auxiii:
  {
    \begin{center}
      \vspace*{16\p@}
      {
        \bfseries \__hdu_font_semilarge:
        Dissertation ~ Submitted ~ to ~
        Hangzhou ~ Dianzi ~ University\\[.8ex]
        for ~ the ~ Degree ~ of ~ Master
      }
      \vspace*{120\p@} \par
      \begin{spacing}{1.12}
        \huge \bfseries \l__hdu_set_entitle_tl
      \end{spacing}
      \vspace*{112\p@} \par
      \begin{tabular}{*2{>{\bfseries\large}l}}
        \__hdu_cover_spread_box:nn { 5em } {Candidate:~} &
        \l__hdu_set_enauthor_tl\\[3ex]
        \__hdu_cover_spread_box:nn { 5em } {Supervisor:~} &
        \l__hdu_set_enrole_tl{} ~ \l__hdu_set_ensupervisor_tl
        \\[11ex]
      \end{tabular}
      \vspace*{8\p@}\par
      \bfseries \large
      \clist_item:Nn
      \g__hdu_month_clist { \int_use:N \c_sys_month_int },~
      \int_use:N \c_sys_year_int
    \end{center}
  }
\NewDocumentCommand \commitment { O{} }
  {
    \cfoot {}
    \newgeometry{margin = 2.75cm}
    \titlepage
      \__hdu_commitment_pg_aux:n {#1}
    \endtitlepage
    \restoregeometry
    \cfoot {\small \thepage}
  }
\cs_new_protected_nopar:Npn \__hdu_commitment_pg_aux:n #1
  {
    \vspace*{-12\p@}
    \begin{center}
      \large
      杭州电子科技大学\\[1ex] 学位论文原创性声明和使用授权说明
    \end{center}
    \vspace*{20\p@}
    \begin{center}
      \__hdu_font_semilarge: 原创性声明
    \end{center}
    \par \vspace*{.4\baselineskip}
    \begin{spacing}{1.65}
      本人郑重声明：所呈交的学位论文，是本人在导师的指导下，
      独立进行研究工作所取得的成果。除文中已经注明引用的内容外，
      本论文不含任何其他个人或集体已经发表或撰写过的作品或成果。
      对本文的研究做出重要贡献的个人和集体，均已在文中以明确方式标明。\par
      \noindent 申请学位论文与资料若有不实之处，本人承担一切相关责任。
      \par \vspace*{1.25\baselineskip}
      \noindent \makebox [ .45\linewidth ] [ l ]
        {
          论文作者签名：
          \__hdu_sign_process_aux:nnn {#1} { 1 } { 0 }
          \tl_if_empty:NF \l__hdu_sign_figure_tl
            {
              \__hdu_commitment_sign:N
                \l__hdu_sign_figure_tl
              \tl_clear:N \l__hdu_sign_figure_tl
            }
        }
      日期：
      \makebox [ 2.5em ] [ l ]
        { \__hdu_sign_process_aux:nnn {#1} { 1 } { 1 } } 年
      \makebox [ 2em ]
        { \__hdu_sign_process_aux:nnn {#1} { 1 } { 2 } } 月
      \makebox [ 2em ]
        { \__hdu_sign_process_aux:nnn {#1} { 1 } { 3 } } 日
      \par\vspace*{20\p@}
      \begin{center}
        \__hdu_font_semilarge: 学位论文使用授权说明
      \end{center}
      \par \vspace*{.4\baselineskip}
      本人完全了解杭州电子科技大学关于保留和使用学位论文的规定，
      即：研究生在校攻读学位期间论文工作的知识产权单位属杭州电子科技大学。
      本人保证毕业离校后，
      发表论文或使用论文工作成果时署名单位仍然为杭州电子科技大学。
      学校有权保留送交论文的复印件，允许查阅和借阅论文；
      学校可以公布论文的全部或部分内容，
      可以允许采用影印、缩印或其它复制手段保存论文。
      （保密论文在解密后遵守此规定）
      \par \vspace*{1.25\baselineskip}
      \noindent \makebox [.45\linewidth] [ l ]
        {
          论文作者签名：
          \__hdu_sign_process_aux:nnn {#1} { 2 } { 0 }
          \tl_if_empty:NF \l__hdu_sign_figure_tl
            {
              \__hdu_commitment_sign:N
                \l__hdu_sign_figure_tl
              \tl_clear:N \l__hdu_sign_figure_tl
            }
        }
      日期：
      \makebox [ 2.5em ] [ l ]
        { \__hdu_sign_process_aux:nnn {#1} { 2 } { 1 } } 年
      \makebox [ 2em ]
        { \__hdu_sign_process_aux:nnn {#1} { 2 } { 2 } } 月
      \makebox [ 2em ]
        { \__hdu_sign_process_aux:nnn {#1} { 2 } { 3 } } 日
      \par \vspace*{\baselineskip}
      \noindent \makebox [ .45\linewidth ] [ l ]
        {
          指导教师签名：
          \__hdu_sign_process_aux:nnn {#1} { 3 } { 0 }
          \tl_if_empty:NF \l__hdu_sign_figure_tl
            {
              \__hdu_commitment_sign:N
                \l__hdu_sign_figure_tl
              \tl_clear:N \l__hdu_sign_figure_tl
            }
        }
      日期：
      \makebox [ 2.5em ] [ l ]
        { \__hdu_sign_process_aux:nnn {#1} { 3 } { 1 } } 年
      \makebox [ 2em ]
        { \__hdu_sign_process_aux:nnn {#1} { 3 } { 2 } } 月
      \makebox [ 2em ]
        { \__hdu_sign_process_aux:nnn {#1} { 3 } { 3 } } 日
    \end{spacing}
  }
\RenewDocumentEnvironment {abstract} { O{en} }
  {
    \str_if_eq:nnT {#1} {en}
      {
        \tl_set:Nn \l__hdu_keywords_name_tl {Keywords:~}
        \tl_set:Nn \l__hdu_keywords_sep_tl {,~}
        \@beginparpenalty \@lowpenalty
        \chapter*{\normalfont\bfseries Abstract}
        \addcontentsline{toc}{chapter}{\bfseries Abstract}
      }
    \str_if_eq:nnT {#1} {cn}
      {
        \tl_set:Nn \l__hdu_keywords_name_tl {\textsf{关键词：}}
        \tl_set:Nn \l__hdu_keywords_sep_tl {，}
        \@beginparpenalty \@lowpenalty
        \chapter*{摘要}
        \addcontentsline{toc}{chapter}{摘要}
      }
  }
  {
    \tl_clear:N \l__hdu_abstract_title_tl
    \clearpage
  }
\clist_new:N \l__hdu_keywords_clist
\NewDocumentCommand \keywords { m }
  {
    \par \vspace*{\baselineskip}
    \noindent\textbf{\l__hdu_keywords_name_tl}
    \clist_set:Nn \l__hdu_keywords_clist {#1}
    \clist_use:Nn \l__hdu_keywords_clist { \l__hdu_keywords_sep_tl }
  }
\RequirePackage{tocloft}
\renewcommand \contentsname {\hfill 目录 \hfill}
\renewcommand* \cfttoctitlefont{\sffamily\__hdu_font_semiLarge:}
\dim_set:Nn \cftbeforetoctitleskip {12pt}
\dim_set:Nn \cftaftertoctitleskip {24pt}
\dim_set:Nn \cftbeforechapskip {1pt}
\dim_set:Nn \cftbeforesecskip {-.2pt}
\patchcmd { \@dottedtocline }
  {
    \leaders
    \hbox { $\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$ }
  }
  {
    \kern 4pt \leaders
    \hbox { $\m@th\mkern .4 mu\hbox{.}\mkern .4 mu$ }
  } {}{}
\renewcommand* \l@chapter {\@dottedtocline{1}{0em}{1.6em}}
\renewcommand* \l@section {\@dottedtocline{1}{2.3em}{2.1em}}
\renewcommand* \@dotsep {1.7}
\renewcommand* \@pnumwidth {2.5ex}
\renewcommand* \cftchapfont {\normalfont}
\setcounter{tocdepth}{1}
\ctexset
  {
    chapter    =
      {
        aftername  = \hspace{.5\ccwd}, fixskip   = true,
        beforeskip = 32pt,             afterskip = 32pt,
        format+    = \sffamily \__hdu_font_semiLarge:,
        pagestyle  = fancy
      },
    section    =
      {
        aftername  = \hspace{.5\ccwd}, fixskip   = true,
        beforeskip = 2ex,              afterskip = 2.75ex,
        format     = \sffamily \large
      },
    subsection =
      {
        aftername  = \hspace{.5\ccwd}, fixskip   = true,
        beforeskip = 2ex,              afterskip = 2.75ex,
        format     = \sffamily \__hdu_font_semilarge:
      }
  }
\makeatother \ExplSyntaxOff
%% -----------------------------------------------------------------------
%%   This work consists of the files hduthesis.dtx,                      *
%%                                   hdu-graphics.dtx,                   *
%%                               and hduthesis.ins,                      *
%%             and the derived files hduthesis.cls,                      *
%%                                   hdu-<module>.code.tex,              *
%%                                   beamerthemehdu.sty,                 *
%%                                   hdu-logo.pdf,                       *
%%                                   hdu-title.pdf,                      *
%%                                   hdu-badge.pdf,                      *
%%                                   hdu-motto.pdf,                      *
%%                                   hduthesis.pdf,                      *
%%                                   hdu-graphics.pdf,                   *
%%                               and README.md.                          *
%% -----------------------------------------------------------------------
%%
%% End of file `hdu-pg.config.code.tex'.
