\usepackage[a4paper,margin=2.05cm]{geometry}
\usepackage{graphicx}
\usepackage{array}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{float}
\usepackage{enumitem}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{fancyhdr}
\usepackage{titlesec}
\usepackage{caption}
\usepackage{setspace}
\usepackage{amsmath}

\setstretch{1.12}
\setlength{\parskip}{0.15em}
\setlength{\headheight}{15pt}
\setlist[itemize]{leftmargin=2em,itemsep=0.25em,topsep=0.3em}
\setlist[enumerate]{leftmargin=2.2em,itemsep=0.25em,topsep=0.3em}
\raggedbottom

\hypersetup{
  colorlinks=true,
  linkcolor=black,
  urlcolor=blue!60!black,
  citecolor=black,
  pdftitle={智析反诈项目书},
  pdfauthor={Cursor}
}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{智析反诈项目书}
\fancyhead[R]{\leftmark}
\fancyfoot[C]{\thepage}

\makeatletter
\renewcommand\chapter{%
  \par
  \thispagestyle{plain}%
  \global\@topnum\z@
  \@afterindentfalse
  \secdef\@chapter\@schapter}
\makeatother
\titleformat{\chapter}{\normalfont\zihao{3}\bfseries}{第\thechapter 章}{1em}{}
\titleformat{\section}{\normalfont\zihao{4}\bfseries}{\thesection}{0.8em}{}
\titleformat{\subsection}{\normalfont\bfseries}{\thesubsection}{0.8em}{}
\titlespacing*{\chapter}{0pt}{0.5em}{0.8em}
\titlespacing*{\section}{0pt}{0.8em}{0.5em}
\titlespacing*{\subsection}{0pt}{0.6em}{0.4em}

\captionsetup{
  font=small,
  labelfont=bf
}

\newcolumntype{Y}{>{\raggedright\arraybackslash}X}

\newcommand{\placeholderfigure}[2][0.13\textheight]{
  \begin{center}
    \setlength{\fboxsep}{0pt}
    \fbox{
      \parbox[c][#1][c]{0.9\textwidth}{
        \centering
        \vspace*{0.2em}
        {\bfseries 图片占位}\\[0.5em]
        #2
      }
    }
  \end{center}
}

\newcommand{\placeholderwidefigure}[2][0.16\textheight]{
  \begin{figure}[H]
    \centering
    \placeholderfigure[#1]{#2}
  \end{figure}
}

\newcommand{\note}[1]{
  \vspace{0.3em}
  \noindent\textcolor{blue!60!black}{\textbf{说明：}#1}
}
