From c64dcfd4c1dd2ef21b787e6833694f68a9ac418f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 23 Aug 2020 20:54:58 +0000 Subject: xecjk (23aug20) git-svn-id: svn://tug.org/texlive/trunk@56162 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx | 44 +++++++++++++++++------- 1 file changed, 31 insertions(+), 13 deletions(-) (limited to 'Master/texmf-dist/source/xelatex') 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> %\NeedsTeXFormat{LaTeX2e} %\RequirePackage{expl3} -%<+!driver>\GetIdInfo$Id: xeCJK.dtx 94baac7 2020-06-06 23:21:05 +0800 Qing Lee $ +%<+!driver>\GetIdInfo$Id: xeCJK.dtx 6405ee1 2020-08-23 21:58:40 +0800 Qing Lee $ % {Typesetting CJK scripts with XeLaTeX} % {Configuration file for xeCJK package} % {xeCJK font effect} @@ -207,7 +207,7 @@ Copyright and Licence %\ProvidesExplPackage{xeCJK-listings} %\ProvidesExplPackage{xunicode-addon} %\ProvidesExplFile{xunicode-extra.def} -% {\ExplFileDate}{3.8.4}{\ExplFileDescription} +% {\ExplFileDate}{3.8.5}{\ExplFileDescription} % %<*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} -- cgit v1.2.3