texlive[66622] Master/texmf-dist: bithesis (16mar23)

commits+karl at tug.org commits+karl at tug.org
Tue Mar 21 17:49:09 CET 2023


Revision: 66622
          http://tug.org/svn/texlive?view=revision&revision=66622
Author:   karl
Date:     2023-03-21 17:49:09 +0100 (Tue, 21 Mar 2023)
Log Message:
-----------
bithesis (16mar23)

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	2023-03-21 16:48:18 UTC (rev 66621)
+++ trunk/Master/texmf-dist/source/latex/bithesis/bithesis.dtx	2023-03-21 16:49:09 UTC (rev 66622)
@@ -21,7 +21,7 @@
 %<thesis>\ProvidesExplClass{bithesis}
 %<report>\ProvidesExplClass{bitreport}
 %<beamer>\ProvidesExplClass{bitbeamer}
-%<cls>{2023-03-05}{3.4.2}{BIT Thesis Templates}
+%<cls>{2023-03-16}{3.4.3}{BIT Thesis Templates}
 %
 %<oldcls>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
 %<book>\ProvidesClass{bitbook}
@@ -30,7 +30,7 @@
 %<oldcls> [2022/05/09 v2.1.1 BIT Thesis Templates]
 %
 %<*driver>
-\ProvidesFile{bithesis.dtx}[2023/03/05 3.4.2 BIT Thesis Templates]
+\ProvidesFile{bithesis.dtx}[2023/03/16 3.4.3 BIT Thesis Templates]
 \documentclass[letterpaper]{l3doc}
 \usepackage{dtx-style}
 
@@ -122,7 +122,7 @@
 % (\href{http://openstd.samr.gov.cn/bzgk/gb/newGbInfo?hcno=7FA63E9BBA56E60471AEDAEBDE44B14C}{GB/T 7714—2015})
 % 的标准。
 % 
-% 目前,\BIThesisLaTeX 主要设计完成了计算机学院本科生毕业论文开题报告、
+% 目前,\BIThesisLaTeX 主要设计完成了
 % 本科生毕业(设计)论文、研究生学位论文、本科生毕业(设计)论文外文翻译、
 % 全英文专业本科生毕业(设计)论文与通用实验报告的 {\LaTeX} 模板。
 %
@@ -262,7 +262,7 @@
 % \multirow{2}{*}{文档类} & \cls{bithesis.cls}\ref{sec:bithesis}  
 %   & 封装本科生与研究生的毕业论文样式。 \\
 % & \cls{bitreport.cls}\ref{sec:bitreport} 
-%   & 封装了本科生开题报告与实验报告样式。     \\ \cmidrule(l){2-3}
+%   & 封装了本科生开题报告(已废弃)与实验报告样式。     \\ \cmidrule(l){2-3}
 % & \cls{bitbeamer.cls} 
 %   & 对应 ctexbeamer.cls ,提供了北理工的 Beamer 模板样式。     
 %   \\ \cmidrule(l){2-3}
@@ -520,6 +520,17 @@
 %   \end{latex}
 % \end{function}
 %  
+% \begin{function}[added=2023-03-10]{autoFakeBold}
+%   \begin{bitsyntax}[emph={[1]autoFakeBold}]
+%     autoFakeBold = (*<(3)|false|{数字}>*)
+%   \end{bitsyntax}
+%
+%   该选项用于调整 \cls{xeCJK} 中 |AutoFakeBold| 选项以定义伪粗体的粗细程度。
+%   
+%   默认为 3,一般按照经验来说,2.5——3 比较符合 Words 中的粗体样式。
+%   
+% \end{function}
+%  
 % \subsection{参数设置}
 %   
 % \begin{function}{\BITSetup}
@@ -1399,17 +1410,22 @@
 %
 % \subsection{如何修改数学公式的字体?}
 %
-% 本项目已经使用 \pkg{unicode-math} 宏包,
-% 可以在导言区使用 |\setmathfont{XITS Math}| 修改数学环境下字体:
+% 可以在导言区引入 \pkg{unicode-math} 宏包,
+% 并使用 |\setmathfont{XITS Math}| 修改数学环境下字体:
 %
 % \begin{latex}
-%   \unimathsetup{bold-style=ISO}
+%   \usepackage{unicode-math}
+%   \unimathsetup{
+%     math-style = ISO,
+%     bold-style = ISO,
+%   }
 %   \setmathfont{XITSMath-Regular.otf}
 % \end{latex}
 %
 % \textit{请事先安装 XITS 字体。}
 %
-% \textit{更多字体与使用方法请参考 \url{https://ctan.org/pkg/unicode-math?lang=zh}。}
+% \textit{更多字体与使用方法请参考 
+%   \url{https://ctan.org/pkg/unicode-math?lang=zh}。}
 %
 % \section{\cls{bitreport.cls} 使用与配置}
 % \label{sec:bitreport}
@@ -1417,7 +1433,8 @@
 % 推荐使用\BIThesisRelease (开箱即用)。
 %
 % \BIThesisRelease 提供了多种最常用的模板,你可以在
-% \href{https://github.com/BITNP/BIThesis/releases}{主项目的 Releases}中找到它们。 
+% \href{https://github.com/BITNP/BIThesis/releases}{主项目的 Releases}
+% 中找到它们。 
 % 
 % 使用此文档类的模板有:
 % \begin{itemize}
@@ -1752,6 +1769,30 @@
 %
 % \subsubsection{辅助函数与常量}
 %
+%
+% \begin{macro}[added=2023-03-16]{\@@_get_const:}
+% 获取标题、章节、表格、图形等的常量名称。
+% 会区别英文模式和中文模式。
+%   \begin{macrocode}
+\cs_new:Npn \@@_get_const:N #1 {
+  \@@_if_thesis_english:TF {
+    \use:c {c_@@_label_ #1 _en_tl}
+  } {
+    \use:c {c_@@_label_ #1 _tl}
+  }
+}
+%   \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[added=2023-03-16]{\@@_set_english_mode:}
+% 设置为英文模式。
+%   \begin{macrocode}
+\cs_new:Npn \@@_set_english_mode: {
+  \bool_gset_true:N \g_@@_thesis_type_english_bool
+}
+%   \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\tl_if_empty:xTF,\seq_set_split:Nnx}
 % 生成变体。
 %    \begin{macrocode}
@@ -2029,8 +2070,8 @@
     {publications} {攻读学位期间发表论文与研究成果清单} 
       {Publications~During~Studies},
     % TODO: Not so sure about the translation.
-    {resume} {作者简介} {},
-    {symbols} {主要符号对照表} {},
+    {resume} {作者简介} {Author~Biography},
+    {symbols} {主要符号对照表} {Nomenclature},
   }
   {\@@_define_label:nnn #1}
 %    \end{macrocode}
@@ -2083,7 +2124,7 @@
       \int_set_eq:NN \g_@@_thesis_type_int \l_keys_choice_int 
       \int_case:nn {\l_keys_choice_int} {
         % 本科全英文也是英文模板。
-        {3} {\bool_set_true:N \g_@@_thesis_type_english_bool}
+        {3} {\@@_set_english_mode:}
       }
     },
   type .initial:n = bachelor,
@@ -2091,6 +2132,12 @@
   blindPeerReview .bool_gset:N = \g_@@_blind_mode_bool,
   ctex .tl_set:N = \l_@@_options_to_ctex_tl,
   quirks .bool_gset:N = \g_@@_quirks_mode_bool,
+  % xeCJK
+  autoFakeBold .tl_set:N = \g_@@_auto_fake_bold_tl,
+  autoFakeBold .initial:n = {3},
+  % 是否开启英文模式。目前在设计上,这个选项仅对研究生模板生效。
+  % 本科生模板的英文模式是根据 |type| 选项自动判断的。
+  english .code:n = { \@@_set_english_mode: } ,
 }
 %    \end{macrocode}
 %
@@ -2294,8 +2341,9 @@
 %    \end{macrocode}
 %
 % 抑制 fontspec 宏包关于字体的警告信息。
+% 手动开启伪粗体、伪斜体。
 %    \begin{macrocode}
-\PassOptionsToPackage{quiet}{xeCJK}
+\PassOptionsToPackage{quiet,AutoFakeBold=\g_@@_auto_fake_bold_tl,AutoFakeSlant}{xeCJK}
 %    \end{macrocode}
 % 加载 ctexbook 模板类。
 %    \begin{macrocode}
@@ -2328,7 +2376,6 @@
 \RequirePackage{amssymb}
 \RequirePackage{pifont}
 \RequirePackage{amsthm}
-\RequirePackage{unicode-math}
 \RequirePackage{pdfpages}
 \RequirePackage{listings}
 \RequirePackage{enumitem}
@@ -2428,6 +2475,14 @@
     \DeclareBibliographyCategory{mypub}
   }
 
+  % Define biblatex strings if it was imported.
+  % 这部分是给研究生模板中的
+  % gbpunctin = false 时使用的。
+  \cs_if_exist:NT \DefineBibliographyStrings {
+    \DefineBibliographyStrings{english}{in={}}
+    \DefineBibliographyStrings{english}{incn={}}
+  }
+
   % 修改 biblatex 中「专利」(patent)部分的著录格式。
   % 主要根据北理工自定义的规范,参考 biblatex 和 
   % biblatex-gb7714-2015 的实现修改而成。
@@ -2802,19 +2857,10 @@
 % 
 % 调整插图目录与表格目录的标题。
 %    \begin{macrocode}
-\cs_set:Npn \listfigurename {\c_@@_label_figure_tl}
-\cs_set:Npn \listtablename {\c_@@_label_table_tl}
+\cs_set:Npn \listfigurename {\@@_get_const:N {figure}}
+\cs_set:Npn \listtablename {\@@_get_const:N {table}}
 %    \end{macrocode}
 % 
-% 根据 GB 3102.11--93 以及 ISO 80000-2:2009 的规定,数学表达式中
-% 表示变量的拉丁字母和希腊字母均应当使用斜体。
-%    \begin{macrocode}
-\unimathsetup{
-  math-style = ISO,
-  bold-style = ISO,
-}
-%    \end{macrocode}
-% 
 % 预定义用户常用的证明环境。
 %    \begin{macrocode}
 \theoremstyle{plain}
@@ -2831,7 +2877,7 @@
   \newtheorem{case}{情形}
 \theoremstyle{remark}
   \newtheorem{rem}{注}
-  \renewcommand{\qedsymbol}{\ensuremath{\QED}}
+  \renewcommand{\qedsymbol}{\ensuremath{\blacksquare}}
 %    \end{macrocode}
 % 
 % \begin{macro}{\@@_dunderline:nnn,\@@_dunderline:nn,\@@_dunderline:n}
@@ -4226,7 +4272,7 @@
         \l_@@_publications_minbibnames_int
       }
 
-      \chapter{\c_@@_label_publications_tl}
+      \chapter{\@@_get_const:N {publications}}
       #1
     \end{blindPeerReview}
   }
@@ -4249,7 +4295,7 @@
         subsection/number = \arabic{section}. \arabic{subsection},
         subsubsection/number = \arabic{section}. \arabic{subsection}. \arabic{subsubsection},
       }
-      \chapter{\c_@@_label_resume_tl}
+      \chapter{\@@_get_const:N{resume}}
       #1
     \end{blindPeerReview}
   }
@@ -4264,9 +4310,9 @@
 \NewDocumentEnvironment {symbols} {}
   {
     \bool_if:NTF \l_@@_add_symbols_to_toc_bool {
-      \chapter{\c_@@_label_symbols_tl}
+      \chapter{\@@_get_const:N {symbols}}
     } {
-      \chapter*{\c_@@_label_symbols_tl}
+      \chapter*{\@@_get_const:N {symbols}}
       \currentpdfbookmark{\c_@@_label_symbols_tl}{ch:symbols}
     }
     \zihao{-4}
@@ -4304,7 +4350,7 @@
 % 论文类型,取值从 1 开始,分别对应: 
 %  \begin{enumerate}
 %      \item 课程实验报告
-%      \item (计算机学院)本科生毕业(设计)开题报告
+%      \item (计算机学院)本科生毕业(设计)开题报告(已废弃)
 %  \end{enumerate}
 %    \begin{macrocode}
 \int_new:N \g_@@_report_type_int

Modified: trunk/Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls	2023-03-21 16:48:18 UTC (rev 66621)
+++ trunk/Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls	2023-03-21 16:49:09 UTC (rev 66622)
@@ -27,7 +27,7 @@
 %% 
 \RequirePackage{expl3,l3keys2e}
 \ProvidesExplClass{bitbeamer}
-{2023-03-05}{3.4.2}{BIT Thesis Templates}
+{2023-03-16}{3.4.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	2023-03-21 16:48:18 UTC (rev 66621)
+++ trunk/Master/texmf-dist/tex/latex/bithesis/bithesis.cls	2023-03-21 16:49:09 UTC (rev 66622)
@@ -27,7 +27,7 @@
 %% 
 \RequirePackage{expl3,l3keys2e}
 \ProvidesExplClass{bithesis}
-{2023-03-05}{3.4.2}{BIT Thesis Templates}
+{2023-03-16}{3.4.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
@@ -37,6 +37,16 @@
 \tl_new:N \g__bithesis_label_divide_char_tl
 \seq_new:N \l__bithesis_right_seq
 \seq_new:N \l__bithesis_left_seq
+\cs_new:Npn \__bithesis_get_const:N #1 {
+  \__bithesis_if_thesis_english:TF {
+    \use:c {c__bithesis_label_ #1 _en_tl}
+  } {
+    \use:c {c__bithesis_label_ #1 _tl}
+  }
+}
+\cs_new:Npn \__bithesis_set_english_mode: {
+  \bool_gset_true:N \g__bithesis_thesis_type_english_bool
+}
 \cs_generate_variant:Nn \tl_if_empty:nTF {x}
 \cs_generate_variant:Nn \seq_set_split:Nnn {Nnx}
 \cs_new:Npn \__bithesis_same_page: {
@@ -217,8 +227,8 @@
     {publications} {攻读学位期间发表论文与研究成果清单}
       {Publications~During~Studies},
     % TODO: Not so sure about the translation.
-    {resume} {作者简介} {},
-    {symbols} {主要符号对照表} {},
+    {resume} {作者简介} {Author~Biography},
+    {symbols} {主要符号对照表} {Nomenclature},
   }
   {\__bithesis_define_label:nnn #1}
 \clist_const:Nn \c__bithesis_bachelor_thesis_header_clist
@@ -254,7 +264,7 @@
       \int_set_eq:NN \g__bithesis_thesis_type_int \l_keys_choice_int
       \int_case:nn {\l_keys_choice_int} {
         % 本科全英文也是英文模板。
-        {3} {\bool_set_true:N \g__bithesis_thesis_type_english_bool}
+        {3} {\__bithesis_set_english_mode:}
       }
     },
   type .initial:n = bachelor,
@@ -262,6 +272,12 @@
   blindPeerReview .bool_gset:N = \g__bithesis_blind_mode_bool,
   ctex .tl_set:N = \l__bithesis_options_to_ctex_tl,
   quirks .bool_gset:N = \g__bithesis_quirks_mode_bool,
+  % xeCJK
+  autoFakeBold .tl_set:N = \g__bithesis_auto_fake_bold_tl,
+  autoFakeBold .initial:n = {3},
+  % 是否开启英文模式。目前在设计上,这个选项仅对研究生模板生效。
+  % 本科生模板的英文模式是根据 |type| 选项自动判断的。
+  english .code:n = { \__bithesis_set_english_mode: } ,
 }
 \keys_define:nn { bithesis / cover }
   {
@@ -414,7 +430,7 @@
 \DeclareOption*{
   \PassOptionsToClass{\l__bithesis_options_to_ctex_tl}{ctexbook}
 }
-\PassOptionsToPackage{quiet}{xeCJK}
+\PassOptionsToPackage{quiet,AutoFakeBold=\g__bithesis_auto_fake_bold_tl,AutoFakeSlant}{xeCJK}
 \ProcessOptions\relax
 \LoadClass[zihao=-4,]{ctexbook}
 \RequirePackage{geometry}
@@ -437,7 +453,6 @@
 \RequirePackage{amssymb}
 \RequirePackage{pifont}
 \RequirePackage{amsthm}
-\RequirePackage{unicode-math}
 \RequirePackage{pdfpages}
 \RequirePackage{listings}
 \RequirePackage{enumitem}
@@ -511,6 +526,14 @@
     \DeclareBibliographyCategory{mypub}
   }
 
+  % Define biblatex strings if it was imported.
+  % 这部分是给研究生模板中的
+  % gbpunctin = false 时使用的。
+  \cs_if_exist:NT \DefineBibliographyStrings {
+    \DefineBibliographyStrings{english}{in={}}
+    \DefineBibliographyStrings{english}{incn={}}
+  }
+
   % 修改 biblatex 中「专利」(patent)部分的著录格式。
   % 主要根据北理工自定义的规范,参考 biblatex 和
   % biblatex-gb7714-2015 的实现修改而成。
@@ -798,12 +821,8 @@
     tabsize=2
 }
 \lstset{style=examplestyle}
-\cs_set:Npn \listfigurename {\c__bithesis_label_figure_tl}
-\cs_set:Npn \listtablename {\c__bithesis_label_table_tl}
-\unimathsetup{
-  math-style = ISO,
-  bold-style = ISO,
-}
+\cs_set:Npn \listfigurename {\__bithesis_get_const:N {figure}}
+\cs_set:Npn \listtablename {\__bithesis_get_const:N {table}}
 \theoremstyle{plain}
   \newtheorem{algo}{算法}[chapter]
   \newtheorem{them}{定理}[chapter]
@@ -818,7 +837,7 @@
   \newtheorem{case}{情形}
 \theoremstyle{remark}
   \newtheorem{rem}{注}
-  \renewcommand{\qedsymbol}{\ensuremath{\QED}}
+  \renewcommand{\qedsymbol}{\ensuremath{\blacksquare}}
 \cs_new:Npn \__bithesis_dunderline:nnn #1#2#3 {
   {\setbox0=\hbox{#3}\ooalign{\copy0\cr\rule[\dimexpr#1-#2\relax]{\wd0}{#2}}}
 }
@@ -1976,7 +1995,7 @@
         \l__bithesis_publications_minbibnames_int
       }
 
-      \chapter{\c__bithesis_label_publications_tl}
+      \chapter{\__bithesis_get_const:N {publications}}
       #1
     \end{blindPeerReview}
   }
@@ -1993,7 +2012,7 @@
         subsection/number = \arabic{section}. \arabic{subsection},
         subsubsection/number = \arabic{section}. \arabic{subsection}. \arabic{subsubsection},
       }
-      \chapter{\c__bithesis_label_resume_tl}
+      \chapter{\__bithesis_get_const:N{resume}}
       #1
     \end{blindPeerReview}
   }
@@ -2003,9 +2022,9 @@
 \NewDocumentEnvironment {symbols} {}
   {
     \bool_if:NTF \l__bithesis_add_symbols_to_toc_bool {
-      \chapter{\c__bithesis_label_symbols_tl}
+      \chapter{\__bithesis_get_const:N {symbols}}
     } {
-      \chapter*{\c__bithesis_label_symbols_tl}
+      \chapter*{\__bithesis_get_const:N {symbols}}
       \currentpdfbookmark{\c__bithesis_label_symbols_tl}{ch:symbols}
     }
     \zihao{-4}

Modified: trunk/Master/texmf-dist/tex/latex/bithesis/bitreport.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bithesis/bitreport.cls	2023-03-21 16:48:18 UTC (rev 66621)
+++ trunk/Master/texmf-dist/tex/latex/bithesis/bitreport.cls	2023-03-21 16:49:09 UTC (rev 66622)
@@ -27,7 +27,7 @@
 %% 
 \RequirePackage{expl3,l3keys2e}
 \ProvidesExplClass{bitreport}
-{2023-03-05}{3.4.2}{BIT Thesis Templates}
+{2023-03-16}{3.4.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.