summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/ctex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-29 23:55:32 +0000
committerKarl Berry <karl@freefriends.org>2018-01-29 23:55:32 +0000
commita681f41430ebe5ee64b72726481e4e63c66e2230 (patch)
tree2d69d57fadd4a760a139163f4e9ee29649e71968 /Master/texmf-dist/source/latex/ctex
parent31f6269664044a69f424fbeb879fbf83e230a844 (diff)
ctex (29jan18)
git-svn-id: svn://tug.org/texlive/trunk@46474 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/ctex')
-rw-r--r--Master/texmf-dist/source/latex/ctex/ctex.dtx220
-rw-r--r--Master/texmf-dist/source/latex/ctex/ctex.ins4
2 files changed, 121 insertions, 103 deletions
diff --git a/Master/texmf-dist/source/latex/ctex/ctex.dtx b/Master/texmf-dist/source/latex/ctex/ctex.dtx
index 4e0f5bc932a..9853d60f19a 100644
--- a/Master/texmf-dist/source/latex/ctex/ctex.dtx
+++ b/Master/texmf-dist/source/latex/ctex/ctex.dtx
@@ -2,7 +2,7 @@
% !TeX program = XeLaTeX
% !TeX encoding = UTF-8
%
-% Copyright (C) 2003--2017
+% Copyright (C) 2003--2018
% CTEX.ORG and any individual authors listed elsewhere in this file.
% --------------------------------------------------------------------------
%
@@ -54,7 +54,7 @@ Issues and pull requests are welcome.
Copyright and Licence
---------------------
- Copyright (C) 2003--2017
+ Copyright (C) 2003--2018
CTEX.ORG and any individual authors listed elsewhere in this file.
----------------------------------------------------------------------
@@ -152,7 +152,7 @@ Copyright and Licence
\preamble
- Copyright (C) 2003--2017
+ Copyright (C) 2003--2018
CTEX.ORG and any individual authors listed in the documentation.
------------------------------------------------------------------------------
@@ -413,7 +413,7 @@ Copyright and Licence
%<*!(c19|c70|ctexspa|dict)>
%<class|style|ctexcap|ctexhook|ctexpatch|ctxdoc>\NeedsTeXFormat{LaTeX2e}
%<class|style|ctexcap|ctexhook|ctexpatch|ctxdoc>\RequirePackage{expl3}
-%<+!driver>\GetIdInfo$Id: ctex.dtx f5ff957 2017-11-22 19:13:13 +0800 Qing Lee <sobenlee@gmail.com> $
+%<+!driver>\GetIdInfo$Id: ctex.dtx dd8349e 2018-01-28 19:10:52 +0800 Qing Lee <sobenlee@gmail.com> $
%<ctxdoc> {ctex documentation (CTEX)}
%<ctxdoc>\ProvidesExplClass{ctxdoc}
%<ctex> {Chinese adapter in LaTeX (CTEX)}
@@ -502,7 +502,7 @@ Copyright and Licence
%<founder>\ProvidesExplFile{ctex-fontset-founder.def}
%<ubuntu> {Ubuntu fonts definition (CTEX)}
%<ubuntu>\ProvidesExplFile{ctex-fontset-ubuntu.def}
-%<!driver> {\ExplFileDate}{2.4.11}{\ExplFileDescription}
+%<!driver> {\ExplFileDate}{2.4.12}{\ExplFileDescription}
%</!(c19|c70|ctexspa|dict)>
%<c19&rm>\ProvidesFile{c19rm.fd}%
%<c19&sf>\ProvidesFile{c19sf.fd}%
@@ -513,9 +513,9 @@ Copyright and Licence
%<ctexspa>\ProvidesFile{ctexspa.def}%
%<dict&theorem&GBK>\ProvidesDictionary{translator-theorem-dictionary}{ChineseGBK}%
%<dict&theorem&UTF8>\ProvidesDictionary{translator-theorem-dictionary}{ChineseUTF8}%
-%<c19|c70> [2017/11/22 v2.4.11 Chinese font definition (CTEX)]
-%<ctexspa> [2017/11/22 v2.4.11 Space info for CJKpunct (CTEX)]
-%<dict&theorem> [2017/11/22 v2.4.11 Chinese translation for theorem name (CTEX)]
+%<c19|c70> [2018/01/28 v2.4.12 Chinese font definition (CTEX)]
+%<ctexspa> [2018/01/28 v2.4.12 Space info for CJKpunct (CTEX)]
+%<dict&theorem> [2018/01/28 v2.4.12 Chinese translation for theorem name (CTEX)]
%</!(driver|readme|install|zhmap|spa|docstrip)>
%<*driver>
\documentclass{ctxdoc}
@@ -535,9 +535,10 @@ Copyright and Licence
% \pkg{ctexheading} 中。}
% \changes{v2.2}{2015/06/24}{不再依赖 \pkg{etoolbox} 宏包。}
% \changes{v2.4}{2015/02/19}{加强 \pkg{beamer} 宏包支持。}
+% \changes{v2.4.12}{2018/01/13}{同步 \LaTeXiii{} 2017/12/16。}
%
%
-% \CheckSum{5918}
+% \CheckSum{5909}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -3008,7 +3009,7 @@ Copyright and Licence
% \changes{v2.3}{2015/12/20}{与 \LaTeXiii{} (2015/12/20) 同步。}
% \changes{v2.4.10}{2017/07/19}{常数 \cs{c_minus_one} 已过时。}
% \changes{v2.4.10}{2017/07/22}{使用 \texttt{lazy} 函数对 Boolean 表达式
-% 进行最小化运算(\hologo{LaTeX3} 2017/07/19)。}
+% 进行最小化运算(\LaTeXiii{} 2017/07/19)。}
%
% 检查 \pkg{expl3} 和 \pkg{l3keys2e} 的版本。
% \begin{macrocode}
@@ -3019,7 +3020,7 @@ Copyright and Licence
`l3kernel'~and~`l3packages'\\\\
using~your~TeX~package~manager~or~from~CTAN.
}
-\@ifpackagelater { expl3 } { 2017/07/19 } { }
+\@ifpackagelater { expl3 } { 2017/12/16 } { }
{ \msg_error:nnn { ctex } { l3-too-old } { expl3 } }
%<*class>
\@ifpackagelater { l3keys2e } { 2015/12/20 } { }
@@ -3027,7 +3028,7 @@ Copyright and Licence
%</class>
% \end{macrocode}
%
-% \begin{variable}[int]{\c_@@_engine_str,\c_@@_engine_file_str}
+% \begin{variable}{\c_@@_engine_str,\c_@@_engine_file_str}
% 引擎检查。目前 \LaTeXiii{} 将 \ApTeX{} 识别为 \upTeX。
% \begin{macrocode}
\str_const:Nx \c_@@_engine_str
@@ -3059,7 +3060,7 @@ Copyright and Licence
%
% \subsection{内部函数与变量}
%
-% \begin{variable}[int]{\l_@@_tmp_tl,\l_@@_tmp_int,\l_@@_tmp_box,\l_@@_tmp_dim}
+% \begin{variable}{\l_@@_tmp_tl,\l_@@_tmp_int,\l_@@_tmp_box,\l_@@_tmp_dim}
% 临时变量。
% \begin{macrocode}
\tl_clear_new:N \l_@@_tmp_tl
@@ -3120,7 +3121,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}[int]{\g_@@_section_depth_flag}
+% \begin{variable}{\g_@@_section_depth_flag}
% 若大于 |3|,则 \tn{paragraph} 和 \tn{subparagraph} 标题单独占一行;若为 |3|,则
% \tn{paragraph} 单独占一行。
% \begin{macrocode}
@@ -3199,7 +3200,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}[int]{\l_@@_encoding_tl}
+% \begin{variable}{\l_@@_encoding_tl}
% (pdf)\LaTeX{} 初始化编码为 GBK,其它则是 UTF8。
% \begin{macrocode}
\tl_new:N \l_@@_encoding_tl
@@ -3208,14 +3209,14 @@ Copyright and Licence
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\g_@@_zhmCJK_bool}
+% \begin{variable}{\g_@@_zhmCJK_bool}
% 是否使用 \pkg{zhmCJK} 宏包。
% \begin{macrocode}
\bool_new:N \g_@@_zhmCJK_bool
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\l_@@_autoindent_tl}
+% \begin{variable}{\l_@@_autoindent_tl}
% 保存 \opt{autoindent} 选项的值,空值表示不自动调整首行缩进。
% \begin{macrocode}
\tl_new:N \l_@@_autoindent_tl
@@ -3244,7 +3245,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}[int]{\g_@@_std_options_clist}
+% \begin{variable}{\g_@@_std_options_clist}
% 保存传递给标准文档类的选项。
% \begin{macrocode}
%<*class>
@@ -3275,7 +3276,7 @@ Copyright and Licence
%</class|ctex>
% \end{macrocode}
%
-% \begin{variable}[int]{\g_@@_font_size_flag}
+% \begin{variable}{\g_@@_font_size_flag}
% |0| 表示修改默认字体大小为五号,|1| 为小四号,大于 1 则不作修改。初始值 |-1|
% 表示 \opt{zihao} 选项未初始化,会在将来根据文档类决定初值。
% \begin{macrocode}
@@ -3741,11 +3742,10 @@ Copyright and Licence
%
% \changes{v2.1}{2015/05/18}{给 \pdfLaTeX{} 下的非 UTF8 编码 CJK 字体族加上 CMap。}
%
-% \begin{variable}[int]{\c_@@_cmap_encoding_seq}
+% \begin{variable}{\c_@@_cmap_encoding_seq}
% 需要加上 CMap 的 CJK 字体编码。
% \begin{macrocode}
-\seq_new:N \c_@@_cmap_encoding_seq
-\seq_set_from_clist:Nn \c_@@_cmap_encoding_seq
+\seq_const_from_clist:Nn \c_@@_cmap_encoding_seq
{ C19 , C10 , C00 , C09 , C40 , C60 }
% \end{macrocode}
% \end{variable}
@@ -4191,7 +4191,7 @@ Copyright and Licence
Loading~file~`#1'~will~abort!
}
\@ifpackageloaded { luatexja }
- { \msg_critical:nnx { ctex } { luatexja-loaded } { \g_file_current_name_tl } }
+ { \msg_critical:nnx { ctex } { luatexja-loaded } { \g_file_curr_name_str } }
{ \tl_const:cn { ver@ltj-latex.\@pkgextension } { 9999/99/99 } }
% \end{macrocode}
%
@@ -4217,12 +4217,13 @@ Copyright and Licence
%
% \changes{v2.4.11}{2017/08/17}{不把 Enclosed Alphanumerics 设置为 JAchar。}
% U+2460--U+24FF (Enclosed Alphanumerics) 原属于字符范围 6,是 JAchar,
-% 我们把它们归入字符范围 1,改成 ALchar。
+% 我们把它们归入字符范围 3,改成 ALchar。
% \begin{macrocode}
-\ltjdefcharrange{1}{"80-"36F, "1E00-"1EFF, "2460-"24FF}
+\ltjdefcharrange{1}{"80-"36F, "1E00-"1EFF}
\ltjdefcharrange{2}{"370-"4FF, "1F00-"1FFF}
\ltjdefcharrange{3}{%
- "2000-"243F, "2500-"27BF, "2900-"29FF, "2B00-"2BFF}
+ "2000-"206F, "2070-"243F, "2460-"24FF, "2500-"27BF, "2900-"29FF,
+ "2B00-"2BFF}
\ltjdefcharrange{4}{%
"500-"10FF, "1200-"1DFF, "2440-"245F, "27C0-"28FF, "2A00-"2AFF,
"2C00-"2E7F, "4DC0-"4DFF, "A4D0-"A82F, "A840-"ABFF, "FB00-"FE0F,
@@ -4231,15 +4232,20 @@ Copyright and Licence
\ltjdefcharrange{6}{%
"2E80-"2EFF, "3000-"30FF, "3190-"319F, "31F0-"4DBF,
"4E00-"9FFF, "F900-"FAFF, "FE10-"FE6F, "20000-"2FFFF, "E0100-"E01EF}
-\ltjdefcharrange{7}{
- "1100-"11FF, "2F00-"2FFF, "3100-"31EF, "A000-"A4CF, "A830-"A83F,
- "AC00-"D7FF}
+\ltjdefcharrange{7}{%
+ "1100-"11FF, "2F00-"2FFF, "3100-"31EF, "A000-"A4CF,
+ "A830-"A83F, "AC00-"D7FF}
\ltjdefcharrange{8}{"A7, "A8, "B0, "B1, "B4, "B6, "D7, "F7}
% \end{macrocode}
+% 将引号、破折号等中西文公用的标点符号归入字符范围 9,将他们设置为 JAchar。
+% \begin{macrocode}
+\ltjdefcharrange{9}{%
+ "2018, "2019, "201C, "201D, "2013, "2014, "2025, "2026, "2027, "2E3A}
+% \end{macrocode}
% \changes{v2.4.11}{2017/08/17}{不把希腊和西里尔字母设置为 JAchar。}
% \pkg{LuaTeX-ja} 默认把字符范围 2 和 3 设置为 JAchar,我们这里把它们都改成 ALchar。
% \begin{macrocode}
-\ltjsetparameter{jacharrange={-1, -2, -3, -4, -5, +6, +7, -8}}
+\ltjsetparameter{jacharrange={-1, -2, -3, -4, -5, +6, +7, -8, +9}}
\directlua{for x=128,255 do luatexja.math.is_math_letters[x] = true end}
% \end{macrocode}
%
@@ -4333,7 +4339,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_select_font_aux:}
+% \begin{macro}{\@@_select_font_aux:}
% 使用 \tn{pickup@font} 取得字体名称前,总需要先设置 \tn{font@name}。在这里将
% \tn{f@family} 换成 CJK 字体族,并确保编码正确。
% \begin{macrocode}
@@ -4479,7 +4485,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_patch_external_font:w}
+% \begin{macro}{\@@_patch_external_font:w}
% 若对字体的定义完全相同,则它们有相同的 \texttt{font.id}。因此如果字形是由
% \textsf{NFSS} 的替换机制定义的,它们就有相同的 \texttt{font.id}。
% |print_aftl_address| 函数的定义是
@@ -4689,7 +4695,8 @@ Copyright and Licence
%
% \paragraph{字体族的定义与使用}
%
-% \begin{macro}[int]{\ctex_mono_jfm:n,\l_@@_jfm_tl}
+% \begin{macro}[int]{\ctex_mono_jfm:n}
+% \begin{variable}{\l_@@_jfm_tl}
% \pkg{LuaTeX-ja} 中与标点格式 \opt{plain} 对应的 \texttt{JFM} 是 \opt{mono}。
% \begin{macrocode}
\cs_new_protected_nopar:Npn \ctex_mono_jfm:n #1
@@ -4702,9 +4709,11 @@ Copyright and Licence
\cs_generate_variant:Nn \ctex_mono_jfm:n { o }
\ctex_mono_jfm:o { \l__ctex_punct_tl }
% \end{macrocode}
+% \end{variable}
% \end{macro}
%
-% \begin{macro}[int]{\CJK@encoding,\@@_change_encoding:}
+% \begin{macro}[int]{\CJK@encoding}
+% \begin{macro}{\@@_change_encoding:}
% 在 \LaTeX 下,\pkg{LuaTeX-ja} 依赖字体编码来实现特殊设置。例如上述的
% \cs{ctex_ltj_if_jfont:nTF} 就是通过判断编码来实现的,它在设置数学字体时会用到。所以
% 不应该与西文共用 \texttt{EU2}。定义字体族 song 为 \tn{CJK@encoding} 的默认替换
@@ -4734,6 +4743,7 @@ Copyright and Licence
\jfam \c_@@_math_fam_int
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% 这是 \pkg{luatexja-fontspec} 中新增的一些字体选项。
% \begin{macrocode}
@@ -4784,7 +4794,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}[int]
+% \begin{variable}
% {\g_@@_family_name_prop,\g_@@_family_font_name_prop,\g_@@_family_font_options_prop}
% 分别保存 \pkg{fontspec} 设置的字体族名、字体名称和字体选项。
% \begin{macrocode}
@@ -4794,7 +4804,7 @@ Copyright and Licence
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[int]{\@@_check_family:n}
+% \begin{macro}{\@@_check_family:n}
% 删除重复的定义,清除替代字体的先前设置。
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_check_family:n #1
@@ -4819,7 +4829,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_gset_family_cs:nn}
+% \begin{macro}{\@@_gset_family_cs:nn}
% 在设置字体时,实际上并不是马上就定义。而是只保存相关参数,在通过 \tn{CJKfamily}
% 第一次使用时才定义。需要注意将编码改为 \tn{CJK@encoding}。
% \begin{macrocode}
@@ -4890,13 +4900,11 @@ Copyright and Licence
{ \prg_return_false: }
}
}
-\cs_generate_variant:Nn \ctex_ltj_family_if_exist:nNT { x }
-\cs_generate_variant:Nn \ctex_ltj_family_if_exist:nNF { x }
-\cs_generate_variant:Nn \ctex_ltj_family_if_exist:nNTF { x }
+\prg_generate_conditional_variant:Nnn \ctex_ltj_family_if_exist:nN { x } { T , F , TF }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_family_unknown_warning:n}
+% \begin{macro}{\@@_family_unknown_warning:n}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_family_unknown_warning:n #1
{
@@ -5011,7 +5019,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_pass_args:nnnn}
+% \begin{macro}{\@@_pass_args:nnnn}
% 为了支持字体属性可选项在前在后两种语法,给出两个辅助工具,自带展开功能。
% \begin{macrocode}
\cs_new_protected:Npn \@@_pass_args:nnnn #1#2#3#4
@@ -5376,7 +5384,8 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{LTJFONTUID,\@@_update_family_uid:N}
+% \begin{macro}[int]{LTJFONTUID}
+% \begin{macro}{\@@_update_family_uid:N}
% \pkg{fontspec} 在一个字体族的选项和字体名称相同的时候,就不定义新字体。为了
% 避免混淆替代字体的设置,我们新定义一个虚拟的选项 \opt{LTJFONTUID},确保
% \pkg{fontspec} 对 CJK 字体族总是定义新字体。
@@ -5390,6 +5399,7 @@ Copyright and Licence
\int_new:N \g_@@_family_int
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}[int]{\ctex_ltj_declare_alternate_shape:nnnnnn}
% 在定义替代字体的字形时,通过字符范围与主字体的对应字形关联起来。
@@ -5480,7 +5490,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_save_alternate_shape:Nnn}
+% \begin{macro}{\@@_save_alternate_shape:Nnn}
% 将实际设置的替换字形保存起来用于清除或恢复。
% 暂时令 \cs{l_@@_base_family_tl} 为 \cs{scan_stop:} 是让它不被展开,使得替换
% 字体的设置可以在 \tn{addCJKfontfeature} 中直接使用。
@@ -5559,7 +5569,8 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\ctex_ltj_declare_char_range:nn,\g_@@_char_range_prop}
+% \begin{macro}[int]{\ctex_ltj_declare_char_range:nn}
+% \begin{variable}{\g_@@_char_range_prop}
% |#1| 是名字,|#2| 是范围。
% \begin{macrocode}
\cs_new_protected_nopar:Npn \ctex_ltj_declare_char_range:nn #1#2
@@ -5573,6 +5584,7 @@ Copyright and Licence
\tl_new:N \l_@@_char_range_tl
\prop_new:N \g_@@_char_range_prop
% \end{macrocode}
+% \end{variable}
% \end{macro}
%
% \begin{macro}[int]{\ctex_ltj_save_char_range:n}
@@ -5628,7 +5640,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_char_range_parse_feature:w}
+% \begin{macro}{\@@_char_range_parse_feature:w}
% 可以使用加方括号的方式,通过文件名来调用字体。这容易与字体选项混淆。例如,需要
% 将 |[simsun.ttc]| 设置为 \opt{range} 的主字体,就需要使用
% |range={{[simsun.ttc]}}| 或者 |[]{[simsun.ttc]}|。下面的目的是,支持直接使用
@@ -5682,20 +5694,27 @@ Copyright and Licence
{ \ltjsetparameter { autospacing = false , autoxspacing = false } }
% \end{macrocode}
%
-% \begin{macrocode}
-%<@@=>
-% \end{macrocode}
-%
-% \begin{macro}[int]{\@@italiccorr}
+% \begin{macro}{\@@italiccorr}
% \LaTeX{} 的倾斜校正也要重新定义。
% \begin{macrocode}
+%<@@=>
\cs_set_eq:NN \@@italiccorr \/
+%<@@=ctex>
% \end{macrocode}
% \end{macro}
%
+% \changes{v2.4.12}{2018/01/27}{正确使用 \tn{ltjsetkanjiskip} 和 \tn{ltjsetxkanjiskip}。}
+%
+% \begin{macro}[int]{\ctex_ltj_set_kanjiskip:N,\ctex_ltj_set_xkanjiskip:N}
+% \tn{ltjsetkanjiskip} 和 \tn{ltjsetxkanjiskip} 是相应的 \tn{ltjsetparameter}
+% 的快捷方式,在使用他们时,要注意先使用 \tn{ltj@setpar@global}。
% \begin{macrocode}
-%<@@=ctex>
+\cs_new_protected_nopar:Npn \ctex_ltj_set_kanjiskip:N
+ { \ltj@setpar@global \ltjsetkanjiskip }
+\cs_new_protected_nopar:Npn \ctex_ltj_set_xkanjiskip:N
+ { \ltj@setpar@global \ltjsetxkanjiskip }
% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
%</luatex>
@@ -5876,7 +5895,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\l_@@_family_default_init_tl}
+% \begin{variable}{\l_@@_family_default_init_tl}
% 往 \tn{CJKfamilydefault} 中加入标志,用于判断它是否被更改。
% \begin{macrocode}
\tl_new:N \l_@@_family_default_init_tl
@@ -5889,7 +5908,7 @@ Copyright and Licence
\tl_gset_eq:NN \CJKfamilydefault \l_@@_family_default_init_tl
%</pdftex|luatex|uptex|aptex>
% \end{macrocode}
-% \end{macro}
+% \end{variable}
%
% \subsubsection{操作系统的判断}
%
@@ -5957,7 +5976,7 @@ Copyright and Licence
{ \tl_gset:Nn \g_@@_fontset_tl { windows } }
}
\str_const:Nx \c_@@_upper_case_file_str
- { \exp_args:No \str_upper_case:n { \g_file_current_name_tl } }
+ { \exp_args:No \str_upper_case:n { \g_file_curr_name_str } }
% \end{macrocode}
% \end{macro}
%
@@ -6199,17 +6218,14 @@ Copyright and Licence
% 更新字间距。
% \begin{macrocode}
\cs_new_protected_nopar:Npn \ctex_update_ccglue:
-%<*pdftex>
+%<*pdftex|xetex>
{
\cs_set_protected_nopar:Npn \CJKglue
{ \skip_horizontal:N \l_@@_ccglue_skip }
}
-%</pdftex>
-%<*xetex>
- { \xeCJKsetup { CJKglue = { \skip_horizontal:N \l_@@_ccglue_skip } } }
-%</xetex>
+%</pdftex|xetex>
%<*luatex>
- { \ltjsetkanjiskip \l_@@_ccglue_skip }
+ { \ctex_ltj_set_kanjiskip:N \l_@@_ccglue_skip }
%</luatex>
%<*uptex|aptex>
{ \skip_set_eq:NN \ptex_kanjiskip:D \l_@@_ccglue_skip }
@@ -6327,7 +6343,8 @@ Copyright and Licence
%
% \changes{v2.4.1}{2016/05/01}{随字体更新 \upTeX{} 的 \tn{xkanjiskip}。}
%
-% \begin{macro}[int]{\ctex_update_xkanjiskip:,\l_@@_xkanjiskip_skip}
+% \begin{macro}[int]{\ctex_update_xkanjiskip:}
+% \begin{variable}{\l_@@_xkanjiskip_skip}
% \upTeX{} 和 \pkg{LuaTeX-ja} 对 \tn{xkanjiskip} 都是即时赋值。单位 \opt{zw} 与字体相关,因此
% 需要每次 \tn{selectfont} 的时候更新一次 \tn{xkanjiskip}。如果用户设置过
% \tn{xkanjiskip},就不更新。注意,同 \TeX{} 的 \tn{baselineskip} 一样,如果在
@@ -6342,7 +6359,7 @@ Copyright and Licence
%<uptex|aptex> { \ptex_xkanjiskip:D } { \l_@@_xkanjiskip_skip }
{
\skip_set:Nn \l_@@_xkanjiskip_skip { \l_@@_xkanjiskip_tl }
-%<luatex> \ltjsetxkanjiskip \l_@@_xkanjiskip_skip
+%<luatex> \ctex_ltj_set_xkanjiskip:N \l_@@_xkanjiskip_skip
%<uptex|aptex> \skip_set_eq:NN \ptex_xkanjiskip:D \l_@@_xkanjiskip_skip
}
}
@@ -6355,6 +6372,7 @@ Copyright and Licence
%<luatex> { \ltjgetparameter { xkanjiskip } }
%<uptex|aptex> { \ptex_xkanjiskip:D }
% \end{macrocode}
+% \end{variable}
% \end{macro}
%
% \begin{macrocode}
@@ -6455,19 +6473,20 @@ Copyright and Licence
%
% \begin{macrocode}
%</pdftex|xetex|luatex|uptex|aptex>
-%<*class|ctex>
% \end{macrocode}
%
% \subsubsection{载入引擎定义文件}
%
% 最后载入各个编译引擎的定义文件。
% \begin{macrocode}
-\ctex_file_input:n { \c_@@_engine_file_str }
+%<class|ctex>\ctex_file_input:n { \c_@@_engine_file_str }
% \end{macrocode}
%
% \subsection{用户设置接口}
%
% \changes{v2.0}{2014/03/18}{新增统一设置接口 \tn{ctexset}。}
+% \changes{v2.4.12}{2018/01/14}
+% {修正 \tn{ctexset} 在 \pkg{ctexheading} 包中无定义的错误(曾祥东)。 }
%
% \begin{macro}{\ctexset}
% \begin{macrocode}
@@ -6494,7 +6513,6 @@ Copyright and Licence
{ \ctexset~ {~ #1~ }~ is~ set. }
\IfNoValueF {#1} { \keys_set:nn { ctex } {#1} }
}
-%</class|ctex>
% \end{macrocode}
% \end{macro}
%
@@ -6874,27 +6892,26 @@ Copyright and Licence
%
% \subsubsection{定义标题格式选项}
%
-% \begin{variable}[int]{\c_@@_section_headings_seq}
+% \begin{variable}{\c_@@_section_headings_seq}
% 保存 \tn{section} 级以下标题名字。
% \begin{macrocode}
%<*article|book|report>
-\seq_new:N \c_@@_section_headings_seq
-\seq_gset_from_clist:Nn \c_@@_section_headings_seq
+\seq_const_from_clist:Nn \c_@@_section_headings_seq
{ section , subsection , subsubsection , paragraph , subparagraph }
%</article|book|report>
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\c_@@_headings_seq}
+% \begin{variable}{\c_@@_headings_seq}
% \begin{macrocode}
-\seq_new:N \c_@@_headings_seq
%<*article|book|report>
+\seq_new:N \c_@@_headings_seq
\seq_gset_eq:NN \c_@@_headings_seq \c_@@_section_headings_seq
%<book|report>\seq_gput_left:Nn \c_@@_headings_seq { chapter }
\seq_gput_left:Nn \c_@@_headings_seq { part }
%</article|book|report>
%<*beamer>
-\seq_gset_from_clist:Nn \c_@@_headings_seq
+\seq_const_from_clist:Nn \c_@@_headings_seq
{ part , section , subsection }
%</beamer>
% \end{macrocode}
@@ -6903,7 +6920,7 @@ Copyright and Licence
% \changes{v2.1}{2015/06/19}{\opt{nameformat} 可以接受章节名字为参数。}
% \changes{v2.3}{2016/01/05}{修复 \opt{nameformat} 作用域问题。}
%
-% \begin{macro}[int]{\@@_initial_heading:n}
+% \begin{macro}{\@@_initial_heading:n}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_initial_heading:n #1
{
@@ -6953,7 +6970,7 @@ Copyright and Licence
% \changes{v2.4.11}{2017/11/21}{因上游 \pkg{l3keys} 变化,重新定义
% \opt{format\textvisiblespace+} 等带空格加号的选项。}
%
-% \begin{macro}[int]{\@@_def_heading_keys:n}
+% \begin{macro}{\@@_def_heading_keys:n}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_def_heading_keys:n #1
{
@@ -7006,7 +7023,8 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\ctex_assign_heading_name:nn,\@@_assign_heading_name:nnn}
+% \begin{macro}[int]{\ctex_assign_heading_name:nn}
+% \begin{macro}{\@@_assign_heading_name:nnn}
% \opt{name} 的值是一个至多两个元素的逗号分隔列表。由于 \LaTeXiii{} 的
% \texttt{clist} 总是会自动忽略空元素,所以设置 |name={,章}| 后,第一个元素将会
% 是“章”,必须用空的分组保护空元素:|name={{},章}|,这在使用中有些许不便。我们
@@ -7025,6 +7043,7 @@ Copyright and Licence
}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \changes{v2.0}{2014/03/21}{标题设置新增 \opt{pagestyle} 选项。}
% \changes{v2.4.1}{2016/05/10}{新的标题格式选项 \opt{part/fixbeforeskip} 和
@@ -7785,11 +7804,10 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}[int]{\c_@@_headings_cs_seq}
+% \begin{variable}{\c_@@_headings_cs_seq}
% 保存内部标题命令的 \CTeX{} 定义,用于随后比较。
% \begin{macrocode}
-\seq_new:N \c_@@_headings_cs_seq
-\seq_gset_from_clist:Nn \c_@@_headings_cs_seq
+\seq_const_from_clist:Nn \c_@@_headings_cs_seq
%<article> { part , spart , sect , ssect }
%<book|report> { part , spart , chapter , schapter , sect , ssect }
\seq_map_inline:Nn \c_@@_headings_cs_seq
@@ -8011,7 +8029,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\CTEX@titlepslabel@set,\CTEX@titlepslabel@clear}
+% \begin{macro}[int]{\CTEX@titlepslabel@set,\CTEX@titlepslabel@clear}
% 这两个函数要在随后被 \tn{xdef} 展开来获得 |\CTEXtheXXX| 的内容,不应该用
% \tn{protected} 来定义。
% \begin{macrocode}
@@ -8301,7 +8319,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_fix_varioref_label:n}
+% \begin{macro}{\@@_fix_varioref_label:n}
% \pkg{varioref} 宏包的 \tn{labelformat} 实际上是定义一个以 |\the<#1>| 为参数的宏
% |\p@<#1>|。\LaTeX{} 在定义计数器 |<#1>| 时,都会将 |\p@<#1>| 初始化为 \tn{@empty}。
% 如果这个宏非空,说明用户自定义了标签格式,我们就不再修改。这里不能使用
@@ -8652,7 +8670,7 @@ Copyright and Licence
%<*ctex|ctexheading>
% \end{macrocode}
%
-% \begin{variable}[int]{\c_@@_std_class_tl}
+% \begin{variable}{\c_@@_std_class_tl}
% 用于记录被引入的标准文档类。
% \begin{macrocode}
\clist_map_inline:nn { article , book , report , beamer }
@@ -8873,8 +8891,8 @@ Copyright and Licence
%
% \changes{v2.0}{2014/03/08}{中文字号不再采用近似值。}
%
-% \begin{variable}[int]{\c_@@_font_size_prop}
-% \begin{macro}[aux]{\@@_save_font_size:nn}
+% \begin{variable}{\c_@@_font_size_prop}
+% \begin{macro}{\@@_save_font_size:nn}
% 基础行距是字号的 $1.2$ 倍,采用 \hologo{eTeX} 的 scaling 运算得到的结果
% 要比简单的 |1.2\dimexpr| 精确^^A
% \footnote{\url{http://thread.gmane.org/gmane.comp.tex.latex.latex3/3190}}。
@@ -8927,7 +8945,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_get_font_sizes:Nn}
+% \begin{macro}{\@@_get_font_sizes:Nn}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_get_font_sizes:Nn #1#2
{
@@ -9111,15 +9129,16 @@ Copyright and Licence
% \subsection{其它功能}
%
% \begin{macro}{\CTeX}
+% \changes{v2.4.12}{2017/12/05}{不依赖 \tn{ifincsname}。}
% \file{ctex-faq.sty} 中的定义是
% \begin{verbatim}
% \DeclareRobustCommand\CTeX{$\mathbb{C}$\kern-.05em\TeX}
% \end{verbatim}
% 然而 \tn{mathbb} 未必有定义,这里就不采用它了,只定义最简单的形式。
-% 同 \pkg{hologo} 宏包的设置类似,\CTeX{} 可以用在 \tn{csname} 和 PDF 书签中。
+% \CTeX{} 可以直接用在 PDF 书签中。
% \begin{macrocode}
\NewDocumentCommand \CTeX { }
- { \ifincsname CTeX \else: C \TeX \fi: }
+ { C \TeX }
\ctex_at_end_package:nn { hyperref }
{ \pdfstringdefDisableCommands { \tl_set:Nn \CTeX { CTeX } } }
% \end{macrocode}
@@ -10054,7 +10073,7 @@ Copyright and Licence
% \begin{macrocode}
%<*windows>
\ProvidesFile{zhwindowsfonts.tex}%
- [2017/11/22 v2.4.11 Windows font map loader for pdfTeX and DVIPDFMx (CTEX)]
+ [2018/01/28 v2.4.12 Windows font map loader for pdfTeX and DVIPDFMx (CTEX)]
\ifzhmappdf
\pdfmapline{=gbk@UGBK@ <simsun.ttc}
@@ -10126,7 +10145,7 @@ Copyright and Licence
% \begin{macrocode}
%<*adobe>
\ProvidesFile{zhadobefonts.tex}%
- [2017/11/22 v2.4.11 Adobe font map loader for DVIPDFMx (CTEX)]
+ [2018/01/28 v2.4.12 Adobe font map loader for DVIPDFMx (CTEX)]
\ifzhmappdf
%% pdfTeX does not support OTF fonts
@@ -10162,7 +10181,7 @@ Copyright and Licence
% \begin{macrocode}
%<*fandol>
\ProvidesFile{zhfandolfonts.tex}%
- [2017/11/22 v2.4.11 Fandol font map loader for DVIPDFMx (CTEX)]
+ [2018/01/28 v2.4.12 Fandol font map loader for DVIPDFMx (CTEX)]
\ifzhmappdf
%% pdfTeX does not support OTF fonts
@@ -10198,7 +10217,7 @@ Copyright and Licence
% \begin{macrocode}
%<*founder>
\ProvidesFile{zhfounderfonts.tex}%
- [2017/11/22 v2.4.11 Founder font map loader for pdfTeX and DVIPDFMx (CTEX)]
+ [2018/01/28 v2.4.12 Founder font map loader for pdfTeX and DVIPDFMx (CTEX)]
\ifzhmappdf
\pdfmapline{=gbk@UGBK@ <FZSSK.TTF}
@@ -10270,7 +10289,7 @@ Copyright and Licence
% \begin{macrocode}
%<*ubuntu>
\ProvidesFile{zhubuntufonts.tex}%
- [2017/11/22 v2.4.11 Ubuntu font map loader for pdfTeX and DVIPDFMx (CTEX)]
+ [2018/01/28 v2.4.12 Ubuntu font map loader for pdfTeX and DVIPDFMx (CTEX)]
\ifzhmappdf
\pdfmapline{=gbk@UGBK@ <uming.ttc}
@@ -10357,8 +10376,7 @@ Copyright and Licence
% \end{verbatim}
% 注意顺序不能改变。
% \begin{macrocode}
-\seq_new:N \c_@@_punct_seq
-\seq_gset_from_clist:Nn \c_@@_punct_seq
+\seq_const_from_clist:Nn \c_@@_punct_seq
{
"2018 , "201C , "300C , "300E , "3014 , "FF08 , "FF3B , "FF5B ,
"3008 , "300A , "3016 , "3010 ,
@@ -10869,7 +10887,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}[int]{\l_@@_prefix_str,\l_@@_parameter_str,\l_@@_replacement_str}
+% \begin{variable}{\l_@@_prefix_str,\l_@@_parameter_str,\l_@@_replacement_str}
% 分别保存宏的 \tn{meaning} 中的前缀、参数文本和替换文本。
% \begin{macrocode}
\str_new:N \l_@@_prefix_str
@@ -10879,7 +10897,7 @@ Copyright and Licence
% \end{variable}
%
% \begin{macro}[int]{\ctex_get_macro_meaning:NTF}
-% \begin{macro}[aux]{\@@_get_macro_meaning:w}
+% \begin{macro}{\@@_get_macro_meaning:w}
% 解构待补丁宏的 \tn{meaning}。若命令不是宏,则走向 |false| 分支。
% \begin{macrocode}
\group_begin:
@@ -10926,7 +10944,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_patch_rebuild:Nn}
+% \begin{macro}{\@@_patch_rebuild:Nn}
% 使用 \cs{tl_rescan:nn} 来重新记号化 \tn{meaning} 字符串。
% \begin{macrocode}
\cs_new_protected:Npn \@@_patch_rebuild:Nn #1#2
@@ -10953,7 +10971,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_patch_cmd:Nnnnnw}
+% \begin{macro}{\@@_patch_cmd:Nnnnnw}
% 对宏的替换文本进行字符串替换,然后重建。
% \begin{macrocode}
\cs_new_protected:Npn \@@_patch_cmd:Nnnnnw #1#2#3#4#5
@@ -10978,7 +10996,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_patch_replace:nnnTF}
+% \begin{macro}{\@@_patch_replace:nnnTF}
% 替换前先检查原文本是否存在。
% \begin{macrocode}
\cs_new_protected:Npn \@@_patch_replace:nnnTF #1#2#3#4
@@ -10989,7 +11007,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_hookto_cmd:Nnnnw}
+% \begin{macro}{\@@_hookto_cmd:Nnnnw}
% 在宏的前/后附加钩子。
% \begin{macrocode}
\cs_new_protected:Npn \@@_hookto_cmd:Nnnnw #1#2#3#4
@@ -11007,7 +11025,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_hookto_cmd_parameterless:Nnnnw}
+% \begin{macro}{\@@_hookto_cmd_parameterless:Nnnnw}
% 如果宏没有参数,可以直接进行附加操作。注意保持宏的前缀。
% \begin{macrocode}
\cs_new_protected:Npn \@@_hookto_cmd_parameterless:Nnnnw #1#2#3#4
@@ -11028,7 +11046,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_hookto_cmd_parameter:Nnnnw}
+% \begin{macro}{\@@_hookto_cmd_parameter:Nnnnw}
% 如果宏有参数,需要在字符串中进行附加,然后再重建。
% \begin{macrocode}
\cs_new_protected:Npn \@@_hookto_cmd_parameter:Nnnnw #1#2#3#4
diff --git a/Master/texmf-dist/source/latex/ctex/ctex.ins b/Master/texmf-dist/source/latex/ctex/ctex.ins
index 471bee144dc..351c8c26eea 100644
--- a/Master/texmf-dist/source/latex/ctex/ctex.ins
+++ b/Master/texmf-dist/source/latex/ctex/ctex.ins
@@ -6,7 +6,7 @@
%%
%% ctex.dtx (with options: `install')
%%
-%% Copyright (C) 2003--2017
+%% Copyright (C) 2003--2018
%% CTEX.ORG and any individual authors listed in the documentation.
%% ------------------------------------------------------------------------------
%%
@@ -31,7 +31,7 @@
\preamble
- Copyright (C) 2003--2017
+ Copyright (C) 2003--2018
CTEX.ORG and any individual authors listed in the documentation.
------------------------------------------------------------------------------