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
Wendi Zheng
NJUThesis
Commits
13017cc2
Commit
13017cc2
authored
3 years ago
by
Yu Xiong
Browse files
Options
Downloads
Patches
Plain Diff
feat: 完成手动指定字体功能
parent
adf63bc0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
njuthesis.cls
+2
-1
2 additions, 1 deletion
njuthesis.cls
njuthesis.tex
+3
-3
3 additions, 3 deletions
njuthesis.tex
profile/font.sty
+17
-10
17 additions, 10 deletions
profile/font.sty
with
22 additions
and
14 deletions
njuthesis.cls
+
2
−
1
View file @
13017cc2
...
@@ -24,7 +24,8 @@
...
@@ -24,7 +24,8 @@
\DeclareStringOption
[UG]
{
Degree
}
\DeclareStringOption
[UG]
{
Degree
}
\DeclareStringOption
[thesis]
{
Type
}
\DeclareStringOption
[thesis]
{
Type
}
\DeclareBoolOption
[true]
{
UseSysFont
}
\DeclareBoolOption
[true]
{
UseSysFont
}
\DeclareStringOption
[windows]
{
CustomZhFont
}
\DeclareStringOption
[windows]
{
CustomEnFont
}
\DeclareStringOption
[windows]
{
CustomEnFont
}
\DeclareStringOption
[windows]
{
CustomZhFont
}
\ProcessKeyvalOptions*\relax
\ProcessKeyvalOptions*\relax
...
...
This diff is collapsed.
Click to expand it.
njuthesis.tex
+
3
−
3
View file @
13017cc2
...
@@ -19,9 +19,9 @@
...
@@ -19,9 +19,9 @@
TitleLength=2,
% 选择标题行数,范围是1~3
TitleLength=2,
% 选择标题行数,范围是1~3
Degree=UG,
% UG: 本科
Degree=UG,
% UG: 本科
Type=thesis,
% thesis: 毕业论文,design: 毕业设计
Type=thesis,
% thesis: 毕业论文,design: 毕业设计
UseSysFont=false,
% 自定义字体请反注释此项
%
UseSysFont=false,% 自定义字体请反注释此项
Custom
Zh
Font=windows,
% 设置
中
文字符集
%
Custom
En
Font=windows,% 设置
英
文字符集
Custom
En
Font=windows,
% 设置
英
文字符集
%
Custom
Zh
Font=windows,% 设置
中
文字符集
]
{
njuthesis
}
]
{
njuthesis
}
% 输入个人信息
% 输入个人信息
...
...
This diff is collapsed.
Click to expand it.
profile/font.sty
+
17
−
10
View file @
13017cc2
...
@@ -173,19 +173,26 @@
...
@@ -173,19 +173,26 @@
}
}
}
}
\else
% 如果用户需要自定义
\else
% 如果用户需要自定义
\str
_
case:nn
{
\CustomEnFont
}
% tl_case:Nn 只能实现宏和宏之间的比较,不能直接实现字符串和宏的比较,无奈出此下策,希望之后能找到更优雅的写法
\tl
_
const:Nn
\usingwindows
{
windows
}
\tl
_
const:Nn
\usingmacos
{
macos
}
\tl
_
const:Nn
\usingfandol
{
fandol
}
\tl
_
const:Nn
\usinggyre
{
gyre
}
\tl
_
const:Nn
\usingfounder
{
founder
}
\tl
_
const:Nn
\usingnoto
{
noto
}
\tl
_
case:Nn
{
\CustomEnFont
}
{
{
{
windows
}
{
\set
_
latin
_
fontset
_
windows
}
\using
windows
{
\set
_
latin
_
fontset
_
windows
}
{
macos
}
{
\set
_
latin
_
fontset
_
macos
}
\using
macos
{
\set
_
latin
_
fontset
_
macos
}
{
gyre
}
{
\set
_
latin
_
fontset
_
gyre
}
\using
gyre
{
\set
_
latin
_
fontset
_
gyre
}
}
}
\
str
_
case:
n
n
{
\CustomZhFont
}
\
tl
_
case:
N
n
{
\CustomZhFont
}
{
{
{
windows
}
{
\set
_
chinese
_
fontset
_
windows
}
\using
windows
{
\set
_
chinese
_
fontset
_
windows
}
{
macos
}
{
\set
_
chinese
_
fontset
_
macos
}
\using
macos
{
\set
_
chinese
_
fontset
_
macos
}
{
fandol
}
{
\set
_
chinese
_
fontset
_
fandol
}
\using
fandol
{
\set
_
chinese
_
fontset
_
fandol
}
{
founder
}
{
\set
_
chinese
_
fontset
_
founder
}
% 使用方正字体
\using
founder
{
\set
_
chinese
_
fontset
_
founder
}
% 使用方正字体
{
noto
}
{
\set
_
chinese
_
fontset
_
noto
}
% 使用思源宋体+思源黑体
\using
noto
{
\set
_
chinese
_
fontset
_
noto
}
% 使用思源宋体+思源黑体
}
}
\fi
\fi
% 我是 Linux 用户,但我用 Windows 字体(请您赶快坐到主席台上来)
% 我是 Linux 用户,但我用 Windows 字体(请您赶快坐到主席台上来)
...
...
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