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

feat: 将前言和致谢封装为环境

parent 02013358
No related branches found
No related tags found
No related merge requests found
\chapter*{致谢}
\addcontentsline{toc}{chapter}{致谢}
\begin{acknowledgement}
感谢\href{https://git.nju.edu.cn/nju-lug/lug-introduction}{NJU Linux User Group}
\end{acknowledgement}
......@@ -118,6 +118,10 @@ secondmentor 用于指定是否在封面打印第二导师
在使用\hologo{LuaLaTeX}编译时,研究生中文摘要页的标题会出现空格无下划线的问题,目前正在积极寻求解决方法。
\section{前言页}
使用preface环境定义
\section{目录页}
目录页格式定制于\texttt{profile/page.sty}
......@@ -136,11 +140,7 @@ secondmentor 用于指定是否在封面打印第二导师
\section{致谢页}
致谢页采用无编号章节形式,需要手动插入目录
\begin{lstlisting}[language=TeX]
\chapter*{致谢}
\addcontentsline{toc}{chapter}{致谢}
\end{lstlisting}
同前言,使用acknowledgement环境
\section{附录页}
......
\begin{preface}
我想,每个\hologo{LaTeX}极客的最终目标都是写一个属于自己的class,而自己很幸运地在\href{https://git.nju.edu.cn/nju-lug/lug-introduction}{NJU Linux User Group}获得了这样的机会。
这个模板也算送给自己的毕业礼物好了。
\vspace{1cm}
\begin{flushright}
徐阿通\\
2021年初秋于扬州
\end{flushright}
\end{preface}
\NeedsTeXFormat{LaTeX2e}
\ProvidesExplClass{njuthesis}{2021-09-12}{0.8.1}{NJU Thesis LaTeX Template}
\ProvidesExplClass{njuthesis}{2021-09-12}{0.8.2}{NJU Thesis LaTeX Template}
% 通过类传递参数
\RequirePackage{l3keys2e}
......
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NJU Thesis
% 南京大学毕业论文LaTeX模板
% Version 0.8.1 (2021-09-12)
% Version 0.8.2 (2021-09-12)
%
% 请关注项目地址以获取最新变化
% https://github.com/nju-lug/NJUThesis
......@@ -82,11 +82,14 @@
\begin{document}
%-------------------------------------------------
% 封面、摘要和目录
% 封面、摘要、前言和目录
%-------------------------------------------------
\maketitle
\input{chapters/Abstract.tex}
\input{chapters/Preface.tex}
\tableofcontents
%-------------------------------------------------
......
......@@ -84,7 +84,8 @@
}
\chapter*{\hspace{2em}}%
\pdfbookmark[0]{目录}{目录} % 将目录页插入pdf书签
% \pdfbookmark[0]{目录}{目录} % 将目录页插入pdf书签
\addcontentsline{toc}{chapter}{目录}
% \@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}%
\@starttoc{toc}%
\if@restonecol\twocolumn\fi
......@@ -98,3 +99,15 @@
}
}
}
% 定制前言、致谢环境
\newenvironment{preface}
{%
\chapter*{前言}
\addcontentsline{toc}{chapter}{前言}
}{}
\newenvironment{acknowledgement}
{%
\chapter*{致谢}
\addcontentsline{toc}{chapter}{致谢}
}{}
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