summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-08-23 20:54:58 +0000
committerKarl Berry <karl@freefriends.org>2020-08-23 20:54:58 +0000
commitc64dcfd4c1dd2ef21b787e6833694f68a9ac418f (patch)
tree86cf410c6187c7df3d8b0a1e1ff022ea11b3011c /Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx
parentb1cf361795a720dbfa84ca6546355be360964437 (diff)
xecjk (23aug20)
git-svn-id: svn://tug.org/texlive/trunk@56162 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx')
-rw-r--r--Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx44
1 files changed, 31 insertions, 13 deletions
diff --git a/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx b/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx
index c709d37e439..0651316e47c 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 94baac7 2020-06-06 23:21:05 +0800 Qing Lee <sobenlee@gmail.com> $
+%<+!driver>\GetIdInfo$Id: xeCJK.dtx 6405ee1 2020-08-23 21:58:40 +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.8.4}{\ExplFileDescription}
+%<!driver> {\ExplFileDate}{3.8.5}{\ExplFileDescription}
%</package|config|fntef|listings|xunicode|xunextra>
%<*driver>
\documentclass{ctxdoc}
@@ -287,7 +287,7 @@ Copyright and Licence
% \changes{v3.8.0}{2020/02/09}{清理过时的兼容性补丁代码。}
% \changes{v3.8.3}{2020/04/07}{删除 \texttt{\_nopar}。}
%
-% \CheckSum{10884}
+% \CheckSum{10905}
% \GetFileId{xeCJK.sty}
%
% \title{\bfseries\pkg{xeCJK} 宏包}
@@ -4139,20 +4139,27 @@ Copyright and Licence
% \end{macro}
%
% \begin{macro}{\@@_bound_type_1_glue:Nn}
+% \changes{v3.8.5}{2020/06/26}{增加盒子高度判断。}
% $1$ 表示 hlist node,在这里用来判断是否位于段首。基于正常情况下,\TeX 会在段落开头插入宽度为
% \tn{parindent} 的水平盒子用于缩进。
% \begin{macrocode}
-\cs_new_protected:cpn { @@_bound_type_ 1 _glue:Nn } #1#2
+\cs_new_protected:cpn { @@_bound_type_ 1 _glue:Nn } #1
{
\box_set_to_last:N \l_@@_tmp_box
\int_compare:nNnTF \tex_lastnodetype:D = { -1 }
{
\dim_compare:nNnTF
{ \box_wd:N \l_@@_tmp_box } = \tex_parindent:D
- { \box_use_drop:N \l_@@_tmp_box }
- { \box_use_drop:N \l_@@_tmp_box #2 }
+ {
+ \dim_compare:nNnTF
+ { \box_ht:N \l_@@_tmp_box } = \c_zero_dim
+ { \use_i:nn }
+ { \use:nn }
+ }
+ { \use:nn }
}
- { \box_use_drop:N \l_@@_tmp_box #2 }
+ { \use:nn }
+ { \box_use_drop:N \l_@@_tmp_box }
}
% \end{macrocode}
% \end{macro}
@@ -6772,10 +6779,16 @@ Copyright and Licence
\cs_new_protected:Npn \@@_font_initial:Nn #1#2
{
\group_begin:
+ \@@_font_initial_hook:
\@@_family_use:n {#2}
\xeCJK_font_gset_to_current:N #1
\group_end:
}
+\cs_new_protected:Npn \@@_font_initial_hook:
+ { \tl_use:N \g_@@_font_initial_hook_tl }
+\cs_new_protected:Npn \@@_gadd_font_initial_hook:n
+ { \tl_gput_right:Nn \g_@@_font_initial_hook_tl }
+\tl_new:N \g_@@_font_initial_hook_tl
% \end{macrocode}
% \end{macro}
%
@@ -8903,14 +8916,11 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
+% \changes{v3.8.5}{2020/06/25}{进一步兼容 \pkg{microtype}。}
+%
% \begin{macro}{\@@_patch_microtype_get_slot:}
% 兼容 \pkg{microtype}。
% \begin{macrocode}
-\@@_package_hook:nn { microtype }
- {
- \cs_if_free:NF \MT@get@slot@
- { \@@_patch_microtype_get_slot: }
- }
\cs_new_protected:Npn \@@_patch_microtype_get_slot:
{
\cs_new_eq:NN \xeCJK@original@get@slot \MT@get@slot@
@@ -8929,6 +8939,14 @@ Copyright and Licence
{ \MT@encoding - \tex_the:D \MT@toks } \l_@@_tmp_tl
{ \cs_set_eq:NN \MT@char \l_@@_tmp_tl }
}
+\cs_new_protected:Npn \xeCJK@microtype@restore@pickupfont
+ { \@@_gadd_font_initial_hook:n { \MT@ltx@pickupfont } }
+\@@_package_hook:nn { microtype }
+ {
+ \cs_if_free:NF \MT@get@slot@
+ { \@@_patch_microtype_get_slot: }
+ \MT@addto@setup { \xeCJK@microtype@restore@pickupfont }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -8942,7 +8960,7 @@ Copyright and Licence
\xeCJK_cs_clear:N \@@_inactive_group_begin:
\xeCJK_cs_clear:N \@@_inactive_group_end:
\xeCJK_cs_clear:N \makexeCJKinactive
- \xeCJK_cs_clear:N \xeCJK@composite@patch
+ \xeCJK_cs_clear:N \xeCJK_text_composite_patch:
}
}
% \end{macrocode}