\hduthesis_provide_module:n {unv.layout}

\RequirePackage{geometry, fancyhdr, array, setspace, titlesec}
\pagestyle{fancy}

\cs_new_protected:Npn \l_spread_box:nn #1#2
  {
    \mode_leave_vertical:
    \hbox_to_wd:nn {#1}
    { \tl_map_inline:Nn {#2} { ##1 \hfil } \unskip }
  }
\cs_new_protected:Npn \l_center_box:nn #1#2
  {
    \mode_leave_vertical:
    \dim_set:Nn \l_tmpa_dim {#1}
    \global\setbox1=\box\voidb@x
    {\setbox0=\vbox{
      \dim_set:Nn \hsize {#1}\relax
      \dim_set:Nn \parindent {0pt}
      \skip_set:Nn \leftskip {0pt plus 1fil}
      \skip_set:Nn \rightskip {0pt plus -1fil}
      \skip_set:Nn \parfillskip {0pt plus 2fil}
      #2\par
      \loop
        \setbox2=\lastbox
      \unless\ifvoid2
        \global\setbox1=\vtop{\hbox to\hsize{\strut\unhbox2}
        \vskip-3.6pt \hrule height .8pt
        \vskip9.6pt \unvbox1}
        \unskip\unpenalty
      \repeat
    }}
    \box1
  }

\RequirePackage[skip = 1em, labelsep = quad, font = small]{caption}
\renewcommand{\thefigure}{\arabic{chapter}-\arabic{figure}}
\renewcommand{\thetable}{\arabic{chapter}-\arabic{table}}
\renewcommand{\theequation}{\arabic{chapter}-\arabic{equation}}
\AddToHook{env/figure/after}{\vspace*{-2.3ex}}
\AddToHook{env/table/after}{\vskip-1.9ex}

\RequirePackage{enumitem, cleveref}
\setlist[enumerate,1]
{
  label = （\arabic*）, itemindent = 4.5em, leftmargin = 0em,
  labelsep = 0em, topsep = .15ex, itemsep = 0em, partopsep = 0em,
  parsep = 0em, listparindent = 2\ccwd
}
\AddToHook{env/enumerate/after}{\vspace*{.1ex}}
\crefformat{figure}{图#2#1#3}
\crefformat{table}{表#2#1#3}
\graphicspath
  {
    {./figure/}{./figures/}{./image/}{./images/}
    {./graphics/}{./graphic/}{./pictures/}{./picture/}
  }

\endinput
