Skip to content
Snippets Groups Projects
njuthesis.dtx 99.7 KiB
Newer Older
% \iffalse meta-comment
% !TeX program  = XeLaTeX
% !TeX encoding = UTF-8
% Copyright (C) 2021 
% by Nanjing University Linux User Group <nju.lug@yaoge123.cn>
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
% license or (at your option) any later version.  The latest version
% of this license is in the file
%    https://www.latex-project.org/lppl.txt
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Yu Xiong.
%
% This work consists of the files njuthesis.dtx,
%           and the derived files njuthesis.ins,
%                                 njuthesis.cls,
%                                 njuthesis.pdf,
%                             and README.md.
%
% -----------------------------------------------------------------------
% The development version of the template can be found at
%    https://github.com/nju-lug/NJUThesis
%
% for those people who are interested.
%
%<*internal>
\iffalse
%</internal>
%
%<*internal>
\fi
\begingroup
  \def\NameOfLaTeXe{LaTeX2e}
\expandafter\endgroup\ifx\NameOfLaTeXe\fmtname\else
\csname fi\endcsname
%</internal>
%
%<*install>
\input docstrip.tex
\keepsilent
\askforoverwritefalse

\preamble

Copyright (C) 2021 
by Nanjing University Linux User Group <nju.lug@yaoge123.cn>

This file may be distributed and/or modified under the conditions of
the LaTeX Project Public License, either version 1.3c of this license
or (at your option) any later version.  The latest version of this
license is in:

   http://www.latex-project.org/lppl.txt

and version 1.3 or later is part of all distributions of LaTeX version
2005/12/01 or later.

To produce the documentation run the original source files ending with `.dtx'
through XeTeX.
    
\endpreamble

\generate{
  \usedir{tex/latex/njuthesis}
    \file{\jobname.cls}        {\from{\jobname.dtx}{class}}
%</install>
%<*internal>
  \usedir{source/latex/njuthesis}
    \file{\jobname.ins}        {\from{\jobname.dtx}{install}}
%</internal>
%<*install>
}

\obeyspaces
\Msg{*************************************************************}
\Msg{*                                                           *}
\Msg{* To finish the installation you have to move the following *}
\Msg{* files into a directory searched by TeX:                   *}
\Msg{*                                                           *}
\Msg{* The recommended directory is TDS:tex/latex/njuthesis      *}
\Msg{*                                                           *}
\Msg{*     njuthesis.cls                                         *}
\Msg{*     njuthesis.ins                                         *}
\Msg{*                                                           *}
\Msg{* To produce the documentation, run the file njuthesis.dtx  *}
\Msg{* through XeLaTeX.                                          *}
\Msg{*                                                           *}
\Msg{* Happy TeXing!                                             *}
\Msg{*                                                           *}
\Msg{*************************************************************}

\endbatchfile
%</install>
%
%<*internal>
\fi
%</internal>
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\RequirePackage{expl3}
%<class>\GetIdInfo  $Id: njuthesis.dtx 0.12.2 2021-12-03 23:40:00 +0800  NJU LUG <nju.lug@yaoge123.cn> $
%<class>  { Thesis template for Nanjing University }
%<class>\ProvidesExplClass{njuthesis}
%<class>{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
\ProvidesFile{njuthesis.dtx}
\documentclass{ctxdoc}
\usepackage{floatrow,tabularray,njuvisual}
\usepackage[firstpage=true]{background}
\backgroundsetup{contents={\njuemblem[white!85!gray]{22cm}{!}},scale=1,angle=0,hshift=-4cm}
Yu Xiong's avatar
Yu Xiong committed
\setlist[1]{labelindent=0.5em}
\UseTblrLibrary{booktabs,siunitx,diagbox}
\DefTblrTemplate{caption-tag}{default}{表\hspace{0.25em}\thetable}
\SetTblrStyle{caption-tag}{font=\bfseries}
\DefTblrTemplate{caption-sep}{default}{\quad}
\begin{document}
  \DocInput{njuthesis.dtx}
Yu Xiong's avatar
Yu Xiong committed
  \PrintChanges
\end{document}
%</driver>
% \fi
%
Yu Xiong's avatar
Yu Xiong committed
% \title{\color{njuviolet}{The \cls{njuthesis} class\\ 南京大学学位论文模板}}
Yu Xiong's avatar
Yu Xiong committed
% 
% \author{^^A
Yu Xiong's avatar
Yu Xiong committed
% Nanjing University Linux User Group
% \thanks{E-mail: \href{mailto:nju.lug@yaoge123.cn}{nju.lug@yaoge123.cn}}}
% \date{v0.12.2 \\ Released 2021-12-03}
Yu Xiong's avatar
Yu Xiong committed
% \changes{v0.1}{2021/09/04}{开始开发。}
% \changes{v0.2}{2021/09/07}{初步搭建了可用的模板。}
% \changes{v0.3}{2021/09/09}{使用自动构建工具进行测试。}
% \changes{v0.4}{2021/09/09}{将个人信息使用内置命令输入。}
% \changes{v0.5}{2021/09/10}{新增了对第二导师的支持。}
% \changes{v0.6}{2021/09/10}{封装个人信息}
% \changes{v0.6}{2021/09/10}{实现自动打包发布。}
Yu Xiong's avatar
Yu Xiong committed
% \changes{v0.7}{2021/09/11}{增加对研究生模板的支持}
% \changes{v0.7}{2021/09/12}{将njuthesis发布在CTAN。}
Yu Xiong's avatar
Yu Xiong committed
% \changes{v0.8}{2021/09/12}{修复已知问题,进行公开宣传。}
Yu Xiong's avatar
Yu Xiong committed
% \changes{v0.9}{2021/09/15}{使用DocStrip合并模板文件。}
Yu Xiong's avatar
Yu Xiong committed
% \changes{v0.9}{2021/09/15}{大幅度修改宏名称以符合\hologo{LaTeX3}规范。}
% \changes{v0.9}{2021/09/15}{进一步完善文档。}
Yu Xiong's avatar
Yu Xiong committed
% \changes{v0.10}{2021/09/24}{删除了生成自述文件的代码。}
% \changes{v0.12}{2021/11/28}{删除内置的 \pkg{njuvisual} 代码。}
% \changes{v0.12}{2021/11/29}{更新了说明文档封面设计。}
% \changes{v0.12}{2021/11/30}{区分测试文件和空白模板。}
Yu Xiong's avatar
Yu Xiong committed
%
% \begin{abstract}
Yu Xiong's avatar
Yu Xiong committed
% 南京大学学位论文 \hologo{LaTeX} 模板 \cls{njuthesis} 基于本科生院的论文撰写
% 规范制作,同时参考研究生院提供的硕士、博士学位材料包,用于生成符合南京大学学
% 位论文排版要求和相应的国家规范、行业标准的学位论文,旨在为同学提供毕业论文书
% 写的方便。
Yu Xiong's avatar
Yu Xiong committed
% \end{abstract}
Yu Xiong's avatar
Yu Xiong committed
%
Yu Xiong's avatar
Yu Xiong committed
% \def\abstractname{Abstract}
% \begin{abstract}
Yu Xiong's avatar
Yu Xiong committed
% The \cls{njuthesis} class is intended for typesetting Nanjing University
% dissertations with \hologo{LaTeX}, providing support for bachelor, masters,  
% and doctoral thesis. 
Yu Xiong's avatar
Yu Xiong committed
% \end{abstract}
%
Yu Xiong's avatar
Yu Xiong committed
% \vspace{2cm}
Yu Xiong's avatar
Yu Xiong committed
% \def\abstractname{特别声明}
% \begin{abstract}
Yu Xiong's avatar
Yu Xiong committed
% 请注意,本模板仍未完成开发,出现bug或者文档不完善属于正常情况,欢迎提交
% issue 或 Pull Request。
%
% 本模板未经学校官方部门的审核,作者不对使用本模板产生的格式审查问题负责。
Yu Xiong's avatar
Yu Xiong committed
% 
% \href{https://git.nju.edu.cn/nju-lug/lug-introduction}{NJU LUG}始终欢迎
% 您的加入!
Yu Xiong's avatar
Yu Xiong committed
% \end{abstract}
%
Yu Xiong's avatar
Yu Xiong committed
% \clearpage
Yu Xiong's avatar
Yu Xiong committed
%
% \setcounter{tocdepth}{4}
Yu Xiong's avatar
Yu Xiong committed
% \tableofcontents
% \EnableDocumentation
% 
% \begin{documentation}
Yu Xiong's avatar
Yu Xiong committed
% \section{模板介绍}
% \cls{njuthesis},即南京大学学位论文模板,是一个由南京大学 LUG 组织维护的,用于处理本校学生毕业论文排版需求的 \hologo{LaTeX} 模板。
Yu Xiong's avatar
Yu Xiong committed
%
Loading
Loading full blame...