summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex/xecjk
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-10-25 20:40:25 +0000
committerKarl Berry <karl@freefriends.org>2016-10-25 20:40:25 +0000
commit8183411fd04acd45256192a7065ffdb5ee3636bb (patch)
tree7f48fcd0263d87c8164d00405f7cc3be870af295 /Master/texmf-dist/source/xelatex/xecjk
parentecef044e181fa1582d4c15722c5aedde6ea4a04d (diff)
xecjk (25oct16)
git-svn-id: svn://tug.org/texlive/trunk@42354 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex/xecjk')
-rw-r--r--Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx65
1 files changed, 40 insertions, 25 deletions
diff --git a/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx b/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx
index 2f8fcd16556..745380178bb 100644
--- a/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx
+++ b/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx
@@ -194,7 +194,7 @@ Copyright and Licence
%<*package|config|fntef|listings|xunicode|xunextra>
%<!(config|xunextra)>\NeedsTeXFormat{LaTeX2e}
%<!(config|xunextra)>\RequirePackage{expl3}
-%<+!driver>\GetIdInfo$Id: xeCJK.dtx 10a8836 2016-08-27 11:02:24 +0800 Qing Lee <sobenlee@gmail.com> $
+%<+!driver>\GetIdInfo$Id: xeCJK.dtx 7cdefd6 2016-10-25 17:38:55 +0800 Qing Lee <sobenlee@gmail.com> $
%<package> {Typesetting CJK scripts with XeLaTeX}
%<config> {Configuration file for xeCJK package}
%<fntef> {xeCJK font effect}
@@ -207,7 +207,7 @@ Copyright and Licence
%<listings>\ProvidesExplPackage{xeCJK-listings}
%<xunicode>\ProvidesExplPackage{xunicode-addon}
%<xunextra>\ProvidesExplFile{xunicode-extra.def}
-%<!driver> {\ExplFileDate}{3.4.1}{\ExplFileDescription}
+%<!driver> {\ExplFileDate}{3.4.2}{\ExplFileDescription}
%</package|config|fntef|listings|xunicode|xunextra>
%<*driver>
\documentclass{ctxdoc}
@@ -275,7 +275,7 @@ Copyright and Licence
% \changes{v3.3.2}{2015/05/15}{随 Unicode 7.0.0 更新简繁汉字映射。}
% \changes{v3.3.3}{2015/09/25}{更新 \hologo{LaTeX3} 代码。}
%
-% \CheckSum{10130}
+% \CheckSum{10138}
% \GetFileId{xeCJK.sty}
%
% \title{\bfseries\pkg{xeCJK} 宏包}
@@ -2613,25 +2613,6 @@ Copyright and Licence
%
% \subsection{字符类别处理}
%
-% \begin{macro}[internal,var]
-% {\g_@@_base_class_seq,\g_@@_non_CJK_class_seq,\g_@@_CJK_class_seq}
-% \begin{macrocode}
-\seq_new:N \g_@@_base_class_seq
-\seq_gset_eq:NN \g_@@_base_class_seq \g_@@_class_seq
-\seq_new:N \g_@@_non_CJK_class_seq
-\seq_gset_from_clist:Nn \g_@@_non_CJK_class_seq
- { Default , HalfLeft , HalfRight , NormalSpace , Boundary }
-\seq_new:N \g_@@_CJK_class_seq
-\cs_new_protected_nopar:Npn \@@_save_CJK_class:n #1
- {
- \seq_gput_right:Nn \g_@@_CJK_class_seq {#1}
- \tl_const:cn { \@@_CJK_class_tl:c { \@@_class_csname:n {#1} } } {#1}
- }
-\clist_map_function:nN
- { CJK , FullLeft , FullRight , CM , HangulJamo } \@@_save_CJK_class:n
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}[internal]{\xeCJK_class_num:n}
% |#1| 为字符类别名称,用于取得字符类别对应的编号。
% \begin{macrocode}
@@ -2889,12 +2870,42 @@ Copyright and Licence
% \end{macro}
%
% \begin{macro}[internal]{\xeCJK_clear_Boundary_and_CJK_toks:}
+% \changes{v3.4.2}{2016/10/19}{提高效率,避免重复循环。}
% 清除边界与 CJK 文字、全角左右标点之间的内容。
% \begin{macrocode}
\cs_new_protected_nopar:Npn \xeCJK_clear_Boundary_and_CJK_toks:
- { \seq_map_function:NN \g_@@_CJK_class_seq \@@_clear_Boundary_and_CJK_toks:n }
-\cs_new_protected_nopar:Npn \@@_clear_Boundary_and_CJK_toks:n #1
- { \xeCJK_clear_inter_class_toks:nn { Boundary } {#1} }
+ { }
+\cs_new_protected_nopar:Npn \@@_update_clear_toks:n #1
+ {
+ \cs_gset_protected_nopar:Npx \xeCJK_clear_Boundary_and_CJK_toks:
+ {
+ \exp_not:o { \xeCJK_clear_Boundary_and_CJK_toks: }
+ \xetex_interchartoks:D
+ \xeCJK_class_num:n { Boundary } ~ \xeCJK_class_num:n {#1}
+ = { \exp_not:N \prg_do_nothing: }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal,var]
+% {\g_@@_base_class_seq,\g_@@_non_CJK_class_seq,\g_@@_CJK_class_seq}
+% 保存宏包预先定义的字符类。
+% \begin{macrocode}
+\seq_new:N \g_@@_base_class_seq
+\seq_gset_eq:NN \g_@@_base_class_seq \g_@@_class_seq
+\seq_new:N \g_@@_non_CJK_class_seq
+\seq_gset_from_clist:Nn \g_@@_non_CJK_class_seq
+ { Default , HalfLeft , HalfRight , NormalSpace , Boundary }
+\seq_new:N \g_@@_CJK_class_seq
+\cs_new_protected_nopar:Npn \@@_save_CJK_class:n #1
+ {
+ \seq_gput_right:Nn \g_@@_CJK_class_seq {#1}
+ \tl_const:cn { \@@_CJK_class_tl:c { \@@_class_csname:n {#1} } } {#1}
+ \@@_update_clear_toks:n {#1}
+ }
+\clist_map_function:nN
+ { CJK , FullLeft , FullRight , CM , HangulJamo } \@@_save_CJK_class:n
% \end{macrocode}
% \end{macro}
%
@@ -2999,13 +3010,17 @@ Copyright and Licence
% \end{tabular}
% \end{center}
%
+% \changes{v3.4.2}{2016/10/19}{避免在破折号之间折行。}
+%
% \begin{macro}[internal]{\xeCJK_class_group_begin:,\xeCJK_class_group_end:}
+% 在 CJK 类开始时,设置 \tn{XeTeXdashbreakstate} 为零,避免破折号之间的折行。
% \begin{macrocode}
\cs_new_protected_nopar:Npn \xeCJK_class_group_begin:
{
\c_group_begin_token
\bool_set_true:N \l_@@_CJK_group_bool
\int_gset_eq:NN \g_@@_spacefactor_int \c_one_thousand
+ \int_zero:N \xetex_dashbreakstate:D
}
\bool_new:N \l_@@_CJK_group_bool
\cs_new_eq:NN \xeCJK_class_group_end: \c_group_end_token