Skip to content

Commit

Permalink
refactor: cover/dilimiter选项改为cover/delimiter
Browse files Browse the repository at this point in the history
  • Loading branch information
YDX-2147483647 authored and fky2015 committed Jul 16, 2024
1 parent 9104d6a commit 49cae71
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions bithesis-doc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,9 @@ \subsubsection{封面选项} \label{sec:cover}
在 Windows 和 macOS 中,该字体已经安装;在 Linux 中一般需要用户自行安装(如果你是 WSL 用户,可参照\ref{sec:word-fonts}直接使用 Windows 下的字体)。
\end{function}

\begin{function}{cover/dilimiter}
\begin{bitsyntax}[emph={[1]dilimiter}]
dilimiter = (*\marg{任意字符串}*)
\begin{function}{cover/delimiter}
\begin{bitsyntax}[emph={[1]delimiter}]
delimiter = (*\marg{任意字符串}*)
\end{bitsyntax}

\textit{此选项一般不需要用户自行修改。}
Expand Down
30 changes: 15 additions & 15 deletions bithesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@
xiheiFont .tl_set:N = \l_@@_cover_xihei_font_path_tl,
xiheiFont .default:n = {STXihei},
%% cover entry
dilimiter .tl_set:N = \l_@@_cover_dilimiter_tl,
delimiter .tl_set:N = \l_@@_cover_delimiter_tl,
labelAlign .tl_set:N = \l_@@_cover_label_align_tl,
labelAlign .initial:n = {r},
valueAlign .tl_set:N = \l_@@_cover_value_align_tl,
Expand Down Expand Up @@ -1814,7 +1814,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_render_cover_entry:nn #1#2 {
\makebox[\l_@@_cover_label_max_width_dim][\l_@@_cover_label_align_tl]{
\tl_if_blank:VTF #1 {} {#1\l_@@_cover_dilimiter_tl}
\tl_if_blank:VTF #1 {} {#1\l_@@_cover_delimiter_tl}
}
\hspace{1ex}
\@@_dunderline:nnn{\l_@@_cover_underline_offset_dim}
Expand Down Expand Up @@ -2057,8 +2057,8 @@
{
\renewcommand{\baselinestretch}{2}

\tl_if_empty:NT \l_@@_cover_dilimiter_tl {
\tl_set:Nn \l_@@_cover_dilimiter_tl {\qquad}
\tl_if_empty:NT \l_@@_cover_delimiter_tl {
\tl_set:Nn \l_@@_cover_delimiter_tl {\qquad}
}
\tl_set:Nn \l_@@_cover_underline_offset_dim {-5pt}

Expand Down Expand Up @@ -2113,8 +2113,8 @@
\vskip \stretch{1}

{
\tl_if_empty:NT \l_@@_cover_dilimiter_tl {
\tl_set:Nn \l_@@_cover_dilimiter_tl {:~}
\tl_if_empty:NT \l_@@_cover_delimiter_tl {
\tl_set:Nn \l_@@_cover_delimiter_tl {:~}
}

\tl_set:Nn \l_@@_cover_label_align_tl {l}
Expand Down Expand Up @@ -2364,8 +2364,8 @@

\begin{spacing}{1.8}
\begin{center}
\tl_if_empty:NT \l_@@_cover_dilimiter_tl {
\tl_set:Nn \l_@@_cover_dilimiter_tl {:}
\tl_if_empty:NT \l_@@_cover_delimiter_tl {
\tl_set:Nn \l_@@_cover_delimiter_tl {:}
}
% if not auto width, try override width
\bool_if:NF \l_@@_cover_auto_width_bool {
Expand Down Expand Up @@ -2430,7 +2430,7 @@

\begin{spacing}{1.8}

\tl_set:Nn \l_@@_cover_dilimiter_tl {\textbf{}}
\tl_set:Nn \l_@@_cover_delimiter_tl {\textbf{}}
\bool_set_false:N \l_@@_cover_auto_width_bool
\dim_set:Nn \l_@@_cover_label_max_width_dim {35mm}
\dim_set:Nn \l_@@_cover_value_max_width_dim {115mm}
Expand Down Expand Up @@ -2462,8 +2462,8 @@
\vspace{\stretch{0.67}}

\begin{spacing}{1.8}
\tl_if_empty:NT \l_@@_cover_dilimiter_tl {
\tl_set:Nn \l_@@_cover_dilimiter_tl {:}
\tl_if_empty:NT \l_@@_cover_delimiter_tl {
\tl_set:Nn \l_@@_cover_delimiter_tl {:}
}

% 如果不是自动计算宽度,且用户没有自定义宽度,
Expand Down Expand Up @@ -2520,8 +2520,8 @@

\begin{spacing}{1.8}
\begin{center}
\tl_if_empty:NT \l_@@_cover_dilimiter_tl {
\tl_set:Nn \l_@@_cover_dilimiter_tl {:}
\tl_if_empty:NT \l_@@_cover_delimiter_tl {
\tl_set:Nn \l_@@_cover_delimiter_tl {:}
}

% if not auto width, try override width
Expand Down Expand Up @@ -3415,7 +3415,7 @@
imagePath .tl_set:N = \l_bit_coverimagepath_tl,
date .tl_set:N = \l_@@_cover_date_tl,
%% cover entry
dilimiter .tl_set:N = \l_@@_cover_dilimiter_tl,
delimiter .tl_set:N = \l_@@_cover_delimiter_tl,
labelAlign .tl_set:N = \l_@@_cover_label_align_tl,
labelAlign .initial:n = {r},
valueAlign .tl_set:N = \l_@@_cover_value_align_tl,
Expand Down Expand Up @@ -3526,7 +3526,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_render_cover_entry:nn #1#2 {
\makebox[\l_@@_cover_label_max_width_dim][\l_@@_cover_label_align_tl]{
\tl_if_blank:VTF #1 {} {#1\l_@@_cover_dilimiter_tl}
\tl_if_blank:VTF #1 {} {#1\l_@@_cover_delimiter_tl}
}
\hspace{1ex}
\@@_dunderline:nnn{\l_@@_cover_underline_offset_dim}{\l_@@_cover_underline_thickness_dim}{
Expand Down

0 comments on commit 49cae71

Please sign in to comment.