From 0d86c7d5d9844f4cff10ca5c99a1444820e8b4f8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 25 Jun 2013 00:25:15 +0000 Subject: xecjk (19jun13) git-svn-id: svn://tug.org/texlive/trunk@30920 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx | 1035 ++++++++++++++++++---- Master/texmf-dist/source/xelatex/xecjk/xeCJK.ins | 16 +- 2 files changed, 872 insertions(+), 179 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx b/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx index 3477317da39..162675ef190 100644 --- a/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx +++ b/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx @@ -23,6 +23,7 @@ This package consists of the file xeCJK.dtx xeCJK.cfg, xeCJK.ins, xeCJKfntef.sty, + xeCJK-listings.sty, xeCJK-example-autofake.tex, xeCJK-example-fallback.tex, xeCJK-example-subCJKblock.tex, @@ -30,7 +31,9 @@ This package consists of the file xeCJK.dtx xeCJK-example-checksingle.tex, xeCJK-example-CJKfntef.tex, xeCJK-example-punctstyle.tex, - xeCJK-example-verbatim.tex, and + xeCJK-example-verbatim.tex, + xeCJK-example-IVS.tex, + xeCJK-example-listings.tex, and README.txt. (this file). If you are interested in the process of development you may observe @@ -78,7 +81,7 @@ CJK scripts fonts (TrueType or OpenType). \askforoverwritefalse \preamble -$Id: xeCJK.dtx 418 2013-05-29 06:41:21Z sobenlee $ +$Id: xeCJK.dtx 438 2013-06-11 14:17:42Z sobenlee $ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ ----------------------------------------------------------------- Author: @@ -112,6 +115,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ xeCJK.cfg, xeCJK.ins, xeCJKfntef.sty, + xeCJK-listings.sty, xeCJK-example-autofake.tex, xeCJK-example-fallback.tex, xeCJK-example-subCJKblock.tex, @@ -119,7 +123,9 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ xeCJK-example-checksingle.tex, xeCJK-example-CJKfntef.tex, xeCJK-example-punctstyle.tex, - xeCJK-example-verbatim.tex, and + xeCJK-example-verbatim.tex, + xeCJK-example-IVS.tex, + xeCJK-example-listings.tex, and README.txt. \endpostamble \declarepreamble\emptypreamble @@ -133,6 +139,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ \usedir{tex/xelatex/xecjk} \file{\jobname.sty}{\from{\jobname.dtx}{package}} \file{xeCJKfntef.sty}{\from{\jobname.dtx}{fntef}} + \file{xeCJK-listings.sty}{\from{\jobname.dtx}{listings}} \usepreamble\emptypreamble \usepostamble\emptypostamble \usedir{tex/xelatex/xecjk/config} @@ -147,6 +154,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ \file{\jobname-example-punctstyle.tex}{\from{\jobname.dtx}{ex-punctstyle}} \file{\jobname-example-verbatim.tex}{\from{\jobname.dtx}{ex-verb}} \file{\jobname-example-IVS.tex}{\from{\jobname.dtx}{ex-IVS}} + \file{\jobname-example-listings.tex}{\from{\jobname.dtx}{ex-listings}} \nopreamble\nopostamble \usedir{doc/xelatex/xecjk} \file{README.txt}{\from{\jobname.dtx}{readme}} @@ -157,35 +165,37 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ %<*internal> \fi % -%<*driver|package|config|fntef> +%<*driver|package|config|fntef|listings> %<*!config> \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} % -\GetIdInfo$Id: xeCJK.dtx 418 2013-05-29 06:41:21Z sobenlee $ -%<*!config&!fntef> +\GetIdInfo$Id: xeCJK.dtx 438 2013-06-11 14:17:42Z sobenlee $ +%<*driver|package> {Typesetting CJK scripts with XeLaTeX} -% +% % {Configuration file for xeCJK package} % {xeCJK patch file for ulem/CJKfntef} -%<*!package&!fntef> +% {xeCJK patch file for listings} +%<*driver|config> \ProvidesExplFile -% +% %<*driver> {\ExplFileName.\ExplFileExtension} % % {\ExplFileName.cfg} -%\ProvidesExplPackage +%\ProvidesExplPackage % {\ExplFileName} % {xeCJKfntef} - {\ExplFileDate}{3.2.1}{\ExplFileDescription} +% {xeCJK-listings} + {\ExplFileDate}{3.2.3}{\ExplFileDescription} %<*driver> -\def\xeCJKversion{3.2.1} +\def\xeCJKversion{3.2.3} \let\xeCJKdate\ExplFileDate \let\xeCJKrevnum\ExplFileVersion \ExplSyntaxOff % -% +% % %<*driver> \expandafter\let\csname ver@thumbpdf.sty\endcsname\empty @@ -235,6 +245,29 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ } { \pkg {#1} } } +\NewDocumentCommand \PrintPunctList { O{7} m m } + { + \par + \begingroup + \CJKfontspec{Microsoft~YaHei} + \int_gzero:N \g_tmpa_int + \int_set:Nn \l_tmpa_int { \clist_count:c { c__xeCJK_#2_chars_clist } } + \mbox{}\hfill + \begin{tabular}{|*{#1}{>{\footnotesize\ttfamily U+}c|c|}} + \clist_map_inline:cn { c__xeCJK_#2_chars_clist } + { + \int_gincr:N \g_tmpa_int + \use_none:n ##1 & \tex_char:D ##1 \scan_stop: + \int_compare:nNnF \g_tmpa_int = \l_tmpa_int + { + \int_compare:nNnTF { \int_mod:nn \g_tmpa_int {#1} } = \c_zero + { \\ } { & } + } + } + \end{tabular}\hfill\null + \endgroup + \par + } \ExplSyntaxOff \geometry{includemp,hmargin={0mm,15mm},vmargin=15mm,footskip=7mm} \makeatletter @@ -268,14 +301,16 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ \DocInput{\jobname.dtx} \newgeometry{margin=15mm,footskip=7mm} \PrintChanges + \clearpage \PrintIndex \end{document} % % \fi % -% \CheckSum{4034} +% \CheckSum{4400} % \changes{v3.1.0}{2012/11/13}{放弃对 \cs{outer} 宏的特殊处理。} % \changes{v3.1.1}{2012/12/07}{不再依赖 \pkg{xpatch} 宏包。} +% \changes{v3.2.3}{2013/06/07}{提供四个 TECkit 映射文件用于句号转换和简繁互换。} % % % \title{\bfseries\pkg{xeCJK} 宏包} @@ -657,6 +692,20 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % 局部设置当前字体族的伪粗和伪斜属性。如果没有在局部给出这些选项,将使用全局设定。 % \end{function} % +% \begin{function}[added=2013-06-07]{Mapping} +% \begin{syntax} +% Mapping = \marg{fullwidth-stop\orvar{}full-stop\orvar{}han-trad\orvar{}han-simp\orvar{}...} +% \end{syntax} +% \pkg{xeCJK} 提供了以上四个 \href{http://scripts.sil.org/teckit}{TECKit} 映射 +% 文件,可以在设置字体的时候通过 \texttt{Mapping} 选项来使用它们。其中 +% \texttt{fullwidth-stop} 用于将正常句号“。”转换成全角实心句号“.”, +% \texttt{full-stop} 的作用相反。\texttt{han-trad} 用于将简体中文转换成繁体中文, +% \texttt{han-simp} 的作用相反。需要注意的是,简繁互换都是简单机械的字字对译, +% 不能做到完全准确,使用时要小心。例如简体的“发挥”和“头发”被转换成繁体的 +% “發揮”和“頭發”,显然后者应作“頭髮”。也可以根据实际需要,制作新的映射文件, +% 请参考 TECKit 的文档。 +% \end{function} +% % \begin{function}[EXP]{\setCJKsansfont} % \begin{syntax} % \cs{setCJKsansfont} \oarg{font features} \Arg{font name} @@ -1186,9 +1235,10 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % \subsection{其它} % \label{subsec:others} % -% \begin{function}[added=2012-11-19]{\xeCJKVerbAddon} +% \begin{function}[updated=2013-06-04]{\xeCJKVerbAddon,\xeCJKOffVerbAddon} % \begin{syntax} % \cs{xeCJKVerbAddon} +% \cs{xeCJKOffVerbAddon} % \end{syntax} % 调整文字间距以便于让 CJK 字符占的宽度等于西文等宽字体中两个空格的宽度。这有利于 % 等宽字体的代码对齐等情形。需要注意的是,\cs{xeCJKVerbAddon} 对 \pkg{xeCJK} 的内 @@ -1196,7 +1246,10 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % 应该放在分组里限制其作用域,否则是无效的。当然它可以和其它关于代码抄录的宏包配 % 合使用。例如,可以使用于 \package{fancyvrb} 宏包的 |formatcom| 选项。此时设置的 % 西文字体应该确实是等宽的以保证对齐。若西文等宽字体发生变动(包括字体大小),则 -% 需要在其后面使用 \cs{xeCJKVerbAddon},重新计算间距的宽度。 +% 需要在其后面使用 \cs{xeCJKVerbAddon},重新计算间距的宽度。\cs{xeCJKOffVerbAddon} +% 用于在使用 \cs{xeCJKVerbAddon} 的环境中局部取消它的作用。由于 \package{listings} +% 宏包有自己的代码对齐机制,所以 \cs{xeCJKVerbAddon} 在由 \pkg{listings} 定义的 +% 代码环境中无效。 % \end{function} % % \begin{function}[added=2012-12-03]{\xeCJKnobreak} @@ -1209,6 +1262,10 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % % \section{已知问题和兼容性} % +% \XeTeX 在配置文件 \file{unicode-letters.tex} 中将所有 CJK 表意文字的 \cs{catcode} +% 设置为 $11$。因此汉字可以直接用作控制序列的名字,但是当汉字出现在控制序列后面的 +% 时候,要用空格分隔开,否则就会出现“\texttt{! Undefined control sequence.}”的错误。 +% % \pkg{xeCJK} 使用并重新定义了 \pkg{CJK} 宏包的部分宏命令,如 \cs{CJKfamily}、 % \cs{CJKsymbol} 和 \cs{CJKglue} 等。需要指出,\pkg{xeCJK} 不需要 \pkg{CJK} % 的支持,并且 \pkg{xeCJK} 自动禁止在它之后载入 \pkg{CJK} 宏包。 @@ -1218,6 +1275,10 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % 下的替换版本,基本用法完全一致,在 \pkg{CJKfntef} 的源文件\ \file{CJKfntef.sty} % 的注解部分里有说明。} % +% \pkg{xeCJK} 进行了一些处理,使得在使用 \XeTeX 时 \package{listings} 宏包可以 +% 支持 Unicode,因此在 \texttt{listings} 定义的代码环境中可以直接使用中文,不再 +% 需要通过 \texttt{escapechar}。 +% % 新版本(\texttt{3.x})的 \pkg{xeCJK} 完全使用 \hologo{LaTeX3} 的语法来编写。 % \hologo{LaTeX3} 放弃了 \cs{outer} 宏的概念,因此相关工具在 % 遇到 \cs{outer} 宏时可能会存在问题。按照目前 \pkg{xeCJK} 的实现方式,在 CJK 文字 @@ -1809,195 +1870,305 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % \end{macro} % % \begin{macro}[var,internal] -% {\c_@@_HalfLeft_chars_clist,\c_@@_HalfRight_chars_clist,\c_@@_NormalSpace_chars_clist, -% \c_@@_FullLeft_chars_clist,\c_@@_FullRight_chars_clist,\c_@@_CJK_chars_clist, -% \c_@@_IVS_chars_clist} -% \hypertarget{CJKcharclass}{\pkg{xeCJK} 设置的基本字符类的默认范围。} +% {\c_@@_HalfLeft_chars_clist,\c_@@_HalfRight_chars_clist,\c_@@_NormalSpace_chars_clist} +% \hypertarget{CJKcharclass}{西文半角左/右标点和前后原始间距的字符类。} % \begin{macrocode} \clist_const:Nn \c_@@_HalfLeft_chars_clist { "28 , "2D , "5B , "60 , "7B } \clist_const:Nn \c_@@_HalfRight_chars_clist { "21 , "22 , "25 , "27 , "29 , "2C , "2E , "3A , "3B , "3F , "5D , "7D } \clist_const:Nn \c_@@_NormalSpace_chars_clist { "2F } -\clist_const:Nn \c_@@_FullLeft_chars_clist - { - "2018 , "201C , "3008 , "300A , "300C , "300E , "3010 , "3012 , "3014 , - "3016 , "3018 , "301A , "301D , "3036 , "FE59 , "FE5B , "FE5D , "FE5F , - "FE60 , "FE69 , "FE6B , "FF03 , "FF04 , "FF08 , "FF20 , "FF3B , "FF5B , - "FFE0 , "FFE1 , "FFE5 , "FFE6 - } -\clist_const:Nn \c_@@_FullRight_chars_clist - { - "00B7 , "2019 , "201D , "2014 , "2015 , "2025 , "2026 , "2027 , "2500 , - "3001 , "3002 , "3005 , "3006 , "3009 , "300B , "300D , "300F , "3011 , - "3015 , "3017 , "3019 , "301B , "301E , "301F , "3041 , "3043 , "3045 , - "3047 , "3049 , "3063 , "3083 , "3085 , "3087 , "308E , "309B , "309C , - "309D , "309E , "30A1 , "30A3 , "30A5 , "30A7 , "30A9 , "30C3 , "30E3 , - "30E5 , "30E7 , "30EE , "30F5 , "30F6 , "30FB , "30FC , "30FD , "30FE , - "FE50 , "FE51 , "FE52 , "FE54 , "FE55 , "FE56 , "FE57 , "FE5A , "FE5C , - "FE5E , "FE6A , "FF01 , "FF05 , "FF09 , "FF0C , "FF0E , "FF1A , "FF1B , - "FF1F , "FF3D , "FF5D , "FF61 , "FF63 , "FF64 , "FF65 , "FF67 , "FF68 , - "FF69 , "FF6A , "FF6B , "FF6C , "FF6D , "FF6E , "FF6F , "FF70 , "FF9E , - "FF9F +% \end{macrocode} +% \end{macro} +% +% 以下对全角标点符号的归类来源于 \XeTeX 的脚本 +% \href{http://sourceforge.net/p/xetex/code/ci/master/tree/source/texk/web2c/xetexdir/unicode-char-prep.pl} +% {\file{unicode-char-prep.pl}} 和 Unicode 数据库\footnote{\url{http://www.unicode.org/reports/tr14/}}。 +% +% \changes{v3.2.3}{2013/06/09}{根据 \XeTeX 的脚本重新整理全角标点符号。} +% +% \begin{macro}[var,internal]{\c_@@_OP_chars_clist} +% Open Punctuation (OP) +% \PrintPunctList{OP}{Open Punctuation} +% 以下代码的第一行是中西文共用的左引号。 +% \begin{macrocode} +\clist_const:Nn \c_@@_OP_chars_clist + { + "2018 , "201C , + "2329 , "3008 , "300A , "300C , "300E , "3010 , "3014 , "3016 , "3018 , "301A , + "301D , "FE17 , "FE35 , "FE37 , "FE39 , "FE3B , "FE3D , "FE3F , "FE41 , "FE43 , + "FE47 , "FE59 , "FE5B , "FE5D , "FF08 , "FF3B , "FF5B , "FF5F , "FF62 + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[var,internal]{\c_@@_PO_chars_clist} +% Postfix Numeric (PO) +% \PrintPunctList{PO}{Postfix Numeric} +% \begin{macrocode} +\clist_const:Nn \c_@@_PO_chars_clist { "FE6A , "FF05 , "FFE0 } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[var,internal]{\c_@@_FullLeft_chars_clist} +% 以上两类标点符号出现在文字的左边,不应出现在行尾位置。 +% \begin{macrocode} +\clist_const:Nx \c_@@_FullLeft_chars_clist + { + \c_@@_OP_chars_clist , + \c_@@_PO_chars_clist + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[var,internal]{\c_@@_CL_chars_clist} +% Close Punctuation (CL) +% \PrintPunctList{CL}{Close Punctuation} +% 以下代码的第一行是中西文共用的一些标点符号。 +% \begin{macrocode} +\clist_const:Nn \c_@@_CL_chars_clist + { + "00B7 , "2019 , "201D , "2014 , "2015 , "2025 , "2026 , "2027 , "2500 , + "232A , "3001 , "3002 , "3009 , "300B , "300D , "300F , "3011 , "3015 , "3017 , + "3019 , "301B , "301E , "301F , "FE11 , "FE12 , "FE18 , "FE36 , "FE38 , "FE3A , + "FE3C , "FE3E , "FE40 , "FE42 , "FE44 , "FE48 , "FE50 , "FE52 , "FE5A , "FE5C , + "FE5E , "FF09 , "FF0C , "FF0E , "FF3D , "FF5D , "FF60 , "FF61 , "FF63 , "FF64 + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[var,internal]{\c_@@_NS_chars_clist} +% Nonstarter (NS) +% \PrintPunctList{NS}{Nonstarter} +% \begin{macrocode} +\clist_const:Nn \c_@@_NS_chars_clist + { + "3005 , "301C , "303B , "303C , "309B , "309C , "309D , "309E , "30A0 , "30FB , + "30FD , "30FE , "A015 , "FE54 , "FE55 , "FF1A , "FF1B , "FF65 , "FF9E , "FF9F + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[var,internal]{\c_@@_EX_chars_clist} +% Exclamation/Interrogation (EX) +% \PrintPunctList{EX}{Exclamation/Interrogation} +% \begin{macrocode} +\clist_const:Nn \c_@@_EX_chars_clist + { "FE15 , "FE16 , "FE56 , "FE57 , "FF01 , "FF1F } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[var,internal]{\c_@@_IS_chars_clist} +% Infix Numeric Separator (IS) +% \PrintPunctList{IS}{Infix Numeric Separator} +% \begin{macrocode} +\clist_const:Nn \c_@@_IS_chars_clist { "FE10 , "FE13 , "FE14 } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[var,internal]{\c_@@_CJ_chars_clist} +% Conditional Japanese Starter (CJ) +% \PrintPunctList{CJ}{Conditional Japanese Starter} +% \begin{macrocode} +\clist_const:Nn \c_@@_CJ_chars_clist + { + "3041 , "3043 , "3045 , "3047 , "3049 , "3063 , "3083 , "3085 , "3087 , "308E , + "3095 , "3096 , "30A1 , "30A3 , "30A5 , "30A7 , "30A9 , "30C3 , "30E3 , "30E5 , + "30E7 , "30EE , "30F5 , "30F6 , "30FC , "31F0 , "31F1 , "31F2 , "31F3 , "31F4 , + "31F5 , "31F6 , "31F7 , "31F8 , "31F9 , "31FA , "31FB , "31FC , "31FD , "31FE , + "31FF , "FF67 , "FF68 , "FF69 , "FF6A , "FF6B , "FF6C , "FF6D , "FF6E , "FF6F , + "FF70 } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[var,internal]{\c_@@_PR_chars_clist} +% Prefix Numeric (PR) +% \PrintPunctList{PR}{Prefix Numeric} +% \begin{macrocode} +\clist_const:Nn \c_@@_PR_chars_clist + { "20A9 , "FE69 , "FF04 , "FFE1 , "FFE5 , "FFE6 } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[var,internal]{\c_@@_FullRight_chars_clist} +% 以上六类标点符号出现在文字的右边,不应出现在行首位置。 +% \begin{macrocode} +\clist_const:Nx \c_@@_FullRight_chars_clist + { + \c_@@_CL_chars_clist , + \c_@@_NS_chars_clist , + \c_@@_EX_chars_clist , + \c_@@_IS_chars_clist , + \c_@@_CJ_chars_clist , + \c_@@_PR_chars_clist + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[var,internal]{\c_@@_CJK_chars_clist} +% CJK 字符类,包括文字和标点符号。 +% \begin{macrocode} \clist_const:Nn \c_@@_CJK_chars_clist { % \end{macrocode} % \begin{itemize}[nosep,leftmargin=0pt] % \item Hangul Jamo (谚文字母) % \begin{macrocode} - "1100 -> "11FF , + "1100 -> "11FF , % \end{macrocode} % \item CJK Radicals Supplement (中日韩部首补充) % \begin{macrocode} - "2E80 -> "2EFF , + "2E80 -> "2EFF , % \end{macrocode} % \item Kangxi Radicals (康熙部首) % \begin{macrocode} - "2F00 -> "2FDF , + "2F00 -> "2FDF , % \end{macrocode} % \item Ideographic Description Characters (表意文字描述符) % \begin{macrocode} - "2FF0 -> "2FFF , + "2FF0 -> "2FFF , % \end{macrocode} % \item CJK Symbols and Punctuation (中日韩符号和标点) % \begin{macrocode} - "3000 -> "303F , + "3000 -> "303F , % \end{macrocode} % \item Hiragana (日文平假名) % \begin{macrocode} - "3040 -> "309F , + "3040 -> "309F , % \end{macrocode} % \item Katakana (日文片假名) % \begin{macrocode} - "30A0 -> "30FF , + "30A0 -> "30FF , % \end{macrocode} % \item Bopomofo (注音字母) % \begin{macrocode} - "3100 -> "312F , + "3100 -> "312F , % \end{macrocode} % \item Hangul Compatibility Jamo (谚文兼容字母) % \begin{macrocode} - "3130 -> "318F , + "3130 -> "318F , % \end{macrocode} % \item Kanbun (象形字注释标志) % \begin{macrocode} - "3190 -> "319F , + "3190 -> "319F , % \end{macrocode} % \item Bopomofo Extended (注音字母扩展) % \begin{macrocode} - "31A0 -> "31BF , + "31A0 -> "31BF , % \end{macrocode} % \item CJK Strokes (中日韩笔画) % \begin{macrocode} - "31C0 -> "31EF , + "31C0 -> "31EF , % \end{macrocode} % \item Katakana Phonetic Extensions (日文片假名语音扩展) % \begin{macrocode} - "31F0 -> "31FF , + "31F0 -> "31FF , % \end{macrocode} % \item Enclosed CJK Letters and Months (带圈中日韩字母和月份) % \begin{macrocode} - "3200 -> "32FF , + "3200 -> "32FF , % \end{macrocode} % \item CJK Compatibility (中日韩兼容) % \begin{macrocode} - "3300 -> "33FF , + "3300 -> "33FF , % \end{macrocode} % \item CJK Unified Ideographs Extension-A (中日韩统一表意文字扩展 A) % \begin{macrocode} - "3400 -> "4DBF , + "3400 -> "4DBF , % \end{macrocode} % \item Yijing Hexagrams Symbols (易经六十四卦符号) % \begin{macrocode} - "4DC0 -> "4DFF , + "4DC0 -> "4DFF , % \end{macrocode} % \item CJK Unified Ideographs (中日韩统一表意文字) % \begin{macrocode} - "4E00 -> "9FFF , + "4E00 -> "9FFF , % \end{macrocode} % \item Yi Syllables (彝文音节) % \begin{macrocode} - "A000 -> "A48F , + "A000 -> "A48F , % \end{macrocode} % \item Yi Radicals (彝文字根) % \begin{macrocode} - "A490 -> "A4CF , + "A490 -> "A4CF , % \end{macrocode} % \item Hangul Jamo Extended-A (谚文扩展 A) % \begin{macrocode} - "A960 -> "A97F , + "A960 -> "A97F , % \end{macrocode} % \item Hangul Syllables (谚文音节) % \begin{macrocode} - "AC00 -> "D7AF , + "AC00 -> "D7AF , % \end{macrocode} % \item Hangul Jamo Extended-B (谚文扩展 B) % \begin{macrocode} - "D7B0 -> "D7FF , + "D7B0 -> "D7FF , % \end{macrocode} % \item CJK Compatibility Ideographs (中日韩兼容表意文字) % \begin{macrocode} - "F900 -> "FAFF , + "F900 -> "FAFF , % \end{macrocode} % \item Vertical Forms (竖排形式) % \begin{macrocode} - "FE10 -> "FE1F , + "FE10 -> "FE1F , % \end{macrocode} % \item CJK Compatibility Forms (中日韩兼容形式) % \begin{macrocode} - "FE30 -> "FE4F , + "FE30 -> "FE4F , % \end{macrocode} % \item Halfwidth and Fullwidth Forms (半角及全角形式) % \begin{macrocode} - "FF00 -> "FFEF , + "FF00 -> "FFEF , % \end{macrocode} % \item Kana Supplement (日文假名增补) % \begin{macrocode} - "1B000 -> "1B0FF , + "1B000 -> "1B0FF , % \end{macrocode} % \item Enclosed Ideographic Supplement (带圈表意文字增补) % \begin{macrocode} - "1F200 -> "1F2FF , + "1F200 -> "1F2FF , % \end{macrocode} % \item CJK Unified Ideographs Extension-B (中日韩统一表意文字扩展 B) % \begin{macrocode} - "20000 -> "2A6DF , + "20000 -> "2A6DF , % \end{macrocode} % \item CJK Unified Ideographs Extension-C (中日韩统一表意文字扩展 C) % \begin{macrocode} - "2A700 -> "2B73F , + "2A700 -> "2B73F , % \end{macrocode} % \item CJK Unified Ideographs Extension-D (中日韩统一表意文字扩展 D) % \begin{macrocode} - "2B740 -> "2B81F , + "2B740 -> "2B81F , % \end{macrocode} % \item CJK Compatibility Ideographs Supplement (中日韩兼容表意文字增补) % \begin{macrocode} - "2F800 -> "2FA1F + "2F800 -> "2FA1F % \end{macrocode} % \end{itemize} % \begin{macrocode} } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[var,internal]{\c_@@_IVS_chars_clist} +% 包括日文假名浊点和异体字选择符。 +% \begin{macrocode} \clist_const:Nn \c_@@_IVS_chars_clist { % \end{macrocode} % \begin{itemize}[nosep,leftmargin=0pt] -% \item COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK -% \begin{macrocode} - "3099 , -% \end{macrocode} -% \item COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK +% \item 日文假名浊点 % \begin{macrocode} - "309A , + "3099 -> "309A , % \end{macrocode} % \item Variation Selectors (异体字选择符) % \begin{macrocode} - "FE00 -> "FE0F , + "FE00 -> "FE0F , % \end{macrocode} % \item Variation Selectors Supplement (异体字选择符增补) % \begin{macrocode} - "E0100 -> "E01EF + "E0100 -> "E01EF % \end{macrocode} % \end{itemize} % \begin{macrocode} @@ -2059,6 +2230,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ { \xeCJK_class_num:n {#1} } } } + \xeCJK_set_char_class:nnn { "3099 } { "309A } { \xeCJK_class_num:n { IVS } } } \NewDocumentCommand \@@_set_char_class_aux:Nnw { m > { \SplitArgument { 1 } { -> } } m } { #1 #2 } @@ -2067,47 +2239,6 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % \end{macrocode} % \end{macro} % -% \begin{macro}[internal]{\@@_set_char_class_catcode:nnn} -% 设置字符类别的同时,设置所有 |CJK| 字符的 \cs{catcode} 为 |12|。\XeTeX 的配置文件 -% \file{unicode-letters.tex} 将所有 |CJK| 表意文字的 \cs{catcode} 设置为 |11|。我们 -% 在作出改变的目的是方便 |CheckSingle| 的判断。事实上,|CheckSingle| 的判断也可以不 -% 依赖 \cs{catcode},而改为判断 \cs{XeTeXcharclass}。但是判读一个隐性记号 -% (\cs{l_peek_token})的 \cs{XeTeXcharclass} 比直接判断它的 \cs{catcode} 要低效得多。 -% \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_set_char_class_catcode:nnn #1#2#3 - { - \@@_check_num_range:nnNN {#1} {#2} \l_@@_tmpa_int \l_@@_tmpb_int - \int_set:Nn \l_@@_tmpc_int {#3} - \int_compare:nNnTF - { \use:c { \@@_class_csname:n { CJK } } } = \l_@@_tmpc_int - { \cs_set_eq:NN \@@_set_char_catcode:n \char_set_catcode_other:n } - { \cs_set_eq:NN \@@_set_char_catcode:n \use_none:n } - \xeCJK_int_until_do:nn { \l_@@_tmpa_int > \l_@@_tmpb_int } - { - \@@_set_char_catcode:n { \l_@@_tmpa_int } - \XeTeXcharclass \l_@@_tmpa_int = \l_@@_tmpc_int - \int_incr:N \l_@@_tmpa_int - } - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}[internal]{\@@_set_char_class:nnn} -% 只设置字符类别,而不改变 \cs{catcode}。 -% \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_set_char_class:nnn #1#2#3 - { - \@@_check_num_range:nnNN {#1} {#2} \l_@@_tmpa_int \l_@@_tmpb_int - \int_set:Nn \l_@@_tmpc_int {#3} - \xeCJK_int_until_do:nn { \l_@@_tmpa_int > \l_@@_tmpb_int } - { - \XeTeXcharclass \l_@@_tmpa_int = \l_@@_tmpc_int - \int_incr:N \l_@@_tmpa_int - } - } -% \end{macrocode} -% \end{macro} -% % \begin{macro}[internal]{\@@_check_num_range:nnNN} % \begin{macrocode} \cs_new_protected_nopar:Npn \@@_check_num_range:nnNN #1#2#3#4 @@ -2125,14 +2256,22 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % \end{macrocode} % \end{macro} % +% \changes{v3.2.3}{2013/06/08}{不再改变 CJK 字符类的 \cs{catcode}。} +% % \begin{macro}[internal]{\xeCJK_set_char_class:nnn} % \changes{v3.1.1}{2012/12/05}{在文档中设置字符类别时不重复设置 \cs{catcode}。} -% |#1| 和 |#2| 为字符类别起止的 |Unicode|,|#3| 为类别名称对应编号。在宏包内部使用 -% 时,设置 |CJK| 字符的 \cs{catcode},而在文档中使用时不设置。 +% 设置字符类别,|#1| 和 |#2| 为字符类别起止的 |Unicode|,|#3| 为类别名称对应编号。 % \begin{macrocode} -\cs_new_eq:NN \xeCJK_set_char_class:nnn \@@_set_char_class_catcode:nnn -\AtEndOfPackage - { \cs_set_eq:NN \xeCJK_set_char_class:nnn \@@_set_char_class:nnn } +\cs_new_protected_nopar:Npn \xeCJK_set_char_class:nnn #1#2#3 + { + \@@_check_num_range:nnNN {#1} {#2} \l_@@_tmpa_int \l_@@_tmpb_int + \int_set:Nn \l_@@_tmpc_int {#3} + \xeCJK_int_until_do:nn { \l_@@_tmpa_int > \l_@@_tmpb_int } + { + \XeTeXcharclass \l_@@_tmpa_int = \l_@@_tmpc_int + \int_incr:N \l_@@_tmpa_int + } + } % \end{macrocode} % \end{macro} % @@ -3084,7 +3223,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ #1+ .code:n = { \tl_map_inline:nn {##1} - { \seq_if_in:NnF #2 {####1} { \seq_put_right:Nn #3 {####1} } } + { \seq_if_in:NnF #3 {####1} { \seq_put_right:Nn #3 {####1} } } \@@_update_cs_case_tl:NNnn #2#3 {#4} {#5} } , #1- .code:n = @@ -3166,17 +3305,22 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % \begin{macrocode} \cs_new_protected_nopar:Npn \xeCJK_check_single:Nw #1 { - \peek_catcode:NTF \c_catcode_other_token + \peek_catcode:NTF \c_catcode_letter_token { \xeCJK_check_single:NNw #1 } { - \bool_if:nTF + \token_if_other:NTF \l_peek_token + { \xeCJK_check_single:NNw #1 } { - \xeCJK_if_blank_x_p:n { \token_get_arg_spec:N \l_peek_token } && - \exp_args:No \tl_if_single_token_p:n \l_peek_token && - \exp_after:wN \token_if_other_p:N \l_peek_token + \bool_if:nTF + { + \xeCJK_if_blank_x_p:n { \token_get_arg_spec:N \l_peek_token } && + \exp_args:No \tl_if_single_token_p:n \l_peek_token && + ( \exp_after:wN \token_if_other_p:N \l_peek_token || + \exp_after:wN \token_if_letter_p:N \l_peek_token ) + } + { \exp_after:wN \xeCJK_check_single:NNw \exp_after:wN #1 } + { \@@_check_single_save:N #1 } } - { \exp_after:wN \xeCJK_check_single:NNw \exp_after:wN #1 } - { \@@_check_single_save:N #1 } } } % \end{macrocode} @@ -3189,7 +3333,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % \begin{macrocode} \cs_new_protected_nopar:Npn \xeCJK_check_single:NNw #1#2 { - \xeCJK_peek_catcode_ignore_spaces:NTF \c_catcode_other_token + \xeCJK_peek_catcode_ignore_spaces:NTF \c_catcode_letter_token { \bool_if:NTF \l_@@_peek_ignore_spaces_bool { \@@_check_single_space:NN #1#2 } @@ -3197,29 +3341,38 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ } { \group_align_safe_begin: - \token_if_cs:NTF \l_peek_token + \token_if_other:NTF \l_peek_token { \group_align_safe_end: \bool_if:NTF \l_@@_peek_ignore_spaces_bool - { \xeCJK_check_single_cs:NNn #1#2 { ~ } } - { \xeCJK_check_single_cs:NNn #1#2 { } } + { \@@_check_single_space:NN #1#2 } + { \@@_check_single_save:N #1 #2 } } { - \group_align_safe_end: - \bool_if:nTF - { - \l_@@_plain_equation_bool && - \token_if_math_toggle_p:N \l_peek_token - } + \token_if_cs:NTF \l_peek_token { + \group_align_safe_end: \bool_if:NTF \l_@@_peek_ignore_spaces_bool - { \xeCJK_check_single_equation:NNnNw #1 #2 { ~ } } - { \xeCJK_check_single_equation:NNnNw #1 #2 { } } + { \xeCJK_check_single_cs:NNn #1#2 { ~ } } + { \xeCJK_check_single_cs:NNn #1#2 { } } } { - \bool_if:NTF \l_@@_peek_ignore_spaces_bool - { \@@_check_single_save:N #1 #2 ~ } - { \@@_check_single_save:N #1 #2 } + \group_align_safe_end: + \bool_if:nTF + { + \l_@@_plain_equation_bool && + \token_if_math_toggle_p:N \l_peek_token + } + { + \bool_if:NTF \l_@@_peek_ignore_spaces_bool + { \xeCJK_check_single_equation:NNnNw #1 #2 { ~ } } + { \xeCJK_check_single_equation:NNnNw #1 #2 { } } + } + { + \bool_if:NTF \l_@@_peek_ignore_spaces_bool + { \@@_check_single_save:N #1 #2 ~ } + { \@@_check_single_save:N #1 #2 } + } } } } @@ -3260,13 +3413,29 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % \end{macrocode} % \end{macro} % +% \changes{v3.2.3}{2013/06/11} +% {解决 \texttt{CheckSingle} 选项与 \pkg{tablists} 宏包的冲突。} +% % \begin{macro}[internal]{\xeCJK_check_single_cs:NNn} +% 在使用 \texttt{CheckSingle} 选项时,在 \package{tablists} 宏包定义的 +% \env{tabenum} 环境中会出现下面的错误: +% \begin{verbatim} +% ! Forbidden control sequence found while scanning use of \use_ii:nn. +% +% \par +% l.10 \item +% \end{verbatim} +% 原因在于 \env{tabenum} 实际上是一个 \TeX 对齐环境(\cs{halign}),\cs{par} 在 +% 其中被重定义为 \cs{cr}。而在下面 \cs{tl_case:Nnn} 的分支里有对 \cs{par} 的 +% \cs{ifx} 判断。解决办法是将判断用 \cs{group_align_safe_begin:} 和 +% \cs{group_align_safe_end:} 包起来。或者改用原语 \cs{tex_par:D} 作为判断条件。 % \begin{macrocode} \cs_new_protected_nopar:Npn \xeCJK_check_single_cs:NNn #1#2#3 { + \group_align_safe_begin: \tl_case:Non \l_peek_token { \l_@@_check_single_cs_case_tl } - { \use_iii:nnn } + { \group_align_safe_end: \use_iii:nnn } { \xeCJK_check_single_env:nnNn } { \xeCJK_no_break: \@@_check_single_save:N #1 @@ -3282,9 +3451,10 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % \begin{macrocode} \cs_new_protected_nopar:Npn \xeCJK_check_single_env:nnNn #1#2#3#4 { + \group_align_safe_begin: \str_case_x:non {#4} { \l_@@_inline_env_case_tl } - { \use_i:nn } + { \group_align_safe_end: \use_i:nn } {#1} {#2} \scan_stop: #3 {#4} } @@ -3297,7 +3467,8 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % \begin{macro}{NewLineCS} % \begin{macrocode} \xeCJK_cs_case_keys_define:nNNnn { NewLineCS } - \l_@@_new_line_cs_case_tl \l_@@_new_line_cs_seq { \use_ii:nnn } + \l_@@_new_line_cs_case_tl \l_@@_new_line_cs_seq + { \group_align_safe_end: \use_ii:nnn } { \tl_concat:NNN \l_@@_check_single_cs_case_tl \l_@@_new_line_cs_case_tl \l_@@_env_cs_case_tl @@ -3308,7 +3479,8 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % \begin{macro}{EnvCS} % \begin{macrocode} \xeCJK_cs_case_keys_define:nNNnn { EnvCS } - \l_@@_env_cs_case_tl \l_@@_env_cs_seq { \use:n } + \l_@@_env_cs_case_tl \l_@@_env_cs_seq + { \group_align_safe_end: \use:n } { \tl_concat:NNN \l_@@_check_single_cs_case_tl \l_@@_new_line_cs_case_tl \l_@@_env_cs_case_tl @@ -5339,28 +5511,25 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ \cs_set_eq:NN \CJKecglue \@@_zero_glue: \or: \int_compare:nNnTF \etex_currentgrouptype:D = \c_fourteen - { - \@@_set_verb_exspace: - \@@_verb_addon: - } + { \xeCJKVerbAddon } { \cs_set_eq:NN \CJKglue \@@_zero_glue: \cs_set_eq:NN \CJKecglue \@@_zero_glue: } \or: \int_compare:nNnT \etex_currentgrouptype:D = \c_fourteen - { - \@@_set_verb_exspace: - \@@_verb_addon: - } + { \xeCJKVerbAddon } \fi: } } % \end{macrocode} % \end{macro} % -% \begin{macro}{\xeCJKVerbAddon} +% \begin{macro}{\xeCJKVerbAddon,\xeCJKOffVerbAddon} % \changes{v3.1.0}{2012/11/19}{新增 \cs{xeCJKVerbAddon} 用于抄录环境中的间距调整。} +% \changes{v3.2.3}{2013/06/04} +% {新增 \cs{xeCJKOffVerbAddon} 用于局部取消 \cs{xeCJKOffVerbAddon} 的影响;并解决 +% 跨页使用时影响到页眉页脚的问题。} % \cs{xeCJKVerbAddon} 进行了比较大的调整,应该只在分组环境里使用。为了方便调整间距 % 以利于对齐,这里只把字符分成了两类,并且在 CJK 类与边界(空格)之间也插入 % \cs{CJKecglue}。当然,这样做之后,关于标点符号的禁则就没有了。 @@ -5369,10 +5538,15 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ { \int_compare:nNnF \etex_currentgrouplevel:D = \c_zero { - \@@_set_verb_exspace: - \@@_verb_addon: + \bool_if:NF \l_@@_listings_env_bool + { + \@@_set_verb_exspace: + \@@_verb_addon: + } } } +\bool_new:N \l_@@_listings_env_bool +\NewDocumentCommand \xeCJKOffVerbAddon { } { } \cs_new_protected_nopar:Npn \@@_verb_addon: { \bool_if:NF \l_@@_verb_addon_bool @@ -5383,6 +5557,36 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ \@@_set_char_class_eq:nn { HalfLeft } { Default } \@@_set_char_class_eq:nn { HalfRight } { Default } \@@_set_char_class_eq:nn { NormalSpace } { Default } + \cs_set_eq:NN \@@_verb_CJKglue: \CJKglue + \cs_set_eq:NN \@@_verb_CJKecglue: \CJKecglue + \cs_set_eq:NN \@@_verb_check_for_glue: \xeCJK_check_for_glue: + \cs_set_eq:NN \@@_verb_ignore_spaces:w \xeCJK_ignore_spaces:w + \cs_set_protected_nopar:Npx \xeCJKOffVerbAddon + { + \@@_reset_char_class:n { FullLeft } + \@@_reset_char_class:n { FullRight } + \@@_reset_char_class:n { HalfLeft } + \@@_reset_char_class:n { HalfLeft } + \@@_reset_char_class:n { NormalSpace } + \skip_set:Nn \tex_rightskip:D { \skip_use:N \tex_rightskip:D } + \exp_not:c + { bool_set_ \bool_if:NTF \l_@@_xecglue_bool { true } { false } :N } + \l_@@_xecglue_bool + \exp_not:n + { + \cs_set_eq:NN \CJKglue \@@_verb_CJKglue: + \cs_set_eq:NN \CJKecglue \@@_verb_CJKecglue: + \cs_set_eq:NN \xeCJK_check_for_glue: \@@_verb_check_for_glue: + \cs_set_eq:NN \xeCJK_ignore_spaces:w \@@_verb_ignore_spaces:w + } + } + \tex_output:D \exp_after:wN \exp_after:wN \exp_after:wN + { + \exp_after:wN \exp_after:wN + \exp_after:wN \xeCJKOffVerbAddon + \exp_after:wN \use:n + \tex_the:D \tex_output:D + } \xeCJKsetup { xCJKecglue = false } \cs_set_protected_nopar:Npn \CJKglue { \skip_horizontal:N \g_@@_verb_exspace_skip } @@ -5393,6 +5597,12 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ \skip_set:Nn \tex_rightskip:D { \c_zero_dim plus 1 fil } } } +\cs_new_protected_nopar:Npn \@@_reset_char_class:n #1 + { + \int_set:Nn \l_@@_tmpa_int { \xeCJK_class_num:n {#1} } + \clist_map_inline:cn { c_@@_#1_chars_clist } + { \XeTeXcharclass ##1 = \l_@@_tmpa_int } + } \bool_new:N \l_@@_verb_addon_bool \cs_new_eq:NN \CJKfixedspacing \xeCJKVerbAddon % \end{macrocode} @@ -5761,6 +5971,40 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % \end{macrocode} % \end{macro} % +% \begin{macro}[internal]{\xeCJK@text@composite} +% \changes{v3.2.2}{2013/06/01}{修正某些重音不能正确显示的问题。} +% 这里修改的目的是让 |\'{\^e}| 等直接展开成在 \pkg{xunicode} 中由下面定义的 +% |\char"1EBF\relax|,也就是让这些定义生效: +% \begin{verbatim} +% \DeclareUTFcomposite[\UTFencname]{x1EBF}{\'}{\^e} +% \end{verbatim} +% 按照 \pkg{source2e} 中 \cs{@text@composite} 的定义,目前 \pkg{xunicode} 对这种三个 +% 记号组合的定义不会起作用。|\'{\^e}| 将会被展开成 |\char"00EA\relax\char"0301\relax| +% 这种组合字符。由于中间的 \cs{relax} 会造成状态转移,按照 \pkg{xeCJK} 的机制,就会 +% 插入 \texttt{kern},最终破坏了 \XeTeX 将两个字符正确的组合起来。除此之外,还可以 +% 将 \pkg{xunicode} 中所有 \cs{char} 数字后面的 \cs{relax} 全部改成普通空格,这样就 +% 不会留下多余的 \cs{relax}。或者使用 \texttt{lowercase} 技巧,直接由 \texttt{Unicode} +% 得到实际字符,而不需要通过 \cs{char}。但是,如果在 \pkg{xeCJK} 中修改的话,还要 +% \cs{ReloadXunicode} 才会起作用。需要注意的是,如果原来字体中缺少 \'{\^e} 这个字符, +% 但是有 \^e 这个字符的话,|\'{\^e}| 会输出为 \^e,现在则是留下一个空白。 +% \begin{macrocode} +\cs_new_nopar:Npn \xeCJK@text@composite #1#2#3 \@text@composite + { + \str_if_eq:nnTF {#3} { \@empty } + { \orig@text@composite #1#2#3 \@text@composite } + { \@@_text_composite:Nnw #1#2#3 } + } +\cs_new_nopar:Npn \@@_text_composite:Nnw #1#2 \@empty + { + \tl_if_empty:nTF {#2} + { \orig@text@composite #1 \@empty \@text@composite } + { \cs_if_exist_use:cF { \token_to_str:N #1 - \token_to_str:N #2 } } + } +\cs_new_eq:NN \orig@text@composite \@text@composite +\cs_set_eq:NN \@text@composite \xeCJK@text@composite +% \end{macrocode} +% \end{macro} +% % \changes{v3.1.1}{2012/12/13}{对于与 \pkg{xltxtra} 的冲突给出错误警告。} % \begin{macrocode} \@@_msg_new:nn { conflict-package } @@ -5950,7 +6194,9 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % \end{macro} % % 单独处理宽度有分歧的几个标点:包括省略号、破折号、间隔号、引号等中西文混用的 -% 符号, 保证其命令形式输出的是西文字体。并对一些编码的符号宏包做特殊处理。 +% 符号, 保证其命令形式输出的是西文字体。并对一些编码的符号宏包做特殊处理。在 +% 使用 \texttt{T1} 编码的时候,|\r{u}| 的实际定义是 |\char183| 与常被用作中文 +% 间隔号的 \texttt{U+00B7} 冲突。 % \begin{macrocode} \@@_after_preamble:n { @@ -5965,7 +6211,16 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ } \tl_put_left:Nn \tipaencoding { \makexeCJKinactive } \cs_new_eq:NN \@@_aux_r:n \r - \cs_set_nopar:Npn \r #1 { { \makexeCJKinactive \@@_aux_r:n {#1} } } + \cs_set_nopar:Npn \r #1 + { + \bool_if:nTF + { + \str_if_eq_x_p:nn { \f@encoding } { T1 } && + \str_if_eq_x_p:nn {#1} { u } + } + { { \makexeCJKinactive \@@_aux_r:n {#1} } } + { \@@_aux_r:n {#1} } + } \xeCJK_if_package_loaded:nT { pifont } { \RenewDocumentCommand \Pifont { m } @@ -6032,9 +6287,12 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % 由于 \pkg{xeCJK} 禁止 \pkg{CJKulem} 的载入,因此当使用 \pkg{ctex} 宏包的 |fntef| % 选项时,就会出现 \cs{normalem} 没有定义的问题。此时改用 \pkg{xeCJKfntef} 以便 % 载入 \pkg{ulem}。 +% +% 判断过于繁琐,应该在 \pkg{ctex} 包中妥善处理。这段代码应在 \pkg{ctex} 包发布 +% 新版本后删去。 % \begin{macrocode} \cs_if_eq:NNTF \ifCTEX@fntef \tex_iftrue:D - { \RequirePackage { xeCJKfntef } } + { \AtEndOfPackage { \RequirePackage { xeCJKfntef } } } { \@@_at_end_preamble:n { @@ -6051,6 +6309,15 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ } % \end{macrocode} % +% 导言区末尾检测到 \pkg{listings} 时,自动载入 \pkg{xeCJK-listings}。 +% \begin{macrocode} +\@@_at_end_preamble:n + { + \xeCJK_if_package_loaded:nT { listings } + { \RequirePackage { xeCJK-listings } } + } +% \end{macrocode} +% % 为使用 \pkg{CJKnumb} 宏包而作一些处理。另外 \pkg{CJKnumb} 使用的是传统汉字“萬” % 和“億”,我们在这里把它们修正为简体字。 % \begin{macrocode} @@ -6099,9 +6366,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % \end{macrocode} % % \begin{macrocode} -\@ifpackageloaded { xeCJK } - { } - { \RequirePackage { xeCJK } } +\RequirePackage { xeCJK } \RequirePackage { ulem } \RequirePackage { CJKfntef } % \end{macrocode} @@ -6371,13 +6636,14 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % \end{macro} % % \begin{macro}[internal]{\@@_ulem_CJK_and_FullRight_glue:N} +% \changes{v3.2.2}{2013/05/30}{修正下划线不能跳过全角右标点的问题。} % \begin{macrocode} \cs_new_protected_nopar:Npn \@@_ulem_CJK_and_FullRight_glue:N #1 { \xeCJK_if_ulem_patch:TF { \xeCJK_class_group_end: - \@@_ulem_Default_and_FullRight_glue:N {#1} + \@@_Default_and_FullRight_glue:N {#1} \@@_ulem_class_group_begin: } { \@@_ulem_CJK_and_FullRight_glue:N #1 } @@ -6409,12 +6675,14 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % \end{macro} % % \begin{macro}[internal]{\@@_ulem_FullLeft_and_CJK:} +% \changes{v3.2.3}{2013/06/04} +% {修正全角左标点后下划线与 \cs{CJKunderdot} 连用时结果不正常的问题。} % \begin{macrocode} \cs_new_protected_nopar:Npn \@@_ulem_FullLeft_and_CJK: { \xeCJK_if_ulem_patch:TF { - \@@_ulem_FullLeft_and_Default: + \xeCJK_FullLeft_and_Default: \@@_ulem_class_group_begin: } { \@@_ulem_FullLeft_and_CJK: } @@ -6502,10 +6770,12 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ \@@_make_under_symbol:n { \CJK@underdotSkip } \cs_gset_eq:NN \@@_save_under_dot_CJKsymbol:N \CJKsymbol \cs_set_eq:NN \CJKsymbol \@@_under_CJKsymbol:N + \@@_restore_output_CJKsymbol: \bool_if:NT \l_@@_ulem_hook_used_bool { \UL@start } #1 \bool_if:NT \l_@@_ulem_hook_used_bool { \UL@stop } \cs_set_eq:NN \CJKsymbol \@@_save_under_dot_CJKsymbol:N + \tex_output:D \exp_after:wN { \l_@@_underdot_output_tl } \CJK@postUnderdot \bool_if:NT \l_@@_ulem_hook_used_bool { \UL@start } \tex_ignorespaces:D @@ -6523,6 +6793,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ \@@_make_under_symbol:n {#1} \cs_gset_eq:NN \@@_save_under_dot_CJKsymbol:N \CJKsymbol \cs_set_eq:NN \CJKsymbol \@@_under_CJKsymbol:N + \@@_restore_output_CJKsymbol: #3 \group_end: \tex_ignorespaces:D @@ -6530,6 +6801,26 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % \end{macrocode} % \end{macro} % +% \begin{macro}[internal]{\@@_restore_output_CJKsymbol:} +% \changes{v3.2.3}{2013/06/04}{解决 \cs{CJKunderdot} 跨页使用时影响到页眉页脚的问题。} +% \cs{CJKunderdot} 中对 \cs{CJKsymbol} 的修改会影响到页眉和页脚,需要小心处理。 +% \begin{macrocode} +\cs_new_protected:Npn \@@_restore_output_CJKsymbol: + { + \tl_set:Nx \l_@@_underdot_output_tl + { \exp_after:wN \exp_not:n \tex_the:D \tex_output:D } + \tex_output:D \exp_after:wN + { + \exp_after:wN \cs_set_eq:NN + \exp_after:wN \CJKsymbol + \exp_after:wN \__xeCJK_save_under_dot_CJKsymbol:N + \l_@@_underdot_output_tl + } + } +\tl_new:N \l_@@_underdot_output_tl +% \end{macrocode} +% \end{macro} +% % \begin{macro}[internal]{\@@_make_under_symbol:n} % \begin{macrocode} \cs_new_protected:Npn \@@_make_under_symbol:n #1 @@ -6600,6 +6891,304 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ % % \end{macrocode} % +% \subsection{\pkg{xeCJK-listings}} +% +% \changes{v3.2.2}{2012/06/04}{增加小宏包 \pkg{xeCJK-listings},用于支持 \pkg{listings} 宏包。} +% \changes{v3.2.3}{2012/06/06}{完善对 \pkg{listings} 宏包的支持。} +% +% 仿照 \package{luatexja} 宏包中 \pkg{lltjp-listings} 的处理,支持 \package{listings} 宏包。 +% +% \begin{macrocode} +%<*listings> +% \end{macrocode} +% +% \begin{macrocode} +\DeclareOption* { \PassOptionsToPackage { \CurrentOption } { xeCJK } } +\ProcessOptions \scan_stop: +% \end{macrocode} +% +% \begin{macrocode} +\RequirePackage { xeCJK } +\RequirePackage { listings } +% \end{macrocode} +% +% \begin{macrocode} +\lst@AddToHook { Init } { \@@_listings_initial_hook: } +\lst@AddToHook { SelectCharTable } { \@@_listings_toks_hook: } +\lst@AddToHook { OutputBox } + { + \l_@@_restore_listings_toks_tl + \@@_listings_output_IVS: + } +\lst@AddToHook { PreSet } { \bool_set_true:N \l_@@_listings_env_bool } +% \end{macrocode} +% +% \begin{macro}[internal]{\@@_listings_initial_hook:} +% \changes{v3.2.3}{2013/06/04} +% {解决 \texttt{listings} 坏境中代码行号输出不正确的问题,并解决在其中跨页时对页眉 +% 和页脚的影响。} +% 为使代码行号结果正确,需要在 \cs{lst@numberstyle} 中恢复 \cs{XeTeXinterchartoks}。 +% 在 \texttt{listings} 环境中换页时,对 \cs{XeTeXinterchartoks} 的修改会影响到 +% 页眉和页脚,需要在 \cs{output} 中恢复成正常定义。这里使用 \cs{use:n} 是为了在 +% \cs{tex_output:D} 中不增加额外的分组。加入 \cs{tex_noindent:D} 是为了防止汉字 +% 出现在首行的时候可能会产生额外空行。 +% \begin{macrocode} +\cs_new_protected_nopar:Npn \@@_listings_initial_hook: + { + \tex_noindent:D + \bool_gset_false:N \g_@@_listings_IVS_bool + \tl_put_left:Nn \lst@numberstyle { \l_@@_restore_listings_toks_tl } + \tex_output:D \exp_after:wN \exp_after:wN \exp_after:wN + { + \exp_after:wN \exp_after:wN + \exp_after:wN \l_@@_restore_listings_toks_tl + \exp_after:wN \use:n + \tex_the:D \tex_output:D + } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[internal]{\@@_listings_toks_hook:} +% 采用不同的 \cs{XeTeXinterchartoks} 处理方式,输入的时候是将汉字加入到 \pkg{listings} +% 的输出队列,实际输出的时候是普通文字。 +% \begin{macrocode} +\cs_new_protected_nopar:Npn \@@_listings_toks_hook: + { + \tl_set:Nx \l_@@_restore_listings_toks_tl + { + \@@_backup_inter_class_toks:nn { Boundary } { Default } + \@@_backup_inter_class_toks:nn { Boundary } { CJK } + \@@_backup_inter_class_toks:nn { Boundary } { IVS } + \@@_backup_inter_class_toks:nn { Boundary } { FullLeft } + \@@_backup_inter_class_toks:nn { Boundary } { FullRight } + } + \seq_map_inline:Nn \g_@@_CJK_sub_class_seq + { + \tl_put_right:Nx \l_@@_restore_listings_toks_tl + { \@@_backup_inter_class_toks:nn { Boundary } { CJK/##1 } } + } + \xeCJK_inter_class_toks:nnn { Boundary } { Default } + { \@@_listings_process_Default:N } + \xeCJK_inter_class_toks:nnn { Boundary } { CJK } + { \@@_listings_process_CJK:nN { \c_two } } + \xeCJK_inter_class_toks:nnn { Boundary } { IVS } + { \@@_listings_process_IVS:nN { \c_zero } } + \xeCJK_inter_class_toks:nnn { Boundary } { FullLeft } + { \@@_listings_process_CJK:nN { \c_two } } + \xeCJK_inter_class_toks:nnn { Boundary } { FullRight } + { \@@_listings_process_CJK:nN { \c_two } } + \seq_map_inline:Nn \g_@@_CJK_sub_class_seq + { + \xeCJK_inter_class_toks:nnn { Boundary } { CJK/##1 } + { \@@_listings_process_CJK:nN { \c_two } } + } + } +\tl_new:N \l_@@_restore_listings_toks_tl +\cs_new_nopar:Npn \@@_backup_inter_class_toks:nn #1#2 + { + \xeCJK_inter_class_toks:nnn {#1} {#2} + { \xeCJK_get_inter_class_toks:nn {#1} {#2} } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[internal]{\@@_listings_process_Default:N,\@@_listings_process_CJK:nN} +% \changes{v3.2.3}{2013/06/08}{在 \texttt{listings} 坏境中对 \cs{charcode} 大于 +% $255$ 的字符根据其 \cs{catcode} 区分 \texttt{letter} 和 \texttt{other}。} +% 对于 \cs{charcode} 大于 $255$ 的字符,根据 \cs{catcode} 进行处理。 +% \begin{macrocode} +\cs_new_protected_nopar:Npn \@@_listings_process_Default:N #1 + { + \token_if_letter:NTF #1 + { \lst@ProcessLetter #1 } + { \lst@ProcessOther #1 } + } +\cs_new_protected_nopar:Npn \@@_listings_process_CJK:nN #1#2 + { + \token_if_letter:NTF #2 + { \@@_listings_process_letter:nN {#1} #2 } + { \@@_listings_process_other:nN {#1} #2 } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[internal]{\@@_listings_append:nN} +% 普通 CJK 字符的宽度为一般基本宽度的两倍,IVS 类不增加宽度。这里有一个问题, +% 对 CJK 字符类中的一些半角字符(例如半角日文假名)没有区分开。\pkg{listings} 通过 +% 重定义 \cs{lst@Append} 将代码写入外部文件,因此需要保留。 +% \begin{macrocode} +\cs_new_protected_nopar:Npn \@@_listings_append:nN #1#2 + { + \int_add:Nn \lst@length { #1 - \c_one } + \lst@Append #2 + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[internal]{\@@_listings_process_letter:nN,\@@_listings_process_other:nN} +% 在 \texttt{letter} 类中区分汉字和西文字母。 +% \begin{macrocode} +\cs_new_protected_nopar:Npn \@@_listings_process_letter:nN + { + \lst@whitespacefalse + \bool_if:NTF \l_@@_listings_letter_bool + { \lst@lettertrue } + { + \lst@ifletter + \lst@Output + \else: + \lst@OutputOther + \lst@lettertrue + \fi: + \bool_set_true:N \l_@@_listings_letter_bool + } + \@@_listings_append:nN + } +\cs_new_protected_nopar:Npn \@@_listings_process_other:nN #1#2 + { + \lst@whitespacefalse + \bool_if:NTF \l_@@_listings_letter_bool + { + \lst@Output + \bool_set_false:N \l_@@_listings_letter_bool + \lst@letterfalse + } + { \lst@ifletter \lst@Output \lst@letterfalse \fi: } + \cs_set_eq:NN \lst@lastother #2 + \@@_listings_append:nN {#1} #2 + } +\bool_new:N \l_@@_listings_letter_bool +\cs_set_protected_nopar:Npn \lst@AppendLetter + { + \bool_if:NTF \l_@@_listings_letter_bool + { + \lst@Output + \bool_set_false:N \l_@@_listings_letter_bool + \lst@lettertrue + } + { \reverse_if:N \lst@ifletter \lst@OutputOther \lst@lettertrue \fi: } + \lst@Append + } +\cs_set_protected_nopar:Npn \lst@AppendOther + { + \bool_if:NTF \l_@@_listings_letter_bool + { + \lst@Output + \bool_set_false:N \l_@@_listings_letter_bool + \lst@letterfalse + } + { \lst@ifletter \lst@Output \lst@letterfalse \fi: } + \tex_futurelet:D \lst@lastother \lst@Append + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[internal]{\@@_listings_process_IVS:nN} +% \texttt{IVS} 类作为 \texttt{letter} 处理,不用增加 \cs{lst@length}。 +% \begin{macrocode} +\cs_new_protected_nopar:Npn \@@_listings_process_IVS:nN + { + \reverse_if:N \lst@ifflexible + \bool_gset_true:N \g_@@_listings_IVS_bool + \fi: + \@@_listings_process_letter:nN + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[internal]{\@@_listings_output_IVS:} +% 在使用 \texttt{columns=fixed} 选项时,\pkg{listings} 会在输出盒子里的每个字符 +% 之间加入 \cs{hss},这就破坏了 \XeTeX 将基本字和 IVS 正确的组合起来。 +% \begin{macrocode} +\cs_new_protected_nopar:Npn \@@_listings_output_IVS: + { + \reverse_if:N \lst@ifflexible + \bool_if:NT \g_@@_listings_IVS_bool + { + \bool_gset_false:N \g_@@_listings_IVS_bool + \xeCJK_cs_clear:N \lst@FillOutputBox + \cs_set_eq:NN \CJKglue \tex_hss:D + } + \fi: + } +\bool_new:N \g_@@_listings_IVS_bool +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[internal]{\@@_listings_peek_active_loop:TF} +% \cs{lstinline} 通过判断参数中第一个字符是否是 \texttt{active} 类来区分 +% 它是否被用在其它宏的参数之中。如果这第一个字符不在 \pkg{listings} 预定义的 +% 符号表中,判断就会出问题。我们在这里通过一个循环跳过这些字符。 +% \begin{macrocode} +\cs_new_protected:Npn \@@_listings_peek_active_loop:TF #1#2#3 + { + \token_if_active:NTF #3 + { #1#3 } + { + \token_if_cs:NTF #3 + { #2#3 } + { + \int_compare:nNnTF { `#3 } > { \lst@ifec 255 \else: 127 \fi: } + { \@@_listings_peek_active_loop:TF { #1#3 } { #2#3 } } + { #2#3 } + } + } + } +\cs_set_eq:NN \lst@IfNextCharActive \@@_listings_peek_active_loop:TF +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[internal]{\@@_listings_inside_convert:nw,\@@_listings_inline_group:w} +% 当 \cs{lstinline} 被使用在参数中时,\pkg{listings} 会使用一个循环逐个将 +% \cs{lstinline} 参数中的字符设置为活动字符。我们可以通过 \cs{tl_set_rescan:Nnn} +% 来完成这里的 \cs{catcode} 转换,避免将 \cs{charcode} 超过 $255$ 的字符都设置为 +% 活动字符。 +% \begin{macrocode} +\cs_new_protected:Npn \@@_listings_inside_convert:nw #1 ~ \@empty + { + \tl_set_rescan:Nnn \l_@@_tmpa_tl { } {#1} + \@@_set_listings_escape: + \tl_put_right:NV \lst@arg \l_@@_tmpa_tl + } +\cs_set_eq:NN \lst@InsideConvert@ \@@_listings_inside_convert:nw +\cs_new_protected_nopar:Npn \@@_listings_inline_group:w + { + \exp_after:wN \@@_listings_inline_group:n + \exp_after:wN { \if_false: } \fi: + } +\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: + \lst@InlineGJEnd + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[internal]{\@@_set_listings_escape:} +% 由于我们在上面的修改,需要保留 |\| 用于转义 \cs{lstinline} 参数中的某些 \TeX +% 特殊字符,与原来宏包一致。 +% \begin{macrocode} +\group_begin: +\char_set_catcode_active:N \/ +\char_set_lccode:nn { `\/ } { `\\ } +\tl_to_lowercase:n + { + \group_end: + \cs_new_protected:Npn \@@_set_listings_escape: + { \xeCJK_swap_cs:NN / \@@_listings_escape:N } + \cs_new_protected:Npn \@@_listings_escape:N #1 + { \cs_if_eq:NNTF / #1 { \@@_listings_escape:N } {#1} } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +% +% \end{macrocode} +% % \subsection{\pkg{xeCJK.cfg}} % % \begin{macrocode} @@ -6886,8 +7475,7 @@ x^2+y^2 % \end{macrocode} % % \begin{macrocode} -\documentclass{article} -\usepackage{xeCJK} +\documentclass{ctexart} \usepackage{xcolor} \usepackage{xeCJKfntef} \xeCJKDeclareSubCJKBlock{test}{ `殆 , `已 } @@ -6906,6 +7494,8 @@ x^2+y^2 \begin{document} +\section{\textsf{xeCJKfntef} 的简单测试文件} + \CJKunderline{汉 字}\CJKunderline{加下划线} \varCJKunderline{汉字}\varCJKunderline{加下划线} \CJKunderanyline{0.5em}{\sixly \kern-.021em\char58 \kern-.021em}{自定义下划线} @@ -7100,6 +7690,101 @@ lang_set = { % % \end{macrocode} % +% \subsection{\pkg{xeCJK-example-listings.tex}} +% +% \begin{macrocode} +%<*ex-listings> +% \end{macrocode} +% +% \begin{macrocode} +\documentclass{article} +\usepackage[margin=1in]{geometry} +\usepackage{listings,xcolor} +\usepackage{showexpl} + +\usepackage{xeCJK} +\setCJKmainfont{HanaMinA} +\setCJKmonofont{SimSun} +\xeCJKDeclareSubCJKBlock{Kana} { "3040 -> "309F, "30A0 -> "30FF, "31F0 -> "31FF } +\setCJKmonofont[Kana]{Meiryo} +\setmonofont{Latin Modern Mono Light} + +\lstset{% + basicstyle=\small\ttfamily, + numbers=left,numberstyle=\tiny\color{gray}, + commentstyle=\color{green!50!black},keywordstyle=\color{blue}\bfseries, + identifierstyle=\color{violet},stringstyle=\color{brown}, + escapebegin=\normalfont} +\lstnewenvironment{cppcode}[1][] + {\lstset{language=C++,#1}} + {} + +\begin{document} + +\section{\lstinline{\\lstinline} 测试} + +\section{\lstinline|甲*乙| 测试} + +\lstinline|abc汉字abc| + +\lstinline|甲*乙| + +\lstinline[mathescape]|数学公式$x^2+y^2$| + +\section{\lstinline{lstlisting} 环境测试} + +\begin{lstlisting}[basicstyle=\rmfamily] +纯文字text测试 + 纯文字text测试 +文字+文字 +文字(符号)文字 +辻󠄂辻󠄃辻󠄄辻󠄅 +かがか゚ +\end{lstlisting} + +\begin{lstlisting} +text纯文字测试 +\end{lstlisting} + +\begin{lstlisting} +text 纯文字测试 +\end{lstlisting} + +\begin{lstlisting} +text,纯文字测试 +\end{lstlisting} + +\section{自定义环境测试} + +\begin{LTXexample}[pos=t,varwidth,numbersep=5pt,columns=fixed] +\begin{cppcode}[escapechar=`,morekeywords=返回] +#define 返回 return +#include +/* + * 块注释 + * `逃逸字符,测试$f(x)$` + */ +int main() +{ + // 行注释 + const char *欢迎 = "hello 世界(ワールド)"; + std::cout << 欢迎 << std::endl; + 返回 0; +} +\end{cppcode} +\end{LTXexample} + +\section{\lstinline|\\lstinputlisting| 测试} + +\lstinputlisting[language={[AlLaTeX]TeX}]{\jobname} + +\end{document} +% \end{macrocode} +% +% \begin{macrocode} +% +% \end{macrocode} +% % \fi % % \end{implementation} diff --git a/Master/texmf-dist/source/xelatex/xecjk/xeCJK.ins b/Master/texmf-dist/source/xelatex/xecjk/xeCJK.ins index d1872a66d5b..beb89cf4a2e 100644 --- a/Master/texmf-dist/source/xelatex/xecjk/xeCJK.ins +++ b/Master/texmf-dist/source/xelatex/xecjk/xeCJK.ins @@ -6,7 +6,7 @@ %% %% xeCJK.dtx (with options: `install') %% -%% $Id: xeCJK.dtx 418 2013-05-29 06:41:21Z sobenlee $ +%% $Id: xeCJK.dtx 438 2013-06-11 14:17:42Z sobenlee $ %% $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ %% ----------------------------------------------------------------- %% Author: @@ -37,7 +37,7 @@ \askforoverwritefalse \preamble -$Id: xeCJK.dtx 418 2013-05-29 06:41:21Z sobenlee $ +$Id: xeCJK.dtx 438 2013-06-11 14:17:42Z sobenlee $ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ ----------------------------------------------------------------- Author: @@ -71,6 +71,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ xeCJK.cfg, xeCJK.ins, xeCJKfntef.sty, + xeCJK-listings.sty, xeCJK-example-autofake.tex, xeCJK-example-fallback.tex, xeCJK-example-subCJKblock.tex, @@ -78,7 +79,9 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ xeCJK-example-checksingle.tex, xeCJK-example-CJKfntef.tex, xeCJK-example-punctstyle.tex, - xeCJK-example-verbatim.tex, and + xeCJK-example-verbatim.tex, + xeCJK-example-IVS.tex, + xeCJK-example-listings.tex, and README.txt. \endpostamble \declarepreamble\emptypreamble @@ -92,6 +95,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ \usedir{tex/xelatex/xecjk} \file{\jobname.sty}{\from{\jobname.dtx}{package}} \file{xeCJKfntef.sty}{\from{\jobname.dtx}{fntef}} + \file{xeCJK-listings.sty}{\from{\jobname.dtx}{listings}} \usepreamble\emptypreamble \usepostamble\emptypostamble \usedir{tex/xelatex/xecjk/config} @@ -106,6 +110,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ \file{\jobname-example-punctstyle.tex}{\from{\jobname.dtx}{ex-punctstyle}} \file{\jobname-example-verbatim.tex}{\from{\jobname.dtx}{ex-verb}} \file{\jobname-example-IVS.tex}{\from{\jobname.dtx}{ex-IVS}} + \file{\jobname-example-listings.tex}{\from{\jobname.dtx}{ex-listings}} \nopreamble\nopostamble \usedir{doc/xelatex/xecjk} \file{README.txt}{\from{\jobname.dtx}{readme}} @@ -119,6 +124,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ %% xeCJK.cfg, %% xeCJK.ins, %% xeCJKfntef.sty, +%% xeCJK-listings.sty, %% xeCJK-example-autofake.tex, %% xeCJK-example-fallback.tex, %% xeCJK-example-subCJKblock.tex, @@ -126,7 +132,9 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ %% xeCJK-example-checksingle.tex, %% xeCJK-example-CJKfntef.tex, %% xeCJK-example-punctstyle.tex, -%% xeCJK-example-verbatim.tex, and +%% xeCJK-example-verbatim.tex, +%% xeCJK-example-IVS.tex, +%% xeCJK-example-listings.tex, and %% README.txt. %% %% End of file `xeCJK.ins'. -- cgit v1.2.3