texlive[73594] Master/texmf-dist: easybook (25jan25)
commits+karl at tug.org
commits+karl at tug.org
Sat Jan 25 21:48:18 CET 2025
Revision: 73594
https://tug.org/svn/texlive?view=revision&revision=73594
Author: karl
Date: 2025-01-25 21:48:17 +0100 (Sat, 25 Jan 2025)
Log Message:
-----------
easybook (25jan25)
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 2025-01-25 20:48:06 UTC (rev 73593)
+++ trunk/Master/texmf-dist/doc/latex/easybook/README.md 2025-01-25 20:48:17 UTC (rev 73594)
@@ -1,5 +1,5 @@
# The `easybook` document class
-Easily typesetting Chinese theses or books (v2025c)
+Easily typesetting Chinese theses or books (v2025e)
## 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 2025-01-25 20:48:06 UTC (rev 73593)
+++ trunk/Master/texmf-dist/doc/latex/easybook/easybook.tex 2025-01-25 20:48:17 UTC (rev 73594)
@@ -23,8 +23,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v2025d,
- date = 2025/01/24,
+ version = v2025e,
+ date = 2025/01/25,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi at 163.com,
@@ -998,6 +998,17 @@
figure/tocline = \protect\numberline{图\thefigure\hspace{1em}}#2
}
\end{ctexexam}
+ \command{RegisterCapIfname}[\oarg{文件名}\marg{扩展名列表}]\newtagv{2025e}%
+ 给 \pkg*{caption} 宏包支持的题注注册目录选项中 \cs{CTEXifname} 命令的编号判断功能,判断的依据是题注标签格式 \option{labelformat} 是否为空。\meta{文件名} 为题注目录文件的名字,默认为 \code{\string\jobname}。
+ \begin{ctexexam}
+ \RegisterCapIfname{loa}
+ \bgroup
+ \captionsetup{labelformat = empty} % 局部取消标签
+ \captionof{algorithm}{算法标题1}
+ \egroup
+ \addtocounter{algorithm}{-1} % 恢复连续编号
+ \captionof{algorithm}{算法标题2}
+ \end{ctexexam}
\command{contentsmargin}[\oarg{修正距离}\marg{右边距}]
设置目录中引导线到版心右边的距离,用于条目页码的精细调整。当设计条目页码对齐方式或数字较大时,可以设置适当的 \meta{右边距}。\meta{修正距离} 是在过长而换行的标题右侧 \meta{右边距} 基础上附加的距离。此命令可在导言区全局使用或在 \option{tocformat} 选项给特定条目类型单独使用。
\keychoice{hang}{\fbox{true},false}
Modified: trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx 2025-01-25 20:48:06 UTC (rev 73593)
+++ trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx 2025-01-25 20:48:17 UTC (rev 73594)
@@ -14,7 +14,7 @@
% This work has the LPPL maintenance status `maintained'.
%<class|package>\NeedsTeXFormat{LaTeX2e}[2021/11/15]
%<*class>
-\ProvidesExplClass{easybook}{2025/01/24}{2025d}
+\ProvidesExplClass{easybook}{2025/01/25}{2025e}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
@@ -308,7 +308,7 @@
%</class>
%<*package>
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2025/01/24}{2025d}
+\ProvidesExplPackage{easybase}{2025/01/25}{2025e}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1664,12 +1664,18 @@
}
\cs_new:Npn \listnumberline #1
{
- \protect\numberline
+ \capifname
{
- \exp_args:Nnv
- \use:c { p@#1 } { the#1 }
- }
+ \protect\numberline
+ {
+ \exp_args:Nnv
+ \use:c { p@#1 } { the#1 }
+ }
+ }{}
}
+\cs_generate_variant:Nn \tl_if_blank:nTF { f }
+\cs_new:Npn \capifname #1#2
+ { \tl_if_blank:fTF { \caption at labelformat{p1}{p2} } {#2} {#1} }
\cs_new_protected:Npn \DeclareFloatList #1#2
{
\exp_args:Nc \DeclareDocumentCommand { listof#1s }{st++o}
@@ -1982,27 +1988,31 @@
}
\AssignPartialExt{lol}{pll}
-\cs_new_protected:Npn \RegisterTitleIfname #1
+\cs_generate_variant:Nn \str_if_eq:nnT { x }
+\NewDocumentCommand{\RegisterTitleIfname}{O{\jobname}mm}
{
- \clist_map_function:nN {#1}
- \eb at register@title at ifname
+ \clist_map_inline:nn {#2}
+ { \eb at register@title at ifname{#1}{##1}{#3} }
}
-\cs_new_protected:Npn \eb at register@title at ifname #1
+\cs_new_protected:Npn \eb at register@title at ifname #1#2#3
{
- \AddToHookWithArguments{cmd/addcontentsline/before}[title/ifname/#1]
+ \AddToHookWithArguments{cmd/addcontentsline/before}[title/ifname/#2]
{
- \str_if_eq:nnT {##1} {#1}
+ \str_if_eq:xnT {##1} {#2}
{
\addtocontents{##1}
- {\CTEXifname{\CTEX at ifnametrue}{\CTEX at ifnamefalse}}
+ {#3{\CTEX at ifnametrue}{\CTEX at ifnamefalse}}
}
}
- \AddToHook{file/\jobname.#1/before}
+ \AddToHook{file/#1.#2/before}
{\cs_set_eq:NN \eb at title@ifname at resume \CTEXifname}
- \AddToHook{file/\jobname.#1/after}
+ \AddToHook{file/#1.#2/after}
{\cs_set_eq:NN \CTEXifname \eb at title@ifname at resume}
}
-\RegisterTitleIfname{toc}
+\NewDocumentCommand{\RegisterCapIfname}{O{\jobname}m}
+ {\RegisterTitleIfname[#1]{#2}{\capifname}}
+\RegisterTitleIfname{toc}{\CTEXifname}
+\RegisterCapIfname{lot,lof,lol,loe}
\cs_new_protected:Npn \SetTocStyle #1#2#3
{
@@ -3019,7 +3029,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2025/01/24}{2025d}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2025/01/25}{2025e}
{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 2025-01-25 20:48:06 UTC (rev 73593)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty 2025-01-25 20:48:17 UTC (rev 73594)
@@ -20,7 +20,7 @@
%% This work has the LPPL maintenance status `maintained'.
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2025/01/24}{2025d}
+\ProvidesExplPackage{easybase}{2025/01/25}{2025e}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1376,12 +1376,18 @@
}
\cs_new:Npn \listnumberline #1
{
- \protect\numberline
+ \capifname
{
- \exp_args:Nnv
- \use:c { p@#1 } { the#1 }
- }
+ \protect\numberline
+ {
+ \exp_args:Nnv
+ \use:c { p@#1 } { the#1 }
+ }
+ }{}
}
+\cs_generate_variant:Nn \tl_if_blank:nTF { f }
+\cs_new:Npn \capifname #1#2
+ { \tl_if_blank:fTF { \caption at labelformat{p1}{p2} } {#2} {#1} }
\cs_new_protected:Npn \DeclareFloatList #1#2
{
\exp_args:Nc \DeclareDocumentCommand { listof#1s }{st++o}
@@ -1694,27 +1700,31 @@
}
\AssignPartialExt{lol}{pll}
-\cs_new_protected:Npn \RegisterTitleIfname #1
+\cs_generate_variant:Nn \str_if_eq:nnT { x }
+\NewDocumentCommand{\RegisterTitleIfname}{O{\jobname}mm}
{
- \clist_map_function:nN {#1}
- \eb at register@title at ifname
+ \clist_map_inline:nn {#2}
+ { \eb at register@title at ifname{#1}{##1}{#3} }
}
-\cs_new_protected:Npn \eb at register@title at ifname #1
+\cs_new_protected:Npn \eb at register@title at ifname #1#2#3
{
- \AddToHookWithArguments{cmd/addcontentsline/before}[title/ifname/#1]
+ \AddToHookWithArguments{cmd/addcontentsline/before}[title/ifname/#2]
{
- \str_if_eq:nnT {##1} {#1}
+ \str_if_eq:xnT {##1} {#2}
{
\addtocontents{##1}
- {\CTEXifname{\CTEX at ifnametrue}{\CTEX at ifnamefalse}}
+ {#3{\CTEX at ifnametrue}{\CTEX at ifnamefalse}}
}
}
- \AddToHook{file/\jobname.#1/before}
+ \AddToHook{file/#1.#2/before}
{\cs_set_eq:NN \eb at title@ifname at resume \CTEXifname}
- \AddToHook{file/\jobname.#1/after}
+ \AddToHook{file/#1.#2/after}
{\cs_set_eq:NN \CTEXifname \eb at title@ifname at resume}
}
-\RegisterTitleIfname{toc}
+\NewDocumentCommand{\RegisterCapIfname}{O{\jobname}m}
+ {\RegisterTitleIfname[#1]{#2}{\capifname}}
+\RegisterTitleIfname{toc}{\CTEXifname}
+\RegisterCapIfname{lot,lof,lol,loe}
\cs_new_protected:Npn \SetTocStyle #1#2#3
{
Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls 2025-01-25 20:48:06 UTC (rev 73593)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls 2025-01-25 20:48:17 UTC (rev 73594)
@@ -19,7 +19,7 @@
%%
%% This work has the LPPL maintenance status `maintained'.
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
-\ProvidesExplClass{easybook}{2025/01/24}{2025d}
+\ProvidesExplClass{easybook}{2025/01/25}{2025e}
{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 2025-01-25 20:48:06 UTC (rev 73593)
+++ trunk/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg 2025-01-25 20:48:17 UTC (rev 73594)
@@ -18,7 +18,7 @@
%% LaTeX version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
-\ProvidesExplFile{eb-tcolorbox.cfg}{2025/01/24}{2025d}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2025/01/25}{2025e}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
More information about the tex-live-commits
mailing list.