summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-01-12 03:01:27 +0000
committerNorbert Preining <norbert@preining.info>2021-01-12 03:01:27 +0000
commit59f820c29fe15f643154da97419acf78749bde8f (patch)
tree5a94f2584a397d60ae601482df04347c9dbc214a /macros/latex/contrib
parent5187d8af76756cc8c101de4a50c9ccfb9acd0c9a (diff)
CTAN sync 202101120301
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/bithesis/README-zh.md88
-rw-r--r--macros/latex/contrib/bithesis/README.md84
-rw-r--r--macros/latex/contrib/bithesis/bithesis.dtx103
-rw-r--r--macros/latex/contrib/bithesis/bithesis.ins4
-rw-r--r--macros/latex/contrib/bithesis/bithesis.pdfbin194456 -> 216524 bytes
-rw-r--r--macros/latex/contrib/bithesis/contributing-zh.md58
-rw-r--r--macros/latex/contrib/bithesis/contributing.md60
-rw-r--r--macros/latex/contrib/easybook/README.md6
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.pdfbin308924 -> 309273 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.tex10
-rw-r--r--macros/latex/contrib/easybook/doc/easybook.pdfbin197489 -> 212031 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/easybook.tex108
-rw-r--r--macros/latex/contrib/easybook/doc/pages/chapter2.tex2
-rw-r--r--macros/latex/contrib/easybook/doc/pages/chapter3.tex2
-rw-r--r--macros/latex/contrib/easybook/doc/pages/preface.tex4
-rw-r--r--macros/latex/contrib/easybook/easybook.cls268
-rw-r--r--macros/latex/contrib/orientation/README33
-rw-r--r--macros/latex/contrib/orientation/orientation.sty15
18 files changed, 625 insertions, 220 deletions
diff --git a/macros/latex/contrib/bithesis/README-zh.md b/macros/latex/contrib/bithesis/README-zh.md
new file mode 100644
index 0000000000..62e548767c
--- /dev/null
+++ b/macros/latex/contrib/bithesis/README-zh.md
@@ -0,0 +1,88 @@
+<div align="center">
+ <img src="./assets/bithesis_icon.svg" alt="BIThesis Icon">
+
+📖 _非官方本科生毕业设计毕业论文 LaTeX 模板(以及更多)_
+
+![BIThesis](./assets/bithesis_badge_solid.svg)
+[![English version](./assets/english.svg)](./README-en.md)
+[![Latexmk](https://badgen.net/badge/compiler/Latexmk?color=blue&labelColor=2b2b2b)](https://mg.readthedocs.io/latexmk.html)
+[![License](https://badgen.net/github/license/BITNP/BIThesis?color=008080&labelColor=2b2b2b)](./LICENSE)
+[![Join on Slack](https://img.shields.io/badge/Slack%20Community-BIThesis-black?logo=slack&style=social&logoColor=2eb67d)](https://join.slack.com/t/bithesis/shared_invite/zt-epmzkyk0-fJRsUS36AlwMNB2AI_Q~Vw)
+
+</div>
+
+<h2>欢迎</h2>
+
+BIThesis 是针对北京理工大学本科同学毕业设计、毕业论文制作的一个非官方的 LaTeX 模板,BIThesis 同时也包括其他本科学习中涉及到的文献综述、实验报告等的 LaTeX 模板。
+
+**我们正在对项目持续更新!目前,你完全可以使用现有的版本开始你的毕业设计开题报告的写作;不过与此同时,我们也在持续推进代码的升级和更新(主要是不影响使用的底层逻辑)。更多开发计划请访问我们的 [Roadmap](https://github.com/BITNP/BIThesis/projects)。想帮助这个项目持续前进?参见我们的[贡献者指南](./contributing-zh.md)。**
+
+> 本项目获得了 [北京理工大学教务部](http://jwc.bit.edu.cn/)、[北京理工大学计算机学院](http://cs.bit.edu.cn/) 的认可、背书与大力支持。详见:[致谢 - 官方赞助](https://bithesis.bitnp.net/Guide/5-Acknowledgements/Acknowledgements.html#%E5%AE%98%E6%96%B9%E8%B5%9E%E5%8A%A9-official-sponsors)。
+
+<h2>Slack 社区</h2>
+
+> 订阅更新,询问问题,提出需求……来参加 Slack 上面的北理 BIThesis 官方社区!
+
+[![Join on Slack](./assets/slack.svg)](https://join.slack.com/t/bithesis/shared_invite/zt-epmzkyk0-fJRsUS36AlwMNB2AI_Q~Vw)
+
+<h2>内容</h2>
+
+- [开发者指南](#开发者指南)
+- [贡献者指南](#%e8%b4%a1%e7%8c%ae%e8%80%85%e6%8c%87%e5%8d%97)
+- [贡献者](#%e8%b4%a1%e7%8c%ae%e8%80%85)
+- [相关项目](#%e7%9b%b8%e5%85%b3%e9%a1%b9%e7%9b%ae)
+- [发布状态](#%e5%8f%91%e5%b8%83%e7%8a%b6%e6%80%81)
+
+
+
+## 开发者指南
+
+### 生成 .cls 文件
+
+```Bash
+make cls
+```
+
+### 生成宏包手册
+
+```Bash
+make doc
+```
+
+### 与 scaffold 联调开发
+
+将 `BITNP/BIThesis` 与 `BITNP/BIThesis-scaffold` 放在同一级目录下,
+然后进入 `BIThesis` 目录。
+
+```Bash
+# 请首先确保 entr 正确安装
+ls bithesis.dtx | entr -s 'yes -y y | make doc && make copy'
+```
+
+## 贡献者指南
+
+详情请查看[贡献者指南](./contributing-zh.md)。
+
+## 贡献者
+
+参见[Github Contributors](https://github.com/BITNP/BIThesis/graphs/contributors) 与 [BIThesis - 致谢](https://bithesis.bitnp.net/Guide/5-Acknowledgements/Acknowledgements.html)。
+
+## 相关项目
+
+- [北京理工大学硕士(博士)学位论文 LaTeX 模板](https://github.com/BIT-thesis/LaTeX-template)
+- [fduthesis(复旦大学论文模板)](https://github.com/stone-zeng/fduthesis)
+- [上海交通大学 XeLaTeX 学位论文及课程论文模板](https://github.com/sjtug/SJTUThesis)
+- ……
+
+## 发布状态
+
+| CI | Build status |
+| :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| GitHub Release | ![GitHub Release](https://github.com/BITNP/BIThesis/workflows/Release/badge.svg?branch=master) |
+| Netlify Deploy | [![Netlify Status](https://api.netlify.com/api/v1/badges/81f7b49b-59a1-46bc-ba52-02f8be71d247/deploy-status)](https://app.netlify.com/sites/vigorous-hoover-a697eb/deploys) |
+
+---
+
+📖 **BIThesis** ©BITNP/BIThesis. Released under the [LaTeX Project Public License](LICENSE).
+
+Authored by Spencer Woo. Maintained with help from [contributors](https://github.com/BITNP/BIThesis/graphs/contributors).
diff --git a/macros/latex/contrib/bithesis/README.md b/macros/latex/contrib/bithesis/README.md
index a7cd83b298..d8a8e19997 100644
--- a/macros/latex/contrib/bithesis/README.md
+++ b/macros/latex/contrib/bithesis/README.md
@@ -1,93 +1,89 @@
<div align="center">
- <img src="./assets/bithesis_icon.svg" alt="BIThesis Icon">
+ <img src="assets/bithesis_icon.svg" alt="BIThesis Icon">
-📖 _非官方本科生毕业设计毕业论文 LaTeX 模板(以及更多)_
+📖 _Unofficial LaTeX templates for your bachelor graduation thesis (and maybe more)._
-![BIThesis](./assets/bithesis_badge_solid.svg)
+[![BIThesis](./assets/bithesis_badge_solid.svg)](https://bithesis.bitnp.net/)
+[![Chinese version](./assets/chinese.svg)](./README-zh.md)
[![Latexmk](https://badgen.net/badge/compiler/Latexmk?color=blue&labelColor=2b2b2b)](https://mg.readthedocs.io/latexmk.html)
[![License](https://badgen.net/github/license/BITNP/BIThesis?color=008080&labelColor=2b2b2b)](./LICENSE)
[![Join on Slack](https://img.shields.io/badge/Slack%20Community-BIThesis-black?logo=slack&style=social&logoColor=2eb67d)](https://join.slack.com/t/bithesis/shared_invite/zt-epmzkyk0-fJRsUS36AlwMNB2AI_Q~Vw)
</div>
-<h2>欢迎</h2>
+<h2>Welcome</h2>
-BIThesis 是针对北京理工大学本科同学毕业设计、毕业论文制作的一个非官方的 LaTeX 模板,BIThesis 同时也包括其他本科学习中涉及到的文献综述、实验报告等的 LaTeX 模板。
+BIThesis is an unofficial LaTeX template set for your **bachelor graduation thesis** and corresponding reports here at BIT. Hand-crafted following the specifications made by the _[Dept. of Undergraduate Academic Affairs](http://jwc.bit.edu.cn/)_ of _[Beijing Institute of Technology](http://http://www.bit.edu.cn/)_.
-**我们正在对项目持续更新!目前,你完全可以使用现有的版本开始你的毕业设计开题报告的写作;不过与此同时,我们也在持续推进代码的升级和更新(主要是不影响使用的底层逻辑)。更多开发计划请访问我们的 [Roadmap](https://github.com/BITNP/BIThesis/projects)。想帮助这个项目持续前进?参见我们的[贡献者指南](./contributing-zh.md)。**
+> This project is supported by the _[Dept. of Undergraduate Academic Affairs, BIT](http://jwc.bit.edu.cn/)_ and the _[School of Computer Science and Technology, BIT](http://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).
-> 本项目获得了 [北京理工大学教务部](http://jwc.bit.edu.cn/)、[北京理工大学计算机学院](http://cs.bit.edu.cn/) 的认可、背书与大力支持。详见:[致谢 - 官方赞助](https://bithesis.bitnp.net/Guide/5-Acknowledgements/Acknowledgements.html#%E5%AE%98%E6%96%B9%E8%B5%9E%E5%8A%A9-official-sponsors)。
+<h2>Slack Community</h2>
-<h2>Slack 社区</h2>
-
-> 订阅更新,询问问题,提出需求……来参加 Slack 上面的北理 BIThesis 官方社区!
+> Subscribe to new releases, ask questions, request features, etc. Come join our official community on Slack!
[![Join on Slack](./assets/slack.svg)](https://join.slack.com/t/bithesis/shared_invite/zt-epmzkyk0-fJRsUS36AlwMNB2AI_Q~Vw)
-<h2>内容</h2>
+<h2>Table of Contents</h2>
-- [开发者指南](#开发者指南)
-- [贡献者指南](#%e8%b4%a1%e7%8c%ae%e8%80%85%e6%8c%87%e5%8d%97)
-- [贡献者](#%e8%b4%a1%e7%8c%ae%e8%80%85)
-- [相关项目](#%e7%9b%b8%e5%85%b3%e9%a1%b9%e7%9b%ae)
-- [发布状态](#%e5%8f%91%e5%b8%83%e7%8a%b6%e6%80%81)
+- [How do I use BIThesis?](#how-do-i-use-bithesis)
+ - [Detailed online Wiki](#detailed-online-wiki)
+ - [PDF handbook](#pdf-handbook)
+ - [Online Video Tutorials](#online-video-tutorials)
+- [Contributing](#contributing)
+- [Contributors](#contributors)
+- [Similar Projects](#similar-projects)
+- [Release status](#release-status)
+## How do I use BIThesis?
+### Detailed online Wiki
-## 开发者指南
+**For a comprehensive guide on how to install LaTeX, compile BIThesis, and use a single one of BIThesis' template, please refer to BIThesis' Wiki. 👇**
-### 生成 .cls 文件
+[![BIThesis Wiki](https://img.shields.io/badge/BIThesis-Wiki-009944?logo=wikipedia&labelColor=2b2b2b&style=for-the-badge)](https://bithesis.bitnp.net/)
-```Bash
-make cls
-```
+Specifically, detailed guides on how to use a single one of the templates are available at:
-### 生成宏包手册
+- [BIThesis Wiki: Proposal report](https://bithesis.bitnp.net/Guide/3-Templates/Proposal-Report.html)
+- [BIThesis Wiki: Graduation thesis](https://bithesis.bitnp.net/Guide/3-Templates/Final-Graduation-Thesis.html)
+- [BIThesis Wiki: Lab report](https://bithesis.bitnp.net/Guide/3-Templates/Lab-Report.html)
-```Bash
-make doc
-```
+### PDF handbook
-### 与 scaffold 联调开发
+We also provide a PDF handbook on how to use BIThesis. You can download the PDF version of the BIThesis handbook here: [`bithesis-documentation.pdf`](https://github.com/BITNP/BIThesis/releases/latest).
-将 `BITNP/BIThesis` 与 `BITNP/BIThesis-scaffold` 放在同一级目录下,
-然后进入 `BIThesis` 目录。
+### Online Video Tutorials
-```Bash
-# 请首先确保 entr 正确安装
-ls bithesis.dtx | entr -s 'yes -y y | make doc && make copy'
-```
+You can watch online video tutorials here:
-## 贡献者指南
+- Bilibili: [BIThesis —— 教你优雅地撰写论文 | LaTeX 毕设模板系列教程](https://www.bilibili.com/video/BV1GT4y1V78d/)
+- BIThesis documentation videos (including some code which are referenced in the videos): [BIThesis - Videos](https://bithesis.bitnp.net/Video/)
-详情请查看[贡献者指南](./contributing-zh.md)。
+## Contributing
-## 贡献者
+For details, please see the [contributing doc](./contributing.md).
-> 本项目的存在离不开以下所有贡献者的辛勤贡献。更多信息请访问:[BIThesis - 致谢](https://bithesis.bitnp.net/Guide/5-Acknowledgements/Acknowledgements.html)。
+## Contributors
-[![](https://sourcerer.io/fame/spencerwooo/spencerwooo/BIThesis/images/0)](https://sourcerer.io/fame/spencerwooo/spencerwooo/BIThesis/links/0)[![](https://sourcerer.io/fame/spencerwooo/spencerwooo/BIThesis/images/1)](https://sourcerer.io/fame/spencerwooo/spencerwooo/BIThesis/links/1)[![](https://sourcerer.io/fame/spencerwooo/spencerwooo/BIThesis/images/2)](https://sourcerer.io/fame/spencerwooo/spencerwooo/BIThesis/links/2)[![](https://sourcerer.io/fame/spencerwooo/spencerwooo/BIThesis/images/3)](https://sourcerer.io/fame/spencerwooo/spencerwooo/BIThesis/links/3)[![](https://sourcerer.io/fame/spencerwooo/spencerwooo/BIThesis/images/4)](https://sourcerer.io/fame/spencerwooo/spencerwooo/BIThesis/links/4)[![](https://sourcerer.io/fame/spencerwooo/spencerwooo/BIThesis/images/5)](https://sourcerer.io/fame/spencerwooo/spencerwooo/BIThesis/links/5)[![](https://sourcerer.io/fame/spencerwooo/spencerwooo/BIThesis/images/6)](https://sourcerer.io/fame/spencerwooo/spencerwooo/BIThesis/links/6)[![](https://sourcerer.io/fame/spencerwooo/spencerwooo/BIThesis/images/7)](https://sourcerer.io/fame/spencerwooo/spencerwooo/BIThesis/links/7)
+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).
-## 相关项目
+## Similar Projects
- [北京理工大学硕士(博士)学位论文 LaTeX 模板](https://github.com/BIT-thesis/LaTeX-template)
- [fduthesis(复旦大学论文模板)](https://github.com/stone-zeng/fduthesis)
- [上海交通大学 XeLaTeX 学位论文及课程论文模板](https://github.com/sjtug/SJTUThesis)
- ……
-## 发布状态
+## Release status
| CI | Build status |
| :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| GitHub Release | ![GitHub Release](https://github.com/BITNP/BIThesis/workflows/Release/badge.svg?branch=master) |
+| GitHub Release | ![GitHub Release](https://github.com/BITNP/BIThesis/workflows/Release/badge.svg?branch=master) |
| Netlify Deploy | [![Netlify Status](https://api.netlify.com/api/v1/badges/81f7b49b-59a1-46bc-ba52-02f8be71d247/deploy-status)](https://app.netlify.com/sites/vigorous-hoover-a697eb/deploys) |
-<!-- ## 免责声明
-
-本项目尚未经由 _北京理工大学教务部_ 确认(但即将会被官方授权)。使用此模板的风险由你自己承担。笔芯 (´▽`ʃ♡ƪ) -->
---
-📖 **BIThesis** ©BITNP/BIThesis. Released under the [LaTeX Project Public License](LICENSE).
+📖 **BIThesis** ©Spencer Woo. Released under the [LaTeX Project Public License](LICENSE).
Authored by Spencer Woo. Maintained with help from [contributors](https://github.com/BITNP/BIThesis/graphs/contributors).
diff --git a/macros/latex/contrib/bithesis/bithesis.dtx b/macros/latex/contrib/bithesis/bithesis.dtx
index 5a3a32cb3b..db84b03eed 100644
--- a/macros/latex/contrib/bithesis/bithesis.dtx
+++ b/macros/latex/contrib/bithesis/bithesis.dtx
@@ -1,6 +1,7 @@
% \iffalse meta-comment
%
-% Copyright (C) 2020 by Feng Kaiyu
+% Copyright (C) 2021
+% Association of Bit Network Pioneer and any individual authors listed elsewhere in this file.
% -----------------------------------
%
% This file may be distributed and/or modified under the
@@ -19,10 +20,10 @@
%<cls>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<book>\ProvidesClass{bitbook}
%<article>\ProvidesClass{bitart}
-%<cls> [2020/11/27 v1.0.0 BIT Thesis Templates]
+%<cls> [2021/01/06 v1.0.1 BIT Thesis Templates]
%
%<*driver>
-\ProvidesFile{bithesis.dtx}[2020/11/27 1.0.0 BIT Thesis Templates]
+\ProvidesFile{bithesis.dtx}[2021/01/06 1.0.1 BIT Thesis Templates]
\documentclass{ltxdoc}
\usepackage{dtx-style}
@@ -66,7 +67,7 @@
% \\[1cm]
% \bfseries 北京理工大学本科生{\LaTeX}学位论文及报告模板 }
% \author{北京理工大学网络开拓者协会 \\ \texttt{webmaster@bitnp.net}} %
-% \date{\zihao{-4} \today\quad \color{RubineRed}{\kaishu {\BIThesis} 版本 \version}}
+% \date{\zihao{-4} \today\quad \color{RubineRed}{\kaishu {\BIThesis}版本\version}}
% \maketitle\thispagestyle{empty}
%
% \def\abstractname{}
@@ -80,26 +81,30 @@
% \begin{center}
% \noindent\rule[0.25\baselineskip]{0.5\textwidth}{0.7pt}
% \end{center}
+%
% \def\abstractname{免责声明}
% \begin{abstract}
% \noindent
% \begin{enumerate}
-% \item 本模板的发布遵守 \href{https://www.latex-project.org/lppl/lppl-1-3c.txt}{\LaTeX{} Project Public License (1.3.c)},使用前请认真阅读协议内
-% 容。
+% \item 本模板的发布遵守 \LPPL ,使用前请认真阅读协议内容。
% \item 任何个人或组织以本模板为基础进行修改、扩展而生成的新的专用模板,请严格遵
% 守 \LaTeX{} Project Public License 协议。由于违犯协议而引起的任何纠纷争端均与
% 本模板作者无关。
% \end{enumerate}
% \end{abstract}
%
-%
% \vspace{5mm}
%
% \def\abstractname{简介}
% \begin{abstract}
-% \BIThesisLaTeX 是北京理工大学本科生毕业设计开题报告、总论文,以及其他课程报告、实验报告等重要论文、报告的 {\LaTeX} 模板集合。如果你厌烦了 Word 格式的不人性化、参考文献的难以管理、公式输入的差劲体验……那么欢迎来尝试用专业的学术稿件排版利器 —— {\LaTeX},来排版你的论文。专业高端、学界认可、开源免费,{\LaTeX} 是你论文排版的最佳搭档。
+% \BIThesisLaTeX 是北京理工大学本科生毕业设计开题报告、总论文,以及其他课程报告、实验报告等重要论文、报告的 {\LaTeX} 模板集合。
+% 如果你厌烦了 Word 格式的不人性化、参考文献的难以管理、公式输入的差劲体验……那么欢迎来尝试用专业的学术稿件排版利器 —— {\LaTeX},来排版你的论文。
+% 专业高端、学界认可、开源免费,{\LaTeX} 是你论文排版的最佳搭档。
%
-% \BIThesisLaTeX 目前支持使用 {\hologo{XeLaTeX}} 进行编译,使用以 biber 为后端的 BibLaTeX 进行参考文献的生成,符合《信息与文献参考文献著录规则》(\href{http://openstd.samr.gov.cn/bzgk/gb/newGbInfo?hcno=7FA63E9BBA56E60471AEDAEBDE44B14C}{GB/T 7714—2015})的标准。目前主要设计完成了计算机学院本科生毕业论文开题报告、毕业设计毕业论文与通用实验报告的 {\LaTeX} 模板。
+% \BIThesisLaTeX 目前支持使用 {\hologo{XeLaTeX}} 进行编译,使用以 biber 为后端的 BibLaTeX 进行参考文献的生成,
+% 符合《信息与文献参考文献著录规则》
+% (\href{http://openstd.samr.gov.cn/bzgk/gb/newGbInfo?hcno=7FA63E9BBA56E60471AEDAEBDE44B14C}{GB/T 7714—2015})的标准。
+% 目前主要设计完成了计算机学院本科生毕业论文开题报告、毕业设计毕业论文与通用实验报告的 {\LaTeX} 模板。
%
% \end{abstract}
% \newpage
@@ -108,23 +113,69 @@
% \clearpage
% \setlength{\parskip}{0.8ex}
%
-% \section{模板介绍}
-% \section{贡献者}
-% \section{安装}
+% \section{项目简介}
+% \subsection{历史与贡献者们}
+% \begin{itemize}
+% \item 2019 - 2020 年,\BIThesis 最早由 2016 级的武上博、王赞、唐誉铭、牟思睿和詹熠莎等人维护。
+% \begin{itemize}
+% \item 在此期间,\BIThesis 从无到有诞生了,包括使用手册、在线文档和开箱即用的模板。
+% \item 同时,2017 级的赵池等同学完成了一系列 \BIThesisLaTeX 的视频教程。
+% \end{itemize}
+% \item 2020 - 2021 年,2017 级的冯开宇、杨思云、郝正亮和顾骁等人接管了维护开发工作。
+% \begin{itemize}
+% \item 在此期间,冯开宇将原来的 .tex 文件制作成了宏包,并发布到 CTAN 上。
+% \item 项目代码也随之被拆分成了 \BIThesisMacroPackage,\BIThesisWiki 和 \BIThesisScaffold。
+% \end{itemize}
+% \end{itemize}
+% \subsection{\BIThesis 是什么?}
+% \BIThesis 之名是英文单词 Beijing Institution of Technology(北京理工大学)的首字母缩写“BIT” 与“Thesis”结合而成。在纯文本环境下,该名字应写作“BIThesis”。
+%
+% \BIThesisLaTeX 是由北京理工大学众多学子发起并维护的开源项目。该项目旨在建立一套简单易用的北京理工大学 \LaTeX 学位论文模板,包括本科综合论文训练。
+% \subsubsection{\BIThesisLaTeX 的组成}
+% 我们将 \BIThesisLaTeX 划分为了三个主要仓库:
+% \begin{table}[H]
+% \centering
+% \begin{tabular}{@{}l l p{6cm} @{}}
+% \toprule
+% 项目 & 项目地址 & 主要目的 \\ \midrule
+% BIThesis & \href{https://github.com/BITNP/BIThesis}{BITNP/BIThesis} & 主要存储 \BIThesis 宏包 \\
+% BIThesis-wiki & \href{https://github.com/BITNP/BIThesis-wiki}{BITNP/BIThesis-wiki} & 存储 \BIThesisLaTeX 项目在线文档 \\
+% BIThesis-scaffold & \href{https://github.com/BITNP/BIThesis-scaffold}{BITNP/BIThesis-scaffold} & 存储开箱即用的论文模板样式,便于使用者快速开始写作 \\ \bottomrule
+% \end{tabular}
+% \end{table}
+%
+% 如果你仅想解决「我如何使用 \BIThesisLaTeX 来帮助我完成实验论文?」这个问题,那么欢迎你访问我们的\href{https://bithesis.bitnp.net}{在线文档}以获得更多信息。
+%
% \section{使用说明}
-%
-% \DescribeMacro{\YOURMACRO}
-% Put description of |\YOURMACRO| here.
-%
-% \DescribeEnv{YOURENV}
-% Put description of |YOURENV| here.
-%
-% \StopEventually{\PrintIndex}
-%
+% \subsection{\BIThesis 宏包的组成}
+% 为了适应用户的不同需求,并符合 CTeX 宏集的设计习惯,我们将 \BIThesisMacroPackage 的主要功能设计安排在两个中文文档类当中,具体的组成见 \ref{tab:classes}。
+% \begin{table}[H]
+% \centering
+% \caption{测试}
+% \label{tab:classes}
+% \begin{tabular}{@{}lll@{}}
+% \toprule
+% 类别 & 文件 & 说明 \\ \midrule
+% \multirow{2}{*}{文档类} & bitart.cls & 对应 ctxart.cls,提供实验报告模板、开题报告模板。 \\
+% & bitbook.cls & 对应 ctexbook.cls ,提供本科毕业模板。 \\ \cmidrule(l){2-3}
+% \end{tabular}
+% \end{table}
+% \subsection{\BIThesis 宏包的安装和更新}
+% 最常见的 \TeX 发行版(\hologo{TeX} Live 和 \hologo{MiKTeX})已收录\BIThesisMacroPackage 及其依赖的宏包和宏集。
+%
+% 如果安装以上发行版的时间较早,可能你本地的环境中不存在 \BIThesisMacroPackage 或者不是最新版本的。那么你需要通过包管理器来安装/更新 \BIThesisMacroPackage:
+% \mint{bash}|tlmgr update --self --all|
+% \subsection{使用 \BIThesis 文档类}
+% 推荐使用 \BIThesisScaffold 来进行具体的项目编写。\BIThesisScaffold 提供了多种最常用的模板,你可以在 \href{https://github.com/BITNP/BIThesis}{主项目的 Releases}中找到它们。
% \section{致谢}
+% \section{软件许可证}
+% \begin{itemize}
+% \item 北京理工大学校徽校名图片的版权归北京理工大学所有。
+% \item \BIThesisLaTeX 宏包以及相关文档类使用 \LPPL 授权。
+% \item \BIThesisLaTeX 文档及其他附属文件通过 \LPPL 授权。
+% \end{itemize}
% \section{实现细节}
%
-%
% \begin{macrocode}
%<*package>
% \end{macrocode}
@@ -176,7 +227,6 @@
\RequirePackage{setspace}
\RequirePackage{booktabs}
\RequirePackage{multirow}
-\RequirePackage{caption}
\RequirePackage{tikz}
\RequirePackage{etoolbox}
\RequirePackage{hyperref}
@@ -543,7 +593,11 @@
pdfdisplaydoctitle = true
}%
-\newcommand{\BIThesisLaTeX}{{\BIThesis} 北京理工大学学位论文及报告{\LaTeX}模板}
+\newcommand{\BIThesisLaTeX}{{\BIThesis}北京理工大学学位论文及报告{\LaTeX}模板}
+\newcommand{\BIThesisMacroPackage}{{\BIThesis}宏集}
+\newcommand{\BIThesisWiki}{{\BIThesis}在线文档}
+\newcommand{\BIThesisScaffold}{{\BIThesis}模板}
+\newcommand{\LPPL}{{\href{https://www.latex-project.org/lppl/lppl-1-3c.txt}{\LaTeX{} Project Public License (1.3.c)}}}
\newcommand{\version}{v2.0 BirthdayCake}
\ctexset{
@@ -732,6 +786,7 @@
\raisebox{-0.38ex}{\matex@ssize {S}}\kern-0.05em
{\matex@ssize {I}}\kern-0.05em
\raisebox{-0.35ex}{\matex@ssize {S}}\kern-0.5em
+ \kern 1ex
}
}
\makeatother
diff --git a/macros/latex/contrib/bithesis/bithesis.ins b/macros/latex/contrib/bithesis/bithesis.ins
index 923da3dd31..98393c70e9 100644
--- a/macros/latex/contrib/bithesis/bithesis.ins
+++ b/macros/latex/contrib/bithesis/bithesis.ins
@@ -1,4 +1,4 @@
-%% Copyright (C) 2020
+%% Copyright (C) 2021
%% Association of Bit Network Pioneer and any individual authors listed elsewhere in this file.
%% --------------------------------------------------------------------------
%%
@@ -22,7 +22,7 @@
\preamble
- Copyright (C) 2020
+ Copyright (C) 2021
Association of Bit Network Pioneer and any individual authors listed in the documentation.
------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/bithesis/bithesis.pdf b/macros/latex/contrib/bithesis/bithesis.pdf
index b15b8c45d5..de2c9e0a91 100644
--- a/macros/latex/contrib/bithesis/bithesis.pdf
+++ b/macros/latex/contrib/bithesis/bithesis.pdf
Binary files differ
diff --git a/macros/latex/contrib/bithesis/contributing-zh.md b/macros/latex/contrib/bithesis/contributing-zh.md
new file mode 100644
index 0000000000..cfdf95b80d
--- /dev/null
+++ b/macros/latex/contrib/bithesis/contributing-zh.md
@@ -0,0 +1,58 @@
+# 贡献者指南
+
+[![English version](assets/english.svg)](./contributing.md)
+
+:tada: 首先,感谢你为本项目付出的宝贵时间!:tada:
+
+以下是有关如何为本项目贡献力量的一些指导建议。
+
+以下内容大多是指导性质的建议,并非强制要求。总之,在行动之前确保你知道自己要做什么。
+
+本文档目前仍处于完善阶段,欢迎通过提出你自己的意见或者提交 PR 来帮助我们。
+
+## Guidance
+
+**[我不想看下面的内容,我只是想问个小问题!!!](#加入我们的-slack-频道)**
+
+| | 普通使用者 | 开发者 |
+| ---------- | ------------------------------- | ------------------------------------------- |
+| 提出问题 | [Slack](#加入我们的-slack-频道) | [Slack](#加入我们的-slack-频道) |
+| 提交 Bug | [Slack](#加入我们的-slack-频道) | [Github - Issues](#在-github-上提交-bug) |
+| 有好的想法 | [Slack](#加入我们的-slack-频道) | [Slack](#加入我们的-slack-频道) |
+| 提交 PR | | [Github - Pull Request](#提交-pull-request) |
+| 有信心维护代码 | | [加入 Slack 并联系我们](#加入我们的-slack-频道) |
+
+## 加入我们的 Slack 频道
+
+在我们提供的[官方 Slack 频道][slack channel invitation]中有**很多活跃的维护者**和**友好的社区氛围**。在这里你能获得很多与本项目有关的帮助。
+
+[![点击这里加入 Slack](/assets/slack.svg)](https://join.slack.com/t/bithesis/shared_invite/zt-epmzkyk0-fJRsUS36AlwMNB2AI_Q~Vw)
+
+- 使用 `#community` 频道来**讨论问题**、**提出你的建议**或者**寻求帮助**。
+- 使用 `#random` 频道来**水群**:laughing:!
+- 使用 `#announcement` 频道获取和本项目相关的**最新资讯和使用方法**!
+
+> 提示:关于具体如何提出问题并没有明确的要求。总之请提供尽可能详细的信息,并且思考一下这个问题是不是已经被解决了。
+
+## 在 Github 上提交 Bug
+
+如果你能更精确的定位问题所在,或者能够提供更详细的信息;你可以向我们[提交一个 issue][issue reporting link]。
+
+## 提交 Pull Request
+
+欢迎提交 Pull Request!
+
+以下流程将会帮助你完成一次 PR。
+
+1. Fork 这个项目。
+2. 使用 `git clone` 将项目拉取到本地。
+3. 使用最少的修改来解决 bug。
+4. 使用 `git commit` 提交变更。
+5. 创建一个 PR,并添加相应的说明。
+6. 在 PR 被合并之前请保持关注,以便进行修改。
+
+寻找更细致的流程请参考
+_[Github Help](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests)_。
+
+[slack channel invitation]: https://join.slack.com/t/bithesis/shared_invite/zt-epmzkyk0-fJRsUS36AlwMNB2AI_Q~Vw
+[issue reporting link]: https://github.com/BITNP/BIThesis/issues/new
diff --git a/macros/latex/contrib/bithesis/contributing.md b/macros/latex/contrib/bithesis/contributing.md
new file mode 100644
index 0000000000..7fe28f4955
--- /dev/null
+++ b/macros/latex/contrib/bithesis/contributing.md
@@ -0,0 +1,60 @@
+# Contributing
+
+[![Chinese version](./assets/chinese.svg)](./contributing-zh.md)
+
+:tada: First off, thanks for taking the time to contribute! :tada:
+
+The following is a set of guidelines for contributing to BIThesis.
+
+These are mostly guidelines, not rules. Use your best judgment,
+and feel free to propose changes to this document in a pull request.
+
+## Guidance
+
+**[I don't want to read this whole thing, I just have a small question!!!](#join-our-slack-channel)**
+
+| | For Users | For Developers |
+| --------------- | -------------------------------- | ---------------------------------------------- |
+| Have a Question | [Slack](#join-our-slack-channel) | [Slack](#join-our-slack-channel) |
+| Bug Report | [Slack](#join-our-slack-channel) | [Github - Issues](#bug-report-on-github) |
+| Feature Request | [Slack](#join-our-slack-channel) | [Slack](#join-our-slack-channel) |
+| Pull Request | | [Github - Pull Request](#pull-request-process) |
+
+## Join Our Slack Channel
+
+We provide an [official Slack channel][slack channel invitation]
+with **a bunch of active maintainers** and **a friendly community**
+to give helpful advice **if you have any questions**.
+
+[![Join on Slack](/assets/slack.svg)](https://join.slack.com/t/bithesis/shared_invite/zt-epmzkyk0-fJRsUS36AlwMNB2AI_Q~Vw)
+
+- use `#community` channel to **report a bug**, **feature request** and **asking for help**.
+- use `#random` channel to have **unrelated discussion**:laughing:!
+- use `#announcement` channel if you don't want to miss the **updated news and features**!
+
+> note: there is no detailed rules about how to ask question, just provide enough information and
+rethink before write.
+
+## 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!
+
+The following steps will help you finish a pull request.
+
+1. Fork this repo.
+2. `git clone` your forked repo.
+3. Make changes until the bug is fixed.
+4. Commit your changes.
+5. Create a pull request with related information.
+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)_.
+
+[slack channel invitation]: https://join.slack.com/t/bithesis/shared_invite/zt-epmzkyk0-fJRsUS36AlwMNB2AI_Q~Vw
+[issue reporting link]: https://github.com/BITNP/BIThesis/issues/new
diff --git a/macros/latex/contrib/easybook/README.md b/macros/latex/contrib/easybook/README.md
index 9c98211412..5744607360 100644
--- a/macros/latex/contrib/easybook/README.md
+++ b/macros/latex/contrib/easybook/README.md
@@ -17,8 +17,8 @@ xelatex -shell-escape easybook-demo
## Reference documents
- [CTeX macro collection manual](https://ctan.org/pkg/ctex)
-- [Xiamen University graduation thesis template](https://github.com/CamuseCao/XMU-thesis)
- [Fudan University graduation thesis template](https://github.com/stone-zeng/fduthesis)
+- [Xiamen University graduation thesis template](https://github.com/CamuseCao/XMU-thesis)
- [Wuhan University graduation thesis template](https://github.com/mtobeiyf/whu-thesis)
- [ElegantBook book template](https://ctan.org/pkg/elegantbook)
@@ -32,7 +32,7 @@ This work may be distributed and/or modified under the conditions of the CC-BY 4
# easybook 书籍文档类
-easybook 是基于 ctexbook 书籍文档类的极简风格模板。它主要适用于中文书籍或笔记的排版,甚至可以稍作修改成为论文模板。已加载一些常用的宏包以实现一般的排版要求。尽管已尽可能多地考虑了一些细节,但仍然存在不足。
+easybook 是基于 ctexbook 书籍文档类的极简风格模板。它主要适用于中文书籍或笔记的排版,甚至可以稍作修改成为学位论文模板。已加载一些常用的宏包以实现一般的排版要求。尽管已尽可能多地考虑了一些细节,但仍然存在不足。
## 编译方法
@@ -49,8 +49,8 @@ xelatex -shell-escape easybook-demo
## 参考文档
- [CTeX 宏集手册](https://ctan.org/pkg/ctex)
-- [厦门大学毕业论文模板](https://github.com/CamuseCao/XMU-thesis)
- [复旦大学毕业论文模板](https://github.com/stone-zeng/fduthesis)
+- [厦门大学毕业论文模板](https://github.com/CamuseCao/XMU-thesis)
- [武汉大学毕业论文模板](https://github.com/mtobeiyf/whu-thesis)
- [ElegantBook 书籍模板](https://ctan.org/pkg/elegantbook)
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.pdf b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
index 16869f252c..764f18f446 100644
--- a/macros/latex/contrib/easybook/doc/easybook-demo.pdf
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.tex b/macros/latex/contrib/easybook/doc/easybook-demo.tex
index b03695b0bd..ab7a864b75 100644
--- a/macros/latex/contrib/easybook/doc/easybook-demo.tex
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.tex
@@ -4,7 +4,6 @@
style =
{
color = forest,
- % cite = authoryear,
thmbox = true,
% capdash = true,
% multoc = true,
@@ -34,6 +33,11 @@
fnfont = \rmfamily,
marfont = \sffamily\footnotesize
},
+ bibset =
+ {
+ backend = bibtex,
+ bibstyle = number
+ },
% secnumdepth = 2,
% tocdepth = 2
}
@@ -49,7 +53,7 @@
\textcolor[HTML]{00c2ff}{\faEdge}~\url{https://latexstudio.net} \\
\url{https://ctan.org/pkg/easybook}
}
- \date{2021/01/09\hskip\ccwd\relax v1.2}
+ \date{2021/01/11\hskip\ccwd\relax v1.21}
}
\begin{document}
@@ -66,7 +70,7 @@
\subfile{pages/appendix}
\backmatter
-\bibliography{ref/refs}
+\printbibliography
\listoffigures
\listoftables
\listoflistings
diff --git a/macros/latex/contrib/easybook/doc/easybook.pdf b/macros/latex/contrib/easybook/doc/easybook.pdf
index 3ec672b518..dc02797df4 100644
--- a/macros/latex/contrib/easybook/doc/easybook.pdf
+++ b/macros/latex/contrib/easybook/doc/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/doc/easybook.tex b/macros/latex/contrib/easybook/doc/easybook.tex
index ab65b0c7c8..0ccfde03c0 100644
--- a/macros/latex/contrib/easybook/doc/easybook.tex
+++ b/macros/latex/contrib/easybook/doc/easybook.tex
@@ -2,18 +2,19 @@
\hypersetup
{
colorlinks,
- linkcolor=blue,
- urlcolor=blue
+ linkcolor = blue,
+ urlcolor = blue
}
\title{\sffamily easybook书籍文档类}
\author{瞿毅}
-\date{2021/01/09\hskip\ccwd\relax v1.2\thanks{\url{https://gitee.com/TeX-doc/easybook}}}
+\date{2021/01/11\hskip\ccwd\relax v1.21\thanks{\url{https://gitee.com/TeX-doc/easybook}}}
\begin{document}
\maketitle
-\changes{v1.2}{2021/01/09}{修改和完善用户文档。}
-\changes{v1.2}{2021/01/09}{模板更改为使用CC-BY许可协议。}
+\changes{v1.20}{2021/01/09}{修改和完善用户文档。}
+\changes{v1.20}{2021/01/09}{模板更改为使用CC-BY许可协议。}
+\changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。}
\begin{abstract}
\cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加修改成为学位论文模板。
\end{abstract}
@@ -36,7 +37,7 @@
xelatex -shell-escape easybook-demo
\end{frameverb}
-需注意,正确\textbf{编译索引}需要增加 \opt{-shell-escape} 命令行选项。若不需要索引和参考文献,可以在正文中注释掉命令。若出现以下警告,再编译一次即可。
+需注意,正确\textsf{编译索引}需要增加 \opt{-shell-escape} 命令行选项。若不需要索引和参考文献,可以在正文中注释掉命令。若出现以下警告,再编译一次即可。
\begin{frameverb}
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
\end{frameverb}
@@ -44,7 +45,7 @@
\subsection{字体设置}
默认中文使用方正系列的{\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}和{\fangsong 方正仿宋},英文使用思源系列的{\rmfamily Noto Serif}、{\sffamily Noto Sans}和{\ttfamily Noto Sans Mono},数学字体使用 \pkg{notomath}。字体点击此处下载\href{https://wws.lanzous.com/b01ns361i}{下载地址}。
-如果您\textbf{懒于安装字体},可以见小节 \ref{subsec1} 使用\CTeX 预置中文字库。如果您不喜欢方正、思源字体,\textbf{自定义字体}需启用选项 \opt{font = none},并可在导言区设置中文字体,粗体与斜体不设置会产生警告。
+如果您\textsf{懒于安装字体},可以见小节 \ref{subsec1} 使用\CTeX 预置中文字库。如果您不喜欢方正、思源字体,\textsf{自定义字体}需启用选项 \opt{font = none},并可在导言区设置中文字体,粗体与斜体不设置会产生警告。
\begin{ctexexam}
\setCJKmainfont{SimSun}[BoldFont = SimHei,ItalicFont = KaiTi]
\setCJKsansfont{SimHei}
@@ -57,8 +58,8 @@
\item 带有 \rexptarget\rexpstar{} 号的选项,需要在引入文档类的时候设定。
\item 带有 \exptarget\expstar{} 号的选项,需要通过\CTeX 宏集提供的用户接口命令 \tn{ctexset} 设定。
\end{itemize}
-\subsection{文档类选项}\label{subsec1}
+\subsection{文档类选项}\label{subsec1}
\begin{function}[rEXP,added = 2021-01-05]{draft}
开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。
\end{function}
@@ -107,15 +108,14 @@
\begin{syntax}
config = <配置文件名>
\end{syntax}
-\changes{v1.1}{2021/01/08}{加入载入用户配置选项。}
+\changes{v1.10}{2021/01/08}{加入载入用户配置选项。}
\opt{config}为载入用户配置选项,配置文件名不需加括号但需带有后缀名如 \opt{tex}、\opt{def} 和 \opt{cfg}。
\end{function}
\subsubsection{风格}
-\begin{function}[EXP,updated = 2021-01-08]{style/color,style/cite,style/thmbox,style/capdash,style/multoc,style/withpart,style/perchap,style/perpage}
+\begin{function}[EXP,updated = 2021-01-08]{style/color,style/thmbox,style/capdash,style/multoc,style/withpart,style/perchap,style/perpage}
\begin{syntax}
color = <(none)|forest|energy|cyberpunk>
- cite = <(number)|authoryear>
thmbox = <true|(false)>
capdash = <true|(false)>
multoc = <true|(false)>
@@ -123,26 +123,25 @@
perchap = <true|(false)>
perpage = <true|(false)>
\end{syntax}
-\changes{v1.1}{2021/01/08}{更改颜色实现方式与选项名。}
+\changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。}
\opt{style} 选项控制文章的风格。
\end{function}
\begin{optdesc}
- \item[color]主题颜色,包括标题、页眉颜色等,选项 \opt{none} 为黑白页面,但不包括超链接。
+ \item[color] 主题颜色,包括标题、页眉颜色等,选项 \opt{none} 为黑白页面,但不包括超链接。
\begin{function}{ctex@frame,ctex@emph,ctex@verb}
\begin{syntax}
\tn{definecolor}\oarg{类型}\marg{名称}\marg{模式列表}\marg{参数列表}
\end{syntax}
- \changes{v1.1}{2021/01/08}{可以自定义主题颜色。}
+ \changes{v1.10}{2021/01/08}{可以自定义主题颜色。}
主题颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改,类似地更改超链接颜色见小节 \ref{ssubsec1}。
\end{function}
- \item[cite]参考文献格式为中国的参考文献推荐标准GB/T 7714-2015,有顺序编码制和著者-出版年制两种风格,理工科类一般使用顺序编码制,文科类一般使用著者-出版年制。
- \item[thmbox]开启定理及习题环境的盒子边框。
- \item[capdash]将图表代码标题风格由例如\textsf{图1.1}变为\textsf{图1--1}的形式。
- \item[multoc]开启双栏目录,可与 \opt{onecolumn} 和 \opt{twocolumn} 选项配合出单栏正文、单栏目录,双栏正文、单栏目录,单栏正文、双栏目录和双栏正文、双栏目录四种方式 。
- \item[withpart]使章跟随每一部分编号,默认不跟随。
- \item[perchap]使脚注跟随每一章编号,默认不跟随。
- \item[perpage]使脚注跟随每一页编号,默认不跟随。
+ \item[thmbox] 开启定理及习题环境的盒子边框。
+ \item[capdash] 将图表代码标题风格由例如\textsf{图1.1}变为\textsf{图1\textendash 1}的形式。
+ \item[multoc] 开启双栏目录,可与 \opt{onecolumn} 和 \opt{twocolumn} 选项配合出单栏正文、单栏目录,双栏正文、单栏目录,单栏正文、双栏目录和双栏正文、双栏目录四种方式 。
+ \item[withpart] 使章跟随每一部分编号,默认不跟随。
+ \item[perchap] 使脚注跟随每一章编号,默认不跟随。
+ \item[perpage] 使脚注跟随每一页编号,默认不跟随。
\end{optdesc}
\subsubsection{超链接}\label{ssubsec1}
@@ -152,19 +151,19 @@
linkcolor = <(graphite)|cutepink|skyblue|crimson>
linktopage = <true|(false)>
\end{syntax}
-\changes{v1.1}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
+\changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
\end{function}
\begin{optdesc}
- \item[hyperlink]\opt{edge} 使超链接为边框形式,\opt{various} 使超链接为彩色字体,有四种颜色风格。\opt{none} 关闭超链接边框与颜色,此时 \opt{linkcolor} 选项无效。
- \item[linkcolor]超链接颜色样式。
+ \item[hyperlink] \opt{edge} 使超链接为边框形式,\opt{various} 使超链接为彩色字体,有四种颜色风格。\opt{none} 关闭超链接边框与颜色,此时 \opt{linkcolor} 选项无效。
+ \item[linkcolor] 超链接颜色样式。
\begin{function}{ctex@link,ctex@url,ctex@cite}
\begin{syntax}
\tn{definecolor}\oarg{类型}\marg{名称}\marg{模式列表}\marg{参数列表}
\end{syntax}超链接颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改。
- \changes{v1.1}{2021/01/08}{可以自定义超链接颜色。}
+ \changes{v1.10}{2021/01/08}{可以自定义超链接颜色。}
\end{function}
- \item[linktopage]将目录中的超链接置于页码上,默认是置于标题上。
+ \item[linktopage] 将目录中的超链接置于页码上,默认是置于标题上。
\end{optdesc}
\subsubsection{行距}
@@ -180,11 +179,11 @@
\end{function}
\begin{optdesc}
- \item[linespread]正文行距。
- \item[tabspread]表格行距。
- \item[mathspread]数学环境行距。
- \item[capspread]图表代码标题行距。
- \item[fnspread]脚注行距。
+ \item[linespread] 正文行距。
+ \item[tabspread] 表格行距。
+ \item[mathspread] 数学环境行距。
+ \item[capspread] 图表代码标题行距。
+ \item[fnspread] 脚注行距。
\end{optdesc}
\subsubsection{其它字体}
@@ -196,18 +195,39 @@
fnfont = <\tn{rmfamily}>
marfont = <\tn{rmfamily}\tn{footnotesize}>
\end{syntax}
-\changes{v1.1}{2021/01/08}{加入自定义非正文字体选项。}
+\changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
+\end{function}
+
+\begin{optdesc}
+ \item[tabfont] 表格标题的字体设置。
+ \item[figfont] 图片标题的字体设置。
+ \item[lstfont] 代码标题的字体设置。
+ \item[fnfont] 脚注的字体设置,请不要使用字号命令。
+ \item[marfont] 边注的字体设置。
+\end{optdesc}
+
+\subsubsection{参考文献}
+\begin{function}[EXP,added = 2021-01-11]{bibset/backend,bibset/bibstyle,bibset/citestyle,bibset/bibfile,\printbibliography}
+\begin{syntax}
+ backend = <(bibtex)|biblatex>
+ bibstyle = <(number)|authoryear|其它格式>
+ citestyle = <引用格式>
+ bibfile = <ref/refs.bib>
+ \tn{printbibliography}\oarg{选项列表}
+\end{syntax}
+\changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
\end{function}
\begin{optdesc}
- \item[tabfont]表格标题的字体设置。
- \item[figfont]图片标题的字体设置。
- \item[lstfont]代码标题的字体设置。
- \item[fnfont]脚注的字体设置,请不要使用字号命令。
- \item[marfont]边注的字体设置。
+ \item[backend] 参考文献处理后端,默认用传统的 \hologo{BibTeX} 处理参考文献。
+ \item[bibstyle] 参考文献格式为中国的参考文献推荐标准GB/T 7714-2015,有顺序编码制和著者-出版年制两种风格,理工科类一般使用顺序编码制,文科类一般使用著者-出版年制。若使用其它格式,使用 \hologo{BibTeX} 处理时需确保正确的 \opt{bst} 文件,使用 \hologo{biber} 处理可使用 \pkg{biblatex} 宏包支持的参考文献风格名称。
+ \item[citestyle] 引用参考文献的格式,对 \opt{backend = bibtex} 选项\textsf{无效},可使用 \pkg{biblatex} 宏包支持的引用文献风格名称。
+ \item[bibfile] 参考文献的数据文件,使用 \hologo{biber} 处理时要带有 \opt{bib} 后缀,默认为一个在 \opt{ref} 文件夹中以 \opt{refs.bib} 命名的文件。
+ \item[\tn{printbibliography}] 两种方式\textsf{均使用}此命令打印参考文献,其中可选项仅在 \hologo{biber} 处理时有效。
\end{optdesc}
\section{常用环境}
+
\subsection{公式}
\begin{function}[added = 2021-01-05]{equation,multline,gather,align}
\begin{syntax}
@@ -234,7 +254,7 @@
\end{function}
\subsubsection{排序列表}\label{ssubsec2}
-使用 \opt{enumerate} 环境可创建排序列表,使用 \opt{enumerate*} 环境产生行内部列表,可以使用\textsf{A、a、I、i和1}作为可选项为 \opt{enumerate} 与 \opt{enumerate*} 格式化标签。若生成\textbf{Item I、Item II、Item III}格式可以这样
+使用 \opt{enumerate} 环境可创建排序列表,使用 \opt{enumerate*} 环境产生行内部列表,可以使用\textsf{A、a、I、i和1}作为可选项为 \opt{enumerate} 与 \opt{enumerate*} 格式化标签。若生成\textsf{Item I、Item II、Item III}格式可以这样
\begin{ctexexam}
\begin{enumerate*}[(a)]
\begin{enumerate}[\bfseries{Item} I]
@@ -249,7 +269,8 @@
\begin{itemize}[$\star$]
\end{ctexexam}
-\subsubsection{主题列表}使用 \opt{description} 环境可创建带有主题词的列表。
+\subsubsection{主题列表}
+使用 \opt{description} 环境可创建带有主题词的列表。
\begin{ctexexam}
\begin{description}
\item[主题一] 内容一
@@ -330,14 +351,14 @@
\section{其它格式}
\subsection{代码}
-\begin{function}[added = 2021-01-05]{\lstinline,lstlisting}
+\begin{function}[added = 2021-01-05]{\lstinline,lstlisting,\listoflistings}
\begin{syntax}
\tn{lstinline}\oarg{键值列表}\marg{行内代码}
\tn{begin}\marg{lstlisting}\oarg{键值列表}
<行间代码>
\tn{end}\marg{lstlisting}
\end{syntax}
-使用 \pkg{listings} 宏包可以对代码格式进行高度定制。
+使用 \pkg{listings} 宏包可以对代码格式进行高度定制,\tn{listoflistings} 命令用于输出代码目录。
\end{function}
\subsection{物理量}
@@ -373,11 +394,12 @@
\end{function}
\subsubsection{索引}
-\begin{function}[added = 2021-01-05]{\index}
+\begin{function}[added = 2021-01-05]{\index,\printindex}
\begin{syntax}
\tn{index}\marg{标签}
+ \tn{printindex}\oarg{索引名}
\end{syntax}
-使用 \pkg{imakeidx} 生成索引,仅做了简单的设置如将索引设为双栏并加入目录,其他选项可另外配置。
+使用 \pkg{imakeidx} 生成索引,\tn{printindex} 命令用于生成索引目录。仅做了简单的设置如将索引设为双栏并加入目录,其他选项可另外配置。
\end{function}
\subsubsection{脚注}
diff --git a/macros/latex/contrib/easybook/doc/pages/chapter2.tex b/macros/latex/contrib/easybook/doc/pages/chapter2.tex
index b8ab64147d..43af513c95 100644
--- a/macros/latex/contrib/easybook/doc/pages/chapter2.tex
+++ b/macros/latex/contrib/easybook/doc/pages/chapter2.tex
@@ -57,7 +57,7 @@ The Stokes formula is an extension of the basic calculus formula in the case of
\begin{mybox}*[My title]\index{z@自定义盒子}
\zhlipsum*[3][name = aspirin]
-\tcblower
+ \tcblower
\zhlipsum*[8][name = aspirin]
\end{mybox}
diff --git a/macros/latex/contrib/easybook/doc/pages/chapter3.tex b/macros/latex/contrib/easybook/doc/pages/chapter3.tex
index 6ca662ca0d..df8ca09eaf 100644
--- a/macros/latex/contrib/easybook/doc/pages/chapter3.tex
+++ b/macros/latex/contrib/easybook/doc/pages/chapter3.tex
@@ -49,6 +49,6 @@ HN-[::+60]CH_3)=-(-HO)=)}\]
这是一个参考文献引用的范例\cite{1979Prospect}。引用多个文献,将引用标号中的多个文献序号按升序排列,若其中有2个以上的连续序号,则改用范围序号,例如\cite{1979Prospect,1989The,2010An}。
\section{行内盒子}\index{h@行内盒子}
-对乙酰氨基酚和布洛芬 \concise[Aqua][fontupper = \rmfamily]{concise} 于1956年和1959年相继问世以后,阿司匹林 \fuzzy[yellow][fontupper = \ttfamily,colupper = black]{fuzzy} 的使用率开始下降。
+对乙酰氨基酚和布洛芬 \concise[Aqua][fontupper = \rmfamily]{concise} 于1956年和1959年相继问世以后,阿司匹林 \fuzzy[DarkSeaGreen][fontupper = \ttfamily,colupper = black]{fuzzy} 的使用率开始下降。
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/easybook/doc/pages/preface.tex b/macros/latex/contrib/easybook/doc/pages/preface.tex
index fc862b21f8..d913c3abe1 100644
--- a/macros/latex/contrib/easybook/doc/pages/preface.tex
+++ b/macros/latex/contrib/easybook/doc/pages/preface.tex
@@ -7,14 +7,14 @@
\lstinline{easybook} 使用\LaTeX 3语法将选项扩展入\CTeX 宏集接口命令 \lstinline{\ctexset} 的列表。如果无法编译以及选项说明细节参见~\href{./easybook.pdf}{easybook用户手册}。
\begin{enumerate}[label = \color{DarkBlue}\protect\circled{\arabic*}]
+\item 增加 \lstinline{bibset} 选项,可以使用 \lstinline{bibtex} 或 \lstinline{biber} 编译参考文献。
+\item 修复单面文档时页眉横线消失的问题。
\item 修复了 \lstinline{linktopage} 选项关闭时目录中标题编号无超链接的问题。
\item 增加 \lstinline{elfont} 选项可以自定义图表、代码、脚注和边注的字体。
\item 增加 \lstinline{config} 选项可以载入用户配置文件。
\item 优化页眉页脚,单面或双面排版适配了不同风格。
\item 更改草稿选项,与标准文类行为一致并显示页面边框。
\item 使用功能更丰富的 \lstinline{thmtools} 设置定理环境。
-\item 可自定义正文、表格、公式环境、图表标题以及脚注的行距。
-\item 图表可以使用双语标题,增加代码索引和索引目录,脚注标记可以设置为自定义的符号。
\end{enumerate}
\vfill{\small\doclicenseThis}
diff --git a/macros/latex/contrib/easybook/easybook.cls b/macros/latex/contrib/easybook/easybook.cls
index f413155cba..48f079ad66 100644
--- a/macros/latex/contrib/easybook/easybook.cls
+++ b/macros/latex/contrib/easybook/easybook.cls
@@ -9,10 +9,12 @@
%% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/01/09}{v1.2}{}
+\ProvidesExplClass{easybook}{2021/01/11}{v1.21}{}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
+\cs_new_protected:Npn \__put_ctexbook:n #1
+ {\PassOptionsToClass{#1}{ctexbook}}
\cs_new_protected:Npn \__patch_cmd:Nnn #1#2#3
{\ctex_patch_cmd_once:NnnnTF #1{}{#2}{#3}{}{\ctex_patch_failure:N #1}}
\cs_new_protected:Npn \__appto_cmd:Nn #1#2
@@ -27,13 +29,6 @@
\bool_set_false:N \l__paper_bfive_bool
\bool_set_true:N \l__paper_afour_bool
\bool_set_true:N \l__page_twoside_bool
-\bool_new:N \l__thmbox_bool
-\bool_new:N \l__capdash_bool
-\bool_new:N \l__multoc_bool
-\bool_new:N \l__chap_withpart_bool
-\bool_new:N \l__foot_perpart_bool
-\bool_new:N \l__foot_perpage_bool
-\clist_new:N \g__hyperref_clist
\clist_new:N \g__options_clist
\keys_define:nn {easybook}
@@ -47,36 +42,36 @@
font .choice:,
font/adobe .code:n =
{
- \PassOptionsToClass{fontset = #1}{ctexbook}
+ \__put_ctexbook:n {fontset = #1}
\bool_set_false:N \l__myfont_bool
},
font/founder .code:n =
{
- \PassOptionsToClass{fontset = #1}{ctexbook}
+ \__put_ctexbook:n {fontset = #1}
\bool_set_false:N \l__myfont_bool
},
font/mac .code:n =
{
- \PassOptionsToClass{fontset = #1}{ctexbook}
+ \__put_ctexbook:n {fontset = #1}
\bool_set_false:N \l__myfont_bool
},
font/windows .code:n =
{
- \PassOptionsToClass{fontset = #1}{ctexbook}
+ \__put_ctexbook:n {fontset = #1}
\bool_set_false:N \l__myfont_bool
},
font/linux .code:n =
{
- \PassOptionsToClass{fontset = ubuntu}{ctexbook}
+ \__put_ctexbook:n {fontset = ubuntu}
\bool_set_false:N \l__myfont_bool
},
font/overleaf .code:n =
{\bool_set_false:N \l__myfont_bool},
font/none .code:n =
{
- \PassOptionsToClass{fontset = #1}{ctexbook}
+ \__put_ctexbook:n {fontset = #1}
\bool_set_false:N \l__myfont_bool
- },
+ },
font .default:n = windows,
paper .choice:,
@@ -95,7 +90,7 @@
\ProcessKeysOptions{easybook}
-\bool_if:NT \l__myfont_bool{\PassOptionsToClass{fontset = none}{ctexbook}}
+\bool_if:NT \l__myfont_bool{\__put_ctexbook:n {fontset = none}}
\bool_if:NT \l__enstyle_bool
{
\bool_set_false:N \l__lang_chinese_bool
@@ -103,25 +98,35 @@
\bool_set_true:N \l__newline_bool
}
\bool_if:NTF \l__lang_chinese_bool
- {\PassOptionsToClass{scheme = chinese}{ctexbook}}
- {\PassOptionsToClass{scheme = plain}{ctexbook}}
+ {\__put_ctexbook:n {scheme = chinese}}
+ {\__put_ctexbook:n {scheme = plain}}
-\PassOptionsToClass{\g__options_clist}{ctexbook}
+\__put_ctexbook:n {\g__options_clist}
\PassOptionsToPackage{CJKmath = true}{xeCJK}
\LoadClass[UTF8]{ctexbook}
-\tl_new:N \g__keys_color_tl
-\tl_new:N \g__keys_cite_tl
-\fp_new:N \g__line_spread_fp
-\fp_new:N \g__tab_spread_fp
-\tl_new:N \g__math_spread_tl
-\tl_new:N \g__cap_spread_tl
-\tl_new:N \g__foot_spread_tl
-\tl_new:N \g__tab_font_tl
-\tl_new:N \g__fig_font_tl
-\tl_new:N \g__lst_font_tl
-\tl_new:N \g__foot_font_tl
-\tl_new:N \g__margin_font_tl
+\bool_set_true:N \l__backend_bibtex_bool
+\clist_new:N \l__hyperref_clist
+\bool_new:N \l__thmbox_bool
+\bool_new:N \l__capdash_bool
+\bool_new:N \l__multoc_bool
+\bool_new:N \l__chap_withpart_bool
+\bool_new:N \l__foot_perpart_bool
+\bool_new:N \l__foot_perpage_bool
+\fp_new:N \l__line_spread_fp
+\fp_new:N \l__tab_spread_fp
+\tl_new:N \l__math_spread_tl
+\tl_new:N \l__cap_spread_tl
+\tl_new:N \l__foot_spread_tl
+\tl_new:N \l__tab_font_tl
+\tl_new:N \l__fig_font_tl
+\tl_new:N \l__lst_font_tl
+\tl_new:N \l__foot_font_tl
+\tl_new:N \l__margin_font_tl
+\tl_new:N \l__bib_mysty_tl
+\tl_new:N \l__bib_style_tl
+\tl_new:N \l__bib_citesty_tl
+\tl_new:N \l__bib_file_tl
\tl_new:N \g__config_tl
\ctex_define:n
@@ -130,13 +135,9 @@
link .meta:nn = {ctex/link}{#1},
spread .meta:nn = {ctex/spread}{#1},
elfont .meta:nn = {ctex/elfont}{#1},
+ bibset .meta:nn = {ctex/bibset}{#1},
config .tl_set:N = \g__config_tl,
- style/cite .choices:nn =
- {number,authoryear}
- {\tl_set_eq:NN \g__keys_cite_tl\l_keys_choice_tl},
- style/cite .initial:n = number,
-
style/thmbox .bool_set:N = \l__thmbox_bool,
style/thmbox .default:n = true,
style/thmbox .initial:n = false,
@@ -156,30 +157,54 @@
style/perpage .default:n = true,
style/perpage .initial:n = false,
- spread/linespread .fp_set:N = \g__line_spread_fp,
+ spread/linespread .fp_set:N = \l__line_spread_fp,
spread/linespread .initial:n = 1.3,
- spread/tabspread .fp_set:N = \g__tab_spread_fp,
+ spread/tabspread .fp_set:N = \l__tab_spread_fp,
spread/tabspread .initial:n = 1,
- spread/mathspread .tl_set:N = \g__math_spread_tl,
+ spread/mathspread .tl_set:N = \l__math_spread_tl,
spread/mathspread .initial:n = 1,
- spread/capspread .tl_set:N = \g__cap_spread_tl,
+ spread/capspread .tl_set:N = \l__cap_spread_tl,
spread/capspread .initial:n = 1,
- spread/fnspread .tl_set:N = \g__foot_spread_tl,
+ spread/fnspread .tl_set:N = \l__foot_spread_tl,
spread/fnspread .initial:n = 1,
- elfont/tabfont .tl_set:N = \g__tab_font_tl,
+ elfont/tabfont .tl_set:N = \l__tab_font_tl,
elfont/tabfont .initial:n = \sffamily\small,
- elfont/figfont .tl_set:N = \g__fig_font_tl,
+ elfont/figfont .tl_set:N = \l__fig_font_tl,
elfont/figfont .initial:n = \sffamily\small,
- elfont/lstfont .tl_set:N = \g__lst_font_tl,
+ elfont/lstfont .tl_set:N = \l__lst_font_tl,
elfont/lstfont .initial:n = \sffamily\small,
- elfont/fnfont .tl_set:N = \g__foot_font_tl,
+ elfont/fnfont .tl_set:N = \l__foot_font_tl,
elfont/fnfont .initial:n = \rmfamily,
- elfont/marfont .tl_set:N = \g__margin_font_tl,
+ elfont/marfont .tl_set:N = \l__margin_font_tl,
elfont/marfont .initial:n = \rmfamily\footnotesize,
- lstlistlistingname .tl_set:N = \lstlistlistingname,
- lstlistingname .tl_set:N = \lstlistingname
+ bibset/backend .choice:,
+ bibset/backend/bibtex .code:n = {},
+ bibset/backend/biblatex .code:n =
+ {\bool_set_false:N \l__backend_bibtex_bool},
+ bibset/bibstyle .choice:,
+ bibset/bibstyle .value_required:n = true,
+ bibset/bibstyle/number .code:n =
+ {
+ \tl_set:Nn \l__bib_style_tl{number}
+ \tl_clear:N \l__bib_mysty_tl
+ },
+ bibset/bibstyle/authoryear .code:n =
+ {
+ \tl_set:Nn \l__bib_style_tl{authoryear}
+ \tl_clear:N \l__bib_mysty_tl
+ },
+ bibset/bibstyle/unknown .code:n =
+ {\tl_set_eq:NN \l__bib_mysty_tl\l_keys_value_tl},
+ bibset/bibstyle .initial:n = number,
+ bibset/citestyle .code:n =
+ {\tl_set:Nn \l__bib_citesty_tl{#1}},
+ bibset/bibfile .tl_set:N = \l__bib_file_tl,
+ bibset/bibfile .initial:n = ref/refs.bib,
+
+ lstlistlistingname .tl_set:N = \lstlistlistingname,
+ lstlistingname .tl_set:N = \lstlistingname
}
\RequirePackage[svgnames]{xcolor}
@@ -197,8 +222,9 @@
\RequirePackage{hologo}
\hologoSetup{discretionarybreak = true}
\RequirePackage{rotfloat}
-\RequirePackage{geometry,marginnote,nccfoots,tablefootnote}
-\RequirePackage{fancyhdr,titletoc}
+\RequirePackage{geometry,marginnote,changepage}
+\RequirePackage{nccfoots,tablefootnote}
+\RequirePackage{fancyhdr,fancybox,titletoc}
\RequirePackage{caption,bicaption,subcaption}
\RequirePackage{graphicx,wrapfig}
\RequirePackage{zhlipsum,fontawesome,pifont}
@@ -206,7 +232,6 @@
\RequirePackage{paralist,tasks}
\RequirePackage[shortlabels,inline]{enumitem}
\RequirePackage[most]{tcolorbox}
-\RequirePackage[sort&compress]{gbt7714}
\RequirePackage[xindy]{imakeidx}
\RequirePackage[
lang = {chinese-utf8},
@@ -412,7 +437,7 @@
\fancyfoot[C]{\color{ctex@frame}\thepage}
\fancypagestyle{plain}
{
- \fancyhf{}\cs_gset:Npn \headrule{}
+ \fancyhf{}\cs_set:Npn \headrule{}
\fancyfoot[C]{\color{ctex@frame}\thepage}
}
}
@@ -488,12 +513,22 @@
{\thelstlisting\hspace{\ccwd}\lst@@caption}
}
-\cs_new_protected:Npn \__header_mark:n #1
+\cs_new_protected:Npn \__markboth:n #1
{
- \chapter*{\phantomsection#1}
\bool_if:NTF \l__page_twoside_bool
- {\markboth{\MakeUppercase#1}{\MakeUppercase#1}}
- {\markboth{\MakeUppercase#1}{}}
+ {\markboth{\MakeUppercase#1}{\MakeUppercase#1}}
+ {\markboth{\MakeUppercase#1}{}}
+ }
+\cs_new_protected:Npn \__title_mark_intoc:n #1
+ {
+ \chapter*{\phantomsection#1}
+ \CTEX@addtocline{chapter}{#1}
+ \__markboth:n #1
+ }
+\cs_new_protected:Npn \__title_mark:n #1
+ {
+ \chapter*{\phantomsection#1}
+ \__markboth:n #1
}
\cs_gset:Npn \tableofcontents
{
@@ -504,7 +539,7 @@
\@restonecolfalse
\bool_if:NT \l__multoc_bool{\twocolumn}
\fi
- \__header_mark:n {\contentsname}
+ \__title_mark:n {\contentsname}
\vspace*{-1pc}
\@starttoc{toc}
\if@restonecol
@@ -522,8 +557,7 @@
\@restonecolfalse
\bool_if:NT \l__multoc_bool{\twocolumn}
\fi
- \__header_mark:n {\listfigurename}
- \CTEX@addtocline{chapter}{\listfigurename}
+ \__title_mark_intoc:n {\listfigurename}
\vspace*{-1pc}
\@starttoc{lof}
\if@restonecol
@@ -541,8 +575,7 @@
\@restonecolfalse
\bool_if:NT \l__multoc_bool{\twocolumn}
\fi
- \__header_mark:n {\listtablename}
- \CTEX@addtocline{chapter}{\listtablename}
+ \__title_mark_intoc:n {\listtablename}
\vspace*{-1pc}
\@starttoc{lot}
\if@restonecol
@@ -564,8 +597,7 @@
\bool_if:NT \l__multoc_bool{\twocolumn}
\fi
}
- \__header_mark:n {\lstlistlistingname}
- \CTEX@addtocline{chapter}{\lstlistlistingname}
+ \__title_mark_intoc:n {\lstlistlistingname}
\vspace*{-0.2pc}
\@starttoc{lol}
\@ifundefined{@restonecoltrue}{}
@@ -579,18 +611,6 @@
\group_end:
}
-\cs_gset:Npn \bibsection{\chapter{\bibname}}
-\skip_set:Nn \bibsep{0ex}
-\cs_new_protected:Npn \__load_cite_number:
- {
- \setcitestyle{square,comma,super}
- \bibliographystyle{gbt7714-numerical}
- }
-\cs_new_protected:Nn \__load_cite_authoryear:
- {\bibliographystyle{gbt7714-author-year}}
-\cs_new_protected:Nn \__load_cite:
- {\use:c {__load_cite_ \g__keys_cite_tl :}}
-\ctex_at_end_preamble:n {\__load_cite:}
\makeindex[
intoc,
options = -M~texindy~-C~utf8,
@@ -606,17 +626,13 @@
}
\__patch_cmd:Nnn \imki@indexheaders
{\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}}
- {
- \bool_if:NTF \l__page_twoside_bool
- {\markboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}}
- {\markboth{\MakeUppercase\indexname}{}}
- }
+ {\__markboth:n \indexname}
\DeclareCaptionLabelSeparator{ccwd}{\hspace{\ccwd}}
\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{~}(#2)}
-\DeclareCaptionFont{tabfont}{\g__tab_font_tl}
-\DeclareCaptionFont{figfont}{\g__fig_font_tl}
-\DeclareCaptionFont{lstfont}{\g__lst_font_tl}
+\DeclareCaptionFont{tabfont}{\l__tab_font_tl}
+\DeclareCaptionFont{figfont}{\l__fig_font_tl}
+\DeclareCaptionFont{lstfont}{\l__lst_font_tl}
\captionsetup
{
format = hang,
@@ -628,12 +644,12 @@
\captionsetup[table]
{
labelfont = {tabfont,color = ctex@frame},
- textfont = {tabfont,stretch = \g__cap_spread_tl}
+ textfont = {tabfont,stretch = \l__cap_spread_tl}
}
\captionsetup[figure]
{
labelfont = {figfont,color = ctex@frame},
- textfont = {figfont,stretch = \g__cap_spread_tl}
+ textfont = {figfont,stretch = \l__cap_spread_tl}
}
\captionsetup[subfigure]
{
@@ -644,7 +660,7 @@
{
singlelinecheck = false,
labelfont = {lstfont,color = ctex@frame},
- textfont = {lstfont,stretch = \g__cap_spread_tl}
+ textfont = {lstfont,stretch = \l__cap_spread_tl}
}
\captionsetup[figure][bi-second]{name = Figure}
\captionsetup[table][bi-second]{name = Table}
@@ -659,9 +675,9 @@
}
}
\AtBeginEnvironment{tabularx}
- {\exp_args:Nx \linespread{\fp_use:N \g__tab_spread_fp}\selectfont\ignorespaces}
+ {\exp_args:Nx \linespread{\fp_use:N \l__tab_spread_fp}\selectfont\ignorespaces}
\AtBeginEnvironment{tabular}
- {\exp_args:Nx \linespread{\fp_use:N \g__tab_spread_fp}\selectfont\ignorespaces}
+ {\exp_args:Nx \linespread{\fp_use:N \l__tab_spread_fp}\selectfont\ignorespaces}
\skip_set:Nn \parskip{0pt plus 2pt minus 1pt}
\skip_set:Nn \floatsep{12pt plus 2pt minus 2pt}
@@ -677,7 +693,7 @@
\cs_gset:Npn \bottomfraction{0.65}
\cs_gset:Npn \floatpagefraction{0.60}
\ctex_after_end_preamble:n
- {\exp_args:Nx \linespread{\fp_use:N \g__line_spread_fp}\selectfont}
+ {\exp_args:Nx \linespread{\fp_use:N \l__line_spread_fp}\selectfont}
\newcolumntype{L}{X}
\newcolumntype{C}{>{\centering\arraybackslash}X}
@@ -803,7 +819,7 @@
}
\allowdisplaybreaks[4]
\cs_gset:Npn \ULthickness{.75pt}
-\SetMathEnvironmentSinglespace{\g__math_spread_tl}
+\SetMathEnvironmentSinglespace{\l__math_spread_tl}
\skip_set:Nn \jot{4pt plus 1pt minus 1pt}
\ctex_after_end_preamble:n
{
@@ -924,6 +940,64 @@
colback = #1!15!white,#2
}{#3}
+\cs_new_protected:Npn \__bibtex_set:
+ {
+ \tl_if_empty:NTF \l__bib_mysty_tl
+ {
+ \tl_if_eq:VnTF \l__bib_style_tl{numerber}
+ {
+ \bibliographystyle{gbt7714-numerical}
+ }{
+ \tl_if_eq:VnT \l__bib_style_tl{authoryear}
+ {\bibliographystyle{gbt7714-author-year}}
+ \cs_set_eq:NN \cite\citep
+ }
+ }{
+ \exp_args:NV \bibliographystyle\l__bib_mysty_tl
+ }
+ \cs_set:Npn \bibsection{\__title_mark_intoc:n \bibname}
+ \skip_set:Nn \bibsep{0ex}
+ \NewDocumentCommand\printbibliography{o}
+ {\exp_args:NV \bibliography\l__bib_file_tl}
+ }
+\cs_new_protected:Npn \__put_biblatex:n #1
+ {\PassOptionsToPackage{#1}{biblatex}}
+\cs_new_protected:Npn \__biblatex_pre_set:
+ {
+ \tl_if_empty:NTF \l__bib_mysty_tl
+ {
+ \tl_if_eq:VnTF \l__bib_style_tl{number}
+ {
+ \__put_biblatex:n {style = gb7714-2015}
+ }{
+ \tl_if_eq:VnT \l__bib_style_tl{authoryear}
+ {\__put_biblatex:n {style = gb7714-2015ay}}
+ }
+ }{
+ \__put_biblatex:n {style = \l__bib_mysty_tl}
+ }
+ \tl_if_empty:NF \l__bib_citesty_tl
+ {\__put_biblatex:n {citestyle = \l__bib_mysty_tl}}
+ \__put_biblatex:n {backend = biber}
+ }
+\cs_new_protected:Npn \__biblatex_after_set:
+ {
+ \exp_args:NV \addbibresource\l__bib_file_tl
+ \defbibheading{bibliography}[\bibname]{\__title_mark_intoc:n {##1}}
+ }
+\ctex_at_end_preamble:n
+ {
+ \bool_if:NTF \l__backend_bibtex_bool
+ {
+ \RequirePackage[sort&compress]{gbt7714}
+ \__bibtex_set:
+ }{
+ \__biblatex_pre_set:
+ \RequirePackage{biblatex}
+ \__biblatex_after_set:
+ }
+ }
+
\skip_set:Nn \footnotemargin{0.5\ccwd}
\skip_set:Nn \footnotesep{0ex}
\cs_gset:Npn \hangfootparskip{0ex}
@@ -951,13 +1025,13 @@
}
\__patch_cmd:Nnn \@footnotetext
{\def\baselinestretch{\ZhLS@footlinespread}\reset@font}
- {\def\baselinestretch{\g__foot_spread_tl}\g__foot_font_tl}
+ {\def\baselinestretch{\l__foot_spread_tl}\l__foot_font_tl}
\__patch_cmd:Nnn \@mpfootnotetext
{\def\baselinestretch{\ZhLS@footlinespread}\reset@font}
- {\def\baselinestretch{\g__foot_spread_tl}\g__foot_font_tl}
+ {\def\baselinestretch{\l__foot_spread_tl}\l__foot_font_tl}
\__patch_cmd:Nnn \@makefnmark
- {\normalfont}{\g__foot_font_tl}
-\cs_gset:Npn \marginfont{\g__margin_font_tl}
+ {\normalfont}{\l__foot_font_tl}
+\cs_gset:Npn \marginfont{\l__margin_font_tl}
\lstdefinestyle{mystyle}
{
@@ -975,7 +1049,7 @@
emphstyle = \color{ctex@emph},
emph =
{
- caption,config,easybook,elfont,linktopage,subcaption,tabularx,thmtools
+ bibset,bibtex,biber,caption,config,easybook,elfont,linktopage,subcaption,tabularx,thmtools
},
keywordstyle = \lst@ifdisplaystyle\bfseries\color{ctex@emph}\else\color{ctex@verb}\fi,
morekeywords =
@@ -1002,7 +1076,7 @@
\AtBeginEnvironment{verbatim}{\microtypesetup{activate=false}}
\cs_new_protected:Npn \__clist_put_hyperref:n #1
- {\clist_gput_right:Nn \g__hyperref_clist{#1}}
+ {\clist_put_right:Nn \l__hyperref_clist{#1}}
\cs_new_protected:Npn \__define_linkcolor:nnn #1#2#3
{\definecolorset{HTML}{ctex@}{}{link,#1;url,#2;cite,#3}}
\cs_new_protected:Npn \__define_themecolor:nnn #1#2#3
@@ -1091,7 +1165,7 @@
\RequirePackage[pdfstartview = FitH,bookmarksnumbered]{hyperref}
\RequirePackage{cleveref}
\urlstyle{same}
- \exp_args:NV \hypersetup\g__hyperref_clist
+ \exp_args:NV \hypersetup\l__hyperref_clist
\__allow_urlbreak:
\bool_if:NTF \l__lang_chinese_bool
diff --git a/macros/latex/contrib/orientation/README b/macros/latex/contrib/orientation/README
new file mode 100644
index 0000000000..c9652c9cb4
--- /dev/null
+++ b/macros/latex/contrib/orientation/README
@@ -0,0 +1,33 @@
+orientation 1.0 (January 10, 2021)
+Set page orientation for dvips/Ghostscript
+Daniel Benjamin Miller <dbmiller@dbmiller.org>
+
+When using dvips with Ghostscript, the various PDF auto-rotation modes may
+sometimes need some tweaking. Using the auto-rotation feature of Ghostscript
+may suffice in most cases: it sets the orientation of the pages of the PDF
+according to text direction (either per-page or for the whole document).
+
+But sometimes we don't want this. For instance, Ghostscript may not obey
+the orientation set by geometry or other packages.
+
+We have eight commands available, in two categories.
+
+These commands orient the current page and all following pages:
+
+* \setportrait
+* \setlandscape
+* \setupsidedown
+* \setcounterlandscape
+
+These commands orient the current page only:
+
+* \thispageportrait
+* \thispagelandscape
+* \thispageupsidedown
+* \thispagecounterlandscape
+
+If you don't process your file with dvips and Ghostscript/ps2pdf, then don't
+expect any of these commands to do anything.
+
+Made available under the CC-Zero Dedication, 2021
+For more info: https://creativecommons.org/publicdomain/zero/1.0/
diff --git a/macros/latex/contrib/orientation/orientation.sty b/macros/latex/contrib/orientation/orientation.sty
new file mode 100644
index 0000000000..e5f47922ba
--- /dev/null
+++ b/macros/latex/contrib/orientation/orientation.sty
@@ -0,0 +1,15 @@
+\ProvidesPackage{orientation}[orientation 1.0]
+% orientation package by Daniel Benjamin Miller <dbmiller@dbmiller.org>
+% Made available under the CC-Zero Dedication, 2021
+% For more info: https://creativecommons.org/publicdomain/zero/1.0/
+\RequirePackage{everypage}
+\makeatletter
+\newcommand{\thispagelandscape}{\special{ps:[{ThisPage} <</Rotate 90>> /PUT pdfmark true}}
+\newcommand{\thispageupsidedown}{\special{ps:[{ThisPage} <</Rotate 180>> /PUT pdfmark true}}
+\newcommand{\thispagecounterlandscape}{\special{ps:[{ThisPage} <</Rotate 270>> /PUT pdfmark true}}
+\newcommand{\thispageportrait}{\special{ps:[{ThisPage} <</Rotate 0>> /PUT pdfmark true}}
+\newcommand{\setlandscape}{\AddEverypageHook{\special{ps:[{ThisPage} <</Rotate 90>> /PUT pdfmark true}}}
+\newcommand{\setcounterlandscape}{\AddEverypageHook{\special{ps:[{ThisPage} <</Rotate 270>> /PUT pdfmark true}}}
+\newcommand{\setupsidedown}{\AddEverypageHook{\special{ps:[{ThisPage} <</Rotate 180>> /PUT pdfmark true}}}
+\newcommand{\setportrait}{\AddEverypageHook{\special{ps:[{ThisPage} <</Rotate 0>> /PUT pdfmark true}}}
+\endinput \ No newline at end of file