texlive[73981] Master/texmf-dist: easybook (14feb25)
commits+karl at tug.org
commits+karl at tug.org
Fri Feb 14 23:32:36 CET 2025
Revision: 73981
https://tug.org/svn/texlive?view=revision&revision=73981
Author: karl
Date: 2025-02-14 23:32:36 +0100 (Fri, 14 Feb 2025)
Log Message:
-----------
easybook (14feb25)
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-02-14 22:32:25 UTC (rev 73980)
+++ trunk/Master/texmf-dist/doc/latex/easybook/README.md 2025-02-14 22:32:36 UTC (rev 73981)
@@ -1,5 +1,5 @@
# The `easybook` document class
-Easily typesetting Chinese theses or books (v2025o)
+Easily typesetting Chinese theses or books (v2025p)
## 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-02-14 22:32:25 UTC (rev 73980)
+++ trunk/Master/texmf-dist/doc/latex/easybook/easybook.tex 2025-02-14 22:32:36 UTC (rev 73981)
@@ -23,8 +23,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v2025o,
- date = 2025/02/13,
+ version = v2025p,
+ date = 2025/02/14,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi at 163.com,
@@ -998,8 +998,8 @@
figure/tocline = \protect\numberline{图\thefigure\hspace{1em}}#2
}
\end{ctexexam}
- \command{RegisterCapIfname}[\oarg{文件名}\marg{扩展名列表}]\newtagv{2025f}%
- 给 \pkg*{caption} 宏包支持的题注注册目录选项中 \cs{CTEXifname} 命令的编号判断功能,判断的依据是题注标签格式 \option{labelformat} 是否为空。\meta{文件名} 为题注目录文件的名字,默认为 \code{\string\jobname}。
+ \command{RegisterCapIfname}[\sarg\oarg{文件名}\marg{扩展名列表}]\newtagv[Changed]{2025p}%
+ 给 \pkg*{caption} 宏包支持的题注注册目录选项中 \cs{CTEXifname} 命令的编号判断功能,判断的依据是题注标签格式 \option{labelformat} 是否为空。使用星号参数可以避免重复注册。\meta{文件名} 为题注目录文件的名字,默认为 \code{\string\jobname}。
\begin{ctexexam}
\RegisterCapIfname{loa}
\bgroup
Modified: trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx 2025-02-14 22:32:25 UTC (rev 73980)
+++ trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx 2025-02-14 22:32:36 UTC (rev 73981)
@@ -14,7 +14,7 @@
% This work has the LPPL maintenance status `maintained'.
%<class|package>\NeedsTeXFormat{LaTeX2e}[2021/11/15]
%<*class>
-\ProvidesExplClass{easybook}{2025/02/13}{2025o}
+\ProvidesExplClass{easybook}{2025/02/14}{2025p}
{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/02/13}{2025o}
+\ProvidesExplPackage{easybase}{2025/02/14}{2025p}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1581,9 +1581,9 @@
title .code:n = \eb_assign_toc_title:n {#1},
bilist .code:n =
{
- \tl_gset:Nn \g__eb_bilist_permute_value_tl {#1}
\str_if_eq:nnTF {#1} { mix }
{
+ \tl_gset:Nn \g__eb_bilist_permute_value_tl {#1}
\AddToHook{cmd/CTEX at addtocline/before}[bitoc]
{\addtocontents{toc}{\boolfalse{@bitoc}}}
\AddToHook{cmd/CTEX at addbitocline/before}[bitoc]
@@ -1590,11 +1590,12 @@
{\addtocontents{toc}{\booltrue{@bitoc}}}
}
{
- \IfHookEmptyTF{cmd/CTEX at addtocline/before}{}
+ \tl_if_eq:NnT \g__eb_bilist_permute_value_tl { mix }
{
\RemoveFromHook{cmd/CTEX at addtocline/before}[bitoc]
\RemoveFromHook{cmd/CTEX at addbitocline/before}[bitoc]
}
+ \tl_gset:Nn \g__eb_bilist_permute_value_tl {#1}
}
},
name .tl_set:N = \eb at index@name,
@@ -1962,7 +1963,7 @@
{
\group_begin:
\makeatletter
- \file_if_exist_input:n { \jobname.#1 }
+ \InputIfFileExists{\jobname.#1}{}{}
\UseHookWithArguments{eb/starttoc/end}{1}{#1}
\boolfalse{@nobreak}
\group_end:
@@ -1988,32 +1989,41 @@
\AssignPartialExt{lol}{pll}
\cs_generate_variant:Nn \str_if_eq:nnT { x }
-\NewDocumentCommand{\RegisterTitleIfname}{O{\jobname}mm}
+\NewDocumentCommand{\RegisterTitleIfname}{sO{\jobname}mm}
{
- \clist_map_inline:nn {#2}
- { \eb at register@title at ifname{#1}{##1}{#3} }
+ \clist_map_inline:nn {#3}
+ { \eb at register@title at ifname{#1}{#2}{##1}{#4} }
}
-\cs_new_protected:Npn \eb at register@title at ifname #1#2#3
+\cs_new_protected:Npn \eb_save_file_name:nnn #1#2#3
+ { \str_set:Nn \@real at jobname {#2} }
+\cs_new_protected:Npn \eb at register@title at ifname #1#2#3#4
{
- \tl_if_exist:cF { l__eb_title_ifname_#2_tl }
+ \IfBooleanT{#1}
{
- \AddToHookWithArguments{cmd/addcontentsline/before}[title/ifname/#2]
+ \RemoveFromHook{cmd/addcontentsline/before}[title/ifname/#3]
+ \RemoveFromHook{file/\@real at jobname.#3/before}[title/ifname/#3]
+ \RemoveFromHook{file/\@real at jobname.#3/after}[title/ifname/#3]
+ }
+ \AddToHookWithArguments{cmd/addcontentsline/before}[title/ifname/#3]
+ {
+ \str_if_eq:xnT {##1} {#3}
{
- \str_if_eq:xnT {##1} {#2}
- {
- \addtocontents{##1}
- {#3{\CTEX at ifnametrue}{\CTEX at ifnamefalse}}
- }
+ \addtocontents{##1}
+ {#4{\CTEX at ifnametrue}{\CTEX at ifnamefalse}}
}
- \AddToHook{file/#1.#2/before}[title/ifname/#2]
- {\cs_set_eq:NN \eb at title@ifname at resume \CTEXifname}
- \AddToHook{file/#1.#2/after}[title/ifname/#2]
- {\cs_set_eq:NN \CTEXifname \eb at title@ifname at resume}
}
- \tl_set:cn { l__eb_title_ifname_#2_tl } { registered }
+ \file_parse_full_name_apply:nN {#2} \eb_save_file_name:nnn
+ \AddToHook{file/\@real at jobname.#3/before}[title/ifname/#3]
+ {\cs_gset_eq:NN \eb at title@ifname at resume \CTEXifname}
+ \AddToHook{file/\@real at jobname.#3/after}[title/ifname/#3]
+ {\cs_gset_eq:NN \CTEXifname \eb at title@ifname at resume}
}
-\NewDocumentCommand{\RegisterCapIfname}{O{\jobname}m}
- {\RegisterTitleIfname[#1]{#2}{\capifname}}
+\NewDocumentCommand{\RegisterCapIfname}{sO{\jobname}m}
+ {
+ \IfBooleanTF{#1}
+ {\RegisterTitleIfname*[#2]{#3}{\capifname}}
+ {\RegisterTitleIfname[#2]{#3}{\capifname}}
+ }
\RegisterTitleIfname{toc}{\CTEXifname}
\RegisterCapIfname{lot,lof,lol,loe}
@@ -2045,7 +2055,13 @@
{
part =
{
- tocformat = \addvspace{1pc}\sffamily\large,
+ tocformat =
+ {
+ \tl_if_eq:NnTF \g__eb_bilist_permute_value_tl { mix }
+ { \ebifbitoc{}{\addvspace{1pc}} }
+ { \addvspace{1pc} }
+ \sffamily\large
+ },
tocindent = 0pt,
tocrule = \tocrule{}[\bfseries],
tocline = \CTEXnumberline{#1}#2
@@ -2052,7 +2068,13 @@
},
chapter =
{
- tocformat = \addvspace{1pc}\sffamily,
+ tocformat =
+ {
+ \tl_if_eq:NnTF \g__eb_bilist_permute_value_tl { mix }
+ { \ebifbitoc{}{\addvspace{1pc}} }
+ { \addvspace{1pc} }
+ \sffamily
+ },
tocindent = 0pt,
tocrule = \cdottocrule[\bfseries],
tocline = \CTEXnumberline{#1}#2
@@ -3020,7 +3042,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2025/02/13}{2025o}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2025/02/14}{2025p}
{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-02-14 22:32:25 UTC (rev 73980)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty 2025-02-14 22:32:36 UTC (rev 73981)
@@ -20,7 +20,7 @@
%% This work has the LPPL maintenance status `maintained'.
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2025/02/13}{2025o}
+\ProvidesExplPackage{easybase}{2025/02/14}{2025p}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1293,9 +1293,9 @@
title .code:n = \eb_assign_toc_title:n {#1},
bilist .code:n =
{
- \tl_gset:Nn \g__eb_bilist_permute_value_tl {#1}
\str_if_eq:nnTF {#1} { mix }
{
+ \tl_gset:Nn \g__eb_bilist_permute_value_tl {#1}
\AddToHook{cmd/CTEX at addtocline/before}[bitoc]
{\addtocontents{toc}{\boolfalse{@bitoc}}}
\AddToHook{cmd/CTEX at addbitocline/before}[bitoc]
@@ -1302,11 +1302,12 @@
{\addtocontents{toc}{\booltrue{@bitoc}}}
}
{
- \IfHookEmptyTF{cmd/CTEX at addtocline/before}{}
+ \tl_if_eq:NnT \g__eb_bilist_permute_value_tl { mix }
{
\RemoveFromHook{cmd/CTEX at addtocline/before}[bitoc]
\RemoveFromHook{cmd/CTEX at addbitocline/before}[bitoc]
}
+ \tl_gset:Nn \g__eb_bilist_permute_value_tl {#1}
}
},
name .tl_set:N = \eb at index@name,
@@ -1674,7 +1675,7 @@
{
\group_begin:
\makeatletter
- \file_if_exist_input:n { \jobname.#1 }
+ \InputIfFileExists{\jobname.#1}{}{}
\UseHookWithArguments{eb/starttoc/end}{1}{#1}
\boolfalse{@nobreak}
\group_end:
@@ -1700,32 +1701,41 @@
\AssignPartialExt{lol}{pll}
\cs_generate_variant:Nn \str_if_eq:nnT { x }
-\NewDocumentCommand{\RegisterTitleIfname}{O{\jobname}mm}
+\NewDocumentCommand{\RegisterTitleIfname}{sO{\jobname}mm}
{
- \clist_map_inline:nn {#2}
- { \eb at register@title at ifname{#1}{##1}{#3} }
+ \clist_map_inline:nn {#3}
+ { \eb at register@title at ifname{#1}{#2}{##1}{#4} }
}
-\cs_new_protected:Npn \eb at register@title at ifname #1#2#3
+\cs_new_protected:Npn \eb_save_file_name:nnn #1#2#3
+ { \str_set:Nn \@real at jobname {#2} }
+\cs_new_protected:Npn \eb at register@title at ifname #1#2#3#4
{
- \tl_if_exist:cF { l__eb_title_ifname_#2_tl }
+ \IfBooleanT{#1}
{
- \AddToHookWithArguments{cmd/addcontentsline/before}[title/ifname/#2]
+ \RemoveFromHook{cmd/addcontentsline/before}[title/ifname/#3]
+ \RemoveFromHook{file/\@real at jobname.#3/before}[title/ifname/#3]
+ \RemoveFromHook{file/\@real at jobname.#3/after}[title/ifname/#3]
+ }
+ \AddToHookWithArguments{cmd/addcontentsline/before}[title/ifname/#3]
+ {
+ \str_if_eq:xnT {##1} {#3}
{
- \str_if_eq:xnT {##1} {#2}
- {
- \addtocontents{##1}
- {#3{\CTEX at ifnametrue}{\CTEX at ifnamefalse}}
- }
+ \addtocontents{##1}
+ {#4{\CTEX at ifnametrue}{\CTEX at ifnamefalse}}
}
- \AddToHook{file/#1.#2/before}[title/ifname/#2]
- {\cs_set_eq:NN \eb at title@ifname at resume \CTEXifname}
- \AddToHook{file/#1.#2/after}[title/ifname/#2]
- {\cs_set_eq:NN \CTEXifname \eb at title@ifname at resume}
}
- \tl_set:cn { l__eb_title_ifname_#2_tl } { registered }
+ \file_parse_full_name_apply:nN {#2} \eb_save_file_name:nnn
+ \AddToHook{file/\@real at jobname.#3/before}[title/ifname/#3]
+ {\cs_gset_eq:NN \eb at title@ifname at resume \CTEXifname}
+ \AddToHook{file/\@real at jobname.#3/after}[title/ifname/#3]
+ {\cs_gset_eq:NN \CTEXifname \eb at title@ifname at resume}
}
-\NewDocumentCommand{\RegisterCapIfname}{O{\jobname}m}
- {\RegisterTitleIfname[#1]{#2}{\capifname}}
+\NewDocumentCommand{\RegisterCapIfname}{sO{\jobname}m}
+ {
+ \IfBooleanTF{#1}
+ {\RegisterTitleIfname*[#2]{#3}{\capifname}}
+ {\RegisterTitleIfname[#2]{#3}{\capifname}}
+ }
\RegisterTitleIfname{toc}{\CTEXifname}
\RegisterCapIfname{lot,lof,lol,loe}
@@ -1757,7 +1767,13 @@
{
part =
{
- tocformat = \addvspace{1pc}\sffamily\large,
+ tocformat =
+ {
+ \tl_if_eq:NnTF \g__eb_bilist_permute_value_tl { mix }
+ { \ebifbitoc{}{\addvspace{1pc}} }
+ { \addvspace{1pc} }
+ \sffamily\large
+ },
tocindent = 0pt,
tocrule = \tocrule{}[\bfseries],
tocline = \CTEXnumberline{#1}#2
@@ -1764,7 +1780,13 @@
},
chapter =
{
- tocformat = \addvspace{1pc}\sffamily,
+ tocformat =
+ {
+ \tl_if_eq:NnTF \g__eb_bilist_permute_value_tl { mix }
+ { \ebifbitoc{}{\addvspace{1pc}} }
+ { \addvspace{1pc} }
+ \sffamily
+ },
tocindent = 0pt,
tocrule = \cdottocrule[\bfseries],
tocline = \CTEXnumberline{#1}#2
Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls 2025-02-14 22:32:25 UTC (rev 73980)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls 2025-02-14 22:32:36 UTC (rev 73981)
@@ -19,7 +19,7 @@
%%
%% This work has the LPPL maintenance status `maintained'.
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
-\ProvidesExplClass{easybook}{2025/02/13}{2025o}
+\ProvidesExplClass{easybook}{2025/02/14}{2025p}
{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-02-14 22:32:25 UTC (rev 73980)
+++ trunk/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg 2025-02-14 22:32:36 UTC (rev 73981)
@@ -18,7 +18,7 @@
%% LaTeX version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
-\ProvidesExplFile{eb-tcolorbox.cfg}{2025/02/13}{2025o}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2025/02/14}{2025p}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
More information about the tex-live-commits
mailing list.