From f73359fb0cf2731fd701613f0c1877c9171b4354 Mon Sep 17 00:00:00 2001 From: Feng Kaiyu Date: Sat, 10 Jun 2023 11:05:20 +0800 Subject: [PATCH 1/3] feat: support customize cover label. --- bithesis.dtx | 18 +++++++++++++++--- templates/graduate-thesis/bithesis.cls | 18 +++++++++++++++--- templates/graduate-thesis/main.tex | 8 ++++++++ templates/paper-translation/bithesis.cls | 18 +++++++++++++++--- templates/undergraduate-thesis-en/bithesis.cls | 18 +++++++++++++++--- templates/undergraduate-thesis/bithesis.cls | 18 +++++++++++++++--- 6 files changed, 83 insertions(+), 15 deletions(-) diff --git a/bithesis.dtx b/bithesis.dtx index 2b76ff42..478cba09 100644 --- a/bithesis.dtx +++ b/bithesis.dtx @@ -703,6 +703,18 @@ autoref / equ .initial:n = {\@@_get_const:N {equ}}, style / substituteSymbol .tl_set:N = \g_@@_const_substitute_symbol_tl, style / substituteSymbol .initial:n = {*}, + info / degree .tl_set:N = \g_@@_const_info_degree_tl, + info / degree .initial:n = { + \c_@@_graduate_label_degree_tl + }, + info / major .tl_set:N = \g_@@_const_info_major_tl, + info / major .initial:n = { + \@@_if_graduate:TF { + \c_@@_graduate_label_major_tl + } { + \@@_get_const:N {major} + } + }, } % \end{macrocode} @@ -1809,8 +1821,8 @@ {\c_@@_graduate_label_school_tl} {\l_@@_value_school_tl}, {\c_@@_graduate_label_supervisor_tl} {\@@_secret_info:x{\l_@@_value_supervisor_tl}}, {\c_@@_graduate_label_chairman_tl} {\@@_secret_info:x{\l_@@_value_chairman_tl}}, - {\c_@@_graduate_label_degree_tl} {\l_@@_value_degree_tl}, - {\c_@@_graduate_label_major_tl} {\l_@@_value_major_tl}, + {\g_@@_const_info_degree_tl} {\l_@@_value_degree_tl}, + {\g_@@_const_info_major_tl} {\l_@@_value_major_tl}, {\c_@@_graduate_label_institute_tl} {\l_@@_value_institute_tl}, {\c_@@_graduate_label_defense_date_tl} {\l_@@_value_defense_date_tl}, } @@ -2078,7 +2090,7 @@ \clist_set:Nn \l_@@_input_clist { {\c_@@_label_school_tl} {\l_@@_value_school_tl}, - {\c_@@_label_major_tl} {\l_@@_value_major_tl}, + {\g_@@_const_info_major_tl} {\l_@@_value_major_tl}, {\c_@@_label_class_tl} {\@@_secret_info:N \l_@@_value_class_tl}, {\c_@@_label_author_tl} {\@@_secret_info:N \l_@@_value_author_tl}, {\c_@@_label_student_id_tl} {\@@_secret_info:N \l_@@_value_student_id_tl}, diff --git a/templates/graduate-thesis/bithesis.cls b/templates/graduate-thesis/bithesis.cls index a06cc704..712a970f 100644 --- a/templates/graduate-thesis/bithesis.cls +++ b/templates/graduate-thesis/bithesis.cls @@ -455,6 +455,18 @@ autoref / equ .initial:n = {\__bithesis_get_const:N {equ}}, style / substituteSymbol .tl_set:N = \g__bithesis_const_substitute_symbol_tl, style / substituteSymbol .initial:n = {*}, + info / degree .tl_set:N = \g__bithesis_const_info_degree_tl, + info / degree .initial:n = { + \c__bithesis_graduate_label_degree_tl + }, + info / major .tl_set:N = \g__bithesis_const_info_major_tl, + info / major .initial:n = { + \__bithesis_if_graduate:TF { + \c__bithesis_graduate_label_major_tl + } { + \__bithesis_get_const:N {major} + } + }, } \keys_define:nn { bithesis / style } @@ -1251,8 +1263,8 @@ {\c__bithesis_graduate_label_school_tl} {\l__bithesis_value_school_tl}, {\c__bithesis_graduate_label_supervisor_tl} {\__bithesis_secret_info:x{\l__bithesis_value_supervisor_tl}}, {\c__bithesis_graduate_label_chairman_tl} {\__bithesis_secret_info:x{\l__bithesis_value_chairman_tl}}, - {\c__bithesis_graduate_label_degree_tl} {\l__bithesis_value_degree_tl}, - {\c__bithesis_graduate_label_major_tl} {\l__bithesis_value_major_tl}, + {\g__bithesis_const_info_degree_tl} {\l__bithesis_value_degree_tl}, + {\g__bithesis_const_info_major_tl} {\l__bithesis_value_major_tl}, {\c__bithesis_graduate_label_institute_tl} {\l__bithesis_value_institute_tl}, {\c__bithesis_graduate_label_defense_date_tl} {\l__bithesis_value_defense_date_tl}, } @@ -1456,7 +1468,7 @@ \clist_set:Nn \l__bithesis_input_clist { {\c__bithesis_label_school_tl} {\l__bithesis_value_school_tl}, - {\c__bithesis_label_major_tl} {\l__bithesis_value_major_tl}, + {\g__bithesis_const_info_major_tl} {\l__bithesis_value_major_tl}, {\c__bithesis_label_class_tl} {\__bithesis_secret_info:N \l__bithesis_value_class_tl}, {\c__bithesis_label_author_tl} {\__bithesis_secret_info:N \l__bithesis_value_author_tl}, {\c__bithesis_label_student_id_tl} {\__bithesis_secret_info:N \l__bithesis_value_student_id_tl}, diff --git a/templates/graduate-thesis/main.tex b/templates/graduate-thesis/main.tex index 05ad560c..cfc2ab0d 100644 --- a/templates/graduate-thesis/main.tex +++ b/templates/graduate-thesis/main.tex @@ -94,6 +94,14 @@ }, % 采用章节标题级别的附录格式 appendices / chapterLevel = true, + const = { + % 由于现存的 Word 模板、旧有 LaTeX 模板与《北京理工大学研究生学位论文撰写规范》的规定不一致, + % 论文封面的某些字段内容需要用户根据自己的情况进行手动调整。 + % 目前给出的默认值是按照 2018 年发布的《北京理工大学研究生学位论文撰写规范》中的要求进行设置的。 + % 比如注释掉的这一行:将会修改封面中的「申请学位级别」为「申请学位」。 + % info / degree = {申\quad{}请\quad{}学\quad{}位}, + % info / major = {学\quad{}科\hspace{5pt}/\hspace{5pt}类\quad{}别} + } } % 大部分关于参考文献样式的修改,都可以通过此处的选项进行配置。 diff --git a/templates/paper-translation/bithesis.cls b/templates/paper-translation/bithesis.cls index a06cc704..712a970f 100644 --- a/templates/paper-translation/bithesis.cls +++ b/templates/paper-translation/bithesis.cls @@ -455,6 +455,18 @@ autoref / equ .initial:n = {\__bithesis_get_const:N {equ}}, style / substituteSymbol .tl_set:N = \g__bithesis_const_substitute_symbol_tl, style / substituteSymbol .initial:n = {*}, + info / degree .tl_set:N = \g__bithesis_const_info_degree_tl, + info / degree .initial:n = { + \c__bithesis_graduate_label_degree_tl + }, + info / major .tl_set:N = \g__bithesis_const_info_major_tl, + info / major .initial:n = { + \__bithesis_if_graduate:TF { + \c__bithesis_graduate_label_major_tl + } { + \__bithesis_get_const:N {major} + } + }, } \keys_define:nn { bithesis / style } @@ -1251,8 +1263,8 @@ {\c__bithesis_graduate_label_school_tl} {\l__bithesis_value_school_tl}, {\c__bithesis_graduate_label_supervisor_tl} {\__bithesis_secret_info:x{\l__bithesis_value_supervisor_tl}}, {\c__bithesis_graduate_label_chairman_tl} {\__bithesis_secret_info:x{\l__bithesis_value_chairman_tl}}, - {\c__bithesis_graduate_label_degree_tl} {\l__bithesis_value_degree_tl}, - {\c__bithesis_graduate_label_major_tl} {\l__bithesis_value_major_tl}, + {\g__bithesis_const_info_degree_tl} {\l__bithesis_value_degree_tl}, + {\g__bithesis_const_info_major_tl} {\l__bithesis_value_major_tl}, {\c__bithesis_graduate_label_institute_tl} {\l__bithesis_value_institute_tl}, {\c__bithesis_graduate_label_defense_date_tl} {\l__bithesis_value_defense_date_tl}, } @@ -1456,7 +1468,7 @@ \clist_set:Nn \l__bithesis_input_clist { {\c__bithesis_label_school_tl} {\l__bithesis_value_school_tl}, - {\c__bithesis_label_major_tl} {\l__bithesis_value_major_tl}, + {\g__bithesis_const_info_major_tl} {\l__bithesis_value_major_tl}, {\c__bithesis_label_class_tl} {\__bithesis_secret_info:N \l__bithesis_value_class_tl}, {\c__bithesis_label_author_tl} {\__bithesis_secret_info:N \l__bithesis_value_author_tl}, {\c__bithesis_label_student_id_tl} {\__bithesis_secret_info:N \l__bithesis_value_student_id_tl}, diff --git a/templates/undergraduate-thesis-en/bithesis.cls b/templates/undergraduate-thesis-en/bithesis.cls index a06cc704..712a970f 100644 --- a/templates/undergraduate-thesis-en/bithesis.cls +++ b/templates/undergraduate-thesis-en/bithesis.cls @@ -455,6 +455,18 @@ autoref / equ .initial:n = {\__bithesis_get_const:N {equ}}, style / substituteSymbol .tl_set:N = \g__bithesis_const_substitute_symbol_tl, style / substituteSymbol .initial:n = {*}, + info / degree .tl_set:N = \g__bithesis_const_info_degree_tl, + info / degree .initial:n = { + \c__bithesis_graduate_label_degree_tl + }, + info / major .tl_set:N = \g__bithesis_const_info_major_tl, + info / major .initial:n = { + \__bithesis_if_graduate:TF { + \c__bithesis_graduate_label_major_tl + } { + \__bithesis_get_const:N {major} + } + }, } \keys_define:nn { bithesis / style } @@ -1251,8 +1263,8 @@ {\c__bithesis_graduate_label_school_tl} {\l__bithesis_value_school_tl}, {\c__bithesis_graduate_label_supervisor_tl} {\__bithesis_secret_info:x{\l__bithesis_value_supervisor_tl}}, {\c__bithesis_graduate_label_chairman_tl} {\__bithesis_secret_info:x{\l__bithesis_value_chairman_tl}}, - {\c__bithesis_graduate_label_degree_tl} {\l__bithesis_value_degree_tl}, - {\c__bithesis_graduate_label_major_tl} {\l__bithesis_value_major_tl}, + {\g__bithesis_const_info_degree_tl} {\l__bithesis_value_degree_tl}, + {\g__bithesis_const_info_major_tl} {\l__bithesis_value_major_tl}, {\c__bithesis_graduate_label_institute_tl} {\l__bithesis_value_institute_tl}, {\c__bithesis_graduate_label_defense_date_tl} {\l__bithesis_value_defense_date_tl}, } @@ -1456,7 +1468,7 @@ \clist_set:Nn \l__bithesis_input_clist { {\c__bithesis_label_school_tl} {\l__bithesis_value_school_tl}, - {\c__bithesis_label_major_tl} {\l__bithesis_value_major_tl}, + {\g__bithesis_const_info_major_tl} {\l__bithesis_value_major_tl}, {\c__bithesis_label_class_tl} {\__bithesis_secret_info:N \l__bithesis_value_class_tl}, {\c__bithesis_label_author_tl} {\__bithesis_secret_info:N \l__bithesis_value_author_tl}, {\c__bithesis_label_student_id_tl} {\__bithesis_secret_info:N \l__bithesis_value_student_id_tl}, diff --git a/templates/undergraduate-thesis/bithesis.cls b/templates/undergraduate-thesis/bithesis.cls index a06cc704..712a970f 100644 --- a/templates/undergraduate-thesis/bithesis.cls +++ b/templates/undergraduate-thesis/bithesis.cls @@ -455,6 +455,18 @@ autoref / equ .initial:n = {\__bithesis_get_const:N {equ}}, style / substituteSymbol .tl_set:N = \g__bithesis_const_substitute_symbol_tl, style / substituteSymbol .initial:n = {*}, + info / degree .tl_set:N = \g__bithesis_const_info_degree_tl, + info / degree .initial:n = { + \c__bithesis_graduate_label_degree_tl + }, + info / major .tl_set:N = \g__bithesis_const_info_major_tl, + info / major .initial:n = { + \__bithesis_if_graduate:TF { + \c__bithesis_graduate_label_major_tl + } { + \__bithesis_get_const:N {major} + } + }, } \keys_define:nn { bithesis / style } @@ -1251,8 +1263,8 @@ {\c__bithesis_graduate_label_school_tl} {\l__bithesis_value_school_tl}, {\c__bithesis_graduate_label_supervisor_tl} {\__bithesis_secret_info:x{\l__bithesis_value_supervisor_tl}}, {\c__bithesis_graduate_label_chairman_tl} {\__bithesis_secret_info:x{\l__bithesis_value_chairman_tl}}, - {\c__bithesis_graduate_label_degree_tl} {\l__bithesis_value_degree_tl}, - {\c__bithesis_graduate_label_major_tl} {\l__bithesis_value_major_tl}, + {\g__bithesis_const_info_degree_tl} {\l__bithesis_value_degree_tl}, + {\g__bithesis_const_info_major_tl} {\l__bithesis_value_major_tl}, {\c__bithesis_graduate_label_institute_tl} {\l__bithesis_value_institute_tl}, {\c__bithesis_graduate_label_defense_date_tl} {\l__bithesis_value_defense_date_tl}, } @@ -1456,7 +1468,7 @@ \clist_set:Nn \l__bithesis_input_clist { {\c__bithesis_label_school_tl} {\l__bithesis_value_school_tl}, - {\c__bithesis_label_major_tl} {\l__bithesis_value_major_tl}, + {\g__bithesis_const_info_major_tl} {\l__bithesis_value_major_tl}, {\c__bithesis_label_class_tl} {\__bithesis_secret_info:N \l__bithesis_value_class_tl}, {\c__bithesis_label_author_tl} {\__bithesis_secret_info:N \l__bithesis_value_author_tl}, {\c__bithesis_label_student_id_tl} {\__bithesis_secret_info:N \l__bithesis_value_student_id_tl}, From 77b4582f3a00c37c796eca1b4feb8c02ae5e4f3f Mon Sep 17 00:00:00 2001 From: Feng Kaiyu Date: Sun, 11 Jun 2023 20:13:44 +0800 Subject: [PATCH 2/3] docs: add docs on const/info/x. --- bithesis-doc.tex | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bithesis-doc.tex b/bithesis-doc.tex index c0a72d95..ef877520 100644 --- a/bithesis-doc.tex +++ b/bithesis-doc.tex @@ -1276,6 +1276,17 @@ \subsubsection{常量名称覆盖} 盲审模式下用于替换个人信息的替换符号。 \end{variable} +\begin{variable}[added=2023-06-11]{const/info/degree,const/info/major} +\begin{bitsyntax}[emph={[1]degree,major}] + info = { + degree = (*(申请学位级别)|\marg{字符串}*), + major = (*(学科专业)|\marg{字符串}*), + }, +\end{bitsyntax} + + 用于定义封面中个人信息条目的各个常量值。 +\end{variable} + \section{正文编写} 请注意,请在\env{document} 之内使用以下命令 。 From 4b7b6a150bb0a248d59bcd73af1aeac7e50e39f0 Mon Sep 17 00:00:00 2001 From: Feng Kaiyu Date: Sat, 17 Jun 2023 13:56:56 +0800 Subject: [PATCH 3/3] fix: use meta key. --- bithesis.dtx | 97 +++++++++++-------- templates/graduate-thesis/bithesis.cls | 97 +++++++++++-------- templates/paper-translation/bithesis.cls | 97 +++++++++++-------- .../undergraduate-thesis-en/bithesis.cls | 97 +++++++++++-------- templates/undergraduate-thesis/bithesis.cls | 97 +++++++++++-------- 5 files changed, 270 insertions(+), 215 deletions(-) diff --git a/bithesis.dtx b/bithesis.dtx index 478cba09..3763ba40 100644 --- a/bithesis.dtx +++ b/bithesis.dtx @@ -673,50 +673,61 @@ % \begin{macrocode} \keys_define:nn { bithesis / const } { - autoref / algo .tl_set:N = \g_@@_const_autoref_algo_tl, - autoref / algo .initial:n = {\@@_get_const:N {algo}}, - autoref / them .tl_set:N = \g_@@_const_autoref_them_tl, - autoref / them .initial:n = {\@@_get_const:N {them}}, - autoref / lem .tl_set:N = \g_@@_const_autoref_lem_tl, - autoref / lem .initial:n = {\@@_get_const:N {lem}}, - autoref / prop .tl_set:N = \g_@@_const_autoref_prop_tl, - autoref / prop .initial:n = {\@@_get_const:N {prop}}, - autoref / cor .tl_set:N = \g_@@_const_autoref_cor_tl, - autoref / cor .initial:n = {\@@_get_const:N {cor}}, - autoref / axi .tl_set:N = \g_@@_const_autoref_axi_tl, - autoref / axi .initial:n = {\@@_get_const:N {axi}}, - autoref / defn .tl_set:N = \g_@@_const_autoref_defn_tl, - autoref / defn .initial:n = {\@@_get_const:N {defn}}, - autoref / conj .tl_set:N = \g_@@_const_autoref_conj_tl, - autoref / conj .initial:n = {\@@_get_const:N {conj}}, - autoref / exmp .tl_set:N = \g_@@_const_autoref_exmp_tl, - autoref / exmp .initial:n = {\@@_get_const:N {exmp}}, - autoref / case .tl_set:N = \g_@@_const_autoref_case_tl, - autoref / case .initial:n = {\@@_get_const:N {case}}, - autoref / rem .tl_set:N = \g_@@_const_autoref_rem_tl, - autoref / rem .initial:n = {\@@_get_const:N {rem}}, - autoref / figure .tl_set:N = \g_@@_const_autoref_fig_tl, - autoref / figure .initial:n = {\@@_get_const:N {fig}}, - autoref / table .tl_set:N = \g_@@_const_autoref_tab_tl, - autoref / table .initial:n = {\@@_get_const:N {tab}}, - autoref / equ .tl_set:N = \g_@@_const_autoref_equ_tl, - autoref / equ .initial:n = {\@@_get_const:N {equ}}, - style / substituteSymbol .tl_set:N = \g_@@_const_substitute_symbol_tl, - style / substituteSymbol .initial:n = {*}, - info / degree .tl_set:N = \g_@@_const_info_degree_tl, - info / degree .initial:n = { - \c_@@_graduate_label_degree_tl - }, - info / major .tl_set:N = \g_@@_const_info_major_tl, - info / major .initial:n = { - \@@_if_graduate:TF { - \c_@@_graduate_label_major_tl - } { - \@@_get_const:N {major} - } - }, + autoref .meta:nn = { bithesis / const / autoref } { #1 }, + style .meta:nn = { bithesis / const / style } { #1 }, + info .meta:nn = { bithesis / const / info } { #1 }, + } +\keys_define:nn { bithesis / const / autoref } + { + algo .tl_set:N = \g_@@_const_autoref_algo_tl, + algo .initial:n = {\@@_get_const:N {algo}}, + them .tl_set:N = \g_@@_const_autoref_them_tl, + them .initial:n = {\@@_get_const:N {them}}, + lem .tl_set:N = \g_@@_const_autoref_lem_tl, + lem .initial:n = {\@@_get_const:N {lem}}, + prop .tl_set:N = \g_@@_const_autoref_prop_tl, + prop .initial:n = {\@@_get_const:N {prop}}, + cor .tl_set:N = \g_@@_const_autoref_cor_tl, + cor .initial:n = {\@@_get_const:N {cor}}, + axi .tl_set:N = \g_@@_const_autoref_axi_tl, + axi .initial:n = {\@@_get_const:N {axi}}, + defn .tl_set:N = \g_@@_const_autoref_defn_tl, + defn .initial:n = {\@@_get_const:N {defn}}, + conj .tl_set:N = \g_@@_const_autoref_conj_tl, + conj .initial:n = {\@@_get_const:N {conj}}, + exmp .tl_set:N = \g_@@_const_autoref_exmp_tl, + exmp .initial:n = {\@@_get_const:N {exmp}}, + case .tl_set:N = \g_@@_const_autoref_case_tl, + case .initial:n = {\@@_get_const:N {case}}, + rem .tl_set:N = \g_@@_const_autoref_rem_tl, + rem .initial:n = {\@@_get_const:N {rem}}, + figure .tl_set:N = \g_@@_const_autoref_fig_tl, + figure .initial:n = {\@@_get_const:N {fig}}, + table .tl_set:N = \g_@@_const_autoref_tab_tl, + table .initial:n = {\@@_get_const:N {tab}}, + equ .tl_set:N = \g_@@_const_autoref_equ_tl, + equ .initial:n = {\@@_get_const:N {equ}}, + } +\keys_define:nn { bithesis / const / style } + { + substituteSymbol .tl_set:N = \g_@@_const_substitute_symbol_tl, + substituteSymbol .initial:n = {*}, + } +\keys_define:nn { bithesis / const / info } + { + degree .tl_set:N = \g_@@_const_info_degree_tl, + degree .initial:n = { + \c_@@_graduate_label_degree_tl + }, + major .tl_set:N = \g_@@_const_info_major_tl, + major .initial:n = { + \@@_if_graduate:TF { + \c_@@_graduate_label_major_tl + } { + \@@_get_const:N {major} + } + }, } - % \end{macrocode} % % 定义 |bithesis/style| 键值对类。 diff --git a/templates/graduate-thesis/bithesis.cls b/templates/graduate-thesis/bithesis.cls index 712a970f..a68e384c 100644 --- a/templates/graduate-thesis/bithesis.cls +++ b/templates/graduate-thesis/bithesis.cls @@ -425,50 +425,61 @@ } \keys_define:nn { bithesis / const } { - autoref / algo .tl_set:N = \g__bithesis_const_autoref_algo_tl, - autoref / algo .initial:n = {\__bithesis_get_const:N {algo}}, - autoref / them .tl_set:N = \g__bithesis_const_autoref_them_tl, - autoref / them .initial:n = {\__bithesis_get_const:N {them}}, - autoref / lem .tl_set:N = \g__bithesis_const_autoref_lem_tl, - autoref / lem .initial:n = {\__bithesis_get_const:N {lem}}, - autoref / prop .tl_set:N = \g__bithesis_const_autoref_prop_tl, - autoref / prop .initial:n = {\__bithesis_get_const:N {prop}}, - autoref / cor .tl_set:N = \g__bithesis_const_autoref_cor_tl, - autoref / cor .initial:n = {\__bithesis_get_const:N {cor}}, - autoref / axi .tl_set:N = \g__bithesis_const_autoref_axi_tl, - autoref / axi .initial:n = {\__bithesis_get_const:N {axi}}, - autoref / defn .tl_set:N = \g__bithesis_const_autoref_defn_tl, - autoref / defn .initial:n = {\__bithesis_get_const:N {defn}}, - autoref / conj .tl_set:N = \g__bithesis_const_autoref_conj_tl, - autoref / conj .initial:n = {\__bithesis_get_const:N {conj}}, - autoref / exmp .tl_set:N = \g__bithesis_const_autoref_exmp_tl, - autoref / exmp .initial:n = {\__bithesis_get_const:N {exmp}}, - autoref / case .tl_set:N = \g__bithesis_const_autoref_case_tl, - autoref / case .initial:n = {\__bithesis_get_const:N {case}}, - autoref / rem .tl_set:N = \g__bithesis_const_autoref_rem_tl, - autoref / rem .initial:n = {\__bithesis_get_const:N {rem}}, - autoref / figure .tl_set:N = \g__bithesis_const_autoref_fig_tl, - autoref / figure .initial:n = {\__bithesis_get_const:N {fig}}, - autoref / table .tl_set:N = \g__bithesis_const_autoref_tab_tl, - autoref / table .initial:n = {\__bithesis_get_const:N {tab}}, - autoref / equ .tl_set:N = \g__bithesis_const_autoref_equ_tl, - autoref / equ .initial:n = {\__bithesis_get_const:N {equ}}, - style / substituteSymbol .tl_set:N = \g__bithesis_const_substitute_symbol_tl, - style / substituteSymbol .initial:n = {*}, - info / degree .tl_set:N = \g__bithesis_const_info_degree_tl, - info / degree .initial:n = { - \c__bithesis_graduate_label_degree_tl - }, - info / major .tl_set:N = \g__bithesis_const_info_major_tl, - info / major .initial:n = { - \__bithesis_if_graduate:TF { - \c__bithesis_graduate_label_major_tl - } { - \__bithesis_get_const:N {major} - } - }, + autoref .meta:nn = { bithesis / const / autoref } { #1 }, + style .meta:nn = { bithesis / const / style } { #1 }, + info .meta:nn = { bithesis / const / info } { #1 }, + } +\keys_define:nn { bithesis / const / autoref } + { + algo .tl_set:N = \g__bithesis_const_autoref_algo_tl, + algo .initial:n = {\__bithesis_get_const:N {algo}}, + them .tl_set:N = \g__bithesis_const_autoref_them_tl, + them .initial:n = {\__bithesis_get_const:N {them}}, + lem .tl_set:N = \g__bithesis_const_autoref_lem_tl, + lem .initial:n = {\__bithesis_get_const:N {lem}}, + prop .tl_set:N = \g__bithesis_const_autoref_prop_tl, + prop .initial:n = {\__bithesis_get_const:N {prop}}, + cor .tl_set:N = \g__bithesis_const_autoref_cor_tl, + cor .initial:n = {\__bithesis_get_const:N {cor}}, + axi .tl_set:N = \g__bithesis_const_autoref_axi_tl, + axi .initial:n = {\__bithesis_get_const:N {axi}}, + defn .tl_set:N = \g__bithesis_const_autoref_defn_tl, + defn .initial:n = {\__bithesis_get_const:N {defn}}, + conj .tl_set:N = \g__bithesis_const_autoref_conj_tl, + conj .initial:n = {\__bithesis_get_const:N {conj}}, + exmp .tl_set:N = \g__bithesis_const_autoref_exmp_tl, + exmp .initial:n = {\__bithesis_get_const:N {exmp}}, + case .tl_set:N = \g__bithesis_const_autoref_case_tl, + case .initial:n = {\__bithesis_get_const:N {case}}, + rem .tl_set:N = \g__bithesis_const_autoref_rem_tl, + rem .initial:n = {\__bithesis_get_const:N {rem}}, + figure .tl_set:N = \g__bithesis_const_autoref_fig_tl, + figure .initial:n = {\__bithesis_get_const:N {fig}}, + table .tl_set:N = \g__bithesis_const_autoref_tab_tl, + table .initial:n = {\__bithesis_get_const:N {tab}}, + equ .tl_set:N = \g__bithesis_const_autoref_equ_tl, + equ .initial:n = {\__bithesis_get_const:N {equ}}, + } +\keys_define:nn { bithesis / const / style } + { + substituteSymbol .tl_set:N = \g__bithesis_const_substitute_symbol_tl, + substituteSymbol .initial:n = {*}, + } +\keys_define:nn { bithesis / const / info } + { + degree .tl_set:N = \g__bithesis_const_info_degree_tl, + degree .initial:n = { + \c__bithesis_graduate_label_degree_tl + }, + major .tl_set:N = \g__bithesis_const_info_major_tl, + major .initial:n = { + \__bithesis_if_graduate:TF { + \c__bithesis_graduate_label_major_tl + } { + \__bithesis_get_const:N {major} + } + }, } - \keys_define:nn { bithesis / style } { head .tl_set:N = \l__bithesis_style_head_tl, diff --git a/templates/paper-translation/bithesis.cls b/templates/paper-translation/bithesis.cls index 712a970f..a68e384c 100644 --- a/templates/paper-translation/bithesis.cls +++ b/templates/paper-translation/bithesis.cls @@ -425,50 +425,61 @@ } \keys_define:nn { bithesis / const } { - autoref / algo .tl_set:N = \g__bithesis_const_autoref_algo_tl, - autoref / algo .initial:n = {\__bithesis_get_const:N {algo}}, - autoref / them .tl_set:N = \g__bithesis_const_autoref_them_tl, - autoref / them .initial:n = {\__bithesis_get_const:N {them}}, - autoref / lem .tl_set:N = \g__bithesis_const_autoref_lem_tl, - autoref / lem .initial:n = {\__bithesis_get_const:N {lem}}, - autoref / prop .tl_set:N = \g__bithesis_const_autoref_prop_tl, - autoref / prop .initial:n = {\__bithesis_get_const:N {prop}}, - autoref / cor .tl_set:N = \g__bithesis_const_autoref_cor_tl, - autoref / cor .initial:n = {\__bithesis_get_const:N {cor}}, - autoref / axi .tl_set:N = \g__bithesis_const_autoref_axi_tl, - autoref / axi .initial:n = {\__bithesis_get_const:N {axi}}, - autoref / defn .tl_set:N = \g__bithesis_const_autoref_defn_tl, - autoref / defn .initial:n = {\__bithesis_get_const:N {defn}}, - autoref / conj .tl_set:N = \g__bithesis_const_autoref_conj_tl, - autoref / conj .initial:n = {\__bithesis_get_const:N {conj}}, - autoref / exmp .tl_set:N = \g__bithesis_const_autoref_exmp_tl, - autoref / exmp .initial:n = {\__bithesis_get_const:N {exmp}}, - autoref / case .tl_set:N = \g__bithesis_const_autoref_case_tl, - autoref / case .initial:n = {\__bithesis_get_const:N {case}}, - autoref / rem .tl_set:N = \g__bithesis_const_autoref_rem_tl, - autoref / rem .initial:n = {\__bithesis_get_const:N {rem}}, - autoref / figure .tl_set:N = \g__bithesis_const_autoref_fig_tl, - autoref / figure .initial:n = {\__bithesis_get_const:N {fig}}, - autoref / table .tl_set:N = \g__bithesis_const_autoref_tab_tl, - autoref / table .initial:n = {\__bithesis_get_const:N {tab}}, - autoref / equ .tl_set:N = \g__bithesis_const_autoref_equ_tl, - autoref / equ .initial:n = {\__bithesis_get_const:N {equ}}, - style / substituteSymbol .tl_set:N = \g__bithesis_const_substitute_symbol_tl, - style / substituteSymbol .initial:n = {*}, - info / degree .tl_set:N = \g__bithesis_const_info_degree_tl, - info / degree .initial:n = { - \c__bithesis_graduate_label_degree_tl - }, - info / major .tl_set:N = \g__bithesis_const_info_major_tl, - info / major .initial:n = { - \__bithesis_if_graduate:TF { - \c__bithesis_graduate_label_major_tl - } { - \__bithesis_get_const:N {major} - } - }, + autoref .meta:nn = { bithesis / const / autoref } { #1 }, + style .meta:nn = { bithesis / const / style } { #1 }, + info .meta:nn = { bithesis / const / info } { #1 }, + } +\keys_define:nn { bithesis / const / autoref } + { + algo .tl_set:N = \g__bithesis_const_autoref_algo_tl, + algo .initial:n = {\__bithesis_get_const:N {algo}}, + them .tl_set:N = \g__bithesis_const_autoref_them_tl, + them .initial:n = {\__bithesis_get_const:N {them}}, + lem .tl_set:N = \g__bithesis_const_autoref_lem_tl, + lem .initial:n = {\__bithesis_get_const:N {lem}}, + prop .tl_set:N = \g__bithesis_const_autoref_prop_tl, + prop .initial:n = {\__bithesis_get_const:N {prop}}, + cor .tl_set:N = \g__bithesis_const_autoref_cor_tl, + cor .initial:n = {\__bithesis_get_const:N {cor}}, + axi .tl_set:N = \g__bithesis_const_autoref_axi_tl, + axi .initial:n = {\__bithesis_get_const:N {axi}}, + defn .tl_set:N = \g__bithesis_const_autoref_defn_tl, + defn .initial:n = {\__bithesis_get_const:N {defn}}, + conj .tl_set:N = \g__bithesis_const_autoref_conj_tl, + conj .initial:n = {\__bithesis_get_const:N {conj}}, + exmp .tl_set:N = \g__bithesis_const_autoref_exmp_tl, + exmp .initial:n = {\__bithesis_get_const:N {exmp}}, + case .tl_set:N = \g__bithesis_const_autoref_case_tl, + case .initial:n = {\__bithesis_get_const:N {case}}, + rem .tl_set:N = \g__bithesis_const_autoref_rem_tl, + rem .initial:n = {\__bithesis_get_const:N {rem}}, + figure .tl_set:N = \g__bithesis_const_autoref_fig_tl, + figure .initial:n = {\__bithesis_get_const:N {fig}}, + table .tl_set:N = \g__bithesis_const_autoref_tab_tl, + table .initial:n = {\__bithesis_get_const:N {tab}}, + equ .tl_set:N = \g__bithesis_const_autoref_equ_tl, + equ .initial:n = {\__bithesis_get_const:N {equ}}, + } +\keys_define:nn { bithesis / const / style } + { + substituteSymbol .tl_set:N = \g__bithesis_const_substitute_symbol_tl, + substituteSymbol .initial:n = {*}, + } +\keys_define:nn { bithesis / const / info } + { + degree .tl_set:N = \g__bithesis_const_info_degree_tl, + degree .initial:n = { + \c__bithesis_graduate_label_degree_tl + }, + major .tl_set:N = \g__bithesis_const_info_major_tl, + major .initial:n = { + \__bithesis_if_graduate:TF { + \c__bithesis_graduate_label_major_tl + } { + \__bithesis_get_const:N {major} + } + }, } - \keys_define:nn { bithesis / style } { head .tl_set:N = \l__bithesis_style_head_tl, diff --git a/templates/undergraduate-thesis-en/bithesis.cls b/templates/undergraduate-thesis-en/bithesis.cls index 712a970f..a68e384c 100644 --- a/templates/undergraduate-thesis-en/bithesis.cls +++ b/templates/undergraduate-thesis-en/bithesis.cls @@ -425,50 +425,61 @@ } \keys_define:nn { bithesis / const } { - autoref / algo .tl_set:N = \g__bithesis_const_autoref_algo_tl, - autoref / algo .initial:n = {\__bithesis_get_const:N {algo}}, - autoref / them .tl_set:N = \g__bithesis_const_autoref_them_tl, - autoref / them .initial:n = {\__bithesis_get_const:N {them}}, - autoref / lem .tl_set:N = \g__bithesis_const_autoref_lem_tl, - autoref / lem .initial:n = {\__bithesis_get_const:N {lem}}, - autoref / prop .tl_set:N = \g__bithesis_const_autoref_prop_tl, - autoref / prop .initial:n = {\__bithesis_get_const:N {prop}}, - autoref / cor .tl_set:N = \g__bithesis_const_autoref_cor_tl, - autoref / cor .initial:n = {\__bithesis_get_const:N {cor}}, - autoref / axi .tl_set:N = \g__bithesis_const_autoref_axi_tl, - autoref / axi .initial:n = {\__bithesis_get_const:N {axi}}, - autoref / defn .tl_set:N = \g__bithesis_const_autoref_defn_tl, - autoref / defn .initial:n = {\__bithesis_get_const:N {defn}}, - autoref / conj .tl_set:N = \g__bithesis_const_autoref_conj_tl, - autoref / conj .initial:n = {\__bithesis_get_const:N {conj}}, - autoref / exmp .tl_set:N = \g__bithesis_const_autoref_exmp_tl, - autoref / exmp .initial:n = {\__bithesis_get_const:N {exmp}}, - autoref / case .tl_set:N = \g__bithesis_const_autoref_case_tl, - autoref / case .initial:n = {\__bithesis_get_const:N {case}}, - autoref / rem .tl_set:N = \g__bithesis_const_autoref_rem_tl, - autoref / rem .initial:n = {\__bithesis_get_const:N {rem}}, - autoref / figure .tl_set:N = \g__bithesis_const_autoref_fig_tl, - autoref / figure .initial:n = {\__bithesis_get_const:N {fig}}, - autoref / table .tl_set:N = \g__bithesis_const_autoref_tab_tl, - autoref / table .initial:n = {\__bithesis_get_const:N {tab}}, - autoref / equ .tl_set:N = \g__bithesis_const_autoref_equ_tl, - autoref / equ .initial:n = {\__bithesis_get_const:N {equ}}, - style / substituteSymbol .tl_set:N = \g__bithesis_const_substitute_symbol_tl, - style / substituteSymbol .initial:n = {*}, - info / degree .tl_set:N = \g__bithesis_const_info_degree_tl, - info / degree .initial:n = { - \c__bithesis_graduate_label_degree_tl - }, - info / major .tl_set:N = \g__bithesis_const_info_major_tl, - info / major .initial:n = { - \__bithesis_if_graduate:TF { - \c__bithesis_graduate_label_major_tl - } { - \__bithesis_get_const:N {major} - } - }, + autoref .meta:nn = { bithesis / const / autoref } { #1 }, + style .meta:nn = { bithesis / const / style } { #1 }, + info .meta:nn = { bithesis / const / info } { #1 }, + } +\keys_define:nn { bithesis / const / autoref } + { + algo .tl_set:N = \g__bithesis_const_autoref_algo_tl, + algo .initial:n = {\__bithesis_get_const:N {algo}}, + them .tl_set:N = \g__bithesis_const_autoref_them_tl, + them .initial:n = {\__bithesis_get_const:N {them}}, + lem .tl_set:N = \g__bithesis_const_autoref_lem_tl, + lem .initial:n = {\__bithesis_get_const:N {lem}}, + prop .tl_set:N = \g__bithesis_const_autoref_prop_tl, + prop .initial:n = {\__bithesis_get_const:N {prop}}, + cor .tl_set:N = \g__bithesis_const_autoref_cor_tl, + cor .initial:n = {\__bithesis_get_const:N {cor}}, + axi .tl_set:N = \g__bithesis_const_autoref_axi_tl, + axi .initial:n = {\__bithesis_get_const:N {axi}}, + defn .tl_set:N = \g__bithesis_const_autoref_defn_tl, + defn .initial:n = {\__bithesis_get_const:N {defn}}, + conj .tl_set:N = \g__bithesis_const_autoref_conj_tl, + conj .initial:n = {\__bithesis_get_const:N {conj}}, + exmp .tl_set:N = \g__bithesis_const_autoref_exmp_tl, + exmp .initial:n = {\__bithesis_get_const:N {exmp}}, + case .tl_set:N = \g__bithesis_const_autoref_case_tl, + case .initial:n = {\__bithesis_get_const:N {case}}, + rem .tl_set:N = \g__bithesis_const_autoref_rem_tl, + rem .initial:n = {\__bithesis_get_const:N {rem}}, + figure .tl_set:N = \g__bithesis_const_autoref_fig_tl, + figure .initial:n = {\__bithesis_get_const:N {fig}}, + table .tl_set:N = \g__bithesis_const_autoref_tab_tl, + table .initial:n = {\__bithesis_get_const:N {tab}}, + equ .tl_set:N = \g__bithesis_const_autoref_equ_tl, + equ .initial:n = {\__bithesis_get_const:N {equ}}, + } +\keys_define:nn { bithesis / const / style } + { + substituteSymbol .tl_set:N = \g__bithesis_const_substitute_symbol_tl, + substituteSymbol .initial:n = {*}, + } +\keys_define:nn { bithesis / const / info } + { + degree .tl_set:N = \g__bithesis_const_info_degree_tl, + degree .initial:n = { + \c__bithesis_graduate_label_degree_tl + }, + major .tl_set:N = \g__bithesis_const_info_major_tl, + major .initial:n = { + \__bithesis_if_graduate:TF { + \c__bithesis_graduate_label_major_tl + } { + \__bithesis_get_const:N {major} + } + }, } - \keys_define:nn { bithesis / style } { head .tl_set:N = \l__bithesis_style_head_tl, diff --git a/templates/undergraduate-thesis/bithesis.cls b/templates/undergraduate-thesis/bithesis.cls index 712a970f..a68e384c 100644 --- a/templates/undergraduate-thesis/bithesis.cls +++ b/templates/undergraduate-thesis/bithesis.cls @@ -425,50 +425,61 @@ } \keys_define:nn { bithesis / const } { - autoref / algo .tl_set:N = \g__bithesis_const_autoref_algo_tl, - autoref / algo .initial:n = {\__bithesis_get_const:N {algo}}, - autoref / them .tl_set:N = \g__bithesis_const_autoref_them_tl, - autoref / them .initial:n = {\__bithesis_get_const:N {them}}, - autoref / lem .tl_set:N = \g__bithesis_const_autoref_lem_tl, - autoref / lem .initial:n = {\__bithesis_get_const:N {lem}}, - autoref / prop .tl_set:N = \g__bithesis_const_autoref_prop_tl, - autoref / prop .initial:n = {\__bithesis_get_const:N {prop}}, - autoref / cor .tl_set:N = \g__bithesis_const_autoref_cor_tl, - autoref / cor .initial:n = {\__bithesis_get_const:N {cor}}, - autoref / axi .tl_set:N = \g__bithesis_const_autoref_axi_tl, - autoref / axi .initial:n = {\__bithesis_get_const:N {axi}}, - autoref / defn .tl_set:N = \g__bithesis_const_autoref_defn_tl, - autoref / defn .initial:n = {\__bithesis_get_const:N {defn}}, - autoref / conj .tl_set:N = \g__bithesis_const_autoref_conj_tl, - autoref / conj .initial:n = {\__bithesis_get_const:N {conj}}, - autoref / exmp .tl_set:N = \g__bithesis_const_autoref_exmp_tl, - autoref / exmp .initial:n = {\__bithesis_get_const:N {exmp}}, - autoref / case .tl_set:N = \g__bithesis_const_autoref_case_tl, - autoref / case .initial:n = {\__bithesis_get_const:N {case}}, - autoref / rem .tl_set:N = \g__bithesis_const_autoref_rem_tl, - autoref / rem .initial:n = {\__bithesis_get_const:N {rem}}, - autoref / figure .tl_set:N = \g__bithesis_const_autoref_fig_tl, - autoref / figure .initial:n = {\__bithesis_get_const:N {fig}}, - autoref / table .tl_set:N = \g__bithesis_const_autoref_tab_tl, - autoref / table .initial:n = {\__bithesis_get_const:N {tab}}, - autoref / equ .tl_set:N = \g__bithesis_const_autoref_equ_tl, - autoref / equ .initial:n = {\__bithesis_get_const:N {equ}}, - style / substituteSymbol .tl_set:N = \g__bithesis_const_substitute_symbol_tl, - style / substituteSymbol .initial:n = {*}, - info / degree .tl_set:N = \g__bithesis_const_info_degree_tl, - info / degree .initial:n = { - \c__bithesis_graduate_label_degree_tl - }, - info / major .tl_set:N = \g__bithesis_const_info_major_tl, - info / major .initial:n = { - \__bithesis_if_graduate:TF { - \c__bithesis_graduate_label_major_tl - } { - \__bithesis_get_const:N {major} - } - }, + autoref .meta:nn = { bithesis / const / autoref } { #1 }, + style .meta:nn = { bithesis / const / style } { #1 }, + info .meta:nn = { bithesis / const / info } { #1 }, + } +\keys_define:nn { bithesis / const / autoref } + { + algo .tl_set:N = \g__bithesis_const_autoref_algo_tl, + algo .initial:n = {\__bithesis_get_const:N {algo}}, + them .tl_set:N = \g__bithesis_const_autoref_them_tl, + them .initial:n = {\__bithesis_get_const:N {them}}, + lem .tl_set:N = \g__bithesis_const_autoref_lem_tl, + lem .initial:n = {\__bithesis_get_const:N {lem}}, + prop .tl_set:N = \g__bithesis_const_autoref_prop_tl, + prop .initial:n = {\__bithesis_get_const:N {prop}}, + cor .tl_set:N = \g__bithesis_const_autoref_cor_tl, + cor .initial:n = {\__bithesis_get_const:N {cor}}, + axi .tl_set:N = \g__bithesis_const_autoref_axi_tl, + axi .initial:n = {\__bithesis_get_const:N {axi}}, + defn .tl_set:N = \g__bithesis_const_autoref_defn_tl, + defn .initial:n = {\__bithesis_get_const:N {defn}}, + conj .tl_set:N = \g__bithesis_const_autoref_conj_tl, + conj .initial:n = {\__bithesis_get_const:N {conj}}, + exmp .tl_set:N = \g__bithesis_const_autoref_exmp_tl, + exmp .initial:n = {\__bithesis_get_const:N {exmp}}, + case .tl_set:N = \g__bithesis_const_autoref_case_tl, + case .initial:n = {\__bithesis_get_const:N {case}}, + rem .tl_set:N = \g__bithesis_const_autoref_rem_tl, + rem .initial:n = {\__bithesis_get_const:N {rem}}, + figure .tl_set:N = \g__bithesis_const_autoref_fig_tl, + figure .initial:n = {\__bithesis_get_const:N {fig}}, + table .tl_set:N = \g__bithesis_const_autoref_tab_tl, + table .initial:n = {\__bithesis_get_const:N {tab}}, + equ .tl_set:N = \g__bithesis_const_autoref_equ_tl, + equ .initial:n = {\__bithesis_get_const:N {equ}}, + } +\keys_define:nn { bithesis / const / style } + { + substituteSymbol .tl_set:N = \g__bithesis_const_substitute_symbol_tl, + substituteSymbol .initial:n = {*}, + } +\keys_define:nn { bithesis / const / info } + { + degree .tl_set:N = \g__bithesis_const_info_degree_tl, + degree .initial:n = { + \c__bithesis_graduate_label_degree_tl + }, + major .tl_set:N = \g__bithesis_const_info_major_tl, + major .initial:n = { + \__bithesis_if_graduate:TF { + \c__bithesis_graduate_label_major_tl + } { + \__bithesis_get_const:N {major} + } + }, } - \keys_define:nn { bithesis / style } { head .tl_set:N = \l__bithesis_style_head_tl,