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
b7c9fba1
Commit
b7c9fba1
authored
3 years ago
by
Yu Xiong
Browse files
Options
Downloads
Patches
Plain Diff
refactor: 重构了个人信息相关的部分命令
parent
31197e3c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
njuthesis.cls
+109
-83
109 additions, 83 deletions
njuthesis.cls
njuthesis.dtx
+145
-111
145 additions, 111 deletions
njuthesis.dtx
with
254 additions
and
194 deletions
njuthesis.cls
+
109
−
83
View file @
b7c9fba1
...
@@ -36,54 +36,78 @@
...
@@ -36,54 +36,78 @@
zihao=-4
zihao=-4
]
{
ctexbook
}
[2018/04/01]
]
{
ctexbook
}
[2018/04/01]
\RequirePackage
{
l3keys2e
}
\RequirePackage
{
l3keys2e
}
\tl
_
new:N
\l
__
nju
_
info
_
degree
_
tl
\tl
_
new:N
\l
__
nju
_
info
_
type
_
tl
\keys
_
define:nn
{
nju
}
\keys
_
define:nn
{
nju
}
{
{
nlcover .bool
_
set:N =
\nju
_
nl
_
cover,
nlcover .bool
_
set:N =
\nju
_
nl
_
cover,
nlcover .initial:n = false,
nlcover .initial:n = false,
degree .tl
_
set:N =
\nju
_
degree,
degree .initial:n = ug,
type .tl
_
set:N =
\nju
_
type,
type .initial:n = thesis,
}
}
\keys
_
define:nn
{
nju
}
\keys
_
define:nn
{
nju
}
{
{
info .meta:nn =
{
nju / info
}
{
#1
}
degree .choices:nn =
{
ug, mg, mg, phd
}
{
\tl
_
set
_
eq:NN
\l
__
nju
_
info
_
degree
_
tl
\l
_
keys
_
choice
_
tl
}
,
type .choices:nn =
{
thesis, design
}
{
\tl
_
set
_
eq:NN
\l
__
nju
_
info
_
type
_
tl
\l
_
keys
_
choice
_
tl
}
,
}
\keys
_
define:nn
{
nju
}
{
info.meta:nn =
{
nju / info
}
{
#1
}
}
}
\keys
_
define:nn
{
nju / info
}
\keys
_
define:nn
{
nju / info
}
{
{
% 题目
TitleA .tl
_
set:N =
\l
__
nju
_
info
_
title
_
a
_
tl,
TitleA .tl
_
set:N =
\l
__
nju
_
info
_
title
_
a
_
tl,
TitleB .tl
_
set:N =
\l
__
nju
_
info
_
title
_
b
_
tl,
TitleB .tl
_
set:N =
\l
__
nju
_
info
_
title
_
b
_
tl,
TitleC .tl
_
set:N =
\l
__
nju
_
info
_
title
_
c
_
tl,
TitleC .tl
_
set:N =
\l
__
nju
_
info
_
title
_
c
_
tl,
Title* .tl
_
set:N =
\l
__
nju
_
info
_
title
_
en
_
tl,
Title* .tl
_
set:N =
\l
__
nju
_
info
_
title
_
en
_
tl,
% 年级学号姓名
}
\keys
_
define:nn
{
nju / info
}
{
Grade .tl
_
set:N =
\l
__
nju
_
info
_
grade
_
tl,
Grade .tl
_
set:N =
\l
__
nju
_
info
_
grade
_
tl,
StudentID .tl
_
set:N =
\l
__
nju
_
info
_
id
_
tl,
StudentID .tl
_
set:N =
\l
__
nju
_
info
_
id
_
tl,
StudentName .tl
_
set:N =
\l
__
nju
_
info
_
author
_
tl,
StudentName .tl
_
set:N =
\l
__
nju
_
info
_
author
_
tl,
StudentName* .tl
_
set:N =
\l
__
nju
_
info
_
author
_
en
_
tl,
StudentName* .tl
_
set:N =
\l
__
nju
_
info
_
author
_
en
_
tl,
% 院系专业方向
}
\keys
_
define:nn
{
nju / info
}
{
Department .tl
_
set:N =
\l
__
nju
_
info
_
dept
_
tl,
Department .tl
_
set:N =
\l
__
nju
_
info
_
dept
_
tl,
Department* .tl
_
set:N =
\l
__
nju
_
info
_
dept
_
en
_
tl,
Department* .tl
_
set:N =
\l
__
nju
_
info
_
dept
_
en
_
tl,
Major .tl
_
set:N =
\l
__
nju
_
major
_
tl,
Major .tl
_
set:N =
\l
__
nju
_
major
_
tl,
Major* .tl
_
set:N =
\l
__
nju
_
major
_
en
_
tl,
Major* .tl
_
set:N =
\l
__
nju
_
major
_
en
_
tl,
Field .tl
_
set:N =
\l
__
nju
_
field
_
tl,
Field .tl
_
set:N =
\l
__
nju
_
field
_
tl,
Field* .tl
_
set:N =
\l
__
nju
_
field
_
en
_
tl,
Field* .tl
_
set:N =
\l
__
nju
_
field
_
en
_
tl,
}
\keys
_
define:nn
{
nju / info
}
{
SupervisorA .tl
_
set:N =
\l
__
nju
_
info
_
supv
_
a
_
tl,
SupervisorA .tl
_
set:N =
\l
__
nju
_
info
_
supv
_
a
_
tl,
SupervisorA* .tl
_
set:N =
\l
__
nju
_
info
_
supv
_
a
_
en
_
tl,
SupervisorA* .tl
_
set:N =
\l
__
nju
_
info
_
supv
_
a
_
en
_
tl,
SupervisorATitle .tl
_
set:N =
\l
__
nju
_
info
_
supv
_
a
_
title
_
tl,
SupervisorATitle .tl
_
set:N =
\l
__
nju
_
info
_
supv
_
a
_
title
_
tl,
SupervisorATitle* .tl
_
set:N =
\l
__
nju
_
info
_
supv
_
a
_
title
_
en
_
tl,
SupervisorATitle* .tl
_
set:N =
\l
__
nju
_
info
_
supv
_
a
_
title
_
en
_
tl,
}
\keys
_
define:nn
{
nju / info
}
{
SupervisorB .tl
_
set:N =
\l
__
nju
_
info
_
supv
_
b
_
tl,
SupervisorB .tl
_
set:N =
\l
__
nju
_
info
_
supv
_
b
_
tl,
SupervisorB* .tl
_
set:N =
\l
__
nju
_
info
_
supv
_
b
_
en
_
tl,
SupervisorB* .tl
_
set:N =
\l
__
nju
_
info
_
supv
_
b
_
en
_
tl,
SupervisorBTitle .tl
_
set:N =
\l
__
nju
_
info
_
supv
_
b
_
title
_
tl,
SupervisorBTitle .tl
_
set:N =
\l
__
nju
_
info
_
supv
_
b
_
title
_
tl,
SupervisorBTitle* .tl
_
set:N =
\l
__
nju
_
info
_
supv
_
b
_
title
_
en
_
tl,
SupervisorBTitle* .tl
_
set:N =
\l
__
nju
_
info
_
supv
_
b
_
title
_
en
_
tl,
}
\keys
_
define:nn
{
nju / info
}
{
SubmitDate .tl
_
set:N =
\l
__
nju
_
submit
_
date
_
tl,
SubmitDate .tl
_
set:N =
\l
__
nju
_
submit
_
date
_
tl,
}
\keys
_
define:nn
{
nju / info
}
{
DefendDate .tl
_
set:N =
\l
__
nju
_
defend
_
date
_
tl,
DefendDate .tl
_
set:N =
\l
__
nju
_
defend
_
date
_
tl,
ReviewerChairman .tl
_
set:N =
\l
__
nju
_
info
_
chairman
_
tl,
ReviewerChairman .tl
_
set:N =
\l
__
nju
_
info
_
chairman
_
tl,
ReviewerA .tl
_
set:N =
\l
__
nju
_
info
_
reviewer
_
a
_
tl,
ReviewerA .tl
_
set:N =
\l
__
nju
_
info
_
reviewer
_
a
_
tl,
ReviewerB .tl
_
set:N =
\l
__
nju
_
info
_
reviewer
_
b
_
tl,
ReviewerB .tl
_
set:N =
\l
__
nju
_
info
_
reviewer
_
b
_
tl,
ReviewerC .tl
_
set:N =
\l
__
nju
_
info
_
reviewer
_
c
_
tl,
ReviewerC .tl
_
set:N =
\l
__
nju
_
info
_
reviewer
_
c
_
tl,
ReviewerD .tl
_
set:N =
\l
__
nju
_
info
_
reviewer
_
d
_
tl,
ReviewerD .tl
_
set:N =
\l
__
nju
_
info
_
reviewer
_
d
_
tl,
% 国家图书馆封面相关
}
\keys
_
define:nn
{
nju / info
}
{
Classification .tl
_
set:N =
\l
__
nju
_
info
_
classif
_
tl,
Classification .tl
_
set:N =
\l
__
nju
_
info
_
classif
_
tl,
SecurityLevel .tl
_
set:N =
\l
__
nju
_
info
_
seclv
_
tl,
SecurityLevel .tl
_
set:N =
\l
__
nju
_
info
_
seclv
_
tl,
UDC .tl
_
set:N =
\l
__
nju
_
info
_
udc
_
tl,
UDC .tl
_
set:N =
\l
__
nju
_
info
_
udc
_
tl,
...
@@ -372,7 +396,7 @@
...
@@ -372,7 +396,7 @@
\fancyhead
{}
\fancyhead
{}
\fancyfoot
[C]
{
\zihao
{
5
}
\thepage
}
\fancyfoot
[C]
{
\zihao
{
5
}
\thepage
}
}
}
\str
_
if
_
eq:NNTF
{
\nju
_
degree
}
{
ug
}
\str
_
if
_
eq:NNTF
{
\
l
__
nju
_
info
_
degree
_
tl
}
{
ug
}
{
{
% the header line
% the header line
\tl
_
set:Nn
\headrulewidth
{
0pt
}
\tl
_
set:Nn
\headrulewidth
{
0pt
}
...
@@ -690,10 +714,10 @@ numberwithin=section,
...
@@ -690,10 +714,10 @@ numberwithin=section,
\l
__
nju
_
info
_
supv
_
b
_
title
_
en
_
tl
\l
__
nju
_
info
_
supv
_
b
_
title
_
en
_
tl
}
}
}
}
\str
_
if
_
eq:NNTF
{
\nju
_
degree
}
{
ug
}
\str
_
if
_
eq:NNTF
{
\
l
__
nju
_
info
_
degree
_
tl
}
{
ug
}
{
{
% 本科
% 本科
\tl
_
const:Nn
\
c
__
nju
_
name
_
diploma
_
tl
{
本
\hfill
科
\hfill
}
\tl
_
const:Nn
\
l
__
nju
_
name
_
diploma
_
tl
{
本
\hfill
科
\hfill
}
\tl
_
const:Nn
\c
__
nju
_
name
_
title
_
tl
{
题
\hfill
目
}
\tl
_
const:Nn
\c
__
nju
_
name
_
title
_
tl
{
题
\hfill
目
}
\tl
_
const:Nn
\c
__
nju
_
cover
_
uline
_
len
_
a
_
tl
{
250pt
}
\tl
_
const:Nn
\c
__
nju
_
cover
_
uline
_
len
_
a
_
tl
{
250pt
}
...
@@ -709,23 +733,23 @@ numberwithin=section,
...
@@ -709,23 +733,23 @@ numberwithin=section,
}
}
{
{
% 本科以外都是研究生
% 本科以外都是研究生
\tl
_
const:Nn
\
c
__
nju
_
name
_
diploma
_
tl
{
研
\hfill
究
\hfill
生
\hfill
}
\tl
_
const:Nn
\
l
__
nju
_
name
_
diploma
_
tl
{
研
\hfill
究
\hfill
生
\hfill
}
\tl
_
const:Nn
\c
__
nju
_
name
_
title
_
tl
{
论
\hfill
文
\hfill
题
\hfill
目
}
\tl
_
const:Nn
\c
__
nju
_
name
_
title
_
tl
{
论
\hfill
文
\hfill
题
\hfill
目
}
\tl
_
const:Nn
\c
__
nju
_
cover
_
uline
_
len
_
a
_
tl
{
250pt
}
\tl
_
const:Nn
\c
__
nju
_
cover
_
uline
_
len
_
a
_
tl
{
250pt
}
\tl
_
const:Nn
\c
__
nju
_
cover
_
uline
_
len
_
b
_
tl
{
14em
}
\tl
_
const:Nn
\c
__
nju
_
cover
_
uline
_
len
_
b
_
tl
{
14em
}
\tl
_
const:Nn
\c
__
nju
_
cover
_
uline
_
font
_
tl
{
\kaishu
}
\tl
_
const:Nn
\c
__
nju
_
cover
_
uline
_
font
_
tl
{
\kaishu
}
\tl
_
const:Nn
\c
__
nju
_
cover
_
uline
_
style
_
tl
{
}
\tl
_
const:Nn
\c
__
nju
_
cover
_
uline
_
style
_
tl
{}
\tl
_
const:Nn
\c
__
nju
_
cover
_
uline
_
bskip
_
tl
{
\hspace
{
1em
}
}
\tl
_
const:Nn
\c
__
nju
_
cover
_
uline
_
bskip
_
tl
{
\hspace
{
1em
}
}
\tl
_
const:Nn
\c
__
nju
_
cover
_
box
_
len
_
tl
{
6em
}
\tl
_
const:Nn
\c
__
nju
_
cover
_
box
_
len
_
tl
{
6em
}
% 研究生学位分类
% 研究生学位分类
\str
_
case
_
e:nn
{
\nju
_
degree
}
\str
_
case
_
e:nn
{
\
l
__
nju
_
info
_
degree
_
tl
}
{
{
{
mg
}
{
\tl
_
const:Nn
\c
__
nju
_
name
_
degree
_
tl
{
硕士
}
}
{
mg
}
{
\tl
_
const:Nn
\c
__
nju
_
name
_
degree
_
tl
{
硕士
}
}
{
mf
}
{
\tl
_
const:Nn
\c
__
nju
_
name
_
degree
_
tl
{
硕士专业
}
}
{
mf
}
{
\tl
_
const:Nn
\c
__
nju
_
name
_
degree
_
tl
{
硕士专业
}
}
{
phd
}
{
\tl
_
const:Nn
\c
__
nju
_
name
_
degree
_
tl
{
博士
}
}
{
phd
}
{
\tl
_
const:Nn
\c
__
nju
_
name
_
degree
_
tl
{
博士
}
}
}
}
}
}
\cs
_
new:Npn
\_
_
nju
_
cover
_
uline
_
a:n #1
\cs
_
new:Npn
\_
_
nju
_
cover
_
uline
_
a:n #1
...
@@ -748,14 +772,14 @@ numberwithin=section,
...
@@ -748,14 +772,14 @@ numberwithin=section,
\makebox
[\c__nju_cover_box_len_tl][s]
{
\makebox
[\c__nju_cover_box_len_tl][s]
{
#1
\c
__
nju
_
cover
_
uline
_
bskip
_
tl
}
#1
\c
__
nju
_
cover
_
uline
_
bskip
_
tl
}
}
}
\str
_
if
_
eq:NNTF
{
\nju
_
type
}
{
thesis
}
\str
_
if
_
eq:NNTF
{
\l
__
nju
_
info
_
type
_
tl
}
{
thesis
}
{
{
\tl
_
const:Nn
\nju
_
type
_
name
\tl
_
const:Nn
\
l
__
nju
_
info
_
type
_
tl
_
name
{
\
c
__
nju
_
name
_
diploma
_
tl 毕
\hfill
业
\hfill
论
\hfill
文
}
{
\
l
__
nju
_
name
_
diploma
_
tl 毕
\hfill
业
\hfill
论
\hfill
文
}
}
}
{
{
\tl
_
const:Nn
\nju
_
type
_
name
\tl
_
const:Nn
\
l
__
nju
_
info
_
type
_
tl
_
name
{
\
c
__
nju
_
name
_
diploma
_
tl 毕
\hfill
业
\hfill
设
\hfill
计
}
{
\
l
__
nju
_
name
_
diploma
_
tl 毕
\hfill
业
\hfill
设
\hfill
计
}
}
}
\cs
_
new
_
protected:Npn
\_
_
nju
_
cover
_
title
_
breakline:
\cs
_
new
_
protected:Npn
\_
_
nju
_
cover
_
title
_
breakline:
{
{
...
@@ -778,63 +802,63 @@ numberwithin=section,
...
@@ -778,63 +802,63 @@ numberwithin=section,
}
}
}
}
}
}
\tl
_
new:N
\nju
_
printcoverinfo
_
ug
\cs
_
new
_
protected:Npn
\_
_
nju
_
print
_
covertab:
\tl
_
set:Nn
\nju
_
printcoverinfo
_
ug
{
%
{
\str
_
if
_
eq:NNTF
{
\l
__
nju
_
info
_
degree
_
tl
}
{
ug
}
\begin{tabular}
{
p
{
4.2em
}
c
}
{
\_
_
nju
_
cover
_
box:n
{
院
\hfill
系
}
\begin{tabular}
{
p
{
4.2em
}
c
}
&
\_
_
nju
_
cover
_
uline
_
a:n
{
\l
__
nju
_
info
_
dept
_
tl
}
\\
\_
_
nju
_
cover
_
box:n
{
院
\hfill
系
}
\_
_
nju
_
cover
_
box:n
{
专
\hfill
业
}
&
\_
_
nju
_
cover
_
uline
_
a:n
{
\l
__
nju
_
info
_
dept
_
tl
}
\\
&
\_
_
nju
_
cover
_
uline
_
a:n
{
\l
__
nju
_
major
_
tl
}
\\
\_
_
nju
_
cover
_
box:n
{
专
\hfill
业
}
\_
_
nju
_
cover
_
title
_
breakline:
&
\_
_
nju
_
cover
_
uline
_
a:n
{
\l
__
nju
_
major
_
tl
}
\\
\end{tabular}
\\
\_
_
nju
_
cover
_
title
_
breakline:
\end{tabular}
\\
\begin{tabular}
{
p
{
4.2em
}
cp
{
4.2em
}
c
}
\_
_
nju
_
cover
_
box:n
{
年
\hfill
级
}
&
\_
_
nju
_
cover
_
uline
_
b:n
{
\l
__
nju
_
info
_
grade
_
tl
}
&
\_
_
nju
_
cover
_
box:n
{
学
\hfill
号
}
&
\_
_
nju
_
cover
_
uline
_
b:n
{
\l
__
nju
_
info
_
id
_
tl
}
\\
\end{tabular}
\\
\begin{tabular}
{
p
{
4.2em
}
c
}
\begin{tabular}
{
p
{
4.2em
}
cp
{
4.2em
}
c
}
\_
_
nju
_
cover
_
box:n
{
学
\hfill
生
\hfill
姓
\hfill
名
}
\_
_
nju
_
cover
_
box:n
{
年
\hfill
级
}
&
\_
_
nju
_
cover
_
uline
_
a:n
{
\l
__
nju
_
info
_
author
_
tl
}
&
\_
_
nju
_
cover
_
uline
_
b:n
{
\l
__
nju
_
info
_
grade
_
tl
}
\end{tabular}
\\
&
\_
_
nju
_
cover
_
box:n
{
学
\hfill
号
}
\begin{tabular}
{
p
{
4.2em
}
cp
{
4.2em
}
c
}
&
\_
_
nju
_
cover
_
uline
_
b:n
{
\l
__
nju
_
info
_
id
_
tl
}
\\
\_
_
nju
_
cover
_
box:n
{
导
\hfill
师
}
\end{tabular}
\\
&
\_
_
nju
_
cover
_
uline
_
b:n
{
\l
__
nju
_
info
_
supv
_
a
_
tl
}
&
\_
_
nju
_
cover
_
box:n
{
职
\hfill
称
}
&
\_
_
nju
_
cover
_
uline
_
b:n
{
\l
__
nju
_
info
_
supv
_
a
_
title
_
tl
}
\\
% 第二导师
\begin{tabular}
{
p
{
4.2em
}
c
}
\tl
_
if
_
empty:NF
\l
__
nju
_
info
_
supv
_
b
_
tl
\_
_
nju
_
cover
_
box:n
{
学
\hfill
生
\hfill
姓
\hfill
名
}
{
&
\_
_
nju
_
cover
_
uline
_
a:n
{
\l
__
nju
_
info
_
author
_
tl
}
\_
_
nju
_
cover
_
box:n
{
第
\hfill
二
\hfill
导
\hfill
师
}
\end{tabular}
\\
&
\_
_
nju
_
cover
_
uline
_
b:n
{
\l
__
nju
_
info
_
supv
_
b
_
tl
}
\begin{tabular}
{
p
{
4.2em
}
cp
{
4.2em
}
c
}
\_
_
nju
_
cover
_
box:n
{
导
\hfill
师
}
&
\_
_
nju
_
cover
_
uline
_
b:n
{
\l
__
nju
_
info
_
supv
_
a
_
tl
}
&
\_
_
nju
_
cover
_
box:n
{
职
\hfill
称
}
&
\_
_
nju
_
cover
_
box:n
{
职
\hfill
称
}
&
\_
_
nju
_
cover
_
uline
_
b:n
{
\l
__
nju
_
info
_
supv
_
b
_
title
_
tl
}
\\
&
\_
_
nju
_
cover
_
uline
_
b:n
{
\l
__
nju
_
info
_
supv
_
a
_
title
_
tl
}
\\
}
\end{tabular}
\\
\begin{tabular}
{
p
{
4.2em
}
c
}
% 第二导师
\_
_
nju
_
cover
_
box:n
{
提
\hfill
交
\hfill
日
\hfill
期
}
\tl
_
if
_
empty:NF
\l
__
nju
_
info
_
supv
_
b
_
tl
&
\_
_
nju
_
cover
_
uline
_
a:n
{
\l
__
nju
_
submit
_
date
_
tl
}
\\
{
\end{tabular}
\_
_
nju
_
cover
_
box:n
{
第
\hfill
二
\hfill
导
\hfill
师
}
}
&
\_
_
nju
_
cover
_
uline
_
b:n
{
\l
__
nju
_
info
_
supv
_
b
_
tl
}
\tl
_
new:N
\nju
_
printcoverinfo
_
g
&
\_
_
nju
_
cover
_
box:n
{
职
\hfill
称
}
\tl
_
set:Nn
\nju
_
printcoverinfo
_
g
&
\_
_
nju
_
cover
_
uline
_
b:n
{
\l
__
nju
_
info
_
supv
_
b
_
title
_
tl
}
\\
{
}
\begin{tabular}
{
p
{
6em
}
c
}
\end{tabular}
\\
\_
_
nju
_
cover
_
title
_
breakline:
\_
_
nju
_
cover
_
box:n
{
作
\hfill
者
\hfill
姓
\hfill
名
}
\begin{tabular}
{
p
{
4.2em
}
c
}
&
\_
_
nju
_
cover
_
uline
_
a:n
{
\l
__
nju
_
info
_
author
_
tl
}
\\
\_
_
nju
_
cover
_
box:n
{
提
\hfill
交
\hfill
日
\hfill
期
}
\_
_
nju
_
cover
_
box:n
{
专
\hfill
业
\hfill
名
\hfill
称
}
&
\_
_
nju
_
cover
_
uline
_
a:n
{
\l
__
nju
_
submit
_
date
_
tl
}
\\
&
\_
_
nju
_
cover
_
uline
_
a:n
{
\l
__
nju
_
major
_
tl
}
\\
\end{tabular}
\_
_
nju
_
cover
_
box:n
{
研
\hfill
究
\hfill
方
\hfill
向
}
}
&
\_
_
nju
_
cover
_
uline
_
a:n
{
\l
__
nju
_
field
_
tl
}
\\
{
\_
_
nju
_
cover
_
box:n
{
指
\hfill
导
\hfill
教
\hfill
师
}
\begin{tabular}
{
p
{
6em
}
c
}
&
\_
_
nju
_
cover
_
uline
_
a:n
{
\l
__
nju
_
info
_
supv
_
full
_
tl
}
\\
\_
_
nju
_
cover
_
title
_
breakline:
\end{tabular}
\_
_
nju
_
cover
_
box:n
{
作
\hfill
者
\hfill
姓
\hfill
名
}
&
\_
_
nju
_
cover
_
uline
_
a:n
{
\l
__
nju
_
info
_
author
_
tl
}
\\
\_
_
nju
_
cover
_
box:n
{
专
\hfill
业
\hfill
名
\hfill
称
}
&
\_
_
nju
_
cover
_
uline
_
a:n
{
\l
__
nju
_
major
_
tl
}
\\
\_
_
nju
_
cover
_
box:n
{
研
\hfill
究
\hfill
方
\hfill
向
}
&
\_
_
nju
_
cover
_
uline
_
a:n
{
\l
__
nju
_
field
_
tl
}
\\
\_
_
nju
_
cover
_
box:n
{
指
\hfill
导
\hfill
教
\hfill
师
}
&
\_
_
nju
_
cover
_
uline
_
a:n
{
\l
__
nju
_
info
_
supv
_
full
_
tl
}
\\
\end{tabular}
}
}
}
\tl
_
new:N
\nju
_
printcover
_
nl
% 国家图书馆封面
\tl
_
new:N
\nju
_
printcover
_
nl
% 国家图书馆封面
\tl
_
new:N
\nju
_
printcover
_
ug
% 本科封面
\tl
_
new:N
\nju
_
printcover
_
ug
% 本科封面
...
@@ -926,14 +950,15 @@ numberwithin=section,
...
@@ -926,14 +950,15 @@ numberwithin=section,
\begin{center}
\begin{center}
\includegraphics
[height=3.35cm]
{
njuname
}
\includegraphics
[height=3.35cm]
{
njuname
}
\vskip
10mm
\vskip
10mm
{
\zihao
{
1
}
\makebox
[9em][s]
{
\bf
{
\songti\nju
_
type
_
name
}}}
{
\zihao
{
1
}
\makebox
[9em][s]
{
\bf
{
\songti\
l
__
nju
_
info
_
type
_
tl
_
name
}}}
\vfill
\vfill
\vskip\stretch
{
0
}
\vskip\stretch
{
0
}
{
\bgroup
{
\bgroup
\kaishu\zihao
{
3
}
\kaishu\zihao
{
3
}
\def\tabcolsep
{
1pt
}
\def\tabcolsep
{
1pt
}
\def\arraystretch
{
1.5
}
\def\arraystretch
{
1.5
}
\nju
_
printcoverinfo
_
ug
% 绘制信息框
% 绘制信息框
\_
_
nju
_
print
_
covertab:
\egroup
}
\egroup
}
\vfill
\vfill
\end{center}
\end{center}
...
@@ -955,7 +980,7 @@ numberwithin=section,
...
@@ -955,7 +980,7 @@ numberwithin=section,
\vskip
10mm
\vskip
10mm
\includegraphics
[height=2cm]
{
njuname-large
}
\includegraphics
[height=2cm]
{
njuname-large
}
\vskip
15mm
\vskip
15mm
{
\zihao
{
1
}
\makebox
[10em][s]
{
\bf
{
\kaishu\nju
_
type
_
name
}}}
{
\zihao
{
1
}
\makebox
[10em][s]
{
\bf
{
\kaishu\
l
__
nju
_
info
_
type
_
tl
_
name
}}}
\vskip
5mm
\vskip
5mm
{
\zihao
{
1
}
\bf
{
\kaishu
{
(申请
\c
__
nju
_
name
_
degree
_
tl 学位)
}}}
{
\zihao
{
1
}
\bf
{
\kaishu
{
(申请
\c
__
nju
_
name
_
degree
_
tl 学位)
}}}
\par\vfill
\par\vfill
...
@@ -965,7 +990,8 @@ numberwithin=section,
...
@@ -965,7 +990,8 @@ numberwithin=section,
\def\tabcolsep
{
1pt
}
\def\tabcolsep
{
1pt
}
\def\arraystretch
{
1.5
}
\def\arraystretch
{
1.5
}
\vskip
10mm
\vskip
10mm
\nju
_
printcoverinfo
_
g
% 绘制信息框
% 绘制信息框
\_
_
nju
_
print
_
covertab:
\egroup
}
\egroup
}
\vfill
\vfill
\vskip
10mm
\vskip
10mm
...
@@ -994,7 +1020,7 @@ numberwithin=section,
...
@@ -994,7 +1020,7 @@ numberwithin=section,
}
}
\tl
_
set:Nn
\maketitle
\tl
_
set:Nn
\maketitle
{
%
{
%
\str
_
if
_
eq:NNTF
{
\nju
_
degree
}
{
ug
}
\str
_
if
_
eq:NNTF
{
\
l
__
nju
_
info
_
degree
_
tl
}
{
ug
}
{
{
\nju
_
printcover
_
nl
% 国家图书馆封面
\nju
_
printcover
_
nl
% 国家图书馆封面
\nju
_
printcover
_
ug
% 本科封面
\nju
_
printcover
_
ug
% 本科封面
...
@@ -1004,7 +1030,7 @@ numberwithin=section,
...
@@ -1004,7 +1030,7 @@ numberwithin=section,
\nju
_
printcover
_
g
% 研究生封面
\nju
_
printcover
_
g
% 研究生封面
}
}
}
}
\str
_
if
_
eq:NNTF
{
\nju
_
degree
}
{
ug
}
\str
_
if
_
eq:NNTF
{
\
l
__
nju
_
info
_
degree
_
tl
}
{
ug
}
{
{
% 本科摘要环境
% 本科摘要环境
\NewDocumentEnvironment
{
abstract
}
{}
\NewDocumentEnvironment
{
abstract
}
{}
...
@@ -1094,7 +1120,7 @@ numberwithin=section,
...
@@ -1094,7 +1120,7 @@ numberwithin=section,
毕业论文题目:
\hspace
{
0.5em
}
\nju
_
underline:n
{
\l
__
nju
_
info
_
title
_
tl
\hfill
}
\\
毕业论文题目:
\hspace
{
0.5em
}
\nju
_
underline:n
{
\l
__
nju
_
info
_
title
_
tl
\hfill
}
\\
\uline
{
\makebox
[9em]
{
\l
__
nju
_
major
_
tl
}}
专业
\uline
{
\makebox
[9em]
{
\l
__
nju
_
major
_
tl
}}
专业
\uline
{
\makebox
[4em]
{
\l
__
nju
_
info
_
grade
_
tl
}}
级
\uline
{
\makebox
[4em]
{
\l
__
nju
_
info
_
grade
_
tl
}}
级
\str
_
if
_
eq:NNTF
{
\nju
_
degree
}
{
phd
}
{
博
}{
硕
}
\str
_
if
_
eq:NNTF
{
\
l
__
nju
_
info
_
degree
_
tl
}
{
phd
}
{
博
}{
硕
}
士生姓名:
\uline
{
\hfill\l
__
nju
_
info
_
author
_
tl
\hfill
}
\\
士生姓名:
\uline
{
\hfill\l
__
nju
_
info
_
author
_
tl
\hfill
}
\\
指导教师(姓名、职称):
\uline
{
\hfill\l
__
nju
_
info
_
supv
_
full
_
tl
\hfill
}
\par
指导教师(姓名、职称):
\uline
{
\hfill\l
__
nju
_
info
_
supv
_
full
_
tl
\hfill
}
\par
\egroup
\egroup
...
...
This diff is collapsed.
Click to expand it.
njuthesis.dtx
+
145
−
111
View file @
b7c9fba1
...
@@ -572,7 +572,6 @@ through XeTeX.
...
@@ -572,7 +572,6 @@ through XeTeX.
% \section{代码实现}
% \section{代码实现}
% @@在l3docstrip中表示名空间,在生成cls时会被相应字段替换,譬如在njuthesis中@@=nju
% @@在l3docstrip中表示名空间,在生成cls时会被相应字段替换,譬如在njuthesis中@@=nju
%
%
% laTex默认1.2行距,word默认行距是1.3,要求1.5倍word行距,故1.5/1.2*1.3 = 1.625
% \begin{macrocode}
% \begin{macrocode}
%<@@=nju>
%<@@=nju>
%<*class>
%<*class>
...
@@ -581,125 +580,155 @@ through XeTeX.
...
@@ -581,125 +580,155 @@ through XeTeX.
twoside,
twoside,
UTF8,
UTF8,
scheme=chinese,
scheme=chinese,
% \end{macrocode}
%
% 关于行距,\hologo{LaTeX}默认1.2行距,word默认行距是1.3,要求1.5倍word行距,故
% \[ 1.5\times\frac{1.3}{1.2} = 1.625\]
% \begin{macrocode}
linespread=1.625,
linespread=1.625,
fontset=none,
fontset=none,
zihao=-4
zihao=-4
]{ctexbook}[2018/04/01]
]{ctexbook}[2018/04/01]
% \end{macrocode}
% \end{macrocode}
%
%
%
Put text here.
%
是否需要国家图书馆封面的设置
% \begin{macrocode}
% \begin{macrocode}
\RequirePackage{l3keys2e}
\RequirePackage{l3keys2e}
% \end{macrocode}
% \end{macrocode}
% 用于存储学位名称的全局变量,注意宏的命名,l代表局部变量,g代表全局变量
% \begin{macrocode}
\tl_new:N \l_@@_info_degree_tl
\tl_new:N \l_@@_info_type_tl
% \end{macrocode}
%
%
% 是否需要国家图书馆封面的设置
% \begin{macrocode}
% \begin{macrocode}
\keys_define:nn { nju }
\keys_define:nn { nju }
{
{
nlcover .bool_set:N = \nju_nl_cover,
nlcover .bool_set:N = \nju_nl_cover,
nlcover .initial:n = false,
nlcover .initial:n = false,
}
% \end{macrocode}
% \end{macrocode}
%
%
% 学位信息的设置
% \begin{macrocode}
% \begin{macrocode}
degree .tl_set:N = \nju_degree,
\keys_define:nn { nju }
degree .initial:n = ug,
{
% \end{macrocode}
degree .choices:nn =
%
{ ug, mg, mg, phd }
% \begin{macrocode}
{ \tl_set_eq:NN \l_@@_info_degree_tl \l_keys_choice_tl },
type .tl_set:N = \nju_type,
type .choices:nn =
type .initial:n = thesis,
{ thesis, design }
{ \tl_set_eq:NN \l_@@_info_type_tl \l_keys_choice_tl },
}
}
% \end{macrocode}
% \end{macrocode}
%
%
% Put text here.
% \subsection{个人信息}
% 输入
% \begin{macrocode}
% \begin{macrocode}
\keys_define:nn { nju }
\keys_define:nn { nju }
{
{
info
.meta:nn
=
{ nju / info } { #1 }
info.meta:nn
=
{ nju / info } { #1 }
}
}
\keys_define:nn { nju / info }
{
% \end{macrocode}
% \end{macrocode}
%
%
%
Put text here.
%
题目
% \begin{macrocode}
% \begin{macrocode}
% 题目
\keys_define:nn { nju / info }
{
TitleA .tl_set:N = \l_@@_info_title_a_tl,
TitleA .tl_set:N = \l_@@_info_title_a_tl,
TitleB .tl_set:N = \l_@@_info_title_b_tl,
TitleB .tl_set:N = \l_@@_info_title_b_tl,
TitleC .tl_set:N = \l_@@_info_title_c_tl,
TitleC .tl_set:N = \l_@@_info_title_c_tl,
Title* .tl_set:N = \l_@@_info_title_en_tl,
Title* .tl_set:N = \l_@@_info_title_en_tl,
}
% \end{macrocode}
% \end{macrocode}
%
%
%
Put text here.
%
年级、学号、姓名
% \begin{macrocode}
% \begin{macrocode}
% 年级学号姓名
\keys_define:nn { nju / info }
{
Grade .tl_set:N = \l_@@_info_grade_tl,
Grade .tl_set:N = \l_@@_info_grade_tl,
StudentID .tl_set:N = \l_@@_info_id_tl,
StudentID .tl_set:N = \l_@@_info_id_tl,
StudentName .tl_set:N = \l_@@_info_author_tl,
StudentName .tl_set:N = \l_@@_info_author_tl,
StudentName* .tl_set:N = \l_@@_info_author_en_tl,
StudentName* .tl_set:N = \l_@@_info_author_en_tl,
}
% \end{macrocode}
% \end{macrocode}
%
%
%
Put text here.
%
院系、专业、方向
% \begin{macrocode}
% \begin{macrocode}
% 院系专业方向
\keys_define:nn { nju / info }
{
Department .tl_set:N = \l_@@_info_dept_tl,
Department .tl_set:N = \l_@@_info_dept_tl,
Department* .tl_set:N = \l_@@_info_dept_en_tl,
Department* .tl_set:N = \l_@@_info_dept_en_tl,
Major .tl_set:N = \l_@@_major_tl,
Major .tl_set:N = \l_@@_major_tl,
Major* .tl_set:N = \l_@@_major_en_tl,
Major* .tl_set:N = \l_@@_major_en_tl,
Field .tl_set:N = \l_@@_field_tl,
Field .tl_set:N = \l_@@_field_tl,
Field* .tl_set:N = \l_@@_field_en_tl,
Field* .tl_set:N = \l_@@_field_en_tl,
}
% \end{macrocode}
% \end{macrocode}
%
%
% 导师
% 导师
%
Put text here.
%
% \begin{macrocode}
% \begin{macrocode}
\keys_define:nn { nju / info }
{
SupervisorA .tl_set:N = \l_@@_info_supv_a_tl,
SupervisorA .tl_set:N = \l_@@_info_supv_a_tl,
SupervisorA* .tl_set:N = \l_@@_info_supv_a_en_tl,
SupervisorA* .tl_set:N = \l_@@_info_supv_a_en_tl,
SupervisorATitle .tl_set:N = \l_@@_info_supv_a_title_tl,
SupervisorATitle .tl_set:N = \l_@@_info_supv_a_title_tl,
SupervisorATitle* .tl_set:N = \l_@@_info_supv_a_title_en_tl,
SupervisorATitle* .tl_set:N = \l_@@_info_supv_a_title_en_tl,
}
% \end{macrocode}
% \end{macrocode}
%
%
% 第二导师
% 第二导师
%
Put text here.
%
% \begin{macrocode}
% \begin{macrocode}
\keys_define:nn { nju / info }
{
SupervisorB .tl_set:N = \l_@@_info_supv_b_tl,
SupervisorB .tl_set:N = \l_@@_info_supv_b_tl,
SupervisorB* .tl_set:N = \l_@@_info_supv_b_en_tl,
SupervisorB* .tl_set:N = \l_@@_info_supv_b_en_tl,
SupervisorBTitle .tl_set:N = \l_@@_info_supv_b_title_tl,
SupervisorBTitle .tl_set:N = \l_@@_info_supv_b_title_tl,
SupervisorBTitle* .tl_set:N = \l_@@_info_supv_b_title_en_tl,
SupervisorBTitle* .tl_set:N = \l_@@_info_supv_b_title_en_tl,
}
% \end{macrocode}
% \end{macrocode}
%
%
% Put text here.
% 提交日期
% 提交日期
% \begin{macrocode}
% \begin{macrocode}
\keys_define:nn { nju / info }
{
SubmitDate .tl_set:N = \l_@@_submit_date_tl,
SubmitDate .tl_set:N = \l_@@_submit_date_tl,
}
% \end{macrocode}
% \end{macrocode}
%
%
% Put text here.
% 答辩
% 答辩
% \begin{macrocode}
% \begin{macrocode}
\keys_define:nn { nju / info }
{
DefendDate .tl_set:N = \l_@@_defend_date_tl,
DefendDate .tl_set:N = \l_@@_defend_date_tl,
ReviewerChairman .tl_set:N = \l_@@_info_chairman_tl,
ReviewerChairman .tl_set:N = \l_@@_info_chairman_tl,
ReviewerA .tl_set:N = \l_@@_info_reviewer_a_tl,
ReviewerA .tl_set:N = \l_@@_info_reviewer_a_tl,
ReviewerB .tl_set:N = \l_@@_info_reviewer_b_tl,
ReviewerB .tl_set:N = \l_@@_info_reviewer_b_tl,
ReviewerC .tl_set:N = \l_@@_info_reviewer_c_tl,
ReviewerC .tl_set:N = \l_@@_info_reviewer_c_tl,
ReviewerD .tl_set:N = \l_@@_info_reviewer_d_tl,
ReviewerD .tl_set:N = \l_@@_info_reviewer_d_tl,
}
% \end{macrocode}
% \end{macrocode}
%
%
%
Put text here.
%
国家图书馆封面相关
% \begin{macrocode}
% \begin{macrocode}
% 国家图书馆封面相关
\keys_define:nn { nju / info }
{
Classification .tl_set:N = \l_@@_info_classif_tl,
Classification .tl_set:N = \l_@@_info_classif_tl,
SecurityLevel .tl_set:N = \l_@@_info_seclv_tl,
SecurityLevel .tl_set:N = \l_@@_info_seclv_tl,
UDC .tl_set:N = \l_@@_info_udc_tl,
UDC .tl_set:N = \l_@@_info_udc_tl,
SupervisorContact .tl_set:N = \l_@@_info_supv_cont_tl,
SupervisorContact .tl_set:N = \l_@@_info_supv_cont_tl,
}
}
% \end{macrocode}
% \end{macrocode}
%
%
定义用于设置个人信息的命令
% \begin{macrocode}
% \begin{macrocode}
\NewDocumentCommand \njusetup { m }
\NewDocumentCommand \njusetup { m }
{ \keys_set:nn { nju } { #1 } }
{ \keys_set:nn { nju } { #1 } }
% \end{macrocode}
% \end{macrocode}
%
%
%
mandatory and optional arguments are, and so forth.
%
设置页边距
% \begin{macrocode}
% \begin{macrocode}
\RequirePackage[
\RequirePackage[
top=2.5cm,
top=2.5cm,
...
@@ -707,6 +736,10 @@ through XeTeX.
...
@@ -707,6 +736,10 @@ through XeTeX.
left=3.2cm,
left=3.2cm,
right=3.2cm
right=3.2cm
]{geometry}
]{geometry}
% \end{macrocode}
%
% mandatory and optional arguments are, and so forth.
% \begin{macrocode}
\RequirePackage{xparse}
\RequirePackage{xparse}
\RequirePackage{titletoc} % 修改目录内标题格式
\RequirePackage{titletoc} % 修改目录内标题格式
\RequirePackage[hyphens]{url} % generate better linebreaks in the url
\RequirePackage[hyphens]{url} % generate better linebreaks in the url
...
@@ -821,7 +854,7 @@ through XeTeX.
...
@@ -821,7 +854,7 @@ through XeTeX.
%
%
%
%
% \begin{variable}{\g_@@_latin_fontset_tl,\g_@@_cjk_fontset_tl}
% \begin{variable}{\g_@@_latin_fontset_tl,\g_@@_cjk_fontset_tl}
% 用于存储所使用字体名称的全局变量
,注意宏的命名,l代表局部变量,g代表全局变量
% 用于存储所使用字体名称的全局变量
% \begin{macrocode}
% \begin{macrocode}
\tl_new:N \g_@@_latin_fontset_tl
\tl_new:N \g_@@_latin_fontset_tl
\tl_new:N \g_@@_cjk_fontset_tl
\tl_new:N \g_@@_cjk_fontset_tl
...
@@ -1154,7 +1187,7 @@ through XeTeX.
...
@@ -1154,7 +1187,7 @@ through XeTeX.
%
%
% Put text here.
% Put text here.
% \begin{macrocode}
% \begin{macrocode}
\str_if_eq:NNTF {\
nju
_degree} { ug }
\str_if_eq:NNTF {\
l_@@_info
_degree
_tl
} { ug }
{
{
% the header line
% the header line
\tl_set:Nn \headrulewidth {0pt}
\tl_set:Nn \headrulewidth {0pt}
...
@@ -1607,10 +1640,10 @@ through XeTeX.
...
@@ -1607,10 +1640,10 @@ through XeTeX.
% Put text here.
% Put text here.
% \begin{macrocode}
% \begin{macrocode}
% 判断学位进行命令定义
% 判断学位进行命令定义
\str_if_eq:NNTF {\
nju
_degree} { ug }
\str_if_eq:NNTF {\
l_@@_info
_degree
_tl
} { ug }
{
{
% 本科
% 本科
\tl_const:Nn \
c
_@@_name_diploma_tl { 本\hfill 科\hfill }
\tl_const:Nn \
l
_@@_name_diploma_tl { 本\hfill 科\hfill }
\tl_const:Nn \c_@@_name_title_tl { 题\hfill 目 }
\tl_const:Nn \c_@@_name_title_tl { 题\hfill 目 }
\tl_const:Nn \c_@@_cover_uline_len_a_tl { 250pt }
\tl_const:Nn \c_@@_cover_uline_len_a_tl { 250pt }
...
@@ -1626,30 +1659,30 @@ through XeTeX.
...
@@ -1626,30 +1659,30 @@ through XeTeX.
}
}
{
{
% 本科以外都是研究生
% 本科以外都是研究生
\tl_const:Nn \
c
_@@_name_diploma_tl { 研\hfill 究\hfill 生\hfill }
\tl_const:Nn \
l
_@@_name_diploma_tl { 研\hfill 究\hfill 生\hfill }
\tl_const:Nn \c_@@_name_title_tl { 论\hfill 文\hfill 题\hfill 目 }
\tl_const:Nn \c_@@_name_title_tl { 论\hfill 文\hfill 题\hfill 目 }
\tl_const:Nn \c_@@_cover_uline_len_a_tl { 250pt }
\tl_const:Nn \c_@@_cover_uline_len_a_tl { 250pt }
\tl_const:Nn \c_@@_cover_uline_len_b_tl { 14em }
\tl_const:Nn \c_@@_cover_uline_len_b_tl { 14em }
\tl_const:Nn \c_@@_cover_uline_font_tl { \kaishu }
\tl_const:Nn \c_@@_cover_uline_font_tl { \kaishu }
\tl_const:Nn \c_@@_cover_uline_style_tl {
}
\tl_const:Nn \c_@@_cover_uline_style_tl {}
\tl_const:Nn \c_@@_cover_uline_bskip_tl { \hspace{1em} }
\tl_const:Nn \c_@@_cover_uline_bskip_tl { \hspace{1em} }
\tl_const:Nn \c_@@_cover_box_len_tl { 6em }
\tl_const:Nn \c_@@_cover_box_len_tl { 6em }
% 研究生学位分类
% 研究生学位分类
\str_case_e:nn { \
nju
_degree }
\str_case_e:nn { \
l_@@_info
_degree
_tl
}
{
{
{ mg } { \tl_const:Nn \c_@@_name_degree_tl {硕士} }
{ mg } { \tl_const:Nn \c_@@_name_degree_tl {
硕士
} }
{ mf } { \tl_const:Nn \c_@@_name_degree_tl {硕士专业} }
{ mf } { \tl_const:Nn \c_@@_name_degree_tl {
硕士专业
} }
{ phd } { \tl_const:Nn \c_@@_name_degree_tl {博士} }
{ phd } { \tl_const:Nn \c_@@_name_degree_tl {
博士
} }
}
}
}
}
% \end{macrocode}
% \end{macrocode}
%
%
% Put text here.
% \begin{macro}{\@@_cover_uline_a:n}
% 在封面绘制下划线
% \begin{macrocode}
% \begin{macrocode}
% 封面下划线
\cs_new:Npn \@@_cover_uline_a:n #1
\cs_new:Npn \@@_cover_uline_a:n #1
{
{
\uline{\makebox[\c_@@_cover_uline_len_a_tl]
\uline{\makebox[\c_@@_cover_uline_len_a_tl]
...
@@ -1666,6 +1699,7 @@ through XeTeX.
...
@@ -1666,6 +1699,7 @@ through XeTeX.
{\rm\c_@@_cover_uline_font_tl #2 }}
{\rm\c_@@_cover_uline_font_tl #2 }}
}
}
% \end{macrocode}
% \end{macrocode}
% \end{macro}
%
%
% Put text here.
% Put text here.
% \begin{macrocode}
% \begin{macrocode}
...
@@ -1680,19 +1714,19 @@ through XeTeX.
...
@@ -1680,19 +1714,19 @@ through XeTeX.
% Put text here.
% Put text here.
% \begin{macrocode}
% \begin{macrocode}
% 判断类型
% 判断类型
\str_if_eq:NNTF {
\nju
_type} {thesis}
\str_if_eq:NNTF {
\l_@@_info
_type
_tl
} {
thesis
}
{
{
\tl_const:Nn \
nju
_type_name
\tl_const:Nn \
l_@@_info
_type_
tl_
name
{ \
c
_@@_name_diploma_tl 毕\hfill 业\hfill 论\hfill 文 }
{ \
l
_@@_name_diploma_tl 毕\hfill 业\hfill 论\hfill 文 }
}
}
{
{
\tl_const:Nn \
nju
_type_name
\tl_const:Nn \
l_@@_info
_type_
tl_
name
{ \
c
_@@_name_diploma_tl 毕\hfill 业\hfill 设\hfill 计 }
{ \
l
_@@_name_diploma_tl 毕\hfill 业\hfill 设\hfill 计 }
}
}
% \end{macrocode}
% \end{macrocode}
%
%
% \begin{macro}{\@@_cover_title_breakline:}
% 对多行标题进行自动判断,并输出换行后的结果
% 对多行标题进行自动判断,并输出换行后的结果
%
% \begin{macrocode}
% \begin{macrocode}
\cs_new_protected:Npn \@@_cover_title_breakline:
\cs_new_protected:Npn \@@_cover_title_breakline:
{
{
...
@@ -1716,74 +1750,72 @@ through XeTeX.
...
@@ -1716,74 +1750,72 @@ through XeTeX.
}
}
}
}
% \end{macrocode}
% \end{macrocode}
% \end{macro}
%
%
% Put text here.
% Put text here.
% \begin{macrocode}
% 封面信息栏 本科
% 封面信息栏 本科
\tl_new:N \nju_printcoverinfo_ug
% \begin{macrocode}
\tl_set:Nn \nju_printcoverinfo_ug
\cs_new_protected:Npn \@@_print_covertab:
{
{%
\begin{tabular}{p{4.2em}c}
\str_if_eq:NNTF { \l_@@_info_degree_tl } { ug }
\@@_cover_box:n {院\hfill 系}
{
& \@@_cover_uline_a:n {\l_@@_info_dept_tl} \\
\begin{tabular}{p{4.2em}c}
\@@_cover_box:n {专\hfill 业}
\@@_cover_box:n {院\hfill 系}
& \@@_cover_uline_a:n {\l_@@_major_tl} \\
& \@@_cover_uline_a:n {\l_@@_info_dept_tl} \\
\@@_cover_title_breakline:
\@@_cover_box:n {专\hfill 业}
\end{tabular}\\
& \@@_cover_uline_a:n {\l_@@_major_tl} \\
\@@_cover_title_breakline:
\begin{tabular}{p{4.2em}cp{4.2em}c}
\end{tabular}\\
\@@_cover_box:n {年\hfill 级}
& \@@_cover_uline_b:n {\l_@@_info_grade_tl}
& \@@_cover_box:n {学\hfill 号}
& \@@_cover_uline_b:n {\l_@@_info_id_tl}\\
\end{tabular}\\
\begin{tabular}{p{4.2em}c}
\begin{tabular}{p{4.2em}cp{4.2em}c}
\@@_cover_box:n {学\hfill 生\hfill 姓\hfill 名}
\@@_cover_box:n {年\hfill 级}
& \@@_cover_uline_a:n {\l_@@_info_author_tl}
& \@@_cover_uline_b:n {\l_@@_info_grade_tl}
\end{tabular}\\
& \@@_cover_box:n {学\hfill 号}
\begin{tabular}{p{4.2em}cp{4.2em}c}
& \@@_cover_uline_b:n {\l_@@_info_id_tl}\\
\@@_cover_box:n {导\hfill 师}
\end{tabular}\\
& \@@_cover_uline_b:n {\l_@@_info_supv_a_tl}
& \@@_cover_box:n {职\hfill 称}
\begin{tabular}{p{4.2em}c}
& \@@_cover_uline_b:n {\l_@@_info_supv_a_title_tl}\\
\@@_cover_box:n {学\hfill 生\hfill 姓\hfill 名}
& \@@_cover_uline_a:n {\l_@@_info_author_tl}
% 第二导师
\end{tabular}\\
\tl_if_empty:NF \l_@@_info_supv_b_tl
\begin{tabular}{p{4.2em}cp{4.2em}c}
{
\@@_cover_box:n {导\hfill 师}
\@@_cover_box:n {第\hfill 二\hfill 导\hfill 师}
& \@@_cover_uline_b:n {\l_@@_info_supv_a_tl}
& \@@_cover_uline_b:n {\l_@@_info_supv_b_tl}
& \@@_cover_box:n {职\hfill 称}
& \@@_cover_box:n {职\hfill 称}
& \@@_cover_uline_b:n {\l_@@_info_supv_b_title_tl}\\
& \@@_cover_uline_b:n {\l_@@_info_supv_a_title_tl}\\
}
\end{tabular}\\
% 第二导师
\tl_if_empty:NF \l_@@_info_supv_b_tl
\begin{tabular}{p{4.2em}c}
{
\@@_cover_box:n {提\hfill 交\hfill 日\hfill 期}
\@@_cover_box:n {第\hfill 二\hfill 导\hfill 师}
& \@@_cover_uline_a:n {\l_@@_submit_date_tl}\\
& \@@_cover_uline_b:n {\l_@@_info_supv_b_tl}
\end{tabular}
& \@@_cover_box:n {职\hfill 称}
& \@@_cover_uline_b:n {\l_@@_info_supv_b_title_tl}\\
}
\end{tabular}\\
\begin{tabular}{p{4.2em}c}
\@@_cover_box:n {提\hfill 交\hfill 日\hfill 期}
& \@@_cover_uline_a:n {\l_@@_submit_date_tl}\\
\end{tabular}
}
{
\begin{tabular}{p{6em}c}
\@@_cover_title_breakline:
\@@_cover_box:n {作\hfill 者\hfill 姓\hfill 名}
& \@@_cover_uline_a:n {\l_@@_info_author_tl}\\
\@@_cover_box:n {专\hfill 业\hfill 名\hfill 称}
& \@@_cover_uline_a:n {\l_@@_major_tl}\\
\@@_cover_box:n {研\hfill 究\hfill 方\hfill 向}
& \@@_cover_uline_a:n {\l_@@_field_tl}\\
\@@_cover_box:n {指\hfill 导\hfill 教\hfill 师}
& \@@_cover_uline_a:n {\l_@@_info_supv_full_tl}\\
\end{tabular}
}
}
}
% \end{macrocode}
% \end{macrocode}
%
%
% Put text here.
% Put text here.
% \begin{macrocode}
% 封面信息栏 研究生
\tl_new:N \nju_printcoverinfo_g
\tl_set:Nn \nju_printcoverinfo_g
{
\begin{tabular}{p{6em}c}
\@@_cover_title_breakline:
\@@_cover_box:n {作\hfill 者\hfill 姓\hfill 名}
& \@@_cover_uline_a:n {\l_@@_info_author_tl}\\
\@@_cover_box:n {专\hfill 业\hfill 名\hfill 称}
& \@@_cover_uline_a:n {\l_@@_major_tl}\\
\@@_cover_box:n {研\hfill 究\hfill 方\hfill 向}
& \@@_cover_uline_a:n {\l_@@_field_tl}\\
\@@_cover_box:n {指\hfill 导\hfill 教\hfill 师}
& \@@_cover_uline_a:n {\l_@@_info_supv_full_tl}\\
\end{tabular}
}
% \end{macrocode}
%
%
% Put text here.
% Put text here.
% \begin{macrocode}
% \begin{macrocode}
...
@@ -1888,14 +1920,15 @@ through XeTeX.
...
@@ -1888,14 +1920,15 @@ through XeTeX.
\begin{center}
\begin{center}
\includegraphics[height=3.35cm]{njuname}
\includegraphics[height=3.35cm]{njuname}
\vskip 10mm
\vskip 10mm
{\zihao{1}\makebox[9em][s]{\bf{\songti\
nju
_type_name}}}
{\zihao{1}\makebox[9em][s]{\bf{\songti\
l_@@_info
_type_
tl_
name}}}
\vfill
\vfill
\vskip\stretch{0}
\vskip\stretch{0}
{\bgroup
{\bgroup
\kaishu\zihao{3}
\kaishu\zihao{3}
\def\tabcolsep{1pt}
\def\tabcolsep{1pt}
\def\arraystretch{1.5}
\def\arraystretch{1.5}
\nju_printcoverinfo_ug % 绘制信息框
% 绘制信息框
\@@_print_covertab:
\egroup}
\egroup}
\vfill
\vfill
\end{center}
\end{center}
...
@@ -1922,7 +1955,7 @@ through XeTeX.
...
@@ -1922,7 +1955,7 @@ through XeTeX.
\vskip 10mm
\vskip 10mm
\includegraphics[height=2cm]{njuname-large}
\includegraphics[height=2cm]{njuname-large}
\vskip 15mm
\vskip 15mm
{\zihao{1}\makebox[10em][s]{\bf{\kaishu\
nju
_type_name}}}
{\zihao{1}\makebox[10em][s]{\bf{\kaishu\
l_@@_info
_type_
tl_
name}}}
\vskip 5mm
\vskip 5mm
{\zihao{1}\bf{\kaishu{(申请\c_@@_name_degree_tl 学位)}}}
{\zihao{1}\bf{\kaishu{(申请\c_@@_name_degree_tl 学位)}}}
\par\vfill
\par\vfill
...
@@ -1932,7 +1965,8 @@ through XeTeX.
...
@@ -1932,7 +1965,8 @@ through XeTeX.
\def\tabcolsep{1pt}
\def\tabcolsep{1pt}
\def\arraystretch{1.5}
\def\arraystretch{1.5}
\vskip 10mm
\vskip 10mm
\nju_printcoverinfo_g % 绘制信息框
% 绘制信息框
\@@_print_covertab:
\egroup}
\egroup}
\vfill
\vfill
\vskip 10mm
\vskip 10mm
...
@@ -1966,7 +2000,7 @@ through XeTeX.
...
@@ -1966,7 +2000,7 @@ through XeTeX.
% 重定义maketitle生成封面
% 重定义maketitle生成封面
\tl_set:Nn \maketitle
\tl_set:Nn \maketitle
{%
{%
\str_if_eq:NNTF { \
nju
_degree } { ug }
\str_if_eq:NNTF { \
l_@@_info
_degree
_tl
} { ug }
{
{
\nju_printcover_nl % 国家图书馆封面
\nju_printcover_nl % 国家图书馆封面
\nju_printcover_ug % 本科封面
\nju_printcover_ug % 本科封面
...
@@ -1982,7 +2016,7 @@ through XeTeX.
...
@@ -1982,7 +2016,7 @@ through XeTeX.
%
%
% \begin{macrocode}
% \begin{macrocode}
% 判断学位
% 判断学位
\str_if_eq:NNTF {\
nju
_degree} { ug }
\str_if_eq:NNTF {\
l_@@_info
_degree
_tl
} { ug }
{
{
% 本科摘要环境
% 本科摘要环境
\NewDocumentEnvironment{abstract} {}
\NewDocumentEnvironment{abstract} {}
...
@@ -2076,7 +2110,7 @@ through XeTeX.
...
@@ -2076,7 +2110,7 @@ through XeTeX.
毕业论文题目:\hspace{0.5em}\nju_underline:n {\l_@@_info_title_tl\hfill}\\
毕业论文题目:\hspace{0.5em}\nju_underline:n {\l_@@_info_title_tl\hfill}\\
\uline{\makebox[9em]{\l_@@_major_tl}}专业
\uline{\makebox[9em]{\l_@@_major_tl}}专业
\uline{\makebox[4em]{\l_@@_info_grade_tl}}级
\uline{\makebox[4em]{\l_@@_info_grade_tl}}级
\str_if_eq:NNTF {\
nju
_degree} { phd } {博}{硕}
\str_if_eq:NNTF {\
l_@@_info
_degree
_tl
} { phd } {博}{硕}
士生姓名:\uline{\hfill\l_@@_info_author_tl\hfill} \\
士生姓名:\uline{\hfill\l_@@_info_author_tl\hfill} \\
指导教师(姓名、职称):\uline{\hfill\l_@@_info_supv_full_tl\hfill}\par
指导教师(姓名、职称):\uline{\hfill\l_@@_info_supv_full_tl\hfill}\par
\egroup
\egroup
...
...
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