<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%
% Copyright (C) 2021-2022 by HFUT TeX Users Group &lt;https://github.com/HFUTTUG&gt;
%
% hfutthesis developed by HFUT TeX Users Group &lt;https://github.com/HFUTTUG&gt; on the 
% base of ustcthesis &lt;https://github.com/usthtug/ustcthesis&gt;.
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
%    https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2008 or later.
%

\NeedsTeXFormat{LaTeX2e}[2017/04/15]
\newcommand\hfutthesisversion{v1.0.4}
\ProvidesClass{hfutthesis}[2022/04/09 {\hfutthesisversion} hfut thesis template]

% æŠ¥é”™å’Œè­¦å‘Š
\newcommand\hfut@error[1]{%
  \ClassError{hfutthesis}{#1}{}%
}
\newcommand\hfut@warning[1]{%
  \ClassWarning{hfutthesis}{#1}%
}

% æ£€æŸ¥ \LaTeXe{} kernel ç‰ˆæœ¬
\@ifl@t@r\fmtversion{2017/04/15}{}{
  \hfut@error{%
    TeX Live 2017 or later version is required to compile this document%
  }
}

% æ£€æŸ¥ç¼–è¯‘å¼•æ“Žï¼Œè¦æ±‚ä½¿ç”¨ XeLaTeXã€‚
\RequirePackage{iftex}
\ifXeTeX\else
  \hfut@error{XeLaTeX is required to compile this document}
\fi


% \subsection{å¤„ç†é€‰é¡¹}

\RequirePackage{kvdefinekeys}
\RequirePackage{kvsetkeys}
\RequirePackage{kvoptions}

% æä¾›ä¸€ä¸ª \cs{hfutsetup} å‘½ä»¤æ”¯æŒ \emph{key-value} çš„æ–¹å¼æ¥è®¾ç½®ã€‚
\let\hfut@setup@hook\@empty
\newcommand\hfutsetup[1]{%
  \let\hfut@setup@hook\@empty
  \kvsetkeys{hfut}{#1}%
  \hfut@setup@hook
}

% åŒæ—¶ç”¨ \emph{key-value} çš„æ–¹å¼æ¥å®šä¹‰è¿™äº›æŽ¥å£ï¼š
% \begin{latex}
%   \hfut@define@key{
%     &lt;key&gt; = {
%       name = &lt;name&gt;,
%       choices = {
%         &lt;choice1&gt;,
%         &lt;choice2&gt;,
%       },
%       default = &lt;default&gt;,
%       code = &lt;code&gt;,
%     },
%   }
% \end{latex}

% å…¶ä¸­ |choices| è®¾ç½®å…è®¸ä½¿ç”¨çš„å€¼ï¼Œé»˜è®¤ä¸ºç¬¬ä¸€ä¸ªï¼ˆæˆ–è€… \meta{default}ï¼‰ï¼›
% \meta{code} æ˜¯ç›¸åº”çš„å†…å®¹è¢«è®¾ç½®æ—¶æ‰§è¡Œçš„ä»£ç&nbsp;ã€‚

\newcommand\hfut@define@key[1]{%
  \kvsetkeys{hfut@key}{#1}%
}
\kv@set@family@handler{hfut@key}{%
%
% \cs{hfutsetup} ä¼šå°† \meta{value} å­˜åˆ° \cs{hfut@\meta{key}}ï¼Œ
% ä½†æ˜¯å®çš„åå­—åŒ…å« â€œ-â€ è¿™æ&nbsp;·çš„ç‰¹æ®Šå­—ç¬¦æ—¶ä¸æ–¹ä¾¿ç›´æŽ¥è°ƒç”¨ï¼Œæ¯”å¦‚ |key = math-style|ï¼Œ
% è¿™æ—¶å¯ä»¥ç”¨ |name| è®¾ç½® \meta{key} çš„åˆ«ç§°ï¼Œæ¯”å¦‚ |key = math@style|ï¼Œ
% è¿™æ&nbsp;·å°±å¯ä»¥é€šè¿‡ \cs{hfut@math@style} æ¥å¼•ç”¨ã€‚
% |default| æ˜¯å®šä¹‰è¯¥ \meta{key} æ—¶é»˜è®¤çš„å€¼ï¼Œç¼ºçœä¸ºç©ºã€‚
%
  \@namedef{hfut@#1@@name}{#1}%
  \def\hfut@@default{}%
  \def\hfut@@choices{}%
  \kv@define@key{hfut@value}{name}{%
    \@namedef{hfut@#1@@name}{##1}%
  }%
  %
  % ç”±äºŽåœ¨å®šä¹‰æŽ¥å£æ—¶ï¼Œ\cs{hfut@\meta{key}@@code} ä¸ä¸€å®šæœ‰å®šä¹‰ï¼Œ
  % è€Œä¸”åœ¨æ–‡æ¡£ç±»/å®åŒ…ä¸­è¿˜æœ‰å¯èƒ½å¯¹è¯¥ |key| çš„ |code| è¿›è¡Œæ·»åŠ&nbsp;ã€‚
  % æ‰€ä»¥ \cs{hfut@\meta{key}@@code} ä¼šæ£€æŸ¥å¦‚æžœåœ¨å®šä¹‰æ–‡æ¡£ç±»/å®åŒ…æ—¶åˆ™æŽ¨è¿Ÿæ‰§è¡Œï¼Œå¦åˆ™ç«‹å³æ‰§è¡Œã€‚
  %
  \@namedef{hfut@#1@@check}{}%
  \@namedef{hfut@#1@@code}{}%
  %
  % ä¿å­˜ä¸‹ |choices = {}| å®šä¹‰çš„å†…å®¹ï¼Œåœ¨å®šä¹‰ \cs{hfut@\meta{name}} åŽå†æ‰§è¡Œã€‚
  %
  \kv@define@key{hfut@value}{choices}{%
    \def\hfut@@choices{##1}%
    \@namedef{hfut@#1@@reset}{}%
    %
    % \cs{hfut@\meta{key}@check} æ£€æŸ¥ |value| æ˜¯å¦æœ‰æ•ˆï¼Œ
    % å¹¶è®¾ç½® \cs{ifhfut@\meta{name}@\meta{value}}ã€‚
    %
    \@namedef{hfut@#1@@check}{%
      \@ifundefined{%
        ifhfut@\@nameuse{hfut@#1@@name}@\@nameuse{hfut@\@nameuse{hfut@#1@@name}}%
      }{%
        \hfut@error{Invalid value "#1 = \@nameuse{hfut@\@nameuse{hfut@#1@@name}}"}%
      }%
      \@nameuse{hfut@#1@@reset}%
      \@nameuse{hfut@\@nameuse{hfut@#1@@name}@\@nameuse{hfut@\@nameuse{hfut@#1@@name}}true}%
    }%
  }%
  \kv@define@key{hfut@value}{default}{%
    \def\hfut@@default{##1}%
  }%
  \kvsetkeys{hfut@value}{#2}%
  \@namedef{hfut@\@nameuse{hfut@#1@@name}}{}%
  %
  % ç¬¬ä¸€ä¸ª \meta{choice} è®¾ä¸º \meta{default}ï¼Œ
  % å¹¶ä¸”å¯¹æ¯ä¸ª \meta{choice} å®šä¹‰ \cs{ifhfut@\meta{name}@\meta{choice}}ã€‚
  %
  \kv@set@family@handler{hfut@choice}{%
    \ifx\hfut@@default\@empty
      \def\hfut@@default{##1}%
    \fi
    \expandafter\newif\csname ifhfut@\@nameuse{hfut@#1@@name}@##1\endcsname
    \expandafter\g@addto@macro\csname hfut@#1@@reset\endcsname{%
      \@nameuse{hfut@\@nameuse{hfut@#1@@name}@##1false}%
    }%
  }%
  \kvsetkeys@expandafter{hfut@choice}{\hfut@@choices}%
  %
  % å°† \meta{default} èµ‹å€¼åˆ° \cs{hfut@\meta{name}}ï¼Œå¦‚æžœéžç©ºåˆ™æ‰§è¡Œç›¸åº”çš„ä»£ç&nbsp;ã€‚
  %
  \expandafter\let\csname hfut@\@nameuse{hfut@#1@@name}\endcsname\hfut@@default
  \expandafter\ifx\csname hfut@\@nameuse{hfut@#1@@name}\endcsname\@empty\else
    \@nameuse{hfut@#1@@check}%
  \fi
  %
  % å®šä¹‰ \cs{hfutsetup} æŽ¥å£ã€‚
  %
  \kv@define@key{hfut}{#1}{%
    \@namedef{hfut@\@nameuse{hfut@#1@@name}}{##1}%
    \@nameuse{hfut@#1@@check}%
    \@nameuse{hfut@#1@@code}%
  }%
}

% å®šä¹‰æŽ¥å£å‘ |key| æ·»åŠ&nbsp; |code|ï¼š

\newcommand\hfut@option@hook[2]{%
  \expandafter\g@addto@macro\csname hfut@#1@@code\endcsname{#2}%
}

\hfut@define@key{
  degree = {
    choices = {
      doctor,
      master,
      bachelor,
    },
    default = bachelor,
  },
  degree-type = {
    name = degree@type,
    choices = {
      academic,
      professional,
    },
    default = academic,
  },
  main-language = {
    name = main@language,
    choices = {
      chinese,
      english,
    },
    default = chinese,
  },
  language = {
    choices = {
      chinese,
      english,
    },
    default = chinese,
  },
  system = {
    choices = {
      auto,
      mac,
      unix,
      windows,
    },
    default = auto,
  },
  fontset = {
    choices = {
      auto,
      windows,
      mac,
      ubuntu,
      fandol,
      none,
    },
    default = auto,
  },
  font = {
    choices = {
      auto,
      times,
      termes,
      stix,
      xits,
      libertinus,
      newcm,
      lm,
      newtx,
      none,
    },
    default = auto,
  },
  cjk-font = {
    name = cjk@font,
    choices = {
      auto,
      windows,
      mac,
      noto,
      fandol,
      none,
    },
    default = auto,
  },
  math-font = {
    name = math@font,
    choices = {
      auto,
      stix,
      xits,
      libertinus,
      newcm,
      cm,
      lm,
      newtx,
      none,
    },
    default = auto,
  },
  math-style = {
    name = math@style,
    choices = {
      GB,
      ISO,
      TeX,
    },
  },
  uppercase-greek = {
    name = uppercase@greek,
    choices = {
      italic,
      upright,
    },
  },
  less-than-or-equal = {
    name = leq,
    choices = {
      slanted,
      horizontal,
    },
  },
  integral = {
    choices = {
      upright,
      slanted,
    },
  },
  integral-limits = {
    name = integral@limits,
    choices = {
      true,
      false,
    },
  },
  partial = {
    choices = {
      upright,
      italic,
    },
  },
  math-ellipsis = {
    name = math@ellipsis,
    choices = {
      centered,
      lower,
      AMS,
    },
  },
  real-part = {
    name = real@part,
    choices = {
      roman,
      fraktur,
    },
  },
  cite-style = {
    name = cite@style,
    choices = {
      super,
      inline,
      authoryear,
    },
    default = super,
  },
  output = {
    choices = {
      print,
      electronic,
    },
    default = print,
  },
  section-style = {
    name = section@style,
    choices = {
      chinese,
      arabic,
    },
    default = chinese,
  },
  badge-color = {
    name = badge@color,
    choices = {
      red,
      black,
    },
    default = red,
  },
}

\newif\ifhfut@degree@graduate
\newcommand\hfut@set@graduate{%
  \ifhfut@degree@bachelor
    \hfut@degree@graduatefalse
  \else
    \hfut@degree@graduatetrue
  \fi
}
\hfut@set@graduate
\hfut@option@hook{degree}{%
  \hfut@set@graduate
}

% ä½¿ç”¨ \pkg{kvoptions} æä¾›çš„ key-value æŽ¥å£ï¼Œ
\SetupKeyvalOptions{
  family  = hfut,
  prefix  = hfut@,
  setkeys = \kvsetkeys,
}

% è®¾ç½®é»˜è®¤ \option{openany}ã€‚
\DeclareBoolOption[false]{openright}
\DeclareComplementaryOption{openany}{openright}

% å…¼å®¹æ—§ç‰ˆæœ¬çš„æ–‡æ¡£ç±»é€‰é¡¹ã€‚
% Reserved for compatibility until 2020-07-01.
\DeclareVoidOption{doctor}{\hfutsetup{degree=doctor}}
\DeclareVoidOption{master}{\hfutsetup{degree=master}}
\DeclareVoidOption{bachelor}{\hfutsetup{degree=bachelor}}
\DeclareVoidOption{chinese}{\hfutsetup{language=chinese}}
\DeclareVoidOption{english}{\hfutsetup{language=english}}
\DeclareVoidOption{academic}{\hfutsetup{degree-type=academic}}
\DeclareVoidOption{professional}{\hfutsetup{degree-type=professional}}
\DeclareVoidOption{print}{\hfutsetup{output=print}}
\DeclareVoidOption{pdf}{\hfutsetup{output=electronic}}
\newif\ifhfut@legacy@cite@style
\DeclareVoidOption{super}{\hfutsetup{cite-style=super}\hfut@legacy@cite@styletrue}
\DeclareVoidOption{numbers}{\hfutsetup{cite-style=inline}\hfut@legacy@cite@styletrue}
\DeclareVoidOption{authoryear}{\hfutsetup{cite-style=authoryear}\hfut@legacy@cite@styletrue}
\DeclareVoidOption{arabic}{\hfutsetup{section-style=arabic}}
\DeclareVoidOption{colorlogo}{\hfutsetup{badge-color=red}}
\DeclareVoidOption{bwlogo}{\hfutsetup{badge-color=black}}

% è½½å…¥ \cls{ctexbook}ã€‚
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{ctexbook}}
\ProcessKeyvalOptions*


% \subsection{åŠ&nbsp;è½½æ–‡æ¡£ç±»å’Œå®åŒ…}

\ifhfut@openright
  \PassOptionsToClass{openright}{book}
\else
  \PassOptionsToClass{openany}{book}
\fi

\ifhfut@output@electronic
  \PassOptionsToClass{oneside}{book}
\fi
\PassOptionsToPackage{no-math}{fontspec}

% è½½å…¥ \cls{ctexbook} æ–‡æ¡£ç±»ï¼Œæ³¨æ„è¦æ±‚ä¸º 2.4.9 æˆ–æ›´é«˜çš„ç‰ˆæœ¬ã€‚
\LoadClass[UTF8,a4paper,scheme=plain,zihao=-4,fontset=none]{ctexbook}[2017/04/01]

% å»ºè®®åœ¨æ¨¡æ¿å¼€å§‹å¤„è½½å…¥å…¨éƒ¨å®åŒ…ï¼Œä¸è¦è½»æ˜“æ”¹å˜åŠ&nbsp;è½½é¡ºåºã€‚
% \pkg{hyperref} ä¸€èˆ¬åœ¨æœ€åŽåŠ&nbsp;è½½ã€‚
\RequirePackage{etoolbox}
\RequirePackage{amsmath}
\RequirePackage{fontspec}[2017/03/31]
\RequirePackage[driver=xetex]{geometry}
\RequirePackage{graphicx}
\RequirePackage{fancyhdr}
\RequirePackage{color}
\RequirePackage{titletoc}
\RequirePackage{caption}
\RequirePackage[perpage]{footmisc}
\RequirePackage{url}
\RequirePackage{calc}
\RequirePackage[normalem]{ulem} % æä¾›æŽ’ç‰ˆå¯æ–­è¡Œä¸‹åˆ’çº¿çš„å‘½ä»¤\uline
\RequirePackage{multirow} % çºµå‘åˆå¹¶å•å…ƒæ&nbsp;¼
\RequirePackage{enumitem} % enumberate
\RequirePackage[list=off]{bicaption} % å›¾è¡¨ä¸­è‹±æ–‡æ&nbsp;‡é¢˜

% å¦‚æžœç”¨æˆ·åœ¨å¯¼è¨€åŒºæœªè°ƒç”¨ \pkg{biblatex}ï¼Œåˆ™è‡ªåŠ¨è°ƒç”¨ \pkg{natbib}ã€‚
\AtEndPreamble{
  \@ifpackageloaded{biblatex}{}{
    \RequirePackage{natbib}
  }
}

% å¯¹å†²çªçš„å®åŒ…æŠ¥é”™ã€‚
\RequirePackage{filehook}
\newcommand\hfut@package@conflict[2]{
  \AtEndOfPackageFile*{#1}{%
    \AtBeginOfPackageFile*{#2}{%
      \hfut@error{The "#2" package is incompatible with "#1"}%
    }%
  }%
}

\hfut@package@conflict{biblatex}{bibunits}
\hfut@package@conflict{biblatex}{chapterbib}
\hfut@package@conflict{biblatex}{cite}
\hfut@package@conflict{biblatex}{multibib}
\hfut@package@conflict{biblatex}{natbib}

\hfut@package@conflict{bibunits}{biblatex}
\hfut@package@conflict{bibunits}{chapterbib}
\hfut@package@conflict{bibunits}{multibib}

\hfut@package@conflict{unicode-math}{amscd}
\hfut@package@conflict{unicode-math}{amsfonts}
\hfut@package@conflict{unicode-math}{amssymb}
\hfut@package@conflict{unicode-math}{bbm}
\hfut@package@conflict{unicode-math}{bm}
\hfut@package@conflict{unicode-math}{eucal}
\hfut@package@conflict{unicode-math}{eufrak}
\hfut@package@conflict{unicode-math}{mathrsfs}
\hfut@package@conflict{unicode-math}{newtxmath}
\hfut@package@conflict{unicode-math}{upgreek}

\hfut@package@conflict{natbib}{biblatex}
\hfut@package@conflict{natbib}{cite}

\hfut@package@conflict{newtxmath}{amsfonts}
\hfut@package@conflict{newtxmath}{amssymb}
\hfut@package@conflict{newtxmath}{unicode-math}
\hfut@package@conflict{newtxmath}{upgreek}


% \pkg{mathtools} éœ€è¦åœ¨ \pkg{unicode-math} å‰è½½å…¥ï¼Œ
% å‚è€ƒ \url{https://tex.stackexchange.com/q/521394/82731}ã€‚
\AtBeginOfPackageFile*{mathtools}{
  \@ifpackageloaded{unicode-math}{
    \hfut@error{The "mathtools" package should be loaded before setting "math-font"}
  }{}
}%

% \pkg{amsthm} éœ€è¦åœ¨ \pkg{newtx} å‰è½½å…¥ï¼Œå‚è€ƒ \pkg{newtx} çš„æ–‡æ¡£ã€‚
\AtBeginOfPackageFile*{amsthm}{
  \@ifpackageloaded{newtxmath}{
    \hfut@error{The "amsthm" package should be loaded before setting "newtxmath"}
  }{}
}%



% \subsection{å¤„ç†è¯­è¨€}

% å®šä¹‰ \cs{hfut@main@language}ï¼Œå½“åœ¨å¯¼è¨€åŒºä¿®æ”¹ \option{language} æ—¶ï¼Œ
% ä¿å­˜ä¸ºè®ºæ–‡çš„ä¸»è¦è¯­è¨€ï¼›
% \cs{hfut@reset@main@language} åˆ™ç”¨äºŽæ­£æ–‡ä¸­æ¢å¤ä¸ºä¸»è¦è¯­è¨€ã€‚
%    \begin{macrocode}
\hfutsetup{main-language=\hfut@language}%
\let\hfut@main@language\hfut@language

\hfut@option@hook{language}{%
  \ifx\@begindocumenthook\@undefined\else
    \hfutsetup{main-language=\hfut@language}%
    \let\hfut@main@language\hfut@language
  \fi
}
\newcommand\hfut@reset@main@language{%
  \hfutsetup{language = \hfut@main@language}%
  \let\hfut@language\hfut@main@language
}

% å¸¦åœˆæ•°å­—å’Œæ˜Ÿå·ä½¿ç”¨ä¸­æ–‡å­—ä½“ã€‚
\xeCJKDeclareCharClass{CJK}{"2460 -&gt; "2473}
\xeCJKDeclareCharClass{CJK}{"2605}

% ç”±äºŽ Unicode çš„ä¸€äº›æ&nbsp;‡ç‚¹ç¬¦å·æ˜¯ä¸­è¥¿æ–‡æ··ç”¨çš„ï¼š
% U+00B7ã€U+2013ã€U+2014ã€U+2018ã€U+2019ã€
% U+201Cã€U+201Dã€U+2025ã€U+2026ã€U+2E3Aï¼Œ
% æ‰€ä»¥è¦æ&nbsp;¹æ®è¯­è¨€è®¾ç½®æ­£ç¡®çš„å­—ä½“ã€‚
% https://github.com/CTeX-org/ctex-kit/issues/389
\newcommand\hfut@set@punctuations{%
  \ifhfut@language@chinese
    \xeCJKDeclareCharClass{FullLeft}{"2018, "201C}%
    \xeCJKDeclareCharClass{FullRight}{
      "00B7, "2019, "201D, "2013, "2014, "2025, "2026, "2E3A,
    }%
  \else
    \xeCJKDeclareCharClass{HalfLeft}{"2018, "201C}%
    \xeCJKDeclareCharClass{HalfRight}{
      "00B7, "2019, "201D, "2013, "2014, "2025, "2026, "2E3A,
    }%
  \fi
}
\hfut@set@punctuations
\hfut@option@hook{language}{\hfut@set@punctuations}

% æ&nbsp;¹æ®è¯­è¨€è®¾ç½®å„ç«&nbsp;èŠ‚çš„åç§°ï¼Œåªæœ‰åœ¨å¯¼è¨€åŒºè®¾ç½® \option{language} æ—¶ä¼šä¿®æ”¹ï¼Œ
% è€Œåœ¨æ­£æ–‡å±€éƒ¨åˆ‡æ¢è¯­è¨€æ—¶åˆ™ä¸å˜ã€‚

% ç”±äºŽã€Šæ’°å†™æ‰‹å†Œã€‹ä¸­çš„â€œspecialityâ€ä¸€è¯ä½¿ç”¨çš„æ˜¯è‹±å¼æ‹¼æ³•ï¼Œ
% æ‰€ä»¥â€œacknowledgementsâ€ä¹Ÿä¿æŒä¸€è‡´ã€‚
\newcommand\hfut@set@chapter@names{%
  \ifhfut@main@language@chinese
    \def\contentsname{ç›®\hspace{\ccwd}å½•}%
    \def\listfigurename{æ’å›¾æ¸…å•}%
    \def\listtablename{è¡¨æ&nbsp;¼æ¸…å•}%
    \ctexset{
      chapter/name   = {ç¬¬,ç«&nbsp;},
    }%
    \def\bibname{å‚è€ƒæ–‡çŒ®}%
    \def\appendixname{é™„å½•}%
    \ifhfut@degree@bachelor
      \def\hfut@acknowledgements@name{è‡´è°¢}%
    \else
      \def\hfut@acknowledgements@name{è‡´\hspace{\ccwd}è°¢}%
    \fi
    \ifhfut@degree@bachelor
      \def\hfut@publication@name{æ”»è¯»å­¦å£«å­¦ä½æœŸé—´çš„å­¦æœ¯æ´»åŠ¨åŠæˆæžœæƒ…å†µ}%
    \else
      \ifhfut@degree@master
        \def\hfut@publication@name{æ”»è¯»ç¡•å£«å­¦ä½æœŸé—´çš„å­¦æœ¯æ´»åŠ¨åŠæˆæžœæƒ…å†µ}%
      \else
        \def\hfut@publication@name{æ”»è¯»åšå£«å­¦ä½æœŸé—´çš„å­¦æœ¯æ´»åŠ¨åŠæˆæžœæƒ…å†µ}%
      \fi
    \fi
    \newcommand\hfut@notation@name{ç¬¦å·è¯´æ˜Ž}%
  \else
    \def\contentsname{Contents}%
    \def\listfigurename{List of Figures}%
    \def\listtablename{List of Tables}%
    \ctexset{
      chapter/name   = {\chaptername\space},
    }%
    \def\bibname{Bibliography}%
    \def\appendixname{Appendix}%
    \def\hfut@acknowledgements@name{Acknowledgements}%
    \def\hfut@publication@name{Publications}%
    \def\hfut@notation@name{Notation}%
  \fi
}
\hfut@set@chapter@names
\hfut@option@hook{main-language}{\hfut@set@chapter@names}

% è¿™éƒ¨åˆ†åç§°åœ¨æ­£æ–‡ä¸­å±€éƒ¨åœ°ä¿®æ”¹è¯­è¨€æ—¶ä¼šå‘ç”Ÿå˜åŒ–ã€‚
\newcommand\hfut@set@names{%
  \ifhfut@language@chinese
    \def\figurename{å›¾}%
    \def\tablename{è¡¨}%
  \else
    \def\figurename{Fig}%
    \def\tablename{Tab}%
  \fi
}
\hfut@set@names
\hfut@option@hook{language}{\hfut@set@names}


% \subsection{å­—ä½“}

% å­—å·

% æ­£æ–‡å­—å·12bpï¼Œç&nbsp;”ç©¶ç”Ÿè¡Œè·20bpï¼Œæœ¬ç§‘ç”Ÿè¡Œè·22bpï¼›
% å…¶ä»–å‘½ä»¤çš„è¡Œè·æŒ‰ç…§ç›¸åŒçš„çš„æ¯”ä¾‹è®¾ç½®ï¼Œå¦‚è¡¨~\ref{tab:fontsize}ã€‚
% \begin{table}[htb]
%   \centering
%   \caption{æ&nbsp;‡å‡†å­—ä½“å‘½ä»¤ä¸Žå­—å·ã€è¡Œè·çš„å¯¹åº”}
%   \label{tab:fontsize}
%   \begin{tabular}{lllll}
%     \toprule
%     å­—ä½“å‘½ä»¤          &amp; å­—å· &amp; bp   &amp; ç&nbsp;”ç©¶ç”Ÿè¡Œè· &amp; æœ¬ç§‘ç”Ÿè¡Œè· \\
%     \midrule
%     \cs{tiny}         &amp; å°å…­ &amp; 6.5  &amp; 10.83      &amp; 11.92      \\
%     \cs{scriptsize}   &amp; å…­å· &amp; 7.5  &amp; 12.5       &amp; 13.75      \\
%     \cs{footnotesize} &amp; å°äº” &amp; 9    &amp; 15         &amp; 16.5       \\
%     \cs{small}        &amp; äº”å· &amp; 10.5 &amp; 17.5       &amp; 19.25      \\
%     \cs{normalsize}   &amp; å°å›› &amp; 12   &amp; 20         &amp; 22         \\
%     \cs{large}        &amp; å°ä¸‰ &amp; 15   &amp; 25         &amp; 27.5       \\
%     \cs{Large}        &amp; å°äºŒ &amp; 18   &amp; 30         &amp; 33         \\
%     \cs{LARGE}        &amp; äºŒå· &amp; 22   &amp; 36.67      &amp; 40.33      \\
%     \cs{huge}         &amp; å°ä¸€ &amp; 24   &amp; 40         &amp; 44         \\
%     \cs{Huge}         &amp; ä¸€å· &amp; 26   &amp; 43.33      &amp; 47.67      \\
%     \bottomrule
%   \end{tabular}
% \end{table}
%
% æ³¨æ„é‡å®šä¹‰ \normalsize åº”åœ¨ \pkg{unicode-math} çš„ \cs{setmathfont} å‰ã€‚
\newcommand\hfut@set@font@size{%
  \ifhfut@degree@graduate
    \renewcommand\normalsize{%
      \@setfontsize\normalsize{12bp}{20bp}%
      \abovedisplayskip 12bp \@plus3bp \@minus7bp%
      \abovedisplayshortskip \z@ \@plus3bp%
      \belowdisplayshortskip 6.5bp \@plus3.5bp \@minus3bp%
      \belowdisplayskip \abovedisplayskip
      \let\@listi\@listI}%
    %
    % æ³¨æ„ç¬¬~\ref{sec:list} èŠ‚åŽ»æŽ‰äº†åˆ—è¡¨çš„é—´è·ï¼Œæ‰€ä»¥ä¸å†ä¿®æ”¹ \cs{@listi}ã€‚
  \else
    \renewcommand\normalsize{%
      \@setfontsize\normalsize{12bp}{22bp}%
      \abovedisplayskip 12bp \@plus3bp \@minus7bp%
      \abovedisplayshortskip \z@ \@plus3bp%
      \belowdisplayshortskip 6.5bp \@plus3.5bp \@minus3bp%
      \belowdisplayskip \abovedisplayskip
      \let\@listi\@listI}%
  \fi
  \normalsize
  \ifx\MakeRobust\@undefined \else
      \MakeRobust\normalsize
  \fi
}
\hfut@set@font@size
\hfut@option@hook{degree}{\hfut@set@font@size}

% è®¾ç½®è¡Œè·çš„å€æ•°ä¸º 1ã€‚
\linespread{1}\selectfont


% æ£€æµ‹ç³»ç»Ÿ
\ifhfut@system@auto
  \IfFileExists{/System/Library/Fonts/Menlo.ttc}{
    \hfutsetup{system = mac}
  }{
    \IfFileExists{/dev/null}{
      \IfFileExists{null:}{
        \hfutsetup{system = windows}
      }{
        \hfutsetup{system = unix}
      }
    }{
      \hfutsetup{system = windows}
    }
  }
\fi

% å¤„ç† \opt{fontset}
\ifhfut@fontset@auto
  \ifhfut@system@windows
    \hfutsetup{fontset = windows}
  \else
    \ifhfut@system@mac
      \hfutsetup{fontset = mac}
    \else
      \IfFontExistsTF{Noto Serif CJK SC}{
        \hfutsetup{fontset = ubuntu}
      }{
        \hfutsetup{fontset = fandol}
      }
    \fi
  \fi
\fi

% ã€Šæ’°å†™æ‰‹å†Œã€‹è¦æ±‚è¥¿æ–‡å­—ä½“ä½¿ç”¨ Times New Roman å’Œ Arialï¼Œ
% ä½†æ˜¯åœ¨ Linux ä¸‹æ²¡æœ‰è¿™ä¸¤ä¸ªå­—ä½“ï¼Œæ‰€ä»¥ä½¿ç”¨å®ƒä»¬çš„å…‹éš†ç‰ˆ TeX Gyre Termes å’Œ
% TeX Gyre Herosã€‚
\ifhfut@font@auto
  \ifhfut@fontset@windows
    \hfutsetup{font=times}
  \else
    \ifhfut@fontset@mac
      \hfutsetup{font=times}
    \else
      \hfutsetup{font=termes}
    \fi
  \fi
\fi

% Times New Roman + Arial
\newcommand\hfut@set@font@times{%
  \setmainfont{Times New Roman}%
  \setsansfont{Arial}%
  \ifhfut@system@mac
    \setmonofont{Menlo}[Scale = MatchLowercase]%
  \else
    \setmonofont{Courier New}[Scale = MatchLowercase]%
  \fi
}

% TeX Gyre Termes
\newcommand\hfut@set@font@termes{%
  \setmainfont{texgyretermes}[
    Extension      = .otf,
    UprightFont    = *-regular,
    BoldFont       = *-bold,
    ItalicFont     = *-italic,
    BoldItalicFont = *-bolditalic,
  ]%
  \hfut@set@texgyre@sans@mono
}

\newcommand\hfut@set@texgyre@sans@mono{%
  \setsansfont{texgyreheros}[
    Extension      = .otf,
    UprightFont    = *-regular,
    BoldFont       = *-bold,
    ItalicFont     = *-italic,
    BoldItalicFont = *-bolditalic,
  ]%
  \setmonofont{texgyrecursor}[
    Extension      = .otf,
    UprightFont    = *-regular,
    BoldFont       = *-bold,
    ItalicFont     = *-italic,
    BoldItalicFont = *-bolditalic,
    Scale          = MatchLowercase,
    Ligatures      = CommonOff,
  ]%
}

% STIX Two å­—ä½“ã€‚
% STIX æ–‡ä»¶ååœ¨ v2.10 2020-12-19 ä»Ž
% \file{STIX2Text-Regular.otf}ã€\file{STIX2Math.otf} åˆ†åˆ«æ”¹ä¸º
% \file{STIXTwoText-Regular.otf}ã€\file{STIXTwoMath-Regular.otf}ã€‚
\let\hfut@font@family@stix\@empty
\newcommand\hfut@set@stix@names{%
  \ifx\hfut@font@family@stix\@empty
    \IfFontExistsTF{STIXTwoText-Regular.otf}{%
      \gdef\hfut@font@family@stix{STIXTwoText}%
      \gdef\hfut@font@name@stix@math{STIXTwoMath-Regular}%
    }{%
      \gdef\hfut@font@family@stix{STIX2Text}%
      \gdef\hfut@font@name@stix@math{STIX2Math}%
    }%
  \fi
}

\newcommand\hfut@set@font@stix{%
  \hfut@set@stix@names
  \setmainfont{\hfut@font@family@stix}[
    Extension      = .otf,
    UprightFont    = *-Regular,
    BoldFont       = *-Bold,
    ItalicFont     = *-Italic,
    BoldItalicFont = *-BoldItalic,
  ]%
  \hfut@set@texgyre@sans@mono
}

% XITS å­—ä½“ã€‚
% XITS çš„æ–‡ä»¶ååœ¨ v1.109 2018-09-30
% ä»Ž \file{xits-regular.otf}ã€\file{xits-math.otf} åˆ†åˆ«æ”¹ä¸º
% \file{XITS-Regular.otf}ã€\file{XITSMath-Regular.otf}ã€‚
\let\hfut@font@family@xits\@empty
\newcommand\hfut@set@xits@names{%
  \ifx\hfut@font@family@xits\@empty
    \IfFontExistsTF{XITSMath-Regular.otf}{%
      \gdef\hfut@font@family@xits{XITS}%
      \gdef\hfut@font@style@xits@rm{Regular}%
      \gdef\hfut@font@style@xits@bf{Bold}%
      \gdef\hfut@font@style@xits@it{Italic}%
      \gdef\hfut@font@style@xits@bfit{BoldItalic}%
      \gdef\hfut@font@name@xits@math{XITSMath-Regular}%
    }{%
      \gdef\hfut@font@family@xits{xits}%
      \gdef\hfut@font@style@xits@rm{regular}%
      \gdef\hfut@font@style@xits@bf{bold}%
      \gdef\hfut@font@style@xits@it{italic}%
      \gdef\hfut@font@style@xits@bfit{bolditalic}%
      \gdef\hfut@font@name@xits@math{xits-math}%
    }%
  \fi
}

\newcommand\hfut@set@font@xits{%
  \hfut@set@xits@names
  \setmainfont{\hfut@font@family@xits}[
    Extension      = .otf,
    UprightFont    = *-\hfut@font@style@xits@rm,
    BoldFont       = *-\hfut@font@style@xits@bf,
    ItalicFont     = *-\hfut@font@style@xits@it,
    BoldItalicFont = *-\hfut@font@style@xits@bfit,
  ]%
  \hfut@set@texgyre@sans@mono
}

% Libertinus çš„æ–‡ä»¶ååœ¨ v6.7 2019-04-03 ä»Žå°å†™æ”¹ä¸ºé©¼å³°å¼ï¼Œ
% åœ¨å¤§å°å†™æ•æ„Ÿçš„å¹³å°ä¸Šéœ€è¦è¿›è¡Œåˆ¤æ–­ã€‚
\let\hfut@font@family@libertinus\@empty
\newcommand\hfut@set@libertinus@names{%
  \ifx\hfut@font@family@libertinus\@empty
    \IfFontExistsTF{LibertinusSerif-Regular.otf}{%
      \gdef\hfut@font@family@libertinus@serif{LibertinusSerif}%
      \gdef\hfut@font@family@libertinus@sans{LibertinusSans}%
      \gdef\hfut@font@name@libertinus@math{LibertinusMath-Regular}%
      \gdef\hfut@font@style@libertinus@rm{Regular}%
      \gdef\hfut@font@style@libertinus@bf{Bold}%
      \gdef\hfut@font@style@libertinus@it{Italic}%
      \gdef\hfut@font@style@libertinus@bfit{BoldItalic}%
    }{%
      \gdef\hfut@font@family@libertinus@serif{libertinusserif}%
      \gdef\hfut@font@family@libertinus@sans{libertinussans}%
      \gdef\hfut@font@name@libertinus@math{libertinusmath-regular}%
      \gdef\hfut@font@style@libertinus@rm{regular}%
      \gdef\hfut@font@style@libertinus@bf{bold}%
      \gdef\hfut@font@style@libertinus@it{italic}%
      \gdef\hfut@font@style@libertinus@bfit{bolditalic}%
    }%
  \fi
}

\newcommand\hfut@set@font@libertinus{%
  \hfut@set@libertinus@names
  \setmainfont{\hfut@font@family@libertinus@serif}[
    Extension      = .otf,
    UprightFont    = *-\hfut@font@style@libertinus@rm,
    BoldFont       = *-\hfut@font@style@libertinus@bf,
    ItalicFont     = *-\hfut@font@style@libertinus@it,
    BoldItalicFont = *-\hfut@font@style@libertinus@bfit,
  ]%
  \setsansfont{\hfut@font@family@libertinus@sans}[
    Extension      = .otf,
    UprightFont    = *-\hfut@font@style@libertinus@rm,
    BoldFont       = *-\hfut@font@style@libertinus@bf,
    ItalicFont     = *-\hfut@font@style@libertinus@it,
  ]%
  \setmonofont{lmmonolt10}[
    Extension      = .otf,
    UprightFont    = *-regular,
    BoldFont       = *-bold,
    ItalicFont     = *-oblique,
    BoldItalicFont = *-boldoblique,
  ]%
}

% New Computer Modern
\newcommand\hfut@set@font@newcm{%
  \setmainfont{NewCM10}[
    Extension      = .otf,
    UprightFont    = *-Book,
    BoldFont       = *-Bold,
    ItalicFont     = *-BookItalic,
    BoldItalicFont = *-BoldItalic,
  ]%
  \setsansfont{NewCMSans10}[
    Extension         = .otf,
    UprightFont       = *-Book,
    BoldFont          = *-Bold,
    ItalicFont        = *-BookOblique,
    BoldItalicFont    = *-BoldOblique,
  ]%
  \setmonofont{NewCMMono10}[
    Extension           = .otf,
    UprightFont         = *-Book,
    ItalicFont          = *-BookItalic,
    BoldFont            = *-Bold,
    BoldItalicFont      = *-BoldOblique,
  ]%
}

% Latin Modern
\newcommand\hfut@set@font@lm{%
  \setmainfont{lmroman10}[
    Extension      = .otf,
    UprightFont    = *-regular,
    BoldFont       = *-bold,
    ItalicFont     = *-italic,
    BoldItalicFont = *-bolditalic,
  ]%
  \setsansfont{lmsans10}[
    Extension      = .otf,
    UprightFont    = *-regular,
    BoldFont       = *-bold,
    ItalicFont     = *-oblique,
    BoldItalicFont = *-boldoblique,
  ]%
  \setmonofont{lmmonolt10}[
    Extension      = .otf,
    UprightFont    = *-regular,
    BoldFont       = *-bold,
    ItalicFont     = *-oblique,
    BoldItalicFont = *-boldoblique,
  ]%
}

\newcommand\hfut@set@font@newtx{%
  \RequirePackage{newtxtext}%
}

\newcommand\hfut@set@font{%
  \@nameuse{hfut@set@font@\hfut@font}%
}
\hfut@set@font
\hfut@option@hook{font}{\hfut@set@font}

% ä¸­æ–‡å­—ä½“
\ifhfut@cjk@font@auto
  \ifhfut@fontset@mac
    \hfutsetup{cjk-font = mac}
  \else
    \ifhfut@fontset@windows
      \hfutsetup{cjk-font = windows}
    \else
      \ifhfut@fontset@ubuntu
        \hfutsetup{cjk-font = noto}
      \else
        \hfutsetup{cjk-font = fandol}
      \fi
    \fi
  \fi
\fi

% Windows çš„ä¸­æ˜“å­—ä½“ã€‚
\newcommand\hfut@set@cjk@font@windows{%
  \xeCJKsetup{EmboldenFactor=2}
  \setCJKmainfont{SimSun}[
    AutoFakeBold = true,
    ItalicFont   = KaiTi,
  ]%
  \setCJKsansfont{SimHei}[AutoFakeBold]%
  \setCJKmonofont{FangSong}%
  \setCJKfamilyfont{zhsong}{SimSun}[AutoFakeBold]%
  \setCJKfamilyfont{zhhei}{SimHei}[AutoFakeBold]%
  \setCJKfamilyfont{zhkai}{KaiTi}%
  \setCJKfamilyfont{zhfs}{FangSong}%
}

% macOS çš„åŽæ–‡å­—ä½“ã€‚
\newcommand\hfut@set@cjk@font@mac{%
  \defaultCJKfontfeatures{}%
  \setCJKmainfont{Songti SC}[
    UprightFont    = * Light,
    BoldFont       = * Bold,
    ItalicFont     = Kaiti SC Regular,
    BoldItalicFont = Kaiti SC Bold,
  ]%
  \setCJKsansfont{Heiti SC}[
    UprightFont    = * Light,
    BoldFont       = * Medium,
  ]%
  \setCJKmonofont{STFangsong}
  \setCJKfamilyfont{zhsong}{Songti SC}[
    UprightFont    = * Light,
    BoldFont       = * Bold,
  ]%
  \setCJKfamilyfont{zhhei}{Heiti SC}[
    UprightFont    = * Light,
    BoldFont       = * Medium,
  ]%
  \setCJKfamilyfont{zhfs}{STFangsong}%
  \setCJKfamilyfont{zhkai}{Kaiti SC}[
    UprightFont    = * Regular,
    BoldFont       = * Bold,
  ]%
  \setCJKfamilyfont{zhli}{Baoli SC}%
  \setCJKfamilyfont{zhyuan}{Yuanyi SC}[
    UprightFont    = * Light,
    BoldFont       = * Bold,
  ]%
}

% æ€æºå­—ä½“ã€‚
% æ³¨æ„ Noto CJK çš„ regular å­—é‡åå­—ä¸å¸¦â€œRegularâ€ã€‚
\newcommand\hfut@set@cjk@font@noto{%
  \defaultCJKfontfeatures{}%
  \setCJKmainfont{Noto Serif CJK SC}[
    UprightFont    = * Light,
    BoldFont       = * Bold,
    ItalicFont     = FandolKai-Regular,
    ItalicFeatures = {Extension = .otf},
    Script         = CJK,
  ]%
  \setCJKsansfont{Noto Sans CJK SC}[
    BoldFont       = * Medium,
    Script         = CJK,
  ]%
  \setCJKmonofont{Noto Sans Mono CJK SC}[
    Script         = CJK,
  ]%
  \setCJKfamilyfont{zhsong}{Noto Serif CJK SC}[
    UprightFont    = * Light,
    UprightFont    = * Bold,
    Script         = CJK,
  ]%
  \setCJKfamilyfont{zhhei}{Noto Sans CJK SC}[
    BoldFont       = * Medium,
    Script         = CJK,
  ]%
  \setCJKfamilyfont{zhfs}{FandolFang}[
    Extension      = .otf,
    UprightFont    = *-Regular,
  ]%
  \setCJKfamilyfont{zhkai}{FandolKai}[
    Extension      = .otf,
    UprightFont    = *-Regular,
  ]%
}

% Fandol å­—ä½“ã€‚
\newcommand\hfut@set@cjk@font@fandol{%
  \defaultCJKfontfeatures{}%
  \setCJKmainfont{FandolSong}[
    Extension   = .otf,
    UprightFont = *-Regular,
    BoldFont    = *-Bold,
    ItalicFont  = FandolKai-Regular,
    ItalicFeatures = {Extension = .otf},
  ]%
  \setCJKsansfont{FandolHei}[
    Extension   = .otf,
    UprightFont = *-Regular,
    BoldFont    = *-Bold,
  ]%
  \setCJKmonofont{FandolFang}[
    Extension   = .otf,
    UprightFont = *-Regular,
  ]%
  \setCJKfamilyfont{zhsong}{FandolSong}[
    Extension   = .otf,
    UprightFont = *-Regular,
    BoldFont    = *-Bold,
  ]%
  \setCJKfamilyfont{zhhei}{FandolHei}[
    Extension   = .otf,
    UprightFont = *-Regular,
    BoldFont    = *-Bold,
  ]%
  \setCJKfamilyfont{zhfs}{FandolFang}[
    Extension   = .otf,
    UprightFont = *-Regular,
  ]%
  \setCJKfamilyfont{zhkai}{FandolKai}[
    Extension   = .otf,
    UprightFont = *-Regular,
  ]%
}

\ifhfut@cjk@font@none\else
  \providecommand\songti{\CJKfamily{zhsong}}
  \providecommand\heiti{\CJKfamily{zhhei}}
  \providecommand\fangsong{\CJKfamily{zhfs}}
  \providecommand\kaishu{\CJKfamily{zhkai}}
\fi

\newcommand\hfut@set@cjk@font{%
  \@nameuse{hfut@set@cjk@font@\hfut@cjk@font}%
}
\hfut@set@cjk@font
\hfut@option@hook{cjk-font}{\hfut@set@cjk@font}

% æ•°å­¦å­—ä½“

% è®¾ç½®æ•°å­¦ç¬¦å·é£Žæ&nbsp;¼ã€‚
\newcommand\hfut@set@math@style{%
  \ifhfut@math@style@TeX
    \hfutsetup{
      uppercase-greek    = upright,
      less-than-or-equal = horizontal,
      integral           = slanted,
      integral-limits    = false,
      partial            = italic,
      math-ellipsis      = AMS,
      real-part          = fraktur,
    }%
  \else
    \hfutsetup{
      uppercase-greek = italic,
      integral        = upright,
      integral-limits = true,
      partial         = upright,
      real-part       = roman,
    }%
    \ifhfut@math@style@ISO
      \hfutsetup{
        less-than-or-equal = horizontal,
        math-ellipsis      = lower,
      }%
    \else
      \ifhfut@math@style@GB
        \hfutsetup{
          less-than-or-equal = slanted,
          math-ellipsis      = centered,
        }%
      \fi
    \fi
  \fi
}

\ifhfut@main@language@chinese
  \hfutsetup{math-style = GB}%
\else
  \hfutsetup{math-style = TeX}%
\fi

\hfut@set@math@style
\hfut@option@hook{math-style}{\hfut@set@math@style}
\hfut@option@hook{main-language}{%
  \ifhfut@main@language@chinese
    \hfutsetup{math-style = GB}%
  \else
    \hfutsetup{math-style = TeX}%
  \fi
}

% é’ˆå¯¹ \pkg{unicode-math} é€é¡¹é…ç½®æ•°å­¦ç¬¦å·ã€‚

\newcommand\hfut@set@unimath@leq{%
  \ifhfut@leq@horizontal
    \ifx\@begindocumenthook\@undefined
      \let\le\hfut@save@leq
      \let\ge\hfut@save@geq
      \let\leq\hfut@save@leq
      \let\geq\hfut@save@geq
    \else
      \AtBeginDocument{%
        \let\le\hfut@save@leq
        \let\ge\hfut@save@geq
        \let\leq\hfut@save@leq
        \let\geq\hfut@save@geq
      }%
    \fi
  \else
    \ifhfut@leq@slanted
      \ifx\@begindocumenthook\@undefined
        \let\le\leqslant
        \let\ge\geqslant
        \let\leq\leqslant
        \let\geq\geqslant
      \else
        \AtBeginDocument{%
          \let\le\leqslant
          \let\ge\geqslant
          \let\leq\leqslant
          \let\geq\geqslant
        }%
      \fi
    \fi
  \fi
}
\newcommand\hfut@set@unimath@integral@limits{%
  \ifhfut@integral@limits@true
    \removenolimits{%
      \int\iint\iiint\iiiint\oint\oiint\oiiint
      \intclockwise\varointclockwise\ointctrclockwise\sumint
      \intbar\intBar\fint\cirfnint\awint\rppolint
      \scpolint\npolint\pointint\sqint\intlarhk\intx
      \intcap\intcup\upint\lowint
    }%
  \else
    \addnolimits{%
      \int\iint\iiint\iiiint\oint\oiint\oiiint
      \intclockwise\varointclockwise\ointctrclockwise\sumint
      \intbar\intBar\fint\cirfnint\awint\rppolint
      \scpolint\npolint\pointint\sqint\intlarhk\intx
      \intcap\intcup\upint\lowint
    }%
  \fi
}
\newcommand\hfut@set@unimath@ellipsis{%
  \ifhfut@math@ellipsis@centered
    \DeclareRobustCommand\mathellipsis{\mathinner{\unicodecdots}}%
  \else
    \DeclareRobustCommand\mathellipsis{\mathinner{\unicodeellipsis}}%
  \fi
}
\newcommand\hfut@set@unimath@real@part{%
  \ifhfut@real@part@roman
    \AtBeginDocument{%
      \def\Re{\operatorname{Re}}%
      \def\Im{\operatorname{Im}}%
    }%
  \else
    \AtBeginDocument{%
      \let\Re\hfut@save@Re
      \let\Im\hfut@save@Im
    }%
  \fi
}

\newcommand\hfut@set@unimath@style{%
  \ifhfut@uppercase@greek@upright
    \unimathsetup{math-style = TeX}%
  \else
    \ifhfut@uppercase@greek@italic
      \unimathsetup{math-style = ISO}%
    \fi
  \fi
  \ifhfut@math@style@TeX
    \unimathsetup{bold-style = TeX}%
  \else
    \unimathsetup{bold-style = ISO}%
  \fi
  \hfut@set@unimath@leq
  \hfut@set@unimath@integral@limits
  \ifhfut@partial@upright
    \unimathsetup{partial = upright}%
  \else
    \ifhfut@partial@italic
      \unimathsetup{partial = italic}%
    \fi
  \fi
  \hfut@set@unimath@ellipsis
  \hfut@set@unimath@real@part
}

\newcommand\hfut@qed{\rule{1ex}{1ex}}
\newcommand\hfut@load@unimath{%
  \@ifpackageloaded{unicode-math}{}{%
    \RequirePackage{unicode-math}%
    \AtBeginDocument{%
      \let\hfut@save@leq\leq
      \let\hfut@save@geq\geq
      \let\hfut@save@Re\Re
      \let\hfut@save@Im\Im
    }%
    %
    % å…¼å®¹æ—§çš„ç²—ä½“å‘½ä»¤ï¼š\pkg{bm} çš„ \cs{bm} å’Œ \pkg{amsmath} çš„ \cs{boldsymbol}ã€‚
    \DeclareRobustCommand\bm[1]{{\symbfit{##1}}}%
    \DeclareRobustCommand\boldsymbol[1]{{\symbfit{##1}}}%
    %
    % å…¼å®¹ \pkg{amsfonts} å’Œ \pkg{amssymb} ä¸­çš„ä¸€äº›å‘½ä»¤ã€‚
    \newcommand\square{\mdlgwhtsquare}%
    \newcommand\blacksquare{\mdlgblksquare}%
    \AtBeginDocument{%
      \renewcommand\checkmark{\ensuremath{âœ“}}%
    }%
    %
    % å…¼å®¹ \pkg{amsthm} çš„ \cs{qedsymbol}ã€‚
    \renewcommand\hfut@qed{\ensuremath{\QED}}%
  }%
}

% STIX Two Math
\newcommand\hfut@set@math@font@stix{%
  \hfut@load@unimath
  \hfut@set@unimath@style
  \hfut@set@stix@names
  \setmathfont{\hfut@font@name@stix@math}[
    Extension    = .otf,
    StylisticSet = \hfut@xits@integral@stylistic@set,
  ]%
  \setmathfont{\hfut@font@name@stix@math}[
    Extension    = .otf,
    StylisticSet = 1,
    range        = {scr,bfscr},
  ]%
}

% XITS Math
\newcommand\hfut@xits@integral@stylistic@set{%
  \ifhfut@integral@upright
    8%
  \fi
}
\newcommand\hfut@set@math@font@xits{%
  \hfut@load@unimath
  \hfut@set@unimath@style
  \hfut@set@xits@names
  \setmathfont{\hfut@font@name@xits@math}[
    Extension    = .otf,
    StylisticSet = \hfut@xits@integral@stylistic@set,
  ]%
  \setmathfont{\hfut@font@name@xits@math}[
    Extension    = .otf,
    StylisticSet = 1,
    range        = {cal,bfcal},
  ]%
}

% Libertinus Math
\newcommand\hfut@libertinus@integral@stylistic@set{%
  \ifhfut@integral@slanted
    8%
  \fi
}
\newcommand\hfut@set@math@font@libertinus{%
  \hfut@load@unimath
  \hfut@set@unimath@style
  \hfut@set@libertinus@names
  \hfut@set@xits@names
  \setmathfont{\hfut@font@name@libertinus@math}[
    Extension    = .otf,
    StylisticSet = \hfut@libertinus@integral@stylistic@set,
  ]%
  \setmathfont{\hfut@font@name@xits@math}[
    Extension    = .otf,
    range        = {\checkmark},
  ]%
}

% New Computer Modern Math
\newcommand\hfut@newcm@integral@stylistic@set{%
  \ifhfut@integral@upright
    2%
  \fi
}
\newcommand\hfut@set@math@font@newcm{%
  \hfut@load@unimath
  \hfut@set@unimath@style
  \setmathfont{NewCMMath-Book}[
    Extension    = .otf,
    StylisticSet = \hfut@newcm@integral@stylistic@set,
  ]%
  \setmathfont{NewCMMath-Book}[
    Extension    = .otf,
    StylisticSet = 1,
    range        = {scr,bfscr},
  ]%
  \setmathrm{NewCM10}[
    Extension      = .otf,
    UprightFont    = *-Book,
    BoldFont       = *-Bold,
    ItalicFont     = *-BookItalic,
    BoldItalicFont = *-BoldItalic,
  ]%
  \setmathsf{NewCMSans10}[
    Extension         = .otf,
    UprightFont       = *-Book,
    BoldFont          = *-Bold,
    ItalicFont        = *-BookOblique,
    BoldItalicFont    = *-BoldOblique,
  ]%
  \setmathtt{NewCMMono10}[
    Extension           = .otf,
    UprightFont         = *-Book,
    ItalicFont          = *-BookItalic,
    BoldFont            = *-Bold,
    BoldItalicFont      = *-BoldOblique,
  ]%
}

% Latin Modern Math
\newcommand\hfut@set@math@font@lm{%
  \hfut@load@unimath
  \hfut@set@unimath@style
  \setmathfont{latinmodern-math}[Extension=.otf]%
  \setmathrm{lmroman10}[
    Extension      = .otf,
    UprightFont    = *-regular,
    BoldFont       = *-bold,
    ItalicFont     = *-italic,
    BoldItalicFont = *-bolditalic,
  ]%
  \setmathsf{lmsans10}[
    Extension      = .otf,
    UprightFont    = *-regular,
    BoldFont       = *-bold,
    ItalicFont     = *-oblique,
    BoldItalicFont = *-boldoblique,
  ]%
  \setmathtt{lmmonolt10}[
    Extension      = .otf,
    UprightFont    = *-regular,
    BoldFont       = *-bold,
    ItalicFont     = *-oblique,
    BoldItalicFont = *-boldoblique,
  ]%
}

% NewTX Math
% æ³¨æ„ NewTX Math æ˜¯ Type 1 å­—ä½“ï¼Œå¦‚æžœæ­£æ–‡è¥¿æ–‡ä½¿ç”¨äº† OpenType å­—ä½“æ—¶éœ€è¦å°å¿ƒå¤„ç†ã€‚
\newcommand\hfut@set@math@font@newtx{%
  \ifhfut@font@newtx\else
    \let\hfut@save@encodingdefault\encodingdefault
    \let\hfut@save@rmdefault\rmdefault
    \let\hfut@save@sfdefault\sfdefault
    \let\hfut@save@ttdefault\ttdefault
    \RequirePackage[T1]{fontenc}%
    \renewcommand{\rmdefault}{ntxtlf}%
    \renewcommand{\sfdefault}{qhv}%
    \renewcommand{\ttdefault}{ntxtt}%
  \fi
  \ifhfut@uppercase@greek@italic
    \PassOptionsToPackage{slantedGreek}{newtxmath}%
  \fi
  \ifhfut@integral@upright
    \PassOptionsToPackage{upint}{newtxmath}%
  \fi
  \RequirePackage{newtxmath}
  \let\hfut@save@leq\leq
  \let\hfut@save@geq\geq
  \ifhfut@leq@slanted
    \let\le\leqslant
    \let\ge\geqslant
    \let\leq\leqslant
    \let\geq\geqslant
  \fi
  \ifhfut@integral@limits@true
    \let\ilimits@\displaylimits
  \fi
  \let\hfut@save@partial\partial
  \ifhfut@partial@upright
    \let\partial\uppartial
  \fi
  \ifhfut@math@ellipsis@centered
    \DeclareRobustCommand\mathellipsis{\mathinner{\cdotp\cdotp\cdotp}}%
  \else
    \DeclareRobustCommand\mathellipsis{\mathinner{\ldotp\ldotp\ldotp}}%
  \fi
  \let\hfut@save@Re\Re
  \let\hfut@save@Im\Im
  \ifhfut@real@part@roman
    \def\Re{\operatorname{Re}}%
    \def\Im{\operatorname{Im}}%
  \fi
  \RequirePackage{bm}%
  \ifhfut@font@newtx\else
    \let\encodingdefault\hfut@save@encodingdefault
    \let\rmdefault\hfut@save@rmdefault
    \let\sfdefault\hfut@save@sfdefault
    \let\ttdefault\hfut@save@ttdefault
  \fi
  \DeclareRobustCommand\symup[1]{{\mathrm{##1}}}%
  \DeclareRobustCommand\symbf[1]{{\bm{##1}}}%
  \DeclareRobustCommand\symbfsf[1]{{\bm{##1}}}%
  \let\increment\upDelta%
  \renewcommand\hfut@qed{\openbox}%
}

% Computer Modern
% ä½¿ç”¨ LaTeX é»˜è®¤çš„ cm å­—ä½“
\newcommand\hfut@set@math@font@cm{%
  \RequirePackage{amssymb}
  \let\hfut@save@leq\leq
  \let\hfut@save@geq\geq
  \ifhfut@leq@slanted
    \let\le\leqslant
    \let\ge\geqslant
    \let\leq\leqslant
    \let\geq\geqslant
  \fi
  \ifhfut@integral@limits@true
    \let\ilimits@\displaylimits
  \fi
  \ifhfut@math@ellipsis@centered
    \DeclareRobustCommand\mathellipsis{\mathinner{\cdotp\cdotp\cdotp}}%
  \else
    \DeclareRobustCommand\mathellipsis{\mathinner{\ldotp\ldotp\ldotp}}%
  \fi
  \let\hfut@save@Re\Re
  \let\hfut@save@Im\Im
  \ifhfut@real@part@roman
    \def\Re{\operatorname{Re}}%
    \def\Im{\operatorname{Im}}%
  \fi
  \RequirePackage{bm}%
  \DeclareRobustCommand\symup[1]{{\mathrm{##1}}}%
  \DeclareRobustCommand\symbf[1]{{\bm{##1}}}%
  \DeclareRobustCommand\symbfsf[1]{{\bm{##1}}}%
  \let\increment\Delta
  \renewcommand\hfut@qed{\openbox}%
  \let\uppi\pi
}

% ä¸è®¾ç½®æ•°å­¦å­—ä½“ï¼Œä»…æä¾›å…¼å®¹æ”¯æŒã€‚
\newcommand\hfut@set@math@font@none{%
  \RequirePackage{amssymb}
  \RequirePackage{bm}%
  \DeclareRobustCommand\symup[1]{{\mathrm{##1}}}%
  \DeclareRobustCommand\symbf[1]{{\bm{##1}}}%
  \DeclareRobustCommand\symbfsf[1]{{\bm{##1}}}%
  \let\increment\Delta
  \renewcommand\hfut@qed{\openbox}%
  \let\uppi\pi
}

\newcommand\hfut@set@math@font{%
  \@nameuse{hfut@set@math@font@\hfut@math@font}%
}
\hfut@option@hook{math-font}{\g@addto@macro\hfut@setup@hook{\hfut@set@math@font}}
\newcommand\hfut@set@math@font@auto{%
  \ifhfut@math@font@auto
    \hfutsetup{math-font=xits}%
  \fi
}
\AtBeginOfPackageFile*{siunitx}{\hfut@set@math@font@auto}
\AtEndPreamble{%
  \hfut@set@math@font@auto
  \ifx\square\@undefined
    \RequirePackage{amssymb}%
  \fi
}



% \subsection{çº¸å¼&nbsp;å’Œé¡µé¢}
% ä½¿ç”¨ \pkg{geometry} å®åŒ…è®¾ç½®çº¸å¼&nbsp;å’Œé¡µé¢ã€‚

% çº¸å¼&nbsp;ï¼šA4ï¼›

% é¡µé¢è®¾ç½®ï¼šä¸Šã€ä¸‹ 2.54 cmï¼Œå·¦ã€å³ 3 cmï¼Œé¡µçœ‰ 1.5 cmï¼Œé¡µè„š 1.5 cmã€‚

% æ³¨æ„è¿™é‡ŒæŒ‡çš„æ˜¯é¡µçœ‰é¡¶éƒ¨åˆ°çº¸å¼&nbsp;é¡¶éƒ¨çš„è·ç¦»ä¸º 1.5 cmï¼Œ
% æ‰€ä»¥åº”è¯¥æ˜¯ 2.54cm - 0.75cm - 0.29cm = 1.5cm
% é¡µè„š åŒç† 2.54cm - 1.04cm = 1.5cm

\geometry{
  paper      = a4paper,
  vmargin    = 2.54cm,
  hmargin    = 3cm,
  headheight = 0.75cm,
  headsep    = 0.29cm,
  footskip   = 1.04cm,
}

% ä½¿ç”¨ \pkg{fancy} éœ€è¦å…ˆè°ƒç”¨ |\pagestyle{fancy}| å†ä¿®æ”¹ \cs{chaptermark} å’Œ
% \cs{sectionmark}ã€‚
\pagestyle{fancy}
\let\sectionmark\@gobble
\renewcommand\headrulewidth{0.4\p@}
% é‡å®šä¹‰é»˜è®¤çš„ |myheadings| page styleï¼Œä¼šæ˜¾ç¤ºé¡µçœ‰å’Œé¡µè„šã€‚
\fancypagestyle{myheadings}{%
  \fancyhf{}%
  %
  % é¡µçœ‰ä¸Žè¯¥éƒ¨åˆ†çš„ç«&nbsp;æ&nbsp;‡é¢˜ç›¸åŒï¼Œå®‹ä½“ 10.5 ç£…ï¼ˆäº”å·ï¼‰å±…ä¸­ã€1.5å€è¡Œè·ã€‚
  % é¡µç&nbsp;ï¼šå®‹ä½“ 10.5 ç£…ã€é¡µé¢ä¸‹è„šå±…ä¸­ã€‚
  % é¡µçœ‰ä¸Šä¸‹é¡µè¾¹è·1.5 cm
  \def\hfut@hf@font{\fontsize{10.5bp}{20.475bp}\selectfont}
  \renewcommand\headrulewidth{0.4\p@}
  \ifhfut@degree@graduate
    
    \fancyhead[OC]{\hfut@hf@font\leftmark}%
    \ifhfut@degree@doctor
      \fancyhead[EC]{\hfut@hf@font åˆè‚¥å·¥ä¸šå¤§å­¦åšå£«ç&nbsp;”ç©¶ç”Ÿå­¦ä½è®ºæ–‡}%
    \else
      \fancyhead[EC]{\hfut@hf@font åˆè‚¥å·¥ä¸šå¤§å­¦\hfut@degreetype@name ç&nbsp;”ç©¶ç”Ÿå­¦ä½è®ºæ–‡}%
    \fi
    \fancyfoot[C]{\hfut@hf@font\thepage}%
    \let\@mkboth\markboth
    \def\chaptermark##1{%
      \markboth{\CTEXifname{\CTEXthechapter\quad}{}\hfut@spacetitle{##1}}{}%
    }%
    \let\sectionmark\@gobble
  \else
    %
    % æœ¬ç§‘ç”Ÿè¦æ±‚åœ¨æ­£æ–‡æ¯é¢ä¸Šéƒ¨åŠ&nbsp;é¡µçœ‰ï¼Œ
    % ç”¨äº”å·å­—ï¼ˆ10.5 bpï¼‰æ&nbsp;‡æ³¨â€œåˆè‚¥å·¥ä¸šå¤§å­¦æ¯•ä¸šè®¾è®¡ï¼ˆè®ºæ–‡ï¼‰â€ï¼Œå±…ä¸­ï¼›
    % ä»Žæ­£æ–‡é¡µå¼€å§‹åœ¨æ¯é¢åº•éƒ¨å±…ä¸­ç”¨å°äº”å®‹ä½“ï¼ˆ10.5 bpï¼‰è¿žç»­ç¼–é¡µç&nbsp;ã€‚
    \fancyhead[C]{\hfut@hf@font åˆè‚¥å·¥ä¸šå¤§å­¦æ¯•ä¸šè®¾è®¡ï¼ˆè®ºæ–‡ï¼‰}%
    \fancyfoot[C]{\hfut@hf@font\thepage}%
    \let\@mkboth\@gobbletwo
    \let\chaptermark\@gobble
    \let\sectionmark\@gobble
  \fi
}
\pagestyle{myheadings}

% |headings| åªæœ‰é¡µçœ‰ï¼Œæ²¡æœ‰é¡µè„šï¼Œç”¨äºŽç&nbsp;”ç©¶ç”Ÿçš„ç¬¦å·è¯´æ˜Žå’Œæœ¬ç§‘ç”Ÿçš„ front matterã€‚
\fancypagestyle{headings}{
  \fancyfoot{}
}

% é‡å®šä¹‰|plain|å­—ä½“å¤§å°
\fancypagestyle{plain}{%
  \fancyhf{}
  \fancyhead{}
  \renewcommand\headrulewidth{0pt}
  \def\hfut@hf@font{\fontsize{10.5bp}{20.475bp}\selectfont}
  \fancyfoot[C]{\hfut@hf@font\thepage}%
}

% è®¾ç½®ç‰¹æ®Šçš„ page style ä¸æ”¹å˜ä»»ä½•å†…å®¹ï¼Œç”¨äºŽæ¯ç«&nbsp;é¦–é¡µã€‚
\def\ps@chapter{}
\ctexset{chapter/pagestyle=chapter}

% ç©ºç™½é¡µä¸åŠ&nbsp;é¡µçœ‰å’Œé¡µç&nbsp;ã€‚
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
  \hbox{}\thispagestyle{empty}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}
  %
  % ç&nbsp;”ç©¶ç”Ÿè¦æ±‚ä»Žâ€œä¸­æ–‡æ‘˜è¦â€å¼€å§‹é¡µç&nbsp;ç”¨å¤§å†™ç½—é©¬æ•°å­—ï¼Œ
  % è€Œæœ¬ç§‘ç”Ÿçš„ frontmatterä¸ç¼–é¡µç&nbsp;ï¼Œä»Žæ­£æ–‡å¼€å§‹é¡µç&nbsp;ç”¨é˜¿æ‹‰ä¼¯æ•°å­—ã€‚
\renewcommand\frontmatter{%
  \cleardoublepage
  \@mainmatterfalse
  \pagestyle{plain}%
  \pagenumbering{Roman}%
}

% ç&nbsp;”ç©¶ç”Ÿè¦æ±‚â€œç¬¬ 1 ç«&nbsp;â€è¦å¦é¡µèµ·ï¼Œä½†æ˜¯æœ¬ç§‘ç”Ÿè¦æ±‚å¦é¢èµ·ã€‚
\renewcommand\mainmatter{%
  \ifhfut@degree@graduate
    \cleardoublepage
    \pagenumbering{arabic}%
  \else
    \clearpage
    \pagenumbering{arabic}%
  \fi
  \pagestyle{myheadings}%
  \@mainmattertrue
}

% ç&nbsp;”ç©¶ç”Ÿè¦æ±‚"å‚è€ƒæ–‡çŒ®"èµ· æ—&nbsp;é¡µçœ‰ï¼Œä½†æ˜¯æœ¬ç§‘ç”Ÿä»ç„¶æœ‰é¡µçœ‰ã€‚
\renewcommand\backmatter{%
  \ifhfut@degree@graduate
    \clearpage
    \pagestyle{plain}%
  \else
    \clearpage
  \fi
  \hfut@appendixfalse
}

\g@addto@macro\appendix{
  \renewcommand\thechapter{\@arabic\c@chapter}
  \@mainmattertrue
  \hfut@appendixtrue
}%
% \subsection{é™„å½•}
% fakeTODO å¤„ç†é™„å½•ç¼–å·é—®é¢˜
% ç&nbsp;”ç©¶ç”Ÿé™„å½•æŒ‰ç…§é™„å½•1ã€é™„å½•2ç¼–å·ï¼›[æ•°å­¦å­¦é™¢æœ¬ç§‘ç”Ÿé™„å½•ä¸ç¼–å·ï¼Œè¯·å°†ä»¥ä¸‹`\renewcommand\appendix` å–æ¶ˆæ³¨é‡Š]
% \renewcommand\appendix{%
%   \ifhfut@degree@bachelor
%     \ctexset{
%       chapter/numbering=false,
%       chapter/format = \centering\rmfamily\bfseries\fontsize{18bp}{18bp}\selectfont,
%       chapter/beforeskip  = 9bp,
%       chapter/afterskip   = 27bp,
%     }
%     \setcounter{chapter}{1}
%   \else
%     \ctexset{appendix/number=\arabic{chapter}}
%   \fi
% }
\ctexset{appendix/number=\arabic{chapter}}

% \subsection{å°é¢}

% å®šä¹‰ç”¨æˆ·æŽ¥å£ï¼š
\hfut@define@key{
  ugtype = {
    default = {è®ºæ–‡},
  },
  title = {
    default = {è®ºæ–‡é¢˜ç›®},
  },
  title* = {
    default = {Title},
    name    = title@en,
  },
  author = {
    default = {ä½œè€…å§“å},
  },
  stuID = {
    default = {å­¦å·},
  },
  clc  = {
    default = {åˆ†ç±»å·},
  },
  author* = {
    default = {Author Name},
    name    = author@en,
  },
  speciality = {
    default = {ä¸“ä¸š},
  },
  hfuteryear = {
    default = {2017çº§},
  },
  research = {
    default = {ç&nbsp;”ç©¶æ–¹å‘},
  },
  supervisor = {
    default = {å¯¼å¸ˆå§“å},
  },
  department = {
    default = {å­¦é™¢åç§°},
  },
  advisor = {
    default = {},
  },
  advisor* = {
    default = {},
    name    = advisor@en,
  },
  applydegree = {
    default = {ç†å­¦åšå£«},
  },
  school = {
    default = {åˆè‚¥å·¥ä¸šå¤§å­¦},
  },
  phdchairman = {
    default = {},
    name    = phd@chairman,
  },
  phdmember = {
    default = {},
    name    = phd@member,
  },
  date = {
    default = {\the\year-\two@digits{\month}},
  },
  defensedate = {
    default = {},
  },
  professional-type = {
    name = professional@type,
  },
  professional-type* = {
    name = professional@type@en,
  },
  secret-level = {
    default = {},
    name    = secret@level,
  },
  secret-level* = {
    name    = secret@level@en,
  },
  secret-year = {
    name    = secret@year,
  },
  signchairman = {
    default = {},
    name    = sign@chairman,
  },
  signmember = {
    default = {},
    name    = sign@member,
  },
  signsupervisor = {
    default = {},
    name    = sign@supervisor,
  },
  keywords,
  keywords* = {
    name    = keywords@en,
  },
}

% å¯¼å¸ˆä¸€æ&nbsp;å¯èƒ½æœ‰å¤šä¸ªå§“åï¼Œæ‰€ä»¥ç”¨ \opt{supervisor} è¿›è¡Œæ”¶é›†ï¼Œ
% ç„¶åŽä½¿ç”¨æœ¬å‘½ä»¤æ¥è¾“å‡ºè¦æ±‚çš„æ&nbsp;¼å¼ï¼Œ
% ç±»ä¼¼äºŽ \LaTeX3 çš„ \cs{clist\_use:Nn}ã€‚
\newcommand\hfut@clist@count[1]{%
  \csname clist_count:N\endcsname{#1}%
}
\newcommand\hfut@clist@use[2]{%
  \csname clist_use:Nn\endcsname{#1}{#2}%
}
\newcommand\hfut@supervisor@names{%
  \hfut@clist@use{\hfut@supervisor}{\quad}
}
\newcommand\hfut@advisor@names{%
  \hfut@clist@use{\hfut@advisor}{\quad}
}

% è¾“å‡ºæ—¥æœŸçš„ç»™å®šæ&nbsp;¼å¼ï¼š\cs{hfut@format@date}\marg{format}\marg{date}ï¼Œ
% å…¶ä¸­æ&nbsp;¼å¼ \meta{format} æŽ¥å—ä¸‰ä¸ªå‚æ•°åˆ†åˆ«å¯¹åº”å¹´ã€æœˆã€æ—¥ï¼Œ
% \meta{date} æ˜¯ ï¼ˆyyyy-mï¼‰ã€‚
\newcommand\hfut@format@date[2]{%
  \edef\hfut@@date{#2}%
  \def\hfut@@process@date##1-##2\@nil{%
    #1{##1}{##2}%
  }%
  \expandafter\hfut@@process@date\hfut@@date\@nil
}
\newcommand\hfut@date@format@zh[2]{#1 å¹´ \number#2 æœˆ}
\newcommand\hfut@date@month[1]{%
  \ifcase\number#1\or
    January\or February\or March\or April\or May\or June\or
    July\or August\or September\or October\or November\or December%
  \fi
}
\newcommand\hfut@date@format@en[2]{\hfut@date@month{#2}, #1}
\newcommand\hfut@date@zh{\hfut@format@date{\hfut@date@format@zh}{\hfut@date}}
\newcommand\hfut@date@en{\hfut@format@date{\hfut@date@format@en}{\hfut@date}}

% ç‰ˆæœ¬ v3.2 å¼€å§‹ä½¿ç”¨ \cs{hfutsetup} è®¾ç½®æŽ¥å£ï¼Œ
% å…¼å®¹æ—§ç‰ˆæœ¬çš„å‘½ä»¤å¼è®¾ç½®ã€‚
% Reserved for compatibility until 2020-07-01.
\def\hfut@define@term#1#2{%
  \expandafter\gdef\csname #1\endcsname##1{%
    \hfutsetup{#2 = {##1}}%
  }%
}
\hfut@define@term{title}{title}
\hfut@define@term{entitle}{title*}
\hfut@define@term{author}{author}
\hfut@define@term{enauthor}{author*}
\hfut@define@term{major}{speciality}
\hfut@define@term{supervisor}{supervisor}
\gdef\cosupervisor#1{%
  \g@addto@macro\hfut@supervisor{, #1}%
}
\gdef\date#1{\renewcommand\hfut@date@zh{#1}}
\gdef\endate#1{\renewcommand\hfut@date@en{#1}}
\hfut@define@term{professionaltype}{professional-type}
\hfut@define@term{enprofessionaltype}{professional-type*}
\hfut@define@term{secretlevel}{secret-level}
\hfut@define@term{ensecretlevel}{secret-level*}
\hfut@define@term{secretyear}{secret-year}
\gdef\keywords#1{\renewcommand\hfut@keywords@text{#1}}
\gdef\enkeywords#1{\renewcommand\hfut@keywords@en@text{#1}}

% å®šä¹‰ä¸€äº›å¸¸é‡ã€‚
\ifhfut@degree@doctor
  \newcommand\hfut@thesis@name{åšå£«å­¦ä½è®ºæ–‡}
  \newcommand\hfut@degreetype@name{åšå£«}
  \newcommand\hfut@thesis@name@en{A Dissertation Submitted to \par
  Hefei University of Technology \par
  in accordmance with the requirement \par
  for the Degree of Doctor of Philosophy}
  \newcommand\hfut@thesis@name@encover{DOCTORAL DISSERTATION}
\else
  \ifhfut@degree@master
    \newcommand\hfut@thesis@name{ç¡•å£«å­¦ä½è®ºæ–‡}
    \newcommand\hfut@thesis@name@en{A Dissertation Submitted for the Degree of Master}
    \newcommand\hfut@thesis@name@encover{MASTER'S DISSERTATION}
  \else
    \newcommand\hfut@thesis@name{æœ¬ç§‘æ¯•ä¸šè®¾è®¡ï¼ˆè®ºæ–‡ï¼‰}
    \newcommand\hfut@thesis@name@en{A Dissertation Submitted for the Degree of Bachelor}
    \newcommand\hfut@thesis@name@encover{UNDERGRADUATE THESIS}
  \fi
\fi

\ifhfut@degree@master
  \ifhfut@degree@type@academic
    \newcommand\hfut@degreetype@name{å­¦åŽ†ç¡•å£«}
  \else
    \newcommand\hfut@degreetype@name{ä¸“ä¸šç¡•å£«}
  \fi
\fi

\ifhfut@degree@type@academic
  \ifhfut@degree@doctor
    \newcommand\hfut@speciality@name{å­¦ç§‘ä¸“ä¸š}
  \else
    \newcommand\hfut@speciality@name{ä¸“ä¸šåç§°}
  \fi
\else
  \ifhfut@cjk@font@mac
    \providecommand\lishu{\CJKfamily{zhli}}
  \else
    \ifhfut@cjk@font@windows
      \setCJKfamilyfont{zhli}{LiSu}
      \providecommand\lishu{\CJKfamily{zhli}}
    \else
      \hfut@warning{LiShu font is required}
      \providecommand\lishu{\sffamily}
    \fi
  \fi
  \newcommand\hfut@speciality@name{ä¸“ä¸šåç§°}
\fi

% å®šä¹‰æ&nbsp;¡å¾½é¢œè‰²
\definecolor{hfutred}{cmyk}{0.3,1,0.95,0.05}

% æ·»åŠ&nbsp; PDF ä¹¦ç­¾ï¼Œåœ¨ \pkg{hyperref} è½½å…¥åŽæ‰æœ‰æ•ˆã€‚
\newcommand\hfut@pdfbookmark{\@gobble}

% é‡å®šä¹‰ \env{titlepage} çŽ¯å¢ƒï¼Œä¸ä¿®æ”¹é¡µç&nbsp;ã€‚
\renewenvironment{titlepage}{%
  \cleardoublepage
  \if@twocolumn
    \@restonecoltrue\onecolumn
  \else
    \@restonecolfalse\newpage
  \fi
  \thispagestyle{empty}%
}{%
  \if@restonecol\twocolumn \else \newpage \fi
}

% TODO: åšä¸€äº›å®šä¹‰ç”¨ä»¥å®žçŽ°ï¼šä¸å®šé•¿, è‡ªåŠ¨æ¢è¡Œä¸”æœ‰å®šé•¿ä¸‹åˆ’çº¿çš„â€œè®ºæ–‡æ&nbsp;‡é¢˜â€
% from:
% https://github.com/CTeX-org/forum/issues/208
% https://syvshc.github.io/2021-08-04-thesis-title/
% https://zhuanlan.zhihu.com/p/51494365

% inner temp length
\newlength\@tempTitleHt
\newlength\@tempTitleMaxWd

% length used as parametersï¼Œ "Wd" is a shorthand for "Width"
\newlength\titleSingleLineMaxWd
\newlength\titleMultiLineMaxWd
\newlength\titleLRExtraWd
\newlength\titleSepWd

\setlength\titleSingleLineMaxWd{8.5cm}
\setlength\titleMultiLineMaxWd{7cm}
\setlength\titleLRExtraWd{0em}
\setlength\titleSepWd{.5em}

% main macro, using a simple table
% \newcommand{\multilingualTitles}[2]{%
%   \par
%   {\noindent\centering
%   \begin{tabular}{r @{\hspace{\titleSepWd}} p{\titleSingleLineMaxWd}}
%   	ä¸­æ–‡æ&nbsp;‡é¢˜           &amp; \titleBox{#1} \\
%   	                 &amp;               \\[-10pt]
%   	Title in English &amp; \titleBox{#2}
%   \end{tabular}\par}%
% }

% draw a fixed-width underline
\newcommand{\titleUnderline}{%
  \rule[-.3em]{\titleSingleLineMaxWd + 2\titleLRExtraWd}{.5pt}}

% title content typesetter
\newcommand\titleBox[1]{%
  \setlength\@tempTitleMaxWd\titleSingleLineMaxWd
  % Measure the total height of #1 subject to \titleSingleLineMaxWd.
  % Here \@titleBox is necessary when #1 contains "\\".
  \settototalheight\@tempTitleHt{\@titleBox{#1}}%
  \ifdim\@tempTitleHt=0pt%
    % case 1: #1 causes empty output
    \titleUnderline
  \else
    % Change to LR mode, for inserting a zero-width box right after.
    \leavevmode
    % note: Use \normalbaseineskip instead of \baselineskip, 
    %       since the latter is set to 0pt inside tabular env.
    \ifdim\@tempTitleHt&gt;\normalbaselineskip
      % case 2: #1 is fit for multilines, or contains `\\`, hence
      %         \titleMultiLineMaxWd is used instead, and the total 
      %         height of #1 subject to new max width is re-measured.
      \setlength\@tempTitleMaxWd\titleMultiLineMaxWd
      \settototalheight\@tempTitleHt{\@titleBox{#1}}%
      % \rlap{\smash{...}} typesets content of its argument normally 
      % but sets it into a zero sized box. Here \@titleBox set 
      % (possiblly) multi-line text into a single box, since \smash 
      % only takes in argument spreading one line.
      %
      % Every line of title content needs an underline, hense we do
      % a loop to typeset one underline for every line the title 
      % content actually spreads.
      \rlap{\smash{\@titleBox{%
        \@whiledim\@tempTitleHt&gt;0pt%
        \leavevmode
        % 
        \do{%
          \rlap{\titleUnderline}\\%
          \addtolength\@tempTitleHt{-\normalbaselineskip}%
        }%
      }}}%
      % Insert h-offset to manually center the title content.
      \hspace{\dimexpr\titleLRExtraWd + .5\titleSingleLineMaxWd - .5\titleMultiLineMaxWd\relax}%
      \@titleBox{\centering #1}%
    \else
      % case 3: #1 is fit for one line
      \rlap{\titleUnderline}%
      \hspace{\titleLRExtraWd}%
      \@titleBox{\centering #1}%
    \fi
  \fi
}

% common operations on every title content
\newcommand{\@titleBox}[1]{%
  \parbox[t]{\@tempTitleMaxWd}{#1}}

\newlength{\lwtm}
\setlength{\lwtm}{\widthof{è®ºæ–‡é¢˜ç›® :}}

% ä¸­æ–‡å°é¢ï¼š
% æŠ¬å¤´é»‘ä½“ 12 ç£…ï¼›
% è®ºæ–‡ç±»åž‹ï¼šç&nbsp;”ç©¶ç”Ÿé»‘ä½“ 48 ç£…ï¼Œæœ¬ç§‘ç”Ÿé»‘ä½“42ç£…ï¼›
% è®ºæ–‡ç±»åž‹è‹±æ–‡ Times New Roman 22 ç£…ï¼›
% å°é¢ä¿¡æ¯ å®‹ä½“ 16 ç£…
% è®ºæ–‡é¢˜ç›®é»‘ä½“ 26 ç£…åŠ&nbsp;ç²—å±…ä¸­ï¼Œå•å€è¡Œè·ï¼›
% ä½œè€…å§“åå®‹ä½“ 16 ç£…ï¼Œå•å€è¡Œè·ï¼›
% æ³¨æ„è¿™é‡Œçš„â€œå•å€è¡Œè·â€çš„åœ°æ–¹å¼€å¯äº†â€œå¯¹é½åˆ°ç½‘æ&nbsp;¼â€ï¼Œæ‰€ä»¥å®žé™…è¡Œè·æœ‰æ‰€åå·®ï¼Œ
% æ‰€ä»¥åªèƒ½ä½¿ç”¨ç›´å°ºæµ‹é‡ã€‚
\newcommand\hfut@speciality@sse{è½¯ä»¶å·¥ç¨‹}
% ç”Ÿæˆç©ºçš„ä¸‹åˆ’çº¿
\newcommand\hfut@underline[2][3.4cm]{\underline{\hb@xt@ #1{\hss#2\hss}}}
\newcommand\hfut@makecover{%
  \hfutsetup{language=chinese}%
  \begin{titlepage}%
    \hfut@pdfbookmark{å°é¢}%
    \centering
    \ifhfut@degree@bachelor
      \ifx\hfut@secret@level\@empty
        {\sffamily\bfseries\fontsize{12bp}{19.5bp}\selectfont
        å­¦\hspace{2\ccwd}å·ï¼š\hfut@underline{\hfut@stuID} \hfill
        å¯†\hspace{1em}çº§ï¼š\hfut@underline{å…¬å¼€} \par}
      \else
        {\sffamily\bfseries\fontsize{12bp}{19.5bp}\selectfont
        å­¦\hspace{2\ccwd}å·ï¼š\hfut@underline{\hfut@stuID} \hfill
        å¯†\hspace{1em}çº§ï¼š\hfut@underline{\hfut@secret@level\bigstar\hfut@secret@year} \par}
      \fi
      \vskip 1.15cm%
    \else
      \ifx\hfut@secret@level\@empty
        {\sffamily\bfseries\fontsize{12bp}{19.5bp}\selectfont
        å•ä½ä»£ç&nbsp;ï¼š\hfut@underline{10359} \hfill
        å¯†\hspace{1em}çº§ï¼š\hfut@underline{å…¬å¼€} \par
        å­¦\hspace{2\ccwd}å·ï¼š\hfut@underline{\hfut@stuID} \hfill
        åˆ†ç±»å·ï¼š\hfut@underline{\hfut@clc} \par}
      \else
        {\sffamily\bfseries\fontsize{12bp}{19.5bp}\selectfont
        å•ä½ä»£ç&nbsp;ï¼š\hfut@underline{10359} \hfill
        å¯†\hspace{1em}çº§ï¼š\hfut@underline{\hfut@secret@level\bigstar\hfut@secret@year} \par
        å­¦\hspace{2\ccwd}å·ï¼š\hfut@underline{\hfut@stuID} \hfill
        åˆ†ç±»å·ï¼š\hfut@underline{\hfut@clc} \par}
      \fi
      \vskip 1.8cm%
    \fi

    \includegraphics[height=1.4cm]{hfut-figures/hfut-name.pdf}\par
    \vskip 0.3cm
    {\bfseries\fontsize{22bp}{22bp}\selectfont Hefei University of Technology\par}
    \ifhfut@degree@bachelor
      \vskip 1.1cm%
      {\sffamily\bfseries\fontsize{42bp}{42bp}\selectfont
      \hfut@thesis@name\par}%
      \vskip 0.6cm
    \else
      \vskip 1.0cm%
      {\sffamily\bfseries\fontsize{48bp}{48bp}\selectfont
      \hfut@thesis@name\par}%
      \vskip 0.5cm
    \fi
    {\bfseries\fontsize{22bp}{22bp}\selectfont
    \hfut@thesis@name@encover \par}%
    \ifhfut@degree@master
      \vskip 3.5cm
    \else
      \vskip 0.9cm%
      \includegraphics[height=3.6cm]{hfut-figures/hfut-badge.pdf}%
    \fi
    \ifhfut@degree@bachelor
      \vskip 1.5cm
    \else
      \vskip 2.3cm
    \fi
    \renewcommand\arraystretch{1.5}
    \ifhfut@degree@bachelor
      {\fontsize{16bp}{20bp}\selectfont
      \begin{tabular}{&gt;{\fontsize{16bp}{20bp}\rmfamily\bfseries\selectfont}l&gt;{\rmfamily\fontsize{16bp}{20bp}\selectfont}c}%
        ç±»\hspace{2\ccwd}åž‹ï¼š&amp; \hfut@ugtype \\
        \cline{2-2}
        é¢˜\hspace{2\ccwd}ç›®ï¼š&amp; \hfut@title \\
        \cline{2-2}
        \hfut@speciality@nameï¼š&amp; \hfut@speciality\\
        \cline{2-2}
        å…¥å­¦å¹´ä»½ï¼š&amp; \hfut@hfuteryear \\
        \cline{2-2}
        å­¦ç”Ÿå§“åï¼š&amp; \hfut@author \\
        \cline{2-2}
        æŒ‡å¯¼æ•™å¸ˆï¼š&amp; \hfut@supervisor@names \\
        \cline{2-2}
        å­¦é™¢åç§°ï¼š&amp; \hfut@department \\
        \cline{2-2}
        å®Œæˆæ—¶é—´ï¼š&amp; \hfut@date@zh \\
        \cline{2-2}
      \end{tabular}\par}%
    \else
      \begin{tabular}{&gt;{\rmfamily\bfseries\fontsize{16bp}{20bp}\selectfont}lp{8.5cm}}%
        è®ºæ–‡é¢˜ç›®ï¼š&amp; \multirow[t]{2}{8.5cm}{
          \centering\linespread{1.5}\fontsize{16bp}{20bp}\selectfont
          \hfut@title} \\
          \cline{2-2}
                &amp; \\
        \cline{2-2}
      \end{tabular}
      \renewcommand\arraystretch{1.5}
      \begin{tabular}{&gt;{\bfseries\fontsize{16bp}{20bp}\selectfont}l&gt;{\centering\arraybackslash\fontsize{16bp}{20bp}\selectfont}p{8.5cm}}
        \ifhfut@degree@master
          å­¦ä½ç±»åˆ«ï¼š&amp; \hfut@degreetype@name\\
          \cline{2-2}
        \fi
        \hfut@speciality@nameï¼š&amp; \hfut@speciality\\
        \cline{2-2}
        ä½œè€…å§“åï¼š&amp; \hfut@author \\
        \cline{2-2}
        å¯¼å¸ˆå§“åï¼š&amp; \hfut@supervisor@names \\
        \cline{2-2}
        å®Œæˆæ—¶é—´ï¼š&amp; \hfut@date@zh \\
        \cline{2-2}
      \end{tabular}\par%
      \fi
      \renewcommand\arraystretch{1}
  \end{titlepage}%
  \hfut@reset@main@language
}

\newcommand{\underlineFixlen}[2][4.85cm]{\underline{\makebox[#1][c]{#2}}}

% åšå£«å­¦ä½è®ºæ–‡ é¢˜åé¡µ
\newcommand\hfut@makephdtitle{%
  \hfutsetup{language=chinese}%
  \begin{titlepage}%
    \hfut@pdfbookmark{é¢˜åé¡µ}%
    \centering
    \ifx\hfut@secret@level\@empty
      {\sffamily\bfseries\fontsize{12bp}{20bp}\selectfont
      å•ä½ä»£ç&nbsp;ï¼š\hfut@underline{10359} \hfill
      å¯†\hspace{1em}çº§ï¼š\hfut@underline{å…¬å¼€} \par
      å­¦\hspace{2\ccwd}å·ï¼š\hfut@underline{\hfut@stuID} \hfill
      åˆ†ç±»å·ï¼š\hfut@underline{\hfut@clc} \par}
    \else
      {\sffamily\bfseries\fontsize{12bp}{20bp}\selectfont
      å•ä½ä»£ç&nbsp;ï¼š\hfut@underline{10359} \hfill
      å¯†\hspace{1em}çº§ï¼š\hfut@underline{\hfut@secret@level\bigstar\hfut@secret@year} \par
      å­¦\hspace{2\ccwd}å·ï¼š\hfut@underline{\hfut@stuID} \hfill
      åˆ†ç±»å·ï¼š\hfut@underline{\hfut@clc} \par}
    \fi
    
    \vskip 2.1cm
    {\sffamily\bfseries\fontsize{22bp}{27.5bp}\selectfont
    åš\hspace{0.5\ccwd}å£«\hspace{0.5\ccwd}å­¦\hspace{0.5\ccwd}ä½\hspace{0.5\ccwd}è®º\hspace{0.5\ccwd}æ–‡\par}%
    \vskip 1.3cm
    \renewcommand\arraystretch{1.5}
    \begin{tabular}{@{}p{11.4cm}@{}}%
        \multirow[t]{2}{11.4cm}{
        \centering\linespread{1.5}\bfseries\fontsize{16bp}{24bp}\selectfont
        \hfut@title} \\
      \cline{1-1}
              \\
      \cline{1-1}
    \end{tabular}
    \vskip 1.5cm%
    {\linespread{1.25}
    \bfseries\fontsize{16bp}{16bp}\selectfont
    \uline{\hfut@title@en}\par}%
    \vskip 3.5cm%
    {\linespread{1.5}\fontsize{15bp}{15bp}\selectfont
      \textbf{ä½œè€…å§“åï¼š}\underlineFixlen{\hfut@author} \hfill \textbf{å¯¼å¸ˆå§“åï¼š}\underlineFixlen{\hfut@supervisor@names} \par
      \textbf{ç”³è¯·å­¦ä½ï¼š}\underlineFixlen{\hfut@applydegree} \hfill \textbf{åŸ¹å…»å•ä½ï¼š}\underlineFixlen{\hfut@school} \par
      \textbf{å­¦ç§‘ä¸“ä¸šï¼š}\underlineFixlen{\hfut@speciality} \hfill \textbf{ç&nbsp;”ç©¶æ–¹å‘ï¼š}\underlineFixlen{\hfut@research} \par
      \textbf{æäº¤æ—¥æœŸï¼š}\underlineFixlen{\hfut@date@zh} \hfill \textbf{ç­”è¾©æ—¥æœŸï¼š}\underlineFixlen{\hfut@defensedate} \par
    }
    \vskip 1.3cm
    \renewcommand\arraystretch{1.5}
    \begin{tabular}{@{}&gt;{\fontsize{15bp}{22.5bp}\selectfont}p{15.9cm}@{}}%
      \textbf{ç­”è¾©å§”å‘˜ä¼šä¸»å¸­ï¼š} \hfut@phd@chairman \\
      \cline{1-1}
      \textbf{è¯„\hspace{2\ccwd}é˜…\hspace{2\ccwd}äººï¼š} \hfut@phd@member  \\
      \cline{1-1}
    \end{tabular}
    \renewcommand\arraystretch{1}
    \vfill

    {\fontsize{15bp}{15bp}\selectfont\hfut@date@zh}

  \end{titlepage}%
}


\newcommand\hfut@makezhtitle{%
  \hfutsetup{language=chinese}%
  \begin{titlepage}%
    \hfut@pdfbookmark{ä¸­æ–‡å†…å°é¡µ}%
    \centering
    {\sffamily\fontsize{22bp}{40bp}\selectfont
      åˆ\hspace{1.5\ccwd}è‚¥\hspace{1.5\ccwd}å·¥\hspace{1.5\ccwd}ä¸š\hspace{1.5\ccwd}å¤§\hspace{1.5\ccwd}å­¦\par}%
    \vskip 1.8cm%
    \ifhfut@degree@master
      {\sffamily\bfseries\fontsize{22bp}{30bp}\selectfont
      \hfut@degreetype@name å­¦ä½è®ºæ–‡\par}% ç©ºæ&nbsp;¼ä¸å¯å¿½ç•¥
    \else
      {\sffamily\bfseries\fontsize{22bp}{30bp}\selectfont
      \hfut@thesis@name\par}%
    \fi
    \vskip 1.8cm%
    {\bfseries\fontsize{22bp}{30bp}\selectfont
    \hfut@title\par}%
    \ifhfut@degree@bachelor
      \vskip 6.5cm
    \else
      \vskip 8cm%
    \fi
      \begin{tabular}{&gt;{\fontsize{16bp}{16bp}\rmfamily\bfseries\selectfont}l&gt;{\centering\arraybackslash\fontsize{16bp}{16bp}\rmfamily\selectfont}p{8.4cm}}%
        \ifhfut@degree@bachelor
          å­¦ç”Ÿå§“åï¼š&amp; \hfut@author \\
          \cline{2-2}\\
          å­¦ç”Ÿå­¦å·ï¼š&amp; \hfut@stuID \\
          \cline{2-2}\\
          æŒ‡å¯¼æ•™å¸ˆï¼š&amp; \hfut@supervisor@names \\
          \cline{2-2}\\
          \hfut@speciality@nameï¼š&amp; \hfut@speciality\\
          \cline{2-2}\\
          å­¦é™¢åç§°ï¼š&amp; \hfut@department \\
          \cline{2-2}
        \else
          \ifhfut@degree@doctor
            ä½œè€…å§“åï¼š&amp; \hfut@author\\
            \cline{2-2}\\
            ç”³è¯·å­¦ä½ï¼š&amp; \hfut@applydegree \\
            \cline{2-2}\\
            ç&nbsp;”ç©¶æ–¹å‘ï¼š&amp; \hfut@research \\
            \cline{2-2}\\
            \hfut@speciality@nameï¼š&amp; \hfut@speciality\\
            \cline{2-2}\\
            æŒ‡å¯¼æ•™å¸ˆï¼š&amp; \hfut@supervisor@names \\
            \cline{2-2}
          \else
            \ifx\hfut@advisor\@empty
              ä½œè€…å§“åï¼š&amp; \hfut@author \\
              \cline{2-2}\\
              æŒ‡å¯¼æ•™å¸ˆï¼š&amp; \hfut@supervisor@names \\
              \cline{2-2}\\
              å­¦ç§‘ä¸“ä¸šï¼š&amp; \hfut@speciality \\
              \cline{2-2}\\
              ç&nbsp;”ç©¶æ–¹å‘ï¼š&amp; \hfut@research \\
              \cline{2-2}
            \else
              ä½œè€…å§“åï¼š&amp; \hfut@author \\
              \cline{2-2}\\
              æŒ‡å¯¼æ•™å¸ˆï¼š&amp; \hfut@supervisor@names \\
              \cline{2-2}\\
                &amp; \hfut@advisor@names \\
              \cline{2-2}\\
              ä¸“ä¸šåç§°ï¼š&amp; \hfut@speciality \\
              \cline{2-2}\\
              ç&nbsp;”ç©¶æ–¹å‘ï¼š&amp; \hfut@research \\
              \cline{2-2}
            \fi
          \fi
        \fi
    \end{tabular}\par%
    \vfill
    {\fontsize{15bp}{15bp}\selectfont\hfut@date@zh}
  \end{titlepage}%
  \hfut@reset@main@language
}

% è‹±æ–‡å†…å°é¡µ
\newcommand\hfut@makeentitle{%
  \hfutsetup{language=english}%
  \begin{titlepage}%
    \hfut@pdfbookmark{English inner cover}%
    \centering
    \vspace*{0.5cm}%
    {\fontsize{16bp}{30bp}\selectfont
    \hfut@thesis@name@en\par}%
    \vskip 2.0cm%
    {\bfseries\fontsize{18bp}{30bp}\selectfont
    \hfut@title@en\par}%
    \vskip 1.2cm%
    {\fontsize{16bp}{30bp}\selectfont
    By\par
    \hfut@author@en\par}%
    \ifhfut@degree@doctor
      \vskip 7.0cm
    \else
      \vskip 10.0cm
    \fi
    {\fontsize{16bp}{31bp}\selectfont
    Hefei University of Technology\par
    Hefei, Anhui, P.R.China\par
    \hfut@date@en\par}%
  \end{titlepage}%
  \hfut@reset@main@language
}

% é‡æ–°å®šä¹‰ \cs{maketitle}ï¼Œè°ƒç”¨ \cs{hfut@makezhtitle}, \cs{hfut@makeentitle}
% åˆ†åˆ«ç”Ÿæˆå°é¢ï¼Œä¸­ã€è‹±æ–‡æ&nbsp;‡é¢˜é¡µã€‚
\renewcommand\maketitle{%
  \newgeometry{margin=2.54cm}%
  \pagenumbering{Alph}%
  \pagestyle{empty}%
  \hfut@makecover
  \ifhfut@degree@doctor
    \hfut@makephdtitle
  \fi
  \hfut@makezhtitle
  \hfut@makeentitle
  \restoregeometry
  \pagestyle{plain}%
}

\newcommand\signaturepage{%
  \begin{titlepage}%
    \hfut@pdfbookmark{ç­”è¾©å§”å‘˜ç­¾åé¡µ}%
    \null
    {\centering\sffamily\bfseries\fontsize{22bp}{33bp}\selectfont
    åˆ\hspace{0.5\ccwd}è‚¥\hspace{0.5\ccwd}å·¥\hspace{0.5\ccwd}ä¸š\hspace{0.5\ccwd}å¤§\hspace{0.5\ccwd}å­¦\par}
    \vskip 0.8cm
    {\fontsize{16bp}{30bp}\selectfont
    æœ¬è®ºæ–‡ç»ç­”è¾©å§”å‘˜ä¼šå…¨ä½“å§”å‘˜å®¡æŸ¥ï¼Œç¡®è®¤ç¬¦åˆåˆè‚¥å·¥ä¸šå¤§å­¦\hfut@degreetype@name å­¦ä½è®ºæ–‡è´¨é‡è¦æ±‚ã€‚\par}
    \vskip 2.5cm
    {\centering\fontsize{16bp}{24bp}\selectfont
    \textbf{ç­”è¾©å§”å‘˜ä¼šç­¾åï¼ˆå·¥ä½œå•ä½ã€èŒç§°ã€å§“åï¼‰}\par}
    \vskip 1.0cm
    {\fontsize{16bp}{16bp}\selectfont
    ä¸»å¸­ï¼š\hfut@sign@chairman \par}
    \vskip 1.0cm
    {\fontsize{16bp}{16bp}\selectfont
    å§”å‘˜ï¼š\parbox[t]{10.5cm}{\linespread{2.0}\selectfont\hfut@sign@member} \par}
    \vfill
    {\fontsize{16bp}{16bp}\selectfont
    å¯¼å¸ˆï¼š\hfut@sign@supervisor }
  \end{titlepage}%
}

\ifhfut@degree@bachelor
  \let\signaturepage\relax
\fi
% Reserved for compatibility until 2020-07-01.
\let\makestatement\signaturepage


% \subsection{åŽŸåˆ›æ€§å£°æ˜Ž}

% å®šä¹‰åŽŸåˆ›æ€§å£°æ˜Ž
\newcommand\hfut@originality@master{%
  æœ¬äººéƒ‘é‡å£°æ˜Žï¼šæ‰€å‘ˆäº¤çš„å­¦ä½è®ºæ–‡æ˜¯æœ¬äººåœ¨å¯¼å¸ˆæŒ‡å¯¼ä¸‹è¿›è¡Œç‹¬ç«‹ç&nbsp;”ç©¶
  å·¥ä½œæ‰€å–å¾—çš„æˆæžœã€‚æ®æˆ‘æ‰€çŸ¥ï¼Œé™¤äº†æ–‡ä¸­ç‰¹åˆ«åŠ&nbsp;ä»¥æ&nbsp;‡æ³¨å’Œè‡´è°¢çš„å†…å®¹
  å¤–ï¼Œè®ºæ–‡ä¸­ä¸åŒ…å«å…¶ä»–äººå·²ç»å‘è¡¨æˆ–æ’°å†™è¿‡çš„ç&nbsp;”ç©¶æˆæžœï¼Œä¹Ÿä¸åŒ…å«ä¸º
  èŽ·å¾—\underline{\hspace{0.5\ccwd}åˆè‚¥å·¥ä¸šå¤§å­¦\hspace{0.5\ccwd}}æˆ–
  å…¶ä»–æ•™è‚²æœºæž„çš„å­¦ä½æˆ–è¯ä¹¦è€Œä½¿ç”¨è¿‡çš„ææ–™ã€‚å¯¹æœ¬æ–‡æˆæžœåšå‡ºè´¡çŒ®çš„
  ä¸ªäººå’Œé›†ä½“ï¼Œæœ¬äººå·²åœ¨è®ºæ–‡ä¸­ä½œäº†æ˜Žç¡®çš„è¯´æ˜Žï¼Œå¹¶è¡¨ç¤ºè°¢æ„ã€‚\par%
  å­¦ä½è®ºæ–‡ä¸­è¡¨è¾¾çš„è§‚ç‚¹çº¯å±žä½œè€…æœ¬äººè§‚ç‚¹ï¼Œä¸Žåˆè‚¥å·¥ä¸šå¤§å­¦æ—&nbsp;å…³ã€‚}
\newcommand\hfut@authorization@master{%
  æœ¬å­¦ä½è®ºæ–‡ä½œè€…å®Œå…¨äº†è§£\underline{\hspace{0.5\ccwd}åˆè‚¥å·¥ä¸šå¤§å­¦\hspace{0.5\ccwd}}æœ‰å…³ä¿ç•™ã€ä½¿ç”¨å­¦ä½è®ºæ–‡%
  çš„è§„å®šï¼Œå³ï¼šé™¤ä¿å¯†æœŸå†…çš„æ¶‰å¯†å­¦ä½è®ºæ–‡å¤–ï¼Œå­¦æ&nbsp;¡æœ‰æƒä¿å­˜å¹¶å‘å›½å®¶%
  æœ‰å…³éƒ¨é—¨æˆ–æœºæž„é€äº¤è®ºæ–‡çš„å¤å°ä»¶å’Œç”µå­å…‰ç›˜ï¼Œå…è®¸è®ºæ–‡è¢«æŸ¥é˜…æˆ–å€Ÿ%
  é˜…ã€‚æœ¬äººæŽˆæƒ\underline{\hspace{0.5\ccwd}åˆè‚¥å·¥ä¸šå¤§å­¦\hspace{0.5\ccwd}}å¯ä»¥å°†æœ¬å­¦ä½è®ºæ–‡çš„å…¨éƒ¨æˆ–éƒ¨åˆ†å†…å®¹%
  ç¼–å…¥æœ‰å…³æ•°æ®åº“ï¼Œå…è®¸é‡‡ç”¨å½±å°ã€ç¼©å°æˆ–æ‰«æç­‰å¤åˆ¶æ‰‹æ®µä¿å­˜ã€æ±‡ç¼–%
  å­¦ä½è®ºæ–‡ã€‚\par%
  ï¼ˆä¿å¯†çš„å­¦ä½è®ºæ–‡åœ¨è§£å¯†åŽé€‚ç”¨æœ¬æŽˆæƒä¹¦ï¼‰}

\newcommand\hfut@originality@bachelor{%
  æœ¬äººéƒ‘é‡å£°æ˜Žï¼šæ‰€å‘ˆäº¤çš„æ¯•ä¸šè®¾è®¡ï¼ˆè®ºæ–‡ï¼‰æ˜¯æœ¬äººåœ¨æŒ‡å¯¼æ•™å¸ˆæŒ‡å¯¼ä¸‹
  è¿›è¡Œç‹¬ç«‹ç&nbsp;”ç©¶å·¥ä½œæ‰€å–å¾—çš„æˆæžœã€‚æ®æˆ‘æ‰€çŸ¥ï¼Œé™¤äº†æ–‡ä¸­ç‰¹åˆ«åŠ&nbsp;ä»¥æ&nbsp;‡æ³¨
  å’Œè‡´è°¢çš„å†…å®¹å¤–ï¼Œè®¾è®¡ï¼ˆè®ºæ–‡ï¼‰ä¸­ä¸åŒ…å«å…¶ä»–äººå·²ç»å‘è¡¨æˆ–æ’°å†™è¿‡çš„
  ç&nbsp;”ç©¶æˆæžœï¼Œä¹Ÿä¸åŒ…å«ä¸ºèŽ·å¾—\underline{\hspace{0.5\ccwd}åˆè‚¥å·¥ä¸šå¤§å­¦\hspace{0.5\ccwd}}æˆ–
  å…¶ä»–æ•™è‚²æœºæž„çš„å­¦ä½æˆ–è¯ä¹¦è€Œä½¿ç”¨è¿‡çš„ææ–™ã€‚å¯¹æœ¬æ–‡æˆæžœåšå‡ºè´¡çŒ®çš„
  ä¸ªäººå’Œé›†ä½“ï¼Œæœ¬äººå·²åœ¨è®¾è®¡ï¼ˆè®ºæ–‡ï¼‰ä¸­ä½œäº†æ˜Žç¡®çš„è¯´æ˜Žï¼Œå¹¶è¡¨ç¤ºè°¢æ„ã€‚\par%
  æ¯•ä¸šè®¾è®¡ï¼ˆè®ºæ–‡ï¼‰ä¸­è¡¨è¾¾çš„è§‚ç‚¹çº¯å±žä½œè€…æœ¬äººè§‚ç‚¹ï¼Œä¸Žåˆè‚¥å·¥ä¸šå¤§å­¦æ—&nbsp;å…³ã€‚}
\newcommand\hfut@authorization@bachelor{%
  æœ¬å­¦ä½è®ºæ–‡ä½œè€…å®Œå…¨äº†è§£\underline{\hspace{0.5\ccwd}åˆè‚¥å·¥ä¸šå¤§å­¦\hspace{0.5\ccwd}}æœ‰å…³ä¿ç•™ã€ä½¿ç”¨æ¯•ä¸šè®¾è®¡ï¼ˆè®ºæ–‡ï¼‰çš„è§„å®šï¼Œå³ï¼šé™¤ä¿å¯†æœŸå†…çš„æ¶‰å¯†è®¾è®¡ï¼ˆè®ºæ–‡ï¼‰å¤–ï¼Œå­¦æ&nbsp;¡æœ‰æƒ
  ä¿å­˜å¹¶å‘å›½å®¶æœ‰å…³éƒ¨é—¨æˆ–æœºæž„é€äº¤è®¾è®¡ï¼ˆè®ºæ–‡ï¼‰çš„å¤å°ä»¶å’Œç”µå­å…‰ç›˜ï¼Œ
  å…è®¸è®¾è®¡ï¼ˆè®ºæ–‡ï¼‰è¢«æŸ¥é˜…æˆ–å€Ÿé˜…ã€‚æœ¬äººæŽˆæƒ\underline{\hspace{0.5\ccwd}åˆè‚¥å·¥ä¸šå¤§å­¦\hspace{0.5\ccwd}}å¯ä»¥å°†æœ¬æ¯•ä¸šè®¾è®¡ï¼ˆè®ºæ–‡ï¼‰çš„å…¨éƒ¨æˆ–éƒ¨åˆ†å†…å®¹ç¼–å…¥æœ‰å…³æ•°æ®åº“ï¼Œå…è®¸é‡‡ç”¨å½±
  å°ã€ç¼©å°æˆ–æ‰«æç­‰å¤åˆ¶æ‰‹æ®µä¿å­˜ã€æ±‡ç¼–æ¯•ä¸šè®¾è®¡ï¼ˆè®ºæ–‡ï¼‰ã€‚\par%
  ï¼ˆä¿å¯†çš„æ¯•ä¸šè®¾è®¡ï¼ˆè®ºæ–‡ï¼‰åœ¨è§£å¯†åŽé€‚ç”¨æœ¬æŽˆæƒä¹¦ï¼‰}
  %
  

\newcommand\copyrightpage{%
  \begin{titlepage}%
    \hfut@pdfbookmark{åŽŸåˆ›æ€§å’ŒæŽˆæƒä½¿ç”¨å£°æ˜Ž}%
    \null
    \renewcommand\arraystretch{1.5}
    \ifhfut@degree@bachelor
      {\centering\sffamily\fontsize{18bp}{18bp}\selectfont
      \textbf{æ¯•ä¸šè®¾è®¡ï¼ˆè®ºæ–‡ï¼‰ç‹¬åˆ›æ€§å£°æ˜Ž}\par}%
      \vskip 1.0cm%
      \hfut@originality@bachelor\par
      \vskip 0.9cm%
      æ¯•ä¸šè®¾è®¡ï¼ˆè®ºæ–‡ï¼‰ä½œè€…ç­¾åï¼š\hfill%
      ç­¾å­—æ—¥æœŸï¼š\hspace{3\ccwd}å¹´\hspace{2\ccwd}æœˆ\hspace{2\ccwd}æ—¥\par
      \vskip 2.33cm%
      {\centering\sffamily\fontsize{18bp}{18bp}\selectfont
      \textbf{æ¯•ä¸šè®¾è®¡ï¼ˆè®ºæ–‡ï¼‰ç‰ˆæƒä½¿ç”¨æŽˆæƒä¹¦}\par}%
      \vskip 1.0cm%
      \hfut@authorization@bachelor\par
      \vskip 1.0cm%
      \begin{tabular}{@{}p{6.5cm}p{6.5cm}@{}}%
        å­¦ä½è®ºæ–‡ä½œè€…ç­¾åï¼š&amp; æŒ‡å¯¼æ•™å¸ˆç­¾åï¼š\\
        ç­¾åæ—¥æœŸï¼š\hspace{3\ccwd}å¹´\hspace{2\ccwd}æœˆ\hspace{2\ccwd}æ—¥ &amp; ç­¾åæ—¥æœŸï¼š\hspace{3\ccwd}å¹´\hspace{2\ccwd}æœˆ\hspace{2\ccwd}æ—¥
      \end{tabular}\par
    \else
      {\centering\sffamily\fontsize{18bp}{18bp}\selectfont
      \textbf{å­¦ä½è®ºæ–‡ç‹¬åˆ›æ€§å£°æ˜Ž}\par}%
      \vskip 1.25cm%
      \hfut@originality@master\par
      \vskip 1.1cm%
      å­¦ä½è®ºæ–‡ä½œè€…ç­¾åï¼š\hfill%
      ç­¾å­—æ—¥æœŸï¼š\hspace{3\ccwd}å¹´\hspace{2\ccwd}æœˆ\hspace{2\ccwd}æ—¥\par
      \vskip 2.8cm%
      {\centering\sffamily\fontsize{18bp}{18bp}\selectfont
      \textbf{å­¦ä½è®ºæ–‡ç‰ˆæƒä½¿ç”¨æŽˆæƒä¹¦}\par}%
      \vskip 1.25cm%
      \hfut@authorization@master\par
      \vskip 1.2cm%
      \begin{tabular}{@{}p{6.5cm}p{6.5cm}@{}}%
        å­¦ä½è®ºæ–‡ä½œè€…ç­¾åï¼š&amp; æŒ‡å¯¼æ•™å¸ˆç­¾åï¼š\\
        ç­¾åæ—¥æœŸï¼š\hspace{3\ccwd}å¹´\hspace{2\ccwd}æœˆ\hspace{2\ccwd}æ—¥ &amp; ç­¾åæ—¥æœŸï¼š\hspace{3\ccwd}å¹´\hspace{2\ccwd}æœˆ\hspace{2\ccwd}æ—¥\\
      \end{tabular}\par
      \vskip 0.6cm
      \renewcommand\arraystretch{1.1}
      \begin{tabular}{@{}p{6.5cm}p{6.5cm}@{}}%
        è®ºæ–‡ä½œè€…æ¯•ä¸šåŽ»å‘ &amp; \\
        å·¥ä½œå•ä½ï¼š&amp; \\
        è”ç³»ç”µè¯ï¼š&amp; E-mailï¼š\\
        é€šè®¯åœ°å€ï¼š&amp; é‚®æ”¿ç¼–ç&nbsp;ï¼š
      \end{tabular}\par
      \renewcommand\arraystretch{1}
    \fi
  \end{titlepage}%
}

% Reserved for compatibility until 2020-07-01.
\let\makestatement\copyrightpage


% \subsection{ç«&nbsp;èŠ‚æ&nbsp;‡é¢˜}

% æ&nbsp;‡é¢˜æœ€å¤šå…è®¸ä½¿ç”¨äº”çº§ã€‚
\setcounter{secnumdepth}{5}

% ç&nbsp;”ç©¶ç”Ÿè§„å®šç«&nbsp;é¢˜ä¸ºä¸¤å­—æ—¶ä¸­é—´ç©ºä¸¤å­—ï¼Œä¸‰å­—æ—¶ç©ºä¸€å­—ï¼Œå››å­—æ—¶ç©ºåŠå­—ï¼Œå››å­—ä»¥ä¸Šä¸ç©ºã€‚
% è¿™é‡Œç”¨ \LaTeX3 çš„ \cs{str\_count:N} åˆ¤æ–­å­—æ•°ã€‚
% æ³¨æ„ï¼Œ\pkg{stringstrings} å®åŒ…ä¼šå¯¼è‡´èŒƒæ•°å‘½ä»¤ \verb+\|+ è¢«ä¿®æ”¹ã€‚
\newcount\hfut@titlelength
\DeclareRobustCommand\hfut@spacetitle[1]{%
  \hfut@titlelength=\csname str_count:N\endcsname{#1}%
  \begingroup
    \ifhfut@degree@graduate
      \ifcase\hfut@titlelength
      \or\or
        \ziju{2}%
      \or
        \ziju{1}%
      \or
        \ziju{0.5}%
      \fi
    \else
      \if@mainmatter\else
        \ifcase\hfut@titlelength
        \or\or
          \ziju{1}%
        \or\or
          \ziju{0.5}%
        \fi
      \fi
    \fi
    #1%
  \endgroup
}

% äº”çº§èŠ‚æ&nbsp;‡é¢˜å’Œè„šæ³¨éœ€è¦ä½¿ç”¨å¸¦åœˆçš„æ•°å­—ï¼Œè¿™é‡Œä½¿ç”¨ \cs{hfut@circlefont} ï¼š
\newcommand\hfut@textcircled[1]{%
  \ifnum\value{#1}&lt;21\relax
    {\symbol{\numexpr\value{#1} + "245F\relax}}%
  \else
    \hfut@error{Cannot display more than 20 footnotes}%
  \fi
}

% ç”¨ \pkg{ctex} çš„æŽ¥å£è®¾ç½®å…¨éƒ¨ç«&nbsp;èŠ‚æ&nbsp;‡é¢˜æ&nbsp;¼å¼ã€‚

% å„ç«&nbsp;æ&nbsp;‡é¢˜ï¼šé»‘ä½“ 16 ç£…åŠ&nbsp;ç²—å±…ä¸­ï¼Œè¡Œè·ä¸ºå•å€è¡Œè·ï¼Œæ®µå‰ 1 è¡Œï¼Œæ®µåŽ 1 è¡Œï¼Œ
% ç«&nbsp;åºå·ä¸Žç«&nbsp;åé—´ç©ºä¸€å­—ã€‚

% ç”±äºŽ Word æ¨¡æ¿ä¸­ä½¿ç”¨â€œå•å€è¡Œè·â€ï¼Œè¿˜â€œå¯¹é½åˆ°ç½‘æ&nbsp;¼â€ï¼Œè¿™åœ¨ TeX ä¸­ä¸å®¹æ˜“å®žçŽ°ã€‚
% æ‰€ä»¥ç›®å‰æŒ‰ç…§é»˜è®¤çš„è¡Œè·ã€‚

% æ³¨æ„ \pkg{ctex} v2.4.3 ä»¥ä¸‹ç‰ˆæœ¬çš„bugä¼šå¯¼è‡´ç«&nbsp;èŠ‚æ&nbsp;‡é¢˜å‰åŽçš„è·ç¦»çš„å®žé™…å€¼åå¤§ã€‚
% å¦å¤– \pkg{ctex} v2.2 å‰çš„beforeskipçš„ç¬¦å·æœ‰ç‰¹æ®Šæ„ä¹‰ã€‚
    
\ctexset{
  chapter = {
    format = {
        \centering
        \if@mainmatter
          \fontsize{16bp}{16bp}\sffamily\bfseries\selectfont
        \else
          \fontsize{18bp}{16bp}\rmfamily\bfseries\selectfont
        \fi
    },
    nameformat  = {},
    name        = {ç¬¬,ç«&nbsp;},
    titleformat = {},
    number      = \chinese{chapter},
    aftername   = \hspace{0.5\ccwd},
    beforeskip  = {
      \if@mainmatter
        16bp
      \else
        9bp
      \fi
    },
    %tocline     = {
    %  \if@mainmatter
    %    %\if \@chapapp \appendixname
    %    \ifhfut@appendix
    %      {é™„å½•~\arabic{chapter}~~#2}
    %    \else
    %      {ç¬¬\chinese{chapter}ç«&nbsp;~#2}
    %    \fi
    %  \else
    %    \CTEXnumberline{#1}#2
    %  \fi
    %},
    afterskip   = {
      \if@mainmatter
        16bp
      \else
        24bp
      \fi
    },
    fixskip     = true,
  },
}

% ä¸€çº§èŠ‚æ&nbsp;‡é¢˜ï¼šé»‘ä½“ï¼Œå°å››å·ï¼Œå·¦å¯¹é½
% åºå·ä¸Žé¢˜åé—´ç©ºä¸€å­—ã€‚
\ctexset{
  section = {
    format     = \sffamily\fontsize{12bp}{15.6bp}\selectfont,
    aftername  = \hspace{0.5\ccwd},
    beforeskip = 7.8bp,
    afterskip  = 7.8bp,
  },
  %
  % äºŒçº§èŠ‚æ&nbsp;‡é¢˜ï¼šå®‹ä½“ï¼ŒåŠ&nbsp;é»‘ï¼Œå°å››å·ï¼Œå·¦å¯¹é½
  % åºå·ä¸Žé¢˜åé—´ç©ºä¸€å­—ã€‚
  subsection = {
    format     = \rmfamily\bfseries\fontsize{12bp}{15.6bp}\selectfont,
    aftername  = \hspace{0.5\ccwd},
    beforeskip = 7.8bp,
    afterskip  = 7.8bp,
  },
  %
  % ä¸‰çº§åŠä»¥ä¸‹èŠ‚æ&nbsp;‡é¢˜çš„æ&nbsp;¼å¼æ²¡æœ‰å…·ä½“è§„å®šï¼ŒæŒ‰ç…§æ•°å­¦å­¦é™¢æŽ¨èçš„æ–¹æ¡ˆï¼š
  % ä½¿ç”¨å®‹ä½“ 12 ç£…ï¼Œå·¦ç¼©è¿›ä¸¤å­—ï¼Œè¡Œè· 20 ç£…ï¼Œæ®µå‰æ®µåŽ 0 ç£…ï¼Œåºå·(n)ä¸Žé¢˜åé—´ç©ºåŠå­—å®½ã€‚
  subsubsection = {
    format     = \rmfamily\fontsize{12bp}{15.6bp}\selectfont,
    number     = (\arabic{subsubsection}),
    aftername  = \hspace{0.5\ccwd},
    beforeskip = \z@,
    afterskip  = \z@,
    indent     = 2\ccwd,
  },
  %
  % é‡‡ç”¨è¥¿æ–‡å¼æ®µæ&nbsp;‡é¢˜ï¼Œrunin=true
  paragraph = {
    format     = \rmfamily\bfseries\fontsize{12bp}{20bp}\selectfont,
    number     = {},
    name       = {},
    aftername  = {},
    beforeskip = \z@,
    afterskip  = \ccwd, 
    indent     = 2\ccwd,
    runin      = true,
  },
  %
  % é‡‡ç”¨è¥¿æ–‡å¼å­æ®µæ&nbsp;‡é¢˜ï¼Œrunin=true
  subparagraph = {
    format     = \rmfamily\fontsize{12bp}{20bp}\selectfont,
    number     = {},
    name       = {},
    aftername  = {},
    beforeskip = \z@,
    afterskip  = \ccwd, 
    indent     = 2\ccwd,
    runin      = true,
  },
}

\ifhfut@degree@bachelor
  \ifhfut@main@language@english
    \hfutsetup{section-style = arabic}
  \fi
\fi
\hfut@option@hook{main-language}{%
  \ifhfut@degree@bachelor
    \ifhfut@main@language@english
      \hfutsetup{section-style = arabic}%
    \fi
  \fi
}

% åœ¨ç&nbsp;”ç©¶ç”Ÿæ&nbsp;¼å¼çš„åŸºç¡€ä¸Šå†è®¾ç½®æœ¬ç§‘ç”Ÿçš„ç«&nbsp;èŠ‚æ&nbsp;‡é¢˜æ&nbsp;¼å¼ã€‚
\ifhfut@degree@bachelor
  \setcounter{secnumdepth}{4}
  \ctexset{
  %
  % è®ºæ–‡çš„è‡´è°¢ã€ç›®å½•ã€æ‘˜è¦å’Œå‚è€ƒæ–‡çŒ®ç­‰æ&nbsp;‡é¢˜ç”¨å°äºŒå·ï¼ˆ18 bpï¼‰é»‘ä½“å­—ï¼Œå±…ä¸­ï¼Œ
  % è¿™é€šè¿‡ \cs{if@mainmatter} åŒºåˆ†ã€‚
  % æ­£æ–‡ä¸­çš„æ&nbsp;‡é¢˜åˆ†ç«&nbsp;ã€èŠ‚ã€æ®µä¸‰çº§ï¼›ç«&nbsp;ã€èŠ‚æ&nbsp;‡é¢˜å±…ä¸­ï¼Œæ®µæ&nbsp;‡é¢˜å±…å·¦ï¼Œ
  % åˆ†åˆ«ç”¨ä¸‰å·ï¼ˆ16 bpï¼‰é»‘ä½“ã€å°å››ï¼ˆ12 bpï¼‰é»‘ä½“ã€å°å››ï¼ˆ12 bpï¼‰é»‘ä½“ã€‚
    chapter = {
      name = {},
      format = {
        \centering
        \if@mainmatter
          \fontsize{16bp}{22bp}\sffamily\bfseries\selectfont
        \else
          \fontsize{18bp}{22bp}\rmfamily\bfseries\selectfont
        \fi
      },
      nameformat  = \rmfamily\bfseries,
      number      = \thechapter,
      aftername   = \hspace{\ccwd},
      beforeskip  = {
        \if@mainmatter
          22bp
        \else
          11bp
        \fi
      },
      afterskip   = {
        \if@mainmatter
          22bp
        \else
          33bp
        \fi
      },
      fixskip     = true,
    },
    section = {
      format = \sffamily\fontsize{12bp}{22bp}\selectfont,
      beforeskip = 11bp,
      afterskip  = 11bp, 
      nameformat = \rmfamily\bfseries,
    },
    subsection = {
      format     = \rmfamily\bfseries\fontsize{12bp}{22bp}\selectfont,
      beforeskip = 11bp,
      afterskip  = 11bp, 
      nameformat = \rmfamily\bfseries\selectfont,
      indent     = \z@,
    },
    subsubsection = {
      format     = \rmfamily\fontsize{12bp}{22bp}\selectfont,
      number     = (\arabic{subsubsection}),
      aftername  = \hspace{0.5\ccwd},
      beforeskip = \z@,
      afterskip  = \z@,
      indent     = 2\ccwd,
    },
    paragraph = {
      format     = \rmfamily\bfseries\fontsize{12bp}{22bp}\selectfont,
      number     = {},
      name       = {},
      aftername  = {},
      beforeskip = \z@,
      afterskip  = \ccwd, 
      indent     = 2\ccwd,
      runin      = true,
    },
    subparagraph = {
      format     = \rmfamily\fontsize{12bp}{22bp}\selectfont,
      number     = {},
      name       = {},
      aftername  = {},
      beforeskip = \z@,
      afterskip  = \ccwd, 
      indent     = 2\ccwd,
      runin      = true,
    },
  }
  %
  % æœ¬ç§‘ç”Ÿçš„é˜¿æ‹‰ä¼¯æ•°å­—å¼æ&nbsp;‡é¢˜çš„æ&nbsp;¼å¼ä¸Žç&nbsp;”ç©¶ç”Ÿå‡&nbsp;ä¹Žä¸€è‡´ï¼Œåªæœ‰ä¸­æ–‡æ•°å­—å¼éœ€è¦ä¿®æ”¹ã€‚
  \ifhfut@section@style@arabic\else
    \ctexset{
      chapter = {
        name = {},
        %number = \chinese{chapter}
      },
      section = {
        %name   = {ç¬¬,èŠ‚},
        %number = \chinese{section},
      },
      subsection = {
        %number    = \chinese{subsection},
        %aftername = {ã€},
      },
    }
  \fi
\fi

% é»˜è®¤çš„ \cs{chapter*} ç”Ÿæˆçš„ç«&nbsp;æ&nbsp;‡é¢˜æ²¡æœ‰ç¼–å·ã€ä¸æ›´æ”¹é¡µçœ‰ï¼Œ
% ä¹Ÿä¸æ·»åŠ&nbsp;è¿›ç›®å½•æˆ– PDF ä¹¦ç­¾ã€‚
% ç„¶è€Œåƒæ‘˜è¦ã€ç›®å½•ã€ç¬¦å·è¯´æ˜Žè¿™æ&nbsp;·çš„ç«&nbsp;èŠ‚ï¼Œå®ƒä»¬ä¸éœ€è¦ç¼–å·ã€ä¸åŠ&nbsp;å…¥ç›®å½•ï¼Œ
% ä½†æ˜¯éœ€è¦ä¿®æ”¹é¡µçœ‰ï¼Œå¹¶ä¸”åŠ&nbsp;å…¥ PDF æ&nbsp;‡ç­¾ã€‚
% æ‰€ä»¥æˆ‘ä»¬æ–°å®šä¹‰ \cs{hfut@chapter} ç”¨äºŽå¤„ç†è¿™äº›ç«&nbsp;èŠ‚ã€‚%
\NewDocumentCommand\hfut@chapter{o m}{%
  \if@openright\cleardoublepage\else\clearpage\fi
  \IfValueTF{#1}{%
    \hfut@pdfbookmark{#1}%
    \chaptermark{#1}%
  }{%
    \hfut@pdfbookmark{#2}%
    \chaptermark{#2}%
  }%
  \chapter*{#2}}
  %
  %
  % \subsection{æ‘˜è¦}
  %
  % ä¸­æ–‡æ‘˜è¦çŽ¯å¢ƒã€‚
  % åˆ¤æ–­ \cs{hfut@tocloaded} æ˜¯ä¸ºäº†é˜²æ­¢æœ¬ç§‘ç”Ÿæœªè°ƒæ•´æ‘˜è¦ä½ç½®æ—¶çš„ç›®å½•é¡µç&nbsp;ç¼ºå¤±ã€‚
\newcommand\hfut@keywords@text{%
  \hfut@clist@use{\hfut@keywords}{ï¼›}%
}
\newcommand\hfut@keywords@en@text{%
  \hfut@clist@use{\hfut@keywords@en}{; }%
}
\newenvironment{abstract}{%
  \hfutsetup{language=chinese}%
  \ifhfut@degree@graduate
    \pagestyle{plain}
    \ctexset{chapter/format=\centering\Large\selectfont\bfseries}%
    \hfut@chapter[æ‘˜è¦]{æ‘˜\hspace{\ccwd}è¦}%
  \else
    \pagestyle{plain}
    \hfut@chapter[æ‘˜è¦]{æ‘˜\hspace{\ccwd}è¦}%
    % \ifhfut@tocloaded\else
    %   æœ¬ç§‘ç”Ÿéœ€è¦æ‰‹åŠ¨å°†æ‘˜è¦ç½®äºŽç›®å½•åŽã€‚\par
    % \fi
  \fi
}{
  \pagestyle{plain}
  \par\null\par\noindent
  \textbf{å…³é”®è¯ï¼š}\hfut@keywords@text\par
  \hfut@reset@main@language
}

% è‹±æ–‡æ‘˜è¦çŽ¯å¢ƒ
\newenvironment{abstract*}{%
  \hfutsetup{language=english}%
  \ctexset{chapter/format=\centering\Large\selectfont\bfseries}%
  \setlength{\parindent}{1em}
  \ifhfut@degree@graduate
    \hfut@chapter[Abstract]{ABSTRACT}%
    \pagestyle{plain}
  \else
    \begingroup
      \pagestyle{plain}%
      \hfut@chapter[Abstract]{ABSTRACT}%
    \endgroup
  \fi
}{
  %\pagestyle{plain}
  \par\null\par\noindent
  \textbf{KEYWORDS:} \hfut@keywords@en@text\par
  \ifhfut@degree@graduate
    \cleardoublepage
  \fi
  \hfut@reset@main@language
}

% Reserved for compatibility until 2020-07-01.
\newenvironment{enabstract}{%
  \begin{abstract*}%
}{%
  \end{abstract*}%
}


% \subsection{ç›®å½•}

% åˆ¤æ–­æ˜¯å¦å·²ç»åŠ&nbsp;è½½ç›®å½•ï¼Œç”¨äºŽæé†’æœ¬ç§‘ç”Ÿæ›´æ”¹æ‘˜è¦å’Œè‡´è°¢çš„é¡ºåºã€‚
\newif\ifhfut@tocloaded

% åˆ¤æ–­æ˜¯å¦åœ¨é™„å½•ä¸­
\newif\ifhfut@appendix

% ç&nbsp;”ç©¶ç”Ÿè§„å®šç›®å½•å¦é¢èµ·ï¼›
% æœ¬ç§‘ç”Ÿè§„å®šä»Žæ­£æ–‡èµ·æ&nbsp;‡é¡µç&nbsp;ã€‚
\renewcommand\tableofcontents{%
  \ifhfut@degree@bachelor
    \cleardoublepage
    %\pagenumbering{arabic}%
    \pagestyle{plain}%
    \hfut@tocloadedtrue
  \else
    \pagestyle{plain}%
  \fi
  \hfut@chapter{\contentsname}%
  \@starttoc{toc}%
}

% ä¸‹é¢ç”¨ \pkg{titletoc} å®åŒ…è®¾ç½®ç›®å½•å†…å®¹çš„æ&nbsp;¼å¼ã€‚
% å…ˆå®šä¹‰ç›®å½•çº¿ï¼š
\newcommand\hfut@leaders{\titlerule*[9bp]{\textperiodcentered}}

% å„ç«&nbsp;ç›®å½•è¦æ±‚å®‹ä½“ 12 ç£…ï¼Œå•å€è¡Œè·ï¼Œæ®µå‰ 6 ç£…ï¼Œæ®µåŽ 0 ç£…ï¼Œä¸¤ç«¯å¯¹é½ï¼Œ
% é¡µç&nbsp;å³å¯¹é½ï¼Œç«&nbsp;åºå·ä¸Žç«&nbsp;åé—´ç©ºä¸€å­—ã€‚
% ä½†æ˜¯ Word æ¨¡æ¿ä¸­å®žé™…æ˜¯è¡Œè· 20 ç£…ã€‚
\ifhfut@degree@graduate
  \titlecontents{chapter}
    [\z@]{\bfseries\normalsize}
    {\contentspush{\thecontentslabel\hspace{0.5\ccwd}}}{}
    {\normalsize\hfut@leaders\contentspage}
    %
    % ä¸€çº§èŠ‚æ&nbsp;‡é¢˜ç›®å½•è¦æ±‚å®‹ä½“ 12 ç£…ï¼Œå•å€è¡Œè·ï¼Œå·¦ç¼©è¿›ä¸€å­—ï¼Œæ®µå‰ 6 ç£…ï¼Œæ®µåŽ 0 ç£…ï¼Œ
    % ä¸¤ç«¯å¯¹é½ï¼Œé¡µç&nbsp;å³å¯¹é½ï¼Œåºå·ä¸Žé¢˜åé—´ç©ºä¸€å­—ã€‚
    % Word æ¨¡æ¿ä¸­å®žé™…æ˜¯è¡Œè· 20 ç£…ï¼Œæ®µå‰ 0 ç£…ã€‚
  \titlecontents{section}
    [2\ccwd]{\normalsize}
    {\contentspush{\thecontentslabel\hspace{0.5\ccwd}}}{}
    {\normalsize\hfut@leaders\contentspage}
    %
    % äºŒçº§èŠ‚æ&nbsp;‡é¢˜ç›®å½•è¦æ±‚å®‹ä½“ 12 ç£…ï¼Œå•å€è¡Œè·ï¼Œå·¦ç¼©è¿›ä¸¤å­—ï¼Œæ®µå‰ 6 ç£…ï¼Œæ®µåŽ 0 ç£…ï¼Œ
    % ä¸¤ç«¯å¯¹é½ï¼Œé¡µç&nbsp;å³å¯¹é½ï¼Œåºå·ä¸Žé¢˜åé—´ç©ºä¸€å­—ã€‚
    % Word æ¨¡æ¿ä¸­å®žé™…æ˜¯è¡Œè· 20 ç£…ï¼Œæ®µå‰ 0 ç£…ã€‚
  \titlecontents{subsection}
    [4\ccwd]{\normalsize}
    {\contentspush{\thecontentslabel\hspace{0.5\ccwd}}}{}
    {\normalsize\hfut@leaders\contentspage}
    %
    % æœ¬ç§‘ç”Ÿçš„ç›®å½•ä½¿ç”¨å°å››å®‹ä½“ï¼ˆåŒæ­£æ–‡å­—ä½“ï¼‰ï¼Œå…¶ä»–åŒç&nbsp;”ç©¶ç”Ÿçš„æ&nbsp;¼å¼ç›¸è¿‘ã€‚
\else
  \titlecontents{chapter}
    [\z@]{\bfseries\normalsize}
    {\contentspush{\thecontentslabel\unskip\hspace{0.5\ccwd}}}{}
    {\hfut@leaders\contentspage}
  \titlecontents{section}
    [2\ccwd]{\normalsize}
    {\contentspush{\thecontentslabel\hspace{0.5\ccwd}}}{}
    {\hfut@leaders\contentspage}
  \titlecontents{subsection}
    [4\ccwd]{\normalsize}
    {\contentspush{\thecontentslabel\hspace{0.5\ccwd}}}{}
      %\ifhfut@section@style@arabic\hspace{\ccwd}\else ã€\fi}}{}
    {\hfut@leaders\contentspage}
\fi

% æœ¬ç§‘ç”Ÿè¦æ±‚ç›®å½•ä¸­æ­£æ–‡æ¯ç«&nbsp;å‰å¤šç©ºä¸€è¡Œï¼Œè€Œç›®å½•ã€é™„å½•ç­‰ç«&nbsp;åˆ™ä¸éœ€è¦ç©ºè¡Œï¼Œ
% æ‰€ä»¥ä¸èƒ½ç®€å•åˆ¤æ–­ \cs{if@mainmatter}ï¼Œéœ€è¦é‡æ–°å®šä¹‰ \cs{mainmatter} ç­‰å‘½ä»¤ã€‚
% \newif\ifhfut@addtocspace
% \ifhfut@degree@bachelor
%   \hfut@addtocspacetrue
%   \g@addto@macro\frontmatter{\hfut@addtocspacefalse}%
%   \g@addto@macro\mainmatter{\hfut@addtocspacetrue}%
%   \g@addto@macro\backmatter{\hfut@addtocspacefalse}%
%   \g@addto@macro\appendix{\hfut@addtocspacefalse}%
% \fi

% å¤„ç†æœ¬ç§‘ç”Ÿåœ¨ç›®å½•ä¸­æ·»åŠ&nbsp;ç©ºè¡Œã€‚
% \renewcommand\chapter{%
%   \if@openright\cleardoublepage\else\clearpage\fi
%   \thispagestyle{\CTEX@chapter@pagestyle}%
%   \global\@topnum\z@
%   \@afterindenttrue
%   \ifhfut@degree@bachelor
%     \ifhfut@addtocspace
%       \addtocontents{toc}{\protect\addvspace{12bp}}%
%     \fi
%   \fi
%   \secdef\@chapter\@schapter
% }

% ç&nbsp;”ç©¶ç”Ÿè¦æ±‚å›¾ã€è¡¨çš„æ¸…å•é¡»å¦é¡µèµ·ã€‚
\newlength{\hfut@lof@label@width}
\newcommand\hfut@set@lof@format{%
  \settowidth{\hfut@lof@label@width}{\figurename~9.99}%
  \addtolength{\hfut@lof@label@width}{0.5\ccwd}%
  \titlecontents{figure}%
    [\hfut@lof@label@width]{\normalsize}%
    {\contentslabel[\figurename~\thecontentslabel]{\hfut@lof@label@width}}{}%
    {\hfut@leaders\contentspage}%
  \titlecontents{table}%
    [\hfut@lof@label@width]{\normalsize}%
    {\contentslabel[\tablename~\thecontentslabel]{\hfut@lof@label@width}}{}%
    {\hfut@leaders\contentspage}%
}
\hfut@set@lof@format
\hfut@option@hook{main-language}{\hfut@set@lof@format}
\renewcommand\listoffigures{%
  \ifhfut@degree@graduate
    \cleardoublepage
  \fi
  \hfut@chapter{\listfigurename}%
  \@starttoc{lof}%
}
\renewcommand\listoftables{%
  \ifhfut@degree@graduate
    \cleardoublepage
  \fi
  \hfut@chapter{\listtablename}%
  \@starttoc{lot}%
}


% \subsection{ç¬¦å·è¯´æ˜Ž}

% ç&nbsp;”ç©¶ç”Ÿè§„å®šç¬¦å·è¯´æ˜Žå¦é¡µèµ·ï¼Œæ&nbsp;‡é¢˜å­—ä½“å­—å·ç­‰åŒè®ºæ–‡æ­£æ–‡ï¼Œ
\newenvironment{notation}{%
  \ifhfut@degree@graduate
    \cleardoublepage
    \pagestyle{plain}%
  \fi
  \hfut@chapter{\hfut@notation@name}%
}{%
  \ifhfut@degree@graduate
    \clearpage
    \pagestyle{plain}%
  \fi
}%
\newcommand*\notationlabel[1]{#1\hfil}%
\newenvironment{notationlist}[1]{%
  \list{}{%
    \itemsep 3bp%
    \labelwidth #1\relax%
    \labelsep 1em%
    \leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \advance\leftmargin 3em%
    \rightmargin 3em%
    \let\makelabel\notationlabel
  }%
}{%
  \endlist
}


% \subsection{æ­£æ–‡}

% \cs{sloppy} å¯ä»¥å‡å°‘â€œoverfull boxesâ€ã€‚
\sloppy

% ç¦æ­¢æ‰©å¤§æ®µé—´è·ã€‚ï¼ˆ\href{https://github.com/ustctug/ustcthesis/issues/209}{
%   ustctug/ustcthesis\#209}ï¼‰
\raggedbottom

% æ®µé—´è· 0 ç£…ã€‚
\setlength{\parskip}{\z@}

% é¦–æ®µç¼©è¿›ã€‚
\ctexset{autoindent=2}

% é¦–æ®µç¼©è¿›ã€‚
\let\@afterindentfalse\@afterindenttrue
\@afterindenttrue

% URL çš„å­—ä½“è®¾ä¸ºä¿æŒåŽŸæ&nbsp;·ã€‚
\urlstyle{same}

% ä½¿ç”¨ \pkg{xurl} å®åŒ…çš„æ–¹æ³•ï¼Œå¢žåŠ&nbsp; URL å¯æ–­è¡Œçš„ä½ç½®ã€‚
\def\UrlBreaks{%
  \do\/%
  \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l%
     \do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z%
  \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L%
     \do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z%
  \do0\do1\do2\do3\do4\do5\do6\do7\do8\do9\do=\do/\do.\do:%
  \do\*\do\-\do\~\do\'\do\"\do\-}
\Urlmuskip=0mu plus 0.1mu

% è„šæ³¨ç”¨å¸¦åœˆçš„æ•°å­—ï¼š
\renewcommand\thefootnote{\hfut@textcircled{footnote}}

% LaTeX é»˜è®¤è„šæ³¨æŒ‰ç«&nbsp;è®¡æ•°ï¼Œå³æ¯ç«&nbsp;çš„å¼€å§‹æ‰é‡ç½®è„šæ³¨è®¡æ•°å™¨ï¼›æˆ‘ä»¬ä¿®æ”¹ä¸ºæŒ‰é¡µè®¡æ•°ã€‚
% ç®€å•çš„|\@addtoreset{footnote}{page}|å¹¶ä¸å¯é&nbsp;ï¼Œ
% \footnote{\url{https://texfaq.org/FAQ-footnpp.html}}
% æ‰€ä»¥æˆ‘ä»¬ä½¿ç”¨ \pkg{footmisc} å®åŒ…ã€‚

% è„šæ³¨çº¿é•¿ä¸ºç‰ˆå¿ƒå®½åº¦çš„å››åˆ†ä¹‹ä¸€ï¼š
\renewcommand\footnoterule{%
  \kern-3\p@
  \hrule\@width.25\textwidth
  \kern2.6\p@}
  %
  % æ³¨æ–‡ç¼©è¿›ä¸¤å­—ï¼š
\renewcommand\@makefntext[1]{%
  \parindent 2\ccwd\relax
  \noindent
  \hb@xt@2\ccwd{\hss\@makefnmark}#1}


% \subsection{åˆ—è¡¨}
% \label{sec:list}

% è°ƒæ•´åˆ—è¡¨ä¸­å„é¡¹ä¹‹é—´è¿‡å¤§çš„é—´è·ã€‚
\setlength\partopsep{\z@}
\newcommand\hfut@nolistsep{%
  \parsep 0\p@ \@plus.2\p@
  \topsep 0\p@ \@plus.2\p@
  \itemsep0\p@ \@plus.2\p@
}
\def\@listi{\leftmargin\leftmargini
            \hfut@nolistsep}
\let\@listI\@listi
\@listi
\def\@listii {\leftmargin\leftmarginii
              \labelwidth\leftmarginii
              \advance\labelwidth-\labelsep
              \hfut@nolistsep}
\def\@listiii{\leftmargin\leftmarginiii
              \labelwidth\leftmarginiii
              \advance\labelwidth-\labelsep
              \hfut@nolistsep}


% \subsection{æµ®åŠ¨ä½“}

% \LaTeX{} å¯¹æ”¾ç½®æµ®åŠ¨ä½“çš„è¦æ±‚æ¯”è¾ƒå¼ºï¼Œè¿™é‡ŒæŒ‰ç…§ UK TeX FAQ çš„å»ºè®®
% \footnote{\url{https://texfaq.org/FAQ-floats}} å¯¹å…¶é€‚å½“æ”¾å®½ã€‚
\renewcommand\topfraction{.85}
\renewcommand\bottomfraction{.7}
\renewcommand\textfraction{.15}
\renewcommand\floatpagefraction{.66}
\renewcommand\dbltopfraction{.66}
\renewcommand\dblfloatpagefraction{.66}
\setcounter{topnumber}{9}
\setcounter{bottomnumber}{9}
\setcounter{totalnumber}{20}
\setcounter{dbltopnumber}{9}

% ä¿®æ”¹é»˜è®¤çš„æµ®åŠ¨ä½“æè¿°ç¬¦ä¸º |htb|ã€‚
\def\fps@figure{h}
\def\fps@table{h}

% ç”¨ \pkg{caption} å®åŒ…è®¾ç½®å›¾ã€è¡¨çš„æ&nbsp;¼å¼ï¼š

% å›¾å·ã€å›¾é¢˜ç½®äºŽå›¾çš„ä¸‹æ–¹ï¼Œå®‹ä½“ 10.5 ç£…å±…ä¸­ï¼Œå•å€è¡Œè·ï¼Œæ®µå‰ 6 ç£…ï¼Œæ®µåŽ 12 ç£…ï¼Œ
% å›¾å·ä¸Žå›¾é¢˜æ–‡å­—ä¹‹é—´ç©ºä¸€å­—ï¼Œå›¾å·ã€å›¾é¢˜åŠ&nbsp;ç²—ã€‚
% å›¾æ³¨ä½äºŽå›¾çš„ä¸‹æ–¹ï¼Œå·¦ç¼©è¿›ä¸¤å­—ï¼Œç»­è¡Œæ‚¬æŒ‚ç¼©è¿›å·¦å¯¹é½ï¼Œä¸¤ç«¯å¯¹é½ã€‚

% è¡¨å·ã€è¡¨é¢˜ç½®äºŽè¡¨çš„ä¸Šæ–¹ï¼Œé»‘ä½“ 10.5 ç£…å±…ä¸­ï¼Œå•å€è¡Œè·ï¼Œæ®µå‰ 6 ç£…ï¼Œæ®µåŽ 6 ç£…ï¼Œ
% è¡¨å·ä¸Žè¡¨é¢˜æ–‡å­—ä¹‹é—´ç©ºä¸€å­—ï¼Œè¡¨å·ã€è¡¨é¢˜åŠ&nbsp;ç²—ã€‚
% è¡¨æ³¨å·¦ç¼©è¿›ä¸¤å­—ï¼Œç»­è¡Œæ‚¬æŒ‚ç¼©è¿›å·¦å¯¹é½ï¼Œä¸¤ç«¯å¯¹é½ã€‚
\setlength{\floatsep}{6bp}
\setlength{\textfloatsep}{6bp}
\setlength{\intextsep}{12bp}

% ç”±äºŽ LaTeX2e kernel çš„é—®é¢˜ï¼Œå›¾è¡¨ç­‰æµ®åŠ¨ä½“ä¸Žæ–‡å­—å‰åŽçš„è·ç¦»ä¸ä¸€è‡´ï¼Œéœ€è¦è¿›è¡Œ patchã€‚
% å‚è€ƒ \href{https://github.com/tuna/thuthesis/issues/614}{tuna/thuthesis/issues\#614}ã€
% \url{https://www.zhihu.com/question/46618031} å’Œ
% \url{https://tex.stackexchange.com/a/40363/82731}ã€‚
%    \begin{macrocode}
\patchcmd{\@addtocurcol}%
  {\vskip \intextsep}%
  {\edef\save@first@penalty{\the\lastpenalty}\unpenalty
   \ifnum \lastpenalty = \@M  % hopefully the OR penalty
     \unpenalty
   \else
     \penalty \save@first@penalty \relax % put it back
   \fi
   \ifnum\outputpenalty &lt;-\@Mii
     \addvspace\intextsep
     \vskip\parskip
   \else
     \addvspace\intextsep
   \fi}%
  {}{\hfut@patch@error{\@addtocurcol}}
\patchcmd{\@addtocurcol}%
  {\vskip\intextsep \ifnum\outputpenalty &lt;-\@Mii \vskip -\parskip\fi}%
  {\ifnum\outputpenalty &lt;-\@Mii
     \aftergroup\vskip\aftergroup\intextsep
     \aftergroup\nointerlineskip
   \else
     \vskip\intextsep
   \fi}%
  {}{\hfut@patch@error{\@addtocurcol}}
\patchcmd{\@getpen}{\@M}{\@Mi}
  {}{\hfut@patch@error{\@getpen}}

\DeclareCaptionFont{hfut}{%
  \ifhfut@language@chinese
    \fontsize{10.5bp}{13.65bp}\selectfont
  \else
    \fontsize{10.5bp}{12.075bp}\selectfont
  \fi
}

\captionsetup{
  font           = hfut,
  labelsep       = quad,
  skip           = 6bp,
  figureposition = bottom,
  tableposition  = top,
}
% graduateçš„å›¾è¡¨æ&nbsp;‡é¢˜ä¸éœ€è¦åŠ&nbsp;ç²—
% \ifhfut@degree@graduate
%   \captionsetup{font+=bf}
%   \captionsetup[table]{font+=sf}
% \fi

% ç¡•åšéœ€è¦ä¸­è‹±æ–‡åŒæ&nbsp;‡é¢˜
\captionsetup[figure][bi-second]{name=Fig} %è®¾ç½®å›¾çš„è‹±æ–‡ç¼–å·å‰ç¼€
\captionsetup[table][bi-second]{name=Tab} %è®¾ç½®è¡¨çš„è‹±æ–‡ç¼–å·å‰ç¼€

% æ–°å®šä¹‰äº† \cs{note} æ¥ç”Ÿæˆå›¾è¡¨çš„é™„æ³¨ã€‚
% å¦‚æžœç”¨ \cs{caption} ç”Ÿæˆå›¾è¡¨çš„é™„æ³¨ä¼šå¯¼è‡´å›¾è¡¨çš„åºå·æœ‰è¯¯ï¼›
% å¦‚æžœç”¨ \cs{bicaption} ä¼šå¯¼è‡´è¡¨æ³¨æ—&nbsp;æ³•ç½®äºŽè¡¨åŽï¼Œè€Œä¸”å¯¹é½æ–¹å¼ä¸å¯¹ã€‚
\newcommand\note[1]{%
  \begingroup
    \captionsetup{
      font          = hfut,
      margin        = 2\ccwd,
      position      = bottom,
    }%
    \caption*{#1}%
  \endgroup
}

% è¡¨æ&nbsp;¼é»˜è®¤å­—å·ç•¥å°
\patchcmd\@floatboxreset{%
  \normalsize
}{%
  \small
}{}{\hfut@patch@error{\@floatboxreset}}

% å¯¹ \pkg{longtable} è·¨é¡µè¡¨æ&nbsp;¼è¿›è¡Œç›¸åŒçš„è®¾ç½®ã€‚
%
% åœ¨ Word æ¨¡æ¿ä¸­æŒ‰ç…§æ­£ç¡®çš„è®¾ç½®ï¼ˆéœ€è¦åŽ»æŽ‰æ–‡æ¡£ç½‘æ&nbsp;¼ï¼‰ï¼Œ
% ä¸­æ–‡æ¨¡æ¿æ¯é¡µèƒ½è£…ä¸‹ 1 è¡Œæ&nbsp;‡é¢˜ã€1 è¡Œè¡¨å¤´ã€30 è¡Œè¡¨èº«ï¼Œ
% è‹±æ–‡æ¨¡æ¿æ¯é¡µèƒ½è£…ä¸‹ 1 è¡Œæ&nbsp;‡é¢˜ã€1 è¡Œè¡¨å¤´ã€33 è¡Œè¡¨èº«ã€‚
%    \begin{macrocode}
\AtEndOfPackageFile*{longtable}{
  \AtBeginEnvironment{longtable}{%
    \small
  }
}


% \subsection{å‚è€ƒæ–‡çŒ®}

\PassOptionsToPackage{compress}{natbib}

\AtEndOfPackageFile*{natbib}{
  % å®šä¹‰å‡&nbsp;ç§å¼•ç”¨æ–‡çŒ®çš„æ&nbsp;‡æ³¨æ&nbsp;·å¼ã€‚
  \newcommand\bibstyle@super{\bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
  \newcommand\bibstyle@inline{\bibpunct{[}{]}{,}{n}{,}{,}}
  \newcommand\bibstyle@authoryear{\bibpunct{(}{)}{;}{a}{,}{,}}
  \@namedef{bibstyle@author-year}{\bibstyle@authoryear}
  %
  % å‡&nbsp;ç§ç§å¼•ç”¨æ&nbsp;·å¼ï¼Œä¸Ž \file{bst} æ–‡ä»¶åä¿æŒä¸€è‡´ï¼Œ
  % è¿™æ&nbsp;·åœ¨ä½¿ç”¨ \cs{bibliographystyle} é€‰æ‹©å‚è€ƒæ–‡çŒ®è¡¨çš„æ&nbsp;·å¼æ—¶ä¹Ÿä¼šè®¾ç½®å¯¹åº”çš„å¼•ç”¨æ&nbsp;·å¼ã€‚
  \@namedef{bibstyle@hfutthesis-numerical}{\bibstyle@super}
  \@namedef{bibstyle@hfutthesis-authoryear}{\bibstyle@authoryear}
  \@namedef{bibstyle@hfutthesis-graduate}{\bibstyle@super}
  %
  % å¦‚æžœè½½å…¥ `natbib` å‰è®¾ç½®äº† `cite-style`ï¼Œè¿™é‡Œå…ˆè¿›è¡Œé…ç½®ã€‚
  % https://github.com/ustctug/ustcthesis/issues/327
  \ifx\hfut@cite@style\@empty\else
    \citestyle{\hfut@cite@style}%
  \fi
  %
  % å®šä¹‰æŽ¥å£ cite-style åˆ‡æ¢å¼•ç”¨æ&nbsp;·å¼ã€‚
  \hfut@option@hook{cite-style}{%
    \ifx\@begindocumenthook\@undefined
    \citestyle{\hfut@cite@style}%
    \fi
  }
  %
  % å¦‚æžœæ–‡çŒ®åºå·ä½œä¸ºå™è¿°æ–‡å­—çš„ä¸€éƒ¨åˆ†ï¼Œéœ€è¦ä¸´æ—¶å°†æ–‡çŒ®åºå·ä¸Žæ­£æ–‡å¹³æŽ’
  \DeclareRobustCommand\inlinecite{\@inlinecite}
  \def\@inlinecite#1{\begingroup\let\@cite\NAT@citenum\citep{#1}\endgroup}
  %
  % ä¿®æ”¹å¼•ç”¨çš„æ&nbsp;·å¼ã€‚
  % è¿™é‡Œåœ¨ filehook ä¸­æ—&nbsp;æ³•ä½¿ç”¨ \cs{patchcmd}ï¼Œæ‰€ä»¥åªèƒ½æ‰‹åŠ¨é‡å®šä¹‰ã€‚
  %
  % å°† super å¼ \cs{citep} å¼•ç”¨çš„é¡µç&nbsp;ç½®äºŽæ‹¬å·å¤–ã€‚
  \renewcommand\NAT@citesuper[3]{\ifNAT@swa
    \if*#2*\else#2\NAT@spacechar\fi
    % \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close}%
    %  \if*#3*\else\NAT@spacechar#3\fi\else #1\fi\endgroup}
    \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}%
    \else #1\fi\endgroup}
  %
  % å°† numbers å¼ \cs{citep} å¼•ç”¨çš„é¡µç&nbsp;ç½®äºŽæ‹¬å·å¤–å¹¶æ”¹ä¸ºä¸Šæ&nbsp;‡ã€‚
  \renewcommand\NAT@citenum%
      [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
          % #1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup}
          #1\NAT@@close\textsuperscript{\if*#3*\else#3\fi}\else#1\fi\endgroup}
  %
  % åœ¨ filehook ä¸­æ—&nbsp;æ³•ä½¿ç”¨ \cs{patchcmd}ï¼Œæ‰€ä»¥åªèƒ½æ‰‹åŠ¨é‡å®šä¹‰ã€‚
  \def\NAT@citexnum[#1][#2]#3{%
    \NAT@reset@parser
    \NAT@sort@cites{#3}%
    \NAT@reset@citea
    \@cite{\def\NAT@num{-1}\let\NAT@last@yr\relax\let\NAT@nm\@empty
      \@for\@citeb:=\NAT@cite@list\do
      {\@safe@activestrue
      \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
      \@safe@activesfalse
      \@ifundefined{b@\@citeb\@extra@b@citeb}{%
        {\reset@font\bfseries?}
          \NAT@citeundefined\PackageWarning{natbib}%
        {Citation `\@citeb' on page \thepage \space undefined}}%
      {\let\NAT@last@num\NAT@num\let\NAT@last@nm\NAT@nm
        \NAT@parse{\@citeb}%
        \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%
          \let\NAT@name=\NAT@all@names
          \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%
        \fi
        \ifNAT@full\let\NAT@nm\NAT@all@names\else
          \let\NAT@nm\NAT@name\fi
        \ifNAT@swa
        \@ifnum{\NAT@ctype&gt;\@ne}{%
          \@citea
          \NAT@hyper@{\@ifnum{\NAT@ctype=\tw@}{\NAT@test{\NAT@ctype}}{\NAT@alias}}%
        }{%
          \@ifnum{\NAT@cmprs&gt;\z@}{%
          \NAT@ifcat@num\NAT@num
            {\let\NAT@nm=\NAT@num}%
            {\def\NAT@nm{-2}}%
          \NAT@ifcat@num\NAT@last@num
            {\@tempcnta=\NAT@last@num\relax}%
            {\@tempcnta\m@ne}%
          \@ifnum{\NAT@nm=\@tempcnta}{%
            \@ifnum{\NAT@merge&gt;\@ne}{}{\NAT@last@yr@mbox}%
          }{%
            \advance\@tempcnta by\@ne
            \@ifnum{\NAT@nm=\@tempcnta}{%
              % åœ¨é¡ºåºç¼–ç&nbsp;åˆ¶ä¸‹ï¼Œ\pkg{natbib} åªæœ‰åœ¨ä¸‰ä¸ªä»¥ä¸Šè¿žç»­æ–‡çŒ®å¼•ç”¨æ‰ä¼šä½¿ç”¨è¿žæŽ¥å·ï¼Œ
              % è¿™é‡Œä¿®æ”¹ä¸ºå…è®¸ä¸¤ä¸ªå¼•ç”¨ä½¿ç”¨è¿žæŽ¥å·ã€‚
              % å‚è€ƒ https://tex.stackexchange.com/a/86991/82731 ã€‚
              %
              % \ifx\NAT@last@yr\relax
              %   \def@NAT@last@yr{\@citea}%
              % \else
              %   \def@NAT@last@yr{--\NAT@penalty}%
              % \fi
              \def@NAT@last@yr{-\NAT@penalty}%
            }{%
              \NAT@last@yr@mbox
            }%
          }%
          }{%
          \@tempswatrue
          \@ifnum{\NAT@merge&gt;\@ne}{\@ifnum{\NAT@last@num=\NAT@num\relax}{\@tempswafalse}{}}{}%
          \if@tempswa\NAT@citea@mbox\fi
          }%
        }%
        \NAT@def@citea
        \else
          \ifcase\NAT@ctype
            \ifx\NAT@last@nm\NAT@nm \NAT@yrsep\NAT@penalty\NAT@space\else
              \@citea \NAT@test{\@ne}\NAT@spacechar\NAT@mbox{\NAT@super@kern\NAT@@open}%
            \fi
            \if*#1*\else#1\NAT@spacechar\fi
            \NAT@mbox{\NAT@hyper@{{\citenumfont{\NAT@num}}}}%
            \NAT@def@citea@box
          \or
            \NAT@hyper@citea@space{\NAT@test{\NAT@ctype}}%
          \or
            \NAT@hyper@citea@space{\NAT@test{\NAT@ctype}}%
          \or
            \NAT@hyper@citea@space\NAT@alias
          \fi
        \fi
      }%
      }%
        \@ifnum{\NAT@cmprs&gt;\z@}{\NAT@last@yr}{}%
        \ifNAT@swa\else
          % å°† numerical å¼ \cs{citet} å¼•ç”¨çš„é¡µç&nbsp;ç½®äºŽæ‹¬å·å¤–å¹¶æ”¹ä¸ºä¸Šæ&nbsp;‡ã€‚
          %
          % \@ifnum{\NAT@ctype=\z@}{%
          %   \if*#2*\else\NAT@cmt#2\fi
          % }{}%
          \NAT@mbox{\NAT@@close}%
          \@ifnum{\NAT@ctype=\z@}{%
            \if*#2*\else\textsuperscript{#2}\fi
          }{}%
        \fi
    }{#1}{#2}%
  }%
  %
  % å°† author-year å¼ \cs{citep} å¼•ç”¨çš„é¡µç&nbsp;ç½®äºŽæ‹¬å·å¤–å¹¶æ”¹ä¸ºä¸Šæ&nbsp;‡ï¼š
  \renewcommand\NAT@cite%
      [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
          % #1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup}
          #1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
  %
  % è°ƒæ•´ author-year å¼ \cs{citet} å¼•ç”¨çš„é¡µç&nbsp;ã€‚
  \def\NAT@citex%
    [#1][#2]#3{%
    \NAT@reset@parser
    \NAT@sort@cites{#3}%
    \NAT@reset@citea
    \@cite{\let\NAT@nm\@empty\let\NAT@year\@empty
      \@for\@citeb:=\NAT@cite@list\do
      {\@safe@activestrue
      \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
      \@safe@activesfalse
      \@ifundefined{b@\@citeb\@extra@b@citeb}{\@citea%
        {\reset@font\bfseries ?}\NAT@citeundefined
                  \PackageWarning{natbib}%
        {Citation `\@citeb' on page \thepage \space undefined}\def\NAT@date{}}%
      {\let\NAT@last@nm=\NAT@nm\let\NAT@last@yr=\NAT@year
        \NAT@parse{\@citeb}%
        \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%
          \let\NAT@name=\NAT@all@names
          \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%
        \fi
      \ifNAT@full\let\NAT@nm\NAT@all@names\else
        \let\NAT@nm\NAT@name\fi
      \ifNAT@swa\ifcase\NAT@ctype
        \if\relax\NAT@date\relax
          \@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}\NAT@date}%
        \else
          \ifx\NAT@last@nm\NAT@nm\NAT@yrsep
              \ifx\NAT@last@yr\NAT@year
                \def\NAT@temp{{?}}%
                \ifx\NAT@temp\NAT@exlab\PackageWarningNoLine{natbib}%
                {Multiple citation on page \thepage: same authors and
                year\MessageBreak without distinguishing extra
                letter,\MessageBreak appears as question mark}\fi
                \NAT@hyper@{\NAT@exlab}%
              \else\unskip\NAT@spacechar
                \NAT@hyper@{\NAT@date}%
              \fi
          \else
            \@citea\NAT@hyper@{%
              \NAT@nmfmt{\NAT@nm}%
              \hyper@natlinkbreak{%
                \NAT@aysep\NAT@spacechar}{\@citeb\@extra@b@citeb
              }%
              \NAT@date
            }%
          \fi
        \fi
      \or\@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%
      \or\@citea\NAT@hyper@{\NAT@date}%
      \or\@citea\NAT@hyper@{\NAT@alias}%
      \fi \NAT@def@citea
      \else
        \ifcase\NAT@ctype
          \if\relax\NAT@date\relax
            \@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%
          \else
          \ifx\NAT@last@nm\NAT@nm\NAT@yrsep
              \ifx\NAT@last@yr\NAT@year
                \def\NAT@temp{{?}}%
                \ifx\NAT@temp\NAT@exlab\PackageWarningNoLine{natbib}%
                {Multiple citation on page \thepage: same authors and
                year\MessageBreak without distinguishing extra
                letter,\MessageBreak appears as question mark}\fi
                \NAT@hyper@{\NAT@exlab}%
              \else
                \unskip\NAT@spacechar
                \NAT@hyper@{\NAT@date}%
              \fi
          \else
            \@citea\NAT@hyper@{%
              \NAT@nmfmt{\NAT@nm}%
              \hyper@natlinkbreak{\NAT@spacechar\NAT@@open\if*#1*\else#1\NAT@spacechar\fi}%
                {\@citeb\@extra@b@citeb}%
              \NAT@date
            }%
          \fi
          \fi
        \or\@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%
        \or\@citea\NAT@hyper@{\NAT@date}%
        \or\@citea\NAT@hyper@{\NAT@alias}%
        \fi
        \if\relax\NAT@date\relax
          \NAT@def@citea
        \else
          \NAT@def@citea@close
        \fi
      \fi
      }}\ifNAT@swa\else
        % å°† author-year å¼ \cs{citet} å¼•ç”¨çš„é¡µç&nbsp;ç½®äºŽæ‹¬å·å¤–å¹¶æ”¹ä¸ºä¸Šæ&nbsp;‡ã€‚
        %
        % \if*#2*\else\NAT@cmt#2\fi
        \if\relax\NAT@date\relax\else\NAT@@close\fi
        \if*#2*\else\textsuperscript{#2}\fi
      \fi}{#1}{#2}}
  %
  % ä¸ºäº†å°†å‚è€ƒæ–‡çŒ®åŠ&nbsp;å…¥ç›®å½•å’Œ pdf ä¹¦ç­¾ï¼Œé‡æ–°å®šä¹‰ \pkg{natbib} çš„ \cmd{bibsection}
  % å¦å¤–å¦‚æžœè°ƒç”¨äº† \pkg{chapterbib} æˆ–è€…ä½¿ç”¨äº† \opt{sectionbib} å‚æ•°ï¼Œ
  % éœ€è¦ä½¿ç”¨èŠ‚æ&nbsp;‡é¢˜ \cs{section}ã€‚
  \newcommand\hfut@bib@chapter{%
    \@mainmatterfalse
    \ifhfut@degree@bachelor
      \ctexset{
        chapter/format = {
          \centering\fontsize{16bp}{22bp}\sffamily\bfseries\selectfont
        },
        chapter/beforeskip  = 11bp,
        chapter/afterskip   = 11bp,
      }
    \fi
    \chapter{\bibname}%
  }%
  \newcommand\hfut@bib@section{%
    \begingroup
      \ctexset{section/numbering=false}%
      \section{\bibname}%
    \endgroup
  }%
  \@ifpackagewith{chapterbib}{sectionbib}{%
    \hfut@error{The "sectionbib" option cannot be used with chaperbib if natbib loaded}%
  }{}%
  \@ifpackageloaded{chapterbib}{%
    \let\bibsection\hfut@bib@section
  }{%
    \@ifxundefined\NAT@sectionbib{%
      \let\bibsection\hfut@bib@chapter
    }{%
      \let\bibsection\hfut@bib@section
    }%
  }%
  %
  % å‚è€ƒæ–‡çŒ®åˆ—è¡¨æ&nbsp;¼å¼ï¼šå®‹ä½“ 10.5 ç£…ï¼Œè¡Œè· 20 ç£…ï¼Œç»­è¡Œç¼©è¿›2.5å­—ç¬¦ï¼Œå·¦å¯¹é½ã€‚
  \renewcommand\bibfont{%
    \fontsize{10.5bp}{20bp}\selectfont
  }
  \setlength{\bibsep}{0\p@ \@plus.2\p@}
  \renewcommand\@biblabel[1]{[#1]\hfill}
  \setlength{\bibhang}{2.5\ccwd}
}


% biblatex å®åŒ…çš„é…ç½®

\AtEndOfPackageFile*{biblatex}{
  \AtBeginDocument{
    \ifthenelse{\equal{\blx@bbxfile}{apa}}{\def\bibname{REFERENCES}}{}
    \ifthenelse{\equal{\blx@bbxfile}{apa6}}{\def\bibname{REFERENCES}}{}
    \ifthenelse{\equal{\blx@bbxfile}{mla}}{\def\bibname{WORKS CITED}}{}
    \ifthenelse{\equal{\blx@bbxfile}{mla-new}}{\def\bibname{WORKS CITED}}{}
  }
  \DeclareRobustCommand\inlinecite{\parencite}
  \defbibheading{bibliography}[\bibname]{%
    \@mainmatterfalse
    \chapter{\bibname}%
  }
  \renewcommand\bibfont{%
    \fontsize{10.5bp}{20bp}\selectfont
  }
  \setlength{\bibitemsep}{0\p@ \@plus.2\p@}
  \setlength{\bibhang}{2.5\ccwd}
}

% \subsection{é™„å½•}

% å®šä¹‰äº†ä¸€ä¸ªæ»¡è¶³è¦æ±‚çš„è‡´è°¢çŽ¯å¢ƒï¼š
\newenvironment{acknowledgements}{%
  \@mainmatterfalse
  \ifhfut@degree@graduate
    \hfut@chapter[è‡´è°¢]{\hfut@acknowledgements@name}%
  \else
    \chapter{è‡´è°¢}%
  \fi
}{}


% å…¼å®¹æ—§ç‰ˆæœ¬ä¸­â€œacknowledgmentsâ€çš„æ‹¼æ³•ã€‚
% Reserved for compatibility until 2020-07-01.
\newenvironment{acknowledgments}{%
  \begin{acknowledgements}%
}{%
  \end{acknowledgements}%
}

% TODO å‘è¡¨æˆæžœçŽ¯å¢ƒæ&nbsp;¼å¼ï¼š
\newenvironment{publications}{%
  \@mainmatterfalse
  \ctexset{
    chapter/format = \centering\sffamily\bfseries\fontsize{18bp}{18bp}\selectfont,
    chapter/beforeskip  = 9bp,
    chapter/afterskip   = 27bp,
    section/name = {,ï¼‰},
    section/nameformat = {},
    section/aftername = {},
    section/format = \sffamily\bfseries\fontsize{12bp}{20bp}\selectfont\bfseries,
    section/beforeskip  = 10bp,
    section/afterskip   = 10bp,
  }
  \chapter{\hfut@publication@name}%
  \renewcommand\thesection{\arabic{section}}
  \setenumerate[1]{itemsep = 0pt, parsep = 0pt, label = ï¼ˆ\arabic*ï¼‰}
  \setcounter{tocdepth}{0}
  \setcounter{section}{0}
}{}


% \subsection{å…¶ä»–å®åŒ…çš„è®¾ç½®}

% è¿™äº›å®åŒ…å¹¶éžæ&nbsp;¼å¼è¦æ±‚ï¼Œä½†æ˜¯ä¸ºäº†æ–¹ä¾¿åŒå­¦ä»¬ä½¿ç”¨ï¼Œåœ¨è¿™é‡Œè¿›è¡Œç®€å•è®¾ç½®ã€‚


% \subsubsection{\pkg{hyperref} å®åŒ…}

\AtEndOfPackageFile*{hyperref}{
  \hypersetup{
    bookmarksnumbered  = true,
    bookmarksopen      = true,
    bookmarksopenlevel = 1,
    linktoc            = all,
    unicode            = true,
    psdextra           = true,
  }
  %
  % å¦‚æžœä¸º \opt{pdf} æ&nbsp;·å¼ï¼Œè®¾ç½® hyperlink é¢œè‰²
  \ifhfut@output@electronic
    \hypersetup{
      colorlinks = true,
      allcolors  = red,
    }
  \else
    \hypersetup{hidelinks}
  \fi
  %
  % å¡«å†™ PDF å…ƒä¿¡æ¯ã€‚
  \AtBeginDocument{%
    \ifhfut@main@language@chinese
      \hypersetup{
        pdftitle  = \hfut@title,
        pdfauthor = \hfut@author,
      }%
    \else
      \hypersetup{
        pdftitle  = \hfut@title@en,
        pdfauthor = \hfut@author@en,
      }%
    \fi
  }
  %
  % æ·»åŠ&nbsp; PDF ä¹¦ç­¾
  %
  \newcounter{hfut@bookmarknumber}
  \renewcommand\hfut@pdfbookmark[1]{%
    \phantomsection
    \stepcounter{hfut@bookmarknumber}%
    \pdfbookmark[0]{#1}{hfutchapter.\thehfut@bookmarknumber}%
  }
  %
  % åœ¨ PDF å­—ç¬¦ä¸²ä¸­åŽ»æŽ‰æ¢è¡Œï¼Œä»¥å‡å°‘ \pkg{hyperref} çš„è­¦å‘Šä¿¡æ¯ã€‚
  \pdfstringdefDisableCommands{
    \let\\\@empty
    \let\hspace\@gobble
  }
  %
  % \pkg{hyperref} ä¸Ž \pkg{unicode-math} å­˜åœ¨ä¸€äº›å…¼å®¹æ€§é—®é¢˜ï¼Œè§
  % \href{https://github.com/ustctug/ustcthesis/issues/223}{%
  %   ustctug/ustcthesis\#223}ï¼Œ
  % \href{https://github.com/ho-tex/hyperref/pull/90}{ho-tex/hyperref\#90} å’Œ
  % \href{https://github.com/ustctug/ustcthesis/issues/235}{%
  %   ustctug/ustcthesis/\#235}ã€‚
  \@ifpackagelater{hyperref}{2019/04/27}{}{%
    \g@addto@macro\psdmapshortnames{\let\mu\textmu}%
  }
  %
  % è®¾ç½®ä¸­æ–‡çš„ \cs{autoref}ã€‚
  % \footnote{\url{https://tex.stackexchange.com/a/66150/82731}}
  \ifhfut@language@chinese
    \def\equationautorefname~#1\null{å…¬å¼~(#1)\null}
    \def\footnoteautorefname{è„šæ³¨}
    \def\itemautorefname~#1\null{ç¬¬~#1~é¡¹\null}
    \def\figureautorefname{å›¾}
    \def\tableautorefname{è¡¨}
    \def\partautorefname~#1\null{ç¬¬~#1~éƒ¨åˆ†\null}
    \def\appendixautorefname{é™„å½•}
    \def\chapterautorefname~#1\null{ç¬¬~#1~ç«&nbsp;\null}
    \def\sectionautorefname~#1\null{ç¬¬~#1~èŠ‚\null}
    \def\subsectionautorefname~#1\null{ç¬¬~#1~å°èŠ‚\null}
    \def\subsubsectionautorefname~#1\null{ç¬¬~#1~å°å°èŠ‚\null}
    \def\paragraphautorefname~#1\null{ç¬¬~#1~æ®µ\null}
    \def\subparagraphautorefname~#1\null{ç¬¬~#1~å°æ®µ\null}
    \def\theoremautorefname{å®šç†}
    \def\HyRef@autopageref#1{\hyperref[{#1}]{ç¬¬~\pageref*{#1} é¡µ}}
  \fi
}


% \subsubsection{\pkg{amsthm} å®åŒ…}

\AtEndOfPackageFile*{amsthm}{
  \newtheoremstyle{hfutplain}
    {}{}
    {}{2\ccwd}
    {\bfseries}{}
    {\ccwd}{}
  \theoremstyle{hfutplain}
  % å®šä¹‰æ–°çš„å®šç†
  \ifhfut@language@chinese
    \newcommand\hfut@assertion@name{æ–­è¨€}
    \newcommand\hfut@assumption@name{å‡è®¾}
    \newcommand\hfut@axiom@name{å…¬ç†}
    \newcommand\hfut@corollary@name{æŽ¨è®º}
    \newcommand\hfut@definition@name{å®šä¹‰}
    \newcommand\hfut@example@name{ä¾‹}
    \newcommand\hfut@lemma@name{å¼•ç†}
    \newcommand\hfut@proof@name{è¯æ˜Ž}
    \newcommand\hfut@proposition@name{å‘½é¢˜}
    \newcommand\hfut@remark@name{æ³¨}
    \newcommand\hfut@theorem@name{å®šç†}
  \else
    \newcommand\hfut@assertion@name{Assertion}
    \newcommand\hfut@assumption@name{Assumption}
    \newcommand\hfut@axiom@name{Axiom}
    \newcommand\hfut@corollary@name{Corollary}
    \newcommand\hfut@definition@name{Definition}
    \newcommand\hfut@example@name{Example}
    \newcommand\hfut@lemma@name{Lemma}
    \newcommand\hfut@proof@name{Proof}
    \newcommand\hfut@proposition@name{Proposition}
    \newcommand\hfut@remark@name{Remark}
    \newcommand\hfut@theorem@name{Theorem}
  \fi
  \newtheorem{theorem}             {\hfut@theorem@name}    [chapter]
  \newtheorem{assertion}  [theorem]{\hfut@assertion@name}
  \newtheorem{axiom}      [theorem]{\hfut@axiom@name}
  \newtheorem{corollary}  [theorem]{\hfut@corollary@name}
  \newtheorem{lemma}      [theorem]{\hfut@lemma@name}
  \newtheorem{proposition}[theorem]{\hfut@proposition@name}
  \newtheorem{assumption}          {\hfut@assumption@name} [chapter]
  \newtheorem{definition}          {\hfut@definition@name} [chapter]
  \newtheorem{example}             {\hfut@example@name}    [chapter]
  \newtheorem*{remark}             {\hfut@remark@name}
  % \pkg{amsthm} å•ç‹¬å®šä¹‰äº† proof çŽ¯å¢ƒï¼Œè¿™é‡Œé‡æ–°å®šä¹‰ä»¥æ»¡è¶³æ&nbsp;¼å¼è¦æ±‚ã€‚
  % åŽŸæœ¬æ¨¡ä»¿ \pkg{amsthm} å†™æˆ |\item[\hskip\labelsep\hskip2\ccwd #1\hskip\ccwd]|ï¼Œ
  % ä½†æ˜¯å´ä¼šå¤šå‡ºä¸€äº›é—´éš™ã€‚
  \renewenvironment{proof}[1][\hfut@proof@name]{\par
    \pushQED{\qed}%
    \normalfont \topsep6\p@\@plus6\p@\relax
    \trivlist
      \item\relax\hskip2\ccwd
      \textbf{#1}
      \hskip\ccwd\ignorespaces
    }{%
    \popQED\endtrivlist\@endpefalse
  }
  \renewcommand\qedsymbol{\hfut@qed}
}


% \subsubsection{\pkg{algorithm2e} å®åŒ…}

% æŒ‰ç«&nbsp;èŠ‚ç¼–å·ã€‚
\PassOptionsToPackage{algochapter}{algorithm2e}

\AtEndOfPackageFile*{algorithm2e}{
  \ifhfut@language@chinese
    \SetAlgorithmName{ç®—æ³•}{ç®—æ³•}{ç®—æ³•æ¸…å•}
  \else
    \SetAlgorithmName{Algorithm}{Algorithm}{List of Algorithms}
  \fi
  %
  % è®¾ç½®ç®—æ³•çŽ¯å¢ƒçš„æ&nbsp;¼å¼ã€‚
  \SetAlCapSkip{6bp}
  \SetAlCapFnt{\small}
  \SetAlCapNameFnt{\small}
  \ifhfut@degree@graduate
    \SetAlCapNameSty{textbf}
  \fi
  \SetAlgoCaptionSeparator{\unskip\hspace*{\ccwd}}
  %
  % è®¾ç½®ç®—æ³•æ¸…å•çš„æ&nbsp;¼å¼
  \renewcommand\listofalgocfs{%
    \ifhfut@degree@graduate
      \cleardoublepage
    \fi
    \hfut@chapter{\listalgorithmcfname}%
    \@starttoc{loa}%
  }
  \titlecontents{algocf}
    [2.3em]{\normalsize}
    {\contentslabel{2.3em}}{}
    {\hfut@leaders\contentspage}
  \contentsuse{algocf}{loa}
}


% \subsubsection{\pkg{nomencl} å®åŒ…}

\AtEndOfPackageFile*{nomencl}{
  \let\nomname\hfut@notation@name
  \def\thenomenclature{%
    \ifhfut@degree@graduate
      \cleardoublepage
      \pagestyle{headings}%
    \fi
    \hfut@chapter{\hfut@notation@name}%
    \nompreamble
    \list{}{%
      \labelwidth\nom@tempdim
      \leftmargin\labelwidth
      \advance\leftmargin\labelsep
      \itemsep\nomitemsep
      \let\makelabel\nomlabel}}
  \def\endthenomenclature{%
    \endlist
    \nompostamble
    \ifhfut@degree@graduate
      \clearpage
      \pagestyle{plain}%
    \fi
  }
}


% \subsubsection{\pkg{siunitx} å®åŒ…}

\AtEndOfPackageFile*{siunitx}{
  \sisetup{
    group-minimum-digits = 4,
    separate-uncertainty = true,
    inter-unit-product   = \ensuremath{{}\cdot{}},
  }
  \newcommand\hfut@set@siunitx@language{%
  \ifhfut@language@chinese
    \sisetup{
      list-final-separator = { å’Œ },
      list-pair-separator  = { å’Œ },
      range-phrase         = {ï½ž},
        }%
      \else
        \sisetup{
          list-final-separator = {, and },
          list-pair-separator  = { and },
          range-phrase         = { to },
        }%
  \fi
  }
  \hfut@set@siunitx@language
  \hfut@option@hook{language}{\hfut@set@siunitx@language}
}

% \subsubsection{\pkg{chapterbib} å®åŒ…}

\AtEndOfPackageFile*{chapterbib}{
  \@ifpackageloaded{natbib}{%
    \@ifpackagewith{chapterbib}{sectionbib}{%
      \hfut@error{The "sectionbib" option cannot be used with chaperbib if natbib loaded}%
    }{}%
    \renewcommand\bibsection{%
      \begingroup
        \ctexset{section/numbering=false}%
        \section{\bibname}%
      \endgroup
    }
  }{}
}
</pre></body></html>