Skip to content
Snippets Groups Projects
njuthesis.tex 5.73 KiB
Newer Older
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NJU Thesis Undergraduate
% 南京大学本科生毕业论文LaTeX模板
% Version 0.1 (2021/09/07)
%
% 请关注项目地址以获取最新变化
% https://github.com/nju-lug/NJUThesisUndergraduate
% https://git.nju.edu.cn/nju-lug/nju-latex-templates/njuthesisundergraduate
%
% 贡献者
% @atxy
% @FengChendian
% @HermitSun
% @glatavento
% 
% 许可证
% LaTeX Project Public License(版本 1.3c 或更高)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Yichen Zhao's avatar
Yichen Zhao committed
\documentclass[
Yu Xiong's avatar
Yu Xiong committed
    TitleLength=1,% 选择标题行数,范围是1~3
    Degree=UG,% 学位 本科:UG
    Type=thesis% thesis:毕业论文,design:毕业设计
Yichen Zhao's avatar
Yichen Zhao committed
]{njuthesis}
% 导入参考文献源
\addbibresource{njuthesis.bib}
Yichen Zhao's avatar
Yichen Zhao committed

Yichen Zhao's avatar
Yichen Zhao committed
\begin{document}
Yichen Zhao's avatar
Yichen Zhao committed

%----------------------------------------------------------------------------------------
%	封面、摘要和目录
%----------------------------------------------------------------------------------------

\maketitle % 请在coverpage.sty输入封面信息

\begin{abstract}
Yu Xiong's avatar
Yu Xiong committed
    \zhlipsum[76][name=zhufu]
Yu Xiong's avatar
Yu Xiong committed
    \keywords{驾驶;星际穿越}
\end{abstract}

\begin{englishabstract}
    % 英文关键词。关键词之间用英文半角逗号隔开,末尾无符号。
Yu Xiong's avatar
Yu Xiong committed
    \englishkeywords{Drive, Interstellar travel}
\end{englishabstract}

\tableofcontents
%----------------------------------------------------------------------------------------
%	正文部分
%----------------------------------------------------------------------------------------
Yichen Zhao's avatar
Yichen Zhao committed
\mainmatter

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

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

Yu Xiong's avatar
Yu Xiong committed
\begin{table}[htbp]
    \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}
你可以使用\lstinline|table|环境插入标准三线表,如\cref{tab:mytab}所示,代码如下:
\begin{lstlisting}[language=TeX]
Yu Xiong's avatar
Yu Xiong committed
\begin{table}[htbp]
    \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{lstlisting}
\begin{figure}[htbp]
    \includegraphics[width=0.5\textwidth]{njuname}
    \caption{南京大学名称}
你可以使用\lstinline|figure|环境插入图片,如\cref{fig:njuname},代码如下:
\begin{lstlisting}[language=TeX]
\begin{figure}
    \includegraphics[width=0.5\textwidth]{njuname}
    \caption{南京大学名称}
\end{figure}
\end{lstlisting}

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

你可以使用\lstinline|wrapfigure|环境插入图片,类似于\cref{sec:figures}的普通图片插入方法,代码如下:
\begin{lstlisting}[language=TeX]
\begin{wrapfigure}{r}{0cm}
    \includegraphics[width=.3\textwidth]{njulogo}
    \caption{环绕图像测试}
\end{wrapfigure}
\end{lstlisting}
\section{公式示例}
\begin{equation}\label{eq:dewitt}
    \int  e^{ax} \tanh bx\ dx = 
    \begin{cases}
    \displaystyle{ \frac{ e^{(a+2b)x}}{(a+2b)} 
    {_2F_1}\left[ 1+\frac{a}{2b},1,2+\frac{a}{2b}, -e^{2bx}\right] }& \\
    \displaystyle{
    \hspace{1cm}-\frac{1}{a}e^{ax}{_2F_1}\left[ 1, \frac{a}{2b},1+\frac{a}{2b}, -e^{2bx}\right]
    }
     & a\ne b \\
    \displaystyle{\frac{e^{ax}-2\tan^{-1}[e^{ax}]}{a} } & a = b
    \end{cases}
\end{equation}
    
你可以使用\lstinline|equation|环境插入公式,如\cref{eq:dewitt},代码如下:
\begin{lstlisting}[language=TeX]
\begin{equation}\label{eq:dewitt}
    \int  e^{ax} \tanh bx\ dx = 
    \begin{cases}
    \displaystyle{ \frac{ e^{(a+2b)x}}{(a+2b)} 
    {_2F_1}\left[ 1+\frac{a}{2b},1,2+\frac{a}{2b}, -e^{2bx}\right] }& \\
    \displaystyle{
    \hspace{1cm}-\frac{1}{a}e^{ax}{_2F_1}\left[ 1, \frac{a}{2b},1+\frac{a}{2b}, -e^{2bx}\right]
    }
        & a\ne b \\
    \displaystyle{\frac{e^{ax}-2\tan^{-1}[e^{ax}]}{a} } & a = b
    \end{cases}
\end{equation}
\end{lstlisting}

%----------------------------------------------------------------------------------------
Yu Xiong's avatar
Yu Xiong committed
%	参考文献
%----------------------------------------------------------------------------------------

Yu Xiong's avatar
Yu Xiong committed
\printbibliography[heading=bibintoc, title=参考文献] % 输出参考文献列表并将本页插入目录条目
%----------------------------------------------------------------------------------------
Yu Xiong's avatar
Yu Xiong committed
%	致谢
%----------------------------------------------------------------------------------------

Yu Xiong's avatar
Yu Xiong committed
% \chapter*{致谢}
% \addcontentsline{toc}{chapter}{致谢}
% 感谢\href{https://git.nju.edu.cn/nju-lug/lug-introduction}{NJU LUG}。
%----------------------------------------------------------------------------------------
%	附录部分
%----------------------------------------------------------------------------------------
Yu Xiong's avatar
Yu Xiong committed
\appendix 

Yichen Zhao's avatar
Yichen Zhao committed
\end{document}