summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctex/ctexbook.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/ctexbook.cls')
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexbook.cls58
1 files changed, 26 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexbook.cls b/Master/texmf-dist/tex/latex/ctex/ctexbook.cls
index 479801b8972..106b6183b5f 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctexbook.cls
+++ b/Master/texmf-dist/tex/latex/ctex/ctexbook.cls
@@ -28,10 +28,10 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: ctex.dtx e177d82 2017-08-07 16:58:14 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx f5ff957 2017-11-22 19:13:13 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese adapter for class book (CTEX)}
\ProvidesExplClass{ctexbook}
- {\ExplFileDate}{2.4.10}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.11}{\ExplFileDescription}
\tl_const:Nx \c__ctex_version_tl
{ \cs_if_exist_use:cF { ver@ \@currname . \@currext } { 9999/99/99 } }
\cs_new_eq:cN { ver@ctex. \@pkgextension } \c__ctex_version_tl
@@ -639,50 +639,44 @@
#1 / name .code:n =
{ \ctex_assign_heading_name:nn {#1} { ####1 } } ,
#1 / number .tl_set:N = \exp_not:c { CTEX@the#1 } ,
- #1 / format .tl_set:N = \exp_not:c { CTEX@#1@format } ,
- #1 / nameformat .tl_set:N = \exp_not:c { CTEX@#1@nameformat } ,
- #1 / numberformat .tl_set:N = \exp_not:c { CTEX@#1@numberformat } ,
- #1 / aftername .tl_set:N = \exp_not:c { CTEX@#1@aftername } ,
- #1 / titleformat .tl_set:N = \exp_not:c { CTEX@#1@titleformat } ,
- #1 / aftertitle .tl_set:N = \exp_not:c { CTEX@#1@aftertitle } ,
#1 / beforeskip .tl_set:N = \exp_not:c { CTEX@#1@beforeskip } ,
#1 / afterskip .tl_set:N = \exp_not:c { CTEX@#1@afterskip} ,
#1 / indent .tl_set:N = \exp_not:c { CTEX@#1@indent } ,
#1 / numbering .bool_set:N = \exp_not:c { CTEX@#1@numbering } ,
+ #1 / numbering .initial:n = true ,
+ #1 / beforeskip .initial:n = \c_zero_skip ,
+ #1 / afterskip .initial:n = \c_zero_skip ,
+ #1 / indent .initial:n = \c_zero_dim ,
+ #1 / beforeskip .value_required:n = true ,
+ #1 / afterskip .value_required:n = true ,
+ #1 / indent .value_required:n = true ,
#1 / afterindent .bool_set:N = \exp_not:c { CTEX@#1@afterindent } ,
#1 / fixskip .bool_set:N = \exp_not:c { CTEX@#1@fixskip } ,
#1 / hang .bool_set:N = \exp_not:c { CTEX@#1@hang } ,
#1 / hang .initial:n = true ,
#1 / runin .bool_set:N = \exp_not:c { CTEX@#1@runin } ,
- #1 / break .tl_set:N = \exp_not:c { CTEX@#1@break } ,
- #1 / break+ .code:n =
- { \tl_put_right:Nn \exp_not:c { CTEX@#1@break } { ####1 } } ,
#1 / tocline .code:n =
{
\cs_set:Npn \exp_not:c { CTEX@#1@tocline}
\exp_not:n { ####1####2 } { ####1 }
} ,
- #1 / format+ .code:n =
- { \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
- #1 / nameformat+ .code:n =
- { \tl_put_right:Nn \exp_not:c { CTEX@#1@nameformat } { ####1 } } ,
- #1 / numberformat+ .code:n =
- { \tl_put_right:Nn \exp_not:c { CTEX@#1@numberformat } { ####1 } } ,
- #1 / aftername+ .code:n =
- { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftername } { ####1 } } ,
- #1 / titleformat+ .code:n =
- { \tl_put_right:Nn \exp_not:c { CTEX@#1@titleformat } { ####1 } } ,
- #1 / aftertitle+ .code:n =
- { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftertitle } { ####1 } } ,
- #1 / numbering .initial:n = true ,
- #1 / beforeskip .initial:n = \c_zero_skip ,
- #1 / afterskip .initial:n = \c_zero_skip ,
- #1 / indent .initial:n = \c_zero_dim ,
- #1 / beforeskip .value_required:n = true ,
- #1 / afterskip .value_required:n = true ,
- #1 / indent .value_required:n = true ,
+ \__ctex_plus_key_aux:nn {#1} { break } ,
+ \__ctex_plus_key_aux:nn {#1} { format } ,
+ \__ctex_plus_key_aux:nn {#1} { nameformat } ,
+ \__ctex_plus_key_aux:nn {#1} { numberformat } ,
+ \__ctex_plus_key_aux:nn {#1} { titleformat } ,
+ \__ctex_plus_key_aux:nn {#1} { aftername } ,
+ \__ctex_plus_key_aux:nn {#1} { aftertitle } ,
}
}
+\cs_new_nopar:Npn \__ctex_plus_key_aux:nn #1#2
+ {
+ #1 / #2 .tl_set:N = \exp_not:c { CTEX@#1@#2 } ,
+ #1 / #2 + .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } ,
+ #1 / #2 ~ + .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } }
+ }
\NewDocumentCommand \ctex_assign_heading_name:nn
{ m > { \SplitArgument { \c_one } { , } } +m }
{ \__ctex_assign_heading_name:nnn {#1} #2 }
@@ -1288,7 +1282,7 @@
\if@twoside
\ctex_patch_cmd:Nnn \ps@headings
{ \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi }
- { \CTEXifname { \CTEXthesection } { } }
+ { \CTEXifname { \CTEXthesection \quad } { } }
\fi:
\ctex_at_end_package:nn { fancyhdr }
{
@@ -1297,7 +1291,7 @@
{ \CTEXifname { \CTEXthechapter \quad } { } }
\ctex_patch_cmd:Nnn \ps@fancy
{ \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi }
- { \CTEXifname { \CTEXthesection } { } }
+ { \CTEXifname { \CTEXthesection \quad } { } }
}
\cs_new_protected_nopar:Npn \CTEX@setcurrentlabel@n #1
{