summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-02-02 21:15:25 +0000
committerKarl Berry <karl@freefriends.org>2023-02-02 21:15:25 +0000
commit7f5e6c04b40bd9dc2e547bc0257bb077703e6769 (patch)
tree4af8e6f21a705edb0f1c24aad30281e7df847c90
parentdcd4b33437ee2d76762844fd5b757285a0495900 (diff)
bithesis (2feb23)
git-svn-id: svn://tug.org/texlive/trunk@65716 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/bithesis/README.md10
-rw-r--r--Master/texmf-dist/doc/latex/bithesis/bithesis.pdfbin1049781 -> 1066530 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bithesis/contributing-zh.md19
-rw-r--r--Master/texmf-dist/doc/latex/bithesis/contributing.md25
-rw-r--r--Master/texmf-dist/doc/latex/bithesis/dtx-style.sty2
-rw-r--r--Master/texmf-dist/source/latex/bithesis/bithesis.dtx132
-rw-r--r--Master/texmf-dist/source/latex/bithesis/bithesis.ins4
-rw-r--r--Master/texmf-dist/tex/latex/bithesis/bitart.cls2
-rw-r--r--Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls4
-rw-r--r--Master/texmf-dist/tex/latex/bithesis/bitbook.cls2
-rw-r--r--Master/texmf-dist/tex/latex/bithesis/bitgrad.cls2
-rw-r--r--Master/texmf-dist/tex/latex/bithesis/bithesis.cls82
-rw-r--r--Master/texmf-dist/tex/latex/bithesis/bitreport.cls4
13 files changed, 247 insertions, 41 deletions
diff --git a/Master/texmf-dist/doc/latex/bithesis/README.md b/Master/texmf-dist/doc/latex/bithesis/README.md
index c76d91bfdca..8326e575580 100644
--- a/Master/texmf-dist/doc/latex/bithesis/README.md
+++ b/Master/texmf-dist/doc/latex/bithesis/README.md
@@ -11,9 +11,9 @@ The current maintainer of this project is [Feng Kaiyu](https://github.com/fky201
[![License](https://badgen.net/github/license/BITNP/BIThesis?color=008080&labelColor=2b2b2b)](./LICENSE)
BIThesis is an unofficial LaTeX template set for your
-**undergraduate, master or doctoral thesis** as well as other academic writing here at BIT.
+**undergraduate, master, or doctoral thesis** as well as other academic writing here at BIT.
-This project is supported by the _[Dept. of Undergraduate Academic Affairs, BIT](https://jwc.bit.edu.cn/)_ and the _[School of Computer Science and Technology, BIT](https://cs.bit.edu.cn/)_. See [Acknowledgements - Official Sponsors](https://bithesis.bitnp.net/Guide/5-Acknowledgements/Acknowledgements.html#%E5%AE%98%E6%96%B9%E8%B5%9E%E5%8A%A9-official-sponsors).
+This project is supported by the _[Dept. of Undergraduate Academic Affairs, BIT](https://jwc.bit.edu.cn/)_ and the _[School of Computer Science and Technology, BIT](https://cs.bit.edu.cn/)_. See [Acknowledgements - Official Sponsors](https://bithesis.bitnp.net/guide/acknowledgements.html#%E5%AE%98%E6%96%B9%E8%B5%9E%E5%8A%A9-official-sponsors).
At present, `bithesis` only supports XeTeX and LuaTeX engines. `bithesis` only allows `UTF-8` encoding.
@@ -21,7 +21,7 @@ At present, `bithesis` only supports XeTeX and LuaTeX engines. `bithesis` only a
### Installation
-```
+```shell
tlmgr install bithesis
```
@@ -29,7 +29,7 @@ Or make a clone from our [repo](https://github.com/BITNP/BIThesis). Then run: `m
## How Do I Use BIThesis?
-**For a comprehensive guide on how to install LaTeX, compile `bithesis`, and use a single one of BIThesis' template, please refer to BIThesis' Wiki. 👇**
+**For a comprehensive guide on how to install LaTeX, compile `bithesis`, and use BIThesis' templates, please refer to BIThesis' Wiki. 👇**
[![BIThesis Wiki](https://img.shields.io/badge/BIThesis-Wiki-009944?logo=wikipedia&labelColor=2b2b2b&style=for-the-badge)](https://bithesis.bitnp.net/)
@@ -39,5 +39,5 @@ For more details, please see the [contributing doc](./contributing.md).
## Contributors
-For more information, please see: [Github Contributors](https://github.com/BITNP/BIThesis/graphs/contributors) and [Acknowledgements](https://bithesis.bitnp.net/Guide/5-Acknowledgements/Acknowledgements.html).
+For more information, please see: [GitHub Contributors](https://github.com/BITNP/BIThesis/graphs/contributors) and [Acknowledgements](https://bithesis.bitnp.net/guide/acknowledgements.html).
diff --git a/Master/texmf-dist/doc/latex/bithesis/bithesis.pdf b/Master/texmf-dist/doc/latex/bithesis/bithesis.pdf
index ca205294770..5354add67cb 100644
--- a/Master/texmf-dist/doc/latex/bithesis/bithesis.pdf
+++ b/Master/texmf-dist/doc/latex/bithesis/bithesis.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bithesis/contributing-zh.md b/Master/texmf-dist/doc/latex/bithesis/contributing-zh.md
index 52a09bae99f..f127a8dfde6 100644
--- a/Master/texmf-dist/doc/latex/bithesis/contributing-zh.md
+++ b/Master/texmf-dist/doc/latex/bithesis/contributing-zh.md
@@ -12,27 +12,28 @@
## Guidance
-**[我不想看下面的内容,我只是想问个小问题!!!](#加入我们的-QQ-群)**
+**[我不想看下面的内容,我只是想问个小问题!!!](#加入我们的-QQ-群)**
| | 普通使用者 | 开发者 |
| ---------- | ------------------------------- | ------------------------------------------- |
| 提出问题 | [QQ 群](#加入我们的-qq-群) | [QQ 群](#加入我们的-qq-群) |
-| 提交 Bug | [QQ 群](#加入我们的-qq-群) | [Github - Issues](#在-github-上提交-bug) |
-| 有好的想法 | [QQ 群](#加入我们的-qq-群) | Github - Issues |
-| 提交 PR | | [Github - Pull Request](#提交-pull-request) |
+| 提交 Bug | [QQ 群](#加入我们的-qq-群) | [GitHub - Issues](#在-github-上提交-bug) |
+| 有好的想法 | [QQ 群](#加入我们的-qq-群) | GitHub - Issues |
+| 提交 PR | | [GitHub - Pull Request](#提交-pull-request) |
| 有信心维护代码 | | [加入QQ 群并联系我们](#加入我们的-qq-群) |
## 加入我们的 QQ 群
-在我们提供的[QQ 群(737548118)][QQ chat group invitation]中有**很多活跃的维护者**和**友好的社区氛围**。在这里你能获得很多与本项目有关的帮助。
+在我们提供的 [QQ 群`737548118`][QQ chat group invitation]中有**很多活跃的维护者**和**友好的社区氛围**。在这里你能获得很多与本项目有关的帮助。
[![Join on QQ Chat Group](https://img.shields.io/badge/QQ%E7%BE%A4-737548118-green)](https://jq.qq.com/?_wv=1027&k=KYDrmS5z)
-> 提示:关于具体如何提出问题并没有明确的要求。总之请提供尽可能详细的信息,并且思考一下这个问题是不是已经被解决了。
+> **Note**
+> 关于具体如何提出问题并没有明确的要求。总之请提供尽可能详细的信息,并且思考一下这个问题是不是已经被解决了。
-## 在 Github 上提交 Bug
+## 在 GitHub 上提交 Bug
-如果你能更精确的定位问题所在,或者能够提供更详细的信息;你可以向我们[提交一个 issue][issue reporting link]。
+如果你能更精确地定位问题所在,或者能够提供更详细的信息;你可以向我们[提交一个 issue][issue reporting link]。
## 提交 Pull Request
@@ -48,7 +49,7 @@
6. 在 PR 被合并之前请保持关注,以便进行修改。
更细致的流程请参考
-_[Github Help](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests)_。
+_[GitHub Help](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests)_。
[QQ chat group invitation]: https://jq.qq.com/?_wv=1027&k=KYDrmS5z
[issue reporting link]: https://github.com/BITNP/BIThesis/issues/new
diff --git a/Master/texmf-dist/doc/latex/bithesis/contributing.md b/Master/texmf-dist/doc/latex/bithesis/contributing.md
index 3dcd006aaa8..a905bf36961 100644
--- a/Master/texmf-dist/doc/latex/bithesis/contributing.md
+++ b/Master/texmf-dist/doc/latex/bithesis/contributing.md
@@ -13,32 +13,33 @@ and feel free to propose changes to this document in a pull request.
**[I don't want to read this whole thing, I just have a small question!!!](#join-our-QQ-chat-group)**
-| | For Users | For Developers |
-| --------------- | -------------------------------- | ---------------------------------------------- |
-| Have a Question | [QQ Chat Group](#join-our-QQ-chat-group) | [QQ Chat Group](#join-our-QQ-chat-group) |
-| Bug Report | [QQ Chat Group](#join-our-QQ-chat-group) | [Github - Issues](#bug-report-on-github) |
-| Feature Request | [QQ Chat Group](#join-our-QQ-chat-group) | [QQ Chat Group](#join-our-QQ-chat-group) |
-| Pull Request | | [Github - Pull Request](#pull-request-process) |
+| | For Users | For Developers |
+| --------------- | ---------------------------------------- | ---------------------------------------------- |
+| Have a Question | [QQ Chat Group](#join-our-QQ-chat-group) | [QQ Chat Group](#join-our-QQ-chat-group) |
+| Bug Report | [QQ Chat Group](#join-our-QQ-chat-group) | [GitHub - Issues](#bug-report-on-github) |
+| Feature Request | [QQ Chat Group](#join-our-QQ-chat-group) | [QQ Chat Group](#join-our-QQ-chat-group) |
+| Pull Request | | [GitHub - Pull Request](#pull-request-process) |
## Join Our QQ Chat Group
-We provide an [QQ Chat Group][QQ chat group invitation]
+We provide a [QQ Chat Group][QQ chat group invitation]
with **a bunch of active maintainers** and **a friendly community**
to give helpful advice **if you have any questions**.
[![Join on QQ Chat Group](https://img.shields.io/badge/QQ%E7%BE%A4-737548118-green)](https://jq.qq.com/?_wv=1027&k=KYDrmS5z)
-> note: there is no detailed rules about how to ask question, just provide enough information and
-rethink before write.
+> **Note**
+> There are no detailed rules about how to ask question, just provide enough information and
+> rethink before write.
-## Bug Report on Github
+## Bug Report on GitHub
If you can locate the bug or provide more detailed information, you may
_[report an issue here][issue reporting link]_.
## Pull Request Process
-Pull Request are welcomed!
+Pull Requests are welcomed!
The following steps will help you finish a pull request.
@@ -50,7 +51,7 @@ The following steps will help you finish a pull request.
6. Keep in touch with further discussion and refine.
For more information, refer to the
-_[Github Help](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests)_.
+_[GitHub Help](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests)_.
[QQ chat group invitation]: https://jq.qq.com/?_wv=1027&k=KYDrmS5z
[issue reporting link]: https://github.com/BITNP/BIThesis/issues/new
diff --git a/Master/texmf-dist/doc/latex/bithesis/dtx-style.sty b/Master/texmf-dist/doc/latex/bithesis/dtx-style.sty
index 75efb517baa..4096db7ce08 100644
--- a/Master/texmf-dist/doc/latex/bithesis/dtx-style.sty
+++ b/Master/texmf-dist/doc/latex/bithesis/dtx-style.sty
@@ -6,7 +6,7 @@
%%
%% bithesis.dtx (with options: `dtx-style')
%%
-%% Copyright (C) 2022
+%% Copyright (C) 2023
%% Association of Bit Network Pioneer and any individual authors listed in the documentation.
%% ------------------------------------------------------------------------------
%%
diff --git a/Master/texmf-dist/source/latex/bithesis/bithesis.dtx b/Master/texmf-dist/source/latex/bithesis/bithesis.dtx
index ffad61b11d4..cfbdbb5aa8d 100644
--- a/Master/texmf-dist/source/latex/bithesis/bithesis.dtx
+++ b/Master/texmf-dist/source/latex/bithesis/bithesis.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2022
+% Copyright (C) 2023
% Association of Bit Network Pioneer and any individual authors listed elsewhere in this file.
% -----------------------------------
%
@@ -21,7 +21,7 @@
%<thesis>\ProvidesExplClass{bithesis}
%<report>\ProvidesExplClass{bitreport}
%<beamer>\ProvidesExplClass{bitbeamer}
-%<cls>{2022-12-30}{3.2.3}{BIT Thesis Templates}
+%<cls>{2023-02-02}{3.3.0}{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}[2022/12/30 3.2.3 BIT Thesis Templates]
+\ProvidesFile{bithesis.dtx}[2023/02/02 3.3.0 BIT Thesis Templates]
\documentclass[letterpaper]{l3doc}
\usepackage{dtx-style}
@@ -297,6 +297,21 @@
% 需要注意的是,Github 和 Overleaf 的模板中包含了当前版本的 |*.cls| 文件,
% 因此不会因为 CTAN 上的更新而导致模板无法编译。(但代价当然是需要手动升级)
%
+% \subsection{版本号与升级}
+%
+% \BIThesisLaTeX 的版本号遵循 \href{https://semver.org/lang/zh-CN/}{语义化版本},
+% 也就是说,每个版本号由三个数字组成,分别表示主版本号、次版本号和修订号。
+% 例如,版本号 |1.2.3| 表示主版本号为 1,次版本号为 2,修订号为 3。
+%
+% \BIThesisLaTeX 的主版本号会在有重大变化时(且无法前向兼容时)更新,
+% 例如,模板的结构发生了变化、宏命令的使用方式发生了改变。
+% 次版本号会在有新功能添加时更新,例如,添加了新的功能和宏命令。
+% 修订号会在有 bug 修复时更新,例如,修复了某些宏命令的 bug、补充了某些文档。
+%
+% 因此对于用户来说,主版本号的更新是不兼容的,次版本号与修订号的更新是向前兼容的。
+% 进行兼容性升级时,你只需要将新版本的 |*.cls| 文件替换到你原有模板的工作目录中即可。
+% 进行不兼容性升级时,你需要将旧模板中的写作内容复制到新模板中(记得要做好备份哦)。
+%
% \section{安装}
%
% \subsection{\BIThesis 宏包的安装和更新}
@@ -460,6 +475,29 @@
% 此选项用于输出符合盲审要求的论文。所有可能暴露个人信息的页面都将隐藏,
% 比如封面、信息页、原创性声明、个人简介、致谢等等。
% \end{function}
+%
+% \begin{function}[added=2023-02-02]{quirks}
+% \begin{bitsyntax}[emph={[1]quirks}]
+% quirks = (*<(false)|true>*)
+% \end{bitsyntax}
+%
+% 此选项用于开启针对北理工官方示例的兼容模式。
+%
+% 具体包括:
+% \begin{itemize}
+% \item \pkg{biblatex} 中的 |patent| 类型将不再采用国标 GB/T 7714-2015 的格式,
+% 而是采用北理工官方示例的格式。
+% \end{itemize}
+%
+% 之所以需要此选项,是因为北理工官方示例中的格式
+% 与国标 GB/T 7714-2015 中的格式不一致;
+% 而这部分改动可能引入潜在的兼容性问题。
+% 而这些差异其实比较细微,所以我们将其作为一个默认不开启的选项。
+%
+% 在未来,如果持续有用户反馈问题,亦或是没有边界问题,
+% 我们可能会将其中的功能移入默认效果中。
+%
+% \end{function}
%
% \begin{function}{twoside}
% \begin{bitsyntax}[emph={[1]twoside}]
@@ -1658,6 +1696,17 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\g_@@_quirks_mode_bool}
+% 是否兼容更符合北理工官方模板或规范,但不太符合一般排版要求的模式。默认为 false。
+% 目前此选项包括:
+% \begin{itemize}
+% \item \pkg{biblatex} 的专利格式不再使用国标格式,而采用北理工自定义格式。
+% \end{itemize}
+% \begin{macrocode}
+\bool_new:N \g_@@_quirks_mode_bool
+% \end{macrocode}
+% \end{variable}
+%
% \begin{variable}{\g_@@_label_divide_char_tl}
% 用于分隔标签的字符。默认为「-」或者「.」。
% \begin{macrocode}
@@ -2012,6 +2061,7 @@
twoside .bool_gset:N = \g_@@_twoside_bool,
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,
}
% \end{macrocode}
%
@@ -2336,6 +2386,82 @@
\cs_if_exist:NT \DeclareBibliographyCategory {
\DeclareBibliographyCategory{mypub}
}
+
+ % 修改 biblatex 中「专利」(patent)部分的著录格式。
+ % 主要根据北理工自定义的规范,参考 biblatex 和
+ % biblatex-gb7714-2015 的实现修改而成。
+ %
+ % 默认不开启,因为此修改可能会产生其他边界问题。
+ \bool_if:NT \g_@@_quirks_mode_bool {
+ \cs_if_exist:NT \DeclareBibliographyDriver {
+ %
+ % 重设专利title的输出,将文献类型标识符输出出去
+ %
+ \newbibmacro*{patenttitle}{%原输出来自biblatex.def文件
+ \ifboolexpr{%
+ test{\iffieldundef{title}}%
+ and%
+ test{\iffieldundef{subtitle}}%
+ }%
+ {}%
+ {\printtext[title]{\bibtitlefont%
+ \printfield[titlecase]{title}%
+ \ifboolexpr{test {\iffieldundef{subtitle}}}%这里增加了对子标题的判断,解决不判断多一个点的问题
+ {}{\setunit{\subtitlepunct}%
+ \printfield[titlecase]{subtitle}}%
+ \iftoggle{bbx:gbtype}{\printfield[gbtypeflag]{usera}}{}%
+ \iffieldundef{titleaddon}{}%判断一下titleaddon,否则直接加可能多一个空格
+ {\setunit{\subtitlepunct}\printfield{titleaddon}}%
+ % :地区
+ \setunit{\subtitlepunct}\iflistundef{location}
+ {}
+ {\setunit*{\subtitlepunct}%
+ \printtext{%[parens]
+ \printlist[][-\value{listtotal}]{location}}}%
+ % ,专利号
+ \setunit{\addcomma\addspace}\printfield{number}%写专利号
+ \setunit{\addcomma\addspace}
+ \usebibmacro{newsdate}%
+ }%
+ }%
+ }
+
+ %
+ % 重定义专利文献驱动
+ %
+ \DeclareBibliographyDriver{patent}{%源来自standard.BBX
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点
+ \usebibmacro{patenttitle}%给出专利专用的标题输出
+ \iftoggle{bbx:gbstrict}{}{%
+ \newunit%
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}
+ }%
+ \newunit\newblock
+ \printfield{type}%
+ \setunit*{\addspace}%
+ \newunit\newblock
+ \usebibmacro{byholder}%
+ \newunit\newblock
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \usebibmacro{annotation}\usebibmacro{finentry}}
+ }
+ }
}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/bithesis/bithesis.ins b/Master/texmf-dist/source/latex/bithesis/bithesis.ins
index 27ae5ee939c..34dbeb85105 100644
--- a/Master/texmf-dist/source/latex/bithesis/bithesis.ins
+++ b/Master/texmf-dist/source/latex/bithesis/bithesis.ins
@@ -1,4 +1,4 @@
-%% Copyright (C) 2022
+%% Copyright (C) 2023
%% Association of Bit Network Pioneer and any individual authors listed elsewhere in this file.
%% --------------------------------------------------------------------------
%%
@@ -22,7 +22,7 @@
\preamble
- Copyright (C) 2022
+ Copyright (C) 2023
Association of Bit Network Pioneer and any individual authors listed in the documentation.
------------------------------------------------------------------------------
diff --git a/Master/texmf-dist/tex/latex/bithesis/bitart.cls b/Master/texmf-dist/tex/latex/bithesis/bitart.cls
index 7c9f8cea04c..f2fa101aa4b 100644
--- a/Master/texmf-dist/tex/latex/bithesis/bitart.cls
+++ b/Master/texmf-dist/tex/latex/bithesis/bitart.cls
@@ -6,7 +6,7 @@
%%
%% bithesis.dtx (with options: `oldcls,article')
%%
-%% Copyright (C) 2022
+%% Copyright (C) 2023
%% Association of Bit Network Pioneer and any individual authors listed in the documentation.
%% ------------------------------------------------------------------------------
%%
diff --git a/Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls b/Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls
index 7145d5b9c3a..62d0a481cc7 100644
--- a/Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls
+++ b/Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls
@@ -6,7 +6,7 @@
%%
%% bithesis.dtx (with options: `cls,beamer')
%%
-%% Copyright (C) 2022
+%% Copyright (C) 2023
%% Association of Bit Network Pioneer and any individual authors listed in the documentation.
%% ------------------------------------------------------------------------------
%%
@@ -27,7 +27,7 @@
%%
\RequirePackage{expl3,l3keys2e}
\ProvidesExplClass{bitbeamer}
-{2022-12-30}{3.2.3}{BIT Thesis Templates}
+{2023-02-02}{3.3.0}{BIT Thesis Templates}
\keys_define:nn { bitbeamer }
{
titlegraphic .tl_set:N = \l_bit_titlegraphic_tl,
diff --git a/Master/texmf-dist/tex/latex/bithesis/bitbook.cls b/Master/texmf-dist/tex/latex/bithesis/bitbook.cls
index 7ea9b713c2f..bf3b1fa7ad3 100644
--- a/Master/texmf-dist/tex/latex/bithesis/bitbook.cls
+++ b/Master/texmf-dist/tex/latex/bithesis/bitbook.cls
@@ -6,7 +6,7 @@
%%
%% bithesis.dtx (with options: `oldcls,book')
%%
-%% Copyright (C) 2022
+%% Copyright (C) 2023
%% Association of Bit Network Pioneer and any individual authors listed in the documentation.
%% ------------------------------------------------------------------------------
%%
diff --git a/Master/texmf-dist/tex/latex/bithesis/bitgrad.cls b/Master/texmf-dist/tex/latex/bithesis/bitgrad.cls
index 8c8d20508aa..4f512fa3585 100644
--- a/Master/texmf-dist/tex/latex/bithesis/bitgrad.cls
+++ b/Master/texmf-dist/tex/latex/bithesis/bitgrad.cls
@@ -6,7 +6,7 @@
%%
%% bithesis.dtx (with options: `oldcls,graduate')
%%
-%% Copyright (C) 2022
+%% Copyright (C) 2023
%% Association of Bit Network Pioneer and any individual authors listed in the documentation.
%% ------------------------------------------------------------------------------
%%
diff --git a/Master/texmf-dist/tex/latex/bithesis/bithesis.cls b/Master/texmf-dist/tex/latex/bithesis/bithesis.cls
index 61dd2f2088a..ceeaade2a0f 100644
--- a/Master/texmf-dist/tex/latex/bithesis/bithesis.cls
+++ b/Master/texmf-dist/tex/latex/bithesis/bithesis.cls
@@ -6,7 +6,7 @@
%%
%% bithesis.dtx (with options: `cls,thesis')
%%
-%% Copyright (C) 2022
+%% Copyright (C) 2023
%% Association of Bit Network Pioneer and any individual authors listed in the documentation.
%% ------------------------------------------------------------------------------
%%
@@ -27,12 +27,13 @@
%%
\RequirePackage{expl3,l3keys2e}
\ProvidesExplClass{bithesis}
-{2022-12-30}{3.2.3}{BIT Thesis Templates}
+{2023-02-02}{3.3.0}{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
\bool_new:N \g__bithesis_thesis_type_english_bool
\bool_new:N \g__bithesis_blind_mode_bool
+\bool_new:N \g__bithesis_quirks_mode_bool
\tl_new:N \g__bithesis_label_divide_char_tl
\seq_new:N \l__bithesis_right_seq
\seq_new:N \l__bithesis_left_seq
@@ -259,6 +260,7 @@
twoside .bool_gset:N = \g__bithesis_twoside_bool,
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,
}
\keys_define:nn { bithesis / cover }
{
@@ -499,6 +501,82 @@
\cs_if_exist:NT \DeclareBibliographyCategory {
\DeclareBibliographyCategory{mypub}
}
+
+ % 修改 biblatex 中「专利」(patent)部分的著录格式。
+ % 主要根据北理工自定义的规范,参考 biblatex 和
+ % biblatex-gb7714-2015 的实现修改而成。
+ %
+ % 默认不开启,因为此修改可能会产生其他边界问题。
+ \bool_if:NT \g__bithesis_quirks_mode_bool {
+ \cs_if_exist:NT \DeclareBibliographyDriver {
+ %
+ % 重设专利title的输出,将文献类型标识符输出出去
+ %
+ \newbibmacro*{patenttitle}{%原输出来自biblatex.def文件
+ \ifboolexpr{%
+ test{\iffieldundef{title}}%
+ and%
+ test{\iffieldundef{subtitle}}%
+ }%
+ {}%
+ {\printtext[title]{\bibtitlefont%
+ \printfield[titlecase]{title}%
+ \ifboolexpr{test {\iffieldundef{subtitle}}}%这里增加了对子标题的判断,解决不判断多一个点的问题
+ {}{\setunit{\subtitlepunct}%
+ \printfield[titlecase]{subtitle}}%
+ \iftoggle{bbx:gbtype}{\printfield[gbtypeflag]{usera}}{}%
+ \iffieldundef{titleaddon}{}%判断一下titleaddon,否则直接加可能多一个空格
+ {\setunit{\subtitlepunct}\printfield{titleaddon}}%
+ % :地区
+ \setunit{\subtitlepunct}\iflistundef{location}
+ {}
+ {\setunit*{\subtitlepunct}%
+ \printtext{%[parens]
+ \printlist[][-\value{listtotal}]{location}}}%
+ % ,专利号
+ \setunit{\addcomma\addspace}\printfield{number}%写专利号
+ \setunit{\addcomma\addspace}
+ \usebibmacro{newsdate}%
+ }%
+ }%
+ }
+
+ %
+ % 重定义专利文献驱动
+ %
+ \DeclareBibliographyDriver{patent}{%源来自standard.BBX
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点
+ \usebibmacro{patenttitle}%给出专利专用的标题输出
+ \iftoggle{bbx:gbstrict}{}{%
+ \newunit%
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}
+ }%
+ \newunit\newblock
+ \printfield{type}%
+ \setunit*{\addspace}%
+ \newunit\newblock
+ \usebibmacro{byholder}%
+ \newunit\newblock
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \usebibmacro{annotation}\usebibmacro{finentry}}
+ }
+ }
}
\cs_new:Npn \xihei:n #1 {
\xeCJK_family_if_exist:nTF {xihei} {
diff --git a/Master/texmf-dist/tex/latex/bithesis/bitreport.cls b/Master/texmf-dist/tex/latex/bithesis/bitreport.cls
index 94e59cc92a6..44cb06bb9f4 100644
--- a/Master/texmf-dist/tex/latex/bithesis/bitreport.cls
+++ b/Master/texmf-dist/tex/latex/bithesis/bitreport.cls
@@ -6,7 +6,7 @@
%%
%% bithesis.dtx (with options: `cls,report')
%%
-%% Copyright (C) 2022
+%% Copyright (C) 2023
%% Association of Bit Network Pioneer and any individual authors listed in the documentation.
%% ------------------------------------------------------------------------------
%%
@@ -27,7 +27,7 @@
%%
\RequirePackage{expl3,l3keys2e}
\ProvidesExplClass{bitreport}
-{2022-12-30}{3.2.3}{BIT Thesis Templates}
+{2023-02-02}{3.3.0}{BIT Thesis Templates}
\int_new:N \g__bithesis_report_type_int
\clist_const:Nn \c__bithesis_report_type_clist
{ common, undergraduate_proposal}