summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-05-15 21:14:50 +0000
committerKarl Berry <karl@freefriends.org>2017-05-15 21:14:50 +0000
commit40ff7747893db36bf2fdf14a1f8171d8470cdeee (patch)
tree1bec65d91b2bc33a6bde984a31b54b95425e3628 /Master/texmf-dist/source
parent9345b56051808302edacfac91556f8a11d4d7fbe (diff)
xecjk (15may17)
git-svn-id: svn://tug.org/texlive/trunk@44370 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx44
1 files changed, 32 insertions, 12 deletions
diff --git a/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx b/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx
index e73a8c7ce6b..6a6e16387e3 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 832988e 2017-04-01 21:33:23 +0800 Qing Lee <sobenlee@gmail.com> $
+%<+!driver>\GetIdInfo$Id: xeCJK.dtx 18af4a5 2017-05-15 20:12:35 +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.4.7}{\ExplFileDescription}
+%<!driver> {\ExplFileDate}{3.4.8}{\ExplFileDescription}
%</package|config|fntef|listings|xunicode|xunextra>
%<*driver>
\documentclass{ctxdoc}
@@ -275,7 +275,7 @@ Copyright and Licence
% \changes{v3.3.2}{2015/05/15}{随 Unicode 7.0.0 更新简繁汉字映射。}
% \changes{v3.3.3}{2015/09/25}{更新 \hologo{LaTeX3} 代码。}
%
-% \CheckSum{10155}
+% \CheckSum{10169}
% \GetFileId{xeCJK.sty}
%
% \title{\bfseries\pkg{xeCJK} 宏包}
@@ -8208,7 +8208,7 @@ Copyright and Licence
\cs_new_protected_nopar:Npn \@@_ulem_end:
{
\c_group_end_token
- \hbox_set_end:
+ \c_group_end_token
\tex_unskip:D \tex_unskip:D \tex_unskip:D
\xeCJK_ulem_right_skip:
\xeCJK_ulem_group_end:
@@ -9836,17 +9836,24 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_listings_inside_convert:nw,\@@_listings_inline_group:w}
+% \begin{macro}[internal]{\@@_listings_rescan:Nn,
+% \@@_listings_inside_convert:nw,\@@_listings_inline_group:w}
% 当 \tn{lstinline} 被使用在参数中时,\pkg{listings} 会使用一个循环逐个将
% \tn{lstinline} 参数中的字符设置为活动字符。我们可以通过 \cs{tl_set_rescan:Nnn}
% 来完成这里的 \tn{catcode} 转换,避免将 \tn{charcode} 超过 $255$ 的字符都设置为
% 活动字符。
% \begin{macrocode}
+\cs_new_protected:Npn \@@_listings_rescan:Nn #1#2
+ {
+ \@@_listings_set_escape:
+ \tl_set:Nn \l_@@_tmp_tl {#2}
+ \@@_listings_escape_backslash:
+ \tl_set_rescan:Nno #1 { } { \l_@@_tmp_tl }
+ }
\cs_new_protected:Npn \@@_listings_inside_convert:nw #1 ~ \@empty
{
- \tl_set_rescan:Nnn \l_@@_tmp_tl { } {#1}
- \@@_set_listings_escape:
- \tl_put_right:NV \lst@arg \l_@@_tmp_tl
+ \@@_listings_rescan:Nn \l_@@_tmp_tl {#1}
+ \tl_put_right:No \lst@arg { \l_@@_tmp_tl }
}
\cs_set_eq:NN \lst@InsideConvert@ \@@_listings_inside_convert:nw
\cs_new_protected_nopar:Npn \@@_listings_inline_group:w
@@ -9857,14 +9864,13 @@ Copyright and Licence
\cs_set_eq:NN \lst@InlineGJ \@@_listings_inline_group:w
\cs_new_protected:Npn \@@_listings_inline_group:n #1
{
- \tl_set_rescan:Nnn \lst@arg { } {#1}
- \@@_set_listings_escape:
+ \@@_listings_rescan:Nn \lst@arg {#1}
\lst@InlineGJEnd
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_set_listings_escape:}
+% \begin{macro}[internal]{\@@_listings_set_escape:}
% 由于我们在上面的修改,需要保留 |\| 用于转义 \tn{lstinline} 参数中的某些 \TeX
% 特殊字符,与原来宏包一致。
% \begin{macrocode}
@@ -9872,7 +9878,7 @@ Copyright and Licence
\cs_set:Npn \@@_tmp:w #1
{
\group_end:
- \cs_new_protected:Npn \@@_set_listings_escape:
+ \cs_new_protected_nopar:Npn \@@_listings_set_escape:
{ \xeCJK_swap_cs:NN #1 \@@_listings_escape:N }
\cs_new_protected:Npn \@@_listings_escape:N ##1
{ \cs_if_eq:NNTF #1 ##1 { \@@_listings_escape:N } {##1} }
@@ -9886,6 +9892,20 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
+%
+% \changes{v3.4.8}{2017/05/15}{转义 \tn{lstinline} 参数中的 $\texttt{\textbackslash}_{12}$。}
+% \begin{macro}[internal]{\@@_listings_escape_backslash:}
+% \tn{catcode} 为 $12$ 的 |\| 需要双写转义。
+% \begin{macrocode}
+\cs_new_protected_nopar:Npx \@@_listings_escape_backslash:
+ {
+ \tl_replace_all:Nnn \exp_not:N \l_@@_tmp_tl
+ { \c_backslash_str }
+ { \c_backslash_str \c_backslash_str }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</listings>
% \end{macrocode}