summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/bithesis
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-03-21 16:49:09 +0000
committerKarl Berry <karl@freefriends.org>2023-03-21 16:49:09 +0000
commit30956e2fe2389e0b71f50d575c8cfcea6ec79885 (patch)
tree3e7f4d3bea38273f3d211cb547d4956211f684b0 /Master/texmf-dist/source/latex/bithesis
parent3f729449a5902a5778e85b9f63d12b63c0438b23 (diff)
bithesis (16mar23)
git-svn-id: svn://tug.org/texlive/trunk@66622 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/bithesis')
-rw-r--r--Master/texmf-dist/source/latex/bithesis/bithesis.dtx108
1 files changed, 77 insertions, 31 deletions
diff --git a/Master/texmf-dist/source/latex/bithesis/bithesis.dtx b/Master/texmf-dist/source/latex/bithesis/bithesis.dtx
index 8ce91eacd1a..49af0ee2d6b 100644
--- a/Master/texmf-dist/source/latex/bithesis/bithesis.dtx
+++ b/Master/texmf-dist/source/latex/bithesis/bithesis.dtx
@@ -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,17 +2857,8 @@
%
% 调整插图目录与表格目录的标题。
% \begin{macrocode}
-\cs_set:Npn \listfigurename {\c_@@_label_figure_tl}
-\cs_set:Npn \listtablename {\c_@@_label_table_tl}
-% \end{macrocode}
-%
-% 根据 GB 3102.11--93 以及 ISO 80000-2:2009 的规定,数学表达式中
-% 表示变量的拉丁字母和希腊字母均应当使用斜体。
-% \begin{macrocode}
-\unimathsetup{
- math-style = ISO,
- bold-style = ISO,
-}
+\cs_set:Npn \listfigurename {\@@_get_const:N {figure}}
+\cs_set:Npn \listtablename {\@@_get_const:N {table}}
% \end{macrocode}
%
% 预定义用户常用的证明环境。
@@ -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