From 17ae294de8fb69063802da82d29433bc4c7f3b68 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Wed, 22 Nov 2017 22:41:30 +0000
Subject: ctex (22nov17)

git-svn-id: svn://tug.org/texlive/trunk@45883 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/ctex/ctexart.cls | 54 +++++++++++++---------------
 1 file changed, 24 insertions(+), 30 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/ctex/ctexart.cls')

diff --git a/Master/texmf-dist/tex/latex/ctex/ctexart.cls b/Master/texmf-dist/tex/latex/ctex/ctexart.cls
index 8dec384d859..bfc79f92d2d 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctexart.cls
+++ b/Master/texmf-dist/tex/latex/ctex/ctexart.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 article (CTEX)}
 \ProvidesExplClass{ctexart}
-  {\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
@@ -638,50 +638,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 }
-- 
cgit v1.2.3

