<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% \iffalse meta-comment
%
% Copyright (C) 2019 by Zangwei Zheng &lt;zhengzangw@gmail.com&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:
%
%   http://www.latex-project.org/lppl.txt
%
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% \fi
%
% \iffalse
%&lt;*driver&gt;
\ProvidesFile{njurepo.dtx}[2019/01/29 1.1.2 Nanjing University Report Template]
\documentclass{ltxdoc}
\usepackage{dtx-style}
    \EnableCrossrefs
    \CodelineIndex
    \RecordChanges
\begin{document}
    \DocInput{njurepo.dtx}
    \PrintChanges
    \PrintIndex
\end{document}
%&lt;/driver&gt;
% \fi
%
% \CheckSum{0}
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&amp;
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \&lt;
%   Equals        \=     Greater than  \&gt;     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
% \DoNotIndex{\newenvironment,\@bsphack,\@empty,\@esphack,\sfcode}
% \DoNotIndex{\addtocounter,\label,\let,\linewidth,\newcounter}
% \DoNotIndex{\noindent,\normalfont,\par,\parskip,\phantomsection}
% \DoNotIndex{\providecommand,\ProvidesPackage,\refstepcounter}
% \DoNotIndex{\RequirePackage,\setcounter,\setlength,\string,\strut}
% \DoNotIndex{\textbackslash,\texttt,\ttfamily,\usepackage}
% \DoNotIndex{\begin,\end,\begingroup,\endgroup,\par,\\}
% \DoNotIndex{\if,\ifx,\ifdim,\ifnum,\ifcase,\else,\or,\fi}
% \DoNotIndex{\let,\def,\xdef,\edef,\newcommand,\renewcommand}
% \DoNotIndex{\expandafter,\csname,\endcsname,\relax,\protect}
% \DoNotIndex{\Huge,\huge,\LARGE,\Large,\large,\normalsize}
% \DoNotIndex{\small,\footnotesize,\scriptsize,\tiny}
% \DoNotIndex{\normalfont,\bfseries,\slshape,\sffamily,\interlinepenalty}
% \DoNotIndex{\textbf,\textit,\textsf,\textsc}
% \DoNotIndex{\hfil,\par,\hskip,\vskip,\vspace,\quad}
% \DoNotIndex{\centering,\raggedright,\ref}
% \DoNotIndex{\c@secnumdepth,\@startsection,\@setfontsize}
% \DoNotIndex{\ ,\@plus,\@minus,\p@,\z@,\@m,\@M,\@ne,\m@ne}
% \DoNotIndex{\@@par,\DeclareOperation,\RequirePackage,\LoadClass}
% \DoNotIndex{\AtBeginDocument,\AtEndDocument}
%
% \changes{v1.0.0}{2019/01/22}{Initial version}
% \changes{v1.0.1}{2019/01/29}{Add more ability}
% \changes{v1.1.0}{2019/01/29}{Stable version}
% \changes{v1.1.1}{2019/02/20}{Fix little bugs}
% \changes{v1.1.2}{2019/03/20}{Fix some typo and add more predined macro. Polish manual}
%
% \GetFileInfo{\jobname.dtx}
%
% \def\indexname{ç´¢å¼•}
% \def\glossaryname{ä¿®æ”¹è®°å½•}
% \IndexPrologue{\section{\indexname}}
% \GlossaryPrologue{\section{\glossaryname}}

% \title{\bfseries\color{violet}\njurepoï¼š å—äº¬å¤§å­¦æœ¬ç§‘ç”Ÿæ³›ç”¨æŠ¥å‘Š}
% \author{éƒ‘å¥˜å· \\[5pt]\texttt{zhengzangw@gmail.com}}
% \date{\fileversion\ (\filedate)}
% \maketitle\thispagestyle{empty}
%
% \begin{abstract}\noindent
% æ­¤å®åŒ…æ—¨åœ¨å»ºç«‹ä¸€ä¸ªå…äºŽé…ç½®çš„ã€æŒ‡ä»¤ç›¸å¯¹ç®€å•çš„å—äº¬å¤§å­¦ä½œä¸šã€å®žéªŒæŠ¥å‘Šé€šç”¨æ¨¡æ¿ã€‚
% \end{abstract}
%
%
% \vskip2cm
% \def\abstractname{å…è´£å£°æ˜Ž}
% \begin{abstract}
% \noindent
% \begin{enumerate}
% \item æœ¬æ¨¡æ¿çš„å‘å¸ƒéµå®ˆ \LaTeX\ Project Public Licenseï¼Œä½¿ç”¨å‰è¯·è®¤çœŸé˜…è¯»åè®®å†…
%   å®¹ã€‚
% \item \textbf{æœ¬æ¨¡æ¿ä¸ºä½œè€…è‡ªå·±é€šå¸¸ä½¿ç”¨çš„æŠ¥å‘Šæ¨¡æ¿ï¼Œä¸Žå—äº¬å¤§å­¦å®˜æ–¹æ²¡æœ‰ä»»ä½•å…³ç³»}ã€‚ä»»ä½•ä½¿ç”¨è¯¥å®åŒ…è¿›è¡Œå®žéªŒæŠ¥å‘Šåˆ¶ä½œæ—¶ï¼Œè¯·\textbf{åŠ¡å¿…æ&nbsp;¹æ®è¯¾ç¨‹è¦æ±‚è¿›è¡Œå†™ä½œ}ã€‚ç”±äºŽä½¿ç”¨æœ¬æ¨¡æ¿è€Œå¼•èµ·çš„ä½œä¸šéªŒæ”¶é—®é¢˜ï¼Œå‡ä¸Žæœ¬æ¨¡æ¿ä½œè€…æ—&nbsp;å…³ã€‚
% \item æœ¬æ¨¡æ¿å€Ÿé‰´\thuthesis{}å®åŒ…çš„è®¸å¤šå†…å®¹ï¼Œéœ€è¦ç¨³å®šæ¨¡æ¿çš„åŒå­¦ä¹Ÿå¯ä»¥é€‰æ‹©ä½¿ç”¨æ¸…åŽå¤§å­¦çš„\thuthesis{}å®åŒ…å¹¶è‡ªå·±è¿›è¡Œé…ç½®ã€‚
% \item ä»»ä½•ä¸ªäººæˆ–ç»„ç»‡ä»¥æœ¬æ¨¡æ¿ä¸ºåŸºç¡€è¿›è¡Œä¿®æ”¹ã€æ‰©å±•è€Œç”Ÿæˆçš„æ–°çš„ä¸“ç”¨æ¨¡æ¿ï¼Œè¯·ä¸¥æ&nbsp;¼éµ
%   å®ˆ \LaTeX\ Project Public License åè®®ã€‚ç”±äºŽè¿çŠ¯åè®®è€Œå¼•èµ·çš„ä»»ä½•çº&nbsp;çº·äº‰ç«¯å‡ä¸Ž
%   æœ¬æ¨¡æ¿ä½œè€…æ—&nbsp;å…³ã€‚
% \end{enumerate}
% \end{abstract}
%
% \clearpage
% \pagestyle{fancy}
% \begin{multicols}{2}[
%   \setlength{\columnseprule}{.4pt}
%   \setlength{\columnsep}{18pt}]
%   \tableofcontents
% \end{multicols}
% \clearpage
%
% \section{æ¨¡æ¿ä»‹ç»}
% \njurepo\ (\textbf{N}an\textbf{jing} \textbf{U}niversity \LaTeX\ Versatile \textbf{Repo}rt Template)æ˜¯ä¸ºå—äº¬å¤§å­¦æœ¬ç§‘ç”Ÿè®¾è®¡çš„ä¸€ä¸ªå…äºŽé…ç½®çš„ä½œä¸šã€å®žéªŒæŠ¥å‘Šæ¨¡æ¿ã€‚å¸Œæœ›å®ƒå¯ä»¥ä½¿ä½&nbsp;çš„ä½œä¸š/å®žéªŒæŠ¥å‘Šä¸ä¼šå›&nbsp;å½¢å¼ä¸Šçš„ç¼ºé™·å¯¼è‡´è¯„åˆ†çš„ä¸‹é™ã€‚
%
% è¯¥æ–‡æ¡£æ&nbsp;¼å¼åŸºäºŽ ctexbook, ä¸»è¦å®Œæˆäº†é™¤äº†ä¸»ä½“å†…å®¹ä»¥å¤–çš„å‡&nbsp;ä¹Ž\textbf{å…¨éƒ¨}å·¥ä½œã€‚åŒæ—¶ï¼Œé€šè¿‡ä½¿ç”¨ Github ç‰ˆæœ¬å®åŒ…ï¼Œä½&nbsp;è¿˜å¯ä»¥æ›´å¥½çš„ç®¡ç†è‡ªå·±çš„ $\LaTeX$ æ–‡æ¡£ã€‚
%
% æœ¬æ–‡æ¡£å°†å°½é‡å®Œæ•´çš„ä»‹ç»æ¨¡æ¿çš„ä½¿ç”¨æ–¹æ³•ï¼Œå¦‚æœ‰ä¸æ¸…æ¥šä¹‹å¤„å¯ä»¥å‚è€ƒç¤ºä¾‹æ–‡æ¡£æˆ–è€…æ&nbsp;¹æ®ç¬¬ 3.1 èŠ‚è¯´æ˜Žæé—®ï¼Œæœ‰å…´è¶£è€…éƒ½å¯ä»¥å‚ä¸Žå®Œå–„æ­¤æ‰‹å†Œï¼Œä¹Ÿéžå¸¸æ¬¢è¿Žå¯¹ä»£ç&nbsp;çš„è´¡çŒ®ã€‚
% 
% \section{å®‰è£…}
% \label{sec:installation}
% \subsection{CTAN}
% æœ¬å®åŒ…å·²è¢«æ”¶çº³äºŽ CTAN ä¸­ï¼Œå‡¡å®‰è£…å®Œæ•´ç‰ˆ Texlive ç”¨æˆ·å¯ç›´æŽ¥ä½¿ç”¨ï¼š
% \begin{latex} 
% \usepackage{njurepo} 
% \end{latex}
%
% \subsection{Github}
% æƒ³èŽ·å¾—æœ€æ–°ç‰ˆæœ¬çš„ \njurepo è¯·å‰å¾€ Github ä¸»é¡µä¸‹è½½ï¼šhttps://github.com/zhengzangw/njurepo 
% 
% åŒæ—¶ï¼Œé¢å‘ Github ç‰ˆæœ¬çš„è¯´æ˜Žä¸»è¦åœ¨ README.md ä¸­ï¼Œå¦‚æžœä½¿ç”¨çš„æ˜¯ Github ç‰ˆæœ¬ï¼Œè¯·é˜…è¯» README.md
%
% \subsection{æ¨¡æ¿çš„ç»„æˆ}
% ä¸‹è¡¨åˆ—å‡ºäº†\njurepo çš„ä¸»è¦æ–‡ä»¶åŠå…¶åŠŸèƒ½ä»‹ç»ï¼š
%
% \begin{longtable}{l|p{8cm}}
% \toprule
% {\heiti æ–‡ä»¶ï¼ˆå¤¹ï¼‰} &amp; {\heiti åŠŸèƒ½æè¿°}\\\midrule
% \endfirsthead
% \midrule
% {\heiti æ–‡ä»¶ï¼ˆå¤¹ï¼‰} &amp; {\heiti åŠŸèƒ½æè¿°}\\\midrule
% \endhead
% \endfoot
% \endlastfoot
% njurepo.ins &amp; \textsc{DocStrip} é©±åŠ¨æ–‡ä»¶ï¼ˆå¼€å‘ç”¨ï¼‰ \\
% njurepo.dtx &amp; \textsc{DocStrip} æºæ–‡ä»¶ï¼ˆå¼€å‘ç”¨ï¼‰\\\midrule
% resources/ &amp; èµ„æºè·¯å¾„\\
% resources/logos/ &amp; ç¤ºä¾‹æ–‡æ¡£èµ„æºè·¯å¾„\\
% parts/ &amp; å…·ä½“å†…å®¹\\
% parts/examples/ &amp; ç¤ºä¾‹æ–‡æ¡£å…·ä½“å†…å®¹\\
% ref/ &amp; å‚è€ƒæ–‡çŒ®å’Œå‚è€ƒæ–‡çŒ®æ&nbsp;·å¼æ–‡ä»¶\\
% njurepo.cls &amp; æ¨¡æ¿ç±»æ–‡ä»¶\\
% Makefile &amp; è‡ªåŠ¨è¿è¡Œè„šæœ¬ \\
% util.py &amp; å®žç”¨ç®¡ç†å·¥å…· \\
% README.md &amp; è¯´æ˜Žæ–‡ä»¶ \\
% \textbf{njurepo.pdf} &amp; ç”¨æˆ·æ‰‹å†Œï¼ˆæœ¬æ–‡æ¡£ï¼‰\\ \bottomrule
% \end{longtable}
%
% \subsection{ç”Ÿæˆæ¨¡æ¿}
% ä½¿ç”¨Makefileæˆ–\XeLaTeX ç”Ÿæˆæ¨¡æ¿æ–‡ä»¶
% \begin{shell}
% make cls
% \end{shell}
%
% \subsection{ç”Ÿæˆè®ºæ–‡}
% \subsubsection{latexmk}
% latexmk å‘½ä»¤æ”¯æŒå…¨è‡ªåŠ¨ç”Ÿæˆ\LaTeX{}ç¼–å†™çš„æ–‡æ¡£ï¼Œå¹¶ä¸”æ”¯æŒä½¿ç”¨ä¸åŒçš„å·¥å…·é“¾æ¥è¿›è¡Œç”Ÿæˆï¼Œå®ƒä¼šè‡ªåŠ¨è¿è¡Œå¤šæ¬¡å·¥å…·ç›´åˆ°äº¤å‰å¼•ç”¨éƒ½è¢«è§£å†³ã€‚ä¸‹é¢ç»™å‡ºäº†ä¸€ä¸ªç”¨ latexmk è°ƒç”¨ xelatex ç”Ÿæˆæœ€ç»ˆæ–‡æ¡£çš„ç¤ºä¾‹:
% \begin{shell}
% latexmk -xelatex main
% \end{shell}
%
% \subsection{å‡çº§}
% åœ¨githubä¸Šä¸‹è½½æœ€æ–°ç‰ˆï¼Œè¿è¡Œ:
% \begin{shell}
% make cls
% \end{shell}
%
% ç”Ÿæˆæ–°çš„ç±»æ–‡ä»¶å’Œé…ç½®æ–‡ä»¶å³å¯ã€‚ä¹Ÿå¯ä»¥ç›´æŽ¥æ‹·è´ njurepo.clsï¼Œå…åŽ»ä¸Šé¢å‘½ä»¤çš„æ‰§è¡Œã€‚
% 
%
% \section{ä½¿ç”¨è¯´æ˜Ž}
% \subsection{ç¤ºä¾‹æ–‡ä»¶}
% æŽ¨èä»Žæ¨¡æ¿è‡ªå¸¦çš„ç¤ºä¾‹æ–‡æ¡£å…¥æ‰‹ï¼Œå…¶ä¸­åŒ…æ‹¬äº†è®ºæ–‡å†™ä½œç”¨åˆ°çš„æ‰€æœ‰å‘½ä»¤åŠå…¶ä½¿ç”¨æ–¹æ³•ï¼Œåªéœ€è¦ç”¨è‡ªå·±çš„å†…å®¹è¿›è¡Œç›¸åº”æ›¿æ¢å°±å¯ä»¥ã€‚å¯¹äºŽä¸æ¸…æ¥šçš„å‘½ä»¤å¯ä»¥æŸ¥é˜…æœ¬æ‰‹å†Œã€‚ä¸‹é¢çš„ä¾‹å­æè¿°äº†æ¨¡æ¿ä¸­ç«&nbsp;èŠ‚çš„ç»„ç»‡å½¢å¼ï¼Œæ¥è‡ªäºŽç¤ºä¾‹æ–‡æ¡£ï¼Œå…·ä½“å†…å®¹å¯ä»¥å‚è€ƒæ¨¡æ¿é™„å¸¦çš„ main.tex å’Œ parts/examples/ã€‚
% \begin{latex}
% \documentclass[language=english,open=any]{njurepo}
% \begin{document}
% \frontmatter
% \input{parts/examples/cover}
% \input{parts/examples/abstract}
% \maketitlepage
% \makecover
% \makeabstract
% \tableofcontents
% \input{parts/examples/denotation}
% \mainmatter
% \maketitle
% \input{parts/examples/problemsolving}
% \input{parts/examples/mathpro}
% \include{parts/examples/chap01}
% \include{parts/examples/chap02}
% \include{parts/examples/digitalexp}
% \include{parts/examples/code}
% \backmatter
% \listoffigures
% \listoftables
% \listofequations
% \bibliographystyle{ref/numeric} % ref/numeric,ref/author-year,plainnat,IEEEtran
% \bibliography{ref/refs}
% \include{parts/examples/ack}
% %% é™„å½•
% \begin{appendix}
  % \input{parts/examples/appendix01}
% \end{appendix}
% \end{document}
% \end{latex}
%
% \subsection{é€‰é¡¹}
% \label{sec:option}
% \DescribeOption{language}
% è®ºæ–‡çš„ä¸»è¦è¯­è¨€ï¼ˆé»˜è®¤ï¼šä¸­æ–‡ï¼‰ã€‚å¯é€‰ï¼š\option{chinese}ï¼Œ\option{english}ã€‚å†³å®šäº†å°é¢ã€æ&nbsp;‡é¢˜ã€å®šç†çš„è¯­è¨€ã€‚
% \DescribeOption{open}
% æ­£è§„å‡ºç‰ˆç‰©çš„ç«&nbsp;èŠ‚å‡ºçŽ°åœ¨å¥‡æ•°é¡µï¼Œä¹Ÿå°±æ˜¯å³æ‰‹è¾¹çš„é¡µé¢ï¼Œè¿™å°±æ˜¯ \option{right}ï¼Œã€‚åœ¨è¿™ç§æƒ…å†µä¸‹ï¼Œå¦‚æžœå‰ä¸€ç«&nbsp;çš„æœ€åŽä¸€é¡µä¹Ÿæ˜¯å¥‡æ•°ï¼Œé‚£ä¹ˆæ¨¡æ¿ä¼šè‡ªåŠ¨ç”Ÿæˆä¸€ä¸ªçº¯ç²¹çš„ç©ºç™½é¡µã€‚
% æäº¤çš„ä½œä¸šå¦‚æžœæ˜¯ç”µå­ç¨¿çš„è¯ï¼Œå¯ä»¥ä½¿ç”¨è¿žç»­é¡µï¼Œå³ä½¿ç”¨\option{any}
% \DescribeOption{wide}
% æ˜¯å¦ä½¿ç”¨å®½é¡µé¢ã€‚å¦‚æžœç”Ÿæˆä½œä¸šçš„è¯ï¼Œå®½é¡µé¢æˆ–è®¸å¥½çœ‹ã€‚
% \DescribeOption{draft}
% æ˜¯å¦ç”Ÿæˆæ°´å°ã€‚ç”Ÿæˆçš„æ°´å°ä¸º Draft è¡¨ç¤ºæ­¤æ–‡æ¡£å°šä¸ºè‰ç¨¿
%
% \subsection{å­—ä½“é…ç½®}
% \label{sec:font-config}
% ä½¿ç”¨\CTeX\ é»˜è®¤å­—ä½“é…ç½®
% \subsubsection{å­—ä½“å‘½ä»¤}
% \label{sec:fontcmds}
% \myentry{å­—ä½“}
% \DescribeMacro{\songti}
% \DescribeMacro{\fangsong}
% \DescribeMacro{\heiti}
% \DescribeMacro{\kaishu}
% ç”¨æ¥åˆ‡æ¢å®‹ä½“ã€ä»¿å®‹ã€é»‘ä½“ã€æ¥·ä½“å››ç§åŸºæœ¬å­—ä½“ã€‚
% \myentry{å­—å·}
% \DescribeMacro{\chuhao}
% \DescribeMacro{\xiaochu}
% \DescribeMacro{\yihao}
% \DescribeMacro{\xiaoyi}
% \DescribeMacro{\bahao}
% å®šä¹‰å­—ä½“å¤§å°ï¼Œåˆ†åˆ«ä¸º
% \begin{center}
% \begin{tabular}{llllll}
% \toprule
% \cs{chuhao} &amp; \cs{xiaochu} &amp; \cs{yihao}  &amp; \cs{xiaoyi}    &amp; \cs{erhao}  &amp; \cs{xiaoer}\\
% \cs{sanhao} &amp; \cs{xiaosan} &amp; \cs{sihao}  &amp; \cs{banxiaosi} &amp; \cs{xiaosi} &amp; \cs{dawu}\\
% \cs{wuhao}  &amp; \cs{xiaowu}  &amp; \cs{liuhao} &amp; \cs{xiaoliu}   &amp; \cs{qihao}  &amp; \cs{bahao}\\\bottomrule
% \end{tabular}
% \end{center}
% ä½¿ç”¨æ–¹æ³•ä¸ºï¼š\cs{command}\oarg{num}ï¼Œå…¶ä¸­ command ä¸ºå­—å·å‘½ä»¤ï¼Œnum ä¸ºè¡Œè·ã€‚æ¯”
% å¦‚ \cs{xiaosi}[1.5] è¡¨ç¤ºé€‰æ‹©å°å››å­—ä½“ï¼Œè¡Œè· 1.5 å€ã€‚å†™ä½œæŒ‡å—è¦æ±‚è¡¨æ&nbsp;¼ä¸­çš„å­—ä½“
% æ˜¯ \cs{dawu}ï¼Œæ¨¡æ¿å·²ç»è®¾ç½®å¥½äº†ã€‚
%
% \subsection{å°é¢ä¿¡æ¯}
% ä»¿ç…§parts/examples/cover.tex è¿›è¡Œè®¾ç½®
% \subsection{è¡¨æ&nbsp;¼}
% \DescribeMacro{\figoptadd}
% \DescribeMacro{\figoptaddcap}
% å®šä¹‰äº†ä¸¤ä¸ªç®€å•çš„è¡¨æ&nbsp;¼å‘½ä»¤
% \begin{latex}
%  \figoptadd{option}{address}
%  \figoptaddcap{option}{address}{caption}
% \end{latex}
% \subsection{å›¾ç‰‡}
% \DescribeMacro{\tabncc}
% \DescribeMacro{\tabnc}
% å®šä¹‰äº†ä¸¤ä¸ªç®€å•çš„å›¾ç‰‡å‘½ä»¤
% \begin{latex}
%  \tabncc{number-of-columns}{content}{caption}
%  \tabnc{number-of-columns}{content}
% \end{latex}
% \subsection{ä»£ç&nbsp;}
% \njurepo é¢„è®¾äº†å¦‚ä¸‹çš„ä»£ç&nbsp;çŽ¯å¢ƒ
% \begin{longtable}{ccccc}
% \toprule
% code &amp; cpseudo &amp; cplus &amp; shell &amp; commandshell \\
% verilog &amp; python &amp; latex &amp; &amp;\\  
% \bottomrule
% \end{longtable}
% \subsection{æ–‡å­—}
% \begin{latex}
% \href{link}{words} # æ’å…¥é“¾æŽ¥
% \magenta{å“çº¢è‰²å­—}
% \CJKunderline{ä¸‹åˆ’çº¿å­—}
% \end{latex}
% æ›´å¤šå…³äºŽé¢„ç½®å®åŒ…çš„å†…å®¹ï¼Œå¯è§ README.md ä»¥åŠ \ref{sec:loadpkg}
%
%
% \section{è‡´è°¢}
% æ„Ÿè°¢ä»¥ä¸‹å®åŒ…çš„ä½œè€…ï¼Œæœ¬å®åŒ…ä»Žä¸­ä½¿ç”¨äº†éƒ¨åˆ†ä»£ç&nbsp;å’Œå€Ÿé‰´ï¼š
% \begin{itemize}
%  \item æ¸…åŽå¤§å­¦\thuthesis https://github.com/xueruini/thuthesis
% \end{itemize}
% 
% \StopEventually{}
%
% \section{å®žçŽ°ç»†èŠ‚}
% \subsection{åŸºæœ¬ä¿¡æ¯}
%    \begin{macrocode}
%&lt;*cls&gt;
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{njurepo}[2019/01/25 1.0.0 Nanjing University Report Template]
%    \end{macrocode}
%
% \subsection{å®šä¹‰é€‰é¡¹}
% \label{sec:defoption}
% ä½¿ç”¨kvoptionså®åŒ…è¿›è¡Œé€‰é¡¹è®¾ç½®
%    \begin{macrocode}
\hyphenation{NJU-repo}
\def\njurepo{\textsc{NJU}\-\textsc{repo}}
\def\thuthesis{\textsc{Thu}\-\textsc{Thesis}}
\def\version{1.1.2}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
    family=nju,
    prefix=nju@,
    setkeys=\kvsetkeys
}
\DeclareStringOption[chinese]{language}[chinese]
\DeclareStringOption[any]{open}[any]
\DeclareBoolOption{wide}
\DeclareBoolOption{color}
\DeclareBoolOption{draft}
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{ctexbook}}

\ProcessKeyvalOptions*
%    \end{macrocode}
%
% æ£€æµ‹é€‰é¡¹æ˜¯å¦åˆæ³•
%    \begin{macrocode}
\newcommand\nju@validate@key[1]{%
  \@ifundefined{nju@\csname nju@#1\endcsname true}{%
    \ClassError{njurepo}{Invalid value '\csname nju#1\endcsname'}{}
    }{%
      \csname nju@\csname nju@#1\endcsname true\endcsname
    }
}
\newif\ifnju@chinese
\newif\ifnju@english
\nju@validate@key{language}
\newif\ifnju@any
\newif\ifnju@right
\nju@validate@key{open}
%    \end{macrocode}
% 
% ä½¿ç”¨ctexbookå®åŒ…
%    \begin{macrocode}
\LoadClass[a4paper,openany,UTF8,zihao=-4,scheme=plain]{ctexbook}
%    \end{macrocode}
%
% \subsection{åŠ&nbsp;è½½å®åŒ…}
% \label{sec:loadpkg}
% ç”¨äºŽå¼€å‘çš„å®åŒ…
%    \begin{macrocode}
\RequirePackage{etoolbox}
\RequirePackage{ifxetex}
\RequirePackage{xparse}
%    \end{macrocode}
% ç”¨äºŽå›¾ç‰‡çš„å®åŒ…
%    \begin{macrocode}
\RequirePackage{graphicx}
\graphicspath{{resources/}}
\graphicspath{{resources/logo/}}
\RequirePackage[labelformat=simple]{subcaption}
\RequirePackage{pdfpages}
\includepdfset{fitpaper=true}
\RequirePackage{tikz}
\usetikzlibrary{decorations.pathmorphing,graphs,calc}
\RequirePackage{dirtree}
%    \end{macrocode}
% ç”¨äºŽè¡¨æ&nbsp;¼çš„å®åŒ…
%    \begin{macrocode}
\RequirePackage{array}
\RequirePackage{longtable}
\RequirePackage{booktabs}
\RequirePackage{multirow}
\RequirePackage{tabularx}
\RequirePackage{diagbox}
\RequirePackage{makecell}
\RequirePackage{float}
%    \end{macrocode}
% ç”¨äºŽç¬¦å·æˆ–æ•°å­¦çš„å®åŒ…
%    \begin{macrocode}
\RequirePackage{CJKfntef}
\RequirePackage{amsmath}
\RequirePackage[amsmath, thmmarks, hyperref]{ntheorem}
\RequirePackage{physics}
\RequirePackage{bbding,stmaryrd}
%\RequirePackage{fontawesome}
%    \end{macrocode}
% å…¶å®ƒå®åŒ…
%    \begin{macrocode}
\RequirePackage[sort&amp;compress]{natbib}
%    \end{macrocode}
%
% è¶…é“¾æŽ¥
%    \begin{macrocode}
\RequirePackage{hyperref}
\ifxetex
  \hypersetup{%
    CJKbookmarks=true}
\else
  \hypersetup{%
    unicode=true,
    CJKbookmarks=false}
\fi
\hypersetup{%
  linktoc=all,
  bookmarksnumbered=true,
  bookmarksopen=true,
  bookmarksopenlevel=1,
  breaklinks=true,
  colorlinks=false,
  plainpages=false,
  pdfborder=0 0 0}	
\urlstyle{same}
\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
%    \end{macrocode}
%
% é¡µçœ‰é¡µè„šè®¾ç½®
%    \begin{macrocode}
\RequirePackage{fancyhdr}
\RequirePackage{notoccite}	
%    \end{macrocode}
%
% \subsection{é¡µé¢è®¾ç½®}
% ä½¿ç”¨äº†thuthesisçš„éžæœ¬ç§‘ç”Ÿé»˜è®¤é…ç½®ã€‚
%    \begin{macrocode}
\RequirePackage{geometry}
\ifnju@wide 
\geometry{
    a4paper, %210*297mm
    hcentering,
    ignoreall,
    nomarginpar,
    left=10mm,
    headheight=5mm,
    headsep=5mm,
    textheight=237mm,
    bottom=29mm,
    footskip=6mm
}\else
\geometry{
    a4paper, %210*297mm
    hcentering,
    ignoreall,
    nomarginpar,
    left=30mm,
    headheight=5mm,
    headsep=5mm,
    textheight=237mm,
    bottom=29mm,
    footskip=6mm
}
\fi
%    \end{macrocode}
%
% \subsection{ä¸»æ–‡æ¡£æ&nbsp;¼å¼}
% \label{sec:mainbody}
%
% \begin{macro}{\cleardoublepage}
%    \begin{macrocode}
\let\nju@cleardoublepage\cleardoublepage
\newcommand{\nju@clearemptydoublepage}{%
  \clearpage{\pagestyle{nju@empty}\nju@cleardoublepage}}
\let\cleardoublepage\nju@clearemptydoublepage
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\frontmatter}
% \begin{macro}{\mainmatter}
% \begin{macro}{\backmatter}
%    \begin{macrocode}
\renewcommand\frontmatter{%
    \ifnju@right\cleardoublepage\else\clearpage\fi
    \@mainmatterfalse
    \pagenumbering{Roman}
    \pagestyle{nju@empty}}
\renewcommand\mainmatter{%
    \ifnju@right\cleardoublepage\else\clearpage\fi
    \@mainmattertrue
    \pagenumbering{arabic}
    \pagestyle{nju@headings}}
\renewcommand\backmatter{%
    \ifnju@right\cleardoublepage\else\clearpage\fi
    \@mainmattertrue}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{å­—ä½“ä¸Žå­—å·}
% \label{sec:font}
% \subsubsection{è‹±æ–‡å­—ä½“}
% é…ç½®è‹±æ–‡å­—ä½“ã€‚
%    \begin{macrocode}
\newcommand\nju@fontset{\csname g__ctex_fontset_tl\endcsname}
\ifthenelse{\equal{\nju@fontset}{fandol}}{
  \setmainfont[
    Extension      = .otf,
    UprightFont    = *-regular,
    BoldFont       = *-bold,
    ItalicFont     = *-italic,
    BoldItalicFont = *-bolditalic,
  ]{texgyretermes}
  \setsansfont[
    Extension      = .otf,
    UprightFont    = *-regular,
    BoldFont       = *-bold,
    ItalicFont     = *-italic,
    BoldItalicFont = *-bolditalic,
  ]{texgyreheros}
  \setmonofont[
    Extension      = .otf,
    UprightFont    = *-regular,
    BoldFont       = *-bold,
    ItalicFont     = *-italic,
    BoldItalicFont = *-bolditalic,
    Scale          = MatchLowercase,
  ]{texgyrecursor}
}{
  \setmainfont{Times New Roman}
  \setsansfont{Arial}
  \ifthenelse{\equal{\nju@fontset}{mac}}{
    \setmonofont[Scale=MatchLowercase]{Menlo}
  }{
    \setmonofont[Scale=MatchLowercase]{Courier New}
  }
}
%    \end{macrocode}
%
% \subsubsection{æ•°å­¦çŽ¯å¢ƒå­—ä½“}
% é…ç½®æ•°å­¦å­—ä½“ï¼ˆä½¿ç”¨unicode-mathï¼‰
%    \begin{macrocode}
\RequirePackage{unicode-math}
\unimathsetup{
  math-style = ISO,
  bold-style = ISO,
  nabla      = upright,
  partial    = upright,
}
\IfFontExistsTF{STIX2Math.otf}{
  \setmathfont[StylisticSet=8]{STIX2Math.otf}
  \setmathfont[range={scr,bfscr},StylisticSet=1]{STIX2Math.otf}
  \IfFontExistsTF{XITSMath-Regular.otf}{
    \setmathfont[range={\partial,\lbrace,\rbrace}]{XITSMath-Regular.otf}
  }{
    \setmathfont[range={\partial,\lbrace,\rbrace}]{xits-math.otf}
  }
}{
  \setmathfont[
    Extension    = .otf,
    BoldFont     = *bold,
    StylisticSet = 8,
  ]{xits-math}
  \setmathfont[range={cal,bfcal},StylisticSet=1]{xits-math.otf}
}
%    \end{macrocode}
%
% \subsubsection{æ•°å­¦çŽ¯å¢ƒç¬¦å·}
% \begin{macro}{\ldots}
% çœç•¥å·ä¸€å¾‹å±…ä¸­ï¼Œæ‰€ä»¥ \cs{ldots} ä¸å†å±…äºŽåº•éƒ¨ã€‚
%    \begin{macrocode}
\ifnju@chinese
  \def\mathellipsis{\cdots}
\fi
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\le}
% \begin{macro}{\ge}
% \begin{macro}{\leq}
% \begin{macro}{\geq}
% å°äºŽç­‰äºŽå·è¦ä½¿ç”¨å€¾æ–œçš„å½¢å¼ã€‚
%    \begin{macrocode}
\protected\def\le{\leqslant}
\protected\def\ge{\geqslant}
\AtBeginDocument{%
  \renewcommand\leq{\leqslant}%
  \renewcommand\geq{\geqslant}%
}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\int}
% ç§¯åˆ†å· \cs{int} ä½¿ç”¨æ­£ä½“ï¼Œå¹¶ä¸”ä¸Šä¸‹é™é»˜è®¤ç½®äºŽç§¯åˆ†å·ä¸Šä¸‹ä¸¤ä¾§ã€‚
%    \begin{macrocode}
\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
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Re}
% \begin{macro}{\Im}
% \begin{macro}{\nabla}
% å®žéƒ¨ã€è™šéƒ¨æ“ä½œç¬¦ä½¿ç”¨ç½—é©¬ä½“ $\mathrm{Re}$ã€$\mathrm{Im}$ è€Œä¸æ˜¯ fraktur ä½“
% $\Re$ã€$\Im$ã€‚\cs{nabla} ä½¿ç”¨ç²—æ­£ä½“ã€‚
%    \begin{macrocode}
\AtBeginDocument{%
  \renewcommand{\Re}{\operatorname{Re}}%
  \renewcommand{\Im}{\operatorname{Im}}%
  \renewcommand\nabla{\mbfnabla}%
}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\bm}
% \begin{macro}{\boldsymbol}
% å…¼å®¹æ—§çš„ç²—ä½“å‘½ä»¤ï¼š\pkg{bm} çš„ \cs{bm} å’Œ \pkg{amsmath} çš„ \cs{boldsymbol}ã€‚
%    \begin{macrocode}
\newcommand\bm{\symbf}
\renewcommand\boldsymbol{\symbf}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\square}
% å…¼å®¹ \pkg{amssymb} ä¸­çš„å‘½ä»¤ã€‚
%    \begin{macrocode}
\newcommand\square{\mdlgwhtsquare}
%    \end{macrocode}
% \end{macro}
%
% å…è®¸å¤ªé•¿çš„å…¬å¼æ–­è¡Œã€åˆ†é¡µç­‰ã€‚
%    \begin{macrocode}
\allowdisplaybreaks[4]
\renewcommand\theequation{\ifnum \c@chapter&gt;\z@ \thechapter-\fi\@arabic\c@equation}
%    \end{macrocode}
%
% å…¬å¼è·å‰åŽæ–‡çš„è·ç¦»ç”± 4 ä¸ªå‚æ•°æŽ§åˆ¶ï¼Œå‚è§ \cs{normalsize} çš„å®šä¹‰ã€‚
%    \begin{macrocode}
\def\make@df@tag{\@ifstar\nju@make@df@tag@@\make@df@tag@@@}
\def\nju@make@df@tag@@#1{\gdef\df@tag{\nju@maketag{#1}\def\@currentlabel{#1}}}
\def\nju@maketag#1{\maketag@@@{(\ignorespaces #1\unskip\@@italiccorr)}}
\def\tagform@#1{\maketag@@@{(\ignorespaces #1\unskip\@@italiccorr)\equcaption{#1}}}
%    \end{macrocode}
% ä¿®æ”¹ \cs{tagform} ä¼šå½±å“ \cs{eqref}ã€‚
%    \begin{macrocode}
\renewcommand{\eqref}[1]{\textup{(\ref{#1})}}
%    \end{macrocode}
%
% \subsubsection{ä¸­æ–‡å­—ä½“}
% \pkg{ctex}åœ¨å¾®è½¯ä¸‹ä½¿ç”¨é›…é»‘å­—ä½“ï¼Œåœ¨macOSä¸‹ä½¿ç”¨è‹¹æ–¹å­—ä½“ã€‚è¿™é‡Œä¸åšæ›´æ”¹ã€‚
%
% \subsubsection{å­—å·}
% WORD ä¸­çš„å­—å·å¯¹åº”è¯¥å…³ç³»å¦‚ä¸‹ï¼ˆ1bp = 72.27/72 ptï¼‰:
% \begin{center}
% \begin{tabular}{llll}
% \toprule
% åˆå· &amp; 42bp &amp; 14.82mm &amp; 42.1575pt \\
% å°åˆ &amp; 36bp &amp; 12.70mm &amp; 36.135 pt \\
% ä¸€å· &amp; 26bp &amp; 9.17mm &amp; 26.0975pt \\
% å°ä¸€ &amp; 24bp &amp; 8.47mm &amp; 24.09pt \\
% äºŒå· &amp; 22bp &amp; 7.76mm &amp; 22.0825pt \\
% å°äºŒ &amp; 18bp &amp; 6.35mm &amp; 18.0675pt \\
% ä¸‰å· &amp; 16bp &amp; 5.64mm &amp; 16.06pt \\
% å°ä¸‰ &amp; 15bp &amp; 5.29mm &amp; 15.05625pt \\
% å››å· &amp; 14bp &amp; 4.94mm &amp; 14.0525pt \\
% å°å›› &amp; 12bp &amp; 4.23mm &amp; 12.045pt \\
% äº”å· &amp; 10.5bp &amp; 3.70mm &amp; 10.59375pt \\
% å°äº” &amp; 9bp &amp; 3.18mm &amp; 9.03375pt \\
% å…­å· &amp; 7.5bp &amp; 2.56mm &amp; \\
% å°å…­ &amp; 6.5bp &amp; 2.29mm &amp; \\
% ä¸ƒå· &amp; 5.5bp &amp; 1.94mm &amp; \\
% å…«å· &amp; 5bp &amp; 1.76mm &amp; \\\bottomrule
% \end{tabular}
% \end{center}
%
% \begin{macro}{\normalsize}
% é»˜è®¤æ­£æ–‡å°å››å· (12bp) å­—ï¼Œè¡Œè·ä¸ºå›ºå®šå€¼ 20 bpã€‚
%    \begin{macrocode}
\renewcommand\normalsize{%
  \@setfontsize\normalsize{12bp}{20bp}%
  \abovedisplayskip=12bp \@plus 2bp \@minus 2bp
  \abovedisplayshortskip=12bp \@plus 2bp \@minus 2bp
  \belowdisplayskip=\abovedisplayskip
  \belowdisplayshortskip=\abovedisplayshortskip}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\nju@def@fontsize}
% æ&nbsp;¹æ®ä¹&nbsp;æƒ¯å®šä¹‰å­—å·ã€‚ç”¨æ³•ï¼š
% \cs{nju@def@fontsize}\marg{å­—å·åç§°}\marg{ç£…æ•°}
%
% é¿å…äº†å­—å·é€‰æ‹©å’Œè¡Œè·çš„ç´§è€¦åˆã€‚æ‰€æœ‰å­—å·å®šä¹‰æ—¶ä¸ºå•å€è¡Œè·ï¼Œå¹¶æä¾›é€‰é¡¹æŒ‡å®šè¡Œè·å€æ•°ã€‚
%    \begin{macrocode}
\def\nju@def@fontsize#1#2{%
  \expandafter\newcommand\csname #1\endcsname[1][1.3]{%
    \fontsize{#2}{##1\dimexpr #2}\selectfont}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\chuhao}
% \begin{macro}{\xiaochu}
% \begin{macro}{\yihao}
% \begin{macro}{\xiaoyi}
% \begin{macro}{\erhao}
% \begin{macro}{\xiaoer}
% \begin{macro}{\sanhao}
% \begin{macro}{\xiaosan}
% \begin{macro}{\sihao}
% \begin{macro}{\banxiaosi}
% \begin{macro}{\xiaosi}
% \begin{macro}{\dawu}
% \begin{macro}{\wuhao}
% \begin{macro}{\xiaowu}
% \begin{macro}{\liuhao}
% \begin{macro}{\xiaoliu}
% \begin{macro}{\qihao}
% \begin{macro}{\bahao}
% ä¸€ç»„å­—å·å®šä¹‰ã€‚
%    \begin{macrocode}
\nju@def@fontsize{chuhao}{42bp}
\nju@def@fontsize{xiaochu}{36bp}
\nju@def@fontsize{yihao}{26bp}
\nju@def@fontsize{xiaoyi}{24bp}
\nju@def@fontsize{erhao}{22bp}
\nju@def@fontsize{xiaoer}{18bp}
\nju@def@fontsize{sanhao}{16bp}
\nju@def@fontsize{xiaosan}{15bp}
\nju@def@fontsize{sihao}{14bp}
\nju@def@fontsize{banxiaosi}{13bp}
\nju@def@fontsize{xiaosi}{12bp}
\nju@def@fontsize{dawu}{11bp}
\nju@def@fontsize{wuhao}{10.5bp}
\nju@def@fontsize{xiaowu}{9bp}
\nju@def@fontsize{liuhao}{7.5bp}
\nju@def@fontsize{xiaoliu}{6.5bp}
\nju@def@fontsize{qihao}{5.5bp}
\nju@def@fontsize{bahao}{5bp}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
% \subsubsection{ä¸­æ–‡æ&nbsp;‡ç‚¹}
%
% \newcommand\unicodechar[1]{U+#1ï¼ˆ\symbol{"#1}ï¼‰}
% ç”±äºŽ Unicode çš„ä¸€äº›æ&nbsp;‡ç‚¹ç¬¦å·æ˜¯ä¸­è¥¿æ–‡æ··ç”¨çš„ï¼š
% \unicodechar{00B7}ã€
% \unicodechar{2013}ã€
% \unicodechar{2014}ã€
% \unicodechar{2018}ã€
% \unicodechar{2019}ã€
% \unicodechar{201C}ã€
% \unicodechar{201D}ã€
% \unicodechar{2025}ã€
% \unicodechar{2026}ã€
% \unicodechar{2E3A}ï¼Œ
% æ‰€ä»¥è¦æ&nbsp;¹æ®è¯­è¨€è®¾ç½®æ­£ç¡®çš„å­—ä½“ã€‚
% \footnote{\url{https://github.com/CTeX-org/ctex-kit/issues/389}}
% æ‰€ä»¥è¦æ&nbsp;¹æ®è¯­è¨€è®¾ç½®æ­£ç¡®çš„å­—ä½“ã€‚
%    \begin{macrocode}
\newcommand\nju@setchinese{%
  \xeCJKResetPunctClass
}
\newcommand\nju@setenglish{%
  \xeCJKDeclareCharClass{HalfLeft}{"2018, "201C}%
  \xeCJKDeclareCharClass{HalfRight}{
    "00B7, "2019, "201D, "2013, "2014, "2025, "2026, "2E3A,
  }%
}
\newcommand\nju@setdefaultlanguage{%
  \ifnju@chinese
    \nju@setchinese
  \else
    \nju@setenglish
  \fi
}
%    \end{macrocode}
%
% \subsection{å±€éƒ¨è®¾ç½®}
% \subsubsection{é¡µçœ‰é¡µè„š}
% \label{sec:headerfooter}
%
% å®šä¹‰é¡µçœ‰å’Œé¡µè„šæ&nbsp;·å¼ã€‚
% \begin{macro}{\ps@nju@empty}
% \begin{macro}{\ps@nju@plain}
% \begin{macro}{\ps@nju@headings}
% \begin{itemize}
% \item \texttt{nju@empty}ï¼šé¡µçœ‰é¡µè„šéƒ½æ²¡æœ‰
% \item \texttt{nju@plain}ï¼šåªæ˜¾ç¤ºé¡µè„šçš„é¡µç&nbsp;ã€‚\cs{chapter} è‡ªåŠ¨è°ƒç”¨
% \cs{thispagestyle\{nju@plain\}}ã€‚
% \item \texttt{nju@headings}ï¼šé¡µçœ‰é¡µè„šåŒæ—¶æ˜¾ç¤º
% \end{itemize}
%    \begin{macrocode}
\fancypagestyle{nju@empty}{%
  \fancyhf{}
  \renewcommand{\headrulewidth}{0pt}
  \renewcommand{\footrulewidth}{0pt}}
\fancypagestyle{nju@plain}{%
  \fancyhead{}
  \fancyfoot[C]{\xiaowu\thepage}
  \renewcommand{\headrulewidth}{0pt}
  \renewcommand{\footrulewidth}{0pt}}
\fancypagestyle{nju@headings}{%
  \fancyhead{}
  \fancyhead[C]{\wuhao\normalfont\leftmark}
  \fancyfoot{}
  \fancyfoot[C]{\wuhao\thepage}
  \renewcommand{\headrulewidth}{0.4pt}
  \renewcommand{\footrulewidth}{0pt}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{æ®µè½}
% \label{sec:paragraph}
%
% å…¨æ–‡é¦–è¡Œç¼©è¿› 2 å­—ç¬¦ï¼Œæ&nbsp;‡ç‚¹ç¬¦å·ç”¨å…¨è§’
%    \begin{macrocode}
\ctexset{%
  punct=quanjiao,
  space=auto,
  autoindent=true}
%    \end{macrocode}
%
% \subsubsection{åˆ—è¡¨}
% åˆ©ç”¨ \pkg{enumitem} å‘½ä»¤è°ƒæ•´é»˜è®¤åˆ—è¡¨çŽ¯å¢ƒé—´çš„è·ç¦»ï¼Œä»¥ç¬¦åˆä¸­æ–‡ä¹&nbsp;æƒ¯ã€‚
%    \begin{macrocode}
\RequirePackage[shortlabels]{enumitem}
\RequirePackage{environ}
\setlist{nosep}
%    \end{macrocode}
%
%
% \subsubsection{è„šæ³¨}
% \label{sec:footnote}
% è„šæ³¨ç¬¦åˆä¸­æ–‡ä¹&nbsp;æƒ¯ï¼Œæ•°å­—å¸¦åœˆã€‚
%    \begin{macrocode}
\ifthenelse{\equal{\nju@fontset}{mac}}{
  \newfontfamily\nju@circlefont{Songti SC Light}
}{
  \ifthenelse{\equal{\nju@fontset}{windows}}{
    \newfontfamily\nju@circlefont{SimSun}
  }{
    \IfFontExistsTF{XITS-Regular.otf}{
      \newfontfamily\nju@circlefont{XITS-Regular.otf}
    }{
      \newfontfamily\nju@circlefont{xits-regular.otf}
    }
  }
}
\def\nju@textcircled#1{%
  \ifnum\value{#1} &gt;9%
    \ClassError{njurepo}%
      {Too many footnotes in this page.}{Keep footnote less than 10.}%
  \fi
  {\nju@circlefont\symbol{\numexpr\value{#1}+"245F\relax}}%
}
\renewcommand{\thefootnote}{\nju@textcircled{footnote}}
\renewcommand{\thempfootnote}{\nju@textcircled{mpfootnote}}
%    \end{macrocode}
%
% å®šä¹‰è„šæ³¨åˆ†å‰²çº¿ï¼Œå­—å·ï¼ˆå®‹ä½“å°äº”ï¼‰ï¼Œä»¥åŠæ‚¬æŒ‚ç¼©è¿›ï¼ˆ1.5å­—ç¬¦ï¼‰ã€‚
%    \begin{macrocode}
\def\footnoterule{\vskip-3\p@\hrule\@width0.3\textwidth\@height0.4\p@\vskip2.6\p@}
\let\nju@footnotesize\footnotesize
\renewcommand\footnotesize{\nju@footnotesize\xiaowu[1.5]}
%\footnotemargin1.5em\relax
%    \end{macrocode}
%
% \cs{@makefnmark} é»˜è®¤æ˜¯ä¸Šæ&nbsp;‡æ&nbsp;·å¼ï¼Œè€Œåœ¨è„šæ³¨éƒ¨åˆ†è¦æ±‚ä¸ºæ­£æ–‡å¤§å°ã€‚åˆ©ç”¨\cs{patchcmd} åŠ¨æ€è°ƒæ•´ \cs{@makefnmark} çš„å®šä¹‰ã€‚
%    \begin{macrocode}
\let\nju@makefnmark\@makefnmark
\def\nju@@makefnmark{\hbox{{\normalfont\@thefnmark}}}
\pretocmd{\@makefntext}{\let\@makefnmark\nju@@makefnmark}{}{}
\apptocmd{\@makefntext}{\let\@makefnmark\nju@makefnmark}{}{}
%    \end{macrocode}
%
%
% \subsubsection{å®šç†çŽ¯å¢ƒ}
% \label{sec:equation}
%
% å®šç†æ&nbsp;‡é¢˜ä½¿ç”¨é»‘ä½“ï¼Œæ­£æ–‡ä½¿ç”¨å®‹ä½“ï¼Œå†’å·éš”å¼€ã€‚
%    \begin{macrocode}
\theorembodyfont{\normalfont}
\theoremheaderfont{\normalfont\heiti}
\theoremsymbol{\ensuremath{\square}}
\newtheorem*{proof}{è¯æ˜Ž}
\theoremsymbol{}
\theoremseparator{ï¼š}
\ifnju@chinese
  \theoremstyle{plain}
  \newcommand\nju@assumption@name{å‡è®¾}
  \newcommand\nju@definition@name{å®šä¹‰}
  \newcommand\nju@proposition@name{å‘½é¢˜}
  \newcommand\nju@lemma@name{å¼•ç†}
  \newcommand\nju@theorem@name{å®šç†}
  \newcommand\nju@axiom@name{å…¬ç†}
  \newcommand\nju@corollary@name{æŽ¨è®º}
  \newcommand\nju@exercise@name{ç»ƒä¹&nbsp;}
  \newcommand\nju@example@name{ä¾‹}
  \newcommand\nju@remark@name{æ³¨é‡Š}
  \newcommand\nju@conjecture@name{çŒœæƒ³}
  \theoremstyle{break}
  \newcommand\nju@problem@name{é—®é¢˜}
  \newcommand\nju@solution@name{è§£}
\else
  \theoremstyle{plain}
  \newcommand\nju@assumption@name{Assumption}
  \newcommand\nju@definition@name{Definition}
  \newcommand\nju@proposition@name{Proposition}
  \newcommand\nju@lemma@name{Lemma}
  \newcommand\nju@theorem@name{Theorem}
  \newcommand\nju@axiom@name{Axiom}
  \newcommand\nju@corollary@name{Corollary}
  \newcommand\nju@exercise@name{Exercise}
  \newcommand\nju@example@name{Example}
  \newcommand\nju@remark@name{Remark}
  \newcommand\nju@conjecture@name{Conjecture}
  \theoremstyle{break}
  \newcommand\nju@problem@name{Problem}
  \newcommand\nju@solution@name{Solution}
\fi
\theoremheaderfont{\bfseries}
\newtheorem{assumption}{\nju@assumption@name}[section]
\newtheorem{definition}{\nju@definition@name}[section]
\newtheorem{proposition}{\nju@proposition@name}[section]
\newtheorem{lemma}{\nju@lemma@name}[section]
\newtheorem{theorem}{\nju@theorem@name}[section]
\newtheorem{axiom}{\nju@axiom@name}[section]
\newtheorem{corollary}{\nju@corollary@name}[section]
\newtheorem{exercise}{\nju@exercise@name}[section]
\newtheorem{example}{\nju@example@name}[section]
\newtheorem{remark}{\nju@remark@name}[section]
\newtheorem{problem}{\nju@problem@name}[section]
\newtheorem{conjecture}{\nju@conjecture@name}[section]
\newtheorem{solution}{\nju@solution@name}[section]

%\RequirePackage{microtype}
\ifnju@chinese
\newcommand{\promisewords}{è¯·ç‹¬ç«‹å®Œæˆä½œä¸šï¼Œä¸å¾—æŠ„è¢­ã€‚\\è‹¥å‚è€ƒäº†å…¶å®ƒèµ„æ–™ï¼Œè¯·ç»™å‡ºå¼•ç”¨ã€‚\\é¼“åŠ±è®¨è®ºï¼Œä½†éœ€ç‹¬ç«‹ä¹¦å†™è§£é¢˜è¿‡ç¨‹ã€‚}
\else
\newcommand{\promisewords}{I promise this work is done on my own with no plagiarism.}
\fi
\newcommand{\Hrule}{\noindent\rule{\linewidth}{0.5mm}}

\theorempostwork{\vspace{-0.5cm}\Hrule}
\newtheorem*{csolution}{\PencilRightDown\nju@solution@name}
\newtheorem*{nsolution}{\PencilRightDown\nju@solution@name}
\RequirePackage[listings]{tcolorbox}
\newtcolorbox{ps@problem}[1]{fonttitle=\bfseries,title=#1,before skip=0.5cm, after skip=-0.5cm}
\newenvironment{cproblem}[1][]{
    \begin{ps@problem}{\Checkmark\ \nju@problem@name\ #1}
}{
    \end{ps@problem}
}
\theoremstyle{plain}
\newtheorem*{nproblem}{\Checkmark\nju@problem@name}[section]
% \subsubsection{æµ®åŠ¨å¯¹è±¡}
% \label{sec:float}
% è®¾ç½®æµ®åŠ¨å¯¹è±¡å’Œæ–‡å­—ä¹‹é—´çš„è·ç¦»
%    \begin{macrocode}
\setlength{\floatsep}{20bp \@plus4pt \@minus1pt}
\setlength{\intextsep}{20bp \@plus4pt \@minus2pt}
\setlength{\textfloatsep}{20bp \@plus4pt \@minus2pt}
\setlength{\@fptop}{0bp \@plus1.0fil}
\setlength{\@fpsep}{12bp \@plus2.0fil}
\setlength{\@fpbot}{0bp \@plus1.0fil}
%    \end{macrocode}
%
% ä¸‹é¢è¿™ç»„å‘½ä»¤ä½¿æµ®åŠ¨å¯¹è±¡çš„ç¼ºçœå€¼ç¨å¾®å®½æ¾ä¸€ç‚¹ï¼Œä»Žè€Œé˜²æ­¢å¹…åº¦å¯¹è±¡å&nbsp;æ®è¿‡å¤šçš„æ–‡æœ¬é¡µé¢ï¼Œ
% ä¹Ÿå¯ä»¥é˜²æ­¢åœ¨å¾ˆå¤§ç©ºç™½çš„æµ®åŠ¨é¡µä¸Šæ”¾ç½®å¾ˆå°çš„å›¾å½¢ã€‚
%    \begin{macrocode}
\renewcommand{\textfraction}{0.15}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.65}
\renewcommand{\floatpagefraction}{0.60}
%    \end{macrocode}
%
% å®šåˆ¶æµ®åŠ¨å›¾å½¢å’Œè¡¨æ&nbsp;¼æ&nbsp;‡é¢˜æ&nbsp;·å¼
% \begin{itemize}
%   \item å›¾è¡¨æ&nbsp;‡é¢˜å­—ä½“ä¸º 11ptï¼Œ è¿™é‡Œå†™ä½œå¤§äº”å·
%   \item åŽ»æŽ‰å›¾è¡¨å·åŽé¢çš„å†’å·ã€‚å›¾åºä¸Žå›¾åæ–‡å­—ä¹‹é—´ç©ºä¸€ä¸ªæ±‰å­—ç¬¦å®½åº¦ã€‚
%   \item å›¾ï¼šcaption åœ¨ä¸‹ï¼Œæ®µå‰ç©º 6 ç£…ï¼Œæ®µåŽç©º 12 ç£…
%   \item è¡¨ï¼šcaption åœ¨ä¸Šï¼Œæ®µå‰ç©º 12 ç£…ï¼Œæ®µåŽç©º 6 ç£…
% \end{itemize}
%
%    \begin{macrocode}
\let\old@tabular\@tabular
\def\nju@tabular{\dawu[1.5]\old@tabular}
\DeclareCaptionLabelFormat{nju}{{\dawu[1.5]\normalfont #1~#2}}
\DeclareCaptionLabelSeparator{nju}{\hspace{1em}}
\DeclareCaptionFont{nju}{\dawu[1.5]}
\captionsetup{labelformat=nju,labelsep=nju,font=nju,skip=6bp}
\captionsetup[table]{position=top}
\captionsetup[figure]{position=bottom}
\captionsetup[sub]{font=nju}
\renewcommand{\thesubfigure}{(\alph{subfigure})}
\renewcommand{\thesubtable}{(\alph{subtable})}
% \renewcommand{\p@subfigure}{:}
%    \end{macrocode}
% æˆ‘ä»¬é‡‡ç”¨ \pkg{longtable} æ¥å¤„ç†è·¨é¡µçš„è¡¨æ&nbsp;¼ã€‚åŒæ&nbsp;·æˆ‘ä»¬éœ€è¦è®¾ç½®å…¶é»˜è®¤å­—ä½“ä¸ºäº”å·ã€‚
%    \begin{macrocode}
\let\nju@LT@array\LT@array
\def\LT@array{\dawu[1.5]\nju@LT@array} % set default font size
%    \end{macrocode}
%
% \begin{macro}{\hlinewd}
% ç®€å•çš„è¡¨æ&nbsp;¼ä½¿ç”¨ä¸‰çº¿è¡¨æŽ¨èç”¨ \cs{hlinewd}ã€‚å¦‚æžœè¡¨æ&nbsp;¼æ¯”è¾ƒå¤æ‚è¿˜æ˜¯ç”¨ \pkg{booktabs} çš„å‘½ä»¤å¥½ä¸€äº›ã€‚
%    \begin{macrocode}
\def\hlinewd#1{%
  \noalign{\ifnum0=`}\fi\hrule \@height #1 \futurelet
    \reserved@a\@xhline}
%    \end{macrocode}
% \end{macro}
%
%
% \subsubsection{ç«&nbsp;èŠ‚æ&nbsp;‡é¢˜}
% \label{sec:theor}
%    \begin{macrocode}
\ifnju@chinese
  \ctexset{%
    chapter/name={ç¬¬,ç«&nbsp;},
    appendixname=é™„å½•,
    contentsname={ç›®\hspace{\ccwd}å½•},
    listfigurename=æ’å›¾ç´¢å¼•,
    listtablename=è¡¨æ&nbsp;¼ç´¢å¼•,
    figurename=å›¾,
    tablename=è¡¨,
    bibname=å‚è€ƒæ–‡çŒ®,
    indexname=ç´¢å¼•,
  }
  \newcommand\listequationname{å…¬å¼ç´¢å¼•}
  \newcommand\equationname{å…¬å¼}
\else
  \newcommand\listequationname{List of Equations}
  \newcommand\equationname{Equation}
\fi
\newcommand{\cabstractname}{æ‘˜\hspace{\ccwd}è¦}
\newcommand{\eabstractname}{Abstract}
\let\CJK@todaysave=\today
\def\CJK@todaysmall@short{\the\year å¹´ \the\month æœˆ}
\def\CJK@todaysmall{\the\year å¹´ \the\month æœˆ \the\day æ—¥}
\def\CJK@todaybig@short{\zhdigits{\the\year}å¹´\zhnumber{\the\month}æœˆ}
\def\CJK@todaybig{\zhdigits{\the\year}å¹´\zhnumber{\the\month}æœˆ\zhnumber{\the\day}æ—¥}
\def\CJK@today{\CJK@todaysmall}
\renewcommand\today{\CJK@today}
\newcommand\CJKtoday[1][1]{%
  \ifcase#1\def\CJK@today{\CJK@todaysave}
    \or\def\CJK@today{\CJK@todaysmall}
    \or\def\CJK@today{\CJK@todaybig}
  \fi}
%    \end{macrocode}
%
% \pkg{fancyhdr} å®šä¹‰é¡µçœ‰é¡µè„šå¾ˆæ–¹ä¾¿ï¼Œä½†æ˜¯æœ‰ä¸€ä¸ªéžå¸¸éšè”½çš„å‘ã€‚é€šè¿‡ \pkg{fancyhdr}
% å®šä¹‰çš„æ&nbsp;·å¼åœ¨ç¬¬ä¸€æ¬¡è¢«è°ƒç”¨æ—¶ä¼šä¿®æ”¹ \cs{chaptermark}ï¼Œè¿™ä¼šå¯¼è‡´é¡µçœ‰ä¿¡æ¯é”™è¯¯ï¼ˆå¤šä½™
% ç«&nbsp;å·å¹¶ä¸”è‹±æ–‡å¤§å†™ï¼‰ã€‚è¿™æ˜¯å›&nbsp;ä¸ºåœ¨åŽŸå§‹çš„ \file{book.cls} ä¸­å®šä¹‰å¦‚ä¸‹ï¼ˆå¤§æ„ï¼‰ï¼š
% \begin{latex}
% \newcommand\chaptername{Chapter}
% \newcommand\@chapapp{\chaptername}
% \def\chaptermark#1{
%   \markboth{\MakeUppercase{\@chapapp\ \thechapter}}{}}
% \end{latex}
% å¾ˆæ˜¾ç„¶è¿™ä¸ª \cs{\@chapapp} ä¸é€‚åˆä¸­æ–‡ï¼Œå›&nbsp;æ­¤æˆ‘ä»¬ä½¿ç”¨\cs{CTEXthechapter}ï¼ˆ
% å¦‚ï¼Œâ€œç¬¬ x ç«&nbsp;â€ï¼‰ï¼ŒåŒæ—¶ä¼šå°† \cs{MakeUppercase} åŽ»æŽ‰ã€‚ä¹Ÿå°±æ˜¯è¯´æˆ‘ä»¬ä¼šåšå¦‚ä¸‹åŠ¨ä½œï¼š
% \begin{latex}
% \renewcommand{\chaptermark}[1]{\@mkboth{\CTEXthechapter\hskip\ccwd#1}{}}
% \end{latex}
% ä½†ï¼Œ\pkg{fancyhdr} ä¸çŸ¥ä½•æ•…åœ¨ \cs{ps@fancy} ä¸­å¯¹ \cs{chaptermark} è¿›è¡Œé‡å®šä¹‰
% ï¼ˆå…¶å®žä¸€æ¨¡ä¸€æ&nbsp;·ï¼‰ï¼Œè€Œè¿™ä¸ª \cs{ps@fancy} ä¼šåœ¨ \cs{fancypagestyle} ä¸­ä½¿ç”¨ï¼Œå¦‚ä¸‹ï¼š
% \begin{latex}
% \newcommand{\fancypagestyle}[2]{%
%   \@namedef{ps@#1}{\let\fancy@gbl\relax#2\relax\ps@fancy}}
% \end{latex}
% è¿™æ&nbsp;·çš„è¯ï¼Œ\cs{ps@fancy} ä¼šåœ¨ \pkg{fancyhdr} å®šä¹‰çš„ä»»ä½•æ&nbsp;·å¼é¦–æ¬¡æ&nbsp;·è¢«æ¿€æ´»æ—¶è°ƒç”¨ï¼Œä»Ž
% è€Œè¦†ç›–æˆ‘ä»¬çš„ \cs{chaptermark} å®šä¹‰ï¼ˆåŽç»­æ&nbsp;·å¼å†æ¿€æ´»ä¸ä¼šé‡å¤è¦†ç›–ï¼‰ã€‚æ‰€ä»¥æˆ‘ä»¬é‡‡ç”¨å¦‚ä¸‹
% æ–¹æ³•è§£å†³ï¼š
%    \begin{macrocode}
\AtBeginDocument{%
  \pagestyle{nju@empty}
  \renewcommand{\chaptermark}[1]{\@mkboth{\CTEXthechapter\hskip\ccwd#1}{}}}
%    \end{macrocode}
%
% å„çº§æ&nbsp;‡é¢˜æ&nbsp;¼å¼è®¾ç½®ã€‚
% \begin{description}
% \item[section] ç«&nbsp;åºå·ä¸Žç«&nbsp;åä¹‹é—´ç©ºä¸€ä¸ªæ±‰å­—ç¬¦ é»‘ä½“ä¸‰å·å­—ï¼Œå±…ä¸­ä¹¦å†™ï¼Œå•å€è¡Œè·ï¼Œæ®µ
%   å‰ç©º 24 ç£…ï¼Œæ®µåŽç©º 18 ç£…ã€‚æœ¬ç§‘è¦æ±‚ï¼šæ®µå‰æ®µåŽé—´è· 30/20 ptï¼Œè¡Œè· 20ptã€‚ä½†æ­£æ–‡
%   ç«&nbsp;èŠ‚ 30pt çš„è¯å’Œæ&nbsp;·ä¾‹æ•ˆæžœä¸ä¸€è‡´ã€‚
% \item[section] ä¸€çº§èŠ‚æ&nbsp;‡é¢˜ï¼Œä¾‹å¦‚ï¼š\fbox{2.1 å®žéªŒè£…ç½®ä¸Žå®žéªŒæ–¹æ³•}ã€‚èŠ‚æ&nbsp;‡é¢˜åºå·ä¸Žæ&nbsp;‡
%   é¢˜åä¹‹é—´ç©ºä¸€ä¸ªæ±‰å­—ç¬¦ï¼ˆä¸‹åŒï¼‰ã€‚é‡‡ç”¨é»‘ä½“å››å·ï¼ˆ14ptï¼‰å­—å±…å·¦ä¹¦å†™ï¼Œè¡Œè·ä¸ºå›ºå®š
%   å€¼ 20 ç£…ï¼Œæ®µå‰ç©º 24 ç£…ï¼Œæ®µåŽç©º 6 ç£…ã€‚æœ¬ç§‘ï¼š25/12 ptï¼Œè¡Œè· 18ptã€‚
% \item[subsection] äºŒçº§èŠ‚æ&nbsp;‡é¢˜ï¼Œä¾‹å¦‚ï¼š\fbox{2.1.1 å®žéªŒè£…ç½®}ã€‚é‡‡ç”¨é»‘ä½“ 13pt å­—å±…å·¦
%   ä¹¦å†™ï¼Œè¡Œè·ä¸ºå›ºå®šå€¼ 20 ç£…ï¼Œæ®µå‰ç©º 12 ç£…ï¼Œæ®µåŽç©º 6 ç£…ã€‚æœ¬ç§‘ï¼šä¸­æ–‡é»‘ä½“ 12pt å­—ï¼Œ
%   è‹±æ–‡ 13pt å­—ï¼Œæ®µé—´è· 12/6 ptï¼Œè¡Œè· 15ptã€‚
% \item[subsubsection] ä¸‰çº§èŠ‚æ&nbsp;‡é¢˜ï¼Œä¾‹å¦‚ï¼š\fbox{2.1.2.1 å½’çº³æ³•}ã€‚é‡‡ç”¨é»‘ä½“å°å››å·
%   ï¼ˆ12ptï¼‰å­—å±…å·¦ä¹¦å†™ï¼Œè¡Œè·ä¸ºå›ºå®šå€¼ 20 ç£…ï¼Œæ®µå‰ç©º 12 ç£…ï¼Œæ®µåŽç©º 6 ç£…ã€‚
%
% \end{description}
%    \begin{macrocode}
\newcommand\nju@chapter@titleformat[1]{%
    \ifthenelse%
      {\equal{#1}{\eabstractname}}%
      {\bfseries #1}%
      {#1}%
  }
\ctexset{%
  chapter={
    afterindent=true,
    pagestyle={nju@headings},
    beforeskip={9bp},
    aftername=\hskip\ccwd,
    afterskip={24bp},
    format={\centering\sffamily\sanhao[1]},
    nameformat=\relax,
    numberformat=\relax,
    titleformat=\nju@chapter@titleformat,
    lofskip=0pt,
    lotskip=0pt,
  },
  section={
    afterindent=true,
    beforeskip={24bp\@plus 1ex \@minus .2ex},
    afterskip={6bp\@plus .2ex},
    format={\sffamily\sihao[1.429]},
  },
  subsection={
    afterindent=true,
    beforeskip={16bp\@plus 1ex \@minus .2ex},
    afterskip={6bp \@plus .2ex},
    format={\sffamily\banxiaosi[1.538]},
    numberformat={\sffamily\banxiaosi[1.538]},
  },
  subsubsection={
    afterindent=true,
    beforeskip={16bp\@plus 1ex \@minus .2ex},
    afterskip={6bp \@plus .2ex},
    format={\sffamily\xiaosi[1.667]},
  },
  paragraph/afterindent=true,
  subparagraph/afterindent=true}
%    \end{macrocode}
%
% \begin{macro}{\nju@chapter*}
% é»˜è®¤çš„ \cs{chapter*} å¾ˆéš¾åŒæ—¶æ»¡è¶³ç&nbsp;”ç©¶ç”Ÿé™¢å’Œæœ¬ç§‘ç”Ÿçš„è®ºæ–‡è¦æ±‚ã€‚æœ¬ç§‘è®ºæ–‡è¦æ±‚æ‰€æœ‰çš„
% ç«&nbsp;éƒ½å‡ºçŽ°åœ¨ç›®å½•é‡Œï¼Œæ¯”å¦‚æ‘˜è¦ã€Abstractã€ä¸»è¦ç¬¦å·è¡¨ç­‰ï¼Œæ‰€ä»¥å¯ä»¥ç®€å•çš„æ‰©å±•é»˜
% è®¤\cs{chapter*} å®žçŽ°è¿™ä¸ªç›®çš„ã€‚ä½†æ˜¯ç&nbsp;”ç©¶ç”Ÿåˆä¸è¦è¿™äº›å‡ºçŽ°åœ¨ç›®å½•ä¸­ï¼Œè€Œä¸”è‡´è°¢å’Œå£°æ˜Ž
% éƒ¨åˆ†çš„ç«&nbsp;åã€é¡µçœ‰å’Œç›®å½•éƒ½ä¸åŒï¼Œæ‰€ä»¥å®šä¹‰ä¸€ä¸ªçµæ´»çš„ \cs{nju@chapter*} ä¸“é—¨å¤„ç†è¿™äº›
% è¦æ±‚ã€‚
%
% \cs{nju@chapter*}\oarg{tocline}\marg{title}\oarg{header}: tocline æ˜¯å‡ºçŽ°åœ¨ç›®å½•
% ä¸­çš„æ¡ç›®ï¼Œå¦‚æžœä¸ºç©ºåˆ™æ­¤ chapter ä¸å‡ºçŽ°åœ¨ç›®å½•ä¸­ï¼Œå¦‚æžœçœç•¥è¡¨ç¤ºç›®å½•å‡ºçŽ° titleï¼›
% title æ˜¯ç«&nbsp;æ&nbsp;‡é¢˜ï¼›header æ˜¯é¡µçœ‰å‡ºçŽ°çš„æ&nbsp;‡é¢˜ï¼Œå¦‚æžœå¿½ç•¥åˆ™å– titleã€‚é€šè¿‡è¿™ä¸ªå®æˆ‘æ‰çœŸ
% æ­£ä½“ä¼šåˆ° \TeX\ macro çš„åŠ›é‡ï¼
%    \begin{macrocode}
\newcounter{nju@bookmark}
\NewDocumentCommand\nju@chapter{s o m o}{
  \IfBooleanF{#1}{%
    \ClassError{njurepo}{You have to use the star form: \string\nju@chapter*}{}
  }%
  \ifnju@right\cleardoublepage\else\clearpage\fi\phantomsection%
  \IfValueTF{#2}{%
    \ifthenelse{\equal{#2}{}}{%
      \addtocounter{nju@bookmark}\@ne
      \pdfbookmark[0]{#3}{njuchapter.\thenju@bookmark}
    }{%
      \addcontentsline{toc}{chapter}{#3}
    }
  }{%
    \addcontentsline{toc}{chapter}{#3}
  }%
  \ctexset{chapter/beforeskip=25bp}
  \chapter*{#3}%
  \ctexset{chapter/beforeskip=15bp}
  \IfValueTF{#4}{%
    \ifthenelse{\equal{#4}{}}
    {\@mkboth{}{}}
    {\@mkboth{#4}{#4}}
  }{%
    \@mkboth{#3}{#3}
  }
}
%    \end{macrocode}
% \end{macro}
%
%
% \subsubsection{ç›®å½•}
% \label{sec:toc}
% æœ€å¤š 4 å±‚ï¼Œå³: x.x.x.xï¼Œå¯¹åº”çš„å‘½ä»¤å’Œå±‚åºå·åˆ†åˆ«æ˜¯ï¼š
% \cs{chapter}(0), \cs{section}(1), \cs{subsection}(2), \cs{subsubsection}(3)ã€‚
%    \begin{macrocode}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{2}
%    \end{macrocode}
%
% æ¯ç«&nbsp;æ&nbsp;‡é¢˜è¡Œå‰ç©º 6 ç£…ï¼ŒåŽç©º 0 ç£…ã€‚ç«&nbsp;èŠ‚åä¸­è‹±æ–‡ç”¨ Arial å­—ä½“ï¼Œé¡µç&nbsp;ä»ç”¨ Timesã€‚
% \begin{macro}{\tableofcontents}
%    \begin{macrocode}
\renewcommand\tableofcontents{%
  \nju@chapter*[]{\contentsname}
  \xiaosi[1.65]\@starttoc{toc}\normalsize}
%    \end{macrocode}
% è°ƒæ•´ç›®å½•æ&nbsp;·å¼
%    \begin{macrocode}
\def\@pnumwidth{2em}
\def\@tocrmarg{\@pnumwidth}
\def\@dotsep{1}
\renewcommand*\l@chapter[2]{%
  \ifnum \c@tocdepth &gt;\m@ne
    \addpenalty{-\@highpenalty}%
    \vskip 4bp \@plus\p@
    \setlength\@tempdima{4em}%
    \begingroup
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode
      \advance\leftskip\@tempdima
      \hskip -\leftskip
      {#1}%
      \leaders\hbox{$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill%
      \nobreak{#2}\par
      \penalty\@highpenalty
    \endgroup
  \fi}

\patchcmd{\@dottedtocline}{\hb@xt@\@pnumwidth}{\hbox}{}{}
\renewcommand*\l@section{%
  \@dottedtocline{1}{\ccwd}{2.1em}}
\renewcommand*\l@subsection{%
  \@dottedtocline{2}{2\ccwd}{3em}}
\renewcommand*\l@subsubsection{%
  \@dottedtocline{3}{3.5em}{3.8em}}
%    \end{macrocode}
% \end{macro}
%
% \subsection{é™„åŠ&nbsp;é¡µé¢}
% \label{sec:etc}
%
% \subsubsection{å°é¢}
% \label{sec:cover}
% å®šä¹‰å°é¢å‚æ•°ã€‚
%    \begin{macrocode}
\def\nju@def@term#1{%
  \define@key{nju}{#1}{\csname #1\endcsname{##1}}
  \expandafter\gdef\csname #1\endcsname##1{%
    \expandafter\gdef\csname nju@#1\endcsname{##1}}
  \csname #1\endcsname{}}
\nju@def@term{ctitle}
\nju@def@term{csubtitle}
\nju@def@term{csubsubtitle}
\nju@def@term{etitle}
\nju@def@term{esubtitle}
\nju@def@term{esubsubtitle}
\nju@def@term{cauthor}
\nju@def@term{csupervisor}
\nju@def@term{cassosupervisor}
\nju@def@term{ccosupervisor}
\nju@def@term{eauthor}
\nju@def@term{esupervisor}
\nju@def@term{eassosupervisor}
\nju@def@term{ecosupervisor}
\nju@def@term{cdegree}
\nju@def@term{edegree}
\nju@def@term{cdepartment}
\nju@def@term{edepartment}
\nju@def@term{cmajor}
\nju@def@term{emajor}
\nju@def@term{cdate}
\nju@def@term{edate}
\nju@def@term{stdid}
\nju@def@term{mail}
\cdate{\CJK@todaybig@short}
\edate{\ifcase \month \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\unskip,\ \ \the\year}
%    \end{macrocode}
%
% \begin{environment}{cabstract}
% \begin{environment}{eabstract}
% æ‘˜è¦æœ€å¥½ä»¥çŽ¯å¢ƒçš„å½¢å¼å‡ºçŽ°ï¼ˆå¦åˆ™å‘½ä»¤çš„å½¢å¼ä¼šå¯¼è‡´å¼€å§‹ç»“æŸçš„æ‹¬å·è·ç¦»å¤ªè¿œï¼Œæˆ‘ä¸å–œ
% æ¬¢ï¼‰ï¼Œè¿™å°±å¿…é¡»è®©çŽ¯å¢ƒèƒ½å¤Ÿè‡ªå·±ä¿å­˜å†…å®¹ç•™å¾…ä»¥åŽä½¿ç”¨ã€‚ä½¿ç”¨ \pkg{environ} çš„
% \cs{Collect@Body} æ¥å®žçŽ°ã€‚
%    \begin{macrocode}
\newcommand{\nju@@cabstract}[1]{\long\gdef\nju@cabstract{#1}}
\newenvironment{cabstract}{\Collect@Body\nju@@cabstract}{}
\newcommand{\nju@@eabstract}[1]{\long\gdef\nju@eabstract{#1}}
\newenvironment{eabstract}{\Collect@Body\nju@@eabstract}{}
%    \end{macrocode}
% \end{environment}
% \end{environment}
%
% \begin{macro}{\nju@parse@keywords}
%   ä¸åŒè®ºæ–‡æ&nbsp;¼å¼å…³é”®è¯ä¹‹é—´çš„åˆ†å‰²ä¸å¤ªç›¸åŒï¼Œæˆ‘ä»¬ç”¨ \cs{ckeywords} å’Œ
%    \cs{ekeywords} æ¥æ”¶é›†å…³é”®è¯åˆ—è¡¨ï¼Œç„¶åŽç”¨æœ¬å‘½ä»¤æ¥ç”Ÿæˆç¬¦åˆè¦æ±‚çš„æ&nbsp;¼å¼ã€‚
%    \begin{macrocode}
\def\nju@parse@keywords#1{
  \define@key{nju}{#1}{\csname #1\endcsname{##1}}
  \expandafter\gdef\csname nju@#1\endcsname{}
  \expandafter\gdef\csname #1\endcsname##1{
    \@for\reserved@a:=##1\do{
      \expandafter\ifx\csname nju@#1\endcsname\@empty\else
        \expandafter\g@addto@macro\csname nju@#1\endcsname{%
          \ignorespaces\csname nju@#1@separator\endcsname}
      \fi
      \expandafter\expandafter\expandafter\g@addto@macro%
        \expandafter\csname nju@#1\expandafter\endcsname\expandafter{\reserved@a}}}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\ckeywords}
% \begin{macro}{\ekeywords}
% åˆ©ç”¨ \cs{nju@parse@keywords} æ¥å®šä¹‰ï¼Œå†…éƒ¨é€šè¿‡ \cs{nju@ckeywords} å’Œ
% \cs{nju@ekeywords} æ¥å¼•ç”¨ã€‚
%    \begin{macrocode}
\nju@parse@keywords{ckeywords}
\nju@parse@keywords{ekeywords}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\njusetup}
% ç”±ä¸Šå¯è§ï¼Œå°é¢å’Œå°åº•æœ‰ä¸€å¤§å&nbsp;†ä¿¡æ¯éœ€è¦è®¾ç½®ï¼Œä¸ºäº†ç®€åŒ–æ“ä½œç•Œé¢ï¼Œæä¾›ä¸€
% ä¸ª \cs{njusetup} å‘½ä»¤æ”¯æŒ key/value çš„æ–¹å¼æ¥è®¾ç½®ã€‚key å°±æ˜¯å‰é¢å„ä¸ªè®¾ç½®é¡¹çš„
% åå­—ã€‚\note[è¯´æ˜Žï¼š]{åªèƒ½è®¾ç½®æ™®é€šé¡¹ï¼Œä¸æ”¯æŒçŽ¯å¢ƒé¡¹ï¼Œ
% å¦‚ \texttt{cabstract} å’Œ \texttt{eabstract}ã€‚} ç”±äºŽè¿™äº›è®¾ç½®é¡¹è¢« \cs{makecover}
% è°ƒç”¨ï¼Œæ‰€ä»¥æ­¤å‘½ä»¤éœ€è¦åœ¨ \cs{makecover} ä¹‹å‰è¢«è°ƒç”¨ã€‚
%    \begin{macrocode}
\def\njusetup{\kvsetkeys{nju}}
%    \end{macrocode}
% \end{macro}
%
% å®šä¹‰å°é¢ç”¨åˆ°çš„å„ç§æ–‡å­—ã€‚
%    \begin{macrocode}
\def\nju@ckeywords@separator{ï¼›}
\def\nju@ekeywords@separator{;}
\def\nju@catalog@number@title{åˆ†ç±»å·}
\def\nju@id@title{ç¼–å·}
\def\nju@title@sep{ï¼š}
\def\nju@schoolname{å—äº¬å¤§å­¦}
\def\nju@author@title{å§“å}
\def\nju@department@title{ç³»åˆ«}
\def\nju@major@title{ä¸“ä¸š}
\def\nju@supervisor@title{æŒ‡å¯¼æ•™å¸ˆ}
\def\nju@assosuper@title{è¾…å¯¼æ•™å¸ˆ}
\def\nju@studentid@title{å­¦å·}
\def\nju@date@title{æ—¥æœŸ}
\def\nju@mail@title{é‚®ç®±}
\newcommand{\nju@ckeywords@title}{å…³é”®è¯ï¼š}
\def\nju@title@pre{}

\def\nju@eng@title@sep{:}
\def\nju@eng@author@title{Name}
\def\nju@eng@studentid@title{StdID}
\def\nju@eng@date@title{Date}
\def\nju@eng@mail@title{E-mail}
%    \end{macrocode}
%
% ä¸­æ–‡å°åž‹æ&nbsp;‡é¢˜
%    \begin{macrocode}
\renewcommand{\maketitle}{
  \nju@setup@pdfinfo
  \begin{center} {\LARGE \ifnju@chinese\nju@ctitle\else\nju@etitle\fi}
  \end{center}
  \hspace*{\fill}
  \ifnju@chinese
    \nju@author@title\nju@title@sep\CJKunderline{\nju@cauthor}
  \else
    \nju@eng@author@title\nju@eng@title@sep\underline{\nju@eauthor}
  \fi
  \hspace*{\fill}
  \ifx\nju@stdid\@empty\relax
  \else
    \ifnju@chinese
      \nju@studentid@title\nju@title@sep\CJKunderline{\nju@stdid}
    \else
      \nju@eng@studentid@title\nju@eng@title@sep\underline{\nju@stdid}
    \fi
  \fi
  \hspace*{\fill}
  \ifnju@chinese
    \nju@date@title\nju@title@sep\CJKunderline{\today}
  \else
    \nju@eng@date@title\nju@eng@title@sep\CJKunderline{\nju@edate}
  \fi
  \hspace*{\fill}\\
}
%    \end{macrocode}
%
% åˆ«æ&nbsp;·å°é¢
%    \begin{macrocode}
\newcommand{\maketitlepage}{
  \nju@setup@pdfinfo
  \begin{titlepage}
    \begin{center}
    \ifx\nju@esubsubtitle\@empty\relax  {\LARGE\sffamily\scshape\ifnju@chinese\nju@csubsubtitle\else\nju@esubsubtitle\fi\ }\\[1.5cm]
    \else
    {\LARGE\sffamily\scshape \ifnju@chinese\nju@csubsubtitle\else\nju@esubsubtitle\fi}\\[1.5cm]
    \fi
		{\Large\sffamily\scshape \ifnju@chinese\nju@csubtitle\else\nju@esubtitle\fi}\\
    \rule{\linewidth}{0.5mm} \\[0.4cm]
		{\huge\sffamily\bfseries \ifnju@chinese\nju@ctitle\else\nju@etitle\fi}\\
		\rule{\linewidth}{0.5mm} \\[1.5cm]
			
		\begin{center}
			\begin{tabular}{@{\hspace{0.5cm}}l@{\hspace{0.5cm}}l}
				\nju@eauthor &amp; \nju@stdid\\
			\end{tabular}
		\end{center}
		\vfill
		{\large \nju@edate}
    \end{center}
    \ifnju@right\cleardoublepage\else\clearpage\fi
  \end{titlepage}
}
%    \end{macrocode}
%
% \myentry{å°é¢ç¬¬ä¸€é¡µ}
% \begin{macro}{\nju@first@titlepage}
% é¢˜åä½¿ç”¨ä¸€å·é»‘ä½“å­—ï¼Œä¸€è¡Œå†™ä¸ä¸‹æ—¶å¯åˆ†ä¸¤è¡Œå†™ï¼Œå¹¶é‡‡ç”¨ 1.25 å€è¡Œè·ã€‚
% ç”³è¯·å­¦ä½çš„å­¦ç§‘é—¨ç±»: å°äºŒå·å®‹ä½“å­—ã€‚
% ä¸­æ–‡å°é¢é¡µè¾¹è·ï¼š
%  ä¸Š- 6.0 åŽ˜ç±³ï¼Œä¸‹- 5.5 åŽ˜ç±³ï¼Œå·¦- 4.0 åŽ˜ç±³ï¼Œå³- 4.0 åŽ˜ç±³ï¼Œè£…è®¢çº¿ 0 åŽ˜ç±³ï¼›
%
%    \begin{macrocode}
\newcommand\nju@underline[2][6em]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt}
\newlength{\nju@title@width}
\ifxetex % todo: ugly codes
  \newcommand{\nju@put@title}[2][\nju@title@width]{%
  \begin{CJKfilltwosides}[b]{#1}#2\end{CJKfilltwosides}}
\else
  \newcommand{\nju@put@title}[2][\nju@title@width]{%
  \begin{CJKfilltwosides}{#1}#2\end{CJKfilltwosides}}
\fi
\newcommand{\nju@first@titlepage}{
  \begin{center}
    \vspace*{-1.6cm}
    \parbox[b][2.4cm][t]{\textwidth}{%
      \rule{1cm}{0cm}}
      \vskip0.65cm
      {\includegraphics[width=0.3\textwidth]{njuname0.pdf}}
      \par\vskip1.5cm
      {\xiaochu\heiti\ziju{0.5}\textbf\nju@csubtitle}
      \vskip2.2cm\hskip0.8cm
      \noindent\heiti\xiaoer\nju@title@pre
      \parbox[t]{12cm}{%
      \ignorespaces\yihao[1.51]%
      \renewcommand{\CJKunderlinebasesep}{0.25cm}%
      \renewcommand{\ULthickness}{1.3pt}%
      \ifxetex
        \xeCJKsetup{underline/format=\color{black}}%
      \else
        \def\CJKunderlinecolor{\color{black}}%
      \fi
      \centering\CJKunderline*{\nju@ctitle}
      
    }%
      \vskip1.3cm
%    \end{macrocode}
%
% ä½œè€…åŠå¯¼å¸ˆä¿¡æ¯éƒ¨åˆ†ä½¿ç”¨ä¸‰å·ä»¿å®‹å­—
%    \begin{macrocode}
      \vskip0.75cm
      \ifx\nju@cassosupervisor\@empty%
        \def\nju@tempa{7.15cm}
      \else%
        \def\nju@tempa{8.15cm}
      \fi%
      \parbox[t][\nju@tempa][t]{\textwidth}{%
        {\fangsong\sanhao[1.95]%
         \hspace*{1.9cm}
         \setlength{\nju@title@width}{4em}
         \setlength{\extrarowheight}{6pt}
         \ifxetex % todo: ugly codes
           \begin{tabular}{p{\nju@title@width}@{}l@{\extracolsep{8pt}}l}
         \else
           \begin{tabular}{p{\nju@title@width}l@{}l}
         \fi
             \nju@put@title{\nju@department@title} &amp; \nju@title@sep
               &amp; \nju@cdepartment\\
             \nju@put@title{\nju@major@title}      &amp; \nju@title@sep
               &amp; \nju@cmajor\\
             \nju@put@title{\nju@author@title}     &amp; \nju@title@sep
               &amp; \nju@cauthor \\
             \nju@put@title{\nju@supervisor@title} &amp; \nju@title@sep
               &amp; \nju@csupervisor\\
             \ifx\nju@cassosupervisor\@empty\else%
               \nju@put@title{\nju@assosuper@title} &amp; \nju@title@sep
               &amp; \nju@cassosupervisor\\
             \fi
           \end{tabular}
        }}
%    \end{macrocode}
%
% è®ºæ–‡æˆæ–‡æ‰“å°çš„æ—¥æœŸï¼Œç”¨ä¸‰å·å®‹ä½“æ±‰å­—ï¼Œä¸ç”¨é˜¿æ‹‰ä¼¯æ•°å­—
% æœ¬ç§‘ï¼šè®ºæ–‡æˆæ–‡æ‰“å°çš„æ—¥æœŸç”¨é˜¿æ‹‰ä¼¯æ•°å­—ï¼Œé‡‡ç”¨å°å››å·å®‹ä½“
%    \begin{macrocode}
     \begin{center}
       {\vskip-1.0cm\xiaosi
         \songti\nju@cdate}
     \end{center}
    \end{center}} % end of titlepage
%    \end{macrocode}
% \end{macro}
%
% \myentry{è‹±æ–‡å°é¢}
% \begin{macro}{\nju@engcover}
%    \begin{macrocode}
\newcommand{\nju@engcover}{%
  \begin{center}
    \vspace*{-5pt}
    \parbox[t][5.2cm][t]{\paperwidth-7.2cm}{
      \renewcommand{\baselinestretch}{1.5}
      \begin{center}
        \erhao[1.1]\bfseries\sffamily\nju@etitle%
      \end{center}}
    \parbox[t][][b]{\paperwidth-7.2cm}{
      \renewcommand{\baselinestretch}{1.3}
      \begin{center}
        \sanhao\sffamily by\\[3bp]
        \bfseries\nju@eauthor%
        \ifx\nju@emajor\empty\relax\else
          \\(~\nju@emajor~)%
        \fi
      \end{center}}
    \par\vspace{0.9cm}
    \parbox[t][2.1cm][t]{\paperwidth-7.2cm}{
      \renewcommand{\baselinestretch}{1.2}
      \xiaosan\centering
      \begin{tabular}{rl}
        Supervisor : &amp; \nju@esupervisor\\
        \ifx\nju@eassosupervisor\@empty
          \else Associate Supervisor : &amp; \nju@eassosupervisor\\\fi
        \ifx\nju@ecosupervisor\@empty
          \else Cooperate Supervisor : &amp; \nju@ecosupervisor\\\fi
      \end{tabular}}
    \parbox[t][2cm][b]{\paperwidth-7.2cm}{
    \begin{center}
      \sanhao\bfseries\sffamily\nju@edate
    \end{center}}
  \end{center}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\makecover}
% ç”Ÿæˆå°é¢æ€»å‘½ä»¤ã€‚
%    \begin{macrocode}
\def\makecover{%
  \nju@setup@pdfinfo\nju@makecover}
\def\nju@setup@pdfinfo{%
  \ifnju@chinese
    \hypersetup{
      pdftitle    = \nju@ctitle,
      pdfauthor   = \nju@cauthor,
      pdfsubject  = \nju@cdegree,
      pdfkeywords = \nju@ckeywords,
    }%
  \else
    \hypersetup{
      pdftitle    = \nju@etitle,
      pdfauthor   = \nju@eauthor,
      pdfsubject  = \nju@edegree,
      pdfkeywords = \nju@ekeywords,
    }%
  \fi
  \hypersetup{
    pdfcreator={\njurepo-v\version}}}
\NewDocumentCommand{\nju@makecover}{o}{
  \phantomsection
  \pdfbookmark[-1]{\nju@ctitle}{ctitle}
  \normalsize%
  \begin{titlepage}
    \ifnju@chinese
      \nju@first@titlepage
    \else
      \nju@engcover
    \fi
    \ifnju@right\cleardoublepage\else\clearpage\fi
  \end{titlepage}
}
\newcommand{\makeabstract}{
  \normalsize
  \nju@makeabstract
  \let\@tabular\nju@tabular
}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{æ‘˜è¦}
% \label{sec:abstractformat}
%
% \begin{macro}{\nju@put@keywords}
% æŽ’ç‰ˆå…³é”®å­—ã€‚
%    \begin{macrocode}
\newbox\nju@kw
\newcommand\nju@put@keywords[2]{%
  \begingroup
    \setbox\nju@kw=\hbox{#1}
    \indent%
    \box\nju@kw#2\par
  \endgroup}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\nju@makeabstract}
% ä¸­æ–‡æ‘˜è¦éƒ¨åˆ†çš„æ&nbsp;‡é¢˜ä¸ºâ€œ\textbf{æ‘˜è¦}â€ï¼Œç”¨é»‘ä½“ä¸‰å·å­—ã€‚
%    \begin{macrocode}
\newcommand{\nju@makeabstract}{%
  \clearpage
  \pagestyle{nju@plain}
  \pagenumbering{Roman}
%    \end{macrocode}
%
% æ‘˜è¦å†…å®¹ç”¨å°å››å·å­—ä¹¦å†™ï¼Œä¸¤ç«¯å¯¹é½ï¼Œæ±‰å­—ç”¨å®‹ä½“ï¼Œå¤–æ–‡å­—ç”¨ Times New Roman ä½“ï¼Œ
% æ&nbsp;‡ç‚¹ç¬¦å·ä¸€å¾‹ç”¨ä¸­æ–‡è¾“å…¥çŠ¶æ€ä¸‹çš„æ&nbsp;‡ç‚¹ç¬¦å·ã€‚
%    \begin{macrocode}
  \ifnju@chinese
    \nju@setchinese
    \nju@chapter*[]{\cabstractname} % no tocline
    \nju@cabstract
    \vskip12bp
    \nju@put@keywords{\textbf\nju@ckeywords@title}{\nju@ckeywords}
  \else
  \nju@setenglish
    \nju@chapter*[]{\eabstractname} % no tocline
    \nju@eabstract
    \vskip12bp
    \nju@put@keywords{%
      \textbf{Key Words:\enskip}}{\nju@ekeywords}%
  \fi
  \nju@setdefaultlanguage
}
%    \end{macrocode}
% \end{macro}
%
%
%
% \subsubsection{ä¸»è¦ç¬¦å·è¡¨}
% \label{sec:denotationfmt}
% \begin{environment}{denotation}
% ä¸»è¦ç¬¦å·å¯¹ç…§è¡¨ã€‚
%    \begin{macrocode}
\ifnju@chinese
  \newcommand\nju@denotation@name{ä¸»è¦ç¬¦å·å¯¹ç…§è¡¨}
\else
  \newcommand\nju@denotation@name{Nomenclature}
\fi
\newenvironment{denotation}[1][2.5cm]{%
  \nju@chapter*[]{\nju@denotation@name} % no tocline
  \vskip-30bp\xiaosi[1.6]\begin{nju@denotation}[labelwidth=#1]
}{%
  \end{nju@denotation}
}
\newlist{nju@denotation}{description}{1}
\setlist[nju@denotation]{%
  nosep,
  font=\normalfont,
  align=left,
  leftmargin=!, % sum of the following 3 lengths
  labelindent=0pt,
  labelwidth=2.5cm,
  labelsep*=0.5cm,
  itemindent=0pt,
}
%    \end{macrocode}
% \end{environment}
%
% \subsubsection{è‡´è°¢ä¸Žå£°æ˜Ž}
% \label{sec:ackanddeclare}
%
% \begin{environment}{acknowledgement}
% æ”¯æŒæ‰«ææ–‡ä»¶æ›¿æ¢ã€‚
%    \begin{macrocode}
\ifnju@chinese
  \newcommand\nju@ack@name{è‡´\hspace{\ccwd}è°¢}
\else
  \newcommand\nju@ack@name{Acknowledgments}
\fi
\newcommand\nju@declarename{å£°\hspace{\ccwd}æ˜Ž}
\newcommand{\nju@declaretext}{æœ¬äººéƒ‘é‡å£°æ˜Žï¼šæ‰€å‘ˆäº¤çš„å­¦ä½è®ºæ–‡ï¼Œæ˜¯æœ¬äººåœ¨å¯¼å¸ˆæŒ‡å¯¼ä¸‹
  ï¼Œç‹¬ç«‹è¿›è¡Œç&nbsp;”ç©¶å·¥ä½œæ‰€å–å¾—çš„æˆæžœã€‚å°½æˆ‘æ‰€çŸ¥ï¼Œé™¤æ–‡ä¸­å·²ç»æ³¨æ˜Žå¼•ç”¨çš„å†…å®¹å¤–ï¼Œæœ¬å­¦ä½è®º
  æ–‡çš„ç&nbsp;”ç©¶æˆæžœä¸åŒ…å«ä»»ä½•ä»–äººäº«æœ‰è‘—ä½œæƒçš„å†…å®¹ã€‚å¯¹æœ¬è®ºæ–‡æ‰€æ¶‰åŠçš„ç&nbsp;”ç©¶å·¥ä½œåšå‡ºè´¡çŒ®çš„
  å…¶ä»–ä¸ªäººå’Œé›†ä½“ï¼Œå‡å·²åœ¨æ–‡ä¸­ä»¥æ˜Žç¡®æ–¹å¼æ&nbsp;‡æ˜Žã€‚}
\newcommand{\nju@signature}{ç­¾\hspace{1em}åï¼š}
\newcommand{\nju@backdate}{æ—¥\hspace{1em}æœŸï¼š}
%    \end{macrocode}
%
%  \cs{cleardoublepage}ï¼Œä½¿æ–°å¼€ç«&nbsp;èŠ‚çš„é¡µç&nbsp;åˆ°è¾¾æ­£ç¡®çš„çŠ¶æ€ã€‚å¦åˆ™ä¼šå›&nbsp;ä¸º \cs{addcontentsline}
% åœ¨ chapter ä¹‹å‰è€Œå¯¼è‡´ç›®å½•é¡µç&nbsp;é”™è¯¯ã€‚
% å®šä¹‰è‡´è°¢ä¸Žå£°æ˜ŽçŽ¯å¢ƒã€‚
%    \begin{macrocode}
\NewDocumentEnvironment{acknowledgement}{o}{%
    \nju@chapter*{\nju@ack@name}
  }
%    \end{macrocode}
%
% å£°æ˜Žéƒ¨åˆ†
%    \begin{macrocode}
  {
    \ifnju@english\relax\else%
      \IfNoValueTF{#1}{%
        \nju@chapter*{\nju@declarename}
        \par{\xiaosi\parindent2em\nju@declaretext}\vskip2cm
        {\xiaosi\hfill\nju@signature\nju@underline[2.5cm]\relax%
         \nju@backdate\nju@underline[2.5cm]\relax}%
      }{%
        \includepdf[pagecommand={\thispagestyle{nju@empty}%
          \phantomsection\addcontentsline{toc}{chapter}{\nju@declarename}%
        }]{#1}%
      }%
    \fi
  }
%    \end{macrocode}
% \end{environment}
%
% \subsubsection{å›¾è¡¨ç´¢å¼•}
% \label{sec:threeindex}
% \begin{macro}{\listoffigures}
% \begin{macro}{\listoffigures*}
% \begin{macro}{\listoftables}
% \begin{macro}{\listoftables*}
% å®šä¹‰å›¾è¡¨ä»¥åŠå…¬å¼ç›®å½•æ&nbsp;·å¼ã€‚
%    \begin{macrocode}
\def\nju@starttoc#1{% #1: float type, prepend type name in \listof*** entry.
  \let\oldnumberline\numberline
  \def\numberline##1{\oldnumberline{\csname #1name\endcsname\hskip.4em ##1}}
  \@starttoc{\csname ext@#1\endcsname}
  \let\numberline\oldnumberline}
\def\nju@listof#1{% #1: float type
  \@ifstar
    {\nju@chapter*[]{\csname list#1name\endcsname}\nju@starttoc{#1}}
    {\nju@chapter*{\csname list#1name\endcsname}\nju@starttoc{#1}}}
\renewcommand\listoffigures{\nju@listof{figure}}
\renewcommand*\l@figure{\addvspace{6bp}\@dottedtocline{1}{0em}{4em}}
\renewcommand\listoftables{\nju@listof{table}}
\let\l@table\l@figure
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\equcaption}
%   æœ¬å‘½ä»¤åªæ˜¯ä¸ºäº†ç”Ÿæˆå…¬å¼åˆ—è¡¨ï¼Œæ‰€ä»¥è¿™ä¸ª caption æ˜¯å‡çš„ã€‚å¦‚æžœè¦ç¼–å·æœ€å¥½ç”¨
%    equation çŽ¯å¢ƒï¼Œå¦‚æžœæ˜¯å…¶å®ƒç¼–å·çŽ¯å¢ƒï¼Œè¯·æ‰‹åŠ¨æ·»åŠ&nbsp; \cs{equcaption}ã€‚
% ç”¨æ³•å¦‚ä¸‹ï¼š
%
% \cs{equcaption}\marg{counter}
%
% \marg{counter} æŒ‡å®šå‡ºçŽ°åœ¨ç´¢å¼•ä¸­çš„ç¼–å·ï¼Œä¸€èˆ¬å– \cs{theequation}ï¼Œå¦‚æžœä½&nbsp;æ˜¯ç”¨
%  \pkg{amsmath} çš„ \cs{tag}ï¼Œé‚£ä¹ˆé»˜è®¤æ˜¯ \cs{tag} çš„å‚æ•°ï¼›é™¤æ­¤ä¹‹å¤–å¯èƒ½éœ€è¦ä½&nbsp;
% æ‰‹å·¥æŒ‡å®šã€‚
%
%    \begin{macrocode}
\def\ext@equation{loe}
\def\equcaption#1{%
  \addcontentsline{\ext@equation}{equation}%
                  {\protect\numberline{#1}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\listofequations}
% \begin{macro}{\listofequations*}
% \LaTeX\ é»˜è®¤æ²¡æœ‰å…¬å¼ç´¢å¼•ï¼Œæ­¤å¤„å®šä¹‰è‡ªå·±çš„ \cs{listofequations}ã€‚
%    \begin{macrocode}
\newcommand\listofequations{\nju@listof{equation}}
\let\l@equation\l@figure
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{å‚è€ƒæ–‡çŒ®}
% \label{sec:ref}
%
% \begin{macro}{\inlinecite}
% ä¾èµ–äºŽ \pkg{natbib} å®åŒ…ï¼Œä¿®æ”¹å…¶ä¸­çš„å‘½ä»¤ã€‚ æ—§å‘½ä»¤ \cs{onlinecite} ä¾ç„¶å¯ç”¨ã€‚
%    \begin{macrocode}
\newcommand\bibstyle@inline{\bibpunct{[}{]}{,}{n}{,}{,}}
\DeclareRobustCommand\inlinecite{\@inlinecite}
\def\@inlinecite#1{\begingroup\let\@cite\NAT@citenum\citep{#1}\endgroup}
\let\onlinecite\inlinecite
%    \end{macrocode}
% \end{macro}
%
% å‚è€ƒæ–‡çŒ®çš„æ­£æ–‡éƒ¨åˆ†ç”¨äº”å·å­—ã€‚
% è¡Œè·é‡‡ç”¨å›ºå®šå€¼ 16 ç£…ï¼Œæ®µå‰ç©º 3 ç£…ï¼Œæ®µåŽç©º 0 ç£…ã€‚
%
% å¤ç”¨ \pkg{natbib} çš„ \texttt{thebibliography} çŽ¯å¢ƒï¼Œè°ƒæ•´è·ç¦»ã€‚
%    \begin{macrocode}
\renewcommand\bibsection{\nju@chapter*{\bibname}}
\renewcommand\bibfont{\wuhao[1.5]}
\setlength\bibhang{2\ccwd}
\addtolength{\bibsep}{-0.7em}
\setlength{\labelsep}{0.4em}
\def\@biblabel#1{[#1]\hfill}
%    \end{macrocode}
%
% ä¸¤ç§å¼•ç”¨æ&nbsp;·å¼ï¼š
%    \begin{macrocode}
\expandafter\newcommand\csname bibstyle@numeric\endcsname{%
  \bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
\expandafter\newcommand\csname bibstyle@author-year\endcsname{%
  \bibpunct{(}{)}{;}{a}{,}{,}}
%    \end{macrocode}
%
% ä¸‹é¢ä¿®æ”¹ \pkg{natbib} çš„å¼•ç”¨æ&nbsp;¼å¼ï¼Œä¸»è¦æ˜¯å°†é¡µç&nbsp;å†™åœ¨ä¸Šæ&nbsp;‡ä½ç½®ã€‚
% numeric æ¨¡å¼çš„ \cs{citet} çš„é¡µç&nbsp;ï¼š
%    \begin{macrocode}
\patchcmd\NAT@citexnum{%
  \@ifnum{\NAT@ctype=\z@}{%
    \if*#2*\else\NAT@cmt#2\fi
  }{}%
  \NAT@mbox{\NAT@@close}%
}{%
  \NAT@mbox{\NAT@@close}%
  \@ifnum{\NAT@ctype=\z@}{%
    \if*#2*\else\textsuperscript{#2}\fi
  }{}%
}{}{}
%    \end{macrocode}
%
% Numeric æ¨¡å¼çš„ \cs{citep} çš„é¡µç&nbsp;ï¼š
%    \begin{macrocode}
\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#3\fi}%
   \else #1\fi\endgroup}
%    \end{macrocode}
%
% Author-year æ¨¡å¼çš„ \cs{citet} çš„é¡µç&nbsp;ï¼š
%    \begin{macrocode}
\patchcmd{\NAT@citex}{%
  \if*#2*\else\NAT@cmt#2\fi
  \if\relax\NAT@date\relax\else\NAT@@close\fi
}{%
  \if\relax\NAT@date\relax\else\NAT@@close\fi
  \if*#2*\else\textsuperscript{#2}\fi
}{}{}
%    \end{macrocode}
%
% Author-year æ¨¡å¼çš„ \cs{citep} çš„é¡µç&nbsp;ï¼š
%    \begin{macrocode}
\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#3\fi}%
   \else #1\fi\endgroup}
%    \end{macrocode}
%
% åœ¨é¡ºåºç¼–ç&nbsp;åˆ¶ä¸‹ï¼Œ\pkg{natbib} åªæœ‰åœ¨ä¸‰ä¸ªä»¥ä¸Šè¿žç»­æ–‡çŒ®å¼•ç”¨æ‰ä¼šä½¿ç”¨è¿žæŽ¥å·ï¼Œ
% è¿™é‡Œä¿®æ”¹ä¸ºå…è®¸ä¸¤ä¸ªå¼•ç”¨ä½¿ç”¨è¿žæŽ¥å·ã€‚
%    \begin{macrocode}
\patchcmd{\NAT@citexnum}{%
  \ifx\NAT@last@yr\relax
    \def@NAT@last@yr{\@citea}%
  \else
    \def@NAT@last@yr{--\NAT@penalty}%
  \fi
}{%
  \def@NAT@last@yr{-\NAT@penalty}%
}{}{}
%    \end{macrocode}
%
% \subsection{é™„å½•}
% \label{sec:appendix}
% \begin{environment}{appendix}
% ä¸»è¦ç»™æœ¬ç§‘åšå¤–æ–‡ç¿»è¯‘ç”¨ã€‚
%    \begin{macrocode}
\let\nju@appendix\appendix
\renewenvironment{appendix}{%
  \let\title\nju@appendix@title
  \nju@appendix}{%
  \let\title\@gobble}
%    \end{macrocode}
% \end{environment}
%
% \begin{macro}{\title}
% æœ¬ç§‘å¤–æ–‡ç¿»è¯‘æ–‡ç«&nbsp;çš„æ&nbsp;‡é¢˜ï¼Œç”¨æ³•ï¼š\cs{title}\marg{èµ„æ–™æ&nbsp;‡é¢˜}ã€‚è¿™ä¸ªå‘½ä»¤åªèƒ½åœ¨é™„å½•çŽ¯
% å¢ƒä¸‹ä½¿ç”¨ã€‚
%    \begin{macrocode}
\let\title\@gobble
\newcommand{\nju@appendix@title}[1]{%
  \begin{center}
    \xiaosi[1.667] #1
  \end{center}}
%    \end{macrocode}
% \end{macro}
%
% \begin{environment}{translationbib}
% å¤–æ–‡èµ„æ–™çš„å‚è€ƒæ–‡ç”¨å®‹ä½“äº”å·å­—ï¼Œå–å›ºå®šè¡Œè·17ptï¼Œæ®µå‰åŽ3ptã€‚
%    \begin{macrocode}
\newlist{translationbib}{enumerate}{1}
\setlist[translationbib]{label=[\arabic*],align=left,nosep,itemsep=6bp,
  leftmargin=10mm,labelsep=!,before=\vspace{0.5\baselineskip}\wuhao[1.3]}
%    \end{macrocode}
% \end{environment}
%\marginpar{è¿™æ˜¯è¾¹æ³¨}
%
%\subsection{é¢œè‰²}
%    \begin{macrocode}
\RequirePackage{xcolor}
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\newcommand{\red}[1]{\textcolor{red}{#1}}
\newcommand{\redoverlay}[2]{\textcolor&lt;#2&gt;{red}{#1}}
\newcommand{\green}[1]{\textcolor{green}{#1}}
\newcommand{\greenoverlay}[2]{\textcolor&lt;#2&gt;{green}{#1}}
\newcommand{\blue}[1]{\textcolor{blue}{#1}}
\newcommand{\blueoverlay}[2]{\textcolor&lt;#2&gt;{blue}{#1}}
\newcommand{\purple}[1]{\textcolor{purple}{#1}}
\newcommand{\cyan}[1]{\textcolor{cyan}{#1}}
\newcommand{\teal}[1]{\textcolor{teal}{#1}}
\newcommand{\magenta}[1]{{\color{magenta}#1}}
\newcommand{\note}[2][Note]{{%
  \color{magenta}{\bfseries #1}\emph{#2}}}
%    \end{macrocode}
%
%\subsection{ä»£ç&nbsp;}
%    \begin{macrocode}
\RequirePackage{verbatim}
\RequirePackage{algorithm}
\RequirePackage{algpseudocode}
\newcommand{\pseduo}[2]{
\begin{algorithm}
	\caption{\textsc{#1}}
	\label{alg:#1}
	\begin{algorithmic}[1]
		#2
	\end{algorithmic}
\end{algorithm}
}
\RequirePackage{listings}
\lstdefinestyle{lstStyleBase}{%
   basicstyle=\small\ttfamily,
   aboveskip=\medskipamount,
   belowskip=\medskipamount,
   lineskip=0pt,
   boxpos=c,
   showlines=false,
   extendedchars=true,
   upquote=true,
   tabsize=2,
   showtabs=false,
   showspaces=false,
   showstringspaces=false,
   numbers=none,
   linewidth=\linewidth,
   xleftmargin=4pt,
   xrightmargin=0pt,
   resetmargins=false,
   breaklines=true,
   breakatwhitespace=false,
   breakindent=0pt,
   breakautoindent=true,
   columns=flexible,
   keepspaces=true,
   gobble=2,
   framesep=3pt,
   rulesep=1pt,
   framerule=1pt,
   backgroundcolor=\color{gray!5},
   stringstyle=\color{green!40!black!100},
   keywordstyle=\bfseries\color{blue!50!black},
   commentstyle=\slshape\color{black!60}
}

\newtcblisting{commandshell}{colback=black,colupper=white,colframe=yellow!75!black, listing only,listing options={style=tcblatex,language=sh},
every listing line={\textcolor{red}{\small\ttfamily\bfseries \$&gt;}}}

\lstdefinestyle{lstStyleShell}{%
   style=lstStyleBase,
   frame=l,
   rulecolor=\color{purple},
   language=bash}

\lstdefinestyle{lstStyleLaTeX}{%
   style=lstStyleBase,
   frame=l,
   rulecolor=\color{violet},
   language=[LaTeX]TeX}

\lstdefinestyle{lstStylecdisplay}{%
  style=lstStyleBase,
  frame=tb,
  rulecolor=\color{cyan},
  keywordstyle=\color{magenta}\bfseries\ttfamily,
  commentstyle=\color{codegreen}\ttfamily,
	stringstyle=\color{codepurple}\ttfamily\sffamily,
	backgroundcolor=\color{backcolour},
	captionpos=b,
	numbers=left,
	numberstyle=\footnotesize\color{codegray},
	stepnumber=1,
  numbersep=5pt,
  language=C
}

\lstdefinestyle{lstStylecpseudo}{%
  style=lstStyleBase,
  frame=none,
  keywordstyle=\color{magenta}\bfseries\ttfamily,
  commentstyle=\color{codegreen}\ttfamily,
	stringstyle=\color{codepurple}\ttfamily\sffamily,
	captionpos=b,
	numbers=left,
	numberstyle=\footnotesize\color{codegray},
	stepnumber=1,
  numbersep=5pt,
  language=C
}

\lstdefinestyle{lstStylecplus}{%
  style=lstStyleBase,
  frame=l,
  rulecolor=\color{blue},
  language=C++
}

\lstdefinestyle{lstStyleverilog}{%
  style=lstStyleBase,
  frame=l,
  rulecolor=\color{brown},
  language=verilog
}

\lstdefinestyle{lstStylepython}{%
  style=lstStyleBase,
  frame=l,
  rulecolor=\color{pink},
  language=python
}

\lstnewenvironment{code}{\lstset{style=lstStyleBase}}{}
\lstnewenvironment{latex}{\lstset{style=lstStyleLaTeX}}{}
\lstnewenvironment{shell}{\lstset{style=lstStyleShell}}{}
\lstnewenvironment{cdisplay}{\lstset{style=lstStylecdisplay}}{}
\lstnewenvironment{cplus}{\lstset{style=lstStylecplus}}{}
\lstnewenvironment{verilog}{\lstset{style=lstStyleverilog}}{}
\lstnewenvironment{python}{\lstset{style=lstStylepython}}{}
\lstnewenvironment{cpseudo}{\lstset{style=lstStylecpseudo}}{}
%    \end{macrocode}
%
% \subsection{å¿«é€Ÿæ’å…¥å›¾ç‰‡æˆ–å›¾è¡¨}
%    \begin{macrocode}
\newcommand{\figoptadd}[2]{
	\begin{figure}[H]
		\centering
		\includegraphics[#1]{figs/#2}
	\end{figure}
}

%%%%%%%%%%%%%%%%%%%%
\newcommand{\figoptaddcap}[3]{
	\begin{figure}[H]
		\centering
		\includegraphics[#1]{figs/#2}
		\caption{#3}
		\label{fig:#2}
	\end{figure}
}
%%%%%%%%%%%%%%%%%%%
\newcommand{\tabncc}[3]{
	\begin{table}[H]
		\centering
		\begin{tabular}{|*{#1}{c|}}
		\toprule
		#2\\
		\bottomrule
	\end{tabular}
	\caption{#3}
	\label{form:#3}
\end{table}}
%%%%%%%%%%%%%%%%%%%
\newcommand{\tabnc}[2]{
	\begin{table}[H]
		\centering
		\begin{tabular}{|*{#1}{c|}}
		\toprule
		#2\\
		\bottomrule
	\end{tabular}
\end{table}}
\newcommand{\tnl}{\tabularnewline\midrule}
%    \end{macrocode}
%
% \subsection{å€Ÿç”¨dtxæ–‡ä»¶ä»£ç&nbsp;}
%    \begin{macrocode}
\def\cmd#1{\cs{\expandafter\cmd@to@cs\string#1}}
\def\cmd@to@cs#1#2{\char\number`#2\relax}
\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
\newcommand*{\meta}[1]{{%
  \ensuremath{\langle}\rmfamily\itshape#1\/\ensuremath{\rangle}}}
\providecommand\marg[1]{%
  {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}}
\providecommand\oarg[1]{%
  {\ttfamily[}\meta{#1}{\ttfamily]}}
\providecommand\parg[1]{%
  {\ttfamily(}\meta{#1}{\ttfamily)}}
\providecommand\pkg[1]{{\sffamily#1}}
%    \end{macrocode}
% 
% \subsection{æ°´å°}
%    \begin{macrocode}
\RequirePackage{watermark}
\ifnju@draft
\AtEndOfClass{
	\watermark{% 
		\parbox[b][\paperheight]{\paperwidth}{% 
		\vfill 
		\centering% 
		\begin{tikzpicture}[remember picture,overlay] 
			\node [rotate=45,scale=10] at ($(current page.center) +(-1cm,1cm)$) 
			{\textcolor[gray]{0.8}{DRAFT}}; 
			\node [rotate=45,scale=3] at ($(current page.center) +(1cm,-1cm)$) 
			{\textcolor[gray]{0.75}{Compile time: \the\year - \the\month - \the\day}}; 
		\end{tikzpicture}% 
		\vfill 
		}
  }
}
\fi
%    \end{macrocode}
% è¡¥ä¸
%    \begin{macrocode}
\renewcommand{\thesection}{\arabic{section}}
\newcommand{\nchapter}[1]{
  {\let\clearpage\relax\par\vspace{1cm} \chapter*{\LARGE#1}}
}
\newcommand*{\rom}[1]{\expandafter\@slowromancap\romannumeral #1@}
%    \end{macrocode}
%
% \subsection{è‡ªå®šä¹‰ä»£ç&nbsp;}
%    \begin{macrocode}

\newcommand{\blankpage}{
	\clearpage
	\begin{titlepage}
		\null\vfil
		\begin{center}
			\textit{This page intentionally left blank.}
		\end{center}
	\end{titlepage}
}
\newcommand{\rmnum}[1]{\romannumeral #1}
\newcommand{\Rmnum}[1]{\expandafter\@slowromancap\romannumeral #1@}
%    \end{macrocode}
% \subsection{ç»“æŸéƒ¨åˆ†}
% \label{sec:finish}
%    \begin{macrocode}
\AtEndOfClass{\sloppy}
%    \end{macrocode}
%&lt;/cls&gt; 
%
%
%
% \iffalse
%    \begin{macrocode}
%&lt;*dtx-style&gt;
\ProvidesPackage{dtx-style}
\RequirePackage{hypdoc}
\RequirePackage{ifthen}
\RequirePackage[UTF8,scheme=chinese]{ctex}
\RequirePackage{newpxtext}
\RequirePackage{newpxmath}
\RequirePackage[
  top=2.5cm, bottom=2.5cm,
  left=4cm, right=2cm,marginparwidth=2.6cm,marginparsep=3mm,
  headsep=3mm]{geometry}
\RequirePackage{array,longtable,booktabs}
\RequirePackage{listings}
\RequirePackage{fancyhdr}
\RequirePackage{xcolor}
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\newcommand{\red}[1]{\textcolor{red}{#1}}
\newcommand{\redoverlay}[2]{\textcolor&lt;#2&gt;{red}{#1}}
\newcommand{\green}[1]{\textcolor{green}{#1}}
\newcommand{\greenoverlay}[2]{\textcolor&lt;#2&gt;{green}{#1}}
\newcommand{\blue}[1]{\textcolor{blue}{#1}}
\newcommand{\blueoverlay}[2]{\textcolor&lt;#2&gt;{blue}{#1}}
\newcommand{\purple}[1]{\textcolor{purple}{#1}}
\newcommand{\cyan}[1]{\textcolor{cyan}{#1}}
\newcommand{\teal}[1]{\textcolor{teal}{#1}}
\RequirePackage{enumitem}
\RequirePackage{etoolbox}
\RequirePackage{metalogo}
\RequirePackage{mathtools}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
\DeclareMathOperator{\Hamilton}{\hat{H}} 
\ifthenelse{\equal{\@nameuse{g__ctex_fontset_tl}}{mac}}{%
  \xeCJKsetwidth{â€˜â€™â€œâ€}{1em}
}{}

\colorlet{nju@macro}{blue!60!black}
\colorlet{nju@env}{blue!70!black}
\colorlet{nju@option}{purple}
\patchcmd{\PrintMacroName}{\MacroFont}{\MacroFont\bfseries\color{nju@macro}}{}{}
\patchcmd{\PrintDescribeMacro}{\MacroFont}{\MacroFont\bfseries\color{nju@macro}}{}{}
\patchcmd{\PrintDescribeEnv}{\MacroFont}{\MacroFont\bfseries\color{nju@env}}{}{}
\patchcmd{\PrintEnvName}{\MacroFont}{\MacroFont\bfseries\color{nju@env}}{}{}

\def\DescribeOption{%
  \leavevmode\@bsphack\begingroup\MakePrivateLetters%
  \Describe@Option}
\def\Describe@Option#1{\endgroup
  \marginpar{\raggedleft\PrintDescribeOption{#1}}%
  \nju@special@index{option}{#1}\@esphack\ignorespaces}
\def\PrintDescribeOption#1{\strut \MacroFont\bfseries\sffamily\color{nju@option} #1\ }
\def\nju@special@index#1#2{\@bsphack
  \begingroup
    \HD@target
    \let\HDorg@encapchar\encapchar
    \edef\encapchar usage{%
      \HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}%
    }%
    \index{#2\actualchar{\string\ttfamily\space#2}
           (#1)\encapchar usage}%
    \index{#1:\levelchar#2\actualchar
           {\string\ttfamily\space#2}\encapchar usage}%
  \endgroup
  \@esphack}

\lstdefinestyle{lstStyleBase}{%
   basicstyle=\small\ttfamily,
   aboveskip=\medskipamount,
   belowskip=\medskipamount,
   lineskip=0pt,
   boxpos=c,
   showlines=false,
   extendedchars=true,
   upquote=true,
   tabsize=2,
   showtabs=false,
   showspaces=false,
   showstringspaces=false,
   numbers=none,
   linewidth=\linewidth,
   xleftmargin=4pt,
   xrightmargin=0pt,
   resetmargins=false,
   breaklines=true,
   breakatwhitespace=false,
   breakindent=0pt,
   breakautoindent=true,
   columns=flexible,
   keepspaces=true,
   gobble=2,
   framesep=3pt,
   rulesep=1pt,
   framerule=1pt,
   backgroundcolor=\color{gray!5},
   stringstyle=\color{green!40!black!100},
   keywordstyle=\bfseries\color{blue!50!black},
   commentstyle=\slshape\color{black!60}}

\lstdefinestyle{lstStyleShell}{%
   style=lstStyleBase,
   frame=l,
   rulecolor=\color{purple},
   language=bash}

\lstdefinestyle{lstStyleLaTeX}{%
   style=lstStyleBase,
   frame=l,
   rulecolor=\color{violet},
   language=[LaTeX]TeX}
\lstdefinestyle{lstStylecplus}{%
   style=lstStyleBase,
   frame=l,
   rulecolor=\color{blue},
   language=C++
 }

\lstnewenvironment{latex}{\lstset{style=lstStyleLaTeX}}{}
\lstnewenvironment{shell}{\lstset{style=lstStyleShell}}{}
\lstnewenvironment{cplus}{\lstset{style=lstStylecplus}}{}

\setlist{nosep}

\DeclareDocumentCommand{\option}{m}{\textsf{#1}}
\DeclareDocumentCommand{\env}{m}{\texttt{#1}}
\DeclareDocumentCommand{\pkg}{s m}{%
  \texttt{#2}\IfBooleanF#1{\nju@special@index{package}{#2}}}
\DeclareDocumentCommand{\file}{s m}{%
  \texttt{#2}\IfBooleanF#1{\nju@special@index{file}{#2}}}
\newcommand{\myentry}[1]{%
  \marginpar{\raggedleft\color{purple}\bfseries\strut #1}}
\newcommand{\note}[2][Note]{{%
  \color{magenta}{\bfseries #1}\emph{#2}}}

\def\njurepo{\textsc{NJU}\-\textsc{repo}}
\def\thuthesis{\textsc{Thu}\-\textsc{Thesis}}
%&lt;/dtx-style&gt;
%    \end{macrocode}
% \fi
% \Finale
</pre></body></html>