\documentclass[
    TitleLength=1,% 选择标题行数,范围是1~3
]{njuthesis}

\addbibresource{njuthesis.bib}

\begin{document}

\maketitle

\begin{abstract}
    \zhlipsum[1,2][name=xiangyu]
    \keywords{驾驶;星际穿越}
\end{abstract}

\begin{englishabstract}
    \lipsum[1]
    % 英文关键词。关键词之间用英文半角逗号隔开,末尾无符号。
    \englishkeywords{Drive, Interstellar travel}
\end{englishabstract}

\tableofcontents

% 开始正文部分
\mainmatter

\chapter{绪论}
\section{简介}
南京大学学士学位论文\LaTeX 模板\cite{njuthesis}基于本科生院的论文撰写规范修改,用于生成符合南京大学学位论文排版要求和相应的国家规范、行业标准的学位论文。

此模板旨在为同学提供毕业论文书写的方便,如有模板问题或者版权问题,请于Github上提出issue。

\section{表格示例}
你可以使用\lstinline|table|环境插入标准三线表,代码如下:
\begin{lstlisting}[language=TeX]
\begin{table}[h]
    \caption{经过测试的环境}
    \begin{tabular}{ccc}
        \toprule
        OS & Tex & 测试情况 \\
        \midrule
        Windows 10 & TexLive 2021 & ✔ \\
        Windows 10 & MikTex & ✔ \\
        Windows 10 & TexLive 2020 & ✔  \\
        Ubuntu 20.04 & TexLive 2021 & ✔ \\
        南大Tex & Overleaf & ✔ \\
        \bottomrule
    \end{tabular}
\end{table}}
\end{lstlisting}
\begin{table}[h]
    \caption{经过测试的环境}
    % \label{tab:1}
    \begin{tabular}{ccc}
        \toprule
        OS & Tex & 测试情况 \\
        \midrule
        Windows 10 & TexLive 2021 & ✔ \\
        Windows 10 & MikTex & ✔ \\
        Windows 10 & TexLive 2020 & ✔  \\
        Ubuntu 20.04 & TexLive 2021 & ✔ \\
        南大Tex & Overleaf & ✔ \\
        \bottomrule
    \end{tabular}
\end{table}

\section{图片示例}
你可以使用\lstinline|figure|环境插入图片,代码如下:
\begin{lstlisting}[language=TeX]
\begin{figure}
    \centering
    \includegraphics[width=0.5\textwidth]{njuname}
    \caption{南京大学名称}
\end{figure}
\end{lstlisting}
\begin{figure}[htbp]
\centering
\includegraphics[width=0.5\textwidth]{njuname}
\caption{南京大学名称}
\end{figure}

\subsection{文字环绕图像}
% wrapfigure后面不能有空行
\begin{wrapfigure}{r}{0cm}
    % \label{fig:njulogo}
    \includegraphics[width=.3\textwidth]{njulogo}
    \caption{环绕图像测试}
\end{wrapfigure}
\zhlipsum[3][name=xiangyu]

\backmatter
\setcounter{secnumdepth}{-2}
\chapter*{致谢}
感谢\href{https://git.nju.edu.cn/nju-lug/lug-introduction}{NJU LUG}。

\printbibliography[heading=bibintoc, title=参考文献] % 方括号内的命令可以将参考文献列表加入目录
% \printindex

\end{document}