Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
NJUThesis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NJU LUG
NJU LaTeX Templates
NJUThesis
Commits
e1567fa0
Commit
e1567fa0
authored
3 years ago
by
Yu Xiong
Browse files
Options
Downloads
Patches
Plain Diff
feat: 将readme置入DocStrip
parent
4eb52a0f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+2
-2
2 additions, 2 deletions
.gitignore
README.md
+3
-4
3 additions, 4 deletions
README.md
njuthesis.cls
+1140
-0
1140 additions, 0 deletions
njuthesis.cls
njuthesis.dtx
+103
-28
103 additions, 28 deletions
njuthesis.dtx
with
1248 additions
and
34 deletions
.gitignore
+
2
−
2
View file @
e1567fa0
...
...
@@ -13,8 +13,8 @@
.*.lb
## LaTeX class and package
*.cls
*.sty
#
*.cls
#
*.sty
## DocStrip installation file
*.ins
...
...
This diff is collapsed.
Click to expand it.
README.md
+
3
−
4
View file @
e1567fa0
# NJU Thesis
[

](https://git.nju.edu.cn/nju-lug/nju-latex-templates)
[

](https://tex.nju.edu.cn)
...
...
@@ -18,8 +17,8 @@
DocStrip合并了LaTeX源代码和文档,更有利于宏包的发布。要使用该文件,请在当前工作目录下打开终端:
-
输入
`xetex njuthesis.
ins
`
以解出
常规使用的
`.cls`
文件
-
输入
`latexmk
-pv
njuthesis.dtx`
以生成并查看内置的文档
-
输入
`xetex njuthesis.
dtx
`
以解出
宏包内容
-
输入
`latexmk njuthesis.dtx`
以生成并查看内置的文档
请注意,由于文件重名原因,项目中的示例论文模板已被重命名为
`njuthesis-sample.tex`
。
...
...
@@ -53,7 +52,7 @@ DocStrip合并了LaTeX源代码和文档,更有利于宏包的发布。要使
│ njuthesis.cls
│ njuthesis-sample.tex
```
3.
在南大TeX项目内页面左上角的
`Menu`
中,将编译器改为
`XeLaTeX`
4.
编写TeX文档
...
...
This diff is collapsed.
Click to expand it.
njuthesis.cls
0 → 100644
+
1140
−
0
View file @
e1567fa0
This diff is collapsed.
Click to expand it.
njuthesis.dtx
+
103
−
28
View file @
e1567fa0
...
...
@@ -24,6 +24,85 @@
%</internal>
%
%<*readme>
%# NJU Thesis
[](https://git.nju.edu.cn/nju-lug/nju-latex-templates)
[](https://tex.nju.edu.cn)

> 此项目是基于[NJU thesis 2021](https://github.com/FengChendian/NJUThesis2021)的重构版本,目前本科生版本**已经基本重构完成**,硕博论文**正在**根据研究生院的文件重构,但研究生院的规定并不完善,因此部分格式可能会参考本科的,**如果院系另有要求,请自行修改或者提交issue**。
原来的[NJU thesis 2021](https://github.com/FengChendian/NJUThesis2021)模板太过古老并且不支持硕士、博士论文,目前难以维护,因此为了模板的可持续发展,现在将对该项目进行重构,项目挂载于[NJU-LUG](https://github.com/nju-lug)组织仓库下,目前已[发布在CTAN](https://ctan.org/pkg/njuthesis)。
相关文档请参见[本项目wiki](https://github.com/nju-lug/NJUThesis/wiki)。
## 快速开始
从0.9.0版以后,本模板以DocStrip(`.dtx`)格式发布,同时在release区提供cls文件。
### 使用DocStrip文件
DocStrip合并了LaTeX源代码和文档,更有利于宏包的发布。要使用该文件,请在当前工作目录下打开终端:
- 输入`xetex njuthesis.dtx`以解出宏包内容
- 输入`latexmk njuthesis.dtx`以生成并查看内置的文档
请注意,由于文件重名原因,项目中的示例论文模板已被重命名为`njuthesis-sample.tex`。
### 本地编译
1. 推荐[从南大镜像站下载](https://mirror.nju.edu.cn/download/app/TeX%20%E6%8E%92%E7%89%88%E7%B3%BB%E7%BB%9F)并安装TeXLive或者MiKTeX最新版
2. 从release下载包含[模板全部文件](https://github.com/nju-lug/NJUThesis/releases/latest)的压缩包
3. 根据需要更改`njuthesis-sample.tex`文件中的内容
4. 在模板根目录下运行`latexmk -xelatex`编译文件,得到对应的PDF
#### **关于本地编译**
- 模板支持`latexmk`、`xelatex`、`lualatex`三种编译方式
- 如果使用`latexmk`,请务必使用完整的命令`latexmk -xelatex`以免产生不必要的问题
- 如果使用`xelatex`或`lualatex`,需要按照`xelatex/lualatex` -> `biber` -> `xelatex/lualatex` -> `xelatex/lualatex`的顺序编译四次
- 仓库中`.vscode`附带一份VScode的LaTeX WorkShop的配置文件,可根据需要使用
### [南大TeX](https://tex.nju.edu.cn)编译
1. 从release下载包含[模板全部文件](https://github.com/nju-lug/NJUThesis/releases/latest)的压缩包
2. 登录[南大TeX](https://tex.nju.edu.cn),点击New Project -> Upload Project上传刚刚得到的zip文件,上传后`njuthesis-sample.tex`、`njuthesis.cls`等文件应在根目录,0.9.0以后的目录结构如下所示:
```shell
NJUThesis-master/
│
├─figure/
│ njulogo.pdf
│ njuname.pdf
│
│ njuthesis.bib
│ njuthesis.cls
│ njuthesis-sample.tex
```
3. 在南大TeX项目内页面左上角的`Menu`中,将编译器改为`XeLaTeX`
4. 编写TeX文档
### 其他
更多内容请参见项目Wiki中的[使用说明](https://github.com/nju-lug/NJUThesis/wiki/%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E)。
你也可以下载[Release](https://github.com/nju-lug/NJUThesis/releases/latest)中附带的`njuthesis.pdf`,里面详尽阐述了模板的特性和使用方法。
## 常见问题
请参见[常见问题](https://github.com/nju-lug/NJUThesis/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)。
## 贡献
如果你发现了模板的问题,欢迎在Github中[提交issue](https://github.com/nju-lug/NJUThesis/issues)或者PR。
## 许可
本模板的发布遵守 LaTeX Project Public License(版本 1.3c 或更高)。
%</readme>
%
%<*readme-en>
# NJU Thesis
## Overview
...
...
@@ -50,7 +129,7 @@ Please see [Chinese wiki](https://github.com/nju-lug/NJUThesis/wiki)。
-----
Copyright © NJU-LUG
%</readme>
%</readme
-en
>
%
%<*internal>
\fi
...
...
@@ -95,7 +174,8 @@ through XeTeX.
%<*install>
\usedir{doc/latex/njuthesis}
\nopreamble\nopostamble
\file{README_EN.md} {\from{\jobname.dtx}{readme}}
\file{README.md} {\from{\jobname.dtx}{readme}}
\file{README_EN.md} {\from{\jobname.dtx}{readme-en}}
}
\obeyspaces
...
...
@@ -124,42 +204,37 @@ through XeTeX.
\fi
%</internal>
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\RequirePackage{expl3}
%<*!(driver|install)>
%<!readme>\GetIdInfo $Id: njuthesis.dtx $
%<class> {Thesis template for Nanjing University}
%<class>\ProvidesExplClass{\ExplFileName}
%<!readme> {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
%</!(driver|install)>
%
%<*class>
%\NeedsTeXFormat{LaTeX2e}
%\RequirePackage{expl3}
%</class>
%<*driver|class>
\def\ExplFileName{njuthesis}
\def\ExplFileDescription{Nanjing University thesis template class}
\def\ExplFileDate{2021-09-14}
\def\ExplFileVersion{v0.9.0}
%</driver|class>
%<class>\ProvidesExplClass{\ExplFileName}{\ExplFileDate}\ExplFileVersion}{\ExplFileDescription}
%
%<*driver>
\ProvidesFile{\ExplFileName.dtx}
\documentclass{ctxdoc}
\title{^^A
The \pkg{njuthesis} package\\ 南京大学学位论文模板^^A
}
\author{^^A
Nanjing University Linux User Group\thanks
{^^A
E-mail:
\href{mailto:my@yaoge123.com}
{my@yaoge123.com}^^A
}^^A
}
\date{Released 2021-09-13}
\begin{document}
\DisableImplementation
%<!--CODEDOC--> \EnableImplementation
\DocInput{njuthesis.dtx}
\end{document}
%</driver>
% \fi
%
% \title{The \pkg{njuthesis} package\\ 南京大学学位论文模板}
%
% \author{^^A
% Nanjing University Linux User Group\thanks{E-mail: \href{mailto:my@yaoge123.com}{my@yaoge123.com}}}
%
% \date{Released 2021-09-13}
%
% \maketitle
% \tableofcontents
%
% \EnableDocumentation
%^^A \DisableDocumentation
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment