texlive[43672] Master/texmf-dist: xecjk (1apr17)

commits+karl at tug.org commits+karl at tug.org
Sat Apr 1 22:57:33 CEST 2017


Revision: 43672
          http://tug.org/svn/texlive?view=revision&revision=43672
Author:   karl
Date:     2017-04-01 22:57:33 +0200 (Sat, 01 Apr 2017)
Log Message:
-----------
xecjk (1apr17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/xelatex/xecjk/example/xeCJK-example-checksingle.tex
    trunk/Master/texmf-dist/doc/xelatex/xecjk/xeCJK.pdf
    trunk/Master/texmf-dist/doc/xelatex/xecjk/xunicode-symbols.pdf
    trunk/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx
    trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty
    trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg
    trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty
    trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty
    trunk/Master/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty
    trunk/Master/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def

Modified: trunk/Master/texmf-dist/doc/xelatex/xecjk/example/xeCJK-example-checksingle.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xecjk/example/xeCJK-example-checksingle.tex	2017-04-01 20:57:19 UTC (rev 43671)
+++ trunk/Master/texmf-dist/doc/xelatex/xecjk/example/xeCJK-example-checksingle.tex	2017-04-01 20:57:33 UTC (rev 43672)
@@ -9,14 +9,11 @@
 \documentclass{minimal}
 \usepackage{xeCJK}
 \setCJKmainfont{SimSun}
-\catcode`\。=\active
-\def。{.}
-\def\foo{一}
 \long\def\showtext{一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十。
 \[x^2+y^2\]
-一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十\foo
+一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十。
 $$x^2+y^2$$
-一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十\foo
+一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十。
 \begin{equation}
 x^2+y^2
 \end{equation}

Modified: trunk/Master/texmf-dist/doc/xelatex/xecjk/xeCJK.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/xelatex/xecjk/xunicode-symbols.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx
===================================================================
--- trunk/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx	2017-04-01 20:57:19 UTC (rev 43671)
+++ trunk/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx	2017-04-01 20:57:33 UTC (rev 43672)
@@ -194,7 +194,7 @@
 %<*package|config|fntef|listings|xunicode|xunextra>
 %<!(config|xunextra)>\NeedsTeXFormat{LaTeX2e}
 %<!(config|xunextra)>\RequirePackage{expl3}
-%<+!driver>\GetIdInfo$Id: xeCJK.dtx efd7a18 2017-02-23 02:07:20 +0800 Qing Lee <sobenlee at gmail.com> $
+%<+!driver>\GetIdInfo$Id: xeCJK.dtx 832988e 2017-04-01 21:33:23 +0800 Qing Lee <sobenlee at gmail.com> $
 %<package>  {Typesetting CJK scripts with XeLaTeX}
 %<config>  {Configuration file for xeCJK package}
 %<fntef>  {xeCJK font effect}
@@ -207,7 +207,7 @@
 %<listings>\ProvidesExplPackage{xeCJK-listings}
 %<xunicode>\ProvidesExplPackage{xunicode-addon}
 %<xunextra>\ProvidesExplFile{xunicode-extra.def}
-%<!driver>  {\ExplFileDate}{3.4.6}{\ExplFileDescription}
+%<!driver>  {\ExplFileDate}{3.4.7}{\ExplFileDescription}
 %</package|config|fntef|listings|xunicode|xunextra>
 %<*driver>
 \documentclass{ctxdoc}
@@ -275,7 +275,7 @@
 % \changes{v3.3.2}{2015/05/15}{随 Unicode 7.0.0 更新简繁汉字映射。}
 % \changes{v3.3.3}{2015/09/25}{更新 \hologo{LaTeX3} 代码。}
 %
-% \CheckSum{10171}
+% \CheckSum{10155}
 % \GetFileId{xeCJK.sty}
 %
 % \title{\bfseries\pkg{xeCJK} 宏包}
@@ -4201,34 +4201,34 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \changes{v3.4.7}{2017/03/20}{简化 \texttt{CheckSingle} 的实现,不再展开宏。}
+%
 % \begin{macro}[internal]{\xeCJK_check_single:Nw}
+% \begin{macro}[aux]{\@@_check_single_end:N}
 %    \begin{macrocode}
 \cs_new_protected_nopar:Npn \xeCJK_check_single:Nw #1
   {
+    \group_align_safe_begin:
     \peek_catcode:NTF \c_catcode_letter_token
       { \xeCJK_check_single:NNw #1 }
       {
-        \group_align_safe_begin:
         \token_if_other:NTF \l_peek_token
-          { \group_align_safe_end: \xeCJK_check_single:NNw #1 }
-          {
-            \group_align_safe_end:
-            \bool_if:nTF
-              {
-                \str_if_eq_x_p:nn { \token_get_arg_spec:N \l_peek_token } { } &&
-                \exp_args:No \tl_if_single_token_p:n \l_peek_token            &&
-                ( \exp_after:wN \token_if_other_p:N  \l_peek_token ||
-                  \exp_after:wN \token_if_letter_p:N \l_peek_token )
-              }
-              { \exp_after:wN \xeCJK_check_single:NNw \exp_after:wN #1 }
-              { \@@_check_single_save:N #1 }
-          }
+          { \xeCJK_check_single:NNw }
+          { \@@_check_single_end:N }
+        #1
       }
   }
+\cs_new_protected_nopar:Npn \@@_check_single_end:N
+  {
+    \group_align_safe_end:
+    \@@_check_single_save:N
+  }
 %    \end{macrocode}
 % \end{macro}
+% \end{macro}
 %
 % \begin{macro}[internal]{\xeCJK_check_single:NNw}
+% \begin{macro}[aux]{\@@_check_single_aux:nNNw}
 % \changes{v3.1.1}{2012/12/04}{改进定义,减少使用 \texttt{peek} 函数的次数。}
 % \changes{v3.2.7}{2013/08/30}{与 \tn{CJKspace} 兼容。}
 % 使用 \cs{group_align_safe_begin:} 和 \cs{group_align_safe_end:} 是为了防止在表格
@@ -4241,52 +4241,74 @@
         \bool_if:NTF \l_@@_peek_ignore_spaces_bool
           {
             \bool_if:NTF \l_@@_reserve_space_bool
-              { \@@_check_single_save:N #1 #2 ~ }
+              { \@@_check_single_end:N #1 #2 ~ }
               { \@@_check_single_space:NN #1#2 }
           }
-          { \@@_check_single_save:N #1 #2 }
+          { \@@_check_single_end:N #1 #2 }
       }
       {
-        \group_align_safe_begin:
         \token_if_other:NTF \l_peek_token
           {
-            \group_align_safe_end:
             \bool_if:NTF \l_@@_peek_ignore_spaces_bool
-              { \@@_check_single_space:NN #1#2 }
-              { \@@_check_single_save:N #1 #2 }
+              { \@@_check_single_space:NN }
+              { \@@_check_single_end:N }
           }
           {
-            \token_if_cs:NTF \l_peek_token
-              {
-                \group_align_safe_end:
-                \bool_if:NTF \l_@@_peek_ignore_spaces_bool
-                  { \xeCJK_check_single_cs:NNn #1#2 { ~ } }
-                  { \xeCJK_check_single_cs:NNn #1#2 { } }
-              }
-              {
-                \group_align_safe_end:
-                \bool_if:nTF
-                  {
-                    \l_@@_plain_equation_bool &&
-                    \token_if_math_toggle_p:N \l_peek_token
-                  }
-                  {
-                    \bool_if:NTF \l_@@_peek_ignore_spaces_bool
-                      { \xeCJK_check_single_equation:NNnNw #1 #2 { ~ } }
-                      { \xeCJK_check_single_equation:NNnNw #1 #2 { } }
-                  }
-                  {
-                    \bool_if:NTF \l_@@_peek_ignore_spaces_bool
-                      { \@@_check_single_save:N #1 #2 ~ }
-                      { \@@_check_single_save:N #1 #2 }
-                  }
-              }
+            \bool_if:NTF \l_@@_peek_ignore_spaces_bool
+              { \@@_check_single_aux:nNNw { ~ } }
+              { \@@_check_single_aux:nNNw { } }
           }
+        #1 #2
       }
   }
+\cs_new_protected_nopar:Npn \@@_check_single_aux:nNNw #1#2#3
+  {
+    \token_if_cs:NTF \l_peek_token
+      { \xeCJK_check_single_cs:NNn }
+      { \xeCJK_check_single_end:NNnw }
+    #2 #3 {#1}
+  }
 %    \end{macrocode}
 % \end{macro}
+% \end{macro}
 %
+% \begin{macro}[internal]{\xeCJK_check_single_end:NNnw}
+% \begin{macro}[aux]{\@@_check_single_end_aux:NNn,\@@_check_single_end_equation:NNnw}
+%    \begin{macrocode}
+\cs_new_protected_nopar:Npn \@@_check_single_end_aux:NNn #1#2#3
+  { \@@_check_single_end:N #1 #2 #3 }
+\cs_new_eq:NN \xeCJK_check_single_end:NNnw \@@_check_single_end_aux:NNn
+\cs_new_protected_nopar:Npn \@@_check_single_end_equation:NNnw
+  {
+    \token_if_math_toggle:NTF \l_peek_token
+      { \xeCJK_check_single_equation:NNnNw }
+      { \@@_check_single_end_aux:NNn }
+  }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{PlainEquation}
+% \changes{v3.1.1}{2012/12/06}{增加 \texttt{PlainEquation} 选项。}
+%    \begin{macrocode}
+\keys_define:nn { xeCJK / options }
+  {
+    PlainEquation .choice: ,
+    PlainEquation / true  .code:n =
+      {
+        \cs_set_eq:NN \xeCJK_check_single_end:NNnw
+                      \@@_check_single_end_equation:NNnw
+      } ,
+    PlainEquation / false .code:n =
+      {
+        \cs_set_eq:NN \xeCJK_check_single_end:NNnw
+                      \@@_check_single_end_aux:NNn
+      } ,
+    PlainEquation      .default:n = { true } ,
+  }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}[internal]{\@@_check_single_space:NN}
 % \changes{v3.1.1}{2012/12/13}
 % {\texttt{CheckSingle} 支持段末“汉字$+$汉字$+$空格$+$汉字/标点”的形式。}
@@ -4298,10 +4320,10 @@
     \xeCJK_if_CJK_class:NTF #2
       {
         \xeCJK_if_CJK_class:NTF \l_peek_token
-          { \@@_check_single_save:N #1 #2 }
-          { \@@_check_single_save:N #1 #2 ~ }
+          { \@@_check_single_end:N #1 #2 }
+          { \@@_check_single_end:N #1 #2 ~ }
       }
-      { \@@_check_single_save:N #1 #2 ~ }
+      { \@@_check_single_end:N #1 #2 ~ }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -4312,10 +4334,10 @@
   {
     \peek_catcode:NTF \c_math_toggle_token
       {
-        \xeCJK_widow_penalty: \@@_check_single_save:N #1
+        \xeCJK_widow_penalty: \@@_check_single_end:N #1
         \xeCJK_make_node:n { CJK-widow } #2 #4
       }
-      { \@@_check_single_save:N #1 #2#3#4 }
+      { \@@_check_single_end:N #1 #2#3#4 }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -4342,16 +4364,16 @@
 %    \begin{macrocode}
 \cs_new_protected_nopar:Npn \xeCJK_check_single_cs:NNn #1#2#3
   {
-    \group_align_safe_begin:
     \tl_case:NoF \l_peek_token
       { \l_@@_check_single_cs_case_tl }
-      { \group_align_safe_end: \use_iii:nnn }
+      { \use_iii:nnn }
       { \xeCJK_check_single_env:nnNn }
       {
-        \xeCJK_widow_penalty: \@@_check_single_save:N #1
+        \xeCJK_widow_penalty:
+        \@@_check_single_end:N #1
         \xeCJK_make_node:n { CJK-widow } #2#3
       }
-      { \@@_check_single_save:N #1 #2#3 }
+      { \@@_check_single_end:N #1 #2#3 }
   }
 \tl_new:N \l_@@_check_single_cs_case_tl
 \cs_generate_variant:Nn \tl_case:NnF { No }
@@ -4362,11 +4384,10 @@
 %    \begin{macrocode}
 \cs_new_protected_nopar:Npn \xeCJK_check_single_env:nnNn #1#2#3#4
   {
-    \group_align_safe_begin:
     \str_case_x:noTF {#4}
       { \l_@@_inline_env_case_tl }
-      { \group_align_safe_end: #2 }
-      { \group_align_safe_end: #1 }
+      {#2}
+      {#1}
     #3 {#4}
   }
 \cs_generate_variant:Nn \str_case_x:nnTF { no }
@@ -4379,7 +4400,7 @@
 %    \begin{macrocode}
 \xeCJK_cs_case_keys_define:nNNnn { NewLineCS }
   \l_@@_new_line_cs_case_tl \l_@@_new_line_cs_seq
-  { \group_align_safe_end: \use_ii:nnn }
+  { \use_ii:nnn }
   {
     \tl_concat:NNN \l_@@_check_single_cs_case_tl
       \l_@@_new_line_cs_case_tl \l_@@_env_cs_case_tl
@@ -4391,7 +4412,7 @@
 %    \begin{macrocode}
 \xeCJK_cs_case_keys_define:nNNnn { EnvCS }
   \l_@@_env_cs_case_tl \l_@@_env_cs_seq
-  { \group_align_safe_end: \use:n }
+  { \use:n }
   {
     \tl_concat:NNN \l_@@_check_single_cs_case_tl
       \l_@@_new_line_cs_case_tl \l_@@_env_cs_case_tl
@@ -4405,7 +4426,7 @@
 %    \begin{macrocode}
 \keys_define:nn { xeCJK / options }
   {
-    InlineEnv  .code:n =
+    InlineEnv       .code:n =
       {
         \seq_set_from_clist:Nn \l_@@_inline_env_seq {#1}
         \@@_update_inline_env_case_tl:
@@ -4442,14 +4463,6 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{PlainEquation}
-% \changes{v3.1.1}{2012/12/06}{增加 \texttt{PlainEquation} 选项。}
-%    \begin{macrocode}
-\keys_define:nn { xeCJK / options }
-  { PlainEquation .bool_set:N = \l_@@_plain_equation_bool }
-%    \end{macrocode}
-% \end{macro}
-%
 % \subsection{增加 CJK 子分区}
 %
 % \begin{macro}[internal]{\g_@@_CJK_sub_class_seq}
@@ -12469,14 +12482,11 @@
 \documentclass{minimal}
 \usepackage{xeCJK}
 \setCJKmainfont{SimSun}
-\catcode`\。=\active
-\def。{.}
-\def\foo{一}
 \long\def\showtext{一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十。
 \[x^2+y^2\]
-一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十\foo
+一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十。
 $$x^2+y^2$$
-一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十\foo
+一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十。
 \begin{equation}
 x^2+y^2
 \end{equation}

Modified: trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty	2017-04-01 20:57:19 UTC (rev 43671)
+++ trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty	2017-04-01 20:57:33 UTC (rev 43672)
@@ -29,10 +29,10 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{expl3}
-\GetIdInfo$Id: xeCJK.dtx efd7a18 2017-02-23 02:07:20 +0800 Qing Lee <sobenlee at gmail.com> $
+\GetIdInfo$Id: xeCJK.dtx 832988e 2017-04-01 21:33:23 +0800 Qing Lee <sobenlee at gmail.com> $
   {xeCJK patch file for listings}
 \ProvidesExplPackage{xeCJK-listings}
-  {\ExplFileDate}{3.4.6}{\ExplFileDescription}
+  {\ExplFileDate}{3.4.7}{\ExplFileDescription}
 \DeclareOption* { \PassOptionsToPackage { \CurrentOption } { xeCJK } }
 \ProcessOptions \scan_stop:
 \RequirePackage { xeCJK }

Modified: trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg	2017-04-01 20:57:19 UTC (rev 43671)
+++ trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg	2017-04-01 20:57:33 UTC (rev 43672)
@@ -6,10 +6,10 @@
 %%
 %% xeCJK.dtx  (with options: `config')
 %% 
-\GetIdInfo$Id: xeCJK.dtx efd7a18 2017-02-23 02:07:20 +0800 Qing Lee <sobenlee at gmail.com> $
+\GetIdInfo$Id: xeCJK.dtx 832988e 2017-04-01 21:33:23 +0800 Qing Lee <sobenlee at gmail.com> $
   {Configuration file for xeCJK package}
 \ProvidesExplFile{\ExplFileName.cfg}
-  {\ExplFileDate}{3.4.6}{\ExplFileDescription}
+  {\ExplFileDate}{3.4.7}{\ExplFileDescription}
 
 %% 
 %%

Modified: trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty	2017-04-01 20:57:19 UTC (rev 43671)
+++ trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty	2017-04-01 20:57:33 UTC (rev 43672)
@@ -29,10 +29,10 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{expl3}
-\GetIdInfo$Id: xeCJK.dtx efd7a18 2017-02-23 02:07:20 +0800 Qing Lee <sobenlee at gmail.com> $
+\GetIdInfo$Id: xeCJK.dtx 832988e 2017-04-01 21:33:23 +0800 Qing Lee <sobenlee at gmail.com> $
   {Typesetting CJK scripts with XeLaTeX}
 \ProvidesExplPackage{\ExplFileName}
-  {\ExplFileDate}{3.4.6}{\ExplFileDescription}
+  {\ExplFileDate}{3.4.7}{\ExplFileDescription}
 \msg_new:nnn { xeCJK } { Require-XeTeX }
   {
     The~xeCJK~package~requires~XeTeX~to~function.\\\\
@@ -1496,26 +1496,21 @@
   { \tex_penalty:D \l__xeCJK_widow_penalty_int }
 \cs_new_protected_nopar:Npn \xeCJK_check_single:Nw #1
   {
+    \group_align_safe_begin:
     \peek_catcode:NTF \c_catcode_letter_token
       { \xeCJK_check_single:NNw #1 }
       {
-        \group_align_safe_begin:
         \token_if_other:NTF \l_peek_token
-          { \group_align_safe_end: \xeCJK_check_single:NNw #1 }
-          {
-            \group_align_safe_end:
-            \bool_if:nTF
-              {
-                \str_if_eq_x_p:nn { \token_get_arg_spec:N \l_peek_token } { } &&
-                \exp_args:No \tl_if_single_token_p:n \l_peek_token            &&
-                ( \exp_after:wN \token_if_other_p:N  \l_peek_token ||
-                  \exp_after:wN \token_if_letter_p:N \l_peek_token )
-              }
-              { \exp_after:wN \xeCJK_check_single:NNw \exp_after:wN #1 }
-              { \__xeCJK_check_single_save:N #1 }
-          }
+          { \xeCJK_check_single:NNw }
+          { \__xeCJK_check_single_end:N }
+        #1
       }
   }
+\cs_new_protected_nopar:Npn \__xeCJK_check_single_end:N
+  {
+    \group_align_safe_end:
+    \__xeCJK_check_single_save:N
+  }
 \cs_new_protected_nopar:Npn \xeCJK_check_single:NNw #1#2
   {
     \xeCJK_peek_catcode_ignore_spaces:NTF \c_catcode_letter_token
@@ -1523,96 +1518,103 @@
         \bool_if:NTF \l__xeCJK_peek_ignore_spaces_bool
           {
             \bool_if:NTF \l__xeCJK_reserve_space_bool
-              { \__xeCJK_check_single_save:N #1 #2 ~ }
+              { \__xeCJK_check_single_end:N #1 #2 ~ }
               { \__xeCJK_check_single_space:NN #1#2 }
           }
-          { \__xeCJK_check_single_save:N #1 #2 }
+          { \__xeCJK_check_single_end:N #1 #2 }
       }
       {
-        \group_align_safe_begin:
         \token_if_other:NTF \l_peek_token
           {
-            \group_align_safe_end:
             \bool_if:NTF \l__xeCJK_peek_ignore_spaces_bool
-              { \__xeCJK_check_single_space:NN #1#2 }
-              { \__xeCJK_check_single_save:N #1 #2 }
+              { \__xeCJK_check_single_space:NN }
+              { \__xeCJK_check_single_end:N }
           }
           {
-            \token_if_cs:NTF \l_peek_token
-              {
-                \group_align_safe_end:
-                \bool_if:NTF \l__xeCJK_peek_ignore_spaces_bool
-                  { \xeCJK_check_single_cs:NNn #1#2 { ~ } }
-                  { \xeCJK_check_single_cs:NNn #1#2 { } }
-              }
-              {
-                \group_align_safe_end:
-                \bool_if:nTF
-                  {
-                    \l__xeCJK_plain_equation_bool &&
-                    \token_if_math_toggle_p:N \l_peek_token
-                  }
-                  {
-                    \bool_if:NTF \l__xeCJK_peek_ignore_spaces_bool
-                      { \xeCJK_check_single_equation:NNnNw #1 #2 { ~ } }
-                      { \xeCJK_check_single_equation:NNnNw #1 #2 { } }
-                  }
-                  {
-                    \bool_if:NTF \l__xeCJK_peek_ignore_spaces_bool
-                      { \__xeCJK_check_single_save:N #1 #2 ~ }
-                      { \__xeCJK_check_single_save:N #1 #2 }
-                  }
-              }
+            \bool_if:NTF \l__xeCJK_peek_ignore_spaces_bool
+              { \__xeCJK_check_single_aux:nNNw { ~ } }
+              { \__xeCJK_check_single_aux:nNNw { } }
           }
+        #1 #2
       }
   }
+\cs_new_protected_nopar:Npn \__xeCJK_check_single_aux:nNNw #1#2#3
+  {
+    \token_if_cs:NTF \l_peek_token
+      { \xeCJK_check_single_cs:NNn }
+      { \xeCJK_check_single_end:NNnw }
+    #2 #3 {#1}
+  }
+\cs_new_protected_nopar:Npn \__xeCJK_check_single_end_aux:NNn #1#2#3
+  { \__xeCJK_check_single_end:N #1 #2 #3 }
+\cs_new_eq:NN \xeCJK_check_single_end:NNnw \__xeCJK_check_single_end_aux:NNn
+\cs_new_protected_nopar:Npn \__xeCJK_check_single_end_equation:NNnw
+  {
+    \token_if_math_toggle:NTF \l_peek_token
+      { \xeCJK_check_single_equation:NNnNw }
+      { \__xeCJK_check_single_end_aux:NNn }
+  }
+\keys_define:nn { xeCJK / options }
+  {
+    PlainEquation .choice: ,
+    PlainEquation / true  .code:n =
+      {
+        \cs_set_eq:NN \xeCJK_check_single_end:NNnw
+                      \__xeCJK_check_single_end_equation:NNnw
+      } ,
+    PlainEquation / false .code:n =
+      {
+        \cs_set_eq:NN \xeCJK_check_single_end:NNnw
+                      \__xeCJK_check_single_end_aux:NNn
+      } ,
+    PlainEquation      .default:n = { true } ,
+  }
 \cs_new_protected_nopar:Npn \__xeCJK_check_single_space:NN #1#2
   {
     \xeCJK_if_CJK_class:NTF #2
       {
         \xeCJK_if_CJK_class:NTF \l_peek_token
-          { \__xeCJK_check_single_save:N #1 #2 }
-          { \__xeCJK_check_single_save:N #1 #2 ~ }
+          { \__xeCJK_check_single_end:N #1 #2 }
+          { \__xeCJK_check_single_end:N #1 #2 ~ }
       }
-      { \__xeCJK_check_single_save:N #1 #2 ~ }
+      { \__xeCJK_check_single_end:N #1 #2 ~ }
   }
 \cs_new_protected_nopar:Npn \xeCJK_check_single_equation:NNnNw #1#2#3#4
   {
     \peek_catcode:NTF \c_math_toggle_token
       {
-        \xeCJK_widow_penalty: \__xeCJK_check_single_save:N #1
+        \xeCJK_widow_penalty: \__xeCJK_check_single_end:N #1
         \xeCJK_make_node:n { CJK-widow } #2 #4
       }
-      { \__xeCJK_check_single_save:N #1 #2#3#4 }
+      { \__xeCJK_check_single_end:N #1 #2#3#4 }
   }
 \cs_new_protected_nopar:Npn \xeCJK_check_single_cs:NNn #1#2#3
   {
-    \group_align_safe_begin:
     \tl_case:NoF \l_peek_token
       { \l__xeCJK_check_single_cs_case_tl }
-      { \group_align_safe_end: \use_iii:nnn }
+      { \use_iii:nnn }
       { \xeCJK_check_single_env:nnNn }
       {
-        \xeCJK_widow_penalty: \__xeCJK_check_single_save:N #1
+        \xeCJK_widow_penalty:
+        \__xeCJK_check_single_end:N #1
         \xeCJK_make_node:n { CJK-widow } #2#3
       }
-      { \__xeCJK_check_single_save:N #1 #2#3 }
+      { \__xeCJK_check_single_end:N #1 #2#3 }
   }
 \tl_new:N \l__xeCJK_check_single_cs_case_tl
 \cs_generate_variant:Nn \tl_case:NnF { No }
 \cs_new_protected_nopar:Npn \xeCJK_check_single_env:nnNn #1#2#3#4
   {
-    \group_align_safe_begin:
     \str_case_x:noTF {#4}
       { \l__xeCJK_inline_env_case_tl }
-      { \group_align_safe_end: #2 }
-      { \group_align_safe_end: #1 }
+      {#2}
+      {#1}
     #3 {#4}
   }
 \cs_generate_variant:Nn \str_case_x:nnTF { no }
 \xeCJK_cs_case_keys_define:nNNnn { NewLineCS }
   \l__xeCJK_new_line_cs_case_tl \l__xeCJK_new_line_cs_seq
-  { \group_align_safe_end: \use_ii:nnn }
+  { \use_ii:nnn }
   {
     \tl_concat:NNN \l__xeCJK_check_single_cs_case_tl
       \l__xeCJK_new_line_cs_case_tl \l__xeCJK_env_cs_case_tl
@@ -1619,7 +1621,7 @@
   }
 \xeCJK_cs_case_keys_define:nNNnn { EnvCS }
   \l__xeCJK_env_cs_case_tl \l__xeCJK_env_cs_seq
-  { \group_align_safe_end: \use:n }
+  { \use:n }
   {
     \tl_concat:NNN \l__xeCJK_check_single_cs_case_tl
       \l__xeCJK_new_line_cs_case_tl \l__xeCJK_env_cs_case_tl
@@ -1626,7 +1628,7 @@
   }
 \keys_define:nn { xeCJK / options }
   {
-    InlineEnv  .code:n =
+    InlineEnv       .code:n =
       {
         \seq_set_from_clist:Nn \l__xeCJK_inline_env_seq {#1}
         \__xeCJK_update_inline_env_case_tl:
@@ -1655,8 +1657,6 @@
       { \tl_put_right:Nn \l__xeCJK_inline_env_case_tl { {##1} { } } }
   }
 \tl_new:N \l__xeCJK_inline_env_case_tl
-\keys_define:nn { xeCJK / options }
-  { PlainEquation .bool_set:N = \l__xeCJK_plain_equation_bool }
 \seq_new:N \g__xeCJK_CJK_sub_class_seq
 \NewDocumentCommand \xeCJKDeclareSubCJKBlock
   { s > { \TrimSpaces } m m }

Modified: trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty	2017-04-01 20:57:19 UTC (rev 43671)
+++ trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty	2017-04-01 20:57:33 UTC (rev 43672)
@@ -29,10 +29,10 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{expl3}
-\GetIdInfo$Id: xeCJK.dtx efd7a18 2017-02-23 02:07:20 +0800 Qing Lee <sobenlee at gmail.com> $
+\GetIdInfo$Id: xeCJK.dtx 832988e 2017-04-01 21:33:23 +0800 Qing Lee <sobenlee at gmail.com> $
   {xeCJK font effect}
 \ProvidesExplPackage{xeCJKfntef}
-  {\ExplFileDate}{3.4.6}{\ExplFileDescription}
+  {\ExplFileDate}{3.4.7}{\ExplFileDescription}
 \PassOptionsToPackage { normalem } { ulem }
 \DeclareOption* { \PassOptionsToPackage { \CurrentOption } { ulem } }
 \ProcessOptions \scan_stop:

Modified: trunk/Master/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty	2017-04-01 20:57:19 UTC (rev 43671)
+++ trunk/Master/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty	2017-04-01 20:57:33 UTC (rev 43672)
@@ -29,10 +29,10 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{expl3}
-\GetIdInfo$Id: xeCJK.dtx efd7a18 2017-02-23 02:07:20 +0800 Qing Lee <sobenlee at gmail.com> $
+\GetIdInfo$Id: xeCJK.dtx 832988e 2017-04-01 21:33:23 +0800 Qing Lee <sobenlee at gmail.com> $
   {addon file for xunicode}
 \ProvidesExplPackage{xunicode-addon}
-  {\ExplFileDate}{3.4.6}{\ExplFileDescription}
+  {\ExplFileDate}{3.4.7}{\ExplFileDescription}
 \bool_if:nF
   {
     \sys_if_engine_xetex_p: ||

Modified: trunk/Master/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def	2017-04-01 20:57:19 UTC (rev 43671)
+++ trunk/Master/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def	2017-04-01 20:57:33 UTC (rev 43672)
@@ -27,10 +27,10 @@
 %% 
 %% ----------------------------------------------------------------------
 %% 
-\GetIdInfo$Id: xeCJK.dtx efd7a18 2017-02-23 02:07:20 +0800 Qing Lee <sobenlee at gmail.com> $
+\GetIdInfo$Id: xeCJK.dtx 832988e 2017-04-01 21:33:23 +0800 Qing Lee <sobenlee at gmail.com> $
   {extra definition for xunicode}
 \ProvidesExplFile{xunicode-extra.def}
-  {\ExplFileDate}{3.4.6}{\ExplFileDescription}
+  {\ExplFileDate}{3.4.7}{\ExplFileDescription}
 \DeclareUTFComposite\textsuperscript
 \DeclareUTFComposite\textsubscript
 \DeclareUTFEncodedAccent\textsbleftarrow{"20EE}{"20FF}



More information about the tex-live-commits mailing list