texlive[72448] Master/texmf-dist: easybook (2oct24)
commits+karl at tug.org
commits+karl at tug.org
Wed Oct 2 22:10:40 CEST 2024
Revision: 72448
https://tug.org/svn/texlive?view=revision&revision=72448
Author: karl
Date: 2024-10-02 22:10:39 +0200 (Wed, 02 Oct 2024)
Log Message:
-----------
easybook (2oct24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/easybook/README.md
trunk/Master/texmf-dist/doc/latex/easybook/easybook.pdf
trunk/Master/texmf-dist/doc/latex/easybook/easybook.tex
trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx
trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty
trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
trunk/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg
Modified: trunk/Master/texmf-dist/doc/latex/easybook/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easybook/README.md 2024-10-01 23:41:30 UTC (rev 72447)
+++ trunk/Master/texmf-dist/doc/latex/easybook/README.md 2024-10-02 20:10:39 UTC (rev 72448)
@@ -1,5 +1,5 @@
# The `easybook` document class
-Easily typesetting Chinese theses or books (v2024eb)
+Easily typesetting Chinese theses or books (v2024ed)
## Abstract
`easybook` is a pure academic template created based on the `ctexbook` book document class. It also has the functions of `book` and `article` document class. Combined with the general framework design of the theses of many universities in China, providing multiple commands and interfaces allows users to easily customize the theses templates. Its basic macro package `easybase` can also be used with `ctex` and standard document classes.
Modified: trunk/Master/texmf-dist/doc/latex/easybook/easybook.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/easybook/easybook.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easybook/easybook.tex 2024-10-01 23:41:30 UTC (rev 72447)
+++ trunk/Master/texmf-dist/doc/latex/easybook/easybook.tex 2024-10-02 20:10:39 UTC (rev 72448)
@@ -23,8 +23,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v2024eb,
- date = 2024/09/30,
+ version = v2024ed,
+ date = 2024/10/02,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi at 163.com,
@@ -548,8 +548,8 @@
\label{subsec:theorem}
定理模块 \module*{thmt} 根据全局选项 \option{theorem} 的设置可以由 \pkg*{thmtools} 或 \pkg*{keytheorems} 宏包提供支持。\pkg*{keytheorems} 宏包使用 \hologo{LaTeX3} 编写,它的定理功能更完善并且提供了 \pkg*{thmtools} 宏包大部分的功能,但发布日期较新(2024年9月)还未被广泛使用,下面主要介绍传统的 \pkg*{thmtools} 宏包的功能。\pkg*{thmtools} 提供了定理环境和样式声明两个命令,文档类未预声明任何定理环境,如果声明定理环境时不指定样式,则使用默认定理样式 \code{default},可以对它重新定义。
\begin{cnltxlist}
- \command{declaretheorem}[\oarg{键值列表1}\marg{环境名}\oarg{键值列表2}]
- \pkg*{thmtools} 的定理环境声明命令。可选参数的 \meta{键值列表1} 与 \meta{键值列表2} 等效,常用的选项如下:
+ \command{declaretheorem}[\oarg{键值列表1}\marg{环境名列表}\oarg{键值列表2}]
+ \pkg*{thmtools} 的定理环境声明命令。\pkg*{thmtools} 宏包中此命令实际相当于 \cs{newtheorem},无法强制创建定理环境,这里修复了这个问题。可选参数的 \meta{键值列表1} 与 \meta{键值列表2} 等效,常用的选项如下:
\keyval{name}{定理名}
定理环境的标题名称,默认为英文首字母大写的环境名。
\keychoice{numbered}{no,\fbox{yes},unless unique}
@@ -570,7 +570,7 @@
\tcolorboxenvironment{lemma}{tc-easyboxi}
\end{ctexexam}
\command{declaretheoremstyle}[\oarg{键值列表1}\marg{定理样式}\oarg{键值列表2}]
- \pkg*{thmtools} 的定理样式声明命令,键值列表支持自身以及定理声明命令 \cs{declaretheorem} 的所有选项。可选参数的 \meta{键值列表1} 与 \meta{键值列表2} 等效,常用的选项如下:
+ \pkg*{thmtools} 的定理样式声明命令,键值列表支持自身以及定理声明命令 \cs{declaretheorem} 的所有选项。为命令增加了可选参数 \meta{键值列表2},与 \meta{键值列表1} 等效,常用的选项如下:
\keyval{headfont}{字体命令}\Default{\cs*{sffamily}}
定理标题部分(包括题注)的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
\keyval{notefont}{字体命令}\Default{\cs*{sffamily}}
@@ -1396,11 +1396,15 @@
\end{cnltxlist}
\subsection{计数器}
-\begin{cnltxlist}[itemsep = 0ex]
- \command{newcounter}[\marg{计数器}\oarg{父计数器}]\default{}
- \command{setcounter}[\marg{计数器}\marg{整数}]\default{}
+\begin{cnltxlist}
+ \command{newcounter}[\marg{计数器}\oarg{父计数器}]
+ 创建一个初始值为0的计数器。若 \meta{计数器} 已经存在则报错,若指定 \meta{父计数器} 则将它加入 \meta{父计数器} 的递增归零清单。
+ \command{declarecounter}[\marg{计数器}\oarg{父计数器}]\newtagv{2024ed}%
+ 创建一个初始值为0的计数器,与 \cs{newcounter} 的区别是若 \meta{计数器} 已经存在仍会强制创建。
+ \command{setcounter}[\marg{计数器}\marg{整数}]
+ 将计数器的值设定为指定值。
\command{stepcounter}[\marg{计数器}]
- 常用的计数器设置命令。命令 \cs{newcounter} 创建一个初始值为0的新计数器。命令 \cs{setcounter} 将计数器的值设定为指定值。命令 \cs{stepcounter} 使计数器的值递增1。
+ 使计数器的值递增1,同时它的递增归零清单中的子计数器值归零。
\command{counterwithin}[\sarg\oarg{格式}\marg{计数器}\oarg{连字符}\marg{父计数器}]
对计数器进行绑定的命令。将 \meta{计数器} 绑定于 \meta{父计数器},即 \meta{父计数器} 的值递增时 \meta{计数器} 的值会归零。输出格式 \cs*{the}\meta{计数器} 被定义为 \cs*{the}\meta{父计数器}\meta{连字符}\meta{格式}\marg{计数器}。\meta{格式} 一般为更改计数器编号形式的命令,默认为 \cs*{arabic}。带有星号参数的命令仅进行绑定不更改输出格式。
\command{counterwithout}[\sarg\oarg{格式}\marg{计数器}\marg{父计数器}]
Modified: trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx 2024-10-01 23:41:30 UTC (rev 72447)
+++ trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx 2024-10-02 20:10:39 UTC (rev 72448)
@@ -14,7 +14,7 @@
% This work has the LPPL maintenance status `maintained'.
%<class|package>\NeedsTeXFormat{LaTeX2e}[2021/11/15]
%<*class>
-\ProvidesExplClass{easybook}{2024/09/30}{2024eb}
+\ProvidesExplClass{easybook}{2024/10/02}{2024ed}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
@@ -301,7 +301,7 @@
%</class>
%<*package>
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2024/09/30}{2024eb}
+\ProvidesExplPackage{easybase}{2024/10/02}{2024ed}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -803,25 +803,14 @@
\UseFntSymbsList{empty}
\cs_set_eq:NN \DefineFntSymbols \SetFntSymbsList
\cs_set_eq:NN \setfntsymbol \UseFntSymbsList
-\cs_new:Npn \eb_int_type_trans:NN #1
- {
- \str_case:nn {#1}
- {
- { A } { \int_to_Alph:n }
- { a } { \int_to_alph:n }
- { 1 } { \int_to_arabic:n }
- { I } { \int_to_Roman:n }
- { i } { \int_to_roman:n }
- { c } { \exp_args:NV \zhnumber }
- { s } { \eb_int_to_symbols:n }
- }
- }
+\tl_new:N \l__eb_fnmarktext_tmpa_tl
+\tl_new:N \l__eb_fnmarktext_tmpb_tl
\cs_new_protected:Npn \eb_fnmarktext_normal_label_set:Nn #1#2
{
- \tl_set:Nn \l__eb_fnmarktext_number_type_tl {#2}
+ \tl_set:Nn \l__eb_fnmarktext_tmpa_tl {#2}
\cs_set:Npx #1
{
- \str_case:VnT \l__eb_fnmarktext_number_type_tl
+ \str_case:VnT \l__eb_fnmarktext_tmpa_tl
{
{ plain }
{ \exp_not:N \int_use:N }
@@ -839,9 +828,24 @@
\cs_set_eq:NN \thedownfootnote \thefootnote
}
\cs_generate_variant:Nn \msg_warning:nnnn { nnnV }
+\cs_new:Npn \eb_footnote_int_trans:n #1
+ {
+ \prop_item:Nn \l__eb_int_trans_cmds_prop {#1}
+ \exp_not:N \c at footnote
+ }
+\prop_set_from_keyval:Nn \l__eb_int_trans_cmds_prop
+ {
+ A = \exp_not:N \int_to_Alph:n,
+ a = \exp_not:N \int_to_alph:n,
+ 1 = \exp_not:N \int_to_arabic:n,
+ I = \exp_not:N \int_to_Roman:n,
+ i = \exp_not:N \int_to_roman:n,
+ c = \exp_not:n { \exp_args:NV \zhnumber },
+ s = \exp_not:N \eb_int_to_symbols:n
+ }
\cs_new_protected:Npn \eb_fnmarktext_short_label_set:Nn #1#2
{
- \tl_set:Nn \l__eb_fnmarktext_short_tokens_tl {#2}
+ \tl_set:Nn \l__eb_fnmarktext_tmpb_tl {#2}
\clist_map_inline:nn
{ A,a,1,I,i,c,s }
{
@@ -848,9 +852,9 @@
\regex_match:nnTF {##1} {#2}
{
\regex_replace_once:nnN {##1}
- { \c{eb_int_type_trans:NN} ##1 \c{c at footnote} }
- \l__eb_fnmarktext_short_tokens_tl
- \cs_set_eq:NN #1 \l__eb_fnmarktext_short_tokens_tl
+ { \c{eb_footnote_int_trans:n}\0 }
+ \l__eb_fnmarktext_tmpb_tl
+ \cs_set:Npx #1 { \l__eb_fnmarktext_tmpb_tl }
\clist_map_break:
}
{
@@ -2338,6 +2342,20 @@
\tl_clear:N \l__eb_eqsymb_intro_tl
\ignorespaces
}
+\cs_new:Npn \eb_tl_exist_noempty:cT #1#2
+ { \tl_if_exist:cT {#1} { \tl_if_empty:cF {#1} {#2} } }
+\cs_new:Npn \eb_undefine_counter:n #1
+ {
+ \cs_undefine:c { c@#1 }
+ \cs_undefine:c { the#1 }
+ \exp_args:Nc \providecommand { c@@ckpt }{}
+ \@removefromreset{#1}{@ckpt}
+ }
+\ProvideDocumentCommand{\declarecounter}{mo}
+ {
+ \eb_undefine_counter:n {#1}
+ \IfValueTF{#2}{\newcounter{#1}[#2]}{\newcounter{#1}}
+ }
\cs_new_protected:Npn \eb_theorem_load_thmtools:
{
\RequirePackage{amsthm,thmtools}
@@ -2347,7 +2365,15 @@
{\eb at declaretheoremstyle@save[##1,##3]{##2}}
\RenewDocumentCommand{\declaretheorem}{+O{}m+O{}}
{
+ \cs_undefine:c {##2}
+ \eb_undefine_counter:n {##2}
+ \eb_tl_exist_noempty:cT { g__eb_thmt_##2_parent_tl }
+ {
+ \exp_args:Nnv \@removefromreset {##2}
+ { g__eb_thmt_##2_parent_tl }
+ }
\eb at declaretheorem@save[style = default,##1,##3]{##2}
+ \tl_gset:cV { g__eb_thmt_##2_parent_tl } \thmt at parent
\settheoremtocline{##2}
{
\listnumberline{##2}
@@ -2373,7 +2399,6 @@
bodyfont = \normalfont,
postheadspace = 1em
]
- \cs_undefine:N \proof
\DeclareFloatList{theorem}{loe}
\AssignPartialExt{loe}{ple}
\eb_preto_cmd:nn { listoftheorems }
@@ -2412,7 +2437,7 @@
\DeclareFloatList{theorem}{thlist}
\AssignPartialExt{thlist}{ple}
}
-\str_case:Vn \l__eb_theorem_support_tl
+\str_case:VnT \l__eb_theorem_support_tl
{
{ thmtools }
{ \eb_theorem_load_thmtools: }
@@ -2419,6 +2444,7 @@
{ keytheorems }
{ \eb_theorem_load_keytheorems: }
}
+ { \cs_undefine:N \proof }
\setchemformula
{
math-scripts = false,
@@ -2845,7 +2871,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/09/30}{2024eb}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/10/02}{2024ed}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty 2024-10-01 23:41:30 UTC (rev 72447)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty 2024-10-02 20:10:39 UTC (rev 72448)
@@ -20,7 +20,7 @@
%% This work has the LPPL maintenance status `maintained'.
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2024/09/30}{2024eb}
+\ProvidesExplPackage{easybase}{2024/10/02}{2024ed}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -522,25 +522,14 @@
\UseFntSymbsList{empty}
\cs_set_eq:NN \DefineFntSymbols \SetFntSymbsList
\cs_set_eq:NN \setfntsymbol \UseFntSymbsList
-\cs_new:Npn \eb_int_type_trans:NN #1
- {
- \str_case:nn {#1}
- {
- { A } { \int_to_Alph:n }
- { a } { \int_to_alph:n }
- { 1 } { \int_to_arabic:n }
- { I } { \int_to_Roman:n }
- { i } { \int_to_roman:n }
- { c } { \exp_args:NV \zhnumber }
- { s } { \eb_int_to_symbols:n }
- }
- }
+\tl_new:N \l__eb_fnmarktext_tmpa_tl
+\tl_new:N \l__eb_fnmarktext_tmpb_tl
\cs_new_protected:Npn \eb_fnmarktext_normal_label_set:Nn #1#2
{
- \tl_set:Nn \l__eb_fnmarktext_number_type_tl {#2}
+ \tl_set:Nn \l__eb_fnmarktext_tmpa_tl {#2}
\cs_set:Npx #1
{
- \str_case:VnT \l__eb_fnmarktext_number_type_tl
+ \str_case:VnT \l__eb_fnmarktext_tmpa_tl
{
{ plain }
{ \exp_not:N \int_use:N }
@@ -558,9 +547,24 @@
\cs_set_eq:NN \thedownfootnote \thefootnote
}
\cs_generate_variant:Nn \msg_warning:nnnn { nnnV }
+\cs_new:Npn \eb_footnote_int_trans:n #1
+ {
+ \prop_item:Nn \l__eb_int_trans_cmds_prop {#1}
+ \exp_not:N \c at footnote
+ }
+\prop_set_from_keyval:Nn \l__eb_int_trans_cmds_prop
+ {
+ A = \exp_not:N \int_to_Alph:n,
+ a = \exp_not:N \int_to_alph:n,
+ 1 = \exp_not:N \int_to_arabic:n,
+ I = \exp_not:N \int_to_Roman:n,
+ i = \exp_not:N \int_to_roman:n,
+ c = \exp_not:n { \exp_args:NV \zhnumber },
+ s = \exp_not:N \eb_int_to_symbols:n
+ }
\cs_new_protected:Npn \eb_fnmarktext_short_label_set:Nn #1#2
{
- \tl_set:Nn \l__eb_fnmarktext_short_tokens_tl {#2}
+ \tl_set:Nn \l__eb_fnmarktext_tmpb_tl {#2}
\clist_map_inline:nn
{ A,a,1,I,i,c,s }
{
@@ -567,9 +571,9 @@
\regex_match:nnTF {##1} {#2}
{
\regex_replace_once:nnN {##1}
- { \c{eb_int_type_trans:NN} ##1 \c{c at footnote} }
- \l__eb_fnmarktext_short_tokens_tl
- \cs_set_eq:NN #1 \l__eb_fnmarktext_short_tokens_tl
+ { \c{eb_footnote_int_trans:n}\0 }
+ \l__eb_fnmarktext_tmpb_tl
+ \cs_set:Npx #1 { \l__eb_fnmarktext_tmpb_tl }
\clist_map_break:
}
{
@@ -2057,6 +2061,20 @@
\tl_clear:N \l__eb_eqsymb_intro_tl
\ignorespaces
}
+\cs_new:Npn \eb_tl_exist_noempty:cT #1#2
+ { \tl_if_exist:cT {#1} { \tl_if_empty:cF {#1} {#2} } }
+\cs_new:Npn \eb_undefine_counter:n #1
+ {
+ \cs_undefine:c { c@#1 }
+ \cs_undefine:c { the#1 }
+ \exp_args:Nc \providecommand { c@@ckpt }{}
+ \@removefromreset{#1}{@ckpt}
+ }
+\ProvideDocumentCommand{\declarecounter}{mo}
+ {
+ \eb_undefine_counter:n {#1}
+ \IfValueTF{#2}{\newcounter{#1}[#2]}{\newcounter{#1}}
+ }
\cs_new_protected:Npn \eb_theorem_load_thmtools:
{
\RequirePackage{amsthm,thmtools}
@@ -2066,7 +2084,15 @@
{\eb at declaretheoremstyle@save[##1,##3]{##2}}
\RenewDocumentCommand{\declaretheorem}{+O{}m+O{}}
{
+ \cs_undefine:c {##2}
+ \eb_undefine_counter:n {##2}
+ \eb_tl_exist_noempty:cT { g__eb_thmt_##2_parent_tl }
+ {
+ \exp_args:Nnv \@removefromreset {##2}
+ { g__eb_thmt_##2_parent_tl }
+ }
\eb at declaretheorem@save[style = default,##1,##3]{##2}
+ \tl_gset:cV { g__eb_thmt_##2_parent_tl } \thmt at parent
\settheoremtocline{##2}
{
\listnumberline{##2}
@@ -2092,7 +2118,6 @@
bodyfont = \normalfont,
postheadspace = 1em
]
- \cs_undefine:N \proof
\DeclareFloatList{theorem}{loe}
\AssignPartialExt{loe}{ple}
\eb_preto_cmd:nn { listoftheorems }
@@ -2131,7 +2156,7 @@
\DeclareFloatList{theorem}{thlist}
\AssignPartialExt{thlist}{ple}
}
-\str_case:Vn \l__eb_theorem_support_tl
+\str_case:VnT \l__eb_theorem_support_tl
{
{ thmtools }
{ \eb_theorem_load_thmtools: }
@@ -2138,6 +2163,7 @@
{ keytheorems }
{ \eb_theorem_load_keytheorems: }
}
+ { \cs_undefine:N \proof }
\setchemformula
{
math-scripts = false,
Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls 2024-10-01 23:41:30 UTC (rev 72447)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls 2024-10-02 20:10:39 UTC (rev 72448)
@@ -19,7 +19,7 @@
%%
%% This work has the LPPL maintenance status `maintained'.
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
-\ProvidesExplClass{easybook}{2024/09/30}{2024eb}
+\ProvidesExplClass{easybook}{2024/10/02}{2024ed}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
Modified: trunk/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg 2024-10-01 23:41:30 UTC (rev 72447)
+++ trunk/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg 2024-10-02 20:10:39 UTC (rev 72448)
@@ -18,7 +18,7 @@
%% LaTeX version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/09/30}{2024eb}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/10/02}{2024ed}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
More information about the tex-live-commits
mailing list.