Skip to content

Commit

Permalink
feat!: 致谢标题支持用const/heading/acknowledgements调整,同时英文模板默认值从单数改为复数
Browse files Browse the repository at this point in the history
致谢有 -edge-/-edg-、-ment/-ments 四种写法。

Relates-to: #496
  • Loading branch information
YDX-2147483647 committed Jul 16, 2024
1 parent 7b89ffa commit e524e6b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
14 changes: 12 additions & 2 deletions bithesis-doc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1442,11 +1442,21 @@ \subsubsection{常量名称覆盖}
\begin{bitsyntax}[emph={[1]degree,major}]
info = {
degree = (*(申请学位级别)|\marg{字符串}*),
major = (*(学科专业)|\marg{字符串}*),
major = (*专业 | 学科专业 | Degree | \marg{字符串}*),
},
\end{bitsyntax}

用于定义封面中个人信息条目的各个常量值。
用于定义封面中个人信息条目的各个常量值。默认按论文类型自动设置。
\end{variable}

\begin{variable}[added=2024-07-09]{const/heading/acknowledgements}
\begin{bitsyntax}[emph={[1]acknowledgements}]
info = {
acknowledgements = (*致谢 | Acknowledgements | \marg{字符串}*),
},
\end{bitsyntax}

用于定义一些固定章节的标题。默认按论文类型自动设置。
\end{variable}

\section{正文编写}
Expand Down
16 changes: 10 additions & 6 deletions bithesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@
{conclusion} {结\label_space: 论} {Conclusions},
% 附录部分的总标题
{appendix} {附\label_space: 录} {Appendices},
{ack} {致\label_space: 谢} {Acknowledgement},
{ack} {致\label_space: 谢} {Acknowledgements},
{figure} {插\label_space: 图} {Illustrations},
{table} {表\label_space: 格} {Tables},
% 附录下各部分编号的前缀
Expand Down Expand Up @@ -762,6 +762,7 @@
autoref .meta:nn = { bithesis / const / autoref } { #1 },
style .meta:nn = { bithesis / const / style } { #1 },
info .meta:nn = { bithesis / const / info } { #1 },
heading .meta:nn = { bithesis / const / heading } { #1 },
}
\keys_define:nn { bithesis / const / autoref }
{
Expand Down Expand Up @@ -814,6 +815,13 @@
}
},
}
\keys_define:nn { bithesis / const / heading }
{
acknowledgements .tl_set:N = \g_@@_const_heading_acknowledgements_tl,
acknowledgements .initial:n = {
\@@_get_const:N {ack}
},
}
% \end{macrocode}
%
% 定义 |bithesis/style| 键值对类。
Expand Down Expand Up @@ -3032,11 +3040,7 @@
subsubsection/number = \arabic{section}. \arabic{subsection}. \arabic{subsubsection},
}

\@@_if_thesis_english:TF {
\chapter{\c_@@_label_ack_en_tl}
} {
\chapter{\c_@@_label_ack_tl}
}
\chapter{\g_@@_const_heading_acknowledgements_tl}
\@@_if_graduate:TF {\fangsong}{}
#1
\end{blindPeerReview}
Expand Down

0 comments on commit e524e6b

Please sign in to comment.