\usepackage[table,dvipsnames]{xcolor}
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage{stix} 
\usepackage[noindent,UTF8]{ctexcap}
\usepackage[colorlinks,urlcolor=black,linkcolor=MidnightBlue]{hyperref}
\setmainfont{Arial}
\setCJKmainfont{SimSun}

\usepackage[titles]{tocloft}
\usepackage{xeCJK} 
\usepackage{hyphenat}

\setlength{\parskip}{4pt}   
\linespread{1.6}
\setlength\leftskip{73pt}   

\usepackage{chngcntr}
\counterwithin{figure}{chapter}

\usepackage{titlesec}
\usepackage{ctex}
\CTEXsetup[name={,}, number=\arabic{chapter}]{chapter}

\makeatletter
\renewcommand{\@seccntformat}[1]{\llap{\color{MidnightBlue}{\csname the#1\endcsname}\hspace{35pt}}}                    
\renewcommand{\section}{\@startsection{section}{1}{\z@}
	{1ex \@plus 5ex \@minus 5ex}
	{1ex \@plus 5ex }
	{\zihao{4}\color{MidnightBlue}\heiti\bfseries}}
\renewcommand{\subsection}{\@startsection {subsection}{2}{\z@}
	{0.5ex \@plus -0.1ex \@minus -.4ex}
	{0.5ex \@plus.2ex }
	{\zihao{-4}\color{MidnightBlue}\heiti\bfseries}}

\newcommand\bolddef[1]{\zihao{-4}\heiti\bfseries #1}

%%%%%%%%%%liebiao%%%%%%%%%%%%%%
\usepackage{indentfirst}
\usepackage{enumitem}
\setlist[itemize,1]{
leftmargin=85pt
} 

\setlist[itemize,2]{
	leftmargin=12pt,
} 

\setlist[enumerate,1]{
	leftmargin=85pt
} 

\setlist[enumerate,2]{
} 

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\cfoot{\thepage}
\lfoot{博流智能科技}
\fancyhead[L]{\rightmark}

\pagenumbering{arabic}
   
\renewcommand\arraystretch{1.3}
\usepackage{colortbl}
\newfloat{flowchart}{H}{loflow}
\floatstyle{plaintop}
\restylefloat{flowchart}
\usepackage{float}

\usepackage{caption}
\newcommand\smallpic[2]{
\begin{figure}[H]
	\hspace{73pt}
%	\setlength{\abovecaptionskip{0pt}}
%	\setlength{\belowcaptionskip{0pt}}
	\captionsetup{
    justification=centering,
    singlelinecheck=false,
    margin={73pt,0pt}	
}
\includegraphics{#2}
\caption{#1}
%\label{#3}
\end{figure}
}

\newcommand\regover[1]
{
	\begin{center}
		\begin{longtable}[H]{|p{140pt}|p{350pt}|}
			\hline\hline
			\rowcolor{gray!40}
			\begin{minipage}{1.5cm}\vspace{0.2cm}{\bfseries 名称}\vspace{0.2cm}\end{minipage}&\bfseries 描述 \\
			
			\endhead
			\endlastfoot
			
		#1
		\end{longtable}					  							
	\end{center}	
}

\newcommand\regbit[1]
{
	\begin{table}[H]
	    \footnotesize
		\begin{tabular}[c]{p{20.7pt}p{20.7pt}p{20.7pt}p{20.7pt}p{20.7pt}p{20.7pt}p{20.7pt}p{20.7pt}p{20.7pt}p{20.7pt}p{20.7pt}p{20.7pt}p{20.7pt}p{20.7pt}p{20.7pt}p{20.7pt}}
			
			#1
		\end{tabular}					  							
	\end{table}			
}

\newcommand\regdes[1]
{
	\small
		\rowcolors{2}{gray!40}{gray!20}
		\begin{longtable}[c]{p{40pt}p{65pt}p{70pt}p{300pt}}
			\begin{minipage}{1.5cm}\vspace{0.2cm}{\bfseries 位}\vspace{0.2cm}\end{minipage}&\bfseries 名称&\bfseries 复位值&\bfseries 描述 \\
			
			\endhead
			
			#1
			
			\hline
	\vspace{0.5em}	
}

% 目录
\usepackage{shorttoc}

\usepackage{graphicx}
\hyphenpenalty=5
\tolerance=1
\usepackage{ragged2e}

\usepackage{array}
\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}}  %表格自动换行
\cftsetpnumwidth{1.0cm}\cftsetrmarg{1.2cm}
\setlength{\cftchapnumwidth}{0.75cm}
\setlength{\cftsubsecnumwidth}{1.5cm}
\setlength{\cftsecindent}{\cftchapnumwidth}
\setlength{\cftsecnumwidth}{1cm}