summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/xecjk
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-05-15 21:47:05 +0000
committerKarl Berry <karl@freefriends.org>2015-05-15 21:47:05 +0000
commitff006c2d366e4f0f3503a131959ab1ae04ea5e5f (patch)
tree5bd1fb5973b570c58af7743d199882d28b2a17fd /Master/texmf-dist/tex/xelatex/xecjk
parentda5eaf8777934443b5a33ff8ed1d8c195c1e3034 (diff)
xecjk (15may15)
git-svn-id: svn://tug.org/texlive/trunk@37409 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xecjk')
-rw-r--r--Master/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty106
-rw-r--r--Master/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg (renamed from Master/texmf-dist/tex/xelatex/xecjk/config/xeCJK.cfg)4
-rw-r--r--Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty182
-rw-r--r--Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty14
-rw-r--r--Master/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty24
-rw-r--r--Master/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def14
6 files changed, 202 insertions, 142 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty
index e8f62332b2f..2ff396c76be 100644
--- a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty
+++ b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty
@@ -6,8 +6,6 @@
%%
%% xeCJK.dtx (with options: `listings')
%%
-%% $Id: xeCJK.dtx 750 2014-12-26 08:13:35Z sobenlee@gmail.com $
-%% $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
%% -----------------------------------------------------------------
%% Author:
%% Wenchang Sun <sunwch@nankai.edu.cn>
@@ -15,9 +13,9 @@
%% Leo Liu <leoliu.pku@gmail.com>
%% Qing Lee <sobenlee@gmail.com>
%%
-%% Copyright (C) 2007--2014 Wenchang Sun
-%% (C) 2009--2014 Leo Liu
-%% (C) 2012--2014 Qing Lee
+%% Copyright (C) 2007--2015 Wenchang Sun
+%% (C) 2009--2015 Leo Liu
+%% (C) 2012--2015 Qing Lee
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -33,11 +31,11 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: xeCJK.dtx 750 2014-12-26 08:13:35Z sobenlee@gmail.com $
+\GetIdInfo$Id: xeCJK.dtx 7321d12 2015-05-15 23:07:58 +0800 Qing Lee <sobenlee@gmail.com> $
{xeCJK patch file for listings}
\ProvidesExplPackage
{xeCJK-listings}
- {\ExplFileDate}{3.3.0}{\ExplFileDescription}
+ {\ExplFileDate}{3.3.2}{\ExplFileDescription}
\DeclareOption* { \PassOptionsToPackage { \CurrentOption } { xeCJK } }
\ProcessOptions \scan_stop:
\RequirePackage { xeCJK }
@@ -48,47 +46,58 @@
{
\tl_set_eq:NN \l_xeCJK_punct_style_tl \c__xeCJK_punct_style_plain_tl
\l__xeCJK_restore_listings_toks_tl
- \__xeCJK_listings_output_IVS:
+ \__xeCJK_listings_output_CM:
}
\lst@AddToHook { PreSet } { \bool_set_true:N \l__xeCJK_listings_env_bool }
\cs_new_protected_nopar:Npn \__xeCJK_listings_initial_hook:
{
\tex_noindent:D
- \bool_gset_false:N \g__xeCJK_listings_IVS_bool
+ \bool_gset_false:N \g__xeCJK_listings_CM_bool
\tl_put_left:Nn \lst@numberstyle { \l__xeCJK_restore_listings_toks_tl }
\xeCJK_add_to_shipout:n { \l__xeCJK_restore_listings_toks_tl }
\lst@ifbreaklines
\cs_set_eq:NN \__xeCJK_listings_CJK_toks_hook: \__xeCJK_listings_breaklines_toks:
+ \tl_if_empty:NF \lst@prebreak
+ { \tl_put_left:Nn \lst@prebreak { \l__xeCJK_restore_listings_toks_tl } }
+ \tl_if_empty:NF \lst@postbreak
+ { \tl_put_left:Nn \lst@postbreak { \l__xeCJK_restore_listings_toks_tl } }
\fi:
+ \int_set:Nn \l__xeCJK_listings_max_char_int
+ { \lst@ifec 255 \else: 127 \fi: }
}
+\int_new:N \l__xeCJK_listings_max_char_int
\cs_new_protected_nopar:Npn \__xeCJK_listings_toks_hook:
{
- \tl_set:Nx \l__xeCJK_restore_listings_toks_tl
+ \tl_clear:N \l__xeCJK_restore_listings_toks_tl
+ \seq_map_function:NN
+ \g__xeCJK_class_seq \__xeCJK_backup_inter_class_toks:n
+ \seq_map_inline:Nn \g__xeCJK_non_CJK_class_seq
{
- \__xeCJK_backup_inter_class_toks:nn { Boundary } { Default }
- \__xeCJK_backup_inter_class_toks:nn { Boundary } { CJK }
- \__xeCJK_backup_inter_class_toks:nn { Boundary } { IVS }
- \__xeCJK_backup_inter_class_toks:nn { Boundary } { HangulJamo }
- \__xeCJK_backup_inter_class_toks:nn { Boundary } { FullLeft }
- \__xeCJK_backup_inter_class_toks:nn { Boundary } { FullRight }
- }
- \seq_map_inline:Nn \g__xeCJK_CJK_sub_class_seq
- {
- \tl_put_right:Nx \l__xeCJK_restore_listings_toks_tl
- { \__xeCJK_backup_inter_class_toks:nn { Boundary } { CJK/##1 } }
+ \str_if_eq:nnF { ##1 } { Boundary }
+ {
+ \xeCJK_inter_class_toks:nnn { Boundary } { ##1 }
+ { \__xeCJK_listings_process_Default:nN { ##1 } }
+ }
}
- \xeCJK_inter_class_toks:nnn { Boundary } { Default }
- { \__xeCJK_listings_process_Default:N }
- \xeCJK_inter_class_toks:nnn { Boundary } { IVS }
- { \__xeCJK_listings_process_IVS:nN { \c_zero } }
+ \xeCJK_inter_class_toks:nnn { Boundary } { CM }
+ { \__xeCJK_listings_process_CM:nN { \c_zero } }
\__xeCJK_listings_CJK_toks_hook:
}
-\tl_new:N \l__xeCJK_restore_listings_toks_tl
-\cs_new_nopar:Npn \__xeCJK_backup_inter_class_toks:nn #1#2
+\cs_new_protected_nopar:Npn \__xeCJK_backup_inter_class_toks:n #1
{
- \xeCJK_inter_class_toks:nnn {#1} {#2}
- { \xeCJK_get_inter_class_toks:nn {#1} {#2} }
+ \tl_set:Nx \l__xeCJK_tmp_tl
+ { \xeCJK_get_inter_class_toks:nn { Boundary } {#1} }
+ \tl_put_right:Nx \l__xeCJK_restore_listings_toks_tl
+ {
+ \xeCJK_inter_class_toks:nnn { Boundary } {#1}
+ {
+ \tl_if_empty:NTF \l__xeCJK_tmp_tl
+ { \exp_not:N \prg_do_nothing: }
+ { \exp_not:o \l__xeCJK_tmp_tl }
+ }
+ }
}
+\tl_new:N \l__xeCJK_restore_listings_toks_tl
\cs_new_protected_nopar:Npn \__xeCJK_listings_CJK_toks_hook:
{
\xeCJK_inter_class_toks:nnn { Boundary } { CJK }
@@ -121,11 +130,24 @@
{ \__xeCJK_listings_process_breaklines_CJK:nN { \c_two } }
}
}
-\cs_new_protected_nopar:Npn \__xeCJK_listings_process_Default:N #1
+\cs_new_protected_nopar:Npn \__xeCJK_listings_process_Default:nN #1#2
+ {
+ \int_compare:nNnTF
+ { \xeCJK_token_value_charcode:N #2 } > \l__xeCJK_listings_max_char_int
+ {
+ \token_if_letter:NTF #2
+ { \lst@ProcessLetter #2 }
+ { \lst@ProcessOther #2 }
+ }
+ { \__xeCJK_listings_output_Default:nN {#1} #2 }
+ }
+\cs_new_protected_nopar:Npn \__xeCJK_listings_output_Default:nN #1#2
{
- \token_if_letter:NTF #1
- { \lst@ProcessLetter #1 }
- { \lst@ProcessOther #1 }
+ \group_begin:
+ \xeCJK_clear_inter_class_toks:nn { Boundary } {#1}
+ \xeCJK_inter_class_toks:nnn {#1} { Boundary } { \group_end: }
+ #2
+ \scan_stop:
}
\cs_new_protected_nopar:Npn \__xeCJK_listings_process_CJK:nN #1#2
{
@@ -240,25 +262,25 @@
\lst@ifbreaklines \int_zero:N \l__xeCJK_listings_flag_int \fi:
\tex_futurelet:D \lst@lastother \lst@Append
}
-\cs_new_protected_nopar:Npn \__xeCJK_listings_process_IVS:nN
+\cs_new_protected_nopar:Npn \__xeCJK_listings_process_CM:nN
{
\reverse_if:N \lst@ifflexible
- \bool_gset_true:N \g__xeCJK_listings_IVS_bool
+ \bool_gset_true:N \g__xeCJK_listings_CM_bool
\fi:
\__xeCJK_listings_process_letter:nN
}
-\cs_new_protected_nopar:Npn \__xeCJK_listings_output_IVS:
+\cs_new_protected_nopar:Npn \__xeCJK_listings_output_CM:
{
\reverse_if:N \lst@ifflexible
- \bool_if:NT \g__xeCJK_listings_IVS_bool
+ \bool_if:NT \g__xeCJK_listings_CM_bool
{
- \bool_gset_false:N \g__xeCJK_listings_IVS_bool
+ \bool_gset_false:N \g__xeCJK_listings_CM_bool
\xeCJK_cs_clear:N \lst@FillOutputBox
\cs_set_eq:NN \CJKglue \tex_hss:D
}
\fi:
}
-\bool_new:N \g__xeCJK_listings_IVS_bool
+\bool_new:N \g__xeCJK_listings_CM_bool
\cs_new_protected:Npn \__xeCJK_listings_peek_active_loop:TF #1#2#3
{
\token_if_active:NTF #3
@@ -267,7 +289,7 @@
\token_if_cs:NTF #3
{ #2#3 }
{
- \int_compare:nNnTF { `#3 } > { \lst@ifec 255 \else: 127 \fi: }
+ \int_compare:nNnTF { `#3 } > { \l__xeCJK_listings_max_char_int }
{ \__xeCJK_listings_peek_active_loop:TF { #1#3 } { #2#3 } }
{ #2#3 }
}
@@ -284,7 +306,7 @@
\cs_new_protected_nopar:Npn \__xeCJK_listings_inline_group:w
{
\exp_after:wN \__xeCJK_listings_inline_group:n
- \exp_after:wN { \if_false: } \fi:
+ \exp_after:wN { \if_int_compare:w `} = \c_zero \fi:
}
\cs_set_eq:NN \lst@InlineGJ \__xeCJK_listings_inline_group:w
\cs_new_protected:Npn \__xeCJK_listings_inline_group:n #1
@@ -330,7 +352,7 @@
%% xeCJK-example-CJKfntef.tex,
%% xeCJK-example-punctstyle.tex,
%% xeCJK-example-verbatim.tex,
-%% xeCJK-example-IVS.tex,
+%% xeCJK-example-CM.tex,
%% xeCJK-example-listings.tex,
%% xunicode-symbols.tex,
%% xunicode-commands.tex,
diff --git a/Master/texmf-dist/tex/xelatex/xecjk/config/xeCJK.cfg b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg
index b336cc017f1..7cf00c1becc 100644
--- a/Master/texmf-dist/tex/xelatex/xecjk/config/xeCJK.cfg
+++ b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg
@@ -6,11 +6,11 @@
%%
%% xeCJK.dtx (with options: `config')
%%
-\GetIdInfo$Id: xeCJK.dtx 750 2014-12-26 08:13:35Z sobenlee@gmail.com $
+\GetIdInfo$Id: xeCJK.dtx 7321d12 2015-05-15 23:07:58 +0800 Qing Lee <sobenlee@gmail.com> $
{Configuration file for xeCJK package}
\ProvidesExplFile
{\ExplFileName.cfg}
- {\ExplFileDate}{3.3.0}{\ExplFileDescription}
+ {\ExplFileDate}{3.3.2}{\ExplFileDescription}
%%
%%
diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty
index 95567ec2e8f..565ad48c4e2 100644
--- a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty
+++ b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty
@@ -6,8 +6,6 @@
%%
%% xeCJK.dtx (with options: `package')
%%
-%% $Id: xeCJK.dtx 750 2014-12-26 08:13:35Z sobenlee@gmail.com $
-%% $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
%% -----------------------------------------------------------------
%% Author:
%% Wenchang Sun <sunwch@nankai.edu.cn>
@@ -15,9 +13,9 @@
%% Leo Liu <leoliu.pku@gmail.com>
%% Qing Lee <sobenlee@gmail.com>
%%
-%% Copyright (C) 2007--2014 Wenchang Sun
-%% (C) 2009--2014 Leo Liu
-%% (C) 2012--2014 Qing Lee
+%% Copyright (C) 2007--2015 Wenchang Sun
+%% (C) 2009--2015 Leo Liu
+%% (C) 2012--2015 Qing Lee
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -33,11 +31,11 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: xeCJK.dtx 750 2014-12-26 08:13:35Z sobenlee@gmail.com $
+\GetIdInfo$Id: xeCJK.dtx 7321d12 2015-05-15 23:07:58 +0800 Qing Lee <sobenlee@gmail.com> $
{Typesetting CJK scripts with XeLaTeX}
\ProvidesExplPackage
{\ExplFileName}
- {\ExplFileDate}{3.3.0}{\ExplFileDescription}
+ {\ExplFileDate}{3.3.2}{\ExplFileDescription}
\msg_new:nnn { xeCJK } { Require-XeTeX }
{
The~xeCJK~package~requires~XeTeX~to~function.\\\\
@@ -328,25 +326,39 @@
\cs_new_nopar:Npn \xeCJK_token_value_class:N #1
{ \XeTeXcharclass \xeCJK_token_value_charcode:N #1 }
\cs_new_nopar:Npn \xeCJK_token_value_charcode:N #1
- { \exp_after:wN \__xeCJK_token_value_charcode:w \token_to_meaning:N #1 \q_stop }
-\fp_compare:nNnTF { \int_use:N \xetex_XeTeXversion:D \XeTeXrevision } > { 0.9998 }
- {
- \cs_new_nopar:Npn \__xeCJK_token_value_charcode:w #1 ~ #2 ~ #3#4 \q_stop
- {
- \int_eval:n
- {
- \tl_if_empty:nTF {#4}
- { `#3 }
- { ( `#3 - "D800 ) * "400 + ( `#4 - "DC00 ) + "10000 }
- }
- }
- \cs_new_eq:NN \xeCJK_xetex_mathcode:w \Umathcode
- }
- {
- \cs_new_nopar:Npn \__xeCJK_token_value_charcode:w #1 ~ #2 ~ #3#4 \q_stop
- { \int_eval:n { \tl_if_empty:nTF {#4} { `#3 } { "20000 } } }
- \cs_new_eq:NN \xeCJK_xetex_mathcode:w \XeTeXmathcode
- }
+ { \exp_after:wN \__xeCJK_get_charcode:w \token_to_meaning:N #1 \q_stop }
+\group_begin:
+ \cs_set:Npn \__xeCJK_tmp:w #1 ~ #2 ~ #3#4#5 \q_stop
+ {
+ \tl_if_empty:nTF { #4#5 }
+ {
+ \cs_new_nopar:Npn \__xeCJK_get_charcode:w ##1 ~ ##2 ~ ##3 \q_stop
+ { \int_eval:n { `##3 } }
+ \cs_new_eq:NN \xeCJK_xetex_mathcode:w \Umathcode
+ }
+ {
+ \tl_if_empty:nTF {#5}
+ {
+ \cs_new_nopar:Npn \__xeCJK_get_charcode:w ##1 ~ ##2 ~ ##3##4 \q_stop
+ {
+ \int_eval:n
+ {
+ \tl_if_empty:nTF { ##4 }
+ { `##3 }
+ { ( `##3 - "D800 ) * "400 + ( `##4 - "DC00 ) + "10000 }
+ }
+ }
+ \cs_new_eq:NN \xeCJK_xetex_mathcode:w \Umathcode
+ }
+ {
+ \cs_new_nopar:Npn \__xeCJK_get_charcode:w ##1 ~ ##2 ~ ##3##4 \q_stop
+ { \int_eval:n { \tl_if_empty:nTF { ##4 } { `##3 } { "20000 } } }
+ \cs_new_eq:NN \xeCJK_xetex_mathcode:w \XeTeXmathcode
+ }
+ }
+ }
+ \exp_after:wN \__xeCJK_tmp:w \token_to_meaning:N ^^^^^20000 { } \q_stop
+\group_end:
\prg_new_conditional:Npnn \xeCJK_if_CJK_class:N #1 { p , T , F , TF }
{
\if_cs_exist:w \__xeCJK_CJK_class_tl:n { \xeCJK_token_value_class:N #1 } \cs_end:
@@ -409,7 +421,7 @@
\xeCJK_new_class:n { HalfLeft }
\xeCJK_new_class:n { HalfRight }
\xeCJK_new_class:n { NormalSpace }
-\xeCJK_new_class:n { IVS }
+\xeCJK_new_class:n { CM }
\xeCJK_new_class:n { HangulJamo }
\clist_const:Nn \c__xeCJK_HalfLeft_chars_clist
{ "28 , "5B , "60 , "7B , "2329 }
@@ -497,8 +509,9 @@
"2B740 -> "2B81F ,
"2F800 -> "2FA1F
}
-\clist_const:Nn \c__xeCJK_IVS_chars_clist
+\clist_const:Nn \c__xeCJK_CM_chars_clist
{
+ "302A -> "302F ,
"3099 -> "309A ,
"FE00 -> "FE0F ,
"E0100 -> "E01EF
@@ -521,7 +534,7 @@
\tl_const:cn { \__xeCJK_CJK_class_tl:c { \__xeCJK_class_csname:n {#1} } } {#1}
}
\clist_map_function:nN
- { CJK , FullLeft , FullRight , IVS , HangulJamo } \__xeCJK_save_CJK_class:n
+ { CJK , FullLeft , FullRight , CM , HangulJamo } \__xeCJK_save_CJK_class:n
\cs_new_nopar:Npn \xeCJK_class_num:n #1 { \use:c { \__xeCJK_class_csname:n {#1} } }
\NewDocumentCommand \xeCJKDeclareCharClass { s > { \TrimSpaces } m m }
{
@@ -541,7 +554,7 @@
{ \xeCJK_class_num:n {#1} }
}
}
- \xeCJK_set_char_class:nnn { "3099 } { "309A } { \xeCJK_class_num:n { IVS } }
+ \xeCJK_set_char_class:nnn { "3099 } { "309A } { \xeCJK_class_num:n { CM } }
}
\NewDocumentCommand \__xeCJK_set_char_class_aux:Nnw
{ m > { \SplitArgument { 1 } { -> } } m } { #1 #2 }
@@ -598,7 +611,7 @@
{
\xeCJK_declare_char_class:nV { CJK } \c__xeCJK_CJK_chars_clist
\xeCJK_declare_char_class:nV { NormalSpace } \c__xeCJK_NormalSpace_chars_clist
- \xeCJK_declare_char_class:nV { IVS } \c__xeCJK_IVS_chars_clist
+ \xeCJK_declare_char_class:nV { CM } \c__xeCJK_CM_chars_clist
\xeCJK_declare_char_class:nV { HangulJamo } \c__xeCJK_HangulJamo_chars_clist
\xeCJKResetPunctClass
}
@@ -625,8 +638,13 @@
\cs_new_protected_nopar:Npn \xeCJK_copy_inter_class_toks:nnnn #1#2#3#4
{
\tl_set:Nx \l__xeCJK_tmp_tl { \xeCJK_get_inter_class_toks:nn {#3} {#4} }
- \tl_if_empty:NF \l__xeCJK_tmp_tl
- { \xeCJK_inter_class_toks:nnx {#1} {#2} { \exp_not:V \l__xeCJK_tmp_tl } }
+ \tl_if_empty:NTF \l__xeCJK_tmp_tl
+ {
+ \tl_set:Nx \l__xeCJK_tmp_tl { \xeCJK_get_inter_class_toks:nn {#1} {#2} }
+ \tl_if_empty:NF \l__xeCJK_tmp_tl
+ { \xeCJK_clear_inter_class_toks:nn {#1} {#2} }
+ }
+ { \xeCJK_inter_class_toks:nnx {#1} {#2} { \exp_not:o \l__xeCJK_tmp_tl } }
}
\cs_new_protected_nopar:Npn \xeCJK_replace_inter_class_toks:nnnn #1#2#3#4
{
@@ -634,7 +652,7 @@
\tl_if_empty:NF \l__xeCJK_tmp_tl
{
\tl_replace_all:Nnn \l__xeCJK_tmp_tl {#3} {#4}
- \xeCJK_inter_class_toks:nnx {#1} {#2} { \exp_not:V \l__xeCJK_tmp_tl }
+ \xeCJK_inter_class_toks:nnx {#1} {#2} { \exp_not:o \l__xeCJK_tmp_tl }
}
}
\cs_new_protected_nopar:Npn \xeCJK_clear_Boundary_and_CJK_toks:
@@ -653,12 +671,12 @@
{
\seq_map_inline:Nn \g__xeCJK_class_seq
{
- \str_if_eq:nnTF {#1} { IVS }
- { \xeCJK_copy_inter_class_toks:nnnn { IVS } {#1} { CJK } { CJK } }
+ \str_if_eq:nnTF {#1} { CM }
+ { \xeCJK_copy_inter_class_toks:nnnn { CM } {#1} { CJK } { CJK } }
{
- \xeCJK_copy_inter_class_toks:nnnn { IVS } {#1} { CJK } {#1}
+ \xeCJK_copy_inter_class_toks:nnnn { CM } {#1} { CJK } {#1}
\str_if_eq:nnF {#1} { CJK }
- { \xeCJK_copy_inter_class_toks:nnnn {#1} { IVS } {#1} { CJK } }
+ { \xeCJK_copy_inter_class_toks:nnnn {#1} { CM } {#1} { CJK } }
}
}
}
@@ -716,7 +734,7 @@
\bool_if:nTF
{
\xeCJK_if_last_node_p:n { CJK } ||
- \xeCJK_if_last_node_p:n { CJK-nobreak }
+ \xeCJK_if_last_node_p:n { CJK-widow }
}
{ \xeCJK_remove_node: \CJKecglue }
{
@@ -800,8 +818,8 @@
{ \xeCJK_if_last_node_p:n { CJK } || \xeCJK_if_last_node_p:n { CJK-space } }
{ \xeCJK_remove_node: \CJKglue }
{
- \xeCJK_if_last_node:nTF { CJK-nobreak }
- { \xeCJK_remove_node: \xeCJK_no_break: \CJKglue }
+ \xeCJK_if_last_node:nTF { CJK-widow }
+ { \xeCJK_remove_node: \xeCJK_widow_penalty: \CJKglue }
{
\bool_if:nTF
{
@@ -878,7 +896,7 @@
\xeCJK_declare_node:n { CJK-space }
\xeCJK_declare_node:n { default }
\xeCJK_declare_node:n { default-space }
-\xeCJK_declare_node:n { CJK-nobreak }
+\xeCJK_declare_node:n { CJK-widow }
\xeCJK_declare_node:n { normalspace }
\keys_define:nn { xeCJK / options }
{
@@ -1393,6 +1411,13 @@
CheckSingle .default:n = { true } ,
CJKchecksingle .meta:n = { CheckSingle = true }
}
+\keys_define:nn { xeCJK / options }
+ {
+ WidowPenalty .int_set:N = \l__xeCJK_widow_penalty_int ,
+ WidowPenalty .default:n = { \c_ten_thousand }
+ }
+\cs_new_protected_nopar:Npn \xeCJK_widow_penalty:
+ { \tex_penalty:D \l__xeCJK_widow_penalty_int }
\cs_new_protected_nopar:Npn \xeCJK_check_single:Nw #1
{
\peek_catcode:NTF \c_catcode_letter_token
@@ -1479,8 +1504,8 @@
{
\peek_catcode:NTF \c_math_toggle_token
{
- \xeCJK_no_break: \__xeCJK_check_single_save:N #1
- \xeCJK_make_node:n { CJK-nobreak } #2 #4
+ \xeCJK_widow_penalty: \__xeCJK_check_single_save:N #1
+ \xeCJK_make_node:n { CJK-widow } #2 #4
}
{ \__xeCJK_check_single_save:N #1 #2#3#4 }
}
@@ -1492,8 +1517,8 @@
{ \group_align_safe_end: \use_iii:nnn }
{ \xeCJK_check_single_env:nnNn }
{
- \xeCJK_no_break: \__xeCJK_check_single_save:N #1
- \xeCJK_make_node:n { CJK-nobreak } #2
+ \xeCJK_widow_penalty: \__xeCJK_check_single_save:N #1
+ \xeCJK_make_node:n { CJK-widow } #2#3
}
{ \__xeCJK_check_single_save:N #1 #2#3 }
}
@@ -3006,9 +3031,10 @@
\cs_new_protected_nopar:Npn \__xeCJK_load_fandol:
{
\setCJKmainfont
- [ BoldFont = FandolSong-Bold , ItalicFont = FandolKai ] { FandolSong-Regular }
- \setCJKsansfont [ BoldFont = FandolHei-Bold ] { FandolHei-Regular }
- \setCJKmonofont { FandolFang }
+ [ Extension = .otf , BoldFont = FandolSong-Bold , ItalicFont = FandolKai-Regular ]
+ { FandolSong-Regular }
+ \setCJKsansfont [ Extension = .otf , BoldFont = FandolHei-Bold ] { FandolHei-Regular }
+ \setCJKmonofont [ Extension = .otf ] { FandolFang-Regular }
}
\__xeCJK_at_end_preamble:n
{
@@ -3501,6 +3527,7 @@
PunctStyle = quanjiao ,
NewLineCS = { \par \[ } ,
EnvCS = { \begin \end } ,
+ WidowPenalty = \c_ten_thousand ,
NoBreakCS = { \footnote \footnotemark \nobreak } ,
KaiMingPunct = { ^^^^3002 ^^^^ff0e ^^^^ff1f ^^^^ff01 } ,
LongPunct = { ^^^^2014 ^^^^2015 ^^^^2500 ^^^^2025 ^^^^2026 } ,
@@ -3664,20 +3691,25 @@
The~current~meaning~of~`#1'~is:\\
\iow_indent:n {#2}
}
-\__xeCJK_math_robust:N \(
-\__xeCJK_math_robust:N \)
-\__xeCJK_math_robust:N \math
-\__xeCJK_math_robust:N \endmath
-\__xeCJK_math_robust:N \ensuremath
-\bool_if:nF
+\cs_if_eq:NNTF \( \math
+ {
+ \__xeCJK_math_robust:N \(
+ \cs_set_eq:NN \math \(
+ }
{
- \xeCJK_if_package_loaded_p:n { amsmath } ||
- \xeCJK_if_package_loaded_p:n { amsthm }
+ \__xeCJK_math_robust:N \(
+ \__xeCJK_math_robust:N \math
}
+\cs_if_eq:NNTF \) \endmath
{
- \__xeCJK_math_robust:N \[
- \__xeCJK_math_robust:N \]
+ \__xeCJK_math_robust:N \)
+ \cs_set_eq:NN \endmath \)
}
+ {
+ \__xeCJK_math_robust:N \)
+ \__xeCJK_math_robust:N \endmath
+ }
+\__xeCJK_math_robust:N \ensuremath
\UndeclareTextCommand \nobreakspace { \UTFencname }
\RenewDocumentCommand \nobreakspace { } { \leavevmode \nobreak \ }
\AtBeginUTFCommand { \bool_if:NT \l__xeCJK_CJK_group_bool { \scan_stop: } }
@@ -3764,12 +3796,14 @@
}
{ \@@italiccorr }
}
+\cs_new_eq:NN \g__xeCJK_xetex_allocator_int \xe@alloc@intercharclass
\__xeCJK_after_end_preamble:n
{
\int_compare:nNnF
- { \c_three + \seq_count:N \g__xeCJK_new_class_seq } = \xe@alloc@intercharclass
+ { \c_three + \seq_count:N \g__xeCJK_new_class_seq } =
+ { \g__xeCJK_xetex_allocator_int }
{
- \int_step_inline:nnnn \c_four \c_one \xe@alloc@intercharclass
+ \int_step_inline:nnnn \c_four \c_one \g__xeCJK_xetex_allocator_int
{
\seq_if_in:NnF \g__xeCJK_new_class_seq {#1}
{ \__xeCJK_set_others_toks:n {#1} }
@@ -3946,14 +3980,22 @@
{ \cs_new_eq:NN \Unicode \xeCJK_unicode_char:nn }
}
}
-\cs_new_protected_nopar:Npn \xeCJK_char_from_charcode:Nn #1#2
+\str_if_eq_x:nnTF
+ { \token_to_str:N \Ucharcat } { \token_to_meaning:N \Ucharcat }
{
- \group_begin:
- \char_set_lccode:nn { "4E00 } {#2}
- \tl_to_lowercase:n
+ \cs_new_protected_nopar:Npn \xeCJK_char_from_charcode:Nn #1#2
+ { \tl_const:Nx #1 { \Ucharcat \int_eval:n {#2} ~ \c_eleven } }
+ }
+ {
+ \cs_new_protected_nopar:Npn \xeCJK_char_from_charcode:Nn #1#2
{
- \group_end:
- \tl_const:Nn #1 { ^^^^4e00 }
+ \group_begin:
+ \char_set_lccode:nn { "4E00 } {#2}
+ \tex_lowercase:D
+ {
+ \group_end:
+ \tl_const:Nn #1 { ^^^^4e00 }
+ }
}
}
\cs_new_nopar:Npn \__xeCJK_calc_unicode:nn #1#2
@@ -3962,9 +4004,9 @@
{ \tex_char:D \etex_numexpr:D \__xeCJK_calc_unicode:nn {#1} {#2} \scan_stop: }
\bool_if:NT \g__xeCJK_config_bool
{
- \@pushfilename
+ \ExplSyntaxOff
\file_input:n { \g__xeCJK_config_name_tl .cfg }
- \@popfilename
+ \ExplSyntaxOn
}
%%
%% This package consists of the file xeCJK.dtx,
@@ -3988,7 +4030,7 @@
%% xeCJK-example-CJKfntef.tex,
%% xeCJK-example-punctstyle.tex,
%% xeCJK-example-verbatim.tex,
-%% xeCJK-example-IVS.tex,
+%% xeCJK-example-CM.tex,
%% xeCJK-example-listings.tex,
%% xunicode-symbols.tex,
%% xunicode-commands.tex,
diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty b/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty
index 26fb5c9d937..de0230a2d9c 100644
--- a/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty
+++ b/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty
@@ -6,8 +6,6 @@
%%
%% xeCJK.dtx (with options: `fntef')
%%
-%% $Id: xeCJK.dtx 750 2014-12-26 08:13:35Z sobenlee@gmail.com $
-%% $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
%% -----------------------------------------------------------------
%% Author:
%% Wenchang Sun <sunwch@nankai.edu.cn>
@@ -15,9 +13,9 @@
%% Leo Liu <leoliu.pku@gmail.com>
%% Qing Lee <sobenlee@gmail.com>
%%
-%% Copyright (C) 2007--2014 Wenchang Sun
-%% (C) 2009--2014 Leo Liu
-%% (C) 2012--2014 Qing Lee
+%% Copyright (C) 2007--2015 Wenchang Sun
+%% (C) 2009--2015 Leo Liu
+%% (C) 2012--2015 Qing Lee
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -33,11 +31,11 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: xeCJK.dtx 750 2014-12-26 08:13:35Z sobenlee@gmail.com $
+\GetIdInfo$Id: xeCJK.dtx 7321d12 2015-05-15 23:07:58 +0800 Qing Lee <sobenlee@gmail.com> $
{xeCJK font effect}
\ProvidesExplPackage
{xeCJKfntef}
- {\ExplFileDate}{3.3.0}{\ExplFileDescription}
+ {\ExplFileDate}{3.3.2}{\ExplFileDescription}
\PassOptionsToPackage { normalem } { ulem }
\DeclareOption* { \PassOptionsToPackage { \CurrentOption } { ulem } }
\ProcessOptions \scan_stop:
@@ -1036,7 +1034,7 @@
%% xeCJK-example-CJKfntef.tex,
%% xeCJK-example-punctstyle.tex,
%% xeCJK-example-verbatim.tex,
-%% xeCJK-example-IVS.tex,
+%% xeCJK-example-CM.tex,
%% xeCJK-example-listings.tex,
%% xunicode-symbols.tex,
%% xunicode-commands.tex,
diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty b/Master/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty
index 7c14a2bb634..a578dfd8b21 100644
--- a/Master/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty
+++ b/Master/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty
@@ -6,8 +6,6 @@
%%
%% xeCJK.dtx (with options: `xunicode')
%%
-%% $Id: xeCJK.dtx 750 2014-12-26 08:13:35Z sobenlee@gmail.com $
-%% $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
%% -----------------------------------------------------------------
%% Author:
%% Wenchang Sun <sunwch@nankai.edu.cn>
@@ -15,9 +13,9 @@
%% Leo Liu <leoliu.pku@gmail.com>
%% Qing Lee <sobenlee@gmail.com>
%%
-%% Copyright (C) 2007--2014 Wenchang Sun
-%% (C) 2009--2014 Leo Liu
-%% (C) 2012--2014 Qing Lee
+%% Copyright (C) 2007--2015 Wenchang Sun
+%% (C) 2009--2015 Leo Liu
+%% (C) 2012--2015 Qing Lee
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -33,11 +31,11 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: xeCJK.dtx 750 2014-12-26 08:13:35Z sobenlee@gmail.com $
+\GetIdInfo$Id: xeCJK.dtx 7321d12 2015-05-15 23:07:58 +0800 Qing Lee <sobenlee@gmail.com> $
{addon file for xunicode}
\ProvidesExplPackage
{xunicode-addon}
- {\ExplFileDate}{3.3.0}{\ExplFileDescription}
+ {\ExplFileDate}{3.3.2}{\ExplFileDescription}
\pdftex_if_engine:T
{
\msg_new:nnnn { xunicode-addon } { cannot-use-pdftex }
@@ -80,11 +78,13 @@
\clist_remove_duplicates:N \l__xunadd_encname_clist
\use:x
{
- \bool_if:NT \l__kernel_expl_bool { \ExplSyntaxOff }
+ \ExplSyntaxOff
\char_set_catcode_letter:n { 64 }
\__xunadd_reload:N \exp_not:N \l__xunadd_encname_clist
+ \bool_if:NTF \l__kernel_expl_bool
+ { \ExplSyntaxOn }
+ { \ExplSyntaxOff }
\char_set_catcode:nn { 64 } { \char_value_catcode:n { 64 } }
- \bool_if:NT \l__kernel_expl_bool { \ExplSyntaxOn }
}
}
\cs_new_protected:Npn \__xunadd_reload:N #1
@@ -216,7 +216,7 @@
\__xunadd_provide_text_command_default:N #1
\group_begin:
\char_set_lccode:nn { `0 } { \__xunadd_check_slot:n {#3} }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
\group_end:
\__xunadd_declare_character:NNxn 0
@@ -335,7 +335,7 @@
\group_begin:
\char_set_lccode:nn { `4 } { \__xunadd_check_slot:n {#4} }
\char_set_lccode:nn { `5 } { \__xunadd_check_slot:n {#5} }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
\group_end:
\__xunadd_declare_encoded:NNNNxx 4 5
@@ -611,7 +611,7 @@
%% xeCJK-example-CJKfntef.tex,
%% xeCJK-example-punctstyle.tex,
%% xeCJK-example-verbatim.tex,
-%% xeCJK-example-IVS.tex,
+%% xeCJK-example-CM.tex,
%% xeCJK-example-listings.tex,
%% xunicode-symbols.tex,
%% xunicode-commands.tex,
diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def b/Master/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def
index 2f352d37fab..6a5b9d45c37 100644
--- a/Master/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def
+++ b/Master/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def
@@ -6,8 +6,6 @@
%%
%% xeCJK.dtx (with options: `xunextra')
%%
-%% $Id: xeCJK.dtx 750 2014-12-26 08:13:35Z sobenlee@gmail.com $
-%% $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
%% -----------------------------------------------------------------
%% Author:
%% Wenchang Sun <sunwch@nankai.edu.cn>
@@ -15,9 +13,9 @@
%% Leo Liu <leoliu.pku@gmail.com>
%% Qing Lee <sobenlee@gmail.com>
%%
-%% Copyright (C) 2007--2014 Wenchang Sun
-%% (C) 2009--2014 Leo Liu
-%% (C) 2012--2014 Qing Lee
+%% Copyright (C) 2007--2015 Wenchang Sun
+%% (C) 2009--2015 Leo Liu
+%% (C) 2012--2015 Qing Lee
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -31,11 +29,11 @@
%% The Current Maintainer of this work are Leo Liu and Qing Lee.
%% -----------------------------------------------------------------
%%
-\GetIdInfo$Id: xeCJK.dtx 750 2014-12-26 08:13:35Z sobenlee@gmail.com $
+\GetIdInfo$Id: xeCJK.dtx 7321d12 2015-05-15 23:07:58 +0800 Qing Lee <sobenlee@gmail.com> $
{extra definition for xunicode}
\ProvidesExplFile
{xunicode-extra.def}
- {\ExplFileDate}{3.3.0}{\ExplFileDescription}
+ {\ExplFileDate}{3.3.2}{\ExplFileDescription}
\ExplSyntaxOff
\DeclareUTFComposite\textsuperscript
\DeclareUTFComposite\textsubscript
@@ -1472,7 +1470,7 @@
%% xeCJK-example-CJKfntef.tex,
%% xeCJK-example-punctstyle.tex,
%% xeCJK-example-verbatim.tex,
-%% xeCJK-example-IVS.tex,
+%% xeCJK-example-CM.tex,
%% xeCJK-example-listings.tex,
%% xunicode-symbols.tex,
%% xunicode-commands.tex,