Skip to content

Commit

Permalink
fix: 修复国家图书馆封面上丢失的学位名称 (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
atxy-blip committed May 3, 2023
1 parent de12a17 commit 3c0f3d8
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 21 deletions.
18 changes: 15 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,23 @@

## [未发布]

## [1.2.0] - 2023-05-01
## [1.2.1] - 2023-05-03

### 新增

- 新增研究生中文学位名称选项 `info/degree` - [#200]

### 修复

- 修复国家图书馆封面学位丢失的学位名称 - [#204]
- 修复研究生封面上学号下划线长度不足的问题

## [1.2.0] - 2023-05-02

### 新增

- 跟进 2023 年研究生学位论文模板新设计 - [#204]
- 新增研究生中英文学位名称选项 `info/degree*` - [#200]
- 新增研究生英文学位名称选项 `info/degree*` - [#200]
- 新增研究生英文摘要条目内容下划线选项 `abstract/underline` - [#202]

### 修复
Expand Down Expand Up @@ -461,8 +472,9 @@
- 模板上传至 CTAN


[未发布]: https://github.com/nju-lug/NJUThesis/compare/v1.2.0...HEAD
[未发布]: https://github.com/nju-lug/NJUThesis/compare/v1.2.1...HEAD

[1.2.1]: https://github.com/nju-lug/NJUThesis/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/nju-lug/NJUThesis/compare/v1.1.2...v1.2.0

[1.1.2]: https://github.com/nju-lug/NJUThesis/compare/v1.1.1...v1.1.2
Expand Down
2 changes: 1 addition & 1 deletion docs/njuthesis-sample.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% njuthesis 示例模板 v1.2.0 2023-05-01
% njuthesis 示例模板 v1.2.1 2023-05-03
% https://github.com/nju-lug/NJUThesis
%
% 贡献者
Expand Down
13 changes: 7 additions & 6 deletions docs/njuthesis-setup.def
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% njuthesis 参数设置文件 v1.2.0 2023-05-01
% njuthesis 参数设置文件 v1.2.1 2023-05-03

% 一些提醒:
% 1. \njusetup 内部千万不要有空行
Expand Down Expand Up @@ -60,16 +60,17 @@
% 第二导师全称
% 如果确实没有第二导师,不填写即可
%
submit-date = {2021-08-10},
submit-date = {2022-05-20},
% 提交日期
% 格式为 yyyy-mm-dd
% 不填就是编译当天日期
%
%
% 以下均为研究生项
%
% degree = {工程硕士},
% degree* = {Master of Engineering}
% 覆盖英文封面的默认学位名称
% 覆盖默认学位名称
%
field = {物理化学},
field* = {Physical Chemistry},
Expand All @@ -96,7 +97,7 @@
secret-level = {不涉密},
% 密级
%
defend-date = {2021-09-19},
defend-date = {2022-05-21},
% 答辩日期
% 格式为 yyyy-mm-dd
% 不填就是编译当天日期
Expand All @@ -107,10 +108,10 @@
%
%
% 以下用于国家图书馆封面
confer-date = {2022-05-20},
confer-date = {2022-05-22},
% 学位授予日期
%
bottom-date = {2022-05-21},
bottom-date = {2022-05-23},
% 封面底部日期
%
supervisor-contact = {
Expand Down
35 changes: 24 additions & 11 deletions source/njuthesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ To produce the documentation run the original source files ending with
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<*!(driver|install)>
%<+!driver>\GetIdInfo $Id: njuthesis.dtx 1.2.0 2023-05-02 16:30:00
%<+!driver>\GetIdInfo $Id: njuthesis.dtx 1.2.1 2023-05-03 13:30:00
%<+!driver> +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
%<class> {Thesis template for Nanjing University}
%<class>\ProvidesExplClass{njuthesis}
Expand Down Expand Up @@ -380,7 +380,7 @@ To produce the documentation run the original source files ending with
% \thanks{E-mail: \href{mailto:git+nju-lug-email-3104-issue-@yaoge123.cn}
% {git+nju-lug-email-3104-issue-@yaoge123.cn}}}
%
% \date{v1.2.0 \quad 2023-05-02}
% \date{v1.2.1 \quad 2023-05-03}
%
% \maketitle
%
Expand Down Expand Up @@ -1488,13 +1488,14 @@ To produce the documentation run the original source files ending with
% 研究生学位论文封面上的学校代码。\CJKsout{你不会真的想改这个吧?}
% \end{function}
%
% \begin{function}[added=2023-04-24]{info/degree*}
% \begin{syntax}
% \OPT{degree*} = \Arg{英文学位名}
% \end{syntax}
% 研究生英文封面上的学位名称。默认会由模板通过 \opt{degree} 和 \opt{type}
% 文档类选项生成,也可以由本选项自定义名称。
% \end{function}
% \begin{function}[added=2023-04-24]{info/degree,info/degree*}
% \begin{syntax}
% \OPT{degree} = \Arg{中文学位名}
% \OPT{degree*} = \Arg{英文学位名}
% \end{syntax}
% 研究生国家图书馆封面英文封面上的学位名称。默认会由模板通过 \opt{degree}
% 和 \opt{type} 文档类选项生成,也可以由本选项自定义名称。
% \end{function}
%
%
% \subsubsection{输入示范}
Expand Down Expand Up @@ -4697,10 +4698,11 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/degree*}
% \begin{macro}{info/degree,info/degree*}
% \changes{v1.2}{2023/04/24}{新增学位名称设置项。}
% 覆盖预定义的学位字段。
% \begin{macrocode}
degree .tl_set:N = \g_@@_info_degree_tl ,
degree* .tl_set:N = \g_@@_info_degree_en_tl
}
% \end{macrocode}
Expand Down Expand Up @@ -4801,6 +4803,16 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{variable}
%
% \begin{variable}{\g_@@_info_degree_tl}
% 学位类型字样。
% \begin{macrocode}
\tl_new:N \g_@@_info_degree_tl
\tl_set_eq:NN \g_@@_info_degree_tl \g_@@_info_type_tl
\bool_if:NF \g_@@_opt_academic_bool
{ \tl_put_right:Nn \g_@@_info_degree_tl { 专业 } }
% \end{macrocode}
% \end{variable}
%
% \begin{variable}{\g_@@_info_degree_en_tl}
% 英文的学位字样。
% \begin{macrocode}
Expand Down Expand Up @@ -6709,12 +6721,13 @@ To produce the documentation run the original source files ending with
% \end{macro}
%
% \begin{macro}{\@@_g_cover_top:}
% \changes{v1.2}{2023/05/03}{根据学号长度确定研究生封面顶部的下划线长度。}
% 研究生封面顶部信息栏。
% \begin{macrocode}
\cs_new_protected:Npn \@@_g_cover_top:
{
\dim_set:Nn \l_@@_tmpa_dim { 4 em }
\dim_set:Nn \l_@@_tmpb_dim { 5 em }
\@@_get_width:NV \l_@@_tmpb_dim \g_@@_info_id_tl
\clist_map_inline:nn { code, clc, secretlv, udc, id }
{
\@@_cover_entry:NNNNn \c_@@_name_colon_tl \l_@@_tmpa_dim
Expand Down

0 comments on commit 3c0f3d8

Please sign in to comment.