summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-02-18 22:31:44 +0000
committerKarl Berry <karl@freefriends.org>2020-02-18 22:31:44 +0000
commit089838a67daed54e57440912a52551d248bbf4f1 (patch)
treece15806f220ac56398a8110aab4af2db06585f90 /Master/texmf-dist/source/xelatex
parentcbb50a7bff75caadde7a46cb6bafe42f458ad320 (diff)
xecjk (18feb20)
git-svn-id: svn://tug.org/texlive/trunk@53835 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex')
-rw-r--r--Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx37
1 files changed, 26 insertions, 11 deletions
diff --git a/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx b/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx
index 1d528a3997b..360459e5417 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 2628481 2020-02-14 20:30:07 +0800 Qing Lee <sobenlee@gmail.com> $
+%<+!driver>\GetIdInfo$Id: xeCJK.dtx 165cecc 2020-02-18 20:38:34 +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.1}{\ExplFileDescription}
+%<!driver> {\ExplFileDate}{3.8.2}{\ExplFileDescription}
%</package|config|fntef|listings|xunicode|xunextra>
%<*driver>
\documentclass{ctxdoc}
@@ -285,7 +285,7 @@ Copyright and Licence
% \changes{v3.8.0}{2020/02/09}{兼容 \LaTeXe\ 2020/02/02 对 \pkg{NFSS} 的修改。}
% \changes{v3.8.0}{2020/02/09}{清理过时的兼容性补丁代码。}
%
-% \CheckSum{10752}
+% \CheckSum{10763}
% \GetFileId{xeCJK.sty}
%
% \title{\bfseries\pkg{xeCJK} 宏包}
@@ -6674,6 +6674,8 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
+% \changes{v3.8.2}{2020/02/17}{修复分区字体错误。}
+%
% \begin{macro}[int]{\xeCJK_select_font:n,\xeCJK_block_family:nn}
% 若当前 CJK 字体族没有定义子分区 |#1| 的字体,则使用 \tn{CJKfamilydefault} 的对应
% 分区字体;若 \tn{CJKfamilydefault} 也没有定义该分区字体,则使用当前 CJK 字体族的
@@ -6688,13 +6690,16 @@ Copyright and Licence
}
\cs_new_protected_nopar:Npn \@@_select_font:Nnn #1#2#3
{
- \cs_if_exist_use:NF #1
- {
- \xeCJK_block_family:nn {#2} {#3}
- \@@_font_initial:Nn #1 { #2/#3 }
- }
+ \cs_if_exist:NF #1
+ { \@@_block_font_initial:Nnn #1 {#2} {#3} }
+ #1
}
\cs_generate_variant:Nn \@@_select_font:Nnn { c }
+\cs_new_protected_nopar:Npn \@@_block_font_initial:Nnn #1#2#3
+ {
+ \xeCJK_block_family:nn {#2} {#3}
+ \@@_font_initial:Nn #1 { #2/#3 }
+ }
\cs_new_protected_nopar:Npn \xeCJK_block_family:nn #1#2
{
\xeCJK_family_if_exist:xF { #1/#2 }
@@ -6976,20 +6981,20 @@ Copyright and Licence
{
\@@_pass_args:nnnn
{ \xeCJK_set_family:nnn { \CJKrmdefault } } {#1} {#2}
- { \normalfont }
+ { \@@_preamble_family:n { \CJKrmdefault } }
}
\cs_new_eq:NN \setCJKromanfont \setCJKmainfont
\NewDocumentCommand \setCJKsansfont { o m }
{
\@@_pass_args:nnnn
{ \xeCJK_set_family:nnn { \CJKsfdefault } } {#1} {#2}
- { \normalfont }
+ { \@@_preamble_family:n { \CJKsfdefault } }
}
\NewDocumentCommand \setCJKmonofont { o m }
{
\@@_pass_args:nnnn
{ \xeCJK_set_family:nnn { \CJKttdefault } } {#1} {#2}
- { \normalfont }
+ { \@@_preamble_family:n { \CJKttdefault } }
}
% \end{macrocode}
% \end{macro}
@@ -7002,6 +7007,16 @@ Copyright and Licence
\@onlypreamble \setCJKromanfont
% \end{macrocode}
%
+% \changes{v3.8.2}{2020/02/17}{避免导言区字体警告。}
+%
+% \begin{macro}{\@@_preamble_family:n}
+% 用在 \tn{setCJKmainfont} 等主要命令之后,确保导言区有 CJK 字体可用。
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \@@_preamble_family:n #1
+ { \str_if_eq:eeT {#1} { \CJKfamilydefault } { \normalfont } }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\setCJKfamilyfont, \newCJKfontfamily, \CJKfontspec}
% \changes{v3.4.3}{2016/11/18}{允许字体属性可选项在后的新语法。}
% 分别用于预声明 CJK 字体族和声明并马上调用 CJK 字体族。