Skip to content

Commit

Permalink
修复个人信息填写空白时的编译不停止的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xkwxdyy committed Jul 30, 2023
1 parent 698915f commit dd40505
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,12 @@ Gitee:https://gitee.com/xkwxdyy/whu-proposal

### Added

- 兼容 TeXLive 2021
- 兼容 TeXLive 2021


## [v0.6] - 2023-07-30


### Fixed

- 修复个人信息填写空白时的编译不停止的问题
4 changes: 2 additions & 2 deletions whu-proposal-main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

% Github:https://github.com/whutug/whu-proposal
% Gitee:https://gitee.com/xkwxdyy/whu-proposal
% Update date: 2023-07-24
% Version: v0.5
% Update date: 2023-07-30
% Version: v0.6
% Author: Kangwei Xia, [email protected], School of Mathematics and Statistics, Wuhan University
% QQ group: 681965476
%********************************************
Expand Down
28 changes: 27 additions & 1 deletion whu-proposal.cls
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
\RequirePackage { expl3 }
\RequirePackage { xparse }
\RequirePackage { l3keys2e }
\ProvidesExplClass {whu-proposal} {2023-07-24} {v0.5} {LaTeX template for thesis proposal for students in Wuhan University}
\ProvidesExplClass {whu-proposal} {2023-07-30} {v0.6} {LaTeX template for thesis proposal for students in Wuhan University}


\bool_new:N \g__whuproposal_bachelor_type_bool % 判断开题报告类型
Expand Down Expand Up @@ -346,6 +346,31 @@
};
}
% 个人信息

% 对用户输入空格引发的报错进行处理
\prg_generate_conditional_variant:Nnn \tl_if_blank:n { v } { T }

\cs_new:Npn \__whuproposal_cover_master_doctor_infomation_preset:
{
\clist_map_inline:nn
{
department,
major,
research_area ,
student_id ,
author ,
supervisor ,
supervisor_title
}
{
\tl_if_blank:vT
{ g__whuproposal_ ##1 _tl }
{
\tl_set:cn { g__whuproposal_ ##1 _tl } { \textcolor{red}{待填写} }
}
}

}
\cs_new:Npn \__whuproposal_cover_master_doctor_infomation:
{
\node[] (information) at
Expand All @@ -356,6 +381,7 @@
{
\begin{minipage} [ c ] { \textwidth }
\centering \zihao{3} \fangsong
\__whuproposal_cover_master_doctor_infomation_preset:
\clist_set:Nn \l__whuproposal_tmpa_clist
{
培养单位:,
Expand Down

0 comments on commit dd40505

Please sign in to comment.