texlive[70921] Master/texmf-dist: bithesis (11apr24)

commits+karl at tug.org commits+karl at tug.org
Thu Apr 11 21:56:07 CEST 2024


Revision: 70921
          https://tug.org/svn/texlive?view=revision&revision=70921
Author:   karl
Date:     2024-04-11 21:56:07 +0200 (Thu, 11 Apr 2024)
Log Message:
-----------
bithesis (11apr24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/bithesis/bithesis.pdf
    trunk/Master/texmf-dist/source/latex/bithesis/bithesis.dtx
    trunk/Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls
    trunk/Master/texmf-dist/tex/latex/bithesis/bithesis.cls
    trunk/Master/texmf-dist/tex/latex/bithesis/bitreport.cls

Modified: trunk/Master/texmf-dist/doc/latex/bithesis/bithesis.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/bithesis/bithesis.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/bithesis/bithesis.dtx	2024-04-11 19:55:58 UTC (rev 70920)
+++ trunk/Master/texmf-dist/source/latex/bithesis/bithesis.dtx	2024-04-11 19:56:07 UTC (rev 70921)
@@ -21,10 +21,10 @@
 %<thesis>\ProvidesExplClass{bithesis}
 %<report>\ProvidesExplClass{bitreport}
 %<beamer>\ProvidesExplClass{bitbeamer}
-%<cls>{2024-04-06}{3.7.1}{BIT Thesis Templates}
+%<cls>{2024-04-11}{3.7.3}{BIT Thesis Templates}
 %
 %<*driver>
-\ProvidesFile{bithesis.dtx}[2024/04/06 3.7.2 BIT Thesis Templates]
+\ProvidesFile{bithesis.dtx}[2024/04/11 3.7.3 BIT Thesis Templates]
 \documentclass[letterpaper]{l3doc}
 \usepackage{dtx-style}
 
@@ -691,7 +691,14 @@
     tabularFontSize .tl_set:N = \l_@@_misc_tabular_font_size_tl,
     tabularFontSize .initial:n = {5},
     arialFont .tl_set:N = \l_@@_misc_arial_font_path_tl,
-    autoref / algo .tl_set:N = \algoautorefname,
+    autoref / algo .code:n = {
+      % 定义算法的 autoref
+      \tl_set:Nn \algorithmautorefname {#1}
+      % 定义算法标题
+      \AtBeginDocument{
+        \tl_set:Nn \ALG at name {#1}
+      }
+    },
     autoref / algo .initial:n = {\g_@@_const_autoref_algo_tl},
     autoref / them .tl_set:N = \themautorefname,
     autoref / them .initial:n = {\g_@@_const_autoref_them_tl},
@@ -721,6 +728,9 @@
     autoref / table .initial:n = {\g_@@_const_autoref_tab_tl},
     autoref / equ .tl_set:N = \equationautorefname,
     autoref / equ .initial:n = {\g_@@_const_autoref_equ_tl},
+    % 浮动体与正文之间的距离
+    floatSeparation .tl_set:N = \l_@@_misc_float_separation_tl,
+    floatSeparation .initial:n = {0},
   }
 %    \end{macrocode}
 %    
@@ -1005,7 +1015,10 @@
 % 根据学校的要求,在本科生模板图片前后加上一行空白。
 %    \begin{macrocode}
 \@@_if_bachelor_thesis:T {
+  % 浮动体位于正文中间时,调整浮动体与上下正文之间的距离,即"前后加上一行空白"
   \setlength{\intextsep}{1.80\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip}
+  % 浮动体位于页面顶部或底部时,调整浮动体与正文之间的距离,后或前加上一行空白
+  \setlength{\textfloatsep}{1.80\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip}
 }
 %    \end{macrocode}
 %
@@ -1548,8 +1561,20 @@
 %    \begin{macrocode}
 \@@_if_graduate:TF {
   \tl_set:Nn \g_@@_label_divide_char_tl {.}
+  % 研究生模板要求 "图序和图题间空1个中文字距"
+  \captionsetup[figure]{font=small,labelsep=quad}
+  % 研究生模板要求 "表序和题目间空1个中文字距"
+  \captionsetup[table]{font=small,labelsep=quad}
+  % 其它 caption 也参照上述格式
+  \captionsetup[lstlisting]{font=small,labelsep=quad}
+  \captionsetup[algorithm]{font=small,labelsep=quad}
 } {
   \tl_set:Nn \g_@@_label_divide_char_tl {-}
+  % 本科生模板无 caption 字距要求
+  \captionsetup[figure]{font=small,labelsep=space}
+  \captionsetup[table]{font=small,labelsep=space}
+  \captionsetup[lstlisting]{font=small,labelsep=space}
+  \captionsetup[algorithm]{font=small,labelsep=space}
 }
 %    \end{macrocode}
 % 
@@ -1558,11 +1583,9 @@
 %    \begin{macrocode}
 % 图片:五号字。
 \cs_set:Npn \thefigure {\thechapter\g_@@_label_divide_char_tl\arabic{figure}}
-\captionsetup[figure]{font=small,labelsep=space}
 
 % 表格:五号字。
 \cs_set:Npn \thetable {\thechapter\g_@@_label_divide_char_tl\arabic{table}}
-\captionsetup[table]{font=small,labelsep=space}
 
 % equation
 \cs_set:Npn \theequation {\thechapter\g_@@_label_divide_char_tl\arabic{equation}}
@@ -1572,14 +1595,19 @@
   \cs_gset:Npn \thelstlisting {\thechapter\g_@@_label_divide_char_tl\arabic{lstlisting}}
   \cs_gset:Npn \lstlistingname {\c_@@_label_code_tl}
   
+  % 算法变成「章节号-序号」
+  \cs_gset:Npn \thealgorithm
+  {\thechapter\g__bithesis_label_divide_char_tl\arabic{algorithm}}
+  
   % 默认的情况下,保留公式和上下文的一定间距。(会比 Word 稍宽一些)
   \setlength{\abovedisplayskip}{\l_@@_style_math_above_display_skip_dim}
   \setlength{\abovedisplayshortskip}{\l_@@_style_math_above_display_skip_dim}
   \setlength{\belowdisplayskip}{\l_@@_style_math_below_display_skip_dim}
   \setlength{\belowdisplayshortskip}{\l_@@_style_math_below_display_skip_dim}
-  %
+  % 调整浮动体与文字之间的距离
+  \addtolength{\intextsep}{\l_@@_misc_float_separation_tl\baselineskip}
+  \addtolength{\textfloatsep}{\l_@@_misc_float_separation_tl\baselineskip}
 }
-\captionsetup[lstlisting]{font=small,labelsep=space}
 %    \end{macrocode}
 % \end{macro}
 % 

Modified: trunk/Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls	2024-04-11 19:55:58 UTC (rev 70920)
+++ trunk/Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls	2024-04-11 19:56:07 UTC (rev 70921)
@@ -27,7 +27,7 @@
 %% 
 \RequirePackage{expl3,l3keys2e}
 \ProvidesExplClass{bitbeamer}
-{2024-04-06}{3.7.1}{BIT Thesis Templates}
+{2024-04-11}{3.7.3}{BIT Thesis Templates}
 \keys_define:nn { bitbeamer }
   {
     titlegraphic .tl_set:N = \l_bit_titlegraphic_tl,

Modified: trunk/Master/texmf-dist/tex/latex/bithesis/bithesis.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bithesis/bithesis.cls	2024-04-11 19:55:58 UTC (rev 70920)
+++ trunk/Master/texmf-dist/tex/latex/bithesis/bithesis.cls	2024-04-11 19:56:07 UTC (rev 70921)
@@ -27,7 +27,7 @@
 %% 
 \RequirePackage{expl3,l3keys2e}
 \ProvidesExplClass{bithesis}
-{2024-04-06}{3.7.1}{BIT Thesis Templates}
+{2024-04-11}{3.7.3}{BIT Thesis Templates}
 \int_new:N \g__bithesis_thesis_type_int
 \int_new:N \g__bithesis_head_zihao_int
 \bool_new:N \g__bithesis_twoside_bool
@@ -435,7 +435,14 @@
     tabularFontSize .tl_set:N = \l__bithesis_misc_tabular_font_size_tl,
     tabularFontSize .initial:n = {5},
     arialFont .tl_set:N = \l__bithesis_misc_arial_font_path_tl,
-    autoref / algo .tl_set:N = \algoautorefname,
+    autoref / algo .code:n = {
+      % 定义算法的 autoref
+      \tl_set:Nn \algorithmautorefname {#1}
+      % 定义算法标题
+      \AtBeginDocument{
+        \tl_set:Nn \ALG at name {#1}
+      }
+    },
     autoref / algo .initial:n = {\g__bithesis_const_autoref_algo_tl},
     autoref / them .tl_set:N = \themautorefname,
     autoref / them .initial:n = {\g__bithesis_const_autoref_them_tl},
@@ -465,6 +472,9 @@
     autoref / table .initial:n = {\g__bithesis_const_autoref_tab_tl},
     autoref / equ .tl_set:N = \equationautorefname,
     autoref / equ .initial:n = {\g__bithesis_const_autoref_equ_tl},
+    % 浮动体与正文之间的距离
+    floatSeparation .tl_set:N = \l__bithesis_misc_float_separation_tl,
+    floatSeparation .initial:n = {0},
   }
 \keys_define:nn { bithesis / const }
   {
@@ -672,7 +682,10 @@
   }
 }
 \__bithesis_if_bachelor_thesis:T {
+  % 浮动体位于正文中间时,调整浮动体与上下正文之间的距离,即"前后加上一行空白"
   \setlength{\intextsep}{1.80\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip}
+  % 浮动体位于页面顶部或底部时,调整浮动体与正文之间的距离,后或前加上一行空白
+  \setlength{\textfloatsep}{1.80\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip}
 }
 \ctex_at_end_preamble:n {
   \bool_if:NTF \l__bithesis_style_better_new_roman_bool {
@@ -1098,14 +1111,24 @@
 }
 \__bithesis_if_graduate:TF {
   \tl_set:Nn \g__bithesis_label_divide_char_tl {.}
+  % 研究生模板要求 "图序和图题间空1个中文字距"
+  \captionsetup[figure]{font=small,labelsep=quad}
+  % 研究生模板要求 "表序和题目间空1个中文字距"
+  \captionsetup[table]{font=small,labelsep=quad}
+  % 其它 caption 也参照上述格式
+  \captionsetup[lstlisting]{font=small,labelsep=quad}
+  \captionsetup[algorithm]{font=small,labelsep=quad}
 } {
   \tl_set:Nn \g__bithesis_label_divide_char_tl {-}
+  % 本科生模板无 caption 字距要求
+  \captionsetup[figure]{font=small,labelsep=space}
+  \captionsetup[table]{font=small,labelsep=space}
+  \captionsetup[lstlisting]{font=small,labelsep=space}
+  \captionsetup[algorithm]{font=small,labelsep=space}
 }
 \cs_set:Npn \thefigure {\thechapter\g__bithesis_label_divide_char_tl\arabic{figure}}
-\captionsetup[figure]{font=small,labelsep=space}
 
 \cs_set:Npn \thetable {\thechapter\g__bithesis_label_divide_char_tl\arabic{table}}
-\captionsetup[table]{font=small,labelsep=space}
 
 \cs_set:Npn \theequation {\thechapter\g__bithesis_label_divide_char_tl\arabic{equation}}
 
@@ -1113,14 +1136,19 @@
   \cs_gset:Npn \thelstlisting {\thechapter\g__bithesis_label_divide_char_tl\arabic{lstlisting}}
   \cs_gset:Npn \lstlistingname {\c__bithesis_label_code_tl}
 
+  % 算法变成「章节号-序号」
+  \cs_gset:Npn \thealgorithm
+  {\thechapter\g__bithesis_label_divide_char_tl\arabic{algorithm}}
+
   % 默认的情况下,保留公式和上下文的一定间距。(会比 Word 稍宽一些)
   \setlength{\abovedisplayskip}{\l__bithesis_style_math_above_display_skip_dim}
   \setlength{\abovedisplayshortskip}{\l__bithesis_style_math_above_display_skip_dim}
   \setlength{\belowdisplayskip}{\l__bithesis_style_math_below_display_skip_dim}
   \setlength{\belowdisplayshortskip}{\l__bithesis_style_math_below_display_skip_dim}
-  %
+  % 调整浮动体与文字之间的距离
+  \addtolength{\intextsep}{\l__bithesis_misc_float_separation_tl\baselineskip}
+  \addtolength{\textfloatsep}{\l__bithesis_misc_float_separation_tl\baselineskip}
 }
-\captionsetup[lstlisting]{font=small,labelsep=space}
 \bool_if:NF \l__bithesis_style_hyphen_bool {
   \hbadness=10000
   \tolerance=1

Modified: trunk/Master/texmf-dist/tex/latex/bithesis/bitreport.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bithesis/bitreport.cls	2024-04-11 19:55:58 UTC (rev 70920)
+++ trunk/Master/texmf-dist/tex/latex/bithesis/bitreport.cls	2024-04-11 19:56:07 UTC (rev 70921)
@@ -27,7 +27,7 @@
 %% 
 \RequirePackage{expl3,l3keys2e}
 \ProvidesExplClass{bitreport}
-{2024-04-06}{3.7.1}{BIT Thesis Templates}
+{2024-04-11}{3.7.3}{BIT Thesis Templates}
 \int_new:N \g__bithesis_report_type_int
 \clist_const:Nn \c__bithesis_report_type_clist
     { common, undergraduate_proposal}



More information about the tex-live-commits mailing list.