diff options
author | Karl Berry <karl@freefriends.org> | 2016-08-27 22:16:30 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-08-27 22:16:30 +0000 |
commit | 63891237806957ce0706ffac4e1425a4a73de187 (patch) | |
tree | 247b11f2d6cf16f6ede98e5730fb4b96bb78a6dd /Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty | |
parent | 0fa25478366229de8f942fadc4e57885ca643b15 (diff) |
xecjk (27aug16)
git-svn-id: svn://tug.org/texlive/trunk@41941 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty | 80 |
1 files changed, 53 insertions, 27 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty index ba88db7d131..5e030296495 100644 --- a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty +++ b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty @@ -29,10 +29,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: xeCJK.dtx 463fb57 2016-05-14 12:24:41 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: xeCJK.dtx 10a8836 2016-08-27 11:02:24 +0800 Qing Lee <sobenlee@gmail.com> $ {Typesetting CJK scripts with XeLaTeX} \ProvidesExplPackage{\ExplFileName} - {\ExplFileDate}{3.4.0}{\ExplFileDescription} + {\ExplFileDate}{3.4.1}{\ExplFileDescription} \msg_new:nnn { xeCJK } { Require-XeTeX } { The~xeCJK~package~requires~XeTeX~to~function.\\\\ @@ -462,7 +462,7 @@ \clist_const:Nn \c__xeCJK_iteration_marks_chars_clist { "3005 , "303B , "309D , "309E , "30FD , "30FE } \clist_const:Nn \c__xeCJK_NS_chars_clist - { "30FB , "FE54 , "FE55 , "FF1A , "FF1B , "FF65 } + { "30FB , "FE54 , "FE55 , "FF1A , "FF1B , "FF65 , "16FE0 } \clist_const:Nn \c__xeCJK_EX_chars_clist { "FE15 , "FE16 , "FE56 , "FE57 , "FF01 , "FF1F } \clist_const:Nn \c__xeCJK_IS_chars_clist { "FE10 , "FE13 , "FE14 } @@ -510,6 +510,9 @@ "FE10 -> "FE1F , "FE30 -> "FE4F , "FF00 -> "FFEF , + "16FE0 -> "16FFF , + "17000 -> "187FF , + "18800 -> "18AFF , "1B000 -> "1B0FF , "1F200 -> "1F2FF , "20000 -> "2A6DF , @@ -975,14 +978,20 @@ CJKspace / true .code:n = { \bool_set_true:N \l__xeCJK_reserve_space_bool - \cs_set_eq:NN \__xeCJK_maybe_reserve_space: \__xeCJK_reserve_space: + \cs_set_eq:NN \__xeCJK_ignore_space_end: + \__xeCJK_maybe_reserve_space: + \cs_set_eq:NN \__xeCJK_boundary_group_end_space: + \__xeCJK_boundary_maybe_reserve_space: \cs_set_protected_nopar:Npn \__xeCJK_ccglue_or_space: { \xeCJK_space_glue: } } , CJKspace / false .code:n = { \bool_set_false:N \l__xeCJK_reserve_space_bool - \xeCJK_cs_clear:N \__xeCJK_maybe_reserve_space: + \cs_set_eq:NN \__xeCJK_ignore_space_end: + \group_align_safe_end: + \cs_set_eq:NN \__xeCJK_boundary_group_end_space: + \__xeCJK_boundary_group_end_aux: \cs_set_protected_nopar:Npn \__xeCJK_ccglue_or_space: { \CJKglue } } , @@ -1001,41 +1010,46 @@ { \xeCJK_class_group_end: \CJKecglue } } { + \group_align_safe_begin: \bool_if:NTF \l__xeCJK_peek_ignore_spaces_bool { - \group_align_safe_begin: \token_if_macro:NTF \l_peek_token - { - \group_align_safe_end: - \xeCJK_class_group_end: - { \xeCJK_make_node:n { CJK-space } } - \xeCJK_space_or_xecglue: - } - { - \group_align_safe_end: - \xeCJK_class_group_end: - { \xeCJK_make_node:n { CJK-space } } - \__xeCJK_maybe_reserve_space: - } + { \__xeCJK_boundary_reserve_space: } + { \__xeCJK_boundary_group_end_space: } } { \token_if_eq_meaning:NNTF \l_peek_token \scan_stop: { \__xeCJK_CJK_and_Boundary_relax:N } - { \__xeCJK_CJK_and_Boundary_aux: } + { \__xeCJK_boundary_group_end:n { CJK } } } } } -\cs_new_protected_nopar:Npn \__xeCJK_CJK_and_Boundary_aux: - { \xeCJK_class_group_end: { \xeCJK_make_node:n { CJK } } } +\cs_new_protected_nopar:Npn \__xeCJK_boundary_reserve_space: + { + \__xeCJK_boundary_group_end_aux: + \xeCJK_space_or_xecglue: + } +\cs_new_protected_nopar:Npn \__xeCJK_boundary_maybe_reserve_space: + { + \token_if_letter:NTF \l_peek_token + { \__xeCJK_boundary_reserve_space: } + { \__xeCJK_boundary_group_end_aux: } + } +\cs_new_protected_nopar:Npn \__xeCJK_boundary_group_end_aux: + { \__xeCJK_boundary_group_end:n { CJK-space } } +\cs_new_eq:NN \__xeCJK_boundary_group_end_space: \__xeCJK_boundary_group_end_aux: \cs_new_protected:Npn \__xeCJK_CJK_and_Boundary_relax:N #1 { - \__xeCJK_CJK_and_Boundary_aux: + \__xeCJK_boundary_group_end:n { CJK } \token_if_eq_meaning:NNTF #1 \scan_stop: {#1} { \cs_set_eq:NN #1 \scan_stop: #1 } } -\cs_new_protected:Npn \__xeCJK_reserve_space: - { \token_if_letter:NT \l_peek_token { \xeCJK_space_or_xecglue: } } -\cs_new_eq:NN \__xeCJK_maybe_reserve_space: \prg_do_nothing: +\cs_new_protected_nopar:Npn \__xeCJK_boundary_group_end:n #1 + { + \group_align_safe_end: + \xeCJK_class_group_end: + { \xeCJK_make_node:n {#1} } + } \cs_new_protected_nopar:Npn \xeCJK_ignore_spaces:w { \xeCJK_peek_catcode_ignore_spaces:NTF \c_math_toggle_token @@ -1050,11 +1064,23 @@ { \xeCJK_remove_node: { \xeCJK_make_node:n { CJK-space } } } \group_align_safe_begin: \token_if_macro:NTF \l_peek_token - { \group_align_safe_end: \xeCJK_space_or_xecglue: } - { \group_align_safe_end: \__xeCJK_maybe_reserve_space: } + { \__xeCJK_reserve_space_aux: } + { \__xeCJK_ignore_space_end: } } } } +\cs_new_protected:Npn \__xeCJK_reserve_space_aux: + { + \group_align_safe_end: + \xeCJK_space_or_xecglue: + } +\cs_new_protected:Npn \__xeCJK_maybe_reserve_space: + { + \token_if_letter:NTF \l_peek_token + { \__xeCJK_reserve_space_aux: } + { \group_align_safe_end: } + } +\cs_new_eq:NN \__xeCJK_ignore_space_end: \group_align_safe_end: \xeCJK_inter_class_toks:nnn { CJK } { CJK } { \xeCJK_CJK_and_CJK:N } \cs_new_protected_nopar:Npn \xeCJK_CJK_and_CJK:N #1 { \CJKglue \CJKsymbol {#1} } \xeCJK_inter_class_toks:nnn { FullLeft } { CJK } |