Skip to content
Snippets Groups Projects
Commit 5c30e140 authored by Yu Xiong's avatar Yu Xiong :confounded:
Browse files

feat: 尝试给研究生类型添加页眉,修改博士名称为phd

parent db00c952
No related branches found
No related tags found
No related merge requests found
\chapter{绪论} \chapter{绪论}
\section{简介} \section{简介}
南京大学学位论文\hologo{LaTeX}模板\cite{njuthesis}基于本科生院的论文撰写规范制作,同时参考研究生院提供的硕士、博士学位材料包,用于生成符合南京大学学位论文排版要求和相应的国家规范、行业标准的学位论文。 南京大学学位论文\hologo{LaTeX}模板\cite{njuthesis}基于本科生院的论文撰写规范制作,同时参考研究生院提供的硕士、博士学位材料包,用于生成符合南京大学学位论文排版要求和相应的国家规范、行业标准的学位论文,旨在为同学提供毕业论文书写的方便
此模板通过LPPL协议开源,旨在为同学提供毕业论文书写的方便,如有模板问题或者版权问题,请于Github上提出issue。 此模板通过LPPL协议开源,目前已\href{https://ctan.org/pkg/njuthesis}{发布在CTAN}
如有模板问题或者版权问题,请于Github项目主页上\href{https://github.com/nju-lug/NJUThesis/issues}{提出issue}
\section{开发环境} \section{开发环境}
...@@ -49,7 +51,8 @@ njuthesis类提供了若干个可以自定义的选项,如下所示。 ...@@ -49,7 +51,8 @@ njuthesis类提供了若干个可以自定义的选项,如下所示。
\begin{description} \begin{description}
\item[\texttt{titlelength}] 标题长度,用于控制封面标题的行数。可选值为1、2、3,缺省值为1。 \item[\texttt{titlelength}] 标题长度,用于控制封面标题的行数。可选值为1、2、3,缺省值为1。
\item[\texttt{secondmentor}] 是否有第二导师,用于在封面和摘要添加第二导师,缺省值为false。 \item[\texttt{secondmentor}] 是否有第二导师,用于在封面和摘要添加第二导师,缺省值为false。
\item[\texttt{degree}] 学位类型,本科学位为g,即Undergraduate的缩写;学术型硕士学位为mg;硕士专业学位为mf;博士学位为d。 \item[\texttt{nlcover}] 是否需要国家图书馆封面,缺省值为false。
\item[\texttt{degree}] 学位类型,本科学位为ug,即undergraduate的缩写;学术型硕士学位为mg;硕士专业学位为mf;博士学位为phd。
\item[\texttt{type}] 用于选择文档类型并将相关字段输出在封面和摘要页。可选值包括thesis(表示毕业论文)和design(表示毕业设计),缺省值为thesis。 \item[\texttt{type}] 用于选择文档类型并将相关字段输出在封面和摘要页。可选值包括thesis(表示毕业论文)和design(表示毕业设计),缺省值为thesis。
\item[\texttt{systemfont}] 是否用系统字体,用于自动检测运行系统并使用预装字体,缺省值为true。 \item[\texttt{systemfont}] 是否用系统字体,用于自动检测运行系统并使用预装字体,缺省值为true。
\item[\texttt{customlatinfont}] 用于选择自定义英文字符集。可选值包括windows, macos, gyre, null,缺省值为windows。 \item[\texttt{customlatinfont}] 用于选择自定义英文字符集。可选值包括windows, macos, gyre, null,缺省值为windows。
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
\section{封面页} \section{封面页}
\subsection{封面格式}
\texttt{cover.sty}中定义了生成封面的相关命令 \texttt{cover.sty}中定义了生成封面的相关命令
......
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NJU Thesis % NJU Thesis
% 南京大学毕业论文LaTeX模板 % 南京大学毕业论文LaTeX模板
% Version 0.7.4 (2021-09-12) % Version 0.7.4 (2021-09-12)
...@@ -9,18 +9,19 @@ ...@@ -9,18 +9,19 @@
% https://ctan.org/pkg/njuthesis % https://ctan.org/pkg/njuthesis
% %
% 贡献者 % 贡献者
% @atxy @FengChendian @myandeg % Yu XIONG @atxy-blip Yichen ZHAO @FengChendian
% @glatavento @HermitSun @linyinfeng % Song GAO @myandeg Chang MA @glatavento
% Yilun SUN @HermitSun Yinfeng LIN @linyinfeng
% %
% 许可证 % 许可证
% LaTeX Project Public License(版本 1.3c 或更高) % LaTeX Project Public License(版本 1.3c 或更高)
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[ \documentclass[
titlelength=2,% 选择标题行数,范围是1~3 titlelength=2,% 选择标题行数,范围是1~3
secondmentor=true,% 无第二导师请注释此项 secondmentor=true,% 无第二导师请注释此项
nlcover=true,% 无需国家图书馆封面请注释此项 nlcover=true,% 无需国家图书馆封面请注释此项
degree=d,% ug: 本科, mg: 学硕, mf: 专硕, d: 博士 degree=phd,% ug: 本科, mg: 学硕, mf: 专硕, phd: 博士
type=thesis,% thesis: 毕业论文,design: 毕业设计 type=thesis,% thesis: 毕业论文,design: 毕业设计
% systemfont=false,% 自定义字体请取消注释此项 % systemfont=false,% 自定义字体请取消注释此项
% customlatinfont=windows,% 设置英文字符集 % customlatinfont=windows,% 设置英文字符集
...@@ -80,17 +81,17 @@ ...@@ -80,17 +81,17 @@
\begin{document} \begin{document}
%---------------------------------------- %-------------------------------------------------
% 封面、摘要和目录 % 封面、摘要和目录
%---------------------------------------- %-------------------------------------------------
\maketitle \maketitle
\input{chapters/Abstract.tex} \input{chapters/Abstract.tex}
\tableofcontents \tableofcontents
%---------------------------------------- %-------------------------------------------------
% 正文部分 % 正文部分
%---------------------------------------- %-------------------------------------------------
\mainmatter \mainmatter
\input{chapters/Introduction.tex} \input{chapters/Introduction.tex}
...@@ -101,23 +102,23 @@ ...@@ -101,23 +102,23 @@
\input{chapters/Reference.tex} \input{chapters/Reference.tex}
\input{chapters/Bibliography.tex} \input{chapters/Bibliography.tex}
%---------------------------------------- %-------------------------------------------------
% 参考文献 % 参考文献
%---------------------------------------- %-------------------------------------------------
\printbibliography[ \printbibliography[
heading=bibintoc,% 插入目录条目 heading=bibintoc,% 插入目录条目
title=参考文献] title=参考文献]
%---------------------------------------- %-------------------------------------------------
% 致谢 % 致谢
%---------------------------------------- %-------------------------------------------------
\input{chapters/Acknowledgement.tex} \input{chapters/Acknowledgement.tex}
%---------------------------------------- %-------------------------------------------------
% 附录部分 % 附录部分
%---------------------------------------- %-------------------------------------------------
\appendix \appendix
\input{chapters/Standard.tex} \input{chapters/Standard.tex}
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
\noindent \noindent
毕业论文题目:\hspace{0.5em}\nju_underline:n {\nju_title\hfill}\\ 毕业论文题目:\hspace{0.5em}\nju_underline:n {\nju_title\hfill}\\
\uline{\makebox[9em]{\nju_major}}专业\uline{\makebox[4em]{\nju_grade}} \uline{\makebox[9em]{\nju_major}}专业\uline{\makebox[4em]{\nju_grade}}
\str_if_eq:NNTF {\nju_degree} { d } {}{} \str_if_eq:NNTF {\nju_degree} { phd } {}{}
士生姓名:\uline{\hfill\nju_student_name\hfill} \\ 士生姓名:\uline{\hfill\nju_student_name\hfill} \\
指导教师(姓名、职称):\uline{\hfill\nju_mentor_full\hfill}\par 指导教师(姓名、职称):\uline{\hfill\nju_mentor_full\hfill}\par
\egroup \egroup
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
{ {
{ mg } { \tl_const:Nn \nju_degree_title {硕士} } { mg } { \tl_const:Nn \nju_degree_title {硕士} }
{ mf } { \tl_const:Nn \nju_degree_title {硕士专业} } { mf } { \tl_const:Nn \nju_degree_title {硕士专业} }
{ d } { phd }
{ {
\tl_const:Nn \nju_degree_title {博士} \tl_const:Nn \nju_degree_title {博士}
...@@ -217,11 +217,12 @@ ...@@ -217,11 +217,12 @@
\begin{center} \begin{center}
\def\ULthickness{1pt} \def\ULthickness{1pt}
{\kaishu\zihao{-0}\hspace{0.5em}\hspace{0.5em}\hspace{0.5em}} {\kaishu\zihao{-0}\hspace{0.5em}\hspace{0.5em}\hspace{0.5em}}
{\kaishu\zihao{1} {
\vskip \stretch{1} \kaishu\zihao{1}
\nju_cover_underline_nl:nn {14em}{\nju_title_a}\\ \vskip \stretch{1}
\nju_cover_underline_nl:nn {14em}{\nju_title_b}\\ \nju_cover_underline_nl:nn {14em}{\nju_title_a}\\
\nju_cover_underline_nl:nn {14em}{\nju_title_c}\\ \nju_cover_underline_nl:nn {14em}{\nju_title_b}\\
\nju_cover_underline_nl:nn {14em}{\nju_title_c}\\
} }
\vskip \stretch{1} \vskip \stretch{1}
{\kaishu\zihao{4}(题名和副题名)} {\kaishu\zihao{4}(题名和副题名)}
......
\ProvidesExplPackage{profile/page}{2021-09-11}{0.6.0}{NJU Thesis page layout} \ProvidesExplPackage{profile/page}{2021-09-11}{0.6.0}{NJU Thesis page layout}
% 论文页码 页脚居中、五号阿拉伯数字(新罗马体)连续编码 % 本科生页眉页脚
\fancypagestyle{njuplain}{% \fancypagestyle{njuplain}{%
\fancyhead{}
\fancyfoot[C]{\zihao{5}\thepage} % 页脚居中 五号新罗马体数字
}
% TODO: 研究生页眉页脚
\fancypagestyle{njuheadings}{%
\fancyhead{} \fancyhead{}
\fancyfoot[C]{\zihao{5}\thepage} \fancyfoot[C]{\zihao{5}\thepage}
} }
% the header line
\tl_set:Nn \headrulewidth {0pt}
% the footer line
\tl_set:Nn \footrulewidth {0pt}
\str_if_eq:NNTF {\nju_degree} { ug } \str_if_eq:NNTF {\nju_degree} { ug }
{ {
% the header line
\tl_set:Nn \headrulewidth {0pt}
% the footer line
\tl_set:Nn \footrulewidth {0pt}
\AtBeginDocument{\pagestyle{njuplain}} % 本科无页眉页脚 \AtBeginDocument{\pagestyle{njuplain}} % 本科无页眉页脚
} }
{ {
\AtBeginDocument{\pagestyle{plain}} % 研究生有页眉页脚 % the header line
% \tl_set:Nn \headrulewidth {1pt}
\AtBeginDocument{\pagestyle{headings}} % 研究生有页眉页脚
} }
% ctex格式设置 % ctex格式设置
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment