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
284064f4
Commit
284064f4
authored
3 years ago
by
Yu Xiong
Browse files
Options
Downloads
Patches
Plain Diff
fix: 修复研究生封面不能正常显示第二导师的问题 (#64)
- 修复无个人信息时英文封面的错误提示 - 优化方正字体显示效果
parent
b2f39e45
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
CHANGELOG.md
+9
-3
9 additions, 3 deletions
CHANGELOG.md
docs/njuthesis-sample.tex
+1
-1
1 addition, 1 deletion
docs/njuthesis-sample.tex
source/njuthesis.dtx
+183
-171
183 additions, 171 deletions
source/njuthesis.dtx
with
193 additions
and
175 deletions
CHANGELOG.md
+
9
−
3
View file @
284064f4
...
...
@@ -2,7 +2,7 @@
本项目发生的变动均会记录于本文档。
本文档格式来自[更新日志],本项目使用[语义化版本]标记版本号。
本文档格式来自
《
[更新日志]
》
,本项目使用
《
[语义化版本]
》
标记版本号。
## [未发布]
...
...
@@ -13,10 +13,11 @@
### 修复
-
修复了单面模式下的
`fancyhdr`
宏包警告
-
修复研究生封面上第二导师无法正确显示的问题 - [#64]
### 变动
-
目录自身不出现在目录条目
中
-
目录自身不出现在目录条目中
-
研究生模板页眉样式及内容变动
-
使用小号楷体
-
双面模式下奇数页右侧为节名,偶数页左侧为章名
...
...
@@ -24,6 +25,10 @@
-
移除内部调用的宏包
-
`url`
### 杂项
-
使用 GitHub 表单重构 issue 模板
## [0.14.0] - 2022-01-16
### 新增
...
...
@@ -221,11 +226,12 @@
[
0.9.0
]:
https://github.com/nju-lug/NJUThesis/releases/tag/v0.9.0
[
0.8.4
]:
https://github.com/nju-lug/NJUThesis/releases/tag/v0.8.4
[
#
4
4
]:
https://github.com/nju-lug/NJUThesis/issues/14
[
#
1
4
]:
https://github.com/nju-lug/NJUThesis/issues/14
[
#44
]:
https://github.com/nju-lug/NJUThesis/issues/44
[
#52
]:
https://github.com/nju-lug/NJUThesis/issues/52
[
#60
]:
https://github.com/nju-lug/NJUThesis/issues/60
[
#61
]:
https://github.com/nju-lug/NJUThesis/issues/61
[
#64
]:
https://github.com/nju-lug/NJUThesis/issues/64
[
更新日志
]:
https://keepachangelog.com/zh-CN/1.0.0/
[
语义化版本
]:
https://semver.org/lang/zh-CN/
...
...
This diff is collapsed.
Click to expand it.
docs/njuthesis-sample.tex
+
1
−
1
View file @
284064f4
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% njuthesis - 南京大学
LaTeX
论文模板
% njuthesis - 南京大学
学位
论文模板
% Version 0.14.0 2022-01-14
%
% 关注项目地址以获取最新变化
...
...
This diff is collapsed.
Click to expand it.
source/njuthesis.dtx
+
183
−
171
View file @
284064f4
...
...
@@ -265,7 +265,7 @@ To produce the documentation run the original source files ending with
% \hspace{2em}\begin{minipage}[c]{10cm}
% \begin{enumerate}
% \item 访问 \url{https://tex.nju.edu.cn}
% \item 点击右上角~\olbutton{注册}~按钮,用南大邮箱注册账号
% \item 点击右上角~\olbutton{注册}~按钮,用
\href{https://itsc.nju.edu.cn/1b/ce/c21586a334798/page.htm}{
南大邮箱
}
注册账号
% \item 登录您的账号
% \item 点击左上角~\olbutton{创建新项目}~按钮,选择~\olbutton{论文模板}
% \item 随意取名,点击~\olbutton{创建}~按钮
...
...
@@ -705,7 +705,7 @@ To produce the documentation run the original source files ending with
% 是否使用国家图书馆封面,默认关闭。
% \end{function}
%
% 通过此项可用国家图书馆封面替换普通封面。
% 通过此项可用国家图书馆封面
\emph{
替换
}
普通封面。
% 由于本科生院文件中并未提及相关规定,故本选项仅对于研究生有效。
%
% \begin{function}[updated=2022-01-06]{decl-page}
...
...
@@ -2532,133 +2532,6 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
%
%
% \subsection{个人信息}
% \changes{v0.11}{2021/10/01}{将个人信息变量名改为小写字母加连字符的形式。}
%
% \begin{macrocode}
\keys_define:nn { nju / info }
{
% \end{macrocode}
%
% \begin{macro}{info/title,info/title*}
% \changes{v0.13}{2021/12/12}{简化多行标题的输入方式。}
% \changes{v0.14}{2022/01/14}{将标题断行控制符修改为 |\\|。}
% 题目。中文题目可使用 |\\| 手动断行。以下标注星号(|*|)的皆为对应的英文字段。
% \begin{macrocode}
title .tl_set:N = \l_@@_info_title_tl,
title .initial:n = { 空 },
title* .tl_set:N = \l_@@_info_title_en_tl,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/keywords,info/keywords*}
% \changes{v0.11}{2021/10/01}{修改了添加关键词的方式。}
% 关键词列表。
% \begin{macrocode}
keywords .clist_set:N = \l_@@_info_keywords_clist,
keywords* .clist_set:N = \l_@@_info_keywords_en_clist,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/grade,info/student-id,info/author,info/author*}
% 年级、学号、姓名。
% \begin{macrocode}
grade .tl_set:N = \l_@@_info_grade_tl,
student-id .tl_set:N = \l_@@_info_id_tl,
author .tl_set:N = \l_@@_info_author_tl,
author* .tl_set:N = \l_@@_info_author_en_tl,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/department,info/department*,info/major,info/major*,info/field,info/field*}
% 院系、专业、方向。
% \begin{macrocode}
department .tl_set:N = \l_@@_info_dept_tl,
department* .tl_set:N = \l_@@_info_dept_en_tl,
major .tl_set:N = \l_@@_info_major_tl,
major* .tl_set:N = \l_@@_info_major_en_tl,
field .tl_set:N = \l_@@_info_field_tl,
field* .tl_set:N = \l_@@_info_field_en_tl,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/supervisor,info/supervisor*}
% \changes{v0.13}{2021/12/11}{修改了导师选项的变量名称。}
% \changes{v0.14}{2022/01/12}{精简导师信息选项。}
% 导师信息。中文导师全称使用 |clist| 存储,便于在本科生封面中进行分割。
% \begin{macrocode}
supervisor .clist_set:N = \l_@@_info_supv_clist,
supervisor* .tl_set:N = \l_@@_info_supv_en_tl,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/supervisor-ii,info/supervisor-ii*}
% 第二导师信息。
% \begin{macrocode}
supervisor-ii .clist_set:N = \l_@@_info_supv_ii_clist,
supervisor-ii* .tl_set:N = \l_@@_info_supv_ii_en_tl,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/submit-date}
% \changes{v0.14}{2022/01/14}{精简提交日期选项。}
% 提交日期,初始值为编译当天日期。
% \begin{macrocode}
submit-date .tl_set:N = \l_@@_info_sm_date_raw_tl,
submit-date .initial:V = \c_@@_today_tl,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/defend-date}
% \changes{v0.14}{2022/01/14}{精简答辩日期选项。}
% 答辩日期。
% \begin{macrocode}
defend-date .tl_set:N = \l_@@_info_df_date_raw_tl,
defend-date .initial:V = \c_@@_today_tl,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/defend-date,info/chairman,info/reviewer}
% 答辩委员会信息。
% \begin{macrocode}
chairman .tl_set:N = \l_@@_info_chairman_tl,
reviewer .clist_set:N = \l_@@_info_reviewer_clist,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/clc,info/secret-level,info/udc,info/supervisor-contact}
% 国家图书馆封面相关信息。
% \begin{macrocode}
clc .tl_set:N = \l_@@_info_clc_tl,
secret-level .tl_set:N = \l_@@_info_seclv_tl,
udc .tl_set:N = \l_@@_info_udc_tl,
supervisor-contact .tl_set:N = \l_@@_info_supv_cont_tl,
}
% \end{macrocode}
% \end{macro}
%
% 拼合双导师的姓名和职称。
% \begin{macrocode}
\bool_set:Nn \l_@@_second_supv_bool
{ ! \clist_if_empty_p:N \l_@@_info_supv_ii_clist }
\tl_set:Nn \l_@@_info_supv_full_tl
{
\clist_use:Nn \l_@@_info_supv_clist { \@@_hskip: }
\bool_if:NT \l_@@_second_supv_bool
{
\@@_quad:
\clist_use:Nn \l_@@_info_supv_ii_clist { \@@_hskip: }
}
}
\tl_set:Nn \l_@@_info_supv_full_en_tl
{
\l_@@_info_supv_en_tl
\bool_if:NT \l_@@_second_supv_bool
{ \@@_quad: \l_@@_info_supv_ii_en_tl }
}
% \end{macrocode}
%
%
% \subsection{载入宏包}
%
% \changes{v0.12}{2021/12/07}{重新组织宏包载入顺序。}
...
...
@@ -2810,9 +2683,168 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
%
%
% \subsection{个人信息}
% \changes{v0.11}{2021/10/01}{将个人信息变量名改为小写字母加连字符的形式。}
% \changes{v0.15}{2022/01/22}{将个人信息设置移到载入宏包后。}
%
% \begin{macrocode}
\keys_define:nn { nju / info }
{
% \end{macrocode}
%
% \begin{macro}{info/title,info/title*}
% \changes{v0.13}{2021/12/12}{简化多行标题的输入方式。}
% \changes{v0.14}{2022/01/14}{将标题断行控制符修改为 |\\|。}
% 题目。中文题目可使用 |\\| 手动断行。以下标注星号(|*|)的皆为对应的英文字段。
% \begin{macrocode}
title .tl_set:N = \l_@@_info_title_tl,
title .initial:n = { 空 },
title* .tl_set:N = \l_@@_info_title_en_tl,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/keywords,info/keywords*}
% \changes{v0.11}{2021/10/01}{修改了添加关键词的方式。}
% 关键词列表。
% \begin{macrocode}
keywords .clist_set:N = \l_@@_info_keywords_clist,
keywords* .clist_set:N = \l_@@_info_keywords_en_clist,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/grade,info/student-id,info/author,info/author*}
% 年级、学号、姓名。
% \begin{macrocode}
grade .tl_set:N = \l_@@_info_grade_tl,
student-id .tl_set:N = \l_@@_info_id_tl,
author .tl_set:N = \l_@@_info_author_tl,
author* .tl_set:N = \l_@@_info_author_en_tl,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/department,info/department*,info/major,info/major*,info/field,info/field*}
% 院系、专业、方向。
% \begin{macrocode}
department .tl_set:N = \l_@@_info_dept_tl,
department* .tl_set:N = \l_@@_info_dept_en_tl,
major .tl_set:N = \l_@@_info_major_tl,
major* .tl_set:N = \l_@@_info_major_en_tl,
field .tl_set:N = \l_@@_info_field_tl,
field* .tl_set:N = \l_@@_info_field_en_tl,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/supervisor,info/supervisor*}
% \changes{v0.13}{2021/12/11}{修改了导师选项的变量名称。}
% \changes{v0.14}{2022/01/12}{精简导师信息选项。}
% 导师信息。中文导师全称使用 |clist| 存储,便于在本科生封面中进行分割。
% \begin{macrocode}
supervisor .clist_set:N = \l_@@_info_supv_clist,
supervisor* .tl_set:N = \l_@@_info_supv_en_tl,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/supervisor-ii,info/supervisor-ii*}
% 第二导师信息。
% \begin{macrocode}
supervisor-ii .clist_set:N = \l_@@_info_supv_ii_clist,
supervisor-ii* .tl_set:N = \l_@@_info_supv_ii_en_tl,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/submit-date}
% \changes{v0.14}{2022/01/14}{精简提交日期选项。}
% 提交日期,初始值为编译当天日期。
% \begin{macrocode}
submit-date .tl_set:N = \l_@@_info_sm_date_raw_tl,
submit-date .initial:V = \c_@@_today_tl,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/defend-date}
% \changes{v0.14}{2022/01/14}{精简答辩日期选项。}
% 答辩日期。
% \begin{macrocode}
defend-date .tl_set:N = \l_@@_info_df_date_raw_tl,
defend-date .initial:V = \c_@@_today_tl,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/defend-date,info/chairman,info/reviewer}
% 答辩委员会信息。
% \begin{macrocode}
chairman .tl_set:N = \l_@@_info_chairman_tl,
reviewer .clist_set:N = \l_@@_info_reviewer_clist,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/clc,info/secret-level,info/udc,info/supervisor-contact}
% 国家图书馆封面相关信息。
% \begin{macrocode}
clc .tl_set:N = \l_@@_info_clc_tl,
secret-level .tl_set:N = \l_@@_info_seclv_tl,
udc .tl_set:N = \l_@@_info_udc_tl,
supervisor-contact .tl_set:N = \l_@@_info_supv_cont_tl,
}
% \end{macrocode}
% \end{macro}
%
% \changes{v0.15}{2022/01/22}{正确处理双导师信息。}
% 在导言区录入用户信息后进行变量设置。此处使用到了 \pkg{ctex} 提供的命令,应当位于载入文档类之后。
% \begin{macrocode}
\ctex_at_end_preamble:n
{
% \end{macrocode}
% 拼合双导师的姓名和职称。
% \begin{macrocode}
\bool_set:Nn \l_@@_second_supv_bool
{ ! \clist_if_empty_p:N \l_@@_info_supv_ii_clist }
\tl_set:Nx \l_@@_info_supv_full_tl
{
\clist_use:Nn \l_@@_info_supv_clist { \@@_hskip: }
\bool_if:NT \l_@@_second_supv_bool
{
\@@_quad:
\clist_use:Nn \l_@@_info_supv_ii_clist { \@@_hskip: }
}
}
\tl_set:Nx \l_@@_info_supv_full_en_tl
{
\l_@@_info_supv_en_tl
\bool_if:NT \l_@@_second_supv_bool
{ \@@_quad: \l_@@_info_supv_ii_en_tl }
}
% \end{macrocode}
% 将 ISO 格式的原始日期字符串格式化为中文日期表示,该字符串需要进行展开。
% \begin{macrocode}
\tl_set:Nn \l_@@_info_sm_date_tl
{
\exp_last_unbraced:NV
\@@_date:www \l_@@_info_sm_date_raw_tl \q_stop
}
% \end{macrocode}
% 英文提交日期以及答辩日期仅用于研究生封面。
% \begin{macrocode}
\int_compare:nF { \l_@@_info_degree_int == 1 }
{
\tl_set:Nn \l_@@_info_sm_date_en_tl
{
\exp_last_unbraced:NV
\@@_date_en:www \l_@@_info_sm_date_raw_tl \q_stop
}
\tl_set:Nn \l_@@_info_df_date_tl
{
\exp_last_unbraced:NV
\@@_date:www \l_@@_info_df_date_raw_tl \q_stop
}
}
}
% \end{macrocode}
%
%
% \subsection{字体设置}
%
% \pkg{fontspec}
已在 C\hologo{TeX} 套件中包含
,无需另行载入。
% \pkg{fontspec}
包含于 \pkg{ctex} 宏集
,无需另行载入。
%
% \subsubsection{操作系统检测}
%
...
...
@@ -2828,8 +2860,8 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
%
% 进行系统检测。
% 检测 Windows 的命令由\pkg{l3kern
a
l}提供,
% 检测 macOS 的命令由\pkg{ctex}提供,
% 检测 Windows 的命令由
\pkg{l3kern
e
l}
提供,
% 检测 macOS 的命令由
\pkg{ctex}
提供,
% 这两种情况外的系统被判断为 Linux,一律使用自由字体。
% \begin{macrocode}
\bool_if:NT \g_@@_load_sys_font_bool
...
...
@@ -2906,6 +2938,14 @@ To produce the documentation run the original source files ending with
%
% \subsubsection{定义中文字库}
%
% \begin{macro}{\@@_diable_no_script_msg:}
% 移除 |does not contain script "CJK"| 警告。
% \begin{macrocode}
\cs_new_protected:Npn \@@_diable_no_script_msg:
{ \msg_redirect_name:nnn { fontspec } { no-script } { info } }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_load_cjk_font_win:}
% Windows 中文字体。
% \begin{macrocode}
...
...
@@ -2930,10 +2970,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\cs_new_protected:Npn \@@_load_cjk_font_mac:
{
% \end{macrocode}
% 移除 does not contain script "CJK" 警告。
% \begin{macrocode}
\msg_redirect_name:nnn { fontspec } { no-script } { info }
\@@_diable_no_script_msg:
\setCJKmainfont{Songti~SC~Light}[
BoldFont=Songti~SC~Bold,
ItalicFont=Kaiti~SC,
...
...
@@ -2954,8 +2991,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\cs_new_protected:Npn \@@_load_cjk_font_fandol:
{
% 移除 does not contain script "CJK" 警告
\msg_redirect_name:nnn {fontspec} {no-script} {info}
\@@_diable_no_script_msg:
\setCJKmainfont{FandolSong-Regular}[
Extension=.otf,
BoldFont=FandolSong-Bold,
...
...
@@ -2984,14 +3020,13 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\cs_new_protected:Npn \@@_load_cjk_font_founder:
{
\sys_if_engine_luatex:T
{
% \end{macrocode}
% 在 LuaTeX 中调整方正字体括号位置
% XeTeX 暂无好的解决方法
% 调整方正字体括号位置。\footnote{\hologo{XeTeX} 的调整方法来自 \url{https://www.zhihu.com/question/46241367/answer/101660183}。}
% \begin{macrocode}
\defaultCJKfontfeatures{JFM={zh_CN/{quanjiao,fzpr}}}
}
\sys_if_engine_xetex:T
{ \xeCJKEditPunctStyle {quanjiao} { optimize-kerning = true } }
\sys_if_engine_luatex:T
{ \defaultCJKfontfeatures { JFM = { zh_CN/{quanjiao,fzpr} } } }
\setCJKmainfont { FZShuSong-Z01 }
[ BoldFont = FZXiaoBiaoSong-B05, ItalicFont = FZKai-Z03 ]
\setCJKsansfont { FZXiHeiI-Z08 } [ BoldFont = FZHei-B01 ]
...
...
@@ -3718,33 +3753,9 @@ To produce the documentation run the original source files ending with
{ \includegraphics [ width = #2, height = #3 ]
{ \l_@@_name_img_tl } }
}
% \end{macrocode}
% \end{macro}
% 将 ISO 格式的原始日期字符串格式化为中文日期表示,该字符串需要进行展开。
% \begin{macrocode}
\tl_set:Nn \l_@@_info_sm_date_tl
{
\exp_last_unbraced:NV
\@@_date:www \l_@@_info_sm_date_raw_tl \q_stop
}
% \end{macrocode}
% 英文提交日期以及答辩日期仅用于研究生封面。
% \begin{macrocode}
\int_compare:nF { \l_@@_info_degree_int == 1 }
{
\tl_set:Nn \l_@@_info_sm_date_en_tl
{
\exp_last_unbraced:NV
\@@_date_en:www \l_@@_info_sm_date_raw_tl \q_stop
}
\tl_set:Nn \l_@@_info_df_date_tl
{
\exp_last_unbraced:NV
\@@_date:www \l_@@_info_df_date_raw_tl \q_stop
}
}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_cover_title_ug:}
% 本科生封面标题。
...
...
@@ -3864,7 +3875,8 @@ To produce the documentation run the original source files ending with
% 校徽。
% \begin{macrocode}
\njuemblem [ black ] { ! } { 2.5 cm } \@@_vskip:
\l_@@_info_dept_en_tl \\ \c_@@_name_nju_en_tl
\l_@@_info_dept_en_tl \skip_vertical:n { \c_zero_dim }
\c_@@_name_nju_en_tl
\skip_vertical:n { 1 cm }
% \end{macrocode}
% 提交日期。
...
...
@@ -4490,7 +4502,7 @@ To produce the documentation run the original source files ending with
\labelsep \z@
\itemsep \z@
\parsep \z@
\leftmargin
0
.5\l_@@_tmp_dim
\leftmargin .5\l_@@_tmp_dim
\rightmargin \leftmargin
\advance \leftmargin #2
\let \makelabel \@@_notation_label:n
...
...
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