Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cloustile/njuthesis
  • GGbond/njuthesis
  • caomeng/njuthesis
  • yilye/njuthesis
  • kopanswer/njuthesis
  • Dansen/njuthesis
  • junjimy/njuthesis
  • wuqizuo123/njuthesis
  • zxlll-/njuthesis
  • Michael/njuthesis
  • bcbhfz/njuthesis
  • LingDu/njuthesis
  • jiejiangwu/njuthesis
  • Tilnel/njuthesisundergraduate
  • nju-lug/nju-latex-templates/njuthesis
15 results
Show changes
Showing
with 1883 additions and 485 deletions
\chapter{绪论}
\section{简介}
南京大学学位论文\hologo{LaTeX}模板\cite{njuthesis}基于本科生院的论文撰写规范制作,同时参考研究生院提供的硕士、博士学位材料包,用于生成符合南京大学学位论文排版要求和相应的国家规范、行业标准的学位论文。
此模板通过LPPL协议开源,旨在为同学提供毕业论文书写的方便,如有模板问题或者版权问题,请于Github上提出issue。
\section{开发环境}
本模板的开发维护主要在\hologo{MiKTeX}\hologo{TeX}\,Live\,2021下进行,内部代码主要由\lstinline|expl3|宏包提供的\hologo{LaTeX3}语法实现。
\section{目录结构}
\label{sec:directory}
\begin{lstlisting}[language=bash]
│ njuthesis.bib
│ njuthesis.cls
│ njuthesis.tex
├─figure
│ njulogo.pdf
│ njuname.pdf
└─profile
abstract.sty
components.sty
cover.sty
font.sty
packages.sty
page.sty
reference.sty
\end{lstlisting}
\subsection{文件说明}
\begin{description}
\item [\texttt{abstract.sty}] 定义中英文摘要环境及相关格式
\item [\texttt{components.sty}] 定义图片、表格、代码、数学环境样式
\item [\texttt{cover.sty}] 定义论文封面内容
\item [\texttt{font.sty}] 重定义CTeX宏集的默认字体,因为CTeX字体加粗要求不满足论文规定
\item [\texttt{package.sty}] 存放所有被引用的包
\item [\texttt{page.sty}] 定义正文页面、标题以及目录条目格式
\item [\texttt{reference.sty}] 定义引文格式
\end{description}
\section{自定义选项}
\label{sec:classoptions}
njuthesis类提供了若干个可以自定义的选项,如下所示。
\begin{description}
\item[\texttt{titlelength}] 标题长度,用于控制封面标题的行数。可选值为1、2、3,缺省值为1。
\item[\texttt{secondmentor}] 是否有第二导师,用于在封面和摘要添加第二导师,缺省值为false。
\item[\texttt{degree}] 学位类型,本科学位为g,即Undergraduate的缩写;学术型硕士学位为mg;硕士专业学位为mf;博士学位为d。
\item[\texttt{type}] 用于选择文档类型并将相关字段输出在封面和摘要页。可选值包括thesis(表示毕业论文)和design(表示毕业设计),缺省值为thesis。
\item[\texttt{systemfont}] 是否用系统字体,用于自动检测运行系统并使用预装字体,缺省值为true。
\item[\texttt{customlatinfont}] 用于选择自定义英文字符集。可选值包括windows, macos, gyre, null,缺省值为windows。
\item[\texttt{customchinesefont}] 用于选择自定义中文字符集。可选值包括windows, macos, fandol, founder, noto, null,缺省值为windows。
\end{description}
\chapter{页面布局}
本模板格式依照《11-南京大学毕业论文(设计)的撰写规范和装订要求》进行调整,文件内容详见\cref{chap:standard}
\section{封面页}
\subsection{封面格式}
\texttt{cover.sty}中定义了生成封面的相关命令
\subsection{文档类型}
如果编写的是毕业设计,请参考\cref{sec:classoptions},将Type选项改为design。
\subsection{多行标题}
为了使较长的论文题目也能美观地呈现在封面页上,njuthesis类提供了\texttt{TitleLength}这一选项,用于控制封面标题的行数。该命令已于\cref{sec:classoptions}进行介绍,可以在\texttt{njuthesis.tex}文件开头的类定义中找到,可选值为1、2、3,缺省值为单行标题。
\subsection{第二导师}
secondmentor 用于指定是否在封面打印第二导师
\subsection{输入个人信息}
\texttt{njusetup }定义了用于文档封面的诸多属性参数,
写作时修改相应字符串即可。
\subsubsection{论文标题}
\begin{description}
\item[\texttt{\textbackslash TitleA}] 单行标题,或多行标题的第一行。关于是否应该折行,单行能容纳的最长标题为\emph{15个中文字符},请自行选择合适的截断处。
\item[\texttt{\textbackslash TitleB}] 多行标题的第二行
\item[\texttt{\textbackslash TitleC}] 多行标题的第三行
\item[\texttt{\textbackslash Title\textunderscore EN}] 英文标题,注意空格要用波浪线(\textasciitilde)替代
\end{description}
\subsubsection{个人年级、学号、姓名}
\begin{description}
\item[\texttt{\textbackslash Grade}] 年级
\item[\texttt{\textbackslash StudentID}] 9位数字学号
\item[\texttt{\textbackslash StudentName}] 姓名
\item[\texttt{\textbackslash StudentName\textunderscore EN}] 姓名拼音
\end{description}
\subsubsection{就读院系专业}
\begin{description}
\item[\texttt{\textbackslash Department}] 学院名称
\item[\texttt{\textbackslash Department\textunderscore EN}] 学院英文名称
\item[\texttt{\textbackslash Major}] 专业名称
\item[\texttt{\textbackslash Major\textunderscore EN}] 专业英文名称
\end{description}
\subsubsection{导师信息}
注意标注A的为第一导师
\begin{description}
\item[\texttt{\textbackslash Mentor<A/B>}] 导师姓名
\item[\texttt{\textbackslash Mentor<A/B>\textunderscore EN}] 导师姓名的英文拼音
\item[\texttt{\textbackslash Mentor<A/B>Title}] 导师职称
\item[\texttt{\textbackslash Mentor<A/B>Title\textunderscore EN}] 导师职称英文
\end{description}
\subsubsection{提交日期}
\begin{description}
\item[\texttt{\textbackslash SubmitDate}] 论文提交日期
\end{description}
\section{摘要页}
\texttt{profile/abstract.sty}提供了摘要页格式的定义。
摘要页一般不插入目录,默认只添加pdf书签。如确实有插入目录的需求,请在\texttt{abstract.sty}文件中定位到如下语句
\begin{lstlisting}[language=TeX]
% \phantomsection\addcontentsline{toc}{chapter}{中文摘要}
\pdfbookmark[0]{中文摘要}{中文摘要}
\end{lstlisting}
将其修改为
\begin{lstlisting}[language=TeX]
\phantomsection\addcontentsline{toc}{chapter}{中文摘要}
% \pdfbookmark[0]{中文摘要}{中文摘要}
\end{lstlisting}
\section{目录页}
目录页格式定制于\texttt{profile/page.sty}
\section{正文}
正文格式定制于\texttt{profile/page.sty},页边距在\texttt{profile/packages.sty}
\section{参考文献页}
需要使用biber手动编译才会显示,具体内容参考\cref{chap:reference}
\section{致谢页}
致谢页采用无编号章节形式,需要手动插入目录
\begin{lstlisting}[language=TeX]
\chapter*{致谢}
\addcontentsline{toc}{chapter}{致谢}
\end{lstlisting}
\section{附录页}
附录放在\lstinline|\appendix|命令后,以英文字母进行编号
\chapter{数学公式与定理}
\section{公式示例}
\begin{equation}\label{eq:dewitt}
\int \mathrm{e}^{ax} \tanh {bx} \, \mathrm{d}x =
\begin{dcases}
\begin{multlined}
\frac{\mathrm{e}^{(a+2b)x}}{(a + 2b)} \,
{{}_2F_1} \left( 1 + \frac{a}{2b}, 1, 2+\frac{a}{2b}, -\mathrm{e}^{2bx} \right) \\
- \frac{1}{a} \mathrm{e}^{ax} \, {{}_2F_1} \left( 1, \frac{a}{2b}, 1 + \frac{a}{2b}, -\mathrm{e}^{2bx} \right)
\end{multlined}
& a \ne b \\
\frac{e^{ax} - 2 \tan^{-1}(\mathrm{e}^{ax})}{a} & a = b
\end{dcases}
\end{equation}
你可以使用\lstinline|equation|环境插入公式,如\cref{eq:dewitt},代码如下:
\begin{lstlisting}[style=LaTeX]
\begin{equation}\label{eq:dewitt}
\int \mathrm{e}^{ax} \tanh {bx} \, \mathrm{d}x =
\begin{dcases}
\begin{multlined}
\frac{\mathrm{e}^{(a+2b)x}}{(a + 2b)} \,
{{}_2F_1} \left( 1 + \frac{a}{2b}, 1, 2+\frac{a}{2b}, -\mathrm{e}^{2bx} \right) \\
- \frac{1}{a} \mathrm{e}^{ax} \, {{}_2F_1} \left( 1, \frac{a}{2b}, 1 + \frac{a}{2b}, -\mathrm{e}^{2bx} \right)
\end{multlined}
& a \ne b \\
\frac{e^{ax} - 2 \tan^{-1}(\mathrm{e}^{ax})}{a} & a = b
\end{dcases}
\end{equation}
\end{lstlisting}
使用mathtools包会与unicode-math包产生一些命令的冲突,直接引用会输出以下两条警告
\begin{lstlisting}
Using \overbracket and \underbracket from `mathtools' package. Use \Uoverbracket and \Uunderbracket for original `unicode-math' definition.
I'm going to overwrite the following commands from the `mathtools' package: \dblcolon, \coloneqq, \Coloneqq, \eqqcolon.
\end{lstlisting}
这些警告已被手动抑制。
\section{定理环境}
\begin{proof}
证明我是我
\end{proof}
\begin{definition}[他人]
定义他人即地狱
\end{definition}
全部数学环境如下所示
\begin{table}[htbp]
\caption{数学环境}
\label{tab:mathenv}
\begin{tabular}{cc}
\toprule
标签 & 名称 \\
\midrule
algorithm & 算法 \\
assumption & 假设 \\
axiom & 公理 \\
conclusion & 结论 \\
condition & 条件 \\
corollary & 推论 \\
definition & 定义 \\
example &\\
lemma & 引理 \\
proof & 证明 \\
property & 性质 \\
proposition & 命题 \\
remark & 注解 \\
theorem & 定理 \\
\bottomrule
\end{tabular}
\end{table}
\chapter{引用和超链接}
\label{chap:reference}
\hologo{LaTeX}的一大优势在于可以自动生成带超链接的引用条目。
\section{超链接}
\section{文档内容的引用}
使用\lstinline|cleveref|宏包实现了带图、表等项目名称的智能引用,仅需使用\lstinline|\cref{<label>}|命令。相关定义位于\lstinline|profile/reference.sty|。
\subsection{图片}
\lstinline|\href{<url>}{<名称>}|
\subsection{图片}
\lstinline|\label{tab:mytab}|
\subsection{表格}
\lstinline|\label{fig:myfig}|
\subsection{公式}
\lstinline|\label{eq:myeq}|
\subsection{其他数学环境}
\lstinline|\label{def:mydef}|
\subsection{章节}
\lstinline|\label{sec:mysec}|
This diff is collapsed.
File added
File added
File added
File added
@article{preskill2018,
title = {Quantum {{Computing}} in the {{NISQ}} Era and Beyond},
author = {Preskill, John},
author+an = {1=thesisauthor},
date = {2018-08-06},
journaltitle = {Quantum},
volume = {2},
pages = {79},
publisher = {{Verein zur Förderung des Open Access Publizierens in den Quantenwissenschaften}},
doi = {10.22331/q-2018-08-06-79},
url = {https://quantum-journal.org/papers/q-2018-08-06-79/},
urldate = {2022-10-27},
langid = {british}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% njuthesis 示例模板 v1.4.2 2024-11-08
% https://github.com/nju-lug/NJUThesis
%
% 贡献者
% Yu XIONG @atxy-blip Yichen ZHAO @FengChendian
% Song GAO @myandeg Chang MA @glatavento
% Yilun SUN @HermitSun Yinfeng LIN @linyinfeng
% Yukai Chou @Muzimuzhi
%
% 许可证
% LaTeX Project Public License(版本 1.3c 或更高)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------------------------------------------------------
% 一些提升使用体验的小技巧:
% 1. 请务必使用 UTF-8 编码编写和保存本文档
% 2. 请务必使用 XeLaTeX 或 LuaLaTeX 引擎进行编译
% 3. 不保证接口稳定,写作前一定要留意版本号
% 4. 以百分号(%)开头的内容为注释,可以随意删除
%---------------------------------------------------------------------
%---------------------------------------------------------------------
% 请先阅读使用手册:
% http://mirrors.ctan.org/macros/unicodetex/latex/njuthesis/njuthesis.pdf
%---------------------------------------------------------------------
\documentclass[
% 模板选项(注意右端逗号):
%
% type = bachelor|master|doctor|postdoc, % 文档类型,默认为本科生
% degree = academic|professional, % 学位类型,默认为学术型
%
% nl-cover, % 是否需要国家图书馆封面,默认关闭
% decl-page, % 是否需要诚信承诺书或原创性声明,默认关闭
%
% 页面模式,详见手册说明
% draft, % 开启草稿模式
% anonymous, % 开启盲审模式
% minimal, % 开启最小化模式
%
% 单双面模式,默认为适合印刷的双面模式
% oneside, % 单面模式,无空白页
% twoside, % 双面模式,每一章从奇数页开始
%
% 字体设置,不填写则自动调用系统预装字体,详见手册
% fontset = win|mac|macoffice|fandol|none,
]{njuthesis}
% 模板选项设置,包括个人信息、外观样式等
% 较为冗长且一般不需要反复修改,我们把它放在单独的文件里
\input{njuthesis-setup.def}
% 自行载入所需宏包
% \usepackage{subcaption} % 嵌套小幅图像,比 subfig 和 subfigure 更新更好
% \usepackage{siunitx} % 标准单位符号
% \usepackage{physics} % 物理百宝箱
% \usepackage[version=4]{mhchem} % 绘制分子式
% \usepackage{listings} % 展示代码
% \usepackage{algorithm,algorithmic} % 展示算法伪代码
% 在导言区随意定制所需命令
% \DeclareMathOperator{\spn}{span}
% \NewDocumentCommand\mathbi{m}{\textbf{\em #1}}
% 开始编写论文
\begin{document}
%---------------------------------------------------------------------
% 封面、摘要、前言和目录
%---------------------------------------------------------------------
% 生成封面页
\maketitle
% 模板默认使用 \flushbottom,即底部平齐
% 效果更好,但可能出现 underfull \vbox 信息
% 以下命令用于抑制这些信息
\raggedbottom
\begin{abstract}
中文摘要
\end{abstract}
\begin{abstract*}
English abstract
\end{abstract*}
% 生成目录
\tableofcontents
% 生成图片清单
% \listoffigures
% 生成表格清单
% \listoftables
%---------------------------------------------------------------------
% 正文部分
%---------------------------------------------------------------------
\mainmatter
% 符号表
% 语法与 description 环境一致
% 两个可选参数依次为说明区域宽度、符号区域宽度
% 带星号的符号表(notation*)不会插入目录
% \begin{notation}[10cm]
% \item[DFT] 密度泛函理论 (Density functional theory)
% \item[DMRG] 密度矩阵重正化群 (Density-Matrix Reformation-Group)
% \end{notation}
% 建议将论文内容拆分为多个文件
% 即新建一个 chapters 文件夹
% 把每一章的内容单独放入一个 .tex 文件
% 然后在这里用 \include 导入,例如
% \include{chapters/introduction}
% \include{chapters/environments}
\chapter{引言}
\section{量子计算}
John Preskill 认为我们现在处于“含噪声的中型量子时代”。\cite{preskill2018}
量子位的不稳定性和有限的量子比特数量限制了量子计算机的复杂度和纠错能力。
%---------------------------------------------------------------------
% 参考文献
%---------------------------------------------------------------------
% 生成参考文献页
\printbibliography
%---------------------------------------------------------------------
% 致谢
%---------------------------------------------------------------------
\begin{acknowledgement}
感谢 \href{https://git.nju.edu.cn/nju-lug/lug-introduction}{LUG@NJU}
\end{acknowledgement}
%---------------------------------------------------------------------
% 学术简历
%---------------------------------------------------------------------
% 详见手册中“成果列表”一节
% \njuchapter{学术成果}
% \njupaperlist[攻读博士学位期间发表的学术论文]{preskill2018}
%---------------------------------------------------------------------
% 附录部分
%---------------------------------------------------------------------
% 附录部分使用单独的字母序号
\appendix
% 可以在这里插入补充材料
\chapter{正文中涉及的数据及源代码}
\dots
% 完工
\end{document}
% njuthesis 参数设置文件 v1.4.2 2024-11-08
% 一些提醒:
% 1. \njusetup 内部千万不要有空行
% 2. 使用英文半角逗号(,)分隔选项
% 3. 等于号(=)两侧的空格会被忽略
% 3.1. 为避免歧义,请用花括号({})包裹内容
% 4. 本科生无需填写的项目已被特别标注
% 5. 可以尽情删除本注释
% info 类用于录入个人信息
% 带*号的为对应英文字段
\njusetup[info]{
title = {第一行标题\\第二行标题\\第三行标题},
% 中文题目
% 直接填写标题就是自动换行
% 可以使用换行控制符(\\)手动指定换行位置
%
title* = {My Title in English},
% 英文题目
%
author = {姓名},
% 作者姓名
%
author* = {Ming Xing},
% 作者英文姓名
% 一般使用拼音
%
keywords = {我,就是,充数的,关键词},
% 中文关键词列表
% 使用英文半角逗号(,)分隔
%
keywords* = {Dummy,Keywords,Here,{It Is}},
% 英文关键词
% 使用英文半角逗号(,)分隔
%
grade = {2018},
% 年级
%
student-id = {181850195},
% 学号或工号
% 研究生请斟酌大小写字母格式
% 本模板并不会自动更正大小写
%
department = {化学化工学院},
department* = {School of Chemistry and Chemical Engineering},
% 院系
%
major = {化学},
major* = {Chemistry},
% 专业
%
% major = {封面专业,摘要专业},
% 研究生专业型学位可能遇到两处内容不一致的情况
%
supervisor = {导师姓名,教授},
supervisor*= {Professor My Supervisor},
% 导师全称
% 使用英文半角逗号(,)分隔中文姓名和职称
%
% supervisor-ii = {第二导师姓名,副教授},
% supervisor-ii* = {Associate professor My Second Supervisor},
% 第二导师全称
% 如果确实没有第二导师,不填写即可
%
submit-date = {2022-05-20},
% 提交日期
% 格式为 yyyy-mm-dd
% 不填就是编译当天日期
%
%
% 以下均为研究生项
%
% degree = {工程硕士},
% degree* = {Master of Engineering},
% 覆盖默认学位名称
%
field = {物理化学},
field* = {Physical Chemistry},
% 研究领域
%
chairman = {某某某~教授},
% 答辩委员会主席
% 推荐使用波浪号(~)分隔姓名和职称
%
reviewer = {
某某某~教授,
某某某~教授
},
%
% 答辩委员会成员
% 一般为四名,使用英文半角逗号(,)分隔
%
clc = {O643.12},
% 中国图书分类号
%
udc = {544.4},
% 国际图书分类号
%
secret-level = {公开},
% 密级
%
defend-date = {2022-05-21},
% 答辩日期
% 格式为 yyyy-mm-dd
% 不填就是编译当天日期
%
email = {xyz@smail.nju.edu.cn},
% 电子邮箱地址
% 只用于出版授权书
%
%
% 以下用于国家图书馆封面
confer-date = {2022-05-22},
% 学位授予日期
%
bottom-date = {2022-05-23},
% 封面底部日期
%
supervisor-contact = {
南京大学~
江苏省南京市栖霞区仙林大道163号
}
% 导师联系方式
}
% bib 类用于参考文献设置
\njusetup[bib]{
% style = numeric|author-year,
% 参考文献样式
% 默认为顺序编码制(numeric)
% 可选著者-出版年制(author-year)
%
resource = {njuthesis-sample.bib},
% 参考文献数据源
% 需要带扩展名的完整文件名
% 可使用逗号分隔多个文件
% 此条等效于 \addbibresource 命令
%
% option = {
% doi = false,
% isbn = false,
% url = false,
% eprint = false,
% 关闭部分无用文献信息
%
% refsection = chapter,
% 将参考文献表置于每章后
%
% gbnamefmt = lowercase
% 使用仅首字母大写的姓名
% }
% 额外的 biblatex 宏包选项
}
% image 类用于载入外置的图片
\njusetup[image]{
% path = {{./figure/}{./image/}},
% 图片搜索路径
%
nju-emblem = {nju-emblem},
nju-name = {nju-name},
% 校徽和校名图片路径
% 建议使用 PDF 格式的矢量图
% 使用外置图片有助于减少编译时间
% 空置时会自动使用 njuvisual 宏包绘制
%
% nju-emblem = {nju-emblem-purple},
% nju-name = {nju-name-purple},
% 替换为紫色版本
% 这个选项只能填写一次
% 切换时要注释掉上方的黑色版本
}
% abstract 类用于设置摘要样式
\njusetup[abstract]{
toc-entry = false,
% 摘要是否显示在目录条目中
%
% underline = false,
% 研究生英文摘要页条目内容是否添加下划线
%
% title-style = strict|centered|natural
% 研究生摘要标题样式,详见手册
}
% 目录自身是否显示在目录条目中
\njusetup{
% tableofcontents/toc-entry = false,
% listoffigures/toc-entry = false,
% listoftables/toc-entry = false
}
% 为目录中的章标题添加引导线
\njusetup[tableofcontents/dotline]{chapter}
% math 类用于设置数学符号样式,功能详见手册
\njusetup[math]{
% style = TeX|ISO|GB,
% 整体风格,缺省值为国标(GB)
% 相当于自动设置以下若干项
%
% integral = upright|slanted,
% integral-limits = true|false,
% less-than-or-equal = slanted|horizontal,
% math-ellipsis = centered|lower,
% partial = upright|italic,
% real-part = roman|fraktur,
% vector = boldfont|arrow,
% uppercase-greek = upright|italic
}
% theorem 类用于设置定理类环境样式,功能详见手册
\njusetup[theorem]{
% define,
% 默认创建内置的七种定理环境
%
% style = remark,
% header-font = \sffamily \bfseries,
% body-font = \normalfont,
% qed-symbol = \ensuremath { \male },
% counter = section,
% share-counter = true,
% type = {...}
% 以上设置项在重新调用 theorem/define 后生效
}
% footnote 类用于设置脚注样式,功能详见手册
\njusetup[footnote]{
% style = pifont|circled,
% 使用圈码编号
%
% hang = false,
% 不使用悬挂缩进
}
% 页眉页脚内容设置
\njusetup{
% header/content = {
% {OR}{\thepage},{OL}{\rightmark},
% {EL}{\thepage},{ER}{\leftmark}
% },
% 页眉设置,详见手册
% 奇数页页眉:左侧章名,右侧页码
% 偶数页页眉:左侧页码,右侧节名
%
% footer/content = {}
}
% 页眉页脚的字体样式
% \njusetformat{header}{\small\kaishu}
% \njusetformat{footer}{}
% 在盲审模式下隐藏学校信息
% \njusetup{anonymous-mode/no-nju}
% 一些灵活调整
% \njusetname{type}{本科毕业设计} % 我做的是毕业设计
% \njusetname{notation}{术语表} % 更改符号表名称
% \njusetlength{crulewd}{240pt} % 加长封面页下划线
% \njusetformat{tabular}{\zihao{-4}\bfseries} % 修改表格环境的字号
% \EditInstance{nju}{u/cover/emblem-img}{align=l} % 左对齐的本科生封面校徽
File deleted
figure/njuname-large.jpg

798 KiB

File deleted
#!/usr/bin/env sh
mkdir -p mythesis
cd mythesis
cp -f ../docs/njuthesis-sample.tex .
cp -f ../docs/njuthesis-sample.bib .
cp -f ../docs/njuthesis-setup.def .
cp -f ../docs/nju-emblem*.pdf .
cp -f ../docs/nju-name*.pdf .
cp -f ../source/njuthesis.dtx .
xetex njuthesis.dtx > /dev/null
rm *.dtx
rm *.ins
rm *.log
rm njuthesis-doc.cls
cd ..
@ECHO OFF
MKDIR "mythesis"
CD "mythesis"
COPY /Y "..\docs\njuthesis-sample.tex" .
COPY /Y "..\docs\njuthesis-sample.bib" .
COPY /Y "..\docs\njuthesis-setup.def" .
COPY /Y "..\docs\nju-emblem*.pdf" .
COPY /Y "..\docs\nju-name*.pdf" .
COPY /Y "..\source\njuthesis.dtx" .
xetex "njuthesis.dtx" > NUL
DEL "*.dtx"
DEL "*.ins"
DEL "*.log"
DEL "njuthesis-doc.cls"
CD ..
@ARTICLE{njuthesis,
title = {南京大学学士学位论文 LaTeX 模板},
AUTHOR = {NJU-LUG},
JOURNALTITLE = {Github},
YEAR = {2021}
}
\NeedsTeXFormat{LaTeX2e}
\ProvidesExplClass{njuthesis}{2021-09-11}{0.6.0}{NJU Thesis LaTeX Template}
% 通过类传递参数
\RequirePackage{l3keys2e}
\LoadClass[
a4paper,
twoside,
UTF8,
scheme=chinese,
linespread=1.625,% laTex默认1.2行距,word默认行距是1.3,要求1.5倍word行距,故1.5/1.2*1.3 = 1.625
fontset=none,
zihao=-4
]{ctexbook}[2018/04/01]
% 定义模板键值
% 用于格式控制的键值
\keys_define:nn { nju }
{
titlelength .int_set:N = \nju_titlelength,
titlelength .initial:n = 1,
secondmentor .bool_set:N = \nju_second_mentor,
secondmentor .initial:n = false,
degree .tl_set:N = \nju_degree,
degree .initial:n = UG,
type .tl_set:N = \nju_type,
type .initial:n = thesis,
systemfont .bool_set:N = \nju_systemfont,
systemfont .initial:n = true,
customlatinfont .tl_set:N = \nju_customlatinfont,
customlatinfont .initial:n = windows,
customchinesefont .tl_set:N = \nju_customchinesefont,
customchinesefont .initial:n = windows,
info .meta:nn = { nju / info } { #1 }
}
\keys_define:nn { nju / info }
{
% 题目
TitleA .tl_set:N = \nju_title_a,
TitleB .tl_set:N = \nju_title_b,
TitleC .tl_set:N = \nju_title_c,
TitleEN .tl_set:N = \nju_title_en,
% 年级学号姓名
Grade .tl_set:N = \nju_grade,
StudentID .tl_set:N = \nju_student_id,
StudentName .tl_set:N = \nju_student_name,
StudentNameEN .tl_set:N = \nju_student_name_en,
% 院系专业方向
Department .tl_set:N = \nju_department,
DepartmentEN .tl_set:N = \nju_department_en,
Major .tl_set:N = \nju_major,
MajorEN .tl_set:N = \nju_major_en,
Field .tl_set:N = \nju_field,
FieldEN .tl_set:N = \nju_field_en,
% 导师
MentorA .tl_set:N = \nju_mentor_a,
MentorAEN .tl_set:N = \nju_mentor_a_en,
MentorATitle .tl_set:N = \nju_mentor_a_title,
MentorATitleEN .tl_set:N = \nju_mentor_a_title_en,
% 第二导师
MentorB .tl_set:N = \nju_mentor_b,
MentorBEN .tl_set:N = \nju_mentor_b_en,
MentorBTitle .tl_set:N = \nju_mentor_b_title,
MentorBTitleEN .tl_set:N = \nju_mentor_b_title_en,
% 日期
SubmitDate .tl_set:N = \nju_submit_date,
DefenseDate .tl_set:N = \nju_defense_date,
}
\NewDocumentCommand \njusetup { m }
{ \keys_set:nn { nju } { #1 } }
\ProcessKeysOptions { nju }
% 输入配置文件
\RequirePackage{profile/packages}
\RequirePackage{profile/font}
\RequirePackage{profile/page}
\RequirePackage{profile/reference}
\RequirePackage{profile/components}
\RequirePackage{profile/cover}
\RequirePackage{profile/abstract}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NJU Thesis
% 南京大学毕业论文LaTeX模板
% Version 0.7.1 (2021-09-11)
%
% 请关注项目地址以获取最新变化
% https://github.com/nju-lug/NJUThesis
% https://git.nju.edu.cn/nju-lug/nju-latex-templates/
%
% 贡献者
% @atxy @FengChendian @myandeg
% @glatavento @HermitSun @linyinfeng
%
% 许可证
% LaTeX Project Public License(版本 1.3c 或更高)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[
titlelength=2,% 选择标题行数,范围是1~3
secondmentor=true,% 有第二导师请取消注释此项
degree=mg,% ug: 本科, mg: 学硕, mf: 专硕, d: 博士
type=thesis,% thesis: 毕业论文,design: 毕业设计
% systemfont=false,% 自定义字体请取消注释此项
% customlatinfont=windows,% 设置英文字符集
% customchinesefont=windows,% 设置中文字符集
]{njuthesis}
% 设置个人信息
\njusetup {
% 注意不要有空行,否则可能报错
info = {
% 题目
TitleA = 一种使用南京大学\hologo{LaTeX}模版,
TitleB = 编写毕业论文的经验性方法,
% TitleC = 没有第三行就不用填这个哦,
TitleEN = An~Empirical~Way~of~Composing~Thesis~with~NJU~\hologo{LaTeX}~Template, %注意英文名中空格必须替换为波浪线
% 姓名学号
Grade = 2018,
StudentID = 181114514,
StudentName = 周煜华,
StudentNameEN = Zhou~Yuhua,
% 院系专业
Department = 拉太赫科学与技术学院,
DepartmentEN = School~of~\hologo{LaTeX},
Major = 拉太赫语言学,
MajorEN = \hologo{LaTeX}~Linguistics,
Field = 拉太赫语言在现当代的使用,
FieldEN = Contemporary~Usage~of~the~\hologo{LaTeX}~Language,
% 导师
MentorA = 李成殿,
MentorAEN= Li~Chengdian,
MentorATitle = 教授,
MentorATitleEN = Professor,
% 第二导师
MentorB = 孙赫弥,
MentorBEN = Sun~Hemi,
MentorBTitle = 副教授,
MentorBTitleEN = Associate professor,
% 日期
SubmitDate = 2021年8月10日,
DefenseDate = 2021年9月19日,
}
}
% 导入参考文献源
\addbibresource{njuthesis.bib}
\begin{document}
%----------------------------------------
% 封面、摘要和目录
%----------------------------------------
\maketitle
\input{chapters/Abstract.tex}
\tableofcontents
%----------------------------------------
% 正文部分
%----------------------------------------
\mainmatter
\input{chapters/Introduction.tex}
\input{chapters/Environments.tex}
\input{chapters/Layout.tex}
\input{chapters/FigTabCode.tex}
\input{chapters/Mathematics.tex}
\input{chapters/Reference.tex}
\input{chapters/Bibliography.tex}
%----------------------------------------
% 参考文献
%----------------------------------------
\printbibliography[
heading=bibintoc,% 插入目录条目
title=参考文献]
%----------------------------------------
% 致谢
%----------------------------------------
\input{chapters/Acknowledgement.tex}
%----------------------------------------
% 附录部分
%----------------------------------------
\appendix
\input{chapters/Standard.tex}
\end{document}