diff options
author | Norbert Preining <norbert@preining.info> | 2020-08-24 03:02:25 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-08-24 03:02:25 +0000 |
commit | db172be44b76658fe542ff91f2e6e02550d417b8 (patch) | |
tree | 9ef07d5b1cd3011bb4b5450a5ae976e5e0a2a8e4 /macros/xetex/latex/xecjk/xeCJK.dtx | |
parent | 16e50bc884ce50f72f1d7b979d6a8272a0cd3798 (diff) |
CTAN sync 202008240302
Diffstat (limited to 'macros/xetex/latex/xecjk/xeCJK.dtx')
-rw-r--r-- | macros/xetex/latex/xecjk/xeCJK.dtx | 44 |
1 files changed, 31 insertions, 13 deletions
diff --git a/macros/xetex/latex/xecjk/xeCJK.dtx b/macros/xetex/latex/xecjk/xeCJK.dtx index c709d37e43..0651316e47 100644 --- a/macros/xetex/latex/xecjk/xeCJK.dtx +++ b/macros/xetex/latex/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} |