texlive[46756] Master/texmf-dist: xecjk (27feb18)
commits+karl at tug.org
commits+karl at tug.org
Tue Feb 27 21:36:44 CET 2018
Revision: 46756
http://tug.org/svn/texlive?view=revision&revision=46756
Author: karl
Date: 2018-02-27 21:36:43 +0100 (Tue, 27 Feb 2018)
Log Message:
-----------
xecjk (27feb18)
Modified Paths:
--------------
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/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 2018-02-27 20:36:27 UTC (rev 46755)
+++ trunk/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx 2018-02-27 20:36:43 UTC (rev 46756)
@@ -194,7 +194,7 @@
%<*package|config|fntef|listings|xunicode|xunextra>
%<!(config|xunextra)>\NeedsTeXFormat{LaTeX2e}
%<!(config|xunextra)>\RequirePackage{expl3}
-%<+!driver>\GetIdInfo$Id: xeCJK.dtx 54327e6 2018-01-28 19:10:14 +0800 Qing Lee <sobenlee at gmail.com> $
+%<+!driver>\GetIdInfo$Id: xeCJK.dtx 25e85c2 2018-02-27 02:44:39 +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.6.0}{\ExplFileDescription}
+%<!driver> {\ExplFileDate}{3.6.1}{\ExplFileDescription}
%</package|config|fntef|listings|xunicode|xunextra>
%<*driver>
\documentclass{ctxdoc}
@@ -278,8 +278,9 @@
% \changes{v3.5.0}{2017/07/22}{使用 \texttt{lazy} 函数对 Boolean 表达式
% 进行最小化运算(\LaTeXiii{} 2017/07/19)。}
% \changes{v3.6.0}{2018/01/13}{同步 \LaTeXiii{} 2017/12/16。}
+% \changes{v3.6.1}{2018/02/27}{减少 \texttt{bool} 运算。}
%
-% \CheckSum{10769}
+% \CheckSum{10801}
% \GetFileId{xeCJK.sty}
%
% \title{\bfseries\pkg{xeCJK} 宏包}
@@ -1781,7 +1782,7 @@
% 去掉 |#1| 外层的分组括号。
% \begin{macrocode}
\cs_new_protected_nopar:Npn \xeCJK_tl_remove_outer_braces:N #1
- { \tl_set:Nx #1 { \exp_args:NV \xeCJK_tl_remove_outer_braces:n #1 } }
+ { \tl_set:Nx #1 { \exp_args:No \xeCJK_tl_remove_outer_braces:n {#1} } }
\cs_new:Npn \xeCJK_tl_remove_outer_braces:n #1
{
\exp_last_unbraced:Nf
@@ -1789,11 +1790,14 @@
}
\cs_new:Npn \@@_tl_remove_outer_braces:w #1 \s__stop
{
- \bool_lazy_and:nnTF
- { \tl_if_single_p:n {#1} }
- { ! ( \tl_if_head_is_N_type_p:n {#1} ) }
- { \xeCJK_tl_remove_outer_braces:n {#1} }
- { \tl_trim_spaces:n {#1} }
+ \tl_if_single:nTF {#1}
+ {
+ \tl_if_head_is_N_type:nTF {#1}
+ { \tl_trim_spaces:n }
+ { \xeCJK_tl_remove_outer_braces:n }
+ }
+ { \tl_trim_spaces:n }
+ {#1}
}
% \end{macrocode}
% \end{macro}
@@ -3185,9 +3189,9 @@
}
\cs_new_protected_nopar:Npn \@@_check_for_ecglue:
{
- \bool_lazy_or:nnTF
- { \xeCJK_if_last_node_p:n { CJK } }
- { \xeCJK_if_last_node_p:n { CJK-widow } }
+ \xeCJK_if_last_node:nTF { CJK }
+ { \use_i:nn }
+ { \xeCJK_if_last_node:nTF { CJK-widow } }
{ \xeCJK_remove_node: \CJKecglue }
{
\xeCJK_if_last_node:nT { CJK-space }
@@ -4175,6 +4179,7 @@
}
\cs_new_protected_nopar:Npn \@@_bound_glue_auxii:n #1
{
+ \skip_set_eq:NN \l_@@_last_skip \tex_lastskip:D
\skip_if_eq:nnTF { \l_@@_last_skip } { 1sp }
{ \@@_zero_glue: }
{
@@ -4284,6 +4289,7 @@
% \changes{v3.6.0}{2018/01/23}{解决标点中间被隔开的禁则与压缩问题。}
%
% \begin{macro}{\xeCJK_if_last_punct:TF}
+% \changes{v3.6.1}{2018/02/25}{细化判断。}
% 判断之前是否是一个标点符号。
% \begin{macrocode}
\cs_new_protected_nopar:Npn \xeCJK_if_last_punct:TF
@@ -4297,34 +4303,58 @@
{ \use_ii:nn }
}
}
-\cs_new_protected:Npn \@@_if_last_punct_glue:TF #1#2
+\cs_new_protected_nopar:Npn \@@_if_last_punct_glue:TF
{
+ \prop_get:NoNTF \g_@@_punct_skip_prop
+ { \skip_use:N \tex_lastskip:D } \l_@@_tmp_tl
+ { \@@_if_last_punct_glue_auxi:TF }
+ { \@@_if_last_punct_glue_auxii:TF }
+ }
+\cs_new_protected_nopar:Npn \@@_if_last_punct_glue_auxi:TF
+ {
\skip_set_eq:NN \l_@@_last_skip \tex_lastskip:D
\tex_unskip:D
\int_compare:nNnTF \tex_lastpenalty:D = \c_ten_thousand
- { \@@_if_last_punct_auxi:TF }
+ { \@@_if_last_punct_auxi:TF { \use_i:nn } }
{
\xeCJK_if_last_node:TF
- { \@@_if_last_punct_auxii:TF }
- { \@@_if_last_punct_auxiii:TF }
+ { \@@_if_last_punct_auxii:TF { \use_i:nn } }
+ { \use:n }
}
- {#1}
- { \skip_horizontal:N \l_@@_last_skip #2 }
+ { \skip_horizontal:N \l_@@_last_skip \use_ii:nn }
}
-\cs_new_protected:Npn \@@_if_last_punct_penalty:TF #1#2
+\cs_new_protected_nopar:Npn \@@_if_last_punct_glue_auxii:TF
{
+ \int_gset_eq:NN \g_@@_space_factor_int \tex_spacefactor:D
+ \skip_if_eq:nnTF { \tex_lastskip:D } { \c_xeCJK_space_skip_tl }
+ { \@@_if_last_punct_glue_auxiii:TF }
+ { \use_ii:nn }
+ }
+\cs_new_protected_nopar:Npn \@@_if_last_punct_glue_auxiii:TF
+ {
+ \skip_set_eq:NN \l_@@_tmp_skip \tex_lastskip:D
+ \tex_unskip:D
+ \int_compare:nNnTF \etex_lastnodetype:D = \c_eleven
+ {
+ \prop_get:NoNTF \g_@@_punct_skip_prop
+ { \skip_use:N \tex_lastskip:D } \l_@@_tmp_tl
+ { \@@_if_last_punct_glue_auxi:TF { \use_i:nn } }
+ { \use:n }
+ }
+ { \use:n }
+ { \skip_horizontal:N \l_@@_tmp_skip \use_ii:nn }
+ }
+\cs_new_protected_nopar:Npn \@@_if_last_punct_penalty:TF
+ {
\int_set_eq:NN \l_@@_last_penalty_int \tex_lastpenalty:D
\tex_unpenalty:D
\bool_set_true:N \l_@@_last_penalty_bool
\int_compare:nNnTF \etex_lastnodetype:D = \c_eleven
- {
- \@@_if_last_punct_glue:TF
- {#1}
- { \tex_penalty:D \l_@@_last_penalty_int #2 }
- }
- { \tex_penalty:D \l_@@_last_penalty_int #2 }
+ { \@@_if_last_punct_glue:TF { \use_i:nn } }
+ { \use:n }
+ { \tex_penalty:D \l_@@_last_penalty_int \use_ii:nn }
}
-\cs_new_protected:Npn \@@_if_last_punct_auxi:TF #1#2
+\cs_new_protected_nopar:Npn \@@_if_last_punct_auxi:TF
{
\tex_unpenalty:D
\bool_if:NF \l_@@_last_penalty_bool
@@ -4332,12 +4362,19 @@
\bool_set_true:N \l_@@_last_penalty_bool
\int_set_eq:NN \l_@@_last_penalty_int \c_ten_thousand
}
- \@@_if_last_punct_auxiv:TF
- {#1}
- { \xeCJK_no_break: #2 }
+ \xeCJK_if_last_node:TF
+ { \@@_if_last_punct_auxii:TF { \use_i:nn } }
+ { \use:n }
+ { \xeCJK_no_break: \use_ii:nn }
}
-\cs_new_protected:Npn \@@_if_last_punct_auxii:TF #1#2
+\cs_new_protected_nopar:Npn \@@_if_last_punct_auxii:TF
{
+ \dim_compare:nNnTF \l_@@_last_kern_dim > \c_zero_dim
+ { \@@_if_last_punct_auxiii:TF }
+ { \@@_make_node:N \l_@@_last_kern_dim \use_ii:nn }
+ }
+\cs_new_protected_nopar:Npn \@@_if_last_punct_auxiii:TF
+ {
\int_case:nnTF { \xetex_charclass:D \l_@@_last_kern_dim }
{
{ \xeCJK_class_num:n { FullRight } }
@@ -4345,23 +4382,11 @@
{ \xeCJK_class_num:n { FullLeft } }
{ \tl_set_eq:NN \l_@@_aligni_tl \c_@@_left_tl }
}
- { \@@_if_last_punct_auxv:TF {#1} {#2} }
- { \@@_make_node:N \l_@@_last_kern_dim #2 }
- }
-\cs_new_protected_nopar:Npn \@@_if_last_punct_auxiii:TF
- {
- \int_compare:nNnTF \etex_lastnodetype:D = \c_eleven
- { \@@_if_last_punct_auxvi:TF }
+ { \@@_if_last_punct_auxiv:TF }
{ \use_ii:nn }
}
\cs_new_protected_nopar:Npn \@@_if_last_punct_auxiv:TF
{
- \xeCJK_if_last_node:TF
- { \@@_if_last_punct_auxii:TF }
- { \use_ii:nn }
- }
-\cs_new_protected:Npn \@@_if_last_punct_auxv:TF #1#2
- {
\dim_set_eq:NN \l_@@_tmp_dim \l_@@_last_kern_dim
\xeCJK_if_last_node:TF
{
@@ -4368,27 +4393,10 @@
\tl_gset:Nx \g_@@_last_punct_tl
{ \utex_char:D \l_@@_tmp_dim }
\dim_set_eq:NN \l_@@_last_bound_dim \l_@@_last_kern_dim
- #1
+ \use_i:nn
}
- { \@@_make_node:N \l_@@_tmp_dim #2 }
+ { \@@_make_node:N \l_@@_tmp_dim \use_ii:nn }
}
-\cs_new_protected:Npn \@@_if_last_punct_auxvi:TF #1#2
- {
- \int_gset_eq:NN \g_@@_space_factor_int \tex_spacefactor:D
- \skip_if_eq:nnTF
- { \l_@@_last_skip }
- { \c_xeCJK_space_skip_tl }
- {
- \skip_set_eq:NN \l_@@_tmp_skip \tex_lastskip:D
- \tex_unskip:D
- \int_compare:nNnTF \tex_lastpenalty:D = \c_ten_thousand
- { \@@_if_last_punct_auxi:TF }
- { \@@_if_last_punct_auxiv:TF }
- { \skip_set_eq:NN \l_@@_last_skip \l_@@_tmp_skip #1 }
- { \skip_horizontal:N \l_@@_tmp_skip #2 }
- }
- {#2}
- }
\tl_new:N \l_@@_aligni_tl
\tl_new:N \l_@@_alignii_tl
\int_new:N \l_@@_last_penalty_int
@@ -5295,39 +5303,50 @@
\cs_new:Npn \@@_use_punct_skip_minus:nNN #1#2#3
{ \use:c { \@@_punct_csname:n { skip/minus/#1/#2/#3 } } }
\cs_new_protected:Npn \@@_save_punct_dim:nNn #1#2
- { \@@_save_punct_width_aux:nnn { dim } { #1/#2 } }
+ { \@@_save_punct_width_aux:nnnn { dim } {#1} { #1/#2 } }
\cs_new_protected:Npn \@@_save_punct_dim:nNNn #1#2#3
- { \@@_save_punct_width_aux:nnn { dim } { #1/#2/#3 } }
+ { \@@_save_punct_width_aux:nnnn { dim } {#1} { #1/#2/#3 } }
\cs_new_protected:Npn \@@_save_punct_skip:nNNn #1#2#3#4
{
- \@@_save_punct_width_aux:nnn { skip } { #1/#2/#3 } {#4}
- \@@_save_punct_width_aux:nnn { skip } { plus/#1/#2/#3 } {#4}
- \@@_save_punct_width_aux:nnn { skip } { minus/#1/#2/#3 } {#4}
+ \@@_save_punct_width_aux:nnnn { skip } {#1} { #1/#2/#3 } {#4}
+ \@@_save_punct_width_aux:nnnn { skip } {#1} { plus/#1/#2/#3 } {#4}
+ \@@_save_punct_width_aux:nnnn { skip } {#1} { minus/#1/#2/#3 } {#4}
}
\cs_new_protected:Npn \@@_save_punct_skip:nNNnnn #1#2#3#4#5#6
{
\use:x
{
- \@@_save_punct_skip_aux:nnnn { #1/#2/#3 }
+ \@@_save_punct_skip_aux:nnnnn {#1} { #1/#2/#3 }
{ \dim_eval:n {#4} }
{ \dim_max:nn { \c_zero_dim } {#5} }
{ \dim_max:nn { \c_zero_dim } {#6} }
}
}
-\cs_new_protected:Npn \@@_save_punct_skip_aux:nnnn #1#2#3#4
+\cs_new_protected:Npn \@@_save_punct_skip_aux:nnnnn #1#2#3#4#5
{
- \@@_save_punct_width_aux:nnn { skip }
- {#1} { #2 ~ plus ~ #3 ~ minus ~ #4 ~ }
- \@@_save_punct_width_aux:nnn { skip }
- { plus/#1 } { #2 ~ plus ~ #3 ~ }
- \@@_save_punct_width_aux:nnn { skip }
- { minus/#1 } { #2 ~ minus ~ #4 ~ }
+ \@@_save_punct_width_aux:nnnn { skip } {#1}
+ {#2} { #3 ~ plus ~ #4 ~ minus ~ #5 ~ }
+ \@@_save_punct_width_aux:nnnn { skip } {#1}
+ { plus/#2 } { #3 ~ plus ~ #4 ~ }
+ \@@_save_punct_width_aux:nnnn { skip } {#1}
+ { minus/#2 } { #3 ~ minus ~ #5 ~ }
}
-\cs_new_protected:Npn \@@_save_punct_width_aux:nnn #1#2#3
+\cs_new_protected:Npn \@@_save_punct_width_aux:nnnn #1#2#3#4
{
- \tl_const:cx { \@@_punct_csname:n { #1/#2 } }
- { \use:c { #1_eval:n } {#3} }
+ \@@_save_punct_width_aux:cxn
+ { \@@_punct_csname:n { #1/#3 } }
+ { \use:c { #1_eval:n } {#4} }
+ {#2}
}
+\cs_new_protected:Npn \@@_save_punct_width_aux:Nnn #1#2#3
+ {
+ \tl_const:Nn #1 {#2}
+ \str_if_eq:nnT {#3} { glue }
+ { \prop_gput:Nnn \g_@@_punct_skip_prop {#2} { } }
+ }
+\prop_new:N \g_@@_punct_skip_prop
+\prop_gput:Non \g_@@_punct_skip_prop { \skip_use:N \c_zero_skip } { }
+\cs_generate_variant:Nn \@@_save_punct_width_aux:Nnn { cx }
\cs_new_eq:NN \@@_use_dim_or_skip:nNN \@@_use_punct_skip:nNN
% \end{macrocode}
%
@@ -10472,14 +10491,12 @@
\lst at whitespacefalse
\bool_if:NTF \l_@@_listings_letter_bool
{
- \bool_lazy_or:nnF
- { \int_compare_p:nNn \l_@@_listings_flag_int = \c_two }
+ \int_compare:nNnF \l_@@_listings_flag_int = \c_two
{
- \bool_lazy_and_p:nn
- { \int_compare_p:nNn \l_@@_listings_flag_int = \c_three }
- { ! \l_@@_punct_breakable_bool }
+ \int_compare:nNnTF \l_@@_listings_flag_int = \c_three
+ { \bool_if:NT \l_@@_punct_breakable_bool { \lst at Output } }
+ { \lst at Output }
}
- { \lst at Output }
\lst at lettertrue
}
{
@@ -10494,10 +10511,8 @@
\lst at whitespacefalse
\bool_if:NTF \l_@@_listings_letter_bool
{
- \bool_lazy_and:nnT
- { \int_compare_p:nNn \l_@@_listings_flag_int < \c_two }
- { \@@_punct_if_long_p:N #2 }
- { \lst at Output }
+ \int_compare:nNnT \l_@@_listings_flag_int < \c_two
+ { \@@_punct_if_long:NT #2 { \lst at Output } }
\lst at lettertrue
}
{
@@ -10890,9 +10905,9 @@
% \begin{macro}{\@@_composite_cs:Nnn,\@@_composite_cs:nnn}
% \begin{macrocode}
\cs_new:Npx \@@_composite_cs:Nnn #1#2#3
- { \cs_to_str:N \\ #2 \exp_not:N \token_to_str:N #1 - \exp_not:N \tl_to_str:n {#3} }
+ { \c_backslash_str #2 \exp_not:N \token_to_str:N #1 - \exp_not:N \tl_to_str:n {#3} }
\cs_new:Npx \@@_composite_cs:nnn #1#2#3
- { \cs_to_str:N \\ #2 #1 - \exp_not:N \tl_to_str:n {#3} }
+ { \c_backslash_str #2 #1 - \exp_not:N \tl_to_str:n {#3} }
% \end{macrocode}
% \end{macro}
%
@@ -10906,9 +10921,13 @@
{
\tl_if_single_token:nTF {#1}
{
- \if_predicate:w
- \bool_if_p:n { \token_if_cs_p:N #1 || \token_if_active_p:N #1 }
- \prg_return_true: \else: \prg_return_false: \fi:
+ \token_if_cs:NTF #1
+ { \prg_return_true: }
+ {
+ \token_if_active:NTF #1
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
}
{ \prg_return_false: }
}
@@ -11007,10 +11026,14 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_provide_text_command_default:N #1
{
- \bool_lazy_or:nnF
- { \cs_if_exist_p:c { ? \token_to_str:N #1 } }
- { \cs_if_free_p:c { ? - \token_to_str:N #1 } }
- { \exp_args:NNv \ProvideTextCommandDefault #1 { ? - \token_to_str:N #1 } }
+ \cs_if_exist:cF { ? \token_to_str:N #1 }
+ {
+ \cs_if_free:cF { ? - \token_to_str:N #1 }
+ {
+ \exp_args:NNv \ProvideTextCommandDefault #1
+ { ? - \token_to_str:N #1 }
+ }
+ }
}
% \end{macrocode}
% \end{macro}
@@ -11321,9 +11344,9 @@
\tl_if_blank:nTF {#1}
{ \cs_if_exist_use:cTF { ? #2 } { {#1} } {#1} }
{
- \bool_lazy_and:nnTF
- { \@@_glyph_if_exist_p:n { `#3 } }
- { \@@_glyph_if_exist_p:n { `#4 } }
+ \@@_glyph_if_exist:nTF { `#3 }
+ { \@@_glyph_if_exist:nTF { `#4 } }
+ { \use_ii:nn }
{ #1#3#4 }
{ \cs_if_exist_use:cTF { ? #2 } { {#1} } { #1#3#4 } }
}
Modified: trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty 2018-02-27 20:36:27 UTC (rev 46755)
+++ trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty 2018-02-27 20:36:43 UTC (rev 46756)
@@ -29,10 +29,10 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: xeCJK.dtx 54327e6 2018-01-28 19:10:14 +0800 Qing Lee <sobenlee at gmail.com> $
+\GetIdInfo$Id: xeCJK.dtx 25e85c2 2018-02-27 02:44:39 +0800 Qing Lee <sobenlee at gmail.com> $
{xeCJK patch file for listings}
\ProvidesExplPackage{xeCJK-listings}
- {\ExplFileDate}{3.6.0}{\ExplFileDescription}
+ {\ExplFileDate}{3.6.1}{\ExplFileDescription}
\DeclareOption* { \PassOptionsToPackage { \CurrentOption } { xeCJK } }
\ProcessOptions \scan_stop:
\RequirePackage { xeCJK }
@@ -201,14 +201,12 @@
\lst at whitespacefalse
\bool_if:NTF \l__xeCJK_listings_letter_bool
{
- \bool_lazy_or:nnF
- { \int_compare_p:nNn \l__xeCJK_listings_flag_int = \c_two }
+ \int_compare:nNnF \l__xeCJK_listings_flag_int = \c_two
{
- \bool_lazy_and_p:nn
- { \int_compare_p:nNn \l__xeCJK_listings_flag_int = \c_three }
- { ! \l__xeCJK_punct_breakable_bool }
+ \int_compare:nNnTF \l__xeCJK_listings_flag_int = \c_three
+ { \bool_if:NT \l__xeCJK_punct_breakable_bool { \lst at Output } }
+ { \lst at Output }
}
- { \lst at Output }
\lst at lettertrue
}
{
@@ -223,10 +221,8 @@
\lst at whitespacefalse
\bool_if:NTF \l__xeCJK_listings_letter_bool
{
- \bool_lazy_and:nnT
- { \int_compare_p:nNn \l__xeCJK_listings_flag_int < \c_two }
- { \__xeCJK_punct_if_long_p:N #2 }
- { \lst at Output }
+ \int_compare:nNnT \l__xeCJK_listings_flag_int < \c_two
+ { \__xeCJK_punct_if_long:NT #2 { \lst at Output } }
\lst at lettertrue
}
{
Modified: trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg 2018-02-27 20:36:27 UTC (rev 46755)
+++ trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg 2018-02-27 20:36:43 UTC (rev 46756)
@@ -6,10 +6,10 @@
%%
%% xeCJK.dtx (with options: `config')
%%
-\GetIdInfo$Id: xeCJK.dtx 54327e6 2018-01-28 19:10:14 +0800 Qing Lee <sobenlee at gmail.com> $
+\GetIdInfo$Id: xeCJK.dtx 25e85c2 2018-02-27 02:44:39 +0800 Qing Lee <sobenlee at gmail.com> $
{Configuration file for xeCJK package}
\ProvidesExplFile{\ExplFileName.cfg}
- {\ExplFileDate}{3.6.0}{\ExplFileDescription}
+ {\ExplFileDate}{3.6.1}{\ExplFileDescription}
%%
%%
Modified: trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty 2018-02-27 20:36:27 UTC (rev 46755)
+++ trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty 2018-02-27 20:36:43 UTC (rev 46756)
@@ -29,10 +29,10 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: xeCJK.dtx 54327e6 2018-01-28 19:10:14 +0800 Qing Lee <sobenlee at gmail.com> $
+\GetIdInfo$Id: xeCJK.dtx 25e85c2 2018-02-27 02:44:39 +0800 Qing Lee <sobenlee at gmail.com> $
{Typesetting CJK scripts with XeLaTeX}
\ProvidesExplPackage{\ExplFileName}
- {\ExplFileDate}{3.6.0}{\ExplFileDescription}
+ {\ExplFileDate}{3.6.1}{\ExplFileDescription}
\msg_new:nnn { xeCJK } { Require-XeTeX }
{
The~xeCJK~package~requires~XeTeX~to~function.\\\\
@@ -153,7 +153,7 @@
\tl_new:N \l__xeCJK_shipout_hook_tl
\bool_new:N \l__xeCJK_shipout_hook_bool
\cs_new_protected_nopar:Npn \xeCJK_tl_remove_outer_braces:N #1
- { \tl_set:Nx #1 { \exp_args:NV \xeCJK_tl_remove_outer_braces:n #1 } }
+ { \tl_set:Nx #1 { \exp_args:No \xeCJK_tl_remove_outer_braces:n {#1} } }
\cs_new:Npn \xeCJK_tl_remove_outer_braces:n #1
{
\exp_last_unbraced:Nf
@@ -161,11 +161,14 @@
}
\cs_new:Npn \__xeCJK_tl_remove_outer_braces:w #1 \s__stop
{
- \bool_lazy_and:nnTF
- { \tl_if_single_p:n {#1} }
- { ! ( \tl_if_head_is_N_type_p:n {#1} ) }
- { \xeCJK_tl_remove_outer_braces:n {#1} }
- { \tl_trim_spaces:n {#1} }
+ \tl_if_single:nTF {#1}
+ {
+ \tl_if_head_is_N_type:nTF {#1}
+ { \tl_trim_spaces:n }
+ { \xeCJK_tl_remove_outer_braces:n }
+ }
+ { \tl_trim_spaces:n }
+ {#1}
}
\cs_new_protected:Npn \xeCJK_cs_clear:N #1
{ \cs_set_eq:NN #1 \prg_do_nothing: }
@@ -803,9 +806,9 @@
}
\cs_new_protected_nopar:Npn \__xeCJK_check_for_ecglue:
{
- \bool_lazy_or:nnTF
- { \xeCJK_if_last_node_p:n { CJK } }
- { \xeCJK_if_last_node_p:n { CJK-widow } }
+ \xeCJK_if_last_node:nTF { CJK }
+ { \use_i:nn }
+ { \xeCJK_if_last_node:nTF { CJK-widow } }
{ \xeCJK_remove_node: \CJKecglue }
{
\xeCJK_if_last_node:nT { CJK-space }
@@ -1506,6 +1509,7 @@
}
\cs_new_protected_nopar:Npn \__xeCJK_bound_glue_auxii:n #1
{
+ \skip_set_eq:NN \l__xeCJK_last_skip \tex_lastskip:D
\skip_if_eq:nnTF { \l__xeCJK_last_skip } { 1sp }
{ \__xeCJK_zero_glue: }
{
@@ -1591,34 +1595,58 @@
{ \use_ii:nn }
}
}
-\cs_new_protected:Npn \__xeCJK_if_last_punct_glue:TF #1#2
+\cs_new_protected_nopar:Npn \__xeCJK_if_last_punct_glue:TF
{
+ \prop_get:NoNTF \g__xeCJK_punct_skip_prop
+ { \skip_use:N \tex_lastskip:D } \l__xeCJK_tmp_tl
+ { \__xeCJK_if_last_punct_glue_auxi:TF }
+ { \__xeCJK_if_last_punct_glue_auxii:TF }
+ }
+\cs_new_protected_nopar:Npn \__xeCJK_if_last_punct_glue_auxi:TF
+ {
\skip_set_eq:NN \l__xeCJK_last_skip \tex_lastskip:D
\tex_unskip:D
\int_compare:nNnTF \tex_lastpenalty:D = \c_ten_thousand
- { \__xeCJK_if_last_punct_auxi:TF }
+ { \__xeCJK_if_last_punct_auxi:TF { \use_i:nn } }
{
\xeCJK_if_last_node:TF
- { \__xeCJK_if_last_punct_auxii:TF }
- { \__xeCJK_if_last_punct_auxiii:TF }
+ { \__xeCJK_if_last_punct_auxii:TF { \use_i:nn } }
+ { \use:n }
}
- {#1}
- { \skip_horizontal:N \l__xeCJK_last_skip #2 }
+ { \skip_horizontal:N \l__xeCJK_last_skip \use_ii:nn }
}
-\cs_new_protected:Npn \__xeCJK_if_last_punct_penalty:TF #1#2
+\cs_new_protected_nopar:Npn \__xeCJK_if_last_punct_glue_auxii:TF
{
+ \int_gset_eq:NN \g__xeCJK_space_factor_int \tex_spacefactor:D
+ \skip_if_eq:nnTF { \tex_lastskip:D } { \c_xeCJK_space_skip_tl }
+ { \__xeCJK_if_last_punct_glue_auxiii:TF }
+ { \use_ii:nn }
+ }
+\cs_new_protected_nopar:Npn \__xeCJK_if_last_punct_glue_auxiii:TF
+ {
+ \skip_set_eq:NN \l__xeCJK_tmp_skip \tex_lastskip:D
+ \tex_unskip:D
+ \int_compare:nNnTF \etex_lastnodetype:D = \c_eleven
+ {
+ \prop_get:NoNTF \g__xeCJK_punct_skip_prop
+ { \skip_use:N \tex_lastskip:D } \l__xeCJK_tmp_tl
+ { \__xeCJK_if_last_punct_glue_auxi:TF { \use_i:nn } }
+ { \use:n }
+ }
+ { \use:n }
+ { \skip_horizontal:N \l__xeCJK_tmp_skip \use_ii:nn }
+ }
+\cs_new_protected_nopar:Npn \__xeCJK_if_last_punct_penalty:TF
+ {
\int_set_eq:NN \l__xeCJK_last_penalty_int \tex_lastpenalty:D
\tex_unpenalty:D
\bool_set_true:N \l__xeCJK_last_penalty_bool
\int_compare:nNnTF \etex_lastnodetype:D = \c_eleven
- {
- \__xeCJK_if_last_punct_glue:TF
- {#1}
- { \tex_penalty:D \l__xeCJK_last_penalty_int #2 }
- }
- { \tex_penalty:D \l__xeCJK_last_penalty_int #2 }
+ { \__xeCJK_if_last_punct_glue:TF { \use_i:nn } }
+ { \use:n }
+ { \tex_penalty:D \l__xeCJK_last_penalty_int \use_ii:nn }
}
-\cs_new_protected:Npn \__xeCJK_if_last_punct_auxi:TF #1#2
+\cs_new_protected_nopar:Npn \__xeCJK_if_last_punct_auxi:TF
{
\tex_unpenalty:D
\bool_if:NF \l__xeCJK_last_penalty_bool
@@ -1626,12 +1654,19 @@
\bool_set_true:N \l__xeCJK_last_penalty_bool
\int_set_eq:NN \l__xeCJK_last_penalty_int \c_ten_thousand
}
- \__xeCJK_if_last_punct_auxiv:TF
- {#1}
- { \xeCJK_no_break: #2 }
+ \xeCJK_if_last_node:TF
+ { \__xeCJK_if_last_punct_auxii:TF { \use_i:nn } }
+ { \use:n }
+ { \xeCJK_no_break: \use_ii:nn }
}
-\cs_new_protected:Npn \__xeCJK_if_last_punct_auxii:TF #1#2
+\cs_new_protected_nopar:Npn \__xeCJK_if_last_punct_auxii:TF
{
+ \dim_compare:nNnTF \l__xeCJK_last_kern_dim > \c_zero_dim
+ { \__xeCJK_if_last_punct_auxiii:TF }
+ { \__xeCJK_make_node:N \l__xeCJK_last_kern_dim \use_ii:nn }
+ }
+\cs_new_protected_nopar:Npn \__xeCJK_if_last_punct_auxiii:TF
+ {
\int_case:nnTF { \xetex_charclass:D \l__xeCJK_last_kern_dim }
{
{ \xeCJK_class_num:n { FullRight } }
@@ -1639,23 +1674,11 @@
{ \xeCJK_class_num:n { FullLeft } }
{ \tl_set_eq:NN \l__xeCJK_aligni_tl \c__xeCJK_left_tl }
}
- { \__xeCJK_if_last_punct_auxv:TF {#1} {#2} }
- { \__xeCJK_make_node:N \l__xeCJK_last_kern_dim #2 }
- }
-\cs_new_protected_nopar:Npn \__xeCJK_if_last_punct_auxiii:TF
- {
- \int_compare:nNnTF \etex_lastnodetype:D = \c_eleven
- { \__xeCJK_if_last_punct_auxvi:TF }
+ { \__xeCJK_if_last_punct_auxiv:TF }
{ \use_ii:nn }
}
\cs_new_protected_nopar:Npn \__xeCJK_if_last_punct_auxiv:TF
{
- \xeCJK_if_last_node:TF
- { \__xeCJK_if_last_punct_auxii:TF }
- { \use_ii:nn }
- }
-\cs_new_protected:Npn \__xeCJK_if_last_punct_auxv:TF #1#2
- {
\dim_set_eq:NN \l__xeCJK_tmp_dim \l__xeCJK_last_kern_dim
\xeCJK_if_last_node:TF
{
@@ -1662,27 +1685,10 @@
\tl_gset:Nx \g__xeCJK_last_punct_tl
{ \utex_char:D \l__xeCJK_tmp_dim }
\dim_set_eq:NN \l__xeCJK_last_bound_dim \l__xeCJK_last_kern_dim
- #1
+ \use_i:nn
}
- { \__xeCJK_make_node:N \l__xeCJK_tmp_dim #2 }
+ { \__xeCJK_make_node:N \l__xeCJK_tmp_dim \use_ii:nn }
}
-\cs_new_protected:Npn \__xeCJK_if_last_punct_auxvi:TF #1#2
- {
- \int_gset_eq:NN \g__xeCJK_space_factor_int \tex_spacefactor:D
- \skip_if_eq:nnTF
- { \l__xeCJK_last_skip }
- { \c_xeCJK_space_skip_tl }
- {
- \skip_set_eq:NN \l__xeCJK_tmp_skip \tex_lastskip:D
- \tex_unskip:D
- \int_compare:nNnTF \tex_lastpenalty:D = \c_ten_thousand
- { \__xeCJK_if_last_punct_auxi:TF }
- { \__xeCJK_if_last_punct_auxiv:TF }
- { \skip_set_eq:NN \l__xeCJK_last_skip \l__xeCJK_tmp_skip #1 }
- { \skip_horizontal:N \l__xeCJK_tmp_skip #2 }
- }
- {#2}
- }
\tl_new:N \l__xeCJK_aligni_tl
\tl_new:N \l__xeCJK_alignii_tl
\int_new:N \l__xeCJK_last_penalty_int
@@ -2306,39 +2312,50 @@
\cs_new:Npn \__xeCJK_use_punct_skip_minus:nNN #1#2#3
{ \use:c { \__xeCJK_punct_csname:n { skip/minus/#1/#2/#3 } } }
\cs_new_protected:Npn \__xeCJK_save_punct_dim:nNn #1#2
- { \__xeCJK_save_punct_width_aux:nnn { dim } { #1/#2 } }
+ { \__xeCJK_save_punct_width_aux:nnnn { dim } {#1} { #1/#2 } }
\cs_new_protected:Npn \__xeCJK_save_punct_dim:nNNn #1#2#3
- { \__xeCJK_save_punct_width_aux:nnn { dim } { #1/#2/#3 } }
+ { \__xeCJK_save_punct_width_aux:nnnn { dim } {#1} { #1/#2/#3 } }
\cs_new_protected:Npn \__xeCJK_save_punct_skip:nNNn #1#2#3#4
{
- \__xeCJK_save_punct_width_aux:nnn { skip } { #1/#2/#3 } {#4}
- \__xeCJK_save_punct_width_aux:nnn { skip } { plus/#1/#2/#3 } {#4}
- \__xeCJK_save_punct_width_aux:nnn { skip } { minus/#1/#2/#3 } {#4}
+ \__xeCJK_save_punct_width_aux:nnnn { skip } {#1} { #1/#2/#3 } {#4}
+ \__xeCJK_save_punct_width_aux:nnnn { skip } {#1} { plus/#1/#2/#3 } {#4}
+ \__xeCJK_save_punct_width_aux:nnnn { skip } {#1} { minus/#1/#2/#3 } {#4}
}
\cs_new_protected:Npn \__xeCJK_save_punct_skip:nNNnnn #1#2#3#4#5#6
{
\use:x
{
- \__xeCJK_save_punct_skip_aux:nnnn { #1/#2/#3 }
+ \__xeCJK_save_punct_skip_aux:nnnnn {#1} { #1/#2/#3 }
{ \dim_eval:n {#4} }
{ \dim_max:nn { \c_zero_dim } {#5} }
{ \dim_max:nn { \c_zero_dim } {#6} }
}
}
-\cs_new_protected:Npn \__xeCJK_save_punct_skip_aux:nnnn #1#2#3#4
+\cs_new_protected:Npn \__xeCJK_save_punct_skip_aux:nnnnn #1#2#3#4#5
{
- \__xeCJK_save_punct_width_aux:nnn { skip }
- {#1} { #2 ~ plus ~ #3 ~ minus ~ #4 ~ }
- \__xeCJK_save_punct_width_aux:nnn { skip }
- { plus/#1 } { #2 ~ plus ~ #3 ~ }
- \__xeCJK_save_punct_width_aux:nnn { skip }
- { minus/#1 } { #2 ~ minus ~ #4 ~ }
+ \__xeCJK_save_punct_width_aux:nnnn { skip } {#1}
+ {#2} { #3 ~ plus ~ #4 ~ minus ~ #5 ~ }
+ \__xeCJK_save_punct_width_aux:nnnn { skip } {#1}
+ { plus/#2 } { #3 ~ plus ~ #4 ~ }
+ \__xeCJK_save_punct_width_aux:nnnn { skip } {#1}
+ { minus/#2 } { #3 ~ minus ~ #5 ~ }
}
-\cs_new_protected:Npn \__xeCJK_save_punct_width_aux:nnn #1#2#3
+\cs_new_protected:Npn \__xeCJK_save_punct_width_aux:nnnn #1#2#3#4
{
- \tl_const:cx { \__xeCJK_punct_csname:n { #1/#2 } }
- { \use:c { #1_eval:n } {#3} }
+ \__xeCJK_save_punct_width_aux:cxn
+ { \__xeCJK_punct_csname:n { #1/#3 } }
+ { \use:c { #1_eval:n } {#4} }
+ {#2}
}
+\cs_new_protected:Npn \__xeCJK_save_punct_width_aux:Nnn #1#2#3
+ {
+ \tl_const:Nn #1 {#2}
+ \str_if_eq:nnT {#3} { glue }
+ { \prop_gput:Nnn \g__xeCJK_punct_skip_prop {#2} { } }
+ }
+\prop_new:N \g__xeCJK_punct_skip_prop
+\prop_gput:Non \g__xeCJK_punct_skip_prop { \skip_use:N \c_zero_skip } { }
+\cs_generate_variant:Nn \__xeCJK_save_punct_width_aux:Nnn { cx }
\cs_new_eq:NN \__xeCJK_use_dim_or_skip:nNN \__xeCJK_use_punct_skip:nNN
\DeclareObjectType { xeCJK / punctuation } { \c_zero }
\DeclareTemplateInterface { xeCJK / punctuation } { basic } { \c_zero }
Modified: trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty 2018-02-27 20:36:27 UTC (rev 46755)
+++ trunk/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty 2018-02-27 20:36:43 UTC (rev 46756)
@@ -29,10 +29,10 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: xeCJK.dtx 54327e6 2018-01-28 19:10:14 +0800 Qing Lee <sobenlee at gmail.com> $
+\GetIdInfo$Id: xeCJK.dtx 25e85c2 2018-02-27 02:44:39 +0800 Qing Lee <sobenlee at gmail.com> $
{xeCJK font effect}
\ProvidesExplPackage{xeCJKfntef}
- {\ExplFileDate}{3.6.0}{\ExplFileDescription}
+ {\ExplFileDate}{3.6.1}{\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 2018-02-27 20:36:27 UTC (rev 46755)
+++ trunk/Master/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty 2018-02-27 20:36:43 UTC (rev 46756)
@@ -29,10 +29,10 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: xeCJK.dtx 54327e6 2018-01-28 19:10:14 +0800 Qing Lee <sobenlee at gmail.com> $
+\GetIdInfo$Id: xeCJK.dtx 25e85c2 2018-02-27 02:44:39 +0800 Qing Lee <sobenlee at gmail.com> $
{addon file for xunicode}
\ProvidesExplPackage{xunicode-addon}
- {\ExplFileDate}{3.6.0}{\ExplFileDescription}
+ {\ExplFileDate}{3.6.1}{\ExplFileDescription}
\bool_lazy_or:nnF
{ \sys_if_engine_xetex_p: }
{ \sys_if_engine_luatex_p: }
@@ -179,16 +179,20 @@
\cs_new_protected:Npn \__xunadd_undeclare_composite:Nnnn #1#2#3#4
{ \cs_undefine:c { \__xunadd_composite_cs:Nnn #1 {#2} {#3} } }
\cs_new:Npx \__xunadd_composite_cs:Nnn #1#2#3
- { \cs_to_str:N \\ #2 \exp_not:N \token_to_str:N #1 - \exp_not:N \tl_to_str:n {#3} }
+ { \c_backslash_str #2 \exp_not:N \token_to_str:N #1 - \exp_not:N \tl_to_str:n {#3} }
\cs_new:Npx \__xunadd_composite_cs:nnn #1#2#3
- { \cs_to_str:N \\ #2 #1 - \exp_not:N \tl_to_str:n {#3} }
+ { \c_backslash_str #2 #1 - \exp_not:N \tl_to_str:n {#3} }
\prg_new_conditional:Npnn \__xunadd_if_csname:n #1 { TF }
{
\tl_if_single_token:nTF {#1}
{
- \if_predicate:w
- \bool_if_p:n { \token_if_cs_p:N #1 || \token_if_active_p:N #1 }
- \prg_return_true: \else: \prg_return_false: \fi:
+ \token_if_cs:NTF #1
+ { \prg_return_true: }
+ {
+ \token_if_active:NTF #1
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
}
{ \prg_return_false: }
}
@@ -242,10 +246,14 @@
}
\cs_new_protected:Npn \__xunadd_provide_text_command_default:N #1
{
- \bool_lazy_or:nnF
- { \cs_if_exist_p:c { ? \token_to_str:N #1 } }
- { \cs_if_free_p:c { ? - \token_to_str:N #1 } }
- { \exp_args:NNv \ProvideTextCommandDefault #1 { ? - \token_to_str:N #1 } }
+ \cs_if_exist:cF { ? \token_to_str:N #1 }
+ {
+ \cs_if_free:cF { ? - \token_to_str:N #1 }
+ {
+ \exp_args:NNv \ProvideTextCommandDefault #1
+ { ? - \token_to_str:N #1 }
+ }
+ }
}
\cs_new_protected:Npn \__xunadd_declare_character:NNnn #1#2#3#4
{ \DeclareTextCommand #2 {#4} { \__xunadd_text_character:nN {#3} {#1} } }
@@ -408,9 +416,9 @@
\tl_if_blank:nTF {#1}
{ \cs_if_exist_use:cTF { ? #2 } { {#1} } {#1} }
{
- \bool_lazy_and:nnTF
- { \__xunadd_glyph_if_exist_p:n { `#3 } }
- { \__xunadd_glyph_if_exist_p:n { `#4 } }
+ \__xunadd_glyph_if_exist:nTF { `#3 }
+ { \__xunadd_glyph_if_exist:nTF { `#4 } }
+ { \use_ii:nn }
{ #1#3#4 }
{ \cs_if_exist_use:cTF { ? #2 } { {#1} } { #1#3#4 } }
}
Modified: trunk/Master/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def 2018-02-27 20:36:27 UTC (rev 46755)
+++ trunk/Master/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def 2018-02-27 20:36:43 UTC (rev 46756)
@@ -27,10 +27,10 @@
%%
%% ----------------------------------------------------------------------
%%
-\GetIdInfo$Id: xeCJK.dtx 54327e6 2018-01-28 19:10:14 +0800 Qing Lee <sobenlee at gmail.com> $
+\GetIdInfo$Id: xeCJK.dtx 25e85c2 2018-02-27 02:44:39 +0800 Qing Lee <sobenlee at gmail.com> $
{extra definition for xunicode}
\ProvidesExplFile{xunicode-extra.def}
- {\ExplFileDate}{3.6.0}{\ExplFileDescription}
+ {\ExplFileDate}{3.6.1}{\ExplFileDescription}
\DeclareUTFComposite\textsuperscript
\DeclareUTFComposite\textsubscript
\DeclareUTFEncodedAccent\textsbleftarrow{"20EE}{"20FF}
More information about the tex-live-commits
mailing list