diff options
Diffstat (limited to 'Master')
61 files changed, 1412 insertions, 539 deletions
diff --git a/Master/texmf-dist/doc/latex/ctex/ctex.pdf b/Master/texmf-dist/doc/latex/ctex/ctex.pdf Binary files differindex 6edd930edd2..80e8c1474ef 100644 --- a/Master/texmf-dist/doc/latex/ctex/ctex.pdf +++ b/Master/texmf-dist/doc/latex/ctex/ctex.pdf diff --git a/Master/texmf-dist/source/latex/ctex/ctex.dtx b/Master/texmf-dist/source/latex/ctex/ctex.dtx index ca15d4b916f..b1d710ff91b 100644 --- a/Master/texmf-dist/source/latex/ctex/ctex.dtx +++ b/Master/texmf-dist/source/latex/ctex/ctex.dtx @@ -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$ +%<+!driver>\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +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.2}{\ExplFileDescription} +%<!driver> {\ExplFileDate}{2.4.3}{\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> [2016/05/16 v2.4.2 Chinese font definition (CTEX)] -%<ctexspa> [2016/05/16 v2.4.2 Space info for CJKpunct (CTEX)] -%<dict&theorem> [2016/05/16 v2.4.2 Chinese translation for theorem name (CTEX)] +%<c19|c70> [2016/08/27 v2.4.3 Chinese font definition (CTEX)] +%<ctexspa> [2016/08/27 v2.4.3 Space info for CJKpunct (CTEX)] +%<dict&theorem> [2016/08/27 v2.4.3 Chinese translation for theorem name (CTEX)] %</!(driver|readme|install|zhmap|spa|docstrip)> %<*driver> \documentclass{ctxdoc} @@ -537,7 +537,7 @@ Copyright and Licence % \changes{v2.4}{2015/02/19}{加强 \pkg{beamer} 宏包支持。} % % -% \CheckSum{5600} +% \CheckSum{5629} % % \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 @@ -1514,14 +1514,14 @@ Copyright and Licence % |subsubsection|, |paragraph|, |subparagraph|;而可用的格式包括 \opt{numbering}, % \opt{name}, \opt{number}, \opt{format}, \opt{nameformat}, \opt{numberformat}, % \opt{aftername}, \opt{titleformat}, \opt{aftertitle}, \opt{runin}, -% \opt{afterindent}, \opt{beforeskip}, \opt{afterskip}, \opt{indent}, -% \opt{pagestyle} 等。 +% \opt{afterindent}, \opt{beforeskip}, \opt{afterskip}, \opt{fixskip}, +% \opt{indent}, \opt{pagestyle} 等。 % % 注意,对 \cls{article} 及其衍生的 \cls{ctexart} 等文档类,没有 |chapter| -% 级别的标题。而对于 \cls{beamer} 文档类,这些选项控制的是由 \tn{partpage}、 -% \tn{sectionpage} 和 \tn{subsectionpage} 产生的标题格式,此时只有 |part|、 -% |section| 和 |subsection| 这三层级别,并且 \opt{runin} 和 \opt{afterindent} -% 这两个格式无效。 +% 级别的标题。而对于 \cls{beamer} 文档类,这些选项控制的是由 \tn{partpage}, +% \tn{sectionpage} 和 \tn{subsectionpage} 产生的标题格式,此时只有 |part|, +% |section| 和 |subsection| 这三层级别,并且 \opt{runin}, \opt{afterindent} +% 和 \opt{fixskip} 这三个格式无效。 % % 多级选项之间用斜线分开,例如,\opt{part/name} 选项设置 \tn{part} 标题的在数 % 字前后的名称,而 \opt{section/number} 选项设置 \tn{section} 标题的数字类型。 @@ -2001,15 +2001,6 @@ Copyright and Licence % \end{tabular} % \end{table} % -% \begin{function}[EXP,added=2016-05-10]{part/fixbeforeskip,chapter/fixbeforeskip} -% \begin{syntax} -% fixbeforeskip = \TFF -% \end{syntax} -% \cls{book} 和 \cls{report} 类的 \tn{part} 和 \tn{chapter} 标题与正文顶部的距离除了由 -% \opt{beforeskip} 选项设置的垂直间距外,还会有一个空行。 -% \opt{fixbeforeskip} 选项用于抑制这个多余空行。 -% \end{function} -% % \begin{function}[EXP,updated=2015-06-27]{.../afterskip} % \begin{syntax} % afterskip = \Arg{弹性间距} @@ -2074,6 +2065,15 @@ Copyright and Licence % \end{minipage} % \end{table} % +% \begin{function}[EXP,added=2016-06-03]{.../fixskip} +% \begin{syntax} +% fixskip = \TFF +% \end{syntax} +% 默认情况下,\cls{article}、\cls{book} 和 \cls{report} 类的标题与正文的距离除了由 +% \opt{beforeskip} 和 \opt{afterskip} 选项设置的垂直间距外,还会有一些多余的间距。 +% \opt{fixskip} 选项用于抑制这些多余间距。 +% \end{function} +% % \begin{function}[EXP,updated=2015-06-27]{.../indent} % \begin{syntax} % indent = \Arg{缩进间距} @@ -2190,13 +2190,13 @@ Copyright and Licence % \begin{ctexexam}[labelref=exam:miscopt] % \ctexset { % chapter = { -% beforeskip = 0pt, -% fixbeforeskip = true, -% format = \Huge\bfseries, -% nameformat = \rule{\linewidth}{1bp}\par\bigskip\hfill\chapternamebox, -% number = \arabic{chapter}, -% aftername = \par\medskip, -% aftertitle = \par\bigskip\nointerlineskip\rule{\linewidth}{2bp}\par +% beforeskip = 0pt, +% fixskip = true, +% format = \Huge\bfseries, +% nameformat = \rule{\linewidth}{1bp}\par\bigskip\hfill\chapternamebox, +% number = \arabic{chapter}, +% aftername = \par\medskip, +% aftertitle = \par\bigskip\nointerlineskip\rule{\linewidth}{2bp}\par % } % } % \newcommand\chapternamebox[1]{% @@ -2220,7 +2220,7 @@ Copyright and Licence % \label{sec:useful-commands} % \subsection{字号与间距} % -% \begin{function}[updated=2014-03-08]{\zihao} +% \begin{function}[updated = 2014-03-08, label = ]{\zihao} % \begin{syntax} % \tn{zihao} \Arg{字号} % \end{syntax} @@ -2559,7 +2559,7 @@ Copyright and Licence % 来确定。 % \end{function} % -% \begin{function}{zhmap, nozhmap} +% \begin{function}[label = ]{zhmap, nozhmap} % \opt{zhmap} 宏包选项增加了参数,扩充了功能,除了支持真假值参数外,还支持选择 % \pkg{zhmCJK} 作为底层中文处理宏包。(\ref{subs:options-CJK-font}~节) % @@ -2576,7 +2576,7 @@ Copyright and Licence % (\ref{subs:options-CJK-font}~节)。 % \end{function} % -% \begin{function}{punct, nopunct} +% \begin{function}[label = ]{punct, nopunct} % 旧版本中宏包 \opt{punct} 选项没有参数,现在可以用参数设定标点风格 % (\ref{subs:options-type-style}~节)。原有无参形式的 \opt{punct} 选项相当 % 于 |punct=quanjiao|。 @@ -2592,7 +2592,7 @@ Copyright and Licence % 于 |scheme = plain|。它们均已过时,仅因兼容性而保留。 % \end{function} % -% \begin{function}{space, nospace} +% \begin{function}[label = ]{space, nospace} % 新版本宏包 \opt{space} 选项增加真假值参数。 % (\ref{subs:options-type-style}~节) % @@ -2717,6 +2717,12 @@ Copyright and Licence % 并设置相应的 \opt{runin} 选项为 \opt{true}。 % \end{function} % +% \subsection{\CTeX\ 2.4.1 和 2.4.2} +% +% \begin{function}{part/fixbeforeskip, chapter/fixbeforeskip} +% 这两个选项已经被删除,相应功能由新的选项 \opt{fixskip} 提供。 +% \end{function} +% % \section{宏集依赖情况与手工安装方法} % \label{sec:dep-ins} % @@ -2730,19 +2736,17 @@ Copyright and Licence % % \begin{itemize} % \item \pkg{expl3}、\pkg{xparse} 和 \pkg{l3keys2e} 宏包。它们属于 \pkg{l3kernel} -% 和 \pkg{l3packages} 宏集,它们还依赖 -% \begin{itemize} -% \item \pkg{etex} 宏包。 -% \end{itemize} +% 和 \pkg{l3packages} 宏集。 % \item \pkg{indentfirst} 宏包,属于 \pkg{tools} 宏集。 % \item \pkg{everysel} 宏包,属于 \pkg{ms} 宏集。 +% \item \pkg{ulem} 宏包。 % \item \pkg{zhnumber} 宏包。 % \item[\ding{229}] 以上是各种编译方式都必需的依赖项。 -% \item \pkg{CJK} 宏集,它的下划线功能依赖 \pkg{ulem} 宏包。 +% \item \pkg{CJK} 宏集。 % \item \pkg{CJKpunct} 宏包。 % \item \pkg{xCJK2uni} 宏包。 % \item \pkg{zhmetrics} 宏包。 -% \item \pkg{zhmCJK} 宏包。 +% \item \pkg{zhmCJK} 宏包,它还依赖 \pkg{oberdiek} 宏集。 % \item[\ding{229}] 以上是使用 \pdfLaTeX{} 或 \LaTeX{} + \dvipdfmx{} 的编译方式所需要 % 的依赖项,其中 \pkg{zhmCJK} 是可选的。 % \item \pkg{xeCJK} 宏包,它还依赖 @@ -2750,16 +2754,25 @@ Copyright and Licence % \item \pkg{fontspec} 宏包,它还依赖 % \begin{itemize} % \item \pkg{euenc} 宏包。 -% \item \pkg{xunicode} 宏包,它还依赖 \pkg{tipa} 宏包。 +% \item \pkg{xunicode} 宏包,它还依赖 +% \begin{itemize} +% \item \pkg{graphics} 宏集。 +% \item \pkg{graphics-cfg} 宏包。 +% \item \pkg{graphics-def} 宏包。 +% \end{itemize} % \end{itemize} % \end{itemize} +% \item \pkg{environ} 宏包,它还依赖 \pkg{trimspaces} 宏包。 % \item[\ding{229}] 以上是使用 \XeLaTeX{} 编译时的依赖项。 % \item \pkg{LuaTeX-ja} 宏集,它还依赖 % \begin{itemize} +% \item \pkg{adobemapping} 宏包。 +% \item \pkg{fontspec} 宏包。 +% \item \pkg{lualibs} 宏包。 +% \item \pkg{luaotfload} 宏包。 +% \item \pkg{luatexbase} 宏包,它还依赖 \pkg{ctablestack} 宏包。 % \item \pkg{oberdiek} 宏集。 % \item \pkg{xkeyval} 宏包。 -% \item \pkg{lualibs} 宏包。 -% \item \pkg{luaotfload} 宏包,它还依赖 \pkg{luatexbase} 宏包。 % \end{itemize} % \item[\ding{229}] 以上是使用 \LuaLaTeX{} 编译时的依赖项。 % \item \pkg{zhmetrics-uptex} 宏包。 @@ -4152,66 +4165,53 @@ Copyright and Licence } \AtEndUTFCommand { \group_end: } % \end{macrocode} +% % \changes{v2.4.2}{2016/05/15}{恢复 \pkg{luatexja} 对 \tn{emshape} 和 % \tn{eminnershape} 的重定义。} -% 对 \pkg{fontspec} 沿用 \pkg{LuaTeX-ja} 的补丁。但恢复对 \tn{emshape} 和 -% \tn{eminnershape} 的修改。 +% \changes{v2.4.3}{2016/08/26}{简化 \pkg{fontspec} 补丁。} +% \begin{macro}[int]{\fontspec_visible_space:} +% 我们不使用 \pkg{luatexja} 对 \pkg{fontspec} 的补丁,直接处理。 % \begin{macrocode} -\RequirePackage { lltjp-fontspec } -\cs_set:Npn \emshape { \itshape } -\cs_set:Npn \eminnershape { \upshape } +\cs_set_protected:Npn \fontspec_visible_space: + { + \font_glyph_if_exist:NnTF \font { "2423 } + { \ltjalchar "2423 \exp_stop_f: } + { \fontspec_visible_space_fallback: } + } % \end{macrocode} -% \pkg{lltjp-unicode-math} 让数学符号命令成为普通的文字宏。为了避免它被展开,应该 -% 用 \tn{protected} 来定义。 +% \end{macro} +% +% \changes{v2.4.3}{2016/08/25}{更新 \pkg{unicode-math} 补丁。} +% 对 \pkg{unicode-math} 的补丁主要是将 \file{unicode-math-table.tex} 中的数学符号设置为 +% \pkg{luatexja} 中的数学字母。 % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_um_define_math_chars: +\cs_new_protected:Npn \ctex_ltj_set_math_letter:NN #1#2 { \group_begin: - \cs_set_protected:Npn \__um_sym:nnn ##1##2##3 - { - \tl_if_in:nnT - { - \mathord \mathalpha \mathbin \mathrel - \mathpunct \mathop \mathfence - } - { ##3 } - { \@@_um_char:Nn ##2 { ##1 } } - } - \__um_input_math_symbol_table: + \cs_set_protected:Npn #1 ##1##2##3 + { \ltjsetmathletter { ##1 } } + #2 \group_end: } -\cs_new_protected:Npn \@@_um_char:Nn #1#2 - { - \@@_um_char_aux:Nx #1 { \char_generate:nn {#2} { 12 } } - \ltjsetmathletter {#2} - } -\cs_new_protected:Npn \@@_um_char_aux:Nn #1#2 +\ctex_at_end_package:nn { unicode-math } { - \cs_gset_protected_nopar:Npn #1 + \cs_if_exist:NTF \um_input_math_symbol_table: { - \mode_if_math:TF - {#2} - { - { - \lua_now_x:n { tex.globaldefs = 0 } - \ltj@allalchar #2 - } - } + \ctex_ltj_set_math_letter:NN + \um_sym:nnn + \um_input_math_symbol_table: } - } -\cs_generate_variant:Nn \@@_um_char_aux:Nn { Nx } -\ctex_at_end_package:nn { unicode-math } - { - \cs_set_eq:NN \__um_define_math_chars: \@@_um_define_math_chars: - \@ifpackagelater { unicode-math } { 2015/06/28 } { \cs_set_eq:NN \use@mathgroup \ctex_ltj_use_math_group:Nn \cs_set_protected_nopar:Npn \ctex_ltj_math_group_hook: { \__um_switchto_literal: } + \ctex_ltj_set_math_letter:NN + \__um_sym:nnn + \__um_input_math_symbol_table: } - { } } % \end{macrocode} +% % 对 \pkg{listings} 的补丁是让代码环境支持 JAchar 类。\pkg{LuaTeX-ja} 的补丁会将 % 代码目录标题改为日文,我们不需要。 % \begin{macrocode} @@ -4986,12 +4986,12 @@ Copyright and Licence { \prop_if_empty:NF \g_@@_family_font_name_prop { - \ctex_ltj_family_if_exist:xNF { \CJKfamilydefault } \l_@@_tmpa_tl + \ctex_ltj_family_if_exist:xNF { \CJKfamilydefault } \l_@@_tmp_tl { \str_if_eq_x:nnTF { \CJKfamilydefault } { \CJKrmdefault } { \use:n } { - \ctex_ltj_family_if_exist:xNTF { \CJKrmdefault } \l_@@_tmpa_tl + \ctex_ltj_family_if_exist:xNTF { \CJKrmdefault } \l_@@_tmp_tl { \tl_gset:Nn \CJKfamilydefault { \CJKrmdefault } \use_none:n } { \use:n } } @@ -5558,7 +5558,7 @@ Copyright and Licence \ctex_at_end_preamble:n { \ctex_update_default_family: } % \end{macrocode} % -% \begin{macro}{\em} +% \begin{macro}[int]{\em} % \changes{v2.4.2}{2016/05/15}{兼容 \upLaTeX{} 2016/05/07u00 的定义。} % 取消 \upLaTeX{} 对 \tn{em} 使用 |\mcfamily|、|\gtfamily| 命令的重定义,恢复 % \LaTeXe{} 对 \tn{em} 的原始定义。如果用户已经重定义了 \tn{em},则新定义保持 @@ -6550,6 +6550,18 @@ Copyright and Licence % \subsection{其它中文标题定义} % % \changes{v2.0}{2014/03/08}{将标题汉化功能加入 \pkg{ctex.sty}。} +% \changes{v2.4.3}{2016/08/18}{确保 \tn{proofname} 非空。} +% +% \begin{macro}[int]{\proofname} +% \tn{proofname} 未在标准文档类中定义,需要确保它非空。 +% \begin{macrocode} +\tl_if_exist:NF \proofname + { + \tl_new:N \proofname + \tl_set:Nn \proofname { Proof } + } +% \end{macrocode} +% \end{macro} % % \begin{macrocode} \keys_define:nn { ctex } @@ -6691,6 +6703,7 @@ Copyright and Licence % 不再有特殊意义。} % \changes{v2.2}{2015/06/27}{新的标题格式选项 \opt{afterindent}。} % \changes{v2.2}{2015/06/27}{新的标题格式选项 \opt{runin}。} +% \changes{v2.4.3}{2016/06/03}{新的标题格式选项 \opt{fixskip}。} % % \begin{macro}[int]{\@@_def_heading_keys:n} % \begin{macrocode} @@ -6714,6 +6727,7 @@ Copyright and Licence #1 / numbering .bool_set:N = \exp_not:c { CTEX@#1@numbering } , %<*article|book|report> #1 / afterindent .bool_set:N = \exp_not:c { CTEX@#1@afterindent } , + #1 / fixskip .bool_set:N = \exp_not:c { CTEX@#1@fixskip } , #1 / runin .bool_set:N = \exp_not:c { CTEX@#1@runin } , %</article|book|report> #1 / format+ .code:n = @@ -6763,19 +6777,18 @@ Copyright and Licence % \changes{v2.0}{2014/03/21}{标题设置新增 \opt{pagestyle} 选项。} % \changes{v2.4.1}{2016/05/10}{新的标题格式选项 \opt{part/fixbeforeskip} 和 % \opt{chapter/fixbeforeskip}。} +% \changes{v2.4.3}{2016/06/03}{删除选项 \opt{part/fixbeforeskip} 和 +% \opt{chapter/fixbeforeskip}。} % -% \begin{macro}{part/pagestyle,chapter/pagestyle, -% part/fixbeforeskip,chapter/fixbeforeskip} +% \begin{macro}{part/pagestyle,chapter/pagestyle} % 只在 \cls{ctexbook} 和 \cls{ctexrep} 下有定义。 % \begin{macrocode} \group_begin: %<*book|report> \tl_set:Nn \l_@@_tmp_tl { - part / pagestyle .tl_set:N = \CTEX@part@pagestyle , - chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , - part / fixbeforeskip .bool_set:N = \CTEX@part@fixbeforeskip , - chapter / fixbeforeskip .bool_set:N = \CTEX@chapter@fixbeforeskip , + part / pagestyle .tl_set:N = \CTEX@part@pagestyle , + chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , } %</book|report> %<*article|beamer> @@ -6813,26 +6826,39 @@ Copyright and Licence % \end{macrocode} % \end{macro} % -% \begin{macro}[int]{\CTEX@fixbeforeskip} +% \begin{macro}[int]{\CTEX@fixtopskip} % 修正 \cls{book} 和 \cls{report} 类的 \tn{part} 和 \tn{chapter} 标题之前的多余空行。 -% 事实上,减掉 \tn{parskip} 有一定的风险。如果接下来的内容不会进入水平模式(例如在 \opt{format} -% 选项中使用 \tn{hrule} 或者 \tn{hbox}),\TeX{} 就不会加上 \tn{parskip}。这时候就需要用户把 -% \tn{parskip} 加到 \opt{beforeskip} 上作为修正。 % \begin{macrocode} %<*book|report> -\cs_new_protected_nopar:Npn \CTEX@fixbeforeskip +\cs_new_protected_nopar:Npn \CTEX@fixtopskip { - \par - \ifdim \pagegoal = \maxdimen - \advance \@tempskipa -\topskip - \advance \@tempskipa -\parskip - \nointerlineskip - \fi + \CTEX@fixheadingskip + \dim_compare:nNnF \tex_pagegoal:D < \c_max_dim + { \skip_sub:Nn \l_@@_heading_skip { \tex_topskip:D } } } %</book|report> % \end{macrocode} % \end{macro} % +% \begin{macro}[int]{\CTEX@fixheadingskip} +% 抑制行间粘连,修正标题前后的多余间距。事实上,减掉 \tn{parskip},有一定的风险。 +% 如果接下来的内容不会进入水平模式(例如在 \opt{format} 选项中使用 \tn{hrule} 或者 \tn{hbox}), +% \TeX{} 就不会加上 \tn{parskip}。这时候就需要用户把 \tn{parskip} 加到 \opt{beforeskip} +% 或者 \opt{afterskip} 作为修正。 +% \begin{macrocode} +\cs_new_protected_nopar:Npn \CTEX@fixheadingskip + { + \par + \dim_set:Nn \tex_prevdepth:D { -1000pt } + \skip_sub:Nn \l_@@_heading_skip { \tex_parskip:D } + } +\skip_new:N \l_@@_heading_skip +\cs_new_protected_nopar:Npn \CTEX@setheadingskip + { \skip_set:Nn \l_@@_heading_skip } +\cs_new_eq:NN \CTEX@headingskip \l_@@_heading_skip +% \end{macrocode} +% \end{macro} +% % \changes{v2.2}{2015/06/27}{\opt{beforeskip}、\opt{afterskip} 和 \opt{indent} % 选项支持表达式。} % @@ -6852,7 +6878,9 @@ Copyright and Licence \if@noskipsec \leavevmode \fi \par % \addvspace{4ex}% - \addvspace{\glueexpr\CTEX@part@beforeskip\relax}% + \CTEX@setheadingskip \CTEX@part@beforeskip + \ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi + \addvspace \CTEX@headingskip \ifodd \CTEX@part@afterindent \@afterindenttrue \else @@ -6876,11 +6904,9 @@ Copyright and Licence \@tempswafalse \fi % \null\vfil - \@tempskipa = \glueexpr \CTEX@part@beforeskip \relax - \ifodd \CTEX@part@fixbeforeskip - \CTEX@fixbeforeskip - \fi - \vspace*{\@tempskipa}% + \CTEX@setheadingskip \CTEX@part@beforeskip + \ifodd \CTEX@part@fixskip \CTEX@fixtopskip \fi + \vspace*{\CTEX@headingskip}% \secdef\@part\@spart} %</book|report> % \end{macrocode} @@ -6915,7 +6941,9 @@ Copyright and Licence \CTEX@part@aftertitle}% \nobreak % \vskip 3ex - \vskip \glueexpr \CTEX@part@afterskip \relax + \CTEX@setheadingskip \CTEX@part@afterskip + \ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \@afterheading} %</article> %<*book|report> @@ -6961,7 +6989,9 @@ Copyright and Licence \CTEX@part@aftertitle}% \nobreak % \vskip 3ex - \vskip \glueexpr \CTEX@part@afterskip \relax + \CTEX@setheadingskip \CTEX@part@afterskip + \ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \@afterheading} %</article> %<*book|report> @@ -6982,7 +7012,9 @@ Copyright and Licence %<*book|report> \def\@endpart{% % \vfil - \vskip \glueexpr \CTEX@part@afterskip \relax + \CTEX@setheadingskip \CTEX@part@afterskip + \ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \newpage \if@twoside \if@openright @@ -7058,11 +7090,9 @@ Copyright and Licence % \begin{macrocode} \def\@makechapterhead#1{% % \vspace*{50\p@}% - \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax - \ifodd \CTEX@chapter@fixbeforeskip - \CTEX@fixbeforeskip - \fi - \vspace*{\@tempskipa}% + \CTEX@setheadingskip \CTEX@chapter@beforeskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixtopskip \fi + \vspace*{\CTEX@headingskip}% % {\normalfont \parindent \z@ \raggedright {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format @@ -7080,7 +7110,9 @@ Copyright and Licence \CTEX@chapter@aftertitle \nobreak % \vskip 40\p@ - \vskip \glueexpr \CTEX@chapter@afterskip \relax + \CTEX@setheadingskip \CTEX@chapter@afterskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip }} % \end{macrocode} % \end{macro} @@ -7089,11 +7121,9 @@ Copyright and Licence % \begin{macrocode} \def\@makeschapterhead#1{% % \vspace*{50\p@}% - \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax - \ifodd \CTEX@chapter@fixbeforeskip - \CTEX@fixbeforeskip - \fi - \vspace*{\@tempskipa}% + \CTEX@setheadingskip \CTEX@chapter@beforeskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixtopskip \fi + \vspace*{\CTEX@headingskip}% % {\normalfont \parindent \z@ \raggedright {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format @@ -7103,7 +7133,9 @@ Copyright and Licence \CTEX@chapter@aftertitle \nobreak % \vskip 40\p@ - \vskip \glueexpr \CTEX@chapter@afterskip \relax + \CTEX@setheadingskip \CTEX@chapter@afterskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip }} % \end{macrocode} % \end{macro} @@ -7134,7 +7166,10 @@ Copyright and Licence \everypar{}% \else % \addpenalty\@secpenalty\addvspace\@tempskipa - \addpenalty\@secpenalty\addvspace{\glueexpr #4\relax}% + \addpenalty\@secpenalty + \CTEX@setheadingskip{#4}% + \ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi + \addvspace \CTEX@headingskip \fi \@ifstar {\@ssect{#3}{#4}{#5}{#6}}% @@ -7236,7 +7271,9 @@ Copyright and Licence \unless \ifodd \CTEX@runin \par \nobreak % \vskip \@tempskipa - \vskip\glueexpr #1\relax + \CTEX@setheadingskip{#1}% + \ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \@afterheading \else \@nobreakfalse @@ -7272,11 +7309,13 @@ Copyright and Licence \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat } \cs_set_eq:Nc \CTEX@aftertitle { CTEX@#1@aftertitle } \cs_set_eq:Nc \CTEX@afterindent { CTEX@#1@afterindent } + \cs_set_eq:Nc \CTEX@fixskip { CTEX@#1@fixskip } \cs_set_eq:Nc \CTEX@runin { CTEX@#1@runin } } \cs_new_eq:NN \CTEX@titleformat@n \use:n \cs_new_eq:NN \CTEX@aftertitle \prg_do_nothing: \cs_new_eq:NN \CTEX@afterindent \c_true_bool +\cs_new_eq:NN \CTEX@fixskip \c_false_bool \cs_new_eq:NN \CTEX@runin \c_false_bool % \end{macrocode} % \end{macro} @@ -9467,7 +9506,7 @@ Copyright and Licence % \begin{macrocode} %<*windows> \ProvidesFile{zhwindowsfonts.tex}% - [2016/05/16 v2.4.2 Windows font map loader for pdfTeX and DVIPDFMx (CTEX)] + [2016/08/27 v2.4.3 Windows font map loader for pdfTeX and DVIPDFMx (CTEX)] \ifzhmappdf \pdfmapline{=gbk@UGBK@ <simsun.ttc} @@ -9539,7 +9578,7 @@ Copyright and Licence % \begin{macrocode} %<*adobe> \ProvidesFile{zhadobefonts.tex}% - [2016/05/16 v2.4.2 Adobe font map loader for DVIPDFMx (CTEX)] + [2016/08/27 v2.4.3 Adobe font map loader for DVIPDFMx (CTEX)] \ifzhmappdf %% pdfTeX does not support OTF fonts @@ -9575,7 +9614,7 @@ Copyright and Licence % \begin{macrocode} %<*fandol> \ProvidesFile{zhfandolfonts.tex}% - [2016/05/16 v2.4.2 Fandol font map loader for DVIPDFMx (CTEX)] + [2016/08/27 v2.4.3 Fandol font map loader for DVIPDFMx (CTEX)] \ifzhmappdf %% pdfTeX does not support OTF fonts @@ -9611,7 +9650,7 @@ Copyright and Licence % \begin{macrocode} %<*founder> \ProvidesFile{zhfounderfonts.tex}% - [2016/05/16 v2.4.2 Founder font map loader for pdfTeX and DVIPDFMx (CTEX)] + [2016/08/27 v2.4.3 Founder font map loader for pdfTeX and DVIPDFMx (CTEX)] \ifzhmappdf \pdfmapline{=gbk@UGBK@ <FZSSK.TTF} @@ -9683,7 +9722,7 @@ Copyright and Licence % \begin{macrocode} %<*ubuntu> \ProvidesFile{zhubuntufonts.tex}% - [2016/05/16 v2.4.2 Ubuntu font map loader for pdfTeX and DVIPDFMx (CTEX)] + [2016/08/27 v2.4.3 Ubuntu font map loader for pdfTeX and DVIPDFMx (CTEX)] \ifzhmappdf \pdfmapline{=gbk@UGBK@ <uming.ttc} @@ -10478,7 +10517,15 @@ Copyright and Licence % % \begin{macrocode} %<*ctxdoc> +% \end{macrocode} +% +% \begin{macrocode} +%<@@=ctxdoc> +% \end{macrocode} +% +% \begin{macrocode} \ExplSyntaxOff +\let\pdfmdfivesum\mdfivesum \DeclareOption*{\PassOptionsToClass{\CurrentOption}{l3doc}} \PassOptionsToClass{a4paper,full}{l3doc} \ProcessOptions @@ -10620,8 +10667,6 @@ Copyright and Licence \appto\MacroFont{\hyphenchar\font\m@ne\ctexdocverbaddon} \preto\AltMacroFont{\linespread{1}} \appto\AltMacroFont{\hyphenchar\font\m@ne\ctexdocverbaddon} -\def\Module#1{\mbox{% - \color{purple}\footnotesize\normalfont\sffamily\textlangle#1\textrangle}} \newcommand*\exptarget{\Hy@raisedlink{\hypertarget{expstar}{}}} \newcommand*\rexptarget{\Hy@raisedlink{\hypertarget{rexpstar}{}}} \newcommand*\expstar{\hyperlink{expstar}{$\star$}} @@ -10632,7 +10677,7 @@ Copyright and Licence \cs_new_nopar:Npn \zihaopt #1 { \exp_last_unbraced:Nf \tl_head:w - { \prop_item:Nn \c_@@_font_size_prop {#1} } { } \q_stop + { \prop_item:Nn \c__ctex_font_size_prop {#1} } { } \q_stop } %% 抑制首段的 \parskip \ctex_patch_cmd_once:NnnnTF \__codedoc_function_descr_start:w @@ -10655,62 +10700,41 @@ Copyright and Licence { \skip_zero:N \medskipamount } { \skip_add:Nn \medskipamount { \parskip } } } -%% 用 \vtop 让函数名字和语法盒子首行对齐 -\ctex_patch_cmd_once:NnnnTF \__codedoc_syntax:w +%% 左侧边注的函数列表采用单倍行距 +\ctex_preto_cmd:NnnTF \__codedoc_typeset_functions: { } - { { minipage } { \l__codedoc_syntax_dim } } - { { minipage } [t] { \l__codedoc_syntax_dim } } + { \MacroFont } { \iow_term:n { *** ~ SUCCESS ~ *** } } { \iow_term:n { *** ~ FAIL ~ *** } } -%% 左侧边注的函数列表采用单倍行距 -\ctex_preto_cmd:NnnTF \__codedoc_typeset_names: +\ctex_patch_cmd_once:NnnnTF \__codedoc_macro_init: { } - { \linespread { 1 } } + { \hbox:n } + { \MacroFont \hbox:n } { \iow_term:n { *** ~ SUCCESS ~ *** } } { \iow_term:n { *** ~ FAIL ~ *** } } -\ctex_patch_cmd_once:NnnnTF \__codedoc_macro_typeset_one:n +\ctex_patch_cmd_once:NnnnTF \__codedoc_macro_typeset_one:nN { } { \vbox_unpack_clear:N } - { \linespread { 1 } \selectfont \vbox_unpack_clear:N } + { \MacroFont \vbox_unpack_clear:N } + { \iow_term:n { *** ~ SUCCESS ~ *** } } + { \iow_term:n { *** ~ FAIL ~ *** } } +\ctex_patch_cmd_once:NnnnTF \__codedoc_macro_dump: + { } + { \hbox_unpack_clear:N } + { \MacroFont \hbox_unpack_clear:N } + { \iow_term:n { *** ~ SUCCESS ~ *** } } + { \iow_term:n { *** ~ FAIL ~ *** } } +\ctex_patch_cmd_once:NnnnTF \__codedoc_macro_end: + { } + { \endtrivlist } + { \@noparlisttrue \endtrivlist } + { \iow_term:n { *** ~ SUCCESS ~ *** } } + { \iow_term:n { *** ~ FAIL ~ *** } } +\ctex_appto_cmd:NnnTF \__codedoc_macro_end_style:n + { } + { \@endparenv } { \iow_term:n { *** ~ SUCCESS ~ *** } } { \iow_term:n { *** ~ FAIL ~ *** } } -%% 不重复使用 \HD@target,避免索引出现重复页码 -\cs_set_protected:Npn \__codedoc_special_index_aux:nnnnn #1#2#3#4#5 - { - \__codedoc_special_index_set:Nn \l__codedoc_index_escaped_macro_tl {#2} - \str_if_eq:onTF { \@currenvir } { macrocode } - { \codeline@wrindex } - { - \HD@target - \index - } - { - \tl_if_empty:nF { #3 #4 } - { #3 \actualchar #4 \levelchar } - #1 - \actualchar - { - \token_to_str:N \verbatim@font \c_space_tl - \l__codedoc_index_escaped_macro_tl - } - \encapchar - hdclindex{\the\c@HD@hypercount}{#5} - } - } -\DeclareDocumentCommand \cs { O{} m } - { \__codedoc_cmd_aux:no {#1} { \c__codedoc_backslash_tl #2 } } -\DeclareDocumentCommand \tn { O{} m } - { - \__codedoc_cmd_aux:no - { index = TeX , replace = false , #1 } - { \c__codedoc_backslash_tl #2 } - } -\DeclareDocumentCommand \meta { +m } - { \__codedoc_meta_aux:n {#1} } -\DeclareExpandableDocumentCommand \bookmarkcstn { O{} m } - { \textbackslash \tl_to_str:n {#2} } -\cs_new:Npn \bookmarkmeta #1 { < \tl_to_str:n {#1} > } -\cs_generate_variant:Nn \__codedoc_cmd_aux:nn { no } \AtBeginEnvironment { syntax } { \char_set_catcode_active:N \| @@ -10720,7 +10744,7 @@ Copyright and Licence } %% 不对目录中出现的 \cs 和 \tn 等编索引 \DeclareDocumentCommand \StopSpecialIndexModule { } - { \cs_set_eq:NN \__codedoc_special_index_module:nnnn \use_none:nnnn } + { \cs_set_eq:NN \__codedoc_special_index_module:nnnnN \use_none:nnnnn } \tl_map_inline:nn { \actualchar \encapchar \levelchar } { \exp_args:Nx \DoNotIndex { \bslash \tl_to_str:N #1 } } \DeclareDocumentCommand \package { o m } @@ -10735,22 +10759,410 @@ Copyright and Licence \DeclareDocumentCommand \GetFileId { m } { \GetFileInfo {#1} - \ior_open:NnTF \g_@@_doc_ior { \c_sys_jobname_str .id } + \ior_open:NnTF \g_@@_id_ior { \c_sys_jobname_str .id } { - \ior_get:NN \g_@@_doc_ior \l_@@_tmp_tl - \ior_close:N \g_@@_doc_ior + \ior_get:NN \g_@@_id_ior \l_@@_tmp_tl + \ior_close:N \g_@@_id_ior \exp_after:wN \GetIdInfo \l_@@_tmp_tl } { \GetIdInfo $Id$ } { \fileinfo } } -\ior_new:N \g_@@_doc_ior +\ior_new:N \g_@@_id_ior +\ctex_patch_cmd:Nnn \changes@ + { \space \actualchar } + { \actualchar } +\cs_new_eq:NN \@@_ltx_changes:nnn \changes@ +\cs_set_protected:Npn \changes@ #1#2 + { + \@@_save_version_date:nn {#1} {#2} + \tl_if_empty:nTF {#1} + { \@@_ltx_changes:nnn } + { \@@_version_zfill:wnnn #1 \q_stop } + {#1} {#2} + } +\cs_new_protected:Npn \@@_version_zfill:wnnn #1#2 \q_stop + { + \str_if_eq:nnTF {#1} { v } + { \@@_version_zfill:nnnn {#2} } + { \@@_ltx_changes:nnn } + } +\cs_new_protected:Npn \@@_version_zfill:nnnn #1#2 + { + \tl_clear:N \l_@@_tmp_tl + \seq_set_split:Nnn \l_@@_tmp_seq { . } {#1} + \seq_map_function:NN \l_@@_tmp_seq \@@_version_zfill:n + \@@_ltx_changes:nnn { \l_@@_tmp_tl \actualchar #2 } + } +\tl_new:N \l_@@_tmp_tl +\seq_new:N \l_@@_tmp_seq +\cs_new_protected:Npn \@@_version_zfill:n #1 + { + \tl_put_right:Nx \l_@@_tmp_tl + { + \prg_replicate:nn + { \int_max:nn { 0 } { 10 - \tl_count:n {#1} } } { 0 } + \exp_not:n {#1} + } + } +\cs_new_protected:Npn \@@_save_version_date:nn #1#2 + { + \prop_get:NnNTF \g_@@_version_date_prop {#1} \l_@@_tmp_tl + { \exp_after:wN \@@_save_version_date:nnnn \l_@@_tmp_tl {#2} {#1} } + { \@@_save_version_date:nnn {#1} {#2} {#2} } + } +\cs_new_protected:Npn \@@_save_version_date:nnnn #1#2#3#4 + { + \@@_if_date_later:nnTF {#1} {#3} + { \@@_save_version_date:nnn {#4} {#3} {#2} } + { + \@@_if_date_later:nnT {#3} {#2} + { \@@_save_version_date:nnn {#4} {#1} {#3} } + } + } +\prg_new_conditional:Npnn \@@_if_date_later:nn #1#2 { TF , T } + { + \if_int_compare:w \@@_parse_date:w #1 / / / 0 \q_stop > + \@@_parse_date:w #2 / / / 0 \q_stop \exp_stop_f: + \prg_return_true: \else: \prg_return_false: \fi: + } +\cs_new:Npn \@@_parse_date:w #1/#2/#3/ #4 \q_stop + { #1#2#3 } +\cs_new_protected:Npn \@@_save_version_date:nnn #1#2#3 + { \prop_gput:Nnn \g_@@_version_date_prop {#1} { {#2} {#3} } } +\cs_new_protected:Npn \CTEX@versionitem #1 \efill + { + \@idxitem + \prop_get:NnNTF \g_@@_version_date_prop {#1} \l_@@_tmp_tl + { \exp_after:wN \@@_version_item:nnn \l_@@_tmp_tl {#1} } + { \BOOM } + } +\cs_new_protected:Npn \@@_version_item:nnn #1#2#3 + { + \noindent + \Hy@raisedlink { \belowpdfbookmark {#3} { HD.#3 } } + \textbf {#3} \hfill + \hbox:n + { + \footnotesize + \str_if_eq:nnTF {#1} {#2} + { ( #1 ) } + { ( #1 ~ -- ~ #2 ) } + } + \par \nopagebreak + } +\prop_new:N \g_@@_version_date_prop +\ctex_patch_cmd:Nnn \HDorg@theglossary + { \let \item \@idxitem } + { \let \item \CTEX@versionitem } +\ctex_patch_cmd:Nnn \l@section { 2.5em } { 1.5em } +\ctex_patch_cmd:Nnn \l@subsection { 2.5em } { 1.5em } +\ctex_patch_cmd:Nnn \@wrglossary + { hdpindex } + { + \ifnum \c@HD@hypercount = \z@ + hdpindex + \else + hdclindex { \the \c@HD@hypercount } + \fi + } +%% 重定义 macrocode 环境的实现,逐行处理 +\cs_set_protected_nopar:Npn \xmacro@code + { \@@_marco_code:w } +\cs_set_protected_nopar:Npn \sxmacro@code + { + \fontspec_print_visible_spaces: + \xmacro@code + } +\cs_new_protected_nopar:Npn \@@_marco_code:w + { + \ifcodeline@index + \@@_marco_every_par:n { \@@_code_line_no: } + \else: + \@@_marco_every_par:n { } + \fi: + \exp_args:Nx \@@_make_finish_tag:n { \@currenvir } + \@@_verbatim_start:w + } +\cs_new_protected:Npn \@@_marco_every_par:n #1 + { + \everypar + { + \everypar {#1} + \if@inlabel + \global \@inlabelfalse + \llap { \box \@labels \hskip \leftskip } + \fi + #1 + } + } +\ctex_patch_cmd:Nnn \macro@code + { \if@inlabel \leavevmode \fi } + { } +\group_begin: + \int_set_eq:NN \tex_endlinechar:D \c_minus_one + \use:n + { + \char_set_catcode_active:n { 32 } + \tl_const:Nn \c_@@_active_space_tl + } + { } +\group_end: +\group_begin: + \char_set_catcode_active:n { 13 } + \cs_new_protected:Npx \@@_make_finish_tag:n #1 + { + \tl_set:Nn \exp_not:N \l_@@_verbatim_finish_tl + { + \c_percent_str + \prg_replicate:nn { 4 } + { \exp_not:o { \c_@@_active_space_tl } } + \exp_not:o { \active@escape@char } end + \c_left_brace_str #1 \c_right_brace_str + \exp_not:N ^^M + } + } + \cs_new_protected:Npn \@@_verbatim_start:w #1 + { + \str_if_eq:nnTF {#1} { ^^M } + { \@@_verbatim_read_line:w } + { \@@_verbatim_read_line:w #1 } + } + \cs_new_protected:Npn \@@_verbatim_read_line:w #1 ^^M + { + \tl_set:Nn \l_@@_verbatim_line_tl { #1 ^^M } + \tl_if_eq:NNTF \l_@@_verbatim_line_tl \l_@@_verbatim_finish_tl + { \exp_args:Nx \end { \@currenvir } } + { + \@@_verbatim_process_line: + \@@_verbatim_read_line:w + } + } + \tl_const:Nn \c_@@_active_cr_tl { ^^M } +\group_end: +\tl_new:N \l_@@_verbatim_line_tl +\tl_new:N \l_@@_verbatim_finish_tl +\tl_new:N \g_@@_verbatim_verb_stop_tl +\cs_new_protected_nopar:Npn \@@_process_normal_line: + { + \str_if_eq_x:nnTF + { \str_head:N \l_@@_verbatim_line_tl } { \c_percent_str } + { \@@_check_angle:x { \tl_tail:N \l_@@_verbatim_line_tl } } + { \@@_output_line: } + } +\cs_new_protected_nopar:Npn \@@_process_verb_line: + { + \tl_if_eq:NNTF \l_@@_verbatim_line_tl \g_@@_verbatim_verb_stop_tl + { + \tl_gclear:N \g_@@_verbatim_verb_stop_tl + \cs_gset_eq:NN \@@_verbatim_process_line: \@@_process_normal_line: + \@@_output_module:nn + { slash@guard } + { \@@_module_pop:n { \l_@@_verbatim_line_tl } } + } + { \tl_use:N \l_@@_verbatim_line_tl } + } +\cs_new_eq:NN \@@_verbatim_process_line: \@@_process_normal_line: +\DeclareDocumentCommand \CheckModules { } + { \cs_set_eq:NN \@@_verbatim_process_line: \@@_process_normal_line: } +\DeclareDocumentCommand \DontCheckModules { } + { \cs_set_eq:NN \@@_verbatim_process_line: \@@_output_line: } +\cs_new_protected:Npn \@@_check_angle:n #1 + { + \str_if_eq_x:nnTF { \str_head:n {#1} } { < } + { \@@_check_module:x { \tl_tail:n {#1} } } + { \@@_output_percent_line: } + } +\cs_generate_variant:Nn \@@_check_angle:n { x } +\cs_new_protected:Npn \@@_check_module:n #1 + { + \exp_args:Nx \str_case:nnF { \str_head:n {#1} } + { + { * } { \@@_module_star:w } + { / } { \@@_module_slash:w } + { @ } { \@@_module_at:w } + { < } { \@@_module_verb:w } + } + { \@@_module_pm:w } + #1 \q_stop + } +\cs_generate_variant:Nn \@@_check_module:n { x } +\group_begin: + \char_set_catcode_active:N \> + \cs_new_protected:Npn \@@_module_star:w #1 > #2 \q_stop + { + \@@_output_module:nn + { star@guard } + { \@@_module_push:n { \@@_module_angle:n {#1} } } + \int_compare:nNnF \guard@level < \c@StandardModuleDepth + { + \cs_gset_eq:NN \macro@font \AltMacroFont + \macro@font + } + \int_gincr:N \guard@level + \@@_output_line:n {#2} + } + \cs_new_protected:Npn \@@_module_slash:w #1 > #2 \q_stop + { + \@@_output_module:nn + { slash@guard } + { \@@_module_pop:n { \@@_module_angle:n {#1} } } + \int_gdecr:N \guard@level + \int_compare:nNnF \guard@level < \c@StandardModuleDepth + { + \cs_gset_eq:NN \macro@font \MacroFont + \macro@font + } + \@@_output_line:n {#2} + } + \cs_new_protected:Npn \@@_module_at:w @ @ = #1 > #2 \q_stop + { + \@@_output_module:nn + { at@guard } + { \@@_module_angle:n { @ @ = #1 } } + \tl_gset:Nn \g__codedoc_module_name_tl {#1} + \@@_output_line:n {#2} + } + \cs_new_protected:Npn \@@_module_pm:w #1 > #2 \q_stop + { + \@@_output_module:nn + { pm@guard } + { \@@_module_angle:n {#1} } + \group_begin: + \int_compare:nNnF \guard@level < \c@StandardModuleDepth + { \AltMacroFont } + \@@_output_line:n {#2} + \group_end: + } + \cs_new_protected:Npn \@@_module_verb:w #1 \q_stop + { + \cs_gset_eq:NN \@@_verbatim_process_line: \@@_process_verb_line: + \tl_gset:Nx \g_@@_verbatim_verb_stop_tl + { \c_percent_str \tl_tail:n {#1} } + \@@_output_module:nn + { star@guard } + { \@@_module_push:n { \l_@@_verbatim_line_tl } } + } +\group_end: +\cs_new_protected_nopar:Npn \@@_output_line: + { + \tex_noindent:D + \@@_replace_at_at:N \l_@@_verbatim_line_tl + \tl_use:N \l_@@_verbatim_line_tl + } +\cs_new_protected:Npn \@@_replace_at_at:N #1 + { + \tl_if_empty:NF \g__codedoc_module_name_tl + { + \exp_args:NNo \@@_replace_at_at_aux:Nn + #1 \g__codedoc_module_name_tl + } + } +\cs_new_protected:Npn \@@_replace_at_at_aux:Nn #1#2 + { + \tl_replace_all:Nnn #1 { _ @ @ } { _ _ #2 } + \tl_replace_all:Nnn #1 { @ @ } { _ _ #2 } + } +\cs_new_protected:Npn \@@_output_line:n #1 + { + \tl_set:Nn \l_@@_verbatim_line_tl {#1} + \tl_if_eq:NNTF \l_@@_verbatim_line_tl \c_@@_active_cr_tl + { \tl_use:N \l_@@_verbatim_line_tl } + { + \str_if_eq_x:nnTF + { \str_head:N \l_@@_verbatim_line_tl } + { \c_percent_str } + { \@@_output_percent_line: } + { \@@_output_line: } + } + } +\cs_new_protected:Npn \@@_output_percent_line: + { + \tex_noindent:D + \group_begin: + \color { code@gray } + \str_if_eq_x:nnTF { \f@shape } { \updefault } + { \slshape } + { \upshape } + \@@_output_line: + \group_end: + } +\cs_new_protected_nopar:Npn \@@_module_push:n + { \exp_args:Nx \@@_module_push_aux:nn { \int_use:N \c@HD@hypercount } } +\cs_new_protected:Npn \@@_module_push_aux:nn #1 + { + \seq_gpush:Nn \g_@@_module_dest_seq {#1} + \HD@savedest@add {#1} + \cs_if_exist:cTF { r@HD. #1 } + { + \hypersetup { hidelinks } + \hyperref [ HD. #1 ] + } + { \use:n } + } +\cs_new_protected_nopar:Npn \@@_module_pop:n + { + \seq_gpop:NNTF \g_@@_module_dest_seq \l_@@_tmp_tl + { + \tl_set:Nx \@currentlabel { \int_use:N \c@HD@hypercount } + \HD@savedest@add { \@currentlabel } + \Hy@MakeCurrentHref { HD. \@currentlabel } + \label { HD. \l_@@_tmp_tl } + \hypersetup { hidelinks } + \hdclindex { \l_@@_tmp_tl } { } + } + { \BOOM \use:n } + } +\seq_new:N \g_@@_module_dest_seq +\cs_new_protected:Npn \@@_output_module:nn #1#2 + { + \tex_noindent:D + \group_begin: + \color {#1} \footnotesize \normalfont \sffamily #2 + \group_end: + } +\definecolor { star@guard } { rgb } { 0 , 0 , 0.55 } +\definecolor { slash@guard } { rgb } { 0.75 , 0 , 0.25 } +\definecolor { pm@guard } { rgb } { 0.5 , 0.5 , 0 } +\definecolor { at@guard } { rgb } { 0.5 , 0 , 0.5 } +\definecolor { code@gray } { gray } { 0.5 } +\cs_new_protected:Npn \@@_module_angle:n #1 + { \textlangle #1 \textrangle } +\cs_new_protected_nopar:Npn \@@_code_line_no: + { + \int_gincr:N \c@CodelineNo + \hbox_overlap_left:n + { + \hbox_to_wd:nn + { \MacroIndent } + { + \HD@target + \tex_hss:D + \@@_code_line_no_style: + \theCodelineNo \enspace + } + \tex_kern:D \@totalleftmargin + } + } +\tl_set:Nn \theCodelineNo + { \arabic { CodelineNo } } +\cs_new_protected_nopar:Npn \@@_code_line_no_style: + { \color { code@gray } \normalfont \sffamily \tiny } +\cs_set_protected:Npn \HD@SetMacroIndent #1 + { + \group_begin: + \settowidth \MacroIndent + { + \@@_code_line_no_style: + \prg_replicate:nn { \tl_count:n {#1} } { 0 } + \enspace + } + \dim_gset_eq:NN \MacroIndent \MacroIndent + \group_end: + } \ExplSyntaxOff \AtBeginDocument{\addtocontents{toc}{\StopSpecialIndexModule}} \pdfstringdefDisableCommands{% - \let\cs\bookmarkcstn - \let\tn\bookmarkcstn - \let\meta\bookmarkmeta \let\path\meta \let\opt\@firstofone} \preto\@thehead{\cslet{MakeUppercase\space}{\@iden}} @@ -10788,19 +11200,12 @@ Copyright and Licence \def\ctexkit{\href{https://github.com/CTeX-org/ctex-kit/}{\texttt{ctex-kit}}} \def\ctexkitrev#1{% \href{https://github.com/CTeX-org/ctex-kit/commit/#1}{\texttt{ctex-kit} rev. #1}} -\patchcmd\theCodelineNo{\sffamily\tiny}{\normalfont\sffamily\tiny}{}{} \appto\GlossaryParms{% + \raggedcolumns + \let\Hy@writebookmark\HDorg@writebookmark \def\@idxitem{\par\hangindent 2em }% \def\subitem{\@idxitem\hspace*{1em}}% \def\subsubitem{\@idxitem\hspace*{2em}}} -\patchcmd\l@section{2.5em}{1.5em}{}{} -\patchcmd\l@subsection{2.5em}{1.5em}{}{} -\patchcmd\changes@{\space}{\lbrack}{}{} -\patchcmd\@wrglossary{hdpindex}{% - \ifnum\c@HD@hypercount=\z@ - hdpindex% - \else - hdclindex{\the\c@HD@hypercount}\fi}{}{} \def\glossaryname{版本历史} \GlossaryPrologue{\section{\glossaryname}} \IndexPrologue{% @@ -10816,6 +11221,9 @@ Copyright and Licence \EnableCrossrefs \CodelineIndex \RecordChanges +% \end{macrocode} +% +% \begin{macrocode} %</ctxdoc> % \end{macrocode} % @@ -10847,9 +11255,9 @@ Copyright and Licence \ifeof\inputcheck\else \read \inputcheck to \inLine \closein\inputcheck - \fi - \ifx\inLine\empty\else - \let\ctxID\inLine + \ifx\inLine\empty\else + \let\ctxID\inLine + \fi \fi \maybeMsg{^^J\ctxID^^J}% \def\inLine{\ctxCMD\ctxID}% diff --git a/Master/texmf-dist/tex/generic/ctex/ctxdocstrip.tex b/Master/texmf-dist/tex/generic/ctex/ctxdocstrip.tex index d1b45c1af6b..0f9d9050cbe 100644 --- a/Master/texmf-dist/tex/generic/ctex/ctxdocstrip.tex +++ b/Master/texmf-dist/tex/generic/ctex/ctxdocstrip.tex @@ -50,9 +50,9 @@ \ifeof\inputcheck\else \read \inputcheck to \inLine \closein\inputcheck - \fi - \ifx\inLine\empty\else - \let\ctxID\inLine + \ifx\inLine\empty\else + \let\ctxID\inLine + \fi \fi \maybeMsg{^^J\ctxID^^J}% \def\inLine{\ctxCMD\ctxID}% diff --git a/Master/texmf-dist/tex/generic/ctex/zhadobefonts.tex b/Master/texmf-dist/tex/generic/ctex/zhadobefonts.tex index 0b37e4611c4..d9565384f0a 100644 --- a/Master/texmf-dist/tex/generic/ctex/zhadobefonts.tex +++ b/Master/texmf-dist/tex/generic/ctex/zhadobefonts.tex @@ -76,7 +76,7 @@ \fi \endgroup \ProvidesFile{zhadobefonts.tex}% - [2016/05/16 v2.4.2 Adobe font map loader for DVIPDFMx (CTEX)] + [2016/08/27 v2.4.3 Adobe font map loader for DVIPDFMx (CTEX)] \ifzhmappdf %% pdfTeX does not support OTF fonts diff --git a/Master/texmf-dist/tex/generic/ctex/zhfandolfonts.tex b/Master/texmf-dist/tex/generic/ctex/zhfandolfonts.tex index 0ed1ebbd1e0..73326ce4437 100644 --- a/Master/texmf-dist/tex/generic/ctex/zhfandolfonts.tex +++ b/Master/texmf-dist/tex/generic/ctex/zhfandolfonts.tex @@ -76,7 +76,7 @@ \fi \endgroup \ProvidesFile{zhfandolfonts.tex}% - [2016/05/16 v2.4.2 Fandol font map loader for DVIPDFMx (CTEX)] + [2016/08/27 v2.4.3 Fandol font map loader for DVIPDFMx (CTEX)] \ifzhmappdf %% pdfTeX does not support OTF fonts diff --git a/Master/texmf-dist/tex/generic/ctex/zhfounderfonts.tex b/Master/texmf-dist/tex/generic/ctex/zhfounderfonts.tex index d0834044449..3f115dd2f2e 100644 --- a/Master/texmf-dist/tex/generic/ctex/zhfounderfonts.tex +++ b/Master/texmf-dist/tex/generic/ctex/zhfounderfonts.tex @@ -76,7 +76,7 @@ \fi \endgroup \ProvidesFile{zhfounderfonts.tex}% - [2016/05/16 v2.4.2 Founder font map loader for pdfTeX and DVIPDFMx (CTEX)] + [2016/08/27 v2.4.3 Founder font map loader for pdfTeX and DVIPDFMx (CTEX)] \ifzhmappdf \pdfmapline{=gbk@UGBK@ <FZSSK.TTF} diff --git a/Master/texmf-dist/tex/generic/ctex/zhubuntufonts.tex b/Master/texmf-dist/tex/generic/ctex/zhubuntufonts.tex index a2dda8b0887..156706f9f79 100644 --- a/Master/texmf-dist/tex/generic/ctex/zhubuntufonts.tex +++ b/Master/texmf-dist/tex/generic/ctex/zhubuntufonts.tex @@ -76,7 +76,7 @@ \fi \endgroup \ProvidesFile{zhubuntufonts.tex}% - [2016/05/16 v2.4.2 Ubuntu font map loader for pdfTeX and DVIPDFMx (CTEX)] + [2016/08/27 v2.4.3 Ubuntu font map loader for pdfTeX and DVIPDFMx (CTEX)] \ifzhmappdf \pdfmapline{=gbk@UGBK@ <uming.ttc} diff --git a/Master/texmf-dist/tex/generic/ctex/zhwindowsfonts.tex b/Master/texmf-dist/tex/generic/ctex/zhwindowsfonts.tex index 257492fe64a..40a10931886 100644 --- a/Master/texmf-dist/tex/generic/ctex/zhwindowsfonts.tex +++ b/Master/texmf-dist/tex/generic/ctex/zhwindowsfonts.tex @@ -76,7 +76,7 @@ \fi \endgroup \ProvidesFile{zhwindowsfonts.tex}% - [2016/05/16 v2.4.2 Windows font map loader for pdfTeX and DVIPDFMx (CTEX)] + [2016/08/27 v2.4.3 Windows font map loader for pdfTeX and DVIPDFMx (CTEX)] \ifzhmappdf \pdfmapline{=gbk@UGBK@ <simsun.ttc} diff --git a/Master/texmf-dist/tex/latex/ctex/config/ctex-name-gbk.cfg b/Master/texmf-dist/tex/latex/ctex/config/ctex-name-gbk.cfg index b905045da3f..1d631300a0e 100644 --- a/Master/texmf-dist/tex/latex/ctex/config/ctex-name-gbk.cfg +++ b/Master/texmf-dist/tex/latex/ctex/config/ctex-name-gbk.cfg @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Caption with encoding GBK (CTEX)} \ProvidesExplFile{ctex-name-gbk.cfg} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \keys_set_known:nn { ctex } { contentsname = Ŀ¼ , diff --git a/Master/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg b/Master/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg index 17bd0295cef..b226723624a 100644 --- a/Master/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg +++ b/Master/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Caption with encoding UTF8 (CTEX)} \ProvidesExplFile{ctex-name-utf8.cfg} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \keys_set_known:nn { ctex } { contentsname = 目录 , diff --git a/Master/texmf-dist/tex/latex/ctex/config/ctex.cfg b/Master/texmf-dist/tex/latex/ctex/config/ctex.cfg index a48af9b5872..5e99dd3dd45 100644 --- a/Master/texmf-dist/tex/latex/ctex/config/ctex.cfg +++ b/Master/texmf-dist/tex/latex/ctex/config/ctex.cfg @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Configuration file (CTEX)} \ProvidesExplFile{\ExplFileName.cfg} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} %% %% %% diff --git a/Master/texmf-dist/tex/latex/ctex/config/ctexopts.cfg b/Master/texmf-dist/tex/latex/ctex/config/ctexopts.cfg index fc476553dd8..2f5774ade62 100644 --- a/Master/texmf-dist/tex/latex/ctex/config/ctexopts.cfg +++ b/Master/texmf-dist/tex/latex/ctex/config/ctexopts.cfg @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Option configuration file (CTEX)} \ProvidesExplFile{ctexopts.cfg} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} %% %% \keys_set:nn { ctex / option } { fontset = windowsnew } %% diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-article.def b/Master/texmf-dist/tex/latex/ctex/ctex-article.def index 7aef095380d..f4105d38f73 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctex-article.def +++ b/Master/texmf-dist/tex/latex/ctex/ctex-article.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Heading modification for article (CTEX)} \ProvidesExplFile{ctex-article.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \seq_new:N \c__ctex_section_headings_seq \seq_gset_from_clist:Nn \c__ctex_section_headings_seq { section , subsection , subsubsection , paragraph , subparagraph } @@ -85,6 +85,7 @@ #1 / indent .tl_set:N = \exp_not:c { CTEX@#1@indent } , #1 / numbering .bool_set:N = \exp_not:c { CTEX@#1@numbering } , #1 / afterindent .bool_set:N = \exp_not:c { CTEX@#1@afterindent } , + #1 / fixskip .bool_set:N = \exp_not:c { CTEX@#1@fixskip } , #1 / runin .bool_set:N = \exp_not:c { CTEX@#1@runin } , #1 / format+ .code:n = { \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } , @@ -132,10 +133,22 @@ \cs_new_protected_nopar:Npn \CTEX@makeheadinganchor { } \ctex_at_end_package:nn { hyperref } { \cs_gset_protected_nopar:Npn \CTEX@makeheadinganchor { \phantomsection } } +\cs_new_protected_nopar:Npn \CTEX@fixheadingskip + { + \par + \dim_set:Nn \tex_prevdepth:D { -1000pt } + \skip_sub:Nn \l__ctex_heading_skip { \tex_parskip:D } + } +\skip_new:N \l__ctex_heading_skip +\cs_new_protected_nopar:Npn \CTEX@setheadingskip + { \skip_set:Nn \l__ctex_heading_skip } +\cs_new_eq:NN \CTEX@headingskip \l__ctex_heading_skip \renewcommand\part{% \if@noskipsec \leavevmode \fi \par - \addvspace{\glueexpr\CTEX@part@beforeskip\relax}% + \CTEX@setheadingskip \CTEX@part@beforeskip + \ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi + \addvspace \CTEX@headingskip \ifodd \CTEX@part@afterindent \@afterindenttrue \else @@ -163,7 +176,9 @@ \markboth{}{}% \CTEX@part@aftertitle}% \nobreak - \vskip \glueexpr \CTEX@part@afterskip \relax + \CTEX@setheadingskip \CTEX@part@afterskip + \ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \@afterheading} \def\@spart#1{% {\interlinepenalty \@M @@ -172,7 +187,9 @@ \CTEX@part@titleformat{#1}% \CTEX@part@aftertitle}% \nobreak - \vskip \glueexpr \CTEX@part@afterskip \relax + \CTEX@setheadingskip \CTEX@part@afterskip + \ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \@afterheading} \def\@startsection#1#2#3#4#5#6{% \if@noskipsec \leavevmode \fi @@ -186,7 +203,10 @@ \if@nobreak \everypar{}% \else - \addpenalty\@secpenalty\addvspace{\glueexpr #4\relax}% + \addpenalty\@secpenalty + \CTEX@setheadingskip{#4}% + \ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi + \addvspace \CTEX@headingskip \fi \@ifstar {\@ssect{#3}{#4}{#5}{#6}}% @@ -254,7 +274,9 @@ \def\@xsect#1{% \unless \ifodd \CTEX@runin \par \nobreak - \vskip\glueexpr #1\relax + \CTEX@setheadingskip{#1}% + \ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \@afterheading \else \@nobreakfalse @@ -278,11 +300,13 @@ \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat } \cs_set_eq:Nc \CTEX@aftertitle { CTEX@#1@aftertitle } \cs_set_eq:Nc \CTEX@afterindent { CTEX@#1@afterindent } + \cs_set_eq:Nc \CTEX@fixskip { CTEX@#1@fixskip } \cs_set_eq:Nc \CTEX@runin { CTEX@#1@runin } } \cs_new_eq:NN \CTEX@titleformat@n \use:n \cs_new_eq:NN \CTEX@aftertitle \prg_do_nothing: \cs_new_eq:NN \CTEX@afterindent \c_true_bool +\cs_new_eq:NN \CTEX@fixskip \c_false_bool \cs_new_eq:NN \CTEX@runin \c_false_bool \int_zero:N \l__ctex_tmp_int \seq_map_inline:Nn \c__ctex_section_headings_seq diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-beamer.def b/Master/texmf-dist/tex/latex/ctex/ctex-beamer.def index c805de815bf..eb9639ff63d 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctex-beamer.def +++ b/Master/texmf-dist/tex/latex/ctex/ctex-beamer.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Heading modification for beamer (CTEX)} \ProvidesExplFile{ctex-beamer.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \seq_new:N \c__ctex_headings_seq \seq_gset_from_clist:Nn \c__ctex_headings_seq { part , section , subsection } diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-book.def b/Master/texmf-dist/tex/latex/ctex/ctex-book.def index a5c09a01673..7a2400e2e55 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctex-book.def +++ b/Master/texmf-dist/tex/latex/ctex/ctex-book.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Heading modification for book (CTEX)} \ProvidesExplFile{ctex-book.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \seq_new:N \c__ctex_section_headings_seq \seq_gset_from_clist:Nn \c__ctex_section_headings_seq { section , subsection , subsubsection , paragraph , subparagraph } @@ -86,6 +86,7 @@ #1 / indent .tl_set:N = \exp_not:c { CTEX@#1@indent } , #1 / numbering .bool_set:N = \exp_not:c { CTEX@#1@numbering } , #1 / afterindent .bool_set:N = \exp_not:c { CTEX@#1@afterindent } , + #1 / fixskip .bool_set:N = \exp_not:c { CTEX@#1@fixskip } , #1 / runin .bool_set:N = \exp_not:c { CTEX@#1@runin } , #1 / format+ .code:n = { \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } , @@ -121,10 +122,8 @@ \group_begin: \tl_set:Nn \l__ctex_tmp_tl { - part / pagestyle .tl_set:N = \CTEX@part@pagestyle , - chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , - part / fixbeforeskip .bool_set:N = \CTEX@part@fixbeforeskip , - chapter / fixbeforeskip .bool_set:N = \CTEX@chapter@fixbeforeskip , + part / pagestyle .tl_set:N = \CTEX@part@pagestyle , + chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , } \seq_map_inline:Nn \c__ctex_headings_seq { @@ -139,15 +138,22 @@ \cs_new_protected_nopar:Npn \CTEX@makeheadinganchor { } \ctex_at_end_package:nn { hyperref } { \cs_gset_protected_nopar:Npn \CTEX@makeheadinganchor { \phantomsection } } -\cs_new_protected_nopar:Npn \CTEX@fixbeforeskip +\cs_new_protected_nopar:Npn \CTEX@fixtopskip + { + \CTEX@fixheadingskip + \dim_compare:nNnF \tex_pagegoal:D < \c_max_dim + { \skip_sub:Nn \l__ctex_heading_skip { \tex_topskip:D } } + } +\cs_new_protected_nopar:Npn \CTEX@fixheadingskip { \par - \ifdim \pagegoal = \maxdimen - \advance \@tempskipa -\topskip - \advance \@tempskipa -\parskip - \nointerlineskip - \fi + \dim_set:Nn \tex_prevdepth:D { -1000pt } + \skip_sub:Nn \l__ctex_heading_skip { \tex_parskip:D } } +\skip_new:N \l__ctex_heading_skip +\cs_new_protected_nopar:Npn \CTEX@setheadingskip + { \skip_set:Nn \l__ctex_heading_skip } +\cs_new_eq:NN \CTEX@headingskip \l__ctex_heading_skip \renewcommand\part{% \if@openright \cleardoublepage @@ -161,11 +167,9 @@ \else \@tempswafalse \fi - \@tempskipa = \glueexpr \CTEX@part@beforeskip \relax - \ifodd \CTEX@part@fixbeforeskip - \CTEX@fixbeforeskip - \fi - \vspace*{\@tempskipa}% + \CTEX@setheadingskip \CTEX@part@beforeskip + \ifodd \CTEX@part@fixskip \CTEX@fixtopskip \fi + \vspace*{\CTEX@headingskip}% \secdef\@part\@spart} \def\@part[#1]#2{% \ifnum \c@secnumdepth >-2\relax @@ -195,7 +199,9 @@ \CTEX@part@aftertitle}% \@endpart} \def\@endpart{% - \vskip \glueexpr \CTEX@part@afterskip \relax + \CTEX@setheadingskip \CTEX@part@afterskip + \ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \newpage \if@twoside \if@openright @@ -244,11 +250,9 @@ \@afterheading \fi} \def\@makechapterhead#1{% - \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax - \ifodd \CTEX@chapter@fixbeforeskip - \CTEX@fixbeforeskip - \fi - \vspace*{\@tempskipa}% + \CTEX@setheadingskip \CTEX@chapter@beforeskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixtopskip \fi + \vspace*{\CTEX@headingskip}% {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format \ifnum \c@secnumdepth >\m@ne @@ -262,21 +266,23 @@ \CTEX@chapter@titleformat{#1}% \CTEX@chapter@aftertitle \nobreak - \vskip \glueexpr \CTEX@chapter@afterskip \relax + \CTEX@setheadingskip \CTEX@chapter@afterskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip }} \def\@makeschapterhead#1{% - \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax - \ifodd \CTEX@chapter@fixbeforeskip - \CTEX@fixbeforeskip - \fi - \vspace*{\@tempskipa}% + \CTEX@setheadingskip \CTEX@chapter@beforeskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixtopskip \fi + \vspace*{\CTEX@headingskip}% {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format \interlinepenalty\@M \CTEX@chapter@titleformat{#1} \CTEX@chapter@aftertitle \nobreak - \vskip \glueexpr \CTEX@chapter@afterskip \relax + \CTEX@setheadingskip \CTEX@chapter@afterskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip }} \def\@startsection#1#2#3#4#5#6{% \if@noskipsec \leavevmode \fi @@ -290,7 +296,10 @@ \if@nobreak \everypar{}% \else - \addpenalty\@secpenalty\addvspace{\glueexpr #4\relax}% + \addpenalty\@secpenalty + \CTEX@setheadingskip{#4}% + \ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi + \addvspace \CTEX@headingskip \fi \@ifstar {\@ssect{#3}{#4}{#5}{#6}}% @@ -358,7 +367,9 @@ \def\@xsect#1{% \unless \ifodd \CTEX@runin \par \nobreak - \vskip\glueexpr #1\relax + \CTEX@setheadingskip{#1}% + \ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \@afterheading \else \@nobreakfalse @@ -382,11 +393,13 @@ \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat } \cs_set_eq:Nc \CTEX@aftertitle { CTEX@#1@aftertitle } \cs_set_eq:Nc \CTEX@afterindent { CTEX@#1@afterindent } + \cs_set_eq:Nc \CTEX@fixskip { CTEX@#1@fixskip } \cs_set_eq:Nc \CTEX@runin { CTEX@#1@runin } } \cs_new_eq:NN \CTEX@titleformat@n \use:n \cs_new_eq:NN \CTEX@aftertitle \prg_do_nothing: \cs_new_eq:NN \CTEX@afterindent \c_true_bool +\cs_new_eq:NN \CTEX@fixskip \c_false_bool \cs_new_eq:NN \CTEX@runin \c_false_bool \int_zero:N \l__ctex_tmp_int \seq_map_inline:Nn \c__ctex_section_headings_seq diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo b/Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo index 22823c08ecb..ed5b743e8a7 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo +++ b/Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {c5size option (CTEX)} \ProvidesExplFile{ctex-c5size.clo} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \ctex_set_font_size:Nnn \normalsize { 5 } { \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-cs4size.clo b/Master/texmf-dist/tex/latex/ctex/ctex-cs4size.clo index 49db1360794..0641cf8e0cf 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctex-cs4size.clo +++ b/Master/texmf-dist/tex/latex/ctex/ctex-cs4size.clo @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {cs4size option (CTEX)} \ProvidesExplFile{ctex-cs4size.clo} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \ctex_set_font_size:Nnn \normalsize { -4 } { \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@ diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-report.def b/Master/texmf-dist/tex/latex/ctex/ctex-report.def index 283604134ac..a79de680ad3 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctex-report.def +++ b/Master/texmf-dist/tex/latex/ctex/ctex-report.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Heading modification for report (CTEX)} \ProvidesExplFile{ctex-report.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \seq_new:N \c__ctex_section_headings_seq \seq_gset_from_clist:Nn \c__ctex_section_headings_seq { section , subsection , subsubsection , paragraph , subparagraph } @@ -86,6 +86,7 @@ #1 / indent .tl_set:N = \exp_not:c { CTEX@#1@indent } , #1 / numbering .bool_set:N = \exp_not:c { CTEX@#1@numbering } , #1 / afterindent .bool_set:N = \exp_not:c { CTEX@#1@afterindent } , + #1 / fixskip .bool_set:N = \exp_not:c { CTEX@#1@fixskip } , #1 / runin .bool_set:N = \exp_not:c { CTEX@#1@runin } , #1 / format+ .code:n = { \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } , @@ -121,10 +122,8 @@ \group_begin: \tl_set:Nn \l__ctex_tmp_tl { - part / pagestyle .tl_set:N = \CTEX@part@pagestyle , - chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , - part / fixbeforeskip .bool_set:N = \CTEX@part@fixbeforeskip , - chapter / fixbeforeskip .bool_set:N = \CTEX@chapter@fixbeforeskip , + part / pagestyle .tl_set:N = \CTEX@part@pagestyle , + chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , } \seq_map_inline:Nn \c__ctex_headings_seq { @@ -139,15 +138,22 @@ \cs_new_protected_nopar:Npn \CTEX@makeheadinganchor { } \ctex_at_end_package:nn { hyperref } { \cs_gset_protected_nopar:Npn \CTEX@makeheadinganchor { \phantomsection } } -\cs_new_protected_nopar:Npn \CTEX@fixbeforeskip +\cs_new_protected_nopar:Npn \CTEX@fixtopskip + { + \CTEX@fixheadingskip + \dim_compare:nNnF \tex_pagegoal:D < \c_max_dim + { \skip_sub:Nn \l__ctex_heading_skip { \tex_topskip:D } } + } +\cs_new_protected_nopar:Npn \CTEX@fixheadingskip { \par - \ifdim \pagegoal = \maxdimen - \advance \@tempskipa -\topskip - \advance \@tempskipa -\parskip - \nointerlineskip - \fi + \dim_set:Nn \tex_prevdepth:D { -1000pt } + \skip_sub:Nn \l__ctex_heading_skip { \tex_parskip:D } } +\skip_new:N \l__ctex_heading_skip +\cs_new_protected_nopar:Npn \CTEX@setheadingskip + { \skip_set:Nn \l__ctex_heading_skip } +\cs_new_eq:NN \CTEX@headingskip \l__ctex_heading_skip \renewcommand\part{% \if@openright \cleardoublepage @@ -161,11 +167,9 @@ \else \@tempswafalse \fi - \@tempskipa = \glueexpr \CTEX@part@beforeskip \relax - \ifodd \CTEX@part@fixbeforeskip - \CTEX@fixbeforeskip - \fi - \vspace*{\@tempskipa}% + \CTEX@setheadingskip \CTEX@part@beforeskip + \ifodd \CTEX@part@fixskip \CTEX@fixtopskip \fi + \vspace*{\CTEX@headingskip}% \secdef\@part\@spart} \def\@part[#1]#2{% \ifnum \c@secnumdepth >-2\relax @@ -195,7 +199,9 @@ \CTEX@part@aftertitle}% \@endpart} \def\@endpart{% - \vskip \glueexpr \CTEX@part@afterskip \relax + \CTEX@setheadingskip \CTEX@part@afterskip + \ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \newpage \if@twoside \if@openright @@ -240,11 +246,9 @@ \@afterheading \fi} \def\@makechapterhead#1{% - \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax - \ifodd \CTEX@chapter@fixbeforeskip - \CTEX@fixbeforeskip - \fi - \vspace*{\@tempskipa}% + \CTEX@setheadingskip \CTEX@chapter@beforeskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixtopskip \fi + \vspace*{\CTEX@headingskip}% {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format \ifnum \c@secnumdepth >\m@ne @@ -256,21 +260,23 @@ \CTEX@chapter@titleformat{#1}% \CTEX@chapter@aftertitle \nobreak - \vskip \glueexpr \CTEX@chapter@afterskip \relax + \CTEX@setheadingskip \CTEX@chapter@afterskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip }} \def\@makeschapterhead#1{% - \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax - \ifodd \CTEX@chapter@fixbeforeskip - \CTEX@fixbeforeskip - \fi - \vspace*{\@tempskipa}% + \CTEX@setheadingskip \CTEX@chapter@beforeskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixtopskip \fi + \vspace*{\CTEX@headingskip}% {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format \interlinepenalty\@M \CTEX@chapter@titleformat{#1} \CTEX@chapter@aftertitle \nobreak - \vskip \glueexpr \CTEX@chapter@afterskip \relax + \CTEX@setheadingskip \CTEX@chapter@afterskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip }} \def\@startsection#1#2#3#4#5#6{% \if@noskipsec \leavevmode \fi @@ -284,7 +290,10 @@ \if@nobreak \everypar{}% \else - \addpenalty\@secpenalty\addvspace{\glueexpr #4\relax}% + \addpenalty\@secpenalty + \CTEX@setheadingskip{#4}% + \ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi + \addvspace \CTEX@headingskip \fi \@ifstar {\@ssect{#3}{#4}{#5}{#6}}% @@ -352,7 +361,9 @@ \def\@xsect#1{% \unless \ifodd \CTEX@runin \par \nobreak - \vskip\glueexpr #1\relax + \CTEX@setheadingskip{#1}% + \ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \@afterheading \else \@nobreakfalse @@ -376,11 +387,13 @@ \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat } \cs_set_eq:Nc \CTEX@aftertitle { CTEX@#1@aftertitle } \cs_set_eq:Nc \CTEX@afterindent { CTEX@#1@afterindent } + \cs_set_eq:Nc \CTEX@fixskip { CTEX@#1@fixskip } \cs_set_eq:Nc \CTEX@runin { CTEX@#1@runin } } \cs_new_eq:NN \CTEX@titleformat@n \use:n \cs_new_eq:NN \CTEX@aftertitle \prg_do_nothing: \cs_new_eq:NN \CTEX@afterindent \c_true_bool +\cs_new_eq:NN \CTEX@fixskip \c_false_bool \cs_new_eq:NN \CTEX@runin \c_false_bool \int_zero:N \l__ctex_tmp_int \seq_map_inline:Nn \c__ctex_section_headings_seq diff --git a/Master/texmf-dist/tex/latex/ctex/ctex.sty b/Master/texmf-dist/tex/latex/ctex/ctex.sty index c8755f7250b..502dd3874fd 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctex.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctex.sty @@ -28,10 +28,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese adapter in LaTeX (CTEX)} \ProvidesExplPackage{\ExplFileName} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \tl_const:Nx \c__ctex_version_tl { \cs_if_exist_use:cF { ver@ \@currname . \@currext } { 9999/99/99 } } \msg_new:nnnn { ctex } { subpackage-loaded } @@ -564,6 +564,11 @@ \msg_new:nnnn { ctex } { today-undef } { Today~format~`#1'~is~undefined. } { Available~today~formats~are~`old',~`small',~and~`big'. } +\tl_if_exist:NF \proofname + { + \tl_new:N \proofname + \tl_set:Nn \proofname { Proof } + } \keys_define:nn { ctex } { contentsname .tl_set:N = \contentsname , diff --git a/Master/texmf-dist/tex/latex/ctex/ctexart.cls b/Master/texmf-dist/tex/latex/ctex/ctexart.cls index 853d0e50cdb..3daee3bd597 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexart.cls +++ b/Master/texmf-dist/tex/latex/ctex/ctexart.cls @@ -28,10 +28,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese adapter for class article (CTEX)} \ProvidesExplClass{ctexart} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \tl_const:Nx \c__ctex_version_tl { \cs_if_exist_use:cF { ver@ \@currname . \@currext } { 9999/99/99 } } \cs_new_eq:cN { ver@ctex. \@pkgextension } \c__ctex_version_tl @@ -575,6 +575,11 @@ \msg_new:nnnn { ctex } { today-undef } { Today~format~`#1'~is~undefined. } { Available~today~formats~are~`old',~`small',~and~`big'. } +\tl_if_exist:NF \proofname + { + \tl_new:N \proofname + \tl_set:Nn \proofname { Proof } + } \keys_define:nn { ctex } { contentsname .tl_set:N = \contentsname , @@ -643,6 +648,7 @@ #1 / indent .tl_set:N = \exp_not:c { CTEX@#1@indent } , #1 / numbering .bool_set:N = \exp_not:c { CTEX@#1@numbering } , #1 / afterindent .bool_set:N = \exp_not:c { CTEX@#1@afterindent } , + #1 / fixskip .bool_set:N = \exp_not:c { CTEX@#1@fixskip } , #1 / runin .bool_set:N = \exp_not:c { CTEX@#1@runin } , #1 / format+ .code:n = { \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } , @@ -690,10 +696,22 @@ \cs_new_protected_nopar:Npn \CTEX@makeheadinganchor { } \ctex_at_end_package:nn { hyperref } { \cs_gset_protected_nopar:Npn \CTEX@makeheadinganchor { \phantomsection } } +\cs_new_protected_nopar:Npn \CTEX@fixheadingskip + { + \par + \dim_set:Nn \tex_prevdepth:D { -1000pt } + \skip_sub:Nn \l__ctex_heading_skip { \tex_parskip:D } + } +\skip_new:N \l__ctex_heading_skip +\cs_new_protected_nopar:Npn \CTEX@setheadingskip + { \skip_set:Nn \l__ctex_heading_skip } +\cs_new_eq:NN \CTEX@headingskip \l__ctex_heading_skip \renewcommand\part{% \if@noskipsec \leavevmode \fi \par - \addvspace{\glueexpr\CTEX@part@beforeskip\relax}% + \CTEX@setheadingskip \CTEX@part@beforeskip + \ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi + \addvspace \CTEX@headingskip \ifodd \CTEX@part@afterindent \@afterindenttrue \else @@ -721,7 +739,9 @@ \markboth{}{}% \CTEX@part@aftertitle}% \nobreak - \vskip \glueexpr \CTEX@part@afterskip \relax + \CTEX@setheadingskip \CTEX@part@afterskip + \ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \@afterheading} \def\@spart#1{% {\interlinepenalty \@M @@ -730,7 +750,9 @@ \CTEX@part@titleformat{#1}% \CTEX@part@aftertitle}% \nobreak - \vskip \glueexpr \CTEX@part@afterskip \relax + \CTEX@setheadingskip \CTEX@part@afterskip + \ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \@afterheading} \def\@startsection#1#2#3#4#5#6{% \if@noskipsec \leavevmode \fi @@ -744,7 +766,10 @@ \if@nobreak \everypar{}% \else - \addpenalty\@secpenalty\addvspace{\glueexpr #4\relax}% + \addpenalty\@secpenalty + \CTEX@setheadingskip{#4}% + \ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi + \addvspace \CTEX@headingskip \fi \@ifstar {\@ssect{#3}{#4}{#5}{#6}}% @@ -812,7 +837,9 @@ \def\@xsect#1{% \unless \ifodd \CTEX@runin \par \nobreak - \vskip\glueexpr #1\relax + \CTEX@setheadingskip{#1}% + \ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \@afterheading \else \@nobreakfalse @@ -836,11 +863,13 @@ \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat } \cs_set_eq:Nc \CTEX@aftertitle { CTEX@#1@aftertitle } \cs_set_eq:Nc \CTEX@afterindent { CTEX@#1@afterindent } + \cs_set_eq:Nc \CTEX@fixskip { CTEX@#1@fixskip } \cs_set_eq:Nc \CTEX@runin { CTEX@#1@runin } } \cs_new_eq:NN \CTEX@titleformat@n \use:n \cs_new_eq:NN \CTEX@aftertitle \prg_do_nothing: \cs_new_eq:NN \CTEX@afterindent \c_true_bool +\cs_new_eq:NN \CTEX@fixskip \c_false_bool \cs_new_eq:NN \CTEX@runin \c_false_bool \int_zero:N \l__ctex_tmp_int \seq_map_inline:Nn \c__ctex_section_headings_seq diff --git a/Master/texmf-dist/tex/latex/ctex/ctexbeamer.cls b/Master/texmf-dist/tex/latex/ctex/ctexbeamer.cls index 2529092ac82..47b65aff430 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexbeamer.cls +++ b/Master/texmf-dist/tex/latex/ctex/ctexbeamer.cls @@ -28,10 +28,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese adapter for class beamer (CTEX)} \ProvidesExplClass{ctexbeamer} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \tl_const:Nx \c__ctex_version_tl { \cs_if_exist_use:cF { ver@ \@currname . \@currext } { 9999/99/99 } } \cs_new_eq:cN { ver@ctex. \@pkgextension } \c__ctex_version_tl @@ -568,6 +568,11 @@ \msg_new:nnnn { ctex } { today-undef } { Today~format~`#1'~is~undefined. } { Available~today~formats~are~`old',~`small',~and~`big'. } +\tl_if_exist:NF \proofname + { + \tl_new:N \proofname + \tl_set:Nn \proofname { Proof } + } \keys_define:nn { ctex } { contentsname .tl_set:N = \contentsname , diff --git a/Master/texmf-dist/tex/latex/ctex/ctexbook.cls b/Master/texmf-dist/tex/latex/ctex/ctexbook.cls index 631b5a7200a..eca90d96246 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexbook.cls +++ b/Master/texmf-dist/tex/latex/ctex/ctexbook.cls @@ -28,10 +28,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese adapter for class book (CTEX)} \ProvidesExplClass{ctexbook} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \tl_const:Nx \c__ctex_version_tl { \cs_if_exist_use:cF { ver@ \@currname . \@currext } { 9999/99/99 } } \cs_new_eq:cN { ver@ctex. \@pkgextension } \c__ctex_version_tl @@ -575,6 +575,11 @@ \msg_new:nnnn { ctex } { today-undef } { Today~format~`#1'~is~undefined. } { Available~today~formats~are~`old',~`small',~and~`big'. } +\tl_if_exist:NF \proofname + { + \tl_new:N \proofname + \tl_set:Nn \proofname { Proof } + } \keys_define:nn { ctex } { contentsname .tl_set:N = \contentsname , @@ -644,6 +649,7 @@ #1 / indent .tl_set:N = \exp_not:c { CTEX@#1@indent } , #1 / numbering .bool_set:N = \exp_not:c { CTEX@#1@numbering } , #1 / afterindent .bool_set:N = \exp_not:c { CTEX@#1@afterindent } , + #1 / fixskip .bool_set:N = \exp_not:c { CTEX@#1@fixskip } , #1 / runin .bool_set:N = \exp_not:c { CTEX@#1@runin } , #1 / format+ .code:n = { \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } , @@ -679,10 +685,8 @@ \group_begin: \tl_set:Nn \l__ctex_tmp_tl { - part / pagestyle .tl_set:N = \CTEX@part@pagestyle , - chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , - part / fixbeforeskip .bool_set:N = \CTEX@part@fixbeforeskip , - chapter / fixbeforeskip .bool_set:N = \CTEX@chapter@fixbeforeskip , + part / pagestyle .tl_set:N = \CTEX@part@pagestyle , + chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , } \seq_map_inline:Nn \c__ctex_headings_seq { @@ -697,15 +701,22 @@ \cs_new_protected_nopar:Npn \CTEX@makeheadinganchor { } \ctex_at_end_package:nn { hyperref } { \cs_gset_protected_nopar:Npn \CTEX@makeheadinganchor { \phantomsection } } -\cs_new_protected_nopar:Npn \CTEX@fixbeforeskip +\cs_new_protected_nopar:Npn \CTEX@fixtopskip + { + \CTEX@fixheadingskip + \dim_compare:nNnF \tex_pagegoal:D < \c_max_dim + { \skip_sub:Nn \l__ctex_heading_skip { \tex_topskip:D } } + } +\cs_new_protected_nopar:Npn \CTEX@fixheadingskip { \par - \ifdim \pagegoal = \maxdimen - \advance \@tempskipa -\topskip - \advance \@tempskipa -\parskip - \nointerlineskip - \fi + \dim_set:Nn \tex_prevdepth:D { -1000pt } + \skip_sub:Nn \l__ctex_heading_skip { \tex_parskip:D } } +\skip_new:N \l__ctex_heading_skip +\cs_new_protected_nopar:Npn \CTEX@setheadingskip + { \skip_set:Nn \l__ctex_heading_skip } +\cs_new_eq:NN \CTEX@headingskip \l__ctex_heading_skip \renewcommand\part{% \if@openright \cleardoublepage @@ -719,11 +730,9 @@ \else \@tempswafalse \fi - \@tempskipa = \glueexpr \CTEX@part@beforeskip \relax - \ifodd \CTEX@part@fixbeforeskip - \CTEX@fixbeforeskip - \fi - \vspace*{\@tempskipa}% + \CTEX@setheadingskip \CTEX@part@beforeskip + \ifodd \CTEX@part@fixskip \CTEX@fixtopskip \fi + \vspace*{\CTEX@headingskip}% \secdef\@part\@spart} \def\@part[#1]#2{% \ifnum \c@secnumdepth >-2\relax @@ -753,7 +762,9 @@ \CTEX@part@aftertitle}% \@endpart} \def\@endpart{% - \vskip \glueexpr \CTEX@part@afterskip \relax + \CTEX@setheadingskip \CTEX@part@afterskip + \ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \newpage \if@twoside \if@openright @@ -802,11 +813,9 @@ \@afterheading \fi} \def\@makechapterhead#1{% - \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax - \ifodd \CTEX@chapter@fixbeforeskip - \CTEX@fixbeforeskip - \fi - \vspace*{\@tempskipa}% + \CTEX@setheadingskip \CTEX@chapter@beforeskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixtopskip \fi + \vspace*{\CTEX@headingskip}% {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format \ifnum \c@secnumdepth >\m@ne @@ -820,21 +829,23 @@ \CTEX@chapter@titleformat{#1}% \CTEX@chapter@aftertitle \nobreak - \vskip \glueexpr \CTEX@chapter@afterskip \relax + \CTEX@setheadingskip \CTEX@chapter@afterskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip }} \def\@makeschapterhead#1{% - \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax - \ifodd \CTEX@chapter@fixbeforeskip - \CTEX@fixbeforeskip - \fi - \vspace*{\@tempskipa}% + \CTEX@setheadingskip \CTEX@chapter@beforeskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixtopskip \fi + \vspace*{\CTEX@headingskip}% {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format \interlinepenalty\@M \CTEX@chapter@titleformat{#1} \CTEX@chapter@aftertitle \nobreak - \vskip \glueexpr \CTEX@chapter@afterskip \relax + \CTEX@setheadingskip \CTEX@chapter@afterskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip }} \def\@startsection#1#2#3#4#5#6{% \if@noskipsec \leavevmode \fi @@ -848,7 +859,10 @@ \if@nobreak \everypar{}% \else - \addpenalty\@secpenalty\addvspace{\glueexpr #4\relax}% + \addpenalty\@secpenalty + \CTEX@setheadingskip{#4}% + \ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi + \addvspace \CTEX@headingskip \fi \@ifstar {\@ssect{#3}{#4}{#5}{#6}}% @@ -916,7 +930,9 @@ \def\@xsect#1{% \unless \ifodd \CTEX@runin \par \nobreak - \vskip\glueexpr #1\relax + \CTEX@setheadingskip{#1}% + \ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \@afterheading \else \@nobreakfalse @@ -940,11 +956,13 @@ \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat } \cs_set_eq:Nc \CTEX@aftertitle { CTEX@#1@aftertitle } \cs_set_eq:Nc \CTEX@afterindent { CTEX@#1@afterindent } + \cs_set_eq:Nc \CTEX@fixskip { CTEX@#1@fixskip } \cs_set_eq:Nc \CTEX@runin { CTEX@#1@runin } } \cs_new_eq:NN \CTEX@titleformat@n \use:n \cs_new_eq:NN \CTEX@aftertitle \prg_do_nothing: \cs_new_eq:NN \CTEX@afterindent \c_true_bool +\cs_new_eq:NN \CTEX@fixskip \c_false_bool \cs_new_eq:NN \CTEX@runin \c_false_bool \int_zero:N \l__ctex_tmp_int \seq_map_inline:Nn \c__ctex_section_headings_seq diff --git a/Master/texmf-dist/tex/latex/ctex/ctexcap.sty b/Master/texmf-dist/tex/latex/ctex/ctexcap.sty index d73343bf510..d33c37d482e 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexcap.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctexcap.sty @@ -28,10 +28,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese adapter in LaTeX (CTEX)} \ProvidesExplPackage{ctexcap} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \clist_new:N \l__ctex_ctexcap_options_clist \clist_set:Nx \l__ctex_ctexcap_options_clist { \exp_not:v { opt@ \@currname . \@currext } , heading } diff --git a/Master/texmf-dist/tex/latex/ctex/ctexheading.sty b/Master/texmf-dist/tex/latex/ctex/ctexheading.sty index e86d5fa9a78..89e9fa4f385 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexheading.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctexheading.sty @@ -28,10 +28,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Heading style modification (CTEX)} \ProvidesExplPackage{ctexheading} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \RequirePackage { xparse , l3keys2e } \RequirePackage { ctexhook , ctexpatch } \tl_new:N \l__ctex_tmp_tl diff --git a/Master/texmf-dist/tex/latex/ctex/ctexhook.sty b/Master/texmf-dist/tex/latex/ctex/ctexhook.sty index dbe4d553d56..640dd23a389 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexhook.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctexhook.sty @@ -28,10 +28,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Document and package hooks (CTEX)} \ProvidesExplPackage{ctexhook} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \cs_new_protected:Npn \ctex_at_end_preamble:n #1 { \tl_gput_right:Nn \g__ctex_end_preamble_hook_tl {#1} } \cs_new_protected:Npn \ctex_after_end_preamble:n #1 diff --git a/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty b/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty index 66865da5093..59ee535ec64 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty @@ -28,10 +28,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Patching commands (CTEX)} \ProvidesExplPackage{ctexpatch} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \cs_if_exist:NF \str_new:N { \RequirePackage { l3str } } \cs_new_protected:Npn \ctex_patch_cmd_once:NnnnTF #1#2 { diff --git a/Master/texmf-dist/tex/latex/ctex/ctexrep.cls b/Master/texmf-dist/tex/latex/ctex/ctexrep.cls index 8d63adcb8df..7434d7e5ac2 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexrep.cls +++ b/Master/texmf-dist/tex/latex/ctex/ctexrep.cls @@ -28,10 +28,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese adapter for class report (CTEX)} \ProvidesExplClass{ctexrep} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \tl_const:Nx \c__ctex_version_tl { \cs_if_exist_use:cF { ver@ \@currname . \@currext } { 9999/99/99 } } \cs_new_eq:cN { ver@ctex. \@pkgextension } \c__ctex_version_tl @@ -575,6 +575,11 @@ \msg_new:nnnn { ctex } { today-undef } { Today~format~`#1'~is~undefined. } { Available~today~formats~are~`old',~`small',~and~`big'. } +\tl_if_exist:NF \proofname + { + \tl_new:N \proofname + \tl_set:Nn \proofname { Proof } + } \keys_define:nn { ctex } { contentsname .tl_set:N = \contentsname , @@ -644,6 +649,7 @@ #1 / indent .tl_set:N = \exp_not:c { CTEX@#1@indent } , #1 / numbering .bool_set:N = \exp_not:c { CTEX@#1@numbering } , #1 / afterindent .bool_set:N = \exp_not:c { CTEX@#1@afterindent } , + #1 / fixskip .bool_set:N = \exp_not:c { CTEX@#1@fixskip } , #1 / runin .bool_set:N = \exp_not:c { CTEX@#1@runin } , #1 / format+ .code:n = { \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } , @@ -679,10 +685,8 @@ \group_begin: \tl_set:Nn \l__ctex_tmp_tl { - part / pagestyle .tl_set:N = \CTEX@part@pagestyle , - chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , - part / fixbeforeskip .bool_set:N = \CTEX@part@fixbeforeskip , - chapter / fixbeforeskip .bool_set:N = \CTEX@chapter@fixbeforeskip , + part / pagestyle .tl_set:N = \CTEX@part@pagestyle , + chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , } \seq_map_inline:Nn \c__ctex_headings_seq { @@ -697,15 +701,22 @@ \cs_new_protected_nopar:Npn \CTEX@makeheadinganchor { } \ctex_at_end_package:nn { hyperref } { \cs_gset_protected_nopar:Npn \CTEX@makeheadinganchor { \phantomsection } } -\cs_new_protected_nopar:Npn \CTEX@fixbeforeskip +\cs_new_protected_nopar:Npn \CTEX@fixtopskip + { + \CTEX@fixheadingskip + \dim_compare:nNnF \tex_pagegoal:D < \c_max_dim + { \skip_sub:Nn \l__ctex_heading_skip { \tex_topskip:D } } + } +\cs_new_protected_nopar:Npn \CTEX@fixheadingskip { \par - \ifdim \pagegoal = \maxdimen - \advance \@tempskipa -\topskip - \advance \@tempskipa -\parskip - \nointerlineskip - \fi + \dim_set:Nn \tex_prevdepth:D { -1000pt } + \skip_sub:Nn \l__ctex_heading_skip { \tex_parskip:D } } +\skip_new:N \l__ctex_heading_skip +\cs_new_protected_nopar:Npn \CTEX@setheadingskip + { \skip_set:Nn \l__ctex_heading_skip } +\cs_new_eq:NN \CTEX@headingskip \l__ctex_heading_skip \renewcommand\part{% \if@openright \cleardoublepage @@ -719,11 +730,9 @@ \else \@tempswafalse \fi - \@tempskipa = \glueexpr \CTEX@part@beforeskip \relax - \ifodd \CTEX@part@fixbeforeskip - \CTEX@fixbeforeskip - \fi - \vspace*{\@tempskipa}% + \CTEX@setheadingskip \CTEX@part@beforeskip + \ifodd \CTEX@part@fixskip \CTEX@fixtopskip \fi + \vspace*{\CTEX@headingskip}% \secdef\@part\@spart} \def\@part[#1]#2{% \ifnum \c@secnumdepth >-2\relax @@ -753,7 +762,9 @@ \CTEX@part@aftertitle}% \@endpart} \def\@endpart{% - \vskip \glueexpr \CTEX@part@afterskip \relax + \CTEX@setheadingskip \CTEX@part@afterskip + \ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \newpage \if@twoside \if@openright @@ -798,11 +809,9 @@ \@afterheading \fi} \def\@makechapterhead#1{% - \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax - \ifodd \CTEX@chapter@fixbeforeskip - \CTEX@fixbeforeskip - \fi - \vspace*{\@tempskipa}% + \CTEX@setheadingskip \CTEX@chapter@beforeskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixtopskip \fi + \vspace*{\CTEX@headingskip}% {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format \ifnum \c@secnumdepth >\m@ne @@ -814,21 +823,23 @@ \CTEX@chapter@titleformat{#1}% \CTEX@chapter@aftertitle \nobreak - \vskip \glueexpr \CTEX@chapter@afterskip \relax + \CTEX@setheadingskip \CTEX@chapter@afterskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip }} \def\@makeschapterhead#1{% - \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax - \ifodd \CTEX@chapter@fixbeforeskip - \CTEX@fixbeforeskip - \fi - \vspace*{\@tempskipa}% + \CTEX@setheadingskip \CTEX@chapter@beforeskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixtopskip \fi + \vspace*{\CTEX@headingskip}% {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format \interlinepenalty\@M \CTEX@chapter@titleformat{#1} \CTEX@chapter@aftertitle \nobreak - \vskip \glueexpr \CTEX@chapter@afterskip \relax + \CTEX@setheadingskip \CTEX@chapter@afterskip + \ifodd \CTEX@chapter@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip }} \def\@startsection#1#2#3#4#5#6{% \if@noskipsec \leavevmode \fi @@ -842,7 +853,10 @@ \if@nobreak \everypar{}% \else - \addpenalty\@secpenalty\addvspace{\glueexpr #4\relax}% + \addpenalty\@secpenalty + \CTEX@setheadingskip{#4}% + \ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi + \addvspace \CTEX@headingskip \fi \@ifstar {\@ssect{#3}{#4}{#5}{#6}}% @@ -910,7 +924,9 @@ \def\@xsect#1{% \unless \ifodd \CTEX@runin \par \nobreak - \vskip\glueexpr #1\relax + \CTEX@setheadingskip{#1}% + \ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi + \vskip \CTEX@headingskip \@afterheading \else \@nobreakfalse @@ -934,11 +950,13 @@ \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat } \cs_set_eq:Nc \CTEX@aftertitle { CTEX@#1@aftertitle } \cs_set_eq:Nc \CTEX@afterindent { CTEX@#1@afterindent } + \cs_set_eq:Nc \CTEX@fixskip { CTEX@#1@fixskip } \cs_set_eq:Nc \CTEX@runin { CTEX@#1@runin } } \cs_new_eq:NN \CTEX@titleformat@n \use:n \cs_new_eq:NN \CTEX@aftertitle \prg_do_nothing: \cs_new_eq:NN \CTEX@afterindent \c_true_bool +\cs_new_eq:NN \CTEX@fixskip \c_false_bool \cs_new_eq:NN \CTEX@runin \c_false_bool \int_zero:N \l__ctex_tmp_int \seq_map_inline:Nn \c__ctex_section_headings_seq diff --git a/Master/texmf-dist/tex/latex/ctex/ctexsize.sty b/Master/texmf-dist/tex/latex/ctex/ctexsize.sty index 0435f9e6ef8..f5f1b2d9cae 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexsize.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctexsize.sty @@ -28,10 +28,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese font size definition (CTEX)} \ProvidesExplPackage{ctexsize} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \RequirePackage { xparse , l3keys2e } \cs_new_eq:NN \g__ctex_font_size_flag \c_minus_one \keys_define:nn { ctex / option } diff --git a/Master/texmf-dist/tex/latex/ctex/ctexspa.def b/Master/texmf-dist/tex/latex/ctex/ctexspa.def index a61ddee599a..fd335e4e329 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexspa.def +++ b/Master/texmf-dist/tex/latex/ctex/ctexspa.def @@ -28,7 +28,7 @@ %% ------------------------------------------------------------------------------ %% \ProvidesFile{ctexspa.def}% - [2016/05/16 v2.4.2 Space info for CJKpunct (CTEX)] + [2016/08/27 v2.4.3 Space info for CJKpunct (CTEX)] \ctexspadef{adobezhsong}{70,15,61,8,63,14,58,7,64,13,62,12,60,11,61,15,62,14,51,6,58,5,58,8,7,5,12,12,10,68,13,63,17,63,20,69,19,69,17,63,19,70,17,55,10,10,14,63,10,65,10,61,13,62,15,61,7,49,7,56,8,58,15,69,8,61,14,63,8,57,,,} \ctexspadef{adobezhhei}{78,3,64,3,64,2,61,3,72,3,70,3,72,3,70,3,60,3,51,3,62,3,66,3,0,0,10,10,3,70,5,70,6,75,6,78,17,67,13,67,17,67,4,50,8,8,3,72,3,70,3,72,3,70,3,60,3,51,3,62,3,66,3,78,7,62,3,63,3,61,,,} \ctexspadef{adobezhkai}{76,10,55,8,63,4,62,4,71,4,65,4,71,4,74,4,54,4,54,4,62,4,62,4,0,0,11,11,5,72,6,71,7,78,7,79,18,68,18,68,18,68,2,46,14,12,4,71,4,65,4,71,4,74,4,54,4,54,4,62,4,62,10,76,8,55,4,63,4,62,,,} diff --git a/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls b/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls index f5e29ca94ab..068dd46bb46 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls +++ b/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls @@ -28,11 +28,12 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {ctex documentation (CTEX)} \ProvidesExplClass{ctxdoc} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \ExplSyntaxOff +\let\pdfmdfivesum\mdfivesum \DeclareOption*{\PassOptionsToClass{\CurrentOption}{l3doc}} \PassOptionsToClass{a4paper,full}{l3doc} \ProcessOptions @@ -174,8 +175,6 @@ \appto\MacroFont{\hyphenchar\font\m@ne\ctexdocverbaddon} \preto\AltMacroFont{\linespread{1}} \appto\AltMacroFont{\hyphenchar\font\m@ne\ctexdocverbaddon} -\def\Module#1{\mbox{% - \color{purple}\footnotesize\normalfont\sffamily\textlangle#1\textrangle}} \newcommand*\exptarget{\Hy@raisedlink{\hypertarget{expstar}{}}} \newcommand*\rexptarget{\Hy@raisedlink{\hypertarget{rexpstar}{}}} \newcommand*\expstar{\hyperlink{expstar}{$\star$}} @@ -209,62 +208,41 @@ { \skip_zero:N \medskipamount } { \skip_add:Nn \medskipamount { \parskip } } } -%% 用 \vtop 让函数名字和语法盒子首行对齐 -\ctex_patch_cmd_once:NnnnTF \__codedoc_syntax:w +%% 左侧边注的函数列表采用单倍行距 +\ctex_preto_cmd:NnnTF \__codedoc_typeset_functions: { } - { { minipage } { \l__codedoc_syntax_dim } } - { { minipage } [t] { \l__codedoc_syntax_dim } } + { \MacroFont } { \iow_term:n { *** ~ SUCCESS ~ *** } } { \iow_term:n { *** ~ FAIL ~ *** } } -%% 左侧边注的函数列表采用单倍行距 -\ctex_preto_cmd:NnnTF \__codedoc_typeset_names: +\ctex_patch_cmd_once:NnnnTF \__codedoc_macro_init: { } - { \linespread { 1 } } + { \hbox:n } + { \MacroFont \hbox:n } { \iow_term:n { *** ~ SUCCESS ~ *** } } { \iow_term:n { *** ~ FAIL ~ *** } } -\ctex_patch_cmd_once:NnnnTF \__codedoc_macro_typeset_one:n +\ctex_patch_cmd_once:NnnnTF \__codedoc_macro_typeset_one:nN { } { \vbox_unpack_clear:N } - { \linespread { 1 } \selectfont \vbox_unpack_clear:N } + { \MacroFont \vbox_unpack_clear:N } + { \iow_term:n { *** ~ SUCCESS ~ *** } } + { \iow_term:n { *** ~ FAIL ~ *** } } +\ctex_patch_cmd_once:NnnnTF \__codedoc_macro_dump: + { } + { \hbox_unpack_clear:N } + { \MacroFont \hbox_unpack_clear:N } + { \iow_term:n { *** ~ SUCCESS ~ *** } } + { \iow_term:n { *** ~ FAIL ~ *** } } +\ctex_patch_cmd_once:NnnnTF \__codedoc_macro_end: + { } + { \endtrivlist } + { \@noparlisttrue \endtrivlist } + { \iow_term:n { *** ~ SUCCESS ~ *** } } + { \iow_term:n { *** ~ FAIL ~ *** } } +\ctex_appto_cmd:NnnTF \__codedoc_macro_end_style:n + { } + { \@endparenv } { \iow_term:n { *** ~ SUCCESS ~ *** } } { \iow_term:n { *** ~ FAIL ~ *** } } -%% 不重复使用 \HD@target,避免索引出现重复页码 -\cs_set_protected:Npn \__codedoc_special_index_aux:nnnnn #1#2#3#4#5 - { - \__codedoc_special_index_set:Nn \l__codedoc_index_escaped_macro_tl {#2} - \str_if_eq:onTF { \@currenvir } { macrocode } - { \codeline@wrindex } - { - \HD@target - \index - } - { - \tl_if_empty:nF { #3 #4 } - { #3 \actualchar #4 \levelchar } - #1 - \actualchar - { - \token_to_str:N \verbatim@font \c_space_tl - \l__codedoc_index_escaped_macro_tl - } - \encapchar - hdclindex{\the\c@HD@hypercount}{#5} - } - } -\DeclareDocumentCommand \cs { O{} m } - { \__codedoc_cmd_aux:no {#1} { \c__codedoc_backslash_tl #2 } } -\DeclareDocumentCommand \tn { O{} m } - { - \__codedoc_cmd_aux:no - { index = TeX , replace = false , #1 } - { \c__codedoc_backslash_tl #2 } - } -\DeclareDocumentCommand \meta { +m } - { \__codedoc_meta_aux:n {#1} } -\DeclareExpandableDocumentCommand \bookmarkcstn { O{} m } - { \textbackslash \tl_to_str:n {#2} } -\cs_new:Npn \bookmarkmeta #1 { < \tl_to_str:n {#1} > } -\cs_generate_variant:Nn \__codedoc_cmd_aux:nn { no } \AtBeginEnvironment { syntax } { \char_set_catcode_active:N \| @@ -274,7 +252,7 @@ } %% 不对目录中出现的 \cs 和 \tn 等编索引 \DeclareDocumentCommand \StopSpecialIndexModule { } - { \cs_set_eq:NN \__codedoc_special_index_module:nnnn \use_none:nnnn } + { \cs_set_eq:NN \__codedoc_special_index_module:nnnnN \use_none:nnnnn } \tl_map_inline:nn { \actualchar \encapchar \levelchar } { \exp_args:Nx \DoNotIndex { \bslash \tl_to_str:N #1 } } \DeclareDocumentCommand \package { o m } @@ -289,22 +267,410 @@ \DeclareDocumentCommand \GetFileId { m } { \GetFileInfo {#1} - \ior_open:NnTF \g__ctex_doc_ior { \c_sys_jobname_str .id } + \ior_open:NnTF \g__ctxdoc_id_ior { \c_sys_jobname_str .id } { - \ior_get:NN \g__ctex_doc_ior \l__ctex_tmp_tl - \ior_close:N \g__ctex_doc_ior - \exp_after:wN \GetIdInfo \l__ctex_tmp_tl + \ior_get:NN \g__ctxdoc_id_ior \l__ctxdoc_tmp_tl + \ior_close:N \g__ctxdoc_id_ior + \exp_after:wN \GetIdInfo \l__ctxdoc_tmp_tl } { \GetIdInfo $Id$ } { \fileinfo } } -\ior_new:N \g__ctex_doc_ior +\ior_new:N \g__ctxdoc_id_ior +\ctex_patch_cmd:Nnn \changes@ + { \space \actualchar } + { \actualchar } +\cs_new_eq:NN \__ctxdoc_ltx_changes:nnn \changes@ +\cs_set_protected:Npn \changes@ #1#2 + { + \__ctxdoc_save_version_date:nn {#1} {#2} + \tl_if_empty:nTF {#1} + { \__ctxdoc_ltx_changes:nnn } + { \__ctxdoc_version_zfill:wnnn #1 \q_stop } + {#1} {#2} + } +\cs_new_protected:Npn \__ctxdoc_version_zfill:wnnn #1#2 \q_stop + { + \str_if_eq:nnTF {#1} { v } + { \__ctxdoc_version_zfill:nnnn {#2} } + { \__ctxdoc_ltx_changes:nnn } + } +\cs_new_protected:Npn \__ctxdoc_version_zfill:nnnn #1#2 + { + \tl_clear:N \l__ctxdoc_tmp_tl + \seq_set_split:Nnn \l__ctxdoc_tmp_seq { . } {#1} + \seq_map_function:NN \l__ctxdoc_tmp_seq \__ctxdoc_version_zfill:n + \__ctxdoc_ltx_changes:nnn { \l__ctxdoc_tmp_tl \actualchar #2 } + } +\tl_new:N \l__ctxdoc_tmp_tl +\seq_new:N \l__ctxdoc_tmp_seq +\cs_new_protected:Npn \__ctxdoc_version_zfill:n #1 + { + \tl_put_right:Nx \l__ctxdoc_tmp_tl + { + \prg_replicate:nn + { \int_max:nn { 0 } { 10 - \tl_count:n {#1} } } { 0 } + \exp_not:n {#1} + } + } +\cs_new_protected:Npn \__ctxdoc_save_version_date:nn #1#2 + { + \prop_get:NnNTF \g__ctxdoc_version_date_prop {#1} \l__ctxdoc_tmp_tl + { \exp_after:wN \__ctxdoc_save_version_date:nnnn \l__ctxdoc_tmp_tl {#2} {#1} } + { \__ctxdoc_save_version_date:nnn {#1} {#2} {#2} } + } +\cs_new_protected:Npn \__ctxdoc_save_version_date:nnnn #1#2#3#4 + { + \__ctxdoc_if_date_later:nnTF {#1} {#3} + { \__ctxdoc_save_version_date:nnn {#4} {#3} {#2} } + { + \__ctxdoc_if_date_later:nnT {#3} {#2} + { \__ctxdoc_save_version_date:nnn {#4} {#1} {#3} } + } + } +\prg_new_conditional:Npnn \__ctxdoc_if_date_later:nn #1#2 { TF , T } + { + \if_int_compare:w \__ctxdoc_parse_date:w #1 / / / 0 \q_stop > + \__ctxdoc_parse_date:w #2 / / / 0 \q_stop \exp_stop_f: + \prg_return_true: \else: \prg_return_false: \fi: + } +\cs_new:Npn \__ctxdoc_parse_date:w #1/#2/#3/ #4 \q_stop + { #1#2#3 } +\cs_new_protected:Npn \__ctxdoc_save_version_date:nnn #1#2#3 + { \prop_gput:Nnn \g__ctxdoc_version_date_prop {#1} { {#2} {#3} } } +\cs_new_protected:Npn \CTEX@versionitem #1 \efill + { + \@idxitem + \prop_get:NnNTF \g__ctxdoc_version_date_prop {#1} \l__ctxdoc_tmp_tl + { \exp_after:wN \__ctxdoc_version_item:nnn \l__ctxdoc_tmp_tl {#1} } + { \BOOM } + } +\cs_new_protected:Npn \__ctxdoc_version_item:nnn #1#2#3 + { + \noindent + \Hy@raisedlink { \belowpdfbookmark {#3} { HD.#3 } } + \textbf {#3} \hfill + \hbox:n + { + \footnotesize + \str_if_eq:nnTF {#1} {#2} + { ( #1 ) } + { ( #1 ~ -- ~ #2 ) } + } + \par \nopagebreak + } +\prop_new:N \g__ctxdoc_version_date_prop +\ctex_patch_cmd:Nnn \HDorg@theglossary + { \let \item \@idxitem } + { \let \item \CTEX@versionitem } +\ctex_patch_cmd:Nnn \l@section { 2.5em } { 1.5em } +\ctex_patch_cmd:Nnn \l@subsection { 2.5em } { 1.5em } +\ctex_patch_cmd:Nnn \@wrglossary + { hdpindex } + { + \ifnum \c@HD@hypercount = \z@ + hdpindex + \else + hdclindex { \the \c@HD@hypercount } + \fi + } +%% 重定义 macrocode 环境的实现,逐行处理 +\cs_set_protected_nopar:Npn \xmacro@code + { \__ctxdoc_marco_code:w } +\cs_set_protected_nopar:Npn \sxmacro@code + { + \fontspec_print_visible_spaces: + \xmacro@code + } +\cs_new_protected_nopar:Npn \__ctxdoc_marco_code:w + { + \ifcodeline@index + \__ctxdoc_marco_every_par:n { \__ctxdoc_code_line_no: } + \else: + \__ctxdoc_marco_every_par:n { } + \fi: + \exp_args:Nx \__ctxdoc_make_finish_tag:n { \@currenvir } + \__ctxdoc_verbatim_start:w + } +\cs_new_protected:Npn \__ctxdoc_marco_every_par:n #1 + { + \everypar + { + \everypar {#1} + \if@inlabel + \global \@inlabelfalse + \llap { \box \@labels \hskip \leftskip } + \fi + #1 + } + } +\ctex_patch_cmd:Nnn \macro@code + { \if@inlabel \leavevmode \fi } + { } +\group_begin: + \int_set_eq:NN \tex_endlinechar:D \c_minus_one + \use:n + { + \char_set_catcode_active:n { 32 } + \tl_const:Nn \c__ctxdoc_active_space_tl + } + { } +\group_end: +\group_begin: + \char_set_catcode_active:n { 13 } + \cs_new_protected:Npx \__ctxdoc_make_finish_tag:n #1 + { + \tl_set:Nn \exp_not:N \l__ctxdoc_verbatim_finish_tl + { + \c_percent_str + \prg_replicate:nn { 4 } + { \exp_not:o { \c__ctxdoc_active_space_tl } } + \exp_not:o { \active@escape@char } end + \c_left_brace_str #1 \c_right_brace_str + \exp_not:N ^^M + } + } + \cs_new_protected:Npn \__ctxdoc_verbatim_start:w #1 + { + \str_if_eq:nnTF {#1} { ^^M } + { \__ctxdoc_verbatim_read_line:w } + { \__ctxdoc_verbatim_read_line:w #1 } + } + \cs_new_protected:Npn \__ctxdoc_verbatim_read_line:w #1 ^^M + { + \tl_set:Nn \l__ctxdoc_verbatim_line_tl { #1 ^^M } + \tl_if_eq:NNTF \l__ctxdoc_verbatim_line_tl \l__ctxdoc_verbatim_finish_tl + { \exp_args:Nx \end { \@currenvir } } + { + \__ctxdoc_verbatim_process_line: + \__ctxdoc_verbatim_read_line:w + } + } + \tl_const:Nn \c__ctxdoc_active_cr_tl { ^^M } +\group_end: +\tl_new:N \l__ctxdoc_verbatim_line_tl +\tl_new:N \l__ctxdoc_verbatim_finish_tl +\tl_new:N \g__ctxdoc_verbatim_verb_stop_tl +\cs_new_protected_nopar:Npn \__ctxdoc_process_normal_line: + { + \str_if_eq_x:nnTF + { \str_head:N \l__ctxdoc_verbatim_line_tl } { \c_percent_str } + { \__ctxdoc_check_angle:x { \tl_tail:N \l__ctxdoc_verbatim_line_tl } } + { \__ctxdoc_output_line: } + } +\cs_new_protected_nopar:Npn \__ctxdoc_process_verb_line: + { + \tl_if_eq:NNTF \l__ctxdoc_verbatim_line_tl \g__ctxdoc_verbatim_verb_stop_tl + { + \tl_gclear:N \g__ctxdoc_verbatim_verb_stop_tl + \cs_gset_eq:NN \__ctxdoc_verbatim_process_line: \__ctxdoc_process_normal_line: + \__ctxdoc_output_module:nn + { slash@guard } + { \__ctxdoc_module_pop:n { \l__ctxdoc_verbatim_line_tl } } + } + { \tl_use:N \l__ctxdoc_verbatim_line_tl } + } +\cs_new_eq:NN \__ctxdoc_verbatim_process_line: \__ctxdoc_process_normal_line: +\DeclareDocumentCommand \CheckModules { } + { \cs_set_eq:NN \__ctxdoc_verbatim_process_line: \__ctxdoc_process_normal_line: } +\DeclareDocumentCommand \DontCheckModules { } + { \cs_set_eq:NN \__ctxdoc_verbatim_process_line: \__ctxdoc_output_line: } +\cs_new_protected:Npn \__ctxdoc_check_angle:n #1 + { + \str_if_eq_x:nnTF { \str_head:n {#1} } { < } + { \__ctxdoc_check_module:x { \tl_tail:n {#1} } } + { \__ctxdoc_output_percent_line: } + } +\cs_generate_variant:Nn \__ctxdoc_check_angle:n { x } +\cs_new_protected:Npn \__ctxdoc_check_module:n #1 + { + \exp_args:Nx \str_case:nnF { \str_head:n {#1} } + { + { * } { \__ctxdoc_module_star:w } + { / } { \__ctxdoc_module_slash:w } + { @ } { \__ctxdoc_module_at:w } + { < } { \__ctxdoc_module_verb:w } + } + { \__ctxdoc_module_pm:w } + #1 \q_stop + } +\cs_generate_variant:Nn \__ctxdoc_check_module:n { x } +\group_begin: + \char_set_catcode_active:N \> + \cs_new_protected:Npn \__ctxdoc_module_star:w #1 > #2 \q_stop + { + \__ctxdoc_output_module:nn + { star@guard } + { \__ctxdoc_module_push:n { \__ctxdoc_module_angle:n {#1} } } + \int_compare:nNnF \guard@level < \c@StandardModuleDepth + { + \cs_gset_eq:NN \macro@font \AltMacroFont + \macro@font + } + \int_gincr:N \guard@level + \__ctxdoc_output_line:n {#2} + } + \cs_new_protected:Npn \__ctxdoc_module_slash:w #1 > #2 \q_stop + { + \__ctxdoc_output_module:nn + { slash@guard } + { \__ctxdoc_module_pop:n { \__ctxdoc_module_angle:n {#1} } } + \int_gdecr:N \guard@level + \int_compare:nNnF \guard@level < \c@StandardModuleDepth + { + \cs_gset_eq:NN \macro@font \MacroFont + \macro@font + } + \__ctxdoc_output_line:n {#2} + } + \cs_new_protected:Npn \__ctxdoc_module_at:w @ @ = #1 > #2 \q_stop + { + \__ctxdoc_output_module:nn + { at@guard } + { \__ctxdoc_module_angle:n { @ @ = #1 } } + \tl_gset:Nn \g__codedoc_module_name_tl {#1} + \__ctxdoc_output_line:n {#2} + } + \cs_new_protected:Npn \__ctxdoc_module_pm:w #1 > #2 \q_stop + { + \__ctxdoc_output_module:nn + { pm@guard } + { \__ctxdoc_module_angle:n {#1} } + \group_begin: + \int_compare:nNnF \guard@level < \c@StandardModuleDepth + { \AltMacroFont } + \__ctxdoc_output_line:n {#2} + \group_end: + } + \cs_new_protected:Npn \__ctxdoc_module_verb:w #1 \q_stop + { + \cs_gset_eq:NN \__ctxdoc_verbatim_process_line: \__ctxdoc_process_verb_line: + \tl_gset:Nx \g__ctxdoc_verbatim_verb_stop_tl + { \c_percent_str \tl_tail:n {#1} } + \__ctxdoc_output_module:nn + { star@guard } + { \__ctxdoc_module_push:n { \l__ctxdoc_verbatim_line_tl } } + } +\group_end: +\cs_new_protected_nopar:Npn \__ctxdoc_output_line: + { + \tex_noindent:D + \__ctxdoc_replace_at_at:N \l__ctxdoc_verbatim_line_tl + \tl_use:N \l__ctxdoc_verbatim_line_tl + } +\cs_new_protected:Npn \__ctxdoc_replace_at_at:N #1 + { + \tl_if_empty:NF \g__codedoc_module_name_tl + { + \exp_args:NNo \__ctxdoc_replace_at_at_aux:Nn + #1 \g__codedoc_module_name_tl + } + } +\cs_new_protected:Npn \__ctxdoc_replace_at_at_aux:Nn #1#2 + { + \tl_replace_all:Nnn #1 { _ @ @ } { _ _ #2 } + \tl_replace_all:Nnn #1 { @ @ } { _ _ #2 } + } +\cs_new_protected:Npn \__ctxdoc_output_line:n #1 + { + \tl_set:Nn \l__ctxdoc_verbatim_line_tl {#1} + \tl_if_eq:NNTF \l__ctxdoc_verbatim_line_tl \c__ctxdoc_active_cr_tl + { \tl_use:N \l__ctxdoc_verbatim_line_tl } + { + \str_if_eq_x:nnTF + { \str_head:N \l__ctxdoc_verbatim_line_tl } + { \c_percent_str } + { \__ctxdoc_output_percent_line: } + { \__ctxdoc_output_line: } + } + } +\cs_new_protected:Npn \__ctxdoc_output_percent_line: + { + \tex_noindent:D + \group_begin: + \color { code@gray } + \str_if_eq_x:nnTF { \f@shape } { \updefault } + { \slshape } + { \upshape } + \__ctxdoc_output_line: + \group_end: + } +\cs_new_protected_nopar:Npn \__ctxdoc_module_push:n + { \exp_args:Nx \__ctxdoc_module_push_aux:nn { \int_use:N \c@HD@hypercount } } +\cs_new_protected:Npn \__ctxdoc_module_push_aux:nn #1 + { + \seq_gpush:Nn \g__ctxdoc_module_dest_seq {#1} + \HD@savedest@add {#1} + \cs_if_exist:cTF { r@HD. #1 } + { + \hypersetup { hidelinks } + \hyperref [ HD. #1 ] + } + { \use:n } + } +\cs_new_protected_nopar:Npn \__ctxdoc_module_pop:n + { + \seq_gpop:NNTF \g__ctxdoc_module_dest_seq \l__ctxdoc_tmp_tl + { + \tl_set:Nx \@currentlabel { \int_use:N \c@HD@hypercount } + \HD@savedest@add { \@currentlabel } + \Hy@MakeCurrentHref { HD. \@currentlabel } + \label { HD. \l__ctxdoc_tmp_tl } + \hypersetup { hidelinks } + \hdclindex { \l__ctxdoc_tmp_tl } { } + } + { \BOOM \use:n } + } +\seq_new:N \g__ctxdoc_module_dest_seq +\cs_new_protected:Npn \__ctxdoc_output_module:nn #1#2 + { + \tex_noindent:D + \group_begin: + \color {#1} \footnotesize \normalfont \sffamily #2 + \group_end: + } +\definecolor { star@guard } { rgb } { 0 , 0 , 0.55 } +\definecolor { slash@guard } { rgb } { 0.75 , 0 , 0.25 } +\definecolor { pm@guard } { rgb } { 0.5 , 0.5 , 0 } +\definecolor { at@guard } { rgb } { 0.5 , 0 , 0.5 } +\definecolor { code@gray } { gray } { 0.5 } +\cs_new_protected:Npn \__ctxdoc_module_angle:n #1 + { \textlangle #1 \textrangle } +\cs_new_protected_nopar:Npn \__ctxdoc_code_line_no: + { + \int_gincr:N \c@CodelineNo + \hbox_overlap_left:n + { + \hbox_to_wd:nn + { \MacroIndent } + { + \HD@target + \tex_hss:D + \__ctxdoc_code_line_no_style: + \theCodelineNo \enspace + } + \tex_kern:D \@totalleftmargin + } + } +\tl_set:Nn \theCodelineNo + { \arabic { CodelineNo } } +\cs_new_protected_nopar:Npn \__ctxdoc_code_line_no_style: + { \color { code@gray } \normalfont \sffamily \tiny } +\cs_set_protected:Npn \HD@SetMacroIndent #1 + { + \group_begin: + \settowidth \MacroIndent + { + \__ctxdoc_code_line_no_style: + \prg_replicate:nn { \tl_count:n {#1} } { 0 } + \enspace + } + \dim_gset_eq:NN \MacroIndent \MacroIndent + \group_end: + } \ExplSyntaxOff \AtBeginDocument{\addtocontents{toc}{\StopSpecialIndexModule}} \pdfstringdefDisableCommands{% - \let\cs\bookmarkcstn - \let\tn\bookmarkcstn - \let\meta\bookmarkmeta \let\path\meta \let\opt\@firstofone} \preto\@thehead{\cslet{MakeUppercase\space}{\@iden}} @@ -342,19 +708,12 @@ \def\ctexkit{\href{https://github.com/CTeX-org/ctex-kit/}{\texttt{ctex-kit}}} \def\ctexkitrev#1{% \href{https://github.com/CTeX-org/ctex-kit/commit/#1}{\texttt{ctex-kit} rev. #1}} -\patchcmd\theCodelineNo{\sffamily\tiny}{\normalfont\sffamily\tiny}{}{} \appto\GlossaryParms{% + \raggedcolumns + \let\Hy@writebookmark\HDorg@writebookmark \def\@idxitem{\par\hangindent 2em }% \def\subitem{\@idxitem\hspace*{1em}}% \def\subsubitem{\@idxitem\hspace*{2em}}} -\patchcmd\l@section{2.5em}{1.5em}{}{} -\patchcmd\l@subsection{2.5em}{1.5em}{}{} -\patchcmd\changes@{\space}{\lbrack}{}{} -\patchcmd\@wrglossary{hdpindex}{% - \ifnum\c@HD@hypercount=\z@ - hdpindex% - \else - hdclindex{\the\c@HD@hypercount}\fi}{}{} \def\glossaryname{版本历史} \GlossaryPrologue{\section{\glossaryname}} \IndexPrologue{% diff --git a/Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseGBK.dict b/Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseGBK.dict index 49c31a8d218..a5e094016ac 100644 --- a/Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseGBK.dict +++ b/Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseGBK.dict @@ -27,7 +27,7 @@ %% ------------------------------------------------------------------------------ %% \ProvidesDictionary{translator-theorem-dictionary}{ChineseGBK}% - [2016/05/16 v2.4.2 Chinese translation for theorem name (CTEX)] + [2016/08/27 v2.4.3 Chinese translation for theorem name (CTEX)] \providetranslation{Comments}{} \providetranslation{comments}{} \providetranslation{Comment}{} diff --git a/Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseUTF8.dict b/Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseUTF8.dict index 4b21ff9412a..1bc429292ed 100644 --- a/Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseUTF8.dict +++ b/Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseUTF8.dict @@ -27,7 +27,7 @@ %% ------------------------------------------------------------------------------ %% \ProvidesDictionary{translator-theorem-dictionary}{ChineseUTF8}% - [2016/05/16 v2.4.2 Chinese translation for theorem name (CTEX)] + [2016/08/27 v2.4.3 Chinese translation for theorem name (CTEX)] \providetranslation{Comments}{评论} \providetranslation{comments}{评论} \providetranslation{Comment}{评论} diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def index 4048b7951e4..1059651422b 100644 --- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def +++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Asian pTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-aptex.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1 { \AtBeginDvi { #1 } diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def index c2073b9422f..7db74f2b2dd 100644 --- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def +++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {LuaLaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-luatex.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \msg_new:nnn { ctex } { luatexja-loaded } { Package~`luatexja'~can~not~be~loaded~before~`ctex'.\\ @@ -82,55 +82,36 @@ \ltj@allalchar } \AtEndUTFCommand { \group_end: } -\RequirePackage { lltjp-fontspec } -\cs_set:Npn \emshape { \itshape } -\cs_set:Npn \eminnershape { \upshape } -\cs_new_protected_nopar:Npn \__ctex_ltj_um_define_math_chars: +\cs_set_protected:Npn \fontspec_visible_space: { - \group_begin: - \cs_set_protected:Npn \__um_sym:nnn ##1##2##3 - { - \tl_if_in:nnT - { - \mathord \mathalpha \mathbin \mathrel - \mathpunct \mathop \mathfence - } - { ##3 } - { \__ctex_ltj_um_char:Nn ##2 { ##1 } } - } - \__um_input_math_symbol_table: - \group_end: + \font_glyph_if_exist:NnTF \font { "2423 } + { \ltjalchar "2423 \exp_stop_f: } + { \fontspec_visible_space_fallback: } } -\cs_new_protected:Npn \__ctex_ltj_um_char:Nn #1#2 +\cs_new_protected:Npn \ctex_ltj_set_math_letter:NN #1#2 { - \__ctex_ltj_um_char_aux:Nx #1 { \char_generate:nn {#2} { 12 } } - \ltjsetmathletter {#2} + \group_begin: + \cs_set_protected:Npn #1 ##1##2##3 + { \ltjsetmathletter { ##1 } } + #2 + \group_end: } -\cs_new_protected:Npn \__ctex_ltj_um_char_aux:Nn #1#2 +\ctex_at_end_package:nn { unicode-math } { - \cs_gset_protected_nopar:Npn #1 + \cs_if_exist:NTF \um_input_math_symbol_table: { - \mode_if_math:TF - {#2} - { - { - \lua_now_x:n { tex.globaldefs = 0 } - \ltj@allalchar #2 - } - } + \ctex_ltj_set_math_letter:NN + \um_sym:nnn + \um_input_math_symbol_table: } - } -\cs_generate_variant:Nn \__ctex_ltj_um_char_aux:Nn { Nx } -\ctex_at_end_package:nn { unicode-math } - { - \cs_set_eq:NN \__um_define_math_chars: \__ctex_ltj_um_define_math_chars: - \@ifpackagelater { unicode-math } { 2015/06/28 } { \cs_set_eq:NN \use@mathgroup \ctex_ltj_use_math_group:Nn \cs_set_protected_nopar:Npn \ctex_ltj_math_group_hook: { \__um_switchto_literal: } + \ctex_ltj_set_math_letter:NN + \__um_sym:nnn + \__um_input_math_symbol_table: } - { } } \ctex_at_end_package:nn { listings } { @@ -631,12 +612,12 @@ { \prop_if_empty:NF \g__ctex_ltj_family_font_name_prop { - \ctex_ltj_family_if_exist:xNF { \CJKfamilydefault } \l__ctex_ltj_tmpa_tl + \ctex_ltj_family_if_exist:xNF { \CJKfamilydefault } \l__ctex_ltj_tmp_tl { \str_if_eq_x:nnTF { \CJKfamilydefault } { \CJKrmdefault } { \use:n } { - \ctex_ltj_family_if_exist:xNTF { \CJKrmdefault } \l__ctex_ltj_tmpa_tl + \ctex_ltj_family_if_exist:xNTF { \CJKrmdefault } \l__ctex_ltj_tmp_tl { \tl_gset:Nn \CJKfamilydefault { \CJKrmdefault } \use_none:n } { \use:n } } diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def index d44850fcb40..7163206437a 100644 --- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def +++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {(pdf)LaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-pdftex.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1 { \AtBeginDvi { #1 } diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-uptex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-uptex.def index e79e27077f6..42d3793ac72 100644 --- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-uptex.def +++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-uptex.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {upTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-uptex.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1 { \AtBeginDvi { #1 } diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def index c731ba3fdc0..2d1e4ce0ae7 100644 --- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def +++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {XeLaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-xetex.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \RequirePackage { xeCJK } \exp_args:Nx \xeCJKsetup { diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd b/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd index df8c831885b..a73b6c5ea89 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd @@ -27,7 +27,7 @@ %% ------------------------------------------------------------------------------ %% \ProvidesFile{c19rm.fd}% - [2016/05/16 v2.4.2 Chinese font definition (CTEX)] + [2016/08/27 v2.4.3 Chinese font definition (CTEX)] %% %% Chinese characters %% diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd b/Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd index c1082f4d2f6..71d72221ba3 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd @@ -27,7 +27,7 @@ %% ------------------------------------------------------------------------------ %% \ProvidesFile{c19sf.fd}% - [2016/05/16 v2.4.2 Chinese font definition (CTEX)] + [2016/08/27 v2.4.3 Chinese font definition (CTEX)] %% %% Chinese characters %% diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd b/Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd index f14608db608..c46aeb62543 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd @@ -27,7 +27,7 @@ %% ------------------------------------------------------------------------------ %% \ProvidesFile{c19tt.fd}% - [2016/05/16 v2.4.2 Chinese font definition (CTEX)] + [2016/08/27 v2.4.3 Chinese font definition (CTEX)] %% %% Chinese characters %% diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd b/Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd index 268109c811b..ee946f33439 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd @@ -27,7 +27,7 @@ %% ------------------------------------------------------------------------------ %% \ProvidesFile{c70rm.fd}% - [2016/05/16 v2.4.2 Chinese font definition (CTEX)] + [2016/08/27 v2.4.3 Chinese font definition (CTEX)] %% %% Chinese characters %% diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd b/Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd index f92d74105a8..96e5f9b814c 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd @@ -27,7 +27,7 @@ %% ------------------------------------------------------------------------------ %% \ProvidesFile{c70sf.fd}% - [2016/05/16 v2.4.2 Chinese font definition (CTEX)] + [2016/08/27 v2.4.3 Chinese font definition (CTEX)] %% %% Chinese characters %% diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd b/Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd index 821514a3e4e..3e174451582 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd @@ -27,7 +27,7 @@ %% ------------------------------------------------------------------------------ %% \ProvidesFile{c70tt.fd}% - [2016/05/16 v2.4.2 Chinese font definition (CTEX)] + [2016/08/27 v2.4.3 Chinese font definition (CTEX)] %% %% Chinese characters %% diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-adobe.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-adobe.def index e30f0bcfa5f..a9d9ce4e129 100644 --- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-adobe.def +++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-adobe.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Adobe fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-adobe.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \sys_if_engine_pdftex:TF { \sys_if_output_pdf:TF diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def index 6812274ad13..0f13bc58b38 100644 --- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def +++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Fandol fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-fandol.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \sys_if_engine_pdftex:TF { \sys_if_output_pdf:TF diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-founder.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-founder.def index ba56fee9032..33471678cb1 100644 --- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-founder.def +++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-founder.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Founder fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-founder.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \sys_if_engine_pdftex:TF { \ctex_zhmap_case:nnn diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-mac.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-mac.def index ee6445d2c34..7333c17cba7 100644 --- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-mac.def +++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-mac.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Mac OS X fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-mac.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \sys_if_engine_pdftex:TF { \ctex_fontset_error:n { mac } } { diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-ubuntu.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-ubuntu.def index 940556265e3..64cc5aebf22 100644 --- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-ubuntu.def +++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-ubuntu.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Ubuntu fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-ubuntu.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \sys_if_engine_pdftex:TF { \ctex_zhmap_case:nnn diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def index de51d564770..bc1f88effd1 100644 --- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def +++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Windows fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-windows.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \file_if_exist:nTF { C:/bootfont.bin } { \ctex_file_input:n { ctex-fontset-windowsold.def } } { \ctex_file_input:n { ctex-fontset-windowsnew.def } } diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsnew.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsnew.def index 77a5189ebcb..c11dce2144f 100644 --- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsnew.def +++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsnew.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Windows fonts definition for Vista or later version (CTEX)} \ProvidesExplFile{ctex-fontset-windowsnew.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \tl_new:N \l__ctex_msyh_suffix_tl \tl_set:Nn \l__ctex_msyh_suffix_tl { .ttc } \file_if_exist:nF { C:/Windows/Fonts/msyh.ttc } diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsold.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsold.def index b4e4c57b2ca..a6f97fbf6fb 100644 --- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsold.def +++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsold.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Windows fonts definition for XP or earlier version (CTEX)} \ProvidesExplFile{ctex-fontset-windowsold.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \sys_if_engine_pdftex:TF { \ctex_zhmap_case:nnn diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-article.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-article.def index b0cd107e096..fc8f1584bbc 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-article.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-article.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese scheme for article (CTEX)} \ProvidesExplFile{ctex-scheme-chinese-article.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \keys_set:nn { ctex / part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-beamer.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-beamer.def index 5845d522d36..b4716185c90 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-beamer.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-beamer.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese scheme for beamer (CTEX)} \ProvidesExplFile{ctex-scheme-chinese-beamer.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \keys_set:nn { ctex / part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.def index 477d0b1d679..1973416383b 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese scheme for book (CTEX)} \ProvidesExplFile{ctex-scheme-chinese-book.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \keys_set:nn { ctex / part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-report.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-report.def index 1cfeb24fdcf..cd71b7ae9a8 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-report.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-report.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese scheme for report (CTEX)} \ProvidesExplFile{ctex-scheme-chinese-report.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \keys_set:nn { ctex / part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese.def index 173f0c75c59..02fd2548e60 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese scheme for generic (CTEX)} \ProvidesExplFile{ctex-scheme-chinese.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \keys_set:nn { ctex } { today = small } \ctex_if_autoindent_touched:F { \keys_set:nn { ctex } { autoindent = true } } diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-article.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-article.def index 8bd0152e302..cdb870f9105 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-article.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-article.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Plain scheme for article (CTEX)} \ProvidesExplFile{ctex-scheme-plain-article.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \keys_set:nn { ctex / part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-beamer.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-beamer.def index de0605119f3..08ee4d11e98 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-beamer.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-beamer.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Plain scheme for beamer (CTEX)} \ProvidesExplFile{ctex-scheme-plain-beamer.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \keys_set:nn { ctex / part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-book.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-book.def index 99dabfa4b97..a34365f1653 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-book.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-book.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Plain scheme for book (CTEX)} \ProvidesExplFile{ctex-scheme-plain-book.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \keys_set:nn { ctex / part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-report.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-report.def index 02a4e603126..90eacdb46bd 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-report.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-report.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Plain scheme for report (CTEX)} \ProvidesExplFile{ctex-scheme-plain-report.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} \keys_set:nn { ctex / part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain.def index 626307f410a..834f7b0fc86 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $ {Plain scheme for generic (CTEX)} \ProvidesExplFile{ctex-scheme-plain.def} - {\ExplFileDate}{2.4.2}{\ExplFileDescription} + {\ExplFileDate}{2.4.3}{\ExplFileDescription} %% %% %% End of file `ctex-scheme-plain.def'. |