From dd40505856333fc668e660397ddb171708ecbb81 Mon Sep 17 00:00:00 2001 From: xkwxdyy Date: Sun, 30 Jul 2023 23:26:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=AA=E4=BA=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=A1=AB=E5=86=99=E7=A9=BA=E7=99=BD=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E4=B8=8D=E5=81=9C=E6=AD=A2=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 10 +++++++++- whu-proposal-main.tex | 4 ++-- whu-proposal.cls | 28 +++++++++++++++++++++++++++- 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b6aba7..6ccd9b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,4 +47,12 @@ Gitee:https://gitee.com/xkwxdyy/whu-proposal ### Added -- 兼容 TeXLive 2021 \ No newline at end of file +- 兼容 TeXLive 2021 + + +## [v0.6] - 2023-07-30 + + +### Fixed + +- 修复个人信息填写空白时的编译不停止的问题 \ No newline at end of file diff --git a/whu-proposal-main.tex b/whu-proposal-main.tex index 2706afd..5325c82 100644 --- a/whu-proposal-main.tex +++ b/whu-proposal-main.tex @@ -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, kangweixia_xdyy@163.com, School of Mathematics and Statistics, Wuhan University % QQ group: 681965476 %******************************************** diff --git a/whu-proposal.cls b/whu-proposal.cls index 23f58e8..b3b918e 100644 --- a/whu-proposal.cls +++ b/whu-proposal.cls @@ -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 % 判断开题报告类型 @@ -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 @@ -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 { 培养单位:,