diff options
author | Karl Berry <karl@freefriends.org> | 2021-05-07 20:14:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-05-07 20:14:21 +0000 |
commit | 3f20818aebef6486b55ca328825b002d7f87e396 (patch) | |
tree | f762b8c90500f2b09d122014f6beda6f1e08bc7b /Master/texmf-dist/tex | |
parent | 66984d3cd77715bfd26af835ca83decb560110f5 (diff) |
easybook (7may21)
git-svn-id: svn://tug.org/texlive/trunk@59117 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybook.cls | 81 |
1 files changed, 43 insertions, 38 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 16c271ff01b..5d7a8484b11 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybook.cls +++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls @@ -13,7 +13,7 @@ %% https://creativecommons.org/licenses/by/4.0/legalcode \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplClass{easybook}{2021/05/06}{1.25c}{beta} +\ProvidesExplClass{easybook}{2021/05/07}{1.25d}{beta} \cs_generate_variant:Nn \eb_ctex_define:nn { nx } \cs_generate_variant:Nn \int_to_arabic:n { v } @@ -513,7 +513,7 @@ { \CTEXifname { - \use:c { CTEXthe #1 } + \use:c { CTEXthe#1 } \hspace{\use:c { eb@toc@#1@numsep }} }{} } @@ -759,6 +759,9 @@ multoc .initial:n = false, title .code:n = \eb_assign_toc_title:n {#1} } +\bool_if:NTF \l__eb_class_book_bool + { \keys_define:nn { } { eb/listoc .inherit:n = ctex/chapter } } + { \keys_define:nn { } { eb/listoc .inherit:n = ctex/section } } \NewDocumentCommand{\eb_assign_toc_title:n} {>{\SplitArgument{1}{,}}m} {\eb_assign_toc_title_judge:nn #1} @@ -953,8 +956,9 @@ binmuber .initial:n = \arabic{chapter} } \RenewDocumentCommand{\appendix} - {O{Appendix\space}D(){\Alph{chapter}}O{}} + {O{Appendix\space}D(){\Alph{chapter}}} { + \ctex_assign_heading_name:nn { biappendix } {#1} \int_compare:nNnTF { \c@chapter } > { 0 } { \ExplSyntaxOn\char_set_catcode_letter:N \@ @@ -965,9 +969,9 @@ \def\CTEX@postchapter{\CTEX@postbichapter} } { - \def\CTEX@prechapter{#1} + \def\CTEX@prechapter{\CTEX@prebiappendix} \def\CTEX@thechapter{#2} - \def\CTEX@postchapter{#3} + \def\CTEX@postchapter{\CTEX@postbiappendix} } \ExplSyntaxOff\char_set_catcode_other:N \@ \setcounter{chapter}{0} @@ -1807,43 +1811,44 @@ \eb_allow_urlbreak: \ctex_hypersetup:n { pdfstartview = FitH } \exp_args:NV \hypersetup \l__eb_hyperref_clist - \labelformat{part}{\CTEXthepart} - \labelformat{chapter}{\CTEXthechapter} - \labelformat{figure}{\figurename~#1} - \labelformat{table}{\tablename~#1} - \tl_if_eq:NnTF \l__ctex_scheme_tl { chinese } + } + +\labelformat{part}{\CTEXthepart} +\labelformat{chapter}{\CTEXthechapter} +\labelformat{figure}{\figurename~#1} +\labelformat{table}{\tablename~#1} +\tl_if_eq:NnTF \l__ctex_scheme_tl { chinese } + { + \keys_set_known:nn { ctex } { - \keys_set_known:nn { ctex } - { - contentsname = 目\hspace{\ccwd}录, - indexname = 索\hspace{\ccwd}引, - listfigurename = 图片索引, - listtablename = 表格索引, - abstractname = 摘\hspace{\ccwd}要, - lstlistlistingname = 代码索引, - lstlistingname = 代码 - } - \labelformat{equation}{式(#1)} - \labelformat{align}{式(#1)} - \labelformat{multline}{式(#1)} - \labelformat{gather}{式(#1)} - \labelformat{section}{节#1} - \labelformat{subsection}{小节#1} + contentsname = 目\hspace{\ccwd}录, + indexname = 索\hspace{\ccwd}引, + listfigurename = 图片索引, + listtablename = 表格索引, + abstractname = 摘\hspace{\ccwd}要, + lstlistlistingname = 代码索引, + lstlistingname = 代码 } + \labelformat{equation}{式(#1)} + \labelformat{align}{式(#1)} + \labelformat{multline}{式(#1)} + \labelformat{gather}{式(#1)} + \labelformat{section}{节#1} + \labelformat{subsection}{小节#1} + } + { + \keys_set_known:nn { ctex } { - \keys_set_known:nn { ctex } - { - abstractname = Abstract, - lstlistlistingname = List~of~Codes, - lstlistingname = Code - } - \labelformat{equation}{Equation~(#1)} - \labelformat{align}{Equation~(#1)} - \labelformat{multline}{Equation~(#1)} - \labelformat{gather}{Equation~(#1)} - \labelformat{section}{Section~#1} - \labelformat{subsection}{Subsection~#1} + abstractname = Abstract, + lstlistlistingname = List~of~Codes, + lstlistingname = Code } + \labelformat{equation}{Equation~(#1)} + \labelformat{align}{Equation~(#1)} + \labelformat{multline}{Equation~(#1)} + \labelformat{gather}{Equation~(#1)} + \labelformat{section}{Section~#1} + \labelformat{subsection}{Subsection~#1} } \ctex_set:n |