%%
%% This is file `hdu-bc.config.code.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% hduthesis.dtx  (with options: `bc.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 {bc.config}
\geometry { top     = 3.25cm, bottom     = 2.4cm,
            left    = 4cm,    right      = 2cm,
            headsep = .72cm,  headheight = 15pt }
\fancyhead[C]
  {
    \raisebox { .12ex }
      { \small 杭州电子科技大学 \l__hdu_set_entitle_tl }
  }
\hook_gput_code:nnn {cmd/tableofcontents/before} { . }
  {
    \clearpage
    \pagenumbering{Roman} \cfoot{\small \thepage}
  }
\hook_gput_code:nnn { cmd/tableofcontents/after } { . }
  {
    \thispagestyle{fancy} \clearpage
    \pagenumbering{arabic} \cfoot{}
  }
\RenewDocumentCommand \maketitle {}
  {
    \newgeometry { margin = 3cm }
    \titlepage \__hdu_maketitle_bc_auxi: \endtitlepage
    \restoregeometry
  }
\int_new:N \l__hdu_grade_int
\int_set:Nn \l__hdu_grade_int
  {
    \int_compare:nNnTF { \c_sys_month_int } < 9
      { \c_sys_year_int } { \int_eval:n { \c_sys_year_int + 1 } }
  }
\cs_new_protected_nopar:Nn \__hdu_maketitle_bc_auxi:
  {
    \begin{center}
      \vspace*{14\p@}
      \includegraphics[ width = .64\linewidth ]{hdutitle}
      \par \vspace*{36\p@}
      \scalebox{2.75}
      {
        \textbf
          {
            \__hdu_cover_spread_box:nn
              { .205\paperwidth } { \l__hdu_set_entitle_tl }
          }
      }
      \par \vspace*{1.5\baselineskip}
      { \LARGE （\int_use:N \l__hdu_grade_int \bfseries 届） }
      \par \vspace*{3.0\baselineskip}
      \begin{tabular}
        {
          >{\large\bfseries}p{5.5\ccwd}@{}
          >{\large\centering\arraybackslash\kaishu}p{.65\linewidth}@{}
        }
        \__hdu_cover_spread_box:nn { 4\ccwd } { 题目 } &
        \__hdu_cover_center_box:nn { .95\linewidth }
          { \@title }\\[5.2ex]
        \__hdu_cover_spread_box:nn { 4\ccwd } { 学院 } &
        \__hdu_cover_center_box:nn { .95\linewidth }
          { \l__hdu_set_department_tl }\\[5.2ex]
        \__hdu_cover_spread_box:nn { 4\ccwd } { 专业 } &
        \__hdu_cover_center_box:nn { .95\linewidth }
          { \l__hdu_set_major_tl }\\[5.2ex]
        \__hdu_cover_spread_box:nn { 4\ccwd } { 班级 } &
        \__hdu_cover_center_box:nn { .95\linewidth }
          { \l__hdu_set_class_tl }\\[5.2ex]
        \__hdu_cover_spread_box:nn { 4\ccwd } { 学号 } &
        \__hdu_cover_center_box:nn { .95\linewidth }
          { \l__hdu_set_stdntid_tl }\\[5.2ex]
        \__hdu_cover_spread_box:nn { 4\ccwd } { 学生姓名 } &
        \__hdu_cover_center_box:nn { .95\linewidth }
          { \@author }\\[5.2ex]
        \__hdu_cover_spread_box:nn { 4\ccwd } { 指导教师 } &
        \__hdu_cover_center_box:nn { .95\linewidth }
          {
            \l__hdu_set_cnsupervisor_tl \quad
            \l__hdu_set_cnrole_tl
          }\\[5.2ex]
        \__hdu_cover_spread_box:nn { 4\ccwd } { 完成日期 } &
        \__hdu_cover_center_box:nn { .95\linewidth }
          {
            \textsf{\int_use:N \c_sys_year_int} 年
            \textsf{\int_use:N \c_sys_month_int} 月
          }
      \end{tabular}
    \end{center}
  }
\NewDocumentCommand \commitment { O{} }
  {
    \newgeometry{ margin = 3cm }
    \titlepage
      \__hdu_commitment_bc_aux:n {#1}
    \endtitlepage
    \restoregeometry
  }
\cs_new_protected_nopar:Npn \__hdu_commitment_bc_aux:n #1
  {
    \vspace*{65\p@}
    \begin{center}
      \@beginparpenalty \@lowpenalty
      \Large \textsf
        { \bfseries \__hdu_cover_spread_box:nn { 6\ccwd }{ 诚信承诺 } }
      \@endparpenalty \@M
    \end{center}
    \vspace*{.4\baselineskip} \par
    \linespread{2.1}
      {
        \__hdu_font_semilarge:
        我谨在此承诺：本人所写的毕业论文《\@title 》均系本人独立完成，
        没有抄袭行为，凡涉及其他作者的观点和材料，均作了注释，若有不实，
        后果由本人承担。
        \par\vspace*{\baselineskip} \bfseries\sffamily
        \hskip.48\linewidth 承诺人（签名）：
        \__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
          }
        \par \vspace*{.5\baselineskip}
        \hskip \dim_eval:n { .48\linewidth - 1em }
        \makebox [ 3em ]
          { \__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 } } 日
      }
  }
\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}
      }
    \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*{摘\qquad 要}
      }
  }
  {
    \tl_clear:N \l__hdu_abstract_title_tl
    \cfoot{} \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 目 \qquad 录 \hfill}
\renewcommand* \cfttoctitlefont {\sffamily\__hdu_font_semiLarge:}
\dim_set:Nn \cftbeforetoctitleskip {3pt}
\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    =
      {
        fixskip = true, name = {},  beforeskip = 21pt,
        format+ = \sffamily \large, afterskip  = 34pt,
        number  = \arabic{chapter}, pagestyle  = fancy,
      },
    section    =
      {
        beforeskip = 1.25ex, fixskip = true,
        afterskip  = 1.5ex,  format  = \sffamily \__hdu_font_semilarge:
      },
    subsection =
      {
        beforeskip = 1.25ex, fixskip = true,
        afterskip  = 1.5ex,  format  = \sffamily
      }
  }
\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,                 *
%%                                   hdulogo.pdf,                        *
%%                                   hdutitle.pdf,                       *
%%                                   hdubadge.pdf,                       *
%%                                   hdumotto.pdf,                       *
%%                                   hduthesis.pdf,                      *
%%                               and README.md.                          *
%% -----------------------------------------------------------------------
%%
%% End of file `hdu-bc.config.code.tex'.
