texlive[71733] Master/texmf-dist: easybook (7jul24)

commits+karl at tug.org commits+karl at tug.org
Sun Jul 7 22:10:20 CEST 2024


Revision: 71733
          https://tug.org/svn/texlive?view=revision&revision=71733
Author:   karl
Date:     2024-07-07 22:10:20 +0200 (Sun, 07 Jul 2024)
Log Message:
-----------
easybook (7jul24)

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-07-07 20:10:09 UTC (rev 71732)
+++ trunk/Master/texmf-dist/doc/latex/easybook/README.md	2024-07-07 20:10:20 UTC (rev 71733)
@@ -1,5 +1,5 @@
 # The `easybook` document class
-Easily typesetting Chinese theses or books (v2024cn)
+Easily typesetting Chinese theses or books (v2024co)
 
 ## 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-07-07 20:10:09 UTC (rev 71732)
+++ trunk/Master/texmf-dist/doc/latex/easybook/easybook.tex	2024-07-07 20:10:20 UTC (rev 71733)
@@ -23,8 +23,8 @@
     name            = easybook,
     color-scheme    = blue,
     title           = EASYBOOK使用手册,
-    version         = v2024cn,
-    date            = 2024/07/03,
+    version         = v2024co,
+    date            = 2024/07/06,
     authors         = 瞿毅,
     info            = 简便地排版中文学位论文或书籍,
     email           = toquyi at 163.com,
@@ -232,13 +232,13 @@
 \end{frameverb}
 
 \subsection{编译方式}
-假设您的 \TeX 源文件名为 \code{easybook.tex},需要使用参考文献和索引功能,并使用 \hologo{XeLaTeX} 和 \hologo{BibTeX} 引擎编译文档,那么需要在命令行中执行:
+假设您的 \TeX 源文件名为 \code{easybook-demo.tex},需要使用参考文献和索引功能,并使用 \hologo{XeLaTeX} 和 \hologo{BibTeX} 引擎编译文档,那么需要在命令行中执行:
 \begin{frameverb}
-  xelatex -shell-escape easybook
-  bibtex easybook
-  makeindex easybook
-  xelatex -shell-escape easybook
-  xelatex -shell-escape easybook
+  xelatex -shell-escape easybook-demo
+  bibtex easybook-demo
+  makeindex easybook-demo
+  xelatex -shell-escape easybook-demo
+  xelatex -shell-escape easybook-demo
 \end{frameverb}
 当然也可以使用 \code{latexmk} 及一些软件自带的编译工具,这里就不做介绍。 \\
 $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-shell-escape} 命令行选项。
@@ -510,9 +510,9 @@
   \keyval{prenote}{参考文献前注}
   该选项选择由 \cs{defbibnote} 所定义的前注,缺省状态下不打印任何前注。
   \keyval{section}{整数}\Default{0}
-  只打印在指定文节中引用的条目。该参考文献节从1开始编号,所有在 \env*{refsection} 环境外给出的引用标记为第零节。
+  只打印第 \meta{整数} 文节中引用的条目。该参考文献节从1开始编号,所有在 \env*{refsection} 环境外给出的引用标记为第零节。
   \keyval{type}{条目类型}
-  指定条目的打印类型。
+  只打印名为 \meta{条目类型} 的文献条目。
   \keyval{filter}{过滤器名}
   使用由 \cs{defbibfilter} 定义的 \option*{filter} 来过滤条目。
 
@@ -990,16 +990,24 @@
   \UseTocStyle{section}{fancy}{toc}
   \tableofcontents[bilist = mix]
   \end{ctexexam}
+
+  除了上述选项还支持 \CTeX 键值列表所有路径的章节标题样式选项,下面仅列举几个选项例子。需要注意的是标题样式选项根据 \option{level} 选项中的\textbf{最后}一个标题命令判断键路径,所以这个标题命令名必须存在于 \CTeX 键值列表路径中,或带有 \code{\textcolor{cs}{bi}} 前缀表示双语标题。
   \keyval{format}{目录标题格式}
-  设置目录标题的格式,在标题级别为 \code{chapter} 或者 \cls*{article} 模式且标题级别为 \code{section} 时有效。
+  设置目录标题的格式。
+  \begin{ctexexam}
+  \tableofcontents[
+    level   = \clearpage\bisection*,
+    format  = \centering\sffamily\Large
+    ]
+  \end{ctexexam}
   \keyval{aftername}{标签后代码}
-  目录标题的标签与内容之间插入的代码,生效情形同上。
+  目录标题的标签与内容之间插入的代码。
   \keyval{aftertitle}{标题后代码}
-  目录标题内容之后插入的代码,生效情形同上。
+  目录标题内容之后插入的代码。
   \keyval{break}{格式命令}
-  控制章节标题与之前正文的分隔关系。一般用于设置是否在标题之前分页或者设置行间罚点,生效情形同上。
+  控制章节标题与之前正文的分隔关系。一般用于设置是否在标题之前分页或者设置行间罚点。
   \keyval{pagestyle}{页面风格}\Default{empty}
-  目录标题所在页的页面格式,仅当目录以 \code{chapter} 级别输出时有效。除了上述选项还支持 \CTeX 键值列表路径 \module*{chapter} 或 \module*{section} 所有的章节标题样式选项。
+  目录标题所在页的页面格式,仅当目录以 \code{chapter} 级别输出时有效。
 \end{cnltxlist}
 
 \subsection{双语章节标题和新建标题}
@@ -1437,8 +1445,9 @@
   \item 新增统一设置所有目录格式时的条目类型排除命令 \cs{ExcludeEveryTocName}。
   \end{version}
   \shortversion{v = 2024cd,date = 2024/06/14,changes = 修复全局选项 \option{class} 无法正确切换单双面排版的问题。}
+  \shortversion{v = 2024co,date = 2024/07/06,changes = 目录命令的可选参数支持 \CTeX 键值列表所有路径的章节标题样式选项。}
 \end{changelog}
 \nocite{*}
-\AddToHook{cmd/printindex/before}{\clearpage}
+% \AddToHook{cmd/printindex/before}{\clearpage}
 
 \end{document}
\ No newline at end of file

Modified: trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2024-07-07 20:10:09 UTC (rev 71732)
+++ trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2024-07-07 20:10:20 UTC (rev 71733)
@@ -14,7 +14,7 @@
 % This work has the LPPL maintenance status `maintained'.
 %<class|package>\NeedsTeXFormat{LaTeX2e}[2021/11/15]
 %<*class>
-\ProvidesExplClass{easybook}{2024/07/03}{2024cn}
+\ProvidesExplClass{easybook}{2024/07/06}{2024co}
   {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/07/03}{2024cn}
+\ProvidesExplPackage{easybase}{2024/07/06}{2024co}
   {Easily typesetting Chinese theses or books}
 
 \cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1422,47 +1422,73 @@
 \bool_new:N \l__eb_toc_notitle_bool
 \newbool{bitoc}
 \cs_new:Npn \ebifbitoc { \ifbool{bitoc} }
+\seq_new:N \l__eb_level_tmpa_seq
+\tl_new:N \l__eb_level_tmpa_tl
+\cs_generate_variant:Nn \regex_extract_all:nnN { no }
+\cs_generate_variant:Nn \keys_define:nn { nx }
+\cs_generate_variant:Nn \ctex_set:nn { ox }
+\cs_new_protected:Npn \eb_toc_extract_level:
+  {
+    \regex_extract_all:noN { \cC. } { \eb at toc@title at level }
+      \l__eb_level_tmpa_seq
+    \seq_get_right:NN \l__eb_level_tmpa_seq \l__eb_level_tmpa_tl
+    \tl_set:Nx \l__eb_level_tmpa_tl
+      {
+        \exp_last_unbraced:No
+          \cs_to_str:N { \l__eb_level_tmpa_tl }
+      }
+    \regex_replace_case_once:nN
+      {
+        { ^bi(.*) } { \1 }
+        { .* } { \0 }
+      }
+      \l__eb_level_tmpa_tl
+  }
 \keys_define:nn { eb/tocouter }
   {
-    level .tl_set:N   = \eb at toc@title at level,
-    level .initial:n  =
+    level .code:n       =
       {
+        \tl_set:Nn \eb at toc@title at level {#1}
+        \eb_toc_extract_level:
+      },
+    level .initial:e    =
+      {
         \bool_if:NTF \l__eb_class_mode_book_bool
-          { \bichapter* }
-          { \bisection* }
+          { \exp_not:N \bichapter* }
+          { \exp_not:N \bisection* }
       },
-    section .meta:n   = { level = \bisection* },
-    chapter .meta:n   = { level = \bichapter* },
-    none .code:n      =
+    section .meta:n     = { level = \bisection* },
+    chapter .meta:n     = { level = \bichapter* },
+    none .code:n        =
       {
         \tl_set:Nn \eb at toc@title at level
           { \par\use_none:nn }
         \bool_set_true:N \l__eb_toc_notitle_bool
       },
-    multoc .int_set:N = \l__eb_toc_columns_int,
-    multoc .default:n = 2,
-    multoc .initial:n = 1,
+    multoc .int_set:N   = \l__eb_toc_columns_int,
+    multoc .default:n   = 2,
+    multoc .initial:n   = 1,
     plan .choice:,
     plan .value_required:n = true,
-    plan/cn .code:n   =
+    plan/cn .code:n     =
       {
         \bool_set_true:N \l__eb_toc_plan_cn_bool
         \bool_set_false:N \l__eb_toc_plan_bi_bool
       },
-    plan/bi .code:n   =
+    plan/bi .code:n     =
       {
         \bool_set_false:N \l__eb_toc_plan_cn_bool
         \bool_set_true:N \l__eb_toc_plan_bi_bool
       },
-    plan/both .code:n =
+    plan/both .code:n   =
       {
         \bool_set_true:N \l__eb_toc_plan_cn_bool
         \bool_set_true:N \l__eb_toc_plan_bi_bool
       },
-    plan .initial:n   = cn,
-    columns .meta:n   = { multoc = {#1} },
-    title .code:n     = \eb_assign_toc_title:n {#1},
-    bilist .code:n    =
+    plan .initial:n     = cn,
+    columns .meta:n     = { multoc = {#1} },
+    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 }
@@ -1480,12 +1506,16 @@
               }
           }
       },
-    name .tl_set:N    = \l__eb_print_index_name_tl,
-    name .initial:n   = \imki at jobname
+    name .tl_set:N      = \l__eb_print_index_name_tl,
+    name .initial:n     = \imki at jobname,
+    unknown .code:n     =
+      {
+        \ctex_set:ox { \l__eb_level_tmpa_tl }
+          { \eb_unknown_kv_handle: }
+      },
+    unknown .default:V  = \c_novalue_tl
   }
-\bool_if:NTF \l__eb_class_mode_book_bool
-  { \keys_define:nn { } { eb/tocouter .inherit:n = ctex/chapter } }
-  { \keys_define:nn { } { eb/tocouter .inherit:n = ctex/section } }
+
 \NewDocumentCommand{\eb_assign_toc_title:n}
   {>{\SplitArgument{1}{,}}m}
   {\eb_toc_assign_title_judge:nn #1}
@@ -2634,7 +2664,7 @@
   }
 %</package>
 %<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/07/03}{2024cn}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/07/06}{2024co}
   {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-07-07 20:10:09 UTC (rev 71732)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty	2024-07-07 20:10:20 UTC (rev 71733)
@@ -20,7 +20,7 @@
 %% This work has the LPPL maintenance status `maintained'.
 \NeedsTeXFormat{LaTeX2e}[2021/11/15]
 \RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2024/07/03}{2024cn}
+\ProvidesExplPackage{easybase}{2024/07/06}{2024co}
   {Easily typesetting Chinese theses or books}
 
 \cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1141,47 +1141,73 @@
 \bool_new:N \l__eb_toc_notitle_bool
 \newbool{bitoc}
 \cs_new:Npn \ebifbitoc { \ifbool{bitoc} }
+\seq_new:N \l__eb_level_tmpa_seq
+\tl_new:N \l__eb_level_tmpa_tl
+\cs_generate_variant:Nn \regex_extract_all:nnN { no }
+\cs_generate_variant:Nn \keys_define:nn { nx }
+\cs_generate_variant:Nn \ctex_set:nn { ox }
+\cs_new_protected:Npn \eb_toc_extract_level:
+  {
+    \regex_extract_all:noN { \cC. } { \eb at toc@title at level }
+      \l__eb_level_tmpa_seq
+    \seq_get_right:NN \l__eb_level_tmpa_seq \l__eb_level_tmpa_tl
+    \tl_set:Nx \l__eb_level_tmpa_tl
+      {
+        \exp_last_unbraced:No
+          \cs_to_str:N { \l__eb_level_tmpa_tl }
+      }
+    \regex_replace_case_once:nN
+      {
+        { ^bi(.*) } { \1 }
+        { .* } { \0 }
+      }
+      \l__eb_level_tmpa_tl
+  }
 \keys_define:nn { eb/tocouter }
   {
-    level .tl_set:N   = \eb at toc@title at level,
-    level .initial:n  =
+    level .code:n       =
       {
+        \tl_set:Nn \eb at toc@title at level {#1}
+        \eb_toc_extract_level:
+      },
+    level .initial:e    =
+      {
         \bool_if:NTF \l__eb_class_mode_book_bool
-          { \bichapter* }
-          { \bisection* }
+          { \exp_not:N \bichapter* }
+          { \exp_not:N \bisection* }
       },
-    section .meta:n   = { level = \bisection* },
-    chapter .meta:n   = { level = \bichapter* },
-    none .code:n      =
+    section .meta:n     = { level = \bisection* },
+    chapter .meta:n     = { level = \bichapter* },
+    none .code:n        =
       {
         \tl_set:Nn \eb at toc@title at level
           { \par\use_none:nn }
         \bool_set_true:N \l__eb_toc_notitle_bool
       },
-    multoc .int_set:N = \l__eb_toc_columns_int,
-    multoc .default:n = 2,
-    multoc .initial:n = 1,
+    multoc .int_set:N   = \l__eb_toc_columns_int,
+    multoc .default:n   = 2,
+    multoc .initial:n   = 1,
     plan .choice:,
     plan .value_required:n = true,
-    plan/cn .code:n   =
+    plan/cn .code:n     =
       {
         \bool_set_true:N \l__eb_toc_plan_cn_bool
         \bool_set_false:N \l__eb_toc_plan_bi_bool
       },
-    plan/bi .code:n   =
+    plan/bi .code:n     =
       {
         \bool_set_false:N \l__eb_toc_plan_cn_bool
         \bool_set_true:N \l__eb_toc_plan_bi_bool
       },
-    plan/both .code:n =
+    plan/both .code:n   =
       {
         \bool_set_true:N \l__eb_toc_plan_cn_bool
         \bool_set_true:N \l__eb_toc_plan_bi_bool
       },
-    plan .initial:n   = cn,
-    columns .meta:n   = { multoc = {#1} },
-    title .code:n     = \eb_assign_toc_title:n {#1},
-    bilist .code:n    =
+    plan .initial:n     = cn,
+    columns .meta:n     = { multoc = {#1} },
+    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 }
@@ -1199,12 +1225,16 @@
               }
           }
       },
-    name .tl_set:N    = \l__eb_print_index_name_tl,
-    name .initial:n   = \imki at jobname
+    name .tl_set:N      = \l__eb_print_index_name_tl,
+    name .initial:n     = \imki at jobname,
+    unknown .code:n     =
+      {
+        \ctex_set:ox { \l__eb_level_tmpa_tl }
+          { \eb_unknown_kv_handle: }
+      },
+    unknown .default:V  = \c_novalue_tl
   }
-\bool_if:NTF \l__eb_class_mode_book_bool
-  { \keys_define:nn { } { eb/tocouter .inherit:n = ctex/chapter } }
-  { \keys_define:nn { } { eb/tocouter .inherit:n = ctex/section } }
+
 \NewDocumentCommand{\eb_assign_toc_title:n}
   {>{\SplitArgument{1}{,}}m}
   {\eb_toc_assign_title_judge:nn #1}

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2024-07-07 20:10:09 UTC (rev 71732)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2024-07-07 20:10:20 UTC (rev 71733)
@@ -19,7 +19,7 @@
 %% 
 %% This work has the LPPL maintenance status `maintained'.
 \NeedsTeXFormat{LaTeX2e}[2021/11/15]
-\ProvidesExplClass{easybook}{2024/07/03}{2024cn}
+\ProvidesExplClass{easybook}{2024/07/06}{2024co}
   {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-07-07 20:10:09 UTC (rev 71732)
+++ trunk/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg	2024-07-07 20:10:20 UTC (rev 71733)
@@ -18,7 +18,7 @@
 %% LaTeX version 2005/12/01 or later.
 %% 
 %% This work has the LPPL maintenance status `maintained'.
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/07/03}{2024cn}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/07/06}{2024co}
   {Customization of tcolorbox for easybook}
 
 \cs_set_protected:Npn \addtotcbstyle #1#2



More information about the tex-live-commits mailing list.