summaryrefslogtreecommitdiff
path: root/macros/xetex/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-02-15 03:01:17 +0000
committerNorbert Preining <norbert@preining.info>2020-02-15 03:01:17 +0000
commit6e362e815ea119b3f6db97b21c10fee3279b5c6b (patch)
tree536b6a92aa0abbc06d83b0b03850caeebf82d65e /macros/xetex/latex
parentdc072b1cb0427be056e747cdbfd6b7a4f1e02e56 (diff)
CTAN sync 202002150301
Diffstat (limited to 'macros/xetex/latex')
-rw-r--r--macros/xetex/latex/xecjk/xeCJK.dtx74
-rw-r--r--macros/xetex/latex/xecjk/xeCJK.pdfbin1277275 -> 1278188 bytes
-rw-r--r--macros/xetex/latex/xecjk/xunicode-symbols.pdfbin292982 -> 292977 bytes
3 files changed, 47 insertions, 27 deletions
diff --git a/macros/xetex/latex/xecjk/xeCJK.dtx b/macros/xetex/latex/xecjk/xeCJK.dtx
index 1f66d8cff1..1d528a3997 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 06a6ce4 2020-02-10 22:37:50 +0800 Qing Lee <sobenlee@gmail.com> $
+%<+!driver>\GetIdInfo$Id: xeCJK.dtx 2628481 2020-02-14 20:30:07 +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.0}{\ExplFileDescription}
+%<!driver> {\ExplFileDate}{3.8.1}{\ExplFileDescription}
%</package|config|fntef|listings|xunicode|xunextra>
%<*driver>
\documentclass{ctxdoc}
@@ -225,6 +225,8 @@ Copyright and Licence
\newcommand\PSKeyVal[2]{%
\item[#1]\makebox[4em][l]{\meta{#2}}\ignorespaces}
\newcommand\tokslink[1]{\hyperlink{#1}{\ding{51}}}
+\newcommand\ghissue[1]{%
+ \href{https://github.com/CTeX-org/ctex-kit/issues/#1}{\##1}}
\AtBeginDocument{\DeleteShortVerb{\"}}
\ExplSyntaxOn
\NewDocumentCommand \PrintPunctList { O{7} m m }
@@ -283,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{10751}
+% \CheckSum{10752}
% \GetFileId{xeCJK.sty}
%
% \title{\bfseries\pkg{xeCJK} 宏包}
@@ -6606,11 +6608,8 @@ Copyright and Licence
}
\cs_new_protected_nopar:Npn \@@_select_font:Nn #1#2
{
- \cs_if_exist_use:NF #1
- {
- \@@_family_use:n {#2}
- \xeCJK_font_gset_to_current:N #1
- }
+ \cs_if_exist:NF #1 { \@@_font_initial:Nn #1 {#2} }
+ #1
}
\cs_generate_variant:Nn \@@_select_font:Nn { c }
\tl_new:N \l_@@_current_coor_tl
@@ -6619,6 +6618,22 @@ Copyright and Licence
% \end{variable}
% \end{macro}
%
+% \changes{v3.8.1}{2020/02/14}{修复 \cs{l_xeCJK_current_font_tl} 标记错误。}
+%
+% \begin{macro}{\@@_font_initial:Nn}
+% 注意要将 \tn{selectfont} 放在分组中调用,防止 \tn{f@series} 等字体参数被修改,
+% 导致 \cs{l_xeCJK_current_font_tl} 标记前后不一致,引发错误(见~\ghissue{486})。
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \@@_font_initial:Nn #1#2
+ {
+ \group_begin:
+ \@@_family_use:n {#2}
+ \xeCJK_font_gset_to_current:N #1
+ \group_end:
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}[int]{\xeCJK_select_punct_font:}
% \begin{variable}[int]{\l_xeCJK_current_punct_font_tl}
% 切换标点符号字体。
@@ -6676,8 +6691,7 @@ Copyright and Licence
\cs_if_exist_use:NF #1
{
\xeCJK_block_family:nn {#2} {#3}
- \@@_family_use:n { #2/#3 }
- \xeCJK_font_gset_to_current:N #1
+ \@@_font_initial:Nn #1 { #2/#3 }
}
}
\cs_generate_variant:Nn \@@_select_font:Nnn { c }
@@ -6704,30 +6718,27 @@ Copyright and Licence
{ xeCJK/family/#1 }
\cs_new_nopar:Npn \@@_family_nfss_csname:n #1
{ xeCJK/family/nfss/#1 }
-\cs_new_nopar:Npn \@@_family_use:n #1
+\cs_new_protected_nopar:Npn \@@_family_use:n #1
{ \use:c { \@@_family_nfss_csname:n {#1} } }
\cs_new_protected_nopar:Npn \@@_gset_family_nfss_cs:nn #1#2
{
\prop_gput:Nnn \g_@@_family_name_prop {#1} {#2}
\cs_gset_protected_nopar:cpx
{ \@@_family_nfss_csname:n {#1} }
- {
- \exp_not:N \fontencoding { \c_@@_encoding_tl }
- \@@_nfss_family:n {#2}
- \exp_not:N \selectfont
- }
+ { \@@_nfss_family:nn { \c_@@_encoding_tl } {#2} }
}
\cs_generate_variant:Nn \@@_gset_family_nfss_cs:nn { xx }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_nfss_family:n}
-% 用于处理 \LaTeXe\ 2020/02/02 中 \tn{bfseries@rm} 等与 \tn{\bfdefault} 不一致可能导致的问题。
+% 用于处理 \LaTeXe\ 2020/02/02 中 \tn{bfseries@rm} 等与 \tn{bfdefault} 不一致可能导致的问题。
% \begin{macrocode}
\cs_if_exist:NTF \fontseriesforce
{
- \cs_new_protected_nopar:Npn \@@_nfss_family:n #1
+ \cs_new_protected_nopar:Npn \@@_nfss_family:nn #1#2
{
+ \fontencoding {#1}
\str_if_eq:eeF { \f@series } { \bfdefault }
{
\str_case_e:nn { \f@family }
@@ -6737,7 +6748,8 @@ Copyright and Licence
{ \ttdefault } { \@@_nfss_series:n { tt } }
}
}
- \fontfamily {#1}
+ \fontfamily {#2}
+ \selectfont
}
\cs_new_protected_nopar:Npn \@@_nfss_series:n #1
{
@@ -6746,8 +6758,12 @@ Copyright and Licence
}
}
{
- \cs_new_protected_nopar:Npn \@@_nfss_family:n #1
- { \tl_set:Nn \f@family {#1} }
+ \cs_new_protected_nopar:Npn \@@_nfss_family:nn #1#2
+ {
+ \fontencoding {#1}
+ \tl_set:Nn \f@family {#2}
+ \selectfont
+ }
}
% \end{macrocode}
% \end{macro}
@@ -7358,17 +7374,22 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
+% \changes{v3.8.1}{2020/02/14}{应用 \tn{shapedefault}。}
+%
% \begin{macro}[int]{\xeCJK_declare_mathfont:nn}
+% 注意从 \LaTeXe\ 2020/02/02 开始,\tn{shapedefault} 初始值是 \texttt{n},
+% 而 \tn{updefault} 初始值是 \texttt{up},两者并不一致。
+% \pkg{fontspec} 包定义字体使用的是 \tn{shapedefault}。
% \begin{macrocode}
\cs_new_protected_nopar:Npn \xeCJK_declare_mathfont:nn #1#2
{
\xeCJK_declare_symbol_font:nnnnn {#1} { \c_@@_encoding_tl }
- {#2} { \mddefault } { \updefault }
+ {#2} { \mddefault } { \shapedefault }
\cs_if_free:cF
- { \c_@@_encoding_tl/#2/\bfdefault/\updefault }
+ { \c_@@_encoding_tl/#2/\bfdefault/\shapedefault }
{
\SetSymbolFont {#1} { bold } { \c_@@_encoding_tl }
- {#2} { \bfdefault } { \updefault }
+ {#2} { \bfdefault } { \shapedefault }
}
\prop_gput:Nnx \g_@@_fam_prop {#2} { \exp_not:c { sym #1 } }
}
@@ -8285,11 +8306,10 @@ Copyright and Licence
\g@addto@macro \@rmfamilyhook { \xeCJK@family { \CJKrmdefault } }
\g@addto@macro \@sffamilyhook { \xeCJK@family { \CJKsfdefault } }
\g@addto@macro \@ttfamilyhook { \xeCJK@family { \CJKttdefault } }
- \exp_args:Nx \g@addto@macro
+ \exp_args:Nc \g@addto@macro
{
\cs_if_exist:NTF \@defaultfamilyhook
- { \exp_not:N \@defaultfamilyhook }
- { \exp_not:c { normalfont ~ } }
+ { @defaultfamilyhook } { normalfont ~ }
}
{ \xeCJK@family { \CJKfamilydefault } }
}
diff --git a/macros/xetex/latex/xecjk/xeCJK.pdf b/macros/xetex/latex/xecjk/xeCJK.pdf
index 336b30eb32..5b2afe4299 100644
--- a/macros/xetex/latex/xecjk/xeCJK.pdf
+++ b/macros/xetex/latex/xecjk/xeCJK.pdf
Binary files differ
diff --git a/macros/xetex/latex/xecjk/xunicode-symbols.pdf b/macros/xetex/latex/xecjk/xunicode-symbols.pdf
index e1bdc6f1d9..e4bb1ff146 100644
--- a/macros/xetex/latex/xecjk/xunicode-symbols.pdf
+++ b/macros/xetex/latex/xecjk/xunicode-symbols.pdf
Binary files differ