Nanjing University thesis (njuthesis)
Thesis class for Nanjing University covering bachelor's, master's and doctoral theses and postdoctoral reports, with Chinese and English covers and abstracts; it requires XeLaTeX or LuaLaTeX.
Create an account to use this
- Category
- Thesis
- Document class
njuthesis(njuthesis.cls) — ships with TeX Live- Workflow
- Thesis / dissertation — submissions and revision rounds
- Author
- Yu Xiong, Yichen Zhao
- Source
- CTAN
- Licence
- njuthesis.cls: The LaTeX Project Public License 1.3c. Sample text: Manulyx, CC0 1.0 (free to use, no conditions).
What you get
main.tex— the file that is compiled · 4 KBreferences.bib· 342 B
These become your files. Editing them afterwards changes your project and nothing else — a project owns its files from the moment it is made.
Source
main.tex — the file that is compiled · 4 KB
% 南京大学学位论文 / Nanjing University thesis on njuthesis.cls. Build with XeLaTeX and biber.
% type = bachelor | master | doctor | postdoc; degree = academic | professional.
% fontset = fandol uses the Fandol and TeX Gyre fonts in TeX Live; switch to fontset = win
% when the Windows fonts are available. The class loads biblatex (GB/T 7714-2015) itself.
\documentclass[type=master,degree=academic,fontset=fandol]{njuthesis}
\njusetup{
info = {
title = {Your paper},
title* = {Your paper},
keywords = {信息论, 熵, 学位论文},
keywords* = {information theory, entropy, thesis},
grade = {2024},
student-id = {000000000},
author = {作者姓名},
author* = {Author Name},
department = {某某学院},
department* = {School of Example Studies},
major = {计算机科学与技术},
major* = {Computer Science and Technology},
field = {信息论},
field* = {Information Theory},
supervisor = {导师姓名, 教授},
supervisor* = {Professor Supervisor Name},
submit-date = {2027-05-20},
defend-date = {2027-06-01},
clc = {TP301},
udc = {004},
secret-level = {公开},
chairman = {主席姓名~教授},
reviewer = {委员姓名~教授, 委员姓名~副教授},
},
bib/resource = {references.bib},
}
\usepackage{tikz}
% The class draws the university emblem and name on the covers (package njuvisual) unless
% these two commands already exist. This sample prints no emblem and sets the name in type;
% delete the two lines below to draw them.
\NewDocumentCommand \njuemblem { o m m } { }
\NewDocumentCommand \njuname { o m m } { {\zihao{1}\bfseries 南京大学} }
% njuthesis 1.5 and later (TeX Live 2026) take the emblem and name from image files
% (nju-emblem-purple.pdf, nju-name-purple.pdf) instead of the two commands above; the same
% choice for those versions: no emblem, the name set in type.
\ExplSyntaxOn
\cs_if_exist:NT \__nju_logo_emblem:Nn
{
\cs_set_protected:Npn \__nju_logo_emblem:Nn #1#2 { }
\cs_set_protected:Npn \__nju_logo_name:Nn #1#2 { { \zihao{1} \bfseries 南京大学 } }
}
\ExplSyntaxOff
\begin{document}
\maketitle
\frontmatter
\begin{abstract}
本文研究离散信源的熵。摘要应概括研究的问题、方法、结果和结论。
\end{abstract}
\begin{abstract*}
What the problem was, what you did, what you found, and why it matters, in a few short
paragraphs. Most examiners read the abstract and the conclusions first.
\end{abstract*}
\tableofcontents
\listoffigures
\listoftables
\mainmatter
\chapter{引言}
\label{chap:introduction}
本章说明论文研究的问题及其意义。信息论的基本概念见文献~\cite{shannon1948}。
This chapter states the problem and the plan of the thesis.
\section{研究内容}
列出本文要回答的两到三个问题。
\chapter{方法}
\label{chap:method}
\section{模型}
设离散信源有 $n$ 个符号,其概率为 $p_1, \dots, p_n$,则信源的熵为
\begin{equation}
H = -\sum_{i=1}^{n} p_i \log_2 p_i ,
\label{eq:entropy}
\end{equation}
当各符号等概率时熵最大。
\section{数据}
表~\ref{tab:data} 列出了实验所用的三个数据集。
\begin{table}[htbp]
\centering
\caption{实验数据集}
\label{tab:data}
\begin{tabular}{lrr}
\hline
数据集 & 样本数 & 符号数 \\
\hline
A & 1200 & 4 \\
B & 3500 & 8 \\
C & 9800 & 16 \\
\hline
\end{tabular}
\end{table}
\chapter{结果与结论}
\label{chap:results}
图~\ref{fig:entropy} 给出二元信源的熵随概率 $p$ 的变化,在 $p = 0.5$ 时取最大值 1 比特,与式~(\ref{eq:entropy}) 一致。
\begin{figure}[htbp]
\centering
\begin{tikzpicture}[x=6cm,y=3cm]
\draw[->] (0,0) -- (1.1,0) node[right] {$p$};
\draw[->] (0,0) -- (0,1.15) node[above] {$H(p)$};
\foreach \t in {0.5,1} \draw (\t,0) -- (\t,-0.03) node[below] {\t};
\draw[thick,domain=0.01:0.99,samples=60] plot (\x, {-\x*log2(\x)-(1-\x)*log2(1-\x)});
\end{tikzpicture}
\caption{二元信源的熵}
\label{fig:entropy}
\end{figure}
\printbibliography
\backmatter
\begin{acknowledgement}
感谢导师的悉心指导,感谢所有给予帮助的老师和同学。
\end{acknowledgement}
\end{document}
references.bib · 342 B
@article{shannon1948,
author = {Shannon, C. E.},
title = {A Mathematical Theory of Communication},
journal = {Bell System Technical Journal},
volume = {27},
number = {3},
pages = {379--423},
year = {1948},
doi = {10.1002/j.1538-7305.1948.tb01338.x}
}
% Add your own entries here, then cite them with cite{key}.
The first page, as this template compiles today. Click it to enlarge, and again to shrink. Open the file ↗