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
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
Danson Liao
NJUThesis
Commits
a8663993
Commit
a8663993
authored
3 years ago
by
Yu Xiong
Browse files
Options
Downloads
Patches
Plain Diff
feat: 主要代码转为Docstrip,开始编辑说明文档
parent
ae482a45
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.vscode/settings.json
+1
-1
1 addition, 1 deletion
.vscode/settings.json
README.md
+3
-3
3 additions, 3 deletions
README.md
njuthesis-sample.tex
+1
-1
1 addition, 1 deletion
njuthesis-sample.tex
njuthesis.cls
+4
-8
4 additions, 8 deletions
njuthesis.cls
njuthesis.dtx
+30
-19
30 additions, 19 deletions
njuthesis.dtx
with
39 additions
and
32 deletions
.vscode/settings.json
+
1
−
1
View file @
a8663993
...
...
@@ -35,7 +35,7 @@
"name"
:
"makedoc"
,
"command"
:
"latexmk"
,
"args"
:
[
"-
pv
"
,
"-
xelatex
"
,
"njuthesis.dtx"
]
}
...
...
This diff is collapsed.
Click to expand it.
README.md
+
3
−
3
View file @
a8663993
...
...
@@ -14,7 +14,7 @@
从0.9.0版以后,本模板以DocStrip(
`.dtx`
)格式进行维护,同时在仓库提供
`.cls`
文件以降低使用门槛。
### 使用DocStrip文件
###
如何
使用DocStrip文件
DocStrip合并了LaTeX源代码和文档,更有利于宏包的发布。要使用该文件,请在当前工作目录下打开终端:
...
...
@@ -39,8 +39,8 @@ DocStrip合并了LaTeX源代码和文档,更有利于宏包的发布。要使
### [南大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以后的目录结构如下所示:
1.
从release下载包含
[
模板全部文件
](
https://github.com/nju-lug/NJUThesis/releases/latest
)
的
`njuthesis.zip`
2.
登录
[
南大TeX
](
https://tex.nju.edu.cn
)
,点击New Project -> Upload Project上传刚刚得到的
压缩包
,上传后
`njuthesis-sample.tex`
、
`njuthesis.cls`
等文件应在根目录,0.9.0以后的目录结构如下所示:
```shell
NJUThesis-master/
...
...
This diff is collapsed.
Click to expand it.
njuthesis-sample.tex
+
1
−
1
View file @
a8663993
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NJU Thesis
% 南京大学毕业论文LaTeX模板
% Version 0.9.0 (2021-09-1
4
)
% Version 0.9.0 (2021-09-1
5
)
%
% 请关注项目地址以获取最新变化
% https://github.com/nju-lug/NJUThesis
...
...
This diff is collapsed.
Click to expand it.
njuthesis.cls
+
4
−
8
View file @
a8663993
...
...
@@ -23,7 +23,7 @@
%%
\NeedsTeXFormat
{
LaTeX2e
}
\RequirePackage
{
expl3
}
\GetIdInfo
$
Id: njuthesis.dtx
0
.
9
.
0
2020
-
09
-
1
4
12
:
00
:
00
+
0800
NJU LUG <my@yaoge
123
.com>
$
\GetIdInfo
$
Id: njuthesis.dtx
0
.
9
.
0
2020
-
09
-
1
5
12
:
00
:
00
+
0800
NJU LUG <my@yaoge
123
.com>
$
{
Thesis template for Nanjing University
}
\ProvidesExplClass
{
\ExplFileName
}{
\ExplFileDate
}{
\ExplFileVersion
}{
\ExplFileDescription
}
\LoadClass
[
...
...
@@ -75,19 +75,15 @@
MajorEN .tl
_
set:N =
\nju
_
major
_
en,
Field .tl
_
set:N =
\nju
_
field,
FieldEN .tl
_
set:N =
\nju
_
field
_
en,
% 导师
MentorA .tl
_
set:N =
\nju
_
mentor
_
a,
MentorAEN .tl
_
set:N =
\nju
_
mentor
_
a
_
en,
MentorATitle .tl
_
set:N =
\nju
_
mentor
_
a
_
title,
MentorATitleEN .tl
_
set:N =
\nju
_
mentor
_
a
_
title
_
en,
% 第二导师
MentorB .tl
_
set:N =
\nju
_
mentor
_
b,
MentorBEN .tl
_
set:N =
\nju
_
mentor
_
b
_
en,
MentorBTitle .tl
_
set:N =
\nju
_
mentor
_
b
_
title,
MentorBTitleEN .tl
_
set:N =
\nju
_
mentor
_
b
_
title
_
en,
% 提交日期
SubmitDate .tl
_
set:N =
\nju
_
submit
_
date,
% 答辩
DefendDate .tl
_
set:N =
\nju
_
defend
_
date,
ReviewerChairman .tl
_
set:N =
\nju
_
reviewer
_
chairman,
ReviewerA .tl
_
set:N =
\nju
_
reviewer
_
a,
...
...
@@ -127,7 +123,7 @@
\RequirePackage
{
multicol
}
% Multiple columns in dictionary
\RequirePackage
{
siunitx
}
% 用于书写单位符号
\RequirePackage
[version=4]
{
mhchem
}
% 用于绘制分子式
\RequirePackage
{
hologo
}
% 用于生成可以被插入书签的LaTeX logo
\RequirePackage
{
hologo
}
\sys
_
if
_
engine
_
xetex:T
{
\RequirePackage
{
microtype
}
...
...
@@ -149,8 +145,8 @@
% For windows.
% Shipped with the best `grinning-face-with-sweat' support.
}
\RequirePackage
{
blindtext
}
% 生成用于测试的大段无意义英文文字
\RequirePackage
{
zhlipsum
}
% 生成用于测试的大段无意义中文文字
\RequirePackage
{
blindtext
}
\RequirePackage
{
zhlipsum
}
\RequirePackage
{
amsmath
}
% Must be loaded before unicode-math
\RequirePackage
{
amsthm
}
% Mathematical environments
\RequirePackage
{
mathtools
}
% Mathematical tools to use with amsmath
...
...
This diff is collapsed.
Click to expand it.
njuthesis.dtx
+
30
−
19
View file @
a8663993
...
...
@@ -40,7 +40,7 @@
从0.9.0版以后,本模板以DocStrip(`.dtx`)格式进行维护,同时在仓库提供`.cls`文件以降低使用门槛。
### 使用DocStrip文件
###
如何
使用DocStrip文件
DocStrip合并了LaTeX源代码和文档,更有利于宏包的发布。要使用该文件,请在当前工作目录下打开终端:
...
...
@@ -65,8 +65,8 @@ DocStrip合并了LaTeX源代码和文档,更有利于宏包的发布。要使
### [南大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以后的目录结构如下所示:
1. 从release下载包含[模板全部文件](https://github.com/nju-lug/NJUThesis/releases/latest)的
`njuthesis.zip`
2. 登录[南大TeX](https://tex.nju.edu.cn),点击New Project -> Upload Project上传刚刚得到的
压缩包
,上传后`njuthesis-sample.tex`、`njuthesis.cls`等文件应在根目录,0.9.0以后的目录结构如下所示:
```shell
NJUThesis-master/
...
...
@@ -79,7 +79,7 @@ DocStrip合并了LaTeX源代码和文档,更有利于宏包的发布。要使
│ njuthesis.cls
│ njuthesis-sample.tex
```
3. 在南大TeX项目内页面左上角的`Menu`中,将编译器改为`XeLaTeX`
4. 编写TeX文档
...
...
@@ -207,7 +207,7 @@ through XeTeX.
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\RequirePackage{expl3}
%<!readme> \GetIdInfo $Id: njuthesis.dtx 0.9.0 2020-09-1
4
12:00:00 +0800 NJU LUG <my@yaoge123.com> $
%<!
(
readme
|readme-en)
> \GetIdInfo $Id: njuthesis.dtx 0.9.0 2020-09-1
5
12:00:00 +0800 NJU LUG <my@yaoge123.com> $
%<class> {Thesis template for Nanjing University}
%<class>\ProvidesExplClass{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
%
...
...
@@ -627,19 +627,19 @@ through XeTeX.
Field .tl_set:N = \nju_field,
FieldEN .tl_set:N = \nju_field_en,
% \end{macrocode}
%
%
% 导师
% Put text here.
% \begin{macrocode}
% 导师
MentorA .tl_set:N = \nju_mentor_a,
MentorAEN .tl_set:N = \nju_mentor_a_en,
MentorATitle .tl_set:N = \nju_mentor_a_title,
MentorATitleEN .tl_set:N = \nju_mentor_a_title_en,
% \end{macrocode}
%
% 第二导师
% Put text here.
% \begin{macrocode}
% 第二导师
MentorB .tl_set:N = \nju_mentor_b,
MentorBEN .tl_set:N = \nju_mentor_b_en,
MentorBTitle .tl_set:N = \nju_mentor_b_title,
...
...
@@ -647,14 +647,14 @@ through XeTeX.
% \end{macrocode}
%
% Put text here.
% 提交日期
% \begin{macrocode}
% 提交日期
SubmitDate .tl_set:N = \nju_submit_date,
% \end{macrocode}
%
% Put text here.
% 答辩
% \begin{macrocode}
% 答辩
DefendDate .tl_set:N = \nju_defend_date,
ReviewerChairman .tl_set:N = \nju_reviewer_chairman,
ReviewerA .tl_set:N = \nju_reviewer_a,
...
...
@@ -722,8 +722,16 @@ through XeTeX.
\RequirePackage{multirow} % Cells occupying multiple rows in tables
\RequirePackage{multicol} % Multiple columns in dictionary
\RequirePackage{siunitx} % 用于书写单位符号
% \end{macrocode}
%
% 用于化学
% \begin{macrocode}
\RequirePackage[version=4]{mhchem} % 用于绘制分子式
\RequirePackage{hologo} % 用于生成可以被插入书签的LaTeX logo
% \end{macrocode}
%
% 用于生成可以被插入书签的LaTeX logo,TODO 使用hologo创建|latex{}|命令
% \begin{macrocode}
\RequirePackage{hologo}
% \RequirePackage{needspace} % Required to prevent page break right after a sectioning command
% \RequirePackage{xspace} % Better print trailing whitespace
% \end{macrocode}
...
...
@@ -753,11 +761,15 @@ through XeTeX.
}
% \end{macrocode}
%
% 几个用来进行开发测试的包
% 生成用于测试的大段无意义英文文字
% \begin{macrocode}
\RequirePackage{blindtext}
\RequirePackage{zhlipsum}
% \end{macrocode}
%
% 加载以后展示内容边界
% \begin{macrocode}
\RequirePackage{blindtext} % 生成用于测试的大段无意义英文文字
\RequirePackage{zhlipsum} % 生成用于测试的大段无意义中文文字
% \RequirePackage{showframe} % 加载以后展示内容边界
% \RequirePackage{showframe}
% \end{macrocode}
%
% 数学
...
...
@@ -781,15 +793,14 @@ through XeTeX.
\RequirePackage{wrapfig} % Wrap text around figures
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% 必须以该顺序加载以下三个包
% \begin{macrocode}
% \RequirePackage{varioref}
\RequirePackage[hidelinks,bookmarksnumbered=true]{hyperref}
\RequirePackage[capitalise,nameinlink,noabbrev]{cleveref}
% \end{macrocode}
%
%
and so forth.
%
\subsection{字体设置}
% \begin{macrocode}
% 设置西文字体
\NewDocumentCommand\set_latin_fontset_windows{}{
...
...
@@ -1465,7 +1476,7 @@ through XeTeX.
]{theorem}
% \end{macrocode}
%
% \section{封面
设计
}
% \
sub
section{封面
绘制
}
% \begin{macrocode}
% 拼合标题
\tl_const:Nn \nju_title {\nju_title_a \nju_title_b \nju_title_c}
...
...
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