summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-09-25 21:05:03 +0000
committerKarl Berry <karl@freefriends.org>2016-09-25 21:05:03 +0000
commitcdbf5b2c845ca6b373fff9043f2e00b14807950a (patch)
tree21be6d681fafea69eabe39b80de24707f9a13d14
parentd74756a7c618d3f8e58046afb5f5f7d5a07e429f (diff)
ctex
git-svn-id: svn://tug.org/texlive/trunk@42148 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/ctex/ctex.pdfbin1058990 -> 1053980 bytes
-rw-r--r--Master/texmf-dist/source/latex/ctex/ctex.dtx696
-rw-r--r--Master/texmf-dist/tex/generic/ctex/zhadobefonts.tex2
-rw-r--r--Master/texmf-dist/tex/generic/ctex/zhfandolfonts.tex2
-rw-r--r--Master/texmf-dist/tex/generic/ctex/zhfounderfonts.tex2
-rw-r--r--Master/texmf-dist/tex/generic/ctex/zhubuntufonts.tex2
-rw-r--r--Master/texmf-dist/tex/generic/ctex/zhwindowsfonts.tex2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/config/ctex-name-gbk.cfg4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/config/ctex.cfg4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/config/ctexopts.cfg4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctex-article.def146
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctex-beamer.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctex-book.def184
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctex-cs4size.clo4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctex-report.def180
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctex.sty6
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexart.cls148
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexbeamer.cls6
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexbook.cls186
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexcap.sty4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexheading.sty4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexhook.sty4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexpatch.sty4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexrep.cls182
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexsize.sty4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexspa.def2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctxdoc.cls267
-rw-r--r--Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseGBK.dict2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseUTF8.dict2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def12
-rw-r--r--Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def6
-rw-r--r--Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def23
-rw-r--r--Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-uptex.def12
-rw-r--r--Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def5
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-adobe.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-founder.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-mac.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-ubuntu.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsnew.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsold.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-article.def9
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-beamer.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.def11
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-report.def11
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-article.def9
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-beamer.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-book.def11
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-report.def11
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain.def4
60 files changed, 1680 insertions, 565 deletions
diff --git a/Master/texmf-dist/doc/latex/ctex/ctex.pdf b/Master/texmf-dist/doc/latex/ctex/ctex.pdf
index 80e8c1474ef..5ec1d8687f5 100644
--- a/Master/texmf-dist/doc/latex/ctex/ctex.pdf
+++ b/Master/texmf-dist/doc/latex/ctex/ctex.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/ctex/ctex.dtx b/Master/texmf-dist/source/latex/ctex/ctex.dtx
index b1d710ff91b..035769e8f6c 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: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+%<+!driver>\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +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.3}{\ExplFileDescription}
+%<!driver> {\ExplFileDate}{2.4.4}{\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/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)]
+%<c19|c70> [2016/09/21 v2.4.4 Chinese font definition (CTEX)]
+%<ctexspa> [2016/09/21 v2.4.4 Space info for CJKpunct (CTEX)]
+%<dict&theorem> [2016/09/21 v2.4.4 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{5629}
+% \CheckSum{5793}
%
% \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
@@ -1478,7 +1478,7 @@ Copyright and Licence
% \pagestyle{fancy}
% % \sectionmark 的重定义需要在 \pagestyle 之后生效
% \renewcommand\sectionmark[1]{%
-% \markright{\CTEXthesection——#1}}
+% \markright{\CTEXifname{\CTEXthesection——}{}#1}}
%
% \begin{document}
%
@@ -1515,13 +1515,13 @@ Copyright and Licence
% \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{fixskip},
-% \opt{indent}, \opt{pagestyle} 等。
+% \opt{indent}, \opt{pagestyle}, \opt{break} 等。
%
% 注意,对 \cls{article} 及其衍生的 \cls{ctexart} 等文档类,没有 |chapter|
% 级别的标题。而对于 \cls{beamer} 文档类,这些选项控制的是由 \tn{partpage},
% \tn{sectionpage} 和 \tn{subsectionpage} 产生的标题格式,此时只有 |part|,
-% |section| 和 |subsection| 这三层级别,并且 \opt{runin}, \opt{afterindent}
-% 和 \opt{fixskip} 这三个格式无效。
+% |section| 和 |subsection| 这三层级别,并且 \opt{runin}, \opt{afterindent},
+% \opt{fixskip} 和 \opt{break} 这四个格式无效。
%
% 多级选项之间用斜线分开,例如,\opt{part/name} 选项设置 \tn{part} 标题的在数
% 字前后的名称,而 \opt{section/number} 选项设置 \tn{section} 标题的数字类型。
@@ -1663,6 +1663,25 @@ Copyright and Licence
% 节的完整编号。例如用于帮助定义自定义的目录格式、页眉格式等。
% \end{function}
%
+% \begin{function}[added=2016-09-18]{\CTEXifname}
+% \begin{syntax}
+% \tn{CTEXifname} \Arg{有名字时的格式命令} \Arg{无名字时的格式命令}
+% \end{syntax}
+% \tn{CTEXifname} 用于根据当前章节的名字的有无设置不同的格式。
+%
+% 它可用于 \opt{format}, \opt{titleformat}, \opt{aftertitle}, \opt{afterskip},
+% \opt{indent} 这五个选项和 \tn{chapter} 标题 \opt{beforeskip} 选项的格式设置之中。
+% 也可用于帮助定义自定义的目录格式、页眉格式等。
+%
+% 例如,设置章的标题有名字时左对齐,无名字时居中对齐,并且在标题后画一条横线。
+% \begin{ctexexam}
+% \ctexset{
+% chapter/format = \CTEXifname{\raggedright}{\centering},
+% chapter/aftertitle = \par\CTEXifname{}{\hrule},
+% }
+% \end{ctexexam}
+% \end{function}
+%
% \begin{function}[EXP,updated=2015-06-30]{.../format, .../format+}
% \begin{syntax}
% format = \Arg{格式命令}
@@ -1674,13 +1693,13 @@ Copyright and Licence
% 带加号的 \opt{format+} 选项则用于在已有格式之后追加新的格式命令。
%
% 例如,设置章格式为无衬线字体左对齐,为节格式增加无衬线字体设置:
-% \end{function}
% \begin{ctexexam}
% \ctexset{
% chapter/format = \sffamily\raggedright,
% section/format += \sffamily
% }
% \end{ctexexam}
+% \end{function}
%
% \begin{table}[htbp]
% \small\centering
@@ -2116,6 +2135,43 @@ Copyright and Licence
% \end{tabular}
% \end{table}
%
+% \begin{function}[EXP,added=2016-09-19]{.../break, .../break+}
+% \begin{syntax}
+% break = \Arg{格式命令}
+% break+= \Arg{格式命令}
+% \end{syntax}
+% \opt{break} 选项用于控制章节标题与之前正文的分隔关系。一般用于设置是否在标题之前分页或者设置行间罚点。
+%
+% 带加号的 \opt{break+} 选项则用于在已有格式之后追加新的格式命令。
+%
+% \opt{break} 选项的默认值,在 \opt{scheme} 选项的不同取值下相同。
+%
+% 例如,若当前页剩余高度小于正文高度的一半时,则另起一页输出 \tn{section} 标题:
+% \begin{ctexexam}
+% \usepackage{needspace}
+% \ctexset{section/break = \Needspace{.5\textheight}}
+% \end{ctexexam}
+% \end{function}
+%
+% \begin{table}[htbp]
+% \small\centering
+% \caption{\opt{break} 选项的默认设置}
+% \begin{tabular}{ll}
+% \toprule
+% 标题名 & 默认值 \\
+% \midrule
+% part (article) & |{}| \\
+% part & |\if@openright\cleardoublepage\else\clearpage\fi| \\
+% chapter & 同上 \\
+% section & |\addpenalty{\@secpenalty}| \\
+% subsection & 同上 \\
+% subsubsection & 同上 \\
+% paragraph & 同上 \\
+% subparagraph & 同上 \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+%
% \begin{function}[EXP,added=2015-06-21]{appendix/numbering}
% \begin{syntax}
% numbering = \TTF
@@ -2939,12 +2995,13 @@ Copyright and Licence
%
% \subsection{内部函数与变量}
%
-% \begin{variable}[int]{\l_@@_tmp_tl,\l_@@_tmp_int,\l_@@_tmp_dim,\l_@@_tmp_box}
+% \begin{variable}[int]{\l_@@_tmp_tl,\l_@@_tmp_int,\l_@@_tmp_box,\l_@@_tmp_dim}
+% 临时变量。
% \begin{macrocode}
\tl_new:N \l_@@_tmp_tl
\int_new:N \l_@@_tmp_int
-%<!ctexheading>\dim_new:N \l_@@_tmp_dim
\box_new:N \l_@@_tmp_box
+%<!ctexheading>\dim_new:N \l_@@_tmp_dim
% \end{macrocode}
% \end{variable}
%
@@ -3637,9 +3694,9 @@ Copyright and Licence
%<*pdftex|uptex|aptex>
\cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1
{
- \AtBeginDvi { #1 }
+ \AtBeginDvi {#1}
\ctex_at_end_package:nn { atbegshi }
- { \AtBeginShipoutFirst { #1 } }
+ { \AtBeginShipoutFirst {#1} }
}
\@onlypreamble \ctex_set_zhmap:n
%</pdftex|uptex|aptex>
@@ -3747,12 +3804,32 @@ Copyright and Licence
\tl_set:Nn \CJKrmdefault {#1}
\tl_set:Nn \CJKsfdefault {#2}
\tl_set:Nn \CJKttdefault {#3}
- \ctex_set_zhmap:n { \file_input:n {#4} }
+ \ctex_set_zhmap:n { \ctex_zhmap_input:n {#4} }
}
\@onlypreamble \ctex_load_zhmap:nnnn
% \end{macrocode}
% \end{macro}
%
+% \changes{v2.4.4}{2016/09/09}{解决 \opt{zhmap} 文件的 \tn{catcode} 问题。}
+% \begin{macro}[int]{\ctex_zhmap_input:n}
+% 载入字体映射文件时,确认 |%| 和 |\| 的 \tn{catcode}。
+% \begin{macrocode}
+ \cs_new_protected_nopar:Npn \ctex_zhmap_input:n #1
+ {
+ \ctex_file_wrapper:nnn
+ {
+ \char_set_catcode_comment:n { 37 } % %
+ \char_set_catcode_escape:n { 92 } % \
+ }
+ { \file_input:n {#1} }
+ {
+ \char_set_catcode:nn { 37 } { \char_value_catcode:n { 37 } }
+ \char_set_catcode:nn { 92 } { \char_value_catcode:n { 92 } }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
\tl_if_exist:NF \CJKfamilydefault
{ \tl_const:Nn \CJKfamilydefault { \CJKrmdefault } }
@@ -4042,12 +4119,12 @@ Copyright and Licence
%<*xetex>
% \end{macrocode}
%
+% \changes{v2.4.4}{2016/09/12}{不再默认设置 \pkg{xeCJK} 的伪粗体。}
% \begin{macrocode}
\RequirePackage { xeCJK }
\exp_args:Nx \xeCJKsetup
{
LoadFandol = false ,
- AutoFakeBold = true ,
PunctStyle = \l_@@_punct_tl
}
% \end{macrocode}
@@ -4132,7 +4209,7 @@ Copyright and Licence
local s = kpse.find_file('ltj-kinsoku.lua', 'tex')
luatexja.stack.charprop_stack_table[0] = s and dofile(s) or {}
}
-\ltjsetparameter{kanjiskip=\z@ plus .4pt minus .4pt,
+\ltjsetparameter{kanjiskip=\z@ plus .4pt minus .5pt,
xkanjiskip=.25\zw plus 1pt minus 1pt,
autospacing, autoxspacing, jacharrange={-1},
yalbaselineshift=\z@, yjabaselineshift=\z@,
@@ -5920,9 +5997,7 @@ Copyright and Licence
%<*uptex|aptex>
\ctex_hypersetup:n { driverfallback = dvipdfmx }
\ctex_at_end_package:nn { hyperref }
- {
- \AtBeginShipoutFirst{ \special{ pdf:tounicode~ UTF8-UTF16 } }
- }
+ { \AtBeginShipoutFirst { \special { pdf:tounicode~ UTF8-UTF16 } } }
%</uptex|aptex>
% \end{macrocode}
%
@@ -6704,6 +6779,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}。}
+% \changes{v2.4.4}{2016/09/19}{新的标题格式选项 \opt{break}。}
%
% \begin{macro}[int]{\@@_def_heading_keys:n}
% \begin{macrocode}
@@ -6729,6 +6805,9 @@ Copyright and Licence
#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 / break .tl_set:N = \exp_not:c { CTEX@#1@break } ,
+ #1 / break+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@break } { ####1 } } ,
%</article|book|report>
#1 / format+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
@@ -6817,15 +6896,6 @@ Copyright and Licence
%
% \subsubsection{标准标题命令的修改}
%
-% \begin{macro}[int]{\CTEX@makeheadinganchor}
-% 用于 |numbering=false| 时,设置超链接跳转描点。
-% \begin{macrocode}
-\cs_new_protected_nopar:Npn \CTEX@makeheadinganchor { }
-\ctex_at_end_package:nn { hyperref }
- { \cs_gset_protected_nopar:Npn \CTEX@makeheadinganchor { \phantomsection } }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}[int]{\CTEX@fixtopskip}
% 修正 \cls{book} 和 \cls{report} 类的 \tn{part} 和 \tn{chapter} 标题之前的多余空行。
% \begin{macrocode}
@@ -6859,6 +6929,29 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
+% \changes{v2.4.4}{2016/09/18}{提供 \tn{partmark}。}
+% \begin{macro}[int]{\partmark}
+% 提供 \tn{partmark}。
+% \begin{macrocode}
+\ProvideDocumentCommand \partmark { m }
+ { \markboth { } { } }
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v2.4.4}{2016/09/19}{提供 \tn{CTEXifname}。}
+% \begin{macro}{\CTEXifname}
+% \begin{macro}[int]{\CTEX@ifnametrue,\CTEX@ifnamefalse}
+% 用于判断当前标题是否有编号。
+% \begin{macrocode}
+\cs_new_eq:NN \CTEXifname \use_i:nn
+\cs_new_protected_nopar:Npn \CTEX@ifnametrue
+ { \cs_set_eq:NN \CTEXifname \use_i:nn }
+\cs_new_protected_nopar:Npn \CTEX@ifnamefalse
+ { \cs_set_eq:NN \CTEXifname \use_ii:nn }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \changes{v2.2}{2015/06/27}{\opt{beforeskip}、\opt{afterskip} 和 \opt{indent}
% 选项支持表达式。}
%
@@ -6877,6 +6970,7 @@ Copyright and Licence
\renewcommand\part{%
\if@noskipsec \leavevmode \fi
\par
+ \CTEX@part@break
% \addvspace{4ex}%
\CTEX@setheadingskip \CTEX@part@beforeskip
\ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi
@@ -6890,11 +6984,12 @@ Copyright and Licence
%</article>
%<*book|report>
\renewcommand\part{%
- \if@openright
- \cleardoublepage
- \else
- \clearpage
- \fi
+% \if@openright
+% \cleardoublepage
+% \else
+% \clearpage
+% \fi
+ \CTEX@part@break
% \thispagestyle{plain}%
\thispagestyle{\CTEX@part@pagestyle}%
\if@twocolumn
@@ -6918,14 +7013,18 @@ Copyright and Licence
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
\ifodd \CTEX@part@numbering
+ \CTEX@ifnametrue
\refstepcounter{part}%
% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
\addcontentsline{toc}{part}{\CTEXthepart\hspace{1em}#1}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{part*}%
\addcontentsline{toc}{part}{#1}%
\fi
\else
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@part{part*}%
\addcontentsline{toc}{part}{#1}%
\fi
{\interlinepenalty \@M
@@ -6937,7 +7036,8 @@ Copyright and Licence
\fi \fi
% \huge\bfseries #2%
\CTEX@part@titleformat{#2}%
- \markboth{}{}%
+% \markboth{}{}%
+ \partmark{#1}%
\CTEX@part@aftertitle}%
\nobreak
% \vskip 3ex
@@ -6950,17 +7050,22 @@ Copyright and Licence
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\ifodd \CTEX@part@numbering
+ \CTEX@ifnametrue
\refstepcounter{part}%
% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
\addcontentsline{toc}{part}{\CTEXthepart\hspace{1em}#1}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{part*}%
\addcontentsline{toc}{part}{#1}%
\fi
\else
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@part{part*}%
\addcontentsline{toc}{part}{#1}%
\fi
- \markboth{}{}%
+% \markboth{}{}%
+ \partmark{#1}%
{\interlinepenalty \@M
% \normalfont \centering
\normalfont \CTEX@part@format
@@ -6980,6 +7085,8 @@ Copyright and Licence
% \begin{macrocode}
%<*article>
\def\@spart#1{%
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@spart{part*}%
{\interlinepenalty \@M
% \normalfont \parindent \z@ \raggedright
\normalfont \parindent \dimexpr \CTEX@part@indent \relax
@@ -6996,6 +7103,8 @@ Copyright and Licence
%</article>
%<*book|report>
\def\@spart#1{%
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@spart{part*}%
{\interlinepenalty \@M
% \normalfont \centering
\normalfont \CTEX@part@format
@@ -7038,8 +7147,10 @@ Copyright and Licence
%
% \begin{macro}[int]{\chapter}
% \begin{macrocode}
-\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
+\renewcommand\chapter{%
+% \if@openright\cleardoublepage\else\clearpage\fi
% \thispagestyle{plain}%
+ \CTEX@chapter@break
\thispagestyle{\CTEX@chapter@pagestyle}%
\global\@topnum\z@
% \@afterindentfalse
@@ -7058,6 +7169,7 @@ Copyright and Licence
\ifnum \c@secnumdepth >\m@ne
%<book> \if@mainmatter
\ifodd \CTEX@chapter@numbering
+ \CTEX@ifnametrue
\refstepcounter{chapter}%
% \typeout{\@chapapp\space\thechapter.}%
\typeout{\CTEXthechapter}%
@@ -7065,13 +7177,18 @@ Copyright and Licence
% {\protect\numberline{\thechapter}#1}%
{\protect\numberline{\CTEXthechapter\hspace{0.3em}}#1}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{\Hy@chapapp*}%
\addcontentsline{toc}{chapter}{#1}%
\fi
%<book> \else
+%<book> \CTEX@ifnamefalse
+%<book> \CTEX@makeanchor@chapter{\Hy@chapapp*}%
%<book> \addcontentsline{toc}{chapter}{#1}%
%<book> \fi
\else
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@chapter{\Hy@chapapp*}%
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
@@ -7086,6 +7203,20 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}[int]{\@schapter}
+% \begin{macrocode}
+\def\@schapter#1{%
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@schapter{\Hy@chapapp*}%
+ \if@twocolumn
+ \@topnewpage[\@makeschapterhead{#1}]%
+ \else
+ \@makeschapterhead{#1}%
+ \@afterheading
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}[int]{\@makechapterhead}
% \begin{macrocode}
\def\@makechapterhead#1{%
@@ -7096,14 +7227,12 @@ Copyright and Licence
% {\normalfont \parindent \z@ \raggedright
{\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax
\CTEX@chapter@format
- \ifnum \c@secnumdepth >\m@ne
-%<book> \if@mainmatter
- \ifodd \CTEX@chapter@numbering
-% \huge\bfseries\@chapapp\space\thechapter\par\nobreak\vskip 20\p@
- \CTEX@chaptername \CTEX@chapter@aftername
- \fi
-%<book> \fi
- \fi
+% \ifnum \c@secnumdepth >\m@ne
+% \if@mainmatter
+% \huge\bfseries\@chapapp\space\thechapter\par\nobreak\vskip 20\p@
+% \fi
+% \fi
+ \CTEXifname{\CTEX@chaptername\CTEX@chapter@aftername}{}%
\interlinepenalty\@M
% \Huge \bfseries #1\par\nobreak
\CTEX@chapter@titleformat{#1}%
@@ -7166,13 +7295,13 @@ Copyright and Licence
\everypar{}%
\else
% \addpenalty\@secpenalty\addvspace\@tempskipa
- \addpenalty\@secpenalty
+ \csname CTEX@#1@break\endcsname
\CTEX@setheadingskip{#4}%
\ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi
\addvspace \CTEX@headingskip
\fi
\@ifstar
- {\@ssect{#3}{#4}{#5}{#6}}%
+ {\CTEX@makeanchor@ssect{#1*}\@ssect{#3}{#4}{#5}{#6}}%
{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
% \end{macrocode}
% \end{macro}
@@ -7181,7 +7310,8 @@ Copyright and Licence
% \begin{macrocode}
\def\@seccntformat#1{%
% \csname the#1\endcsname\quad}%
- \csname CTEX@#1name\endcsname \csname CTEX@#1@aftername\endcsname}
+ \csname CTEX@#1name\endcsname
+ \csname CTEX@#1@aftername\endcsname}
% \end{macrocode}
% \end{macro}
%
@@ -7189,13 +7319,17 @@ Copyright and Licence
% \begin{macrocode}
\def\@sect#1#2#3#4#5#6[#7]#8{%
\ifnum #2>\c@secnumdepth
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@sect{#1*}%
\let\@svsec\@empty
\else
\ifodd \csname CTEX@#1@numbering\endcsname
+ \CTEX@ifnametrue
\refstepcounter{#1}%
\protected@edef\@svsec{\@seccntformat{#1}\relax}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{#1*}%
\let\@svsec\@empty
\fi
\fi
@@ -7212,12 +7346,10 @@ Copyright and Licence
\endgroup
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth \else
- \ifodd \csname CTEX@#1@numbering\endcsname
-% \protect\numberline{\csname the#1\endcsname}%
- \protect\numberline{\csname CTEXthe#1\endcsname}%
- \fi
- \fi
+% \ifnum #2>\c@secnumdepth \else
+% \protect\numberline{\csname the#1\endcsname}%
+% \fi
+ \CTEXifname{\protect\numberline{\csname CTEXthe#1\endcsname}}{}%
#7}%
\else
\def\@svsechd{%
@@ -7228,12 +7360,10 @@ Copyright and Licence
\csname CTEX@#1@aftertitle\endcsname}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth \else
- \ifodd \csname CTEX@#1@numbering\endcsname
-% \protect\numberline{\csname the#1\endcsname}%
- \protect\numberline{\csname CTEXthe#1\endcsname}%
- \fi
- \fi
+% \ifnum #2>\c@secnumdepth \else
+% \protect\numberline{\csname the#1\endcsname}%
+% \fi
+ \CTEXifname{\protect\numberline{\csname CTEXthe#1\endcsname}}{}%
#7}}%
\fi
\@xsect{#5}}
@@ -7243,6 +7373,7 @@ Copyright and Licence
% \begin{macro}[int]{\@ssect}
% \begin{macrocode}
\def\@ssect#1#2#3#4#5{%
+ \CTEX@ifnamefalse
% \@tempskipa #3\relax
% \ifdim \@tempskipa>\z@
\unless \ifodd \CTEX@runin
@@ -7377,6 +7508,76 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
+% \paragraph{设置 \pkg{hyperref} 宏包的标题锚点}
+%
+% \changes{v2.4.4}{2016/09/12}{改进 \pkg{hyperref} 宏包的标题锚点设置。}
+%
+% \begin{macro}[int]{\CTEX@makeanchor}
+% 设置超链接跳转锚点,在 \pkg{hyperref} 载入后才有意义。
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \CTEX@makeanchor #1
+ { }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{variable}[int]{\c_@@_headings_cs_seq}
+% 保存内部标题命令的 \CTeX{} 定义,用于随后比较。
+% \begin{macrocode}
+\seq_new:N \c_@@_headings_cs_seq
+\seq_gset_from_clist:Nn \c_@@_headings_cs_seq
+%<article> { part , spart , sect , ssect }
+%<book|report> { part , spart , chapter , schapter , sect , ssect }
+\seq_map_inline:Nn \c_@@_headings_cs_seq
+ {
+ \cs_new_eq:cc { CTEX@ #1 } { @ #1 }
+ \cs_new_eq:cN { CTEX@makeanchor@ #1 } \CTEX@makeanchor
+ }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}[int]{\CTEX@hyperheadinghook}
+% \pkg{hyperref} 会重定义内部标题命令,目的在于为没有编号的标题设置锚点(这一功能受他的
+% \opt{implicit} 选项的控制)。我们在上面对标题命令的修改已经包含这一功能,如果这些标题命令在
+% \pkg{hyperref} 载入之前没有被修改过,则恢复 \CTeX{} 的定义。
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \CTEX@hyperheadinghook
+ {
+ \group_begin:
+ \ifHy@implicit
+ \cs_set_eq:NN \H@old@chapter \Hy@org@chapter
+ \seq_map_inline:Nn \c_@@_headings_cs_seq
+ {
+ \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 }
+ {
+ \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 }
+ \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor
+ }
+ }
+ \else:
+ \seq_map_inline:Nn \c_@@_headings_cs_seq
+ { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor }
+ \fi:
+ \group_end:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\ctex_at_end_package:nn { hyperref }
+ {
+ \cs_gset_protected_nopar:Npn \CTEX@makeanchor #1
+ {
+ \Hy@MakeCurrentHrefAuto {#1}
+ \Hy@raisedlink
+ {
+ \hyper@anchorstart { \@currentHref }
+ \hyper@anchorend
+ }
+ }
+ \CTEX@hyperheadinghook
+ }
+% \end{macrocode}
+%
% \paragraph{兼容 \pkg{titlesec} 宏包}
%
% 我们修改了 \tn{@startsection} 的定义,它的第四个(\meta{beforeskip})和
@@ -7477,6 +7678,36 @@ Copyright and Licence
}
% \end{macrocode}
%
+% \changes{v2.4.4}{2016/09/13}{使用 \pkg{titlesec} 时,章节目录也使用 \CTeX{} 的编号。}
+% 让编译时终端显示 \tn{CTEXthechapter},目录使用 |\CTEXtheXXX| 编号。
+% \begin{macrocode}
+\ctex_at_end_package:nn { titlesec }
+ {
+%<*book|report>
+ \tl_set:Nn \ttl@chapterout { \typeout { \CTEXthechapter } }
+%</book|report>
+ \cs_if_free:NF \ttl@tocpart
+ {
+ \cs_set_protected_nopar:Npn \ttl@tocpart
+ { \tl_set:Nn \ttl@a { \CTEXthepart \hspace { 1em } } }
+ }
+ \seq_map_inline:Nn \c_@@_headings_seq
+ {
+ \cs_if_exist:cF { ttl@toc #1 }
+ {
+ \cs_new_protected_nopar:cpx { ttl@toc #1 }
+ {
+ \tl_set:Nn \exp_not:N \ttl@a
+ {
+ \exp_not:N \protect
+ \exp_not:N \numberline { \exp_not:c { CTEXthe #1 } }
+ }
+ }
+ }
+ }
+ }
+% \end{macrocode}
+%
% \paragraph{兼容 \pkg{titleps} 宏包}
%
% \changes{v2.3}{2015/12/25}{兼容 \pkg{titleps} 宏包。}
@@ -7546,6 +7777,24 @@ Copyright and Licence
% \end{verbatim}
% 但 \tn{newtitlemark} 不包含章节间的层次信息,功能上不及修改内部命令完整。
%
+% \begin{macro}[int]{\ttl@setifthe}
+% 使 |\iftheXXX| 等命令在页眉设置中可用。
+% \begin{macrocode}
+\ctex_at_end_package:nn { titleps }
+ {
+ \cs_set_protected_nopar:Npn \ttl@setifthe #1
+ {
+ \exp_args:Nco \cs_set_nopar:Npn { ifthe #1 }
+ {
+ \CTEXifname
+ { \protect \@firstoftwo }
+ { \protect \@secondoftwo }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
%
% \subsubsection{目录标签的宽度}
%
@@ -7591,22 +7840,26 @@ Copyright and Licence
% \begin{macrocode}
%<*article>
\ctex_patch_cmd:Nnn \ps@headings
- { \thesection \quad }
- { \ifodd \CTEX@section@numbering \CTEXthesection \quad \fi }
+ { \ifnum \c@secnumdepth > \z@ \thesection \quad \fi }
+ { \CTEXifname { \CTEXthesection \quad } { } }
\if@twoside
\ctex_patch_cmd:Nnn \ps@headings
- { \thesubsection \quad }
- { \ifodd \CTEX@subsection@numbering \CTEXthesubsection \quad \fi }
+ { \ifnum \c@secnumdepth > \@ne \thesubsection \quad \fi }
+ { \CTEXifname { \CTEXthesubsection \quad } { } }
\fi:
%</article>
%<*book|report>
\ctex_patch_cmd:Nnn \ps@headings
- { \@chapapp\ \thechapter.~\ }
- { \ifodd \CTEX@chapter@numbering \CTEXthechapter \quad \fi }
+ {
+ \ifnum \c@secnumdepth > \m@ne \if@mainmatter
+ \@chapapp \ \thechapter . ~ \
+ \fi \fi
+ }
+ { \CTEXifname { \CTEXthechapter \quad } { } }
\if@twoside
\ctex_patch_cmd:Nnn \ps@headings
- { \thesection.~\ }
- { \ifodd \CTEX@section@numbering \CTEXthesection \quad \fi }
+ { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi }
+ { \CTEXifname { \CTEXthesection } { } }
\fi:
%</book|report>
% \end{macrocode}
@@ -7622,20 +7875,19 @@ Copyright and Licence
{
%<*article>
\ctex_patch_cmd:Nnn \ps@fancy
- { \thesection \hskip 1em \relax }
- { \ifodd \CTEX@section@numbering \CTEXthesection \quad \fi }
+ { \ifnum \c@secnumdepth > \z@ \thesection \hskip 1em \relax \fi }
+ { \CTEXifname { \CTEXthesection \quad } { } }
\ctex_patch_cmd:Nnn \ps@fancy
- { \thesubsection \hskip 1em \relax }
- { \ifodd \CTEX@subsection@numbering \CTEXthesubsection \quad \fi }
+ { \ifnum \c@secnumdepth > \@ne \thesubsection \hskip 1em \relax \fi }
+ { \CTEXifname { \CTEXthesubsection \quad } { } }
%</article>
%<*book|report>
\ctex_patch_cmd:Nnn \ps@fancy
- { \@chapapp\ \thechapter.~\ }
-%<book> { \if@mainmatter \ifodd \CTEX@chapter@numbering \CTEXthechapter \quad \fi \fi }
-%<report> { \ifodd \CTEX@chapter@numbering \CTEXthechapter \quad \fi }
+ { \ifnum \c@secnumdepth > \m@ne \@chapapp \ \thechapter . ~ \ \fi }
+ { \CTEXifname { \CTEXthechapter \quad } { } }
\ctex_patch_cmd:Nnn \ps@fancy
- { \thesection.~\ }
- { \ifodd \CTEX@section@numbering \CTEXthesection \quad \fi }
+ { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi }
+ { \CTEXifname { \CTEXthesection } { } }
%</book|report>
}
% \end{macrocode}
@@ -7862,6 +8114,7 @@ Copyright and Licence
beforeskip = 0pt \@plus 1fil ,
afterskip = 0pt \@plus 1fil ,
pagestyle = plain ,
+ break = \if@openright \cleardoublepage \else \clearpage \fi ,
%<*plain>
format = \centering ,
nameformat = \huge \bfseries ,
@@ -7889,6 +8142,7 @@ Copyright and Licence
aftertitle = \par ,
beforeskip = 50 \p@ ,
afterskip = 40 \p@ ,
+ break = \if@openright \cleardoublepage \else \clearpage \fi ,
%<*plain>
name = \chaptername \space ,
number = \thechapter ,
@@ -7922,6 +8176,7 @@ Copyright and Licence
beforeskip = 3.5ex \@plus 1ex \@minus .2ex ,
afterskip = 2.3ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
%<*plain>
format = \Large \bfseries ,
afterindent = false
@@ -7957,6 +8212,7 @@ Copyright and Licence
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1.5ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
%<*plain>
afterindent = false
%</plain>
@@ -7996,6 +8252,7 @@ Copyright and Licence
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1.5ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
%<*plain>
afterindent = false
%</plain>
@@ -8012,6 +8269,7 @@ Copyright and Licence
format = \normalsize \bfseries ,
aftername = \quad ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
+ break = \addpenalty \@secpenalty ,
%<*plain>
afterindent = false
%</plain>
@@ -8028,6 +8286,7 @@ Copyright and Licence
format = \normalsize \bfseries ,
aftername = \quad ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
+ break = \addpenalty \@secpenalty ,
%<*plain>
afterindent = false
%</plain>
@@ -9506,7 +9765,7 @@ Copyright and Licence
% \begin{macrocode}
%<*windows>
\ProvidesFile{zhwindowsfonts.tex}%
- [2016/08/27 v2.4.3 Windows font map loader for pdfTeX and DVIPDFMx (CTEX)]
+ [2016/09/21 v2.4.4 Windows font map loader for pdfTeX and DVIPDFMx (CTEX)]
\ifzhmappdf
\pdfmapline{=gbk@UGBK@ <simsun.ttc}
@@ -9578,7 +9837,7 @@ Copyright and Licence
% \begin{macrocode}
%<*adobe>
\ProvidesFile{zhadobefonts.tex}%
- [2016/08/27 v2.4.3 Adobe font map loader for DVIPDFMx (CTEX)]
+ [2016/09/21 v2.4.4 Adobe font map loader for DVIPDFMx (CTEX)]
\ifzhmappdf
%% pdfTeX does not support OTF fonts
@@ -9614,7 +9873,7 @@ Copyright and Licence
% \begin{macrocode}
%<*fandol>
\ProvidesFile{zhfandolfonts.tex}%
- [2016/08/27 v2.4.3 Fandol font map loader for DVIPDFMx (CTEX)]
+ [2016/09/21 v2.4.4 Fandol font map loader for DVIPDFMx (CTEX)]
\ifzhmappdf
%% pdfTeX does not support OTF fonts
@@ -9650,7 +9909,7 @@ Copyright and Licence
% \begin{macrocode}
%<*founder>
\ProvidesFile{zhfounderfonts.tex}%
- [2016/08/27 v2.4.3 Founder font map loader for pdfTeX and DVIPDFMx (CTEX)]
+ [2016/09/21 v2.4.4 Founder font map loader for pdfTeX and DVIPDFMx (CTEX)]
\ifzhmappdf
\pdfmapline{=gbk@UGBK@ <FZSSK.TTF}
@@ -9722,7 +9981,7 @@ Copyright and Licence
% \begin{macrocode}
%<*ubuntu>
\ProvidesFile{zhubuntufonts.tex}%
- [2016/08/27 v2.4.3 Ubuntu font map loader for pdfTeX and DVIPDFMx (CTEX)]
+ [2016/09/21 v2.4.4 Ubuntu font map loader for pdfTeX and DVIPDFMx (CTEX)]
\ifzhmappdf
\pdfmapline{=gbk@UGBK@ <uming.ttc}
@@ -10555,6 +10814,7 @@ Copyright and Licence
\RequirePackage{xcolor}
\RequirePackage{caption}
\RequirePackage{fvrb-ex}
+\RequirePackage{zref-base}
\geometry{includemp,hmargin={0mm,15mm},vmargin={25mm,15mm},footskip=7mm}
\hypersetup{pdfstartview=FitH,bookmarksdepth=subparagraph}
\setcounter{secnumdepth}{4}
@@ -10563,6 +10823,7 @@ Copyright and Licence
\setmainfont{TeX Gyre Pagella}
\setsansfont{TeX Gyre Heros}
\setmonofont[
+ HyphenChar = None ,
UprightFont=* Light, BoldFont=* Bold,
SlantedFont=* Light Oblique]{CMU Typewriter Text}
\setmathfont{texgyrepagella-math.otf}
@@ -10663,10 +10924,6 @@ Copyright and Licence
\AfterEndEnvironment{function}{\ctexfixprevdepth}
\AtBeginEnvironment{syntax}{\linespread{1}\ctexplainps\ctexdisableecglue}
\BeforeBeginEnvironment{SideBySideExample}{\par\addvspace{\medskipamount}}
-\preto\MacroFont{\linespread{1}}
-\appto\MacroFont{\hyphenchar\font\m@ne\ctexdocverbaddon}
-\preto\AltMacroFont{\linespread{1}}
-\appto\AltMacroFont{\hyphenchar\font\m@ne\ctexdocverbaddon}
\newcommand*\exptarget{\Hy@raisedlink{\hypertarget{expstar}{}}}
\newcommand*\rexptarget{\Hy@raisedlink{\hypertarget{rexpstar}{}}}
\newcommand*\expstar{\hyperlink{expstar}{$\star$}}
@@ -10712,29 +10969,57 @@ Copyright and Licence
{ \MacroFont \hbox:n }
{ \iow_term:n { *** ~ SUCCESS ~ *** } }
{ \iow_term:n { *** ~ FAIL ~ *** } }
-\ctex_patch_cmd_once:NnnnTF \__codedoc_macro_typeset_one:nN
- { }
- { \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 ~ *** } }
+\cs_set_eq:NN \__codedoc_macro_end_style:n \use_none:n
+\cs_set_protected:Npn \__codedoc_macro_typeset_one:nN #1#2
+ {
+ \vbox_set:Nn \l__codedoc_macro_box
+ {
+ \MacroFont
+ \vbox_unpack_clear:N \l__codedoc_macro_box
+ \hbox_set:Nn \l_tmpa_box
+ { \__codedoc_print_macroname:nN {#1} #2 }
+ \dim_set:Nn \l_tmpa_dim { \marginparwidth - \labelsep }
+ \dim_compare:nNnT { \box_wd:N \l_tmpa_box } > \l_tmpa_dim
+ {
+ \box_resize_to_wd_and_ht:Nnn \l_tmpa_box
+ { \l_tmpa_dim }
+ { \box_ht:N \l_tmpa_box }
+ }
+ \hbox_overlap_left:n
+ {
+ \box_use:N \l_tmpa_box
+ \skip_horizontal:n { \marginparsep - \labelsep }
+ }
+ }
+ \int_incr:N \l__codedoc_macro_int
+ }
+\cs_set_protected:Npn \__codedoc_print_macroname:nN #1#2
+ {
+ \strut
+ \__codedoc_get_hyper_target:xN
+ {
+ \exp_not:n {#1}
+ \bool_if:NT #2 { \tl_to_str:n {TF} }
+ }
+ \l__codedoc_tmpa_tl
+ \cs_if_exist:cTF { r@ \l__codedoc_tmpa_tl }
+ { \exp_args:NNo \label@hyperref [ \l__codedoc_tmpa_tl ] }
+ { \use:n }
+ {
+ \tl_set:Nn \l__codedoc_tmpa_tl {#1}
+ \tl_replace_all:Non \l__codedoc_tmpa_tl
+ { \c_catcode_other_space_tl }
+ { \fontspec_visible_space: }
+ \__codedoc_macroname_prefix:o \l__codedoc_tmpa_tl
+ \__codedoc_macroname_suffix:N #2
+ }
+ }
\AtBeginEnvironment { syntax }
{
\char_set_catcode_active:N \|
@@ -10769,9 +11054,6 @@ Copyright and Licence
{ \fileinfo }
}
\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
{
@@ -10790,18 +11072,24 @@ Copyright and Licence
\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
+ \int_zero:N \l_tmpa_int
+ \seq_set_split:Nnn \l_tmpa_seq { . } {#1}
+ \seq_map_function:NN \l_tmpa_seq \@@_version_zfill:n
+ \int_compare:nNnF \l_tmpa_int > \c_two
+ {
+ \tl_put_right:Nx \l_@@_tmp_tl
+ { \prg_replicate:nn { \c_three - \l_tmpa_int } { 00000 } }
+ }
\@@_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
{
+ \int_incr:N \l_tmpa_int
\tl_put_right:Nx \l_@@_tmp_tl
{
\prg_replicate:nn
- { \int_max:nn { 0 } { 10 - \tl_count:n {#1} } } { 0 }
+ { \int_max:nn { 0 } { 5 - \tl_count:n {#1} } } { 0 }
\exp_not:n {#1}
}
}
@@ -10957,7 +11245,7 @@ Copyright and Licence
\tl_gclear:N \g_@@_verbatim_verb_stop_tl
\cs_gset_eq:NN \@@_verbatim_process_line: \@@_process_normal_line:
\@@_output_module:nn
- { slash@guard }
+ { \color { verb@guard } }
{ \@@_module_pop:n { \l_@@_verbatim_line_tl } }
}
{ \tl_use:N \l_@@_verbatim_line_tl }
@@ -10992,45 +11280,39 @@ Copyright and Licence
\cs_new_protected:Npn \@@_module_star:w #1 > #2 \q_stop
{
\@@_output_module:nn
- { star@guard }
+ { \@@_star_color: }
{ \@@_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}
+ \@@_star_format:
}
\cs_new_protected:Npn \@@_module_slash:w #1 > #2 \q_stop
{
\@@_output_module:nn
- { slash@guard }
+ { \@@_slash_color: }
{ \@@_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}
+ \@@_slash_format:
}
\cs_new_protected:Npn \@@_module_at:w @ @ = #1 > #2 \q_stop
{
\@@_output_module:nn
- { at@guard }
+ { \color { 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} }
+ \tex_noindent:D
+ \hbox_overlap_left:n
+ {
+ \@@_output_module:nn
+ { \@@_pm_color: }
+ { \@@_module_angle:n {#1} }
+ \skip_horizontal:n { \leftskip + \smallskipamount }
+ }
\group_begin:
- \int_compare:nNnF \guard@level < \c@StandardModuleDepth
- { \AltMacroFont }
+ \@@_pm_format:
\@@_output_line:n {#2}
\group_end:
}
@@ -11040,7 +11322,7 @@ Copyright and Licence
\tl_gset:Nx \g_@@_verbatim_verb_stop_tl
{ \c_percent_str \tl_tail:n {#1} }
\@@_output_module:nn
- { star@guard }
+ { \color { verb@guard } }
{ \@@_module_push:n { \l_@@_verbatim_line_tl } }
}
\group_end:
@@ -11088,43 +11370,141 @@ Copyright and Licence
\group_end:
}
\cs_new_protected_nopar:Npn \@@_module_push:n
- { \exp_args:Nx \@@_module_push_aux:nn { \int_use:N \c@HD@hypercount } }
+ { \exp_args:No \@@_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 }
+ \hypersetup { hidelinks }
+ \exp_args:Nx \hdclindex
+ { \zref@extractdefault { HD.#1 } { guard@end } { 1 } } { }
}
\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 } { }
- }
+ { \exp_args:No \@@_module_pop_aux:nn { \l_@@_tmp_tl } }
{ \BOOM \use:n }
}
+\cs_new_protected:Npn \@@_module_pop_aux:nn #1
+ {
+ \zref@labelbylist { HD.#1 } { ctxdoc }
+ \hypersetup { hidelinks }
+ \hdclindex {#1} { }
+ }
\seq_new:N \g_@@_module_dest_seq
+\zref@newlist { ctxdoc }
+\zref@newprop { guard@end } [ 1 ]
+ { \int_eval:n { \c@HD@hypercount - 1 } }
+\zref@addprop { ctxdoc } { guard@end }
+\cs_new_protected_nopar:Npn \@@_star_format:
+ {
+ \seq_gpush:No \g_@@_slash_format_seq { \macro@font }
+ \seq_gpop:NNF \g_@@_star_format_seq \l_@@_format_tl
+ { \@@_pop_format: }
+ \@@_select_format:
+ }
+\cs_new_protected_nopar:Npn \@@_slash_format:
+ {
+ \seq_gpop:NNTF \g_@@_slash_format_seq \l_@@_format_tl
+ {
+ \seq_gpush:No \g_@@_star_format_seq { \macro@font }
+ \@@_select_format:
+ }
+ { \BOOM }
+ }
+\cs_new_protected_nopar:Npn \@@_pm_format:
+ {
+ \seq_get:NNF \g_@@_star_format_seq \l_@@_format_tl
+ {
+ \@@_pop_format:
+ \seq_gpush:No \g_@@_star_format_seq { \l_@@_format_tl }
+ }
+ \cs_if_eq:NNF \macro@font \l_@@_format_tl
+ { \l_@@_format_tl }
+ }
+\cs_new_protected_nopar:Npn \@@_pop_format:
+ {
+ \seq_gpop_left:NN \g_@@_format_seq \l_@@_format_tl
+ \seq_gput_right:No \g_@@_format_seq { \l_@@_format_tl }
+ }
+\cs_new_protected_nopar:Npn \@@_select_format:
+ {
+ \cs_if_eq:NNF \macro@font \l_@@_format_tl
+ {
+ \cs_gset_eq:NN \macro@font \l_@@_format_tl
+ \macro@font
+ }
+ }
+\tl_new:N \l_@@_format_tl
+\seq_new:N \g_@@_format_seq
+\seq_new:N \g_@@_star_format_seq
+\seq_new:N \g_@@_slash_format_seq
+\seq_gput_right:Nn \g_@@_format_seq { \MacroFont }
+\seq_gput_right:Nn \g_@@_format_seq { \AltMacroFont }
+\cs_set_protected:Npn \MacroFont
+ {
+ \linespread { 1 }
+ \small
+ \fontseries { \mddefault }
+ \fontshape { \updefault }
+ \ttfamily
+ \ctexdocverbaddon
+ }
+\cs_set_protected:Npn \AltMacroFont
+ {
+ \linespread { 1 }
+ \small
+ \fontseries { \mddefault }
+ \fontshape { \sldefault }
+ \ttfamily
+ \ctexdocverbaddon
+ }
+\AtBeginDocument
+ {
+ \tl_gset:Nx \macro@font
+ { \seq_item:Nn \g_@@_format_seq { 1 } }
+ }
\cs_new_protected:Npn \@@_output_module:nn #1#2
{
\tex_noindent:D
\group_begin:
- \color {#1} \footnotesize \normalfont \sffamily #2
+ #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 }
+\cs_new_protected_nopar:Npn \@@_star_color:
+ {
+ \seq_gpop:NNTF \g_@@_star_color_seq \current@color
+ { \set@color }
+ { \@@_select_color: }
+ \seq_gpush:No \g_@@_slash_color_seq { \current@color }
+ }
+\cs_new_protected_nopar:Npn \@@_slash_color:
+ {
+ \seq_gpop:NNTF \g_@@_slash_color_seq \current@color
+ {
+ \set@color
+ \seq_gpush:No \g_@@_star_color_seq { \current@color }
+ }
+ { \BOOM }
+ }
+\cs_new_protected_nopar:Npn \@@_pm_color:
+ {
+ \seq_get:NNTF \g_@@_star_color_seq \current@color
+ { \set@color }
+ {
+ \@@_select_color:
+ \seq_gpush:No \g_@@_star_color_seq { \current@color }
+ }
+ }
+\seq_new:N \g_@@_star_color_seq
+\seq_new:N \g_@@_slash_color_seq
+\cs_new_protected_nopar:Npn \@@_select_color:
+ { \color { guard@series!!+ } }
+\definecolorseries { guard@series }
+ { cmyk } { last } { blue } { purple }
+\resetcolorseries [ 3 ] { guard@series }
+\definecolor { verb@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 }
diff --git a/Master/texmf-dist/tex/generic/ctex/zhadobefonts.tex b/Master/texmf-dist/tex/generic/ctex/zhadobefonts.tex
index d9565384f0a..10134d35beb 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/08/27 v2.4.3 Adobe font map loader for DVIPDFMx (CTEX)]
+ [2016/09/21 v2.4.4 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 73326ce4437..cf17cc906af 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/08/27 v2.4.3 Fandol font map loader for DVIPDFMx (CTEX)]
+ [2016/09/21 v2.4.4 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 3f115dd2f2e..5b3a1df97a7 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/08/27 v2.4.3 Founder font map loader for pdfTeX and DVIPDFMx (CTEX)]
+ [2016/09/21 v2.4.4 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 156706f9f79..548ff7b3b6f 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/08/27 v2.4.3 Ubuntu font map loader for pdfTeX and DVIPDFMx (CTEX)]
+ [2016/09/21 v2.4.4 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 40a10931886..c07d356485e 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/08/27 v2.4.3 Windows font map loader for pdfTeX and DVIPDFMx (CTEX)]
+ [2016/09/21 v2.4.4 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 1d631300a0e..558ccad3a8a 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Caption with encoding GBK (CTEX)}
\ProvidesExplFile{ctex-name-gbk.cfg}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 b226723624a..95e11d5419e 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Caption with encoding UTF8 (CTEX)}
\ProvidesExplFile{ctex-name-utf8.cfg}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 5e99dd3dd45..c63478d740e 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Configuration file (CTEX)}
\ProvidesExplFile{\ExplFileName.cfg}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
%%
%%
%%
diff --git a/Master/texmf-dist/tex/latex/ctex/config/ctexopts.cfg b/Master/texmf-dist/tex/latex/ctex/config/ctexopts.cfg
index 2f5774ade62..1711159682a 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Option configuration file (CTEX)}
\ProvidesExplFile{ctexopts.cfg}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 f4105d38f73..b6caf8f1e5e 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Heading modification for article (CTEX)}
\ProvidesExplFile{ctex-article.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
\seq_new:N \c__ctex_section_headings_seq
\seq_gset_from_clist:Nn \c__ctex_section_headings_seq
{ section , subsection , subsubsection , paragraph , subparagraph }
@@ -87,6 +87,9 @@
#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 / break .tl_set:N = \exp_not:c { CTEX@#1@break } ,
+ #1 / break+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@break } { ####1 } } ,
#1 / format+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
#1 / nameformat+ .code:n =
@@ -130,9 +133,6 @@
\group_end:
\keys_define:nn { ctex } { \exp_not:o { \l__ctex_tmp_tl } }
}
-\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
@@ -143,9 +143,17 @@
\cs_new_protected_nopar:Npn \CTEX@setheadingskip
{ \skip_set:Nn \l__ctex_heading_skip }
\cs_new_eq:NN \CTEX@headingskip \l__ctex_heading_skip
+\ProvideDocumentCommand \partmark { m }
+ { \markboth { } { } }
+\cs_new_eq:NN \CTEXifname \use_i:nn
+\cs_new_protected_nopar:Npn \CTEX@ifnametrue
+ { \cs_set_eq:NN \CTEXifname \use_i:nn }
+\cs_new_protected_nopar:Npn \CTEX@ifnamefalse
+ { \cs_set_eq:NN \CTEXifname \use_ii:nn }
\renewcommand\part{%
\if@noskipsec \leavevmode \fi
\par
+ \CTEX@part@break
\CTEX@setheadingskip \CTEX@part@beforeskip
\ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi
\addvspace \CTEX@headingskip
@@ -158,13 +166,17 @@
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
\ifodd \CTEX@part@numbering
+ \CTEX@ifnametrue
\refstepcounter{part}%
\addcontentsline{toc}{part}{\CTEXthepart\hspace{1em}#1}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{part*}%
\addcontentsline{toc}{part}{#1}%
\fi
\else
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@part{part*}%
\addcontentsline{toc}{part}{#1}%
\fi
{\interlinepenalty \@M
@@ -173,7 +185,7 @@
\CTEX@partname \CTEX@part@aftername
\fi \fi
\CTEX@part@titleformat{#2}%
- \markboth{}{}%
+ \partmark{#1}%
\CTEX@part@aftertitle}%
\nobreak
\CTEX@setheadingskip \CTEX@part@afterskip
@@ -181,6 +193,8 @@
\vskip \CTEX@headingskip
\@afterheading}
\def\@spart#1{%
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@spart{part*}%
{\interlinepenalty \@M
\normalfont \parindent \dimexpr \CTEX@part@indent \relax
\CTEX@part@format
@@ -203,25 +217,30 @@
\if@nobreak
\everypar{}%
\else
- \addpenalty\@secpenalty
+ \csname CTEX@#1@break\endcsname
\CTEX@setheadingskip{#4}%
\ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi
\addvspace \CTEX@headingskip
\fi
\@ifstar
- {\@ssect{#3}{#4}{#5}{#6}}%
+ {\CTEX@makeanchor@ssect{#1*}\@ssect{#3}{#4}{#5}{#6}}%
{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
\def\@seccntformat#1{%
- \csname CTEX@#1name\endcsname \csname CTEX@#1@aftername\endcsname}
+ \csname CTEX@#1name\endcsname
+ \csname CTEX@#1@aftername\endcsname}
\def\@sect#1#2#3#4#5#6[#7]#8{%
\ifnum #2>\c@secnumdepth
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@sect{#1*}%
\let\@svsec\@empty
\else
\ifodd \csname CTEX@#1@numbering\endcsname
+ \CTEX@ifnametrue
\refstepcounter{#1}%
\protected@edef\@svsec{\@seccntformat{#1}\relax}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{#1*}%
\let\@svsec\@empty
\fi
\fi
@@ -235,11 +254,7 @@
\endgroup
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth \else
- \ifodd \csname CTEX@#1@numbering\endcsname
- \protect\numberline{\csname CTEXthe#1\endcsname}%
- \fi
- \fi
+ \CTEXifname{\protect\numberline{\csname CTEXthe#1\endcsname}}{}%
#7}%
\else
\def\@svsechd{%
@@ -249,15 +264,12 @@
\csname CTEX@#1@aftertitle\endcsname}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth \else
- \ifodd \csname CTEX@#1@numbering\endcsname
- \protect\numberline{\csname CTEXthe#1\endcsname}%
- \fi
- \fi
+ \CTEXifname{\protect\numberline{\csname CTEXthe#1\endcsname}}{}%
#7}}%
\fi
\@xsect{#5}}
\def\@ssect#1#2#3#4#5{%
+ \CTEX@ifnamefalse
\unless \ifodd \CTEX@runin
\begingroup
#4{%
@@ -342,6 +354,48 @@
\gdef \CTEX@postsection { \CTEX@postappendix }
\gdef \CTEX@section@numbering { \CTEX@appendix@numbering }
}
+\cs_new_protected_nopar:Npn \CTEX@makeanchor #1
+ { }
+\seq_new:N \c__ctex_headings_cs_seq
+\seq_gset_from_clist:Nn \c__ctex_headings_cs_seq
+ { part , spart , sect , ssect }
+\seq_map_inline:Nn \c__ctex_headings_cs_seq
+ {
+ \cs_new_eq:cc { CTEX@ #1 } { @ #1 }
+ \cs_new_eq:cN { CTEX@makeanchor@ #1 } \CTEX@makeanchor
+ }
+\cs_new_protected_nopar:Npn \CTEX@hyperheadinghook
+ {
+ \group_begin:
+ \ifHy@implicit
+ \cs_set_eq:NN \H@old@chapter \Hy@org@chapter
+ \seq_map_inline:Nn \c__ctex_headings_cs_seq
+ {
+ \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 }
+ {
+ \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 }
+ \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor
+ }
+ }
+ \else:
+ \seq_map_inline:Nn \c__ctex_headings_cs_seq
+ { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor }
+ \fi:
+ \group_end:
+ }
+\ctex_at_end_package:nn { hyperref }
+ {
+ \cs_gset_protected_nopar:Npn \CTEX@makeanchor #1
+ {
+ \Hy@MakeCurrentHrefAuto {#1}
+ \Hy@raisedlink
+ {
+ \hyper@anchorstart { \@currentHref }
+ \hyper@anchorend
+ }
+ }
+ \CTEX@hyperheadinghook
+ }
\cs_new_protected_nopar:Npn \ctex_titlesec_hook:
{
\@ifpackagewith { titlesec } { explicit }
@@ -409,6 +463,28 @@
{ \ctex_titlesec_hook: }
}
}
+\ctex_at_end_package:nn { titlesec }
+ {
+ \cs_if_free:NF \ttl@tocpart
+ {
+ \cs_set_protected_nopar:Npn \ttl@tocpart
+ { \tl_set:Nn \ttl@a { \CTEXthepart \hspace { 1em } } }
+ }
+ \seq_map_inline:Nn \c__ctex_headings_seq
+ {
+ \cs_if_exist:cF { ttl@toc #1 }
+ {
+ \cs_new_protected_nopar:cpx { ttl@toc #1 }
+ {
+ \tl_set:Nn \exp_not:N \ttl@a
+ {
+ \exp_not:N \protect
+ \exp_not:N \numberline { \exp_not:c { CTEXthe #1 } }
+ }
+ }
+ }
+ }
+ }
\group_begin:
\char_set_catcode_other:N \#
\cs_new_protected_nopar:Npn \ctex_titleps_hook:
@@ -446,6 +522,18 @@
\ctex_at_end_package:nn { titlesec }
{ \cs_if_free:NF \ttl@settopmark { \ctex_titleps_hook: } }
\ctex_at_end_package:nn { titleps } { \ctex_titleps_hook: }
+\ctex_at_end_package:nn { titleps }
+ {
+ \cs_set_protected_nopar:Npn \ttl@setifthe #1
+ {
+ \exp_args:Nco \cs_set_nopar:Npn { ifthe #1 }
+ {
+ \CTEXifname
+ { \protect \@firstoftwo }
+ { \protect \@secondoftwo }
+ }
+ }
+ }
\cs_new_protected:Npn \CTEX@toc@width@n #1
{
\hbox_set:Nn \l__ctex_tmp_box {#1}
@@ -478,21 +566,21 @@
}
}
\ctex_patch_cmd:Nnn \ps@headings
- { \thesection \quad }
- { \ifodd \CTEX@section@numbering \CTEXthesection \quad \fi }
+ { \ifnum \c@secnumdepth > \z@ \thesection \quad \fi }
+ { \CTEXifname { \CTEXthesection \quad } { } }
\if@twoside
\ctex_patch_cmd:Nnn \ps@headings
- { \thesubsection \quad }
- { \ifodd \CTEX@subsection@numbering \CTEXthesubsection \quad \fi }
+ { \ifnum \c@secnumdepth > \@ne \thesubsection \quad \fi }
+ { \CTEXifname { \CTEXthesubsection \quad } { } }
\fi:
\ctex_at_end_package:nn { fancyhdr }
{
\ctex_patch_cmd:Nnn \ps@fancy
- { \thesection \hskip 1em \relax }
- { \ifodd \CTEX@section@numbering \CTEXthesection \quad \fi }
+ { \ifnum \c@secnumdepth > \z@ \thesection \hskip 1em \relax \fi }
+ { \CTEXifname { \CTEXthesection \quad } { } }
\ctex_patch_cmd:Nnn \ps@fancy
- { \thesubsection \hskip 1em \relax }
- { \ifodd \CTEX@subsection@numbering \CTEXthesubsection \quad \fi }
+ { \ifnum \c@secnumdepth > \@ne \thesubsection \hskip 1em \relax \fi }
+ { \CTEXifname { \CTEXthesubsection \quad } { } }
}
\cs_new_protected_nopar:Npn \CTEX@setcurrentlabel@n #1
{
diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-beamer.def b/Master/texmf-dist/tex/latex/ctex/ctex-beamer.def
index eb9639ff63d..8cd85a0ccdd 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Heading modification for beamer (CTEX)}
\ProvidesExplFile{ctex-beamer.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 7a2400e2e55..86392ce643d 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Heading modification for book (CTEX)}
\ProvidesExplFile{ctex-book.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
\seq_new:N \c__ctex_section_headings_seq
\seq_gset_from_clist:Nn \c__ctex_section_headings_seq
{ section , subsection , subsubsection , paragraph , subparagraph }
@@ -88,6 +88,9 @@
#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 / break .tl_set:N = \exp_not:c { CTEX@#1@break } ,
+ #1 / break+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@break } { ####1 } } ,
#1 / format+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
#1 / nameformat+ .code:n =
@@ -135,9 +138,6 @@
\group_end:
\keys_define:nn { ctex } { \exp_not:o { \l__ctex_tmp_tl } }
}
-\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@fixtopskip
{
\CTEX@fixheadingskip
@@ -154,12 +154,15 @@
\cs_new_protected_nopar:Npn \CTEX@setheadingskip
{ \skip_set:Nn \l__ctex_heading_skip }
\cs_new_eq:NN \CTEX@headingskip \l__ctex_heading_skip
+\ProvideDocumentCommand \partmark { m }
+ { \markboth { } { } }
+\cs_new_eq:NN \CTEXifname \use_i:nn
+\cs_new_protected_nopar:Npn \CTEX@ifnametrue
+ { \cs_set_eq:NN \CTEXifname \use_i:nn }
+\cs_new_protected_nopar:Npn \CTEX@ifnamefalse
+ { \cs_set_eq:NN \CTEXifname \use_ii:nn }
\renewcommand\part{%
- \if@openright
- \cleardoublepage
- \else
- \clearpage
- \fi
+ \CTEX@part@break
\thispagestyle{\CTEX@part@pagestyle}%
\if@twocolumn
\onecolumn
@@ -174,16 +177,20 @@
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\ifodd \CTEX@part@numbering
+ \CTEX@ifnametrue
\refstepcounter{part}%
\addcontentsline{toc}{part}{\CTEXthepart\hspace{1em}#1}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{part*}%
\addcontentsline{toc}{part}{#1}%
\fi
\else
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@part{part*}%
\addcontentsline{toc}{part}{#1}%
\fi
- \markboth{}{}%
+ \partmark{#1}%
{\interlinepenalty \@M
\normalfont \CTEX@part@format
\ifnum \c@secnumdepth >-2\relax \ifodd \CTEX@part@numbering
@@ -193,6 +200,8 @@
\CTEX@part@aftertitle}%
\@endpart}
\def\@spart#1{%
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@spart{part*}%
{\interlinepenalty \@M
\normalfont \CTEX@part@format
\CTEX@part@titleformat{#1}%
@@ -213,7 +222,8 @@
\if@tempswa
\twocolumn
\fi}
-\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
+\renewcommand\chapter{%
+ \CTEX@chapter@break
\thispagestyle{\CTEX@chapter@pagestyle}%
\global\@topnum\z@
\ifodd \CTEX@chapter@afterindent
@@ -226,18 +236,24 @@
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\ifodd \CTEX@chapter@numbering
+ \CTEX@ifnametrue
\refstepcounter{chapter}%
\typeout{\CTEXthechapter}%
\addcontentsline{toc}{chapter}
{\protect\numberline{\CTEXthechapter\hspace{0.3em}}#1}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{\Hy@chapapp*}%
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@chapter{\Hy@chapapp*}%
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@chapter{\Hy@chapapp*}%
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
@@ -249,19 +265,22 @@
\@makechapterhead{#2}%
\@afterheading
\fi}
+\def\@schapter#1{%
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@schapter{\Hy@chapapp*}%
+ \if@twocolumn
+ \@topnewpage[\@makeschapterhead{#1}]%
+ \else
+ \@makeschapterhead{#1}%
+ \@afterheading
+ \fi}
\def\@makechapterhead#1{%
\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
- \if@mainmatter
- \ifodd \CTEX@chapter@numbering
- \CTEX@chaptername \CTEX@chapter@aftername
- \fi
- \fi
- \fi
+ \CTEXifname{\CTEX@chaptername\CTEX@chapter@aftername}{}%
\interlinepenalty\@M
\CTEX@chapter@titleformat{#1}%
\CTEX@chapter@aftertitle
@@ -296,25 +315,30 @@
\if@nobreak
\everypar{}%
\else
- \addpenalty\@secpenalty
+ \csname CTEX@#1@break\endcsname
\CTEX@setheadingskip{#4}%
\ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi
\addvspace \CTEX@headingskip
\fi
\@ifstar
- {\@ssect{#3}{#4}{#5}{#6}}%
+ {\CTEX@makeanchor@ssect{#1*}\@ssect{#3}{#4}{#5}{#6}}%
{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
\def\@seccntformat#1{%
- \csname CTEX@#1name\endcsname \csname CTEX@#1@aftername\endcsname}
+ \csname CTEX@#1name\endcsname
+ \csname CTEX@#1@aftername\endcsname}
\def\@sect#1#2#3#4#5#6[#7]#8{%
\ifnum #2>\c@secnumdepth
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@sect{#1*}%
\let\@svsec\@empty
\else
\ifodd \csname CTEX@#1@numbering\endcsname
+ \CTEX@ifnametrue
\refstepcounter{#1}%
\protected@edef\@svsec{\@seccntformat{#1}\relax}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{#1*}%
\let\@svsec\@empty
\fi
\fi
@@ -328,11 +352,7 @@
\endgroup
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth \else
- \ifodd \csname CTEX@#1@numbering\endcsname
- \protect\numberline{\csname CTEXthe#1\endcsname}%
- \fi
- \fi
+ \CTEXifname{\protect\numberline{\csname CTEXthe#1\endcsname}}{}%
#7}%
\else
\def\@svsechd{%
@@ -342,15 +362,12 @@
\csname CTEX@#1@aftertitle\endcsname}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth \else
- \ifodd \csname CTEX@#1@numbering\endcsname
- \protect\numberline{\csname CTEXthe#1\endcsname}%
- \fi
- \fi
+ \CTEXifname{\protect\numberline{\csname CTEXthe#1\endcsname}}{}%
#7}}%
\fi
\@xsect{#5}}
\def\@ssect#1#2#3#4#5{%
+ \CTEX@ifnamefalse
\unless \ifodd \CTEX@runin
\begingroup
#4{%
@@ -435,6 +452,48 @@
\gdef \CTEX@postchapter { \CTEX@postappendix }
\gdef \CTEX@chapter@numbering { \CTEX@appendix@numbering }
}
+\cs_new_protected_nopar:Npn \CTEX@makeanchor #1
+ { }
+\seq_new:N \c__ctex_headings_cs_seq
+\seq_gset_from_clist:Nn \c__ctex_headings_cs_seq
+ { part , spart , chapter , schapter , sect , ssect }
+\seq_map_inline:Nn \c__ctex_headings_cs_seq
+ {
+ \cs_new_eq:cc { CTEX@ #1 } { @ #1 }
+ \cs_new_eq:cN { CTEX@makeanchor@ #1 } \CTEX@makeanchor
+ }
+\cs_new_protected_nopar:Npn \CTEX@hyperheadinghook
+ {
+ \group_begin:
+ \ifHy@implicit
+ \cs_set_eq:NN \H@old@chapter \Hy@org@chapter
+ \seq_map_inline:Nn \c__ctex_headings_cs_seq
+ {
+ \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 }
+ {
+ \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 }
+ \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor
+ }
+ }
+ \else:
+ \seq_map_inline:Nn \c__ctex_headings_cs_seq
+ { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor }
+ \fi:
+ \group_end:
+ }
+\ctex_at_end_package:nn { hyperref }
+ {
+ \cs_gset_protected_nopar:Npn \CTEX@makeanchor #1
+ {
+ \Hy@MakeCurrentHrefAuto {#1}
+ \Hy@raisedlink
+ {
+ \hyper@anchorstart { \@currentHref }
+ \hyper@anchorend
+ }
+ }
+ \CTEX@hyperheadinghook
+ }
\cs_new_protected_nopar:Npn \ctex_titlesec_hook:
{
\@ifpackagewith { titlesec } { explicit }
@@ -502,6 +561,29 @@
{ \ctex_titlesec_hook: }
}
}
+\ctex_at_end_package:nn { titlesec }
+ {
+ \tl_set:Nn \ttl@chapterout { \typeout { \CTEXthechapter } }
+ \cs_if_free:NF \ttl@tocpart
+ {
+ \cs_set_protected_nopar:Npn \ttl@tocpart
+ { \tl_set:Nn \ttl@a { \CTEXthepart \hspace { 1em } } }
+ }
+ \seq_map_inline:Nn \c__ctex_headings_seq
+ {
+ \cs_if_exist:cF { ttl@toc #1 }
+ {
+ \cs_new_protected_nopar:cpx { ttl@toc #1 }
+ {
+ \tl_set:Nn \exp_not:N \ttl@a
+ {
+ \exp_not:N \protect
+ \exp_not:N \numberline { \exp_not:c { CTEXthe #1 } }
+ }
+ }
+ }
+ }
+ }
\group_begin:
\char_set_catcode_other:N \#
\cs_new_protected_nopar:Npn \ctex_titleps_hook:
@@ -539,6 +621,18 @@
\ctex_at_end_package:nn { titlesec }
{ \cs_if_free:NF \ttl@settopmark { \ctex_titleps_hook: } }
\ctex_at_end_package:nn { titleps } { \ctex_titleps_hook: }
+\ctex_at_end_package:nn { titleps }
+ {
+ \cs_set_protected_nopar:Npn \ttl@setifthe #1
+ {
+ \exp_args:Nco \cs_set_nopar:Npn { ifthe #1 }
+ {
+ \CTEXifname
+ { \protect \@firstoftwo }
+ { \protect \@secondoftwo }
+ }
+ }
+ }
\cs_new_protected:Npn \CTEX@toc@width@n #1
{
\hbox_set:Nn \l__ctex_tmp_box {#1}
@@ -571,21 +665,25 @@
}
}
\ctex_patch_cmd:Nnn \ps@headings
- { \@chapapp\ \thechapter.~\ }
- { \ifodd \CTEX@chapter@numbering \CTEXthechapter \quad \fi }
+ {
+ \ifnum \c@secnumdepth > \m@ne \if@mainmatter
+ \@chapapp \ \thechapter . ~ \
+ \fi \fi
+ }
+ { \CTEXifname { \CTEXthechapter \quad } { } }
\if@twoside
\ctex_patch_cmd:Nnn \ps@headings
- { \thesection.~\ }
- { \ifodd \CTEX@section@numbering \CTEXthesection \quad \fi }
+ { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi }
+ { \CTEXifname { \CTEXthesection } { } }
\fi:
\ctex_at_end_package:nn { fancyhdr }
{
\ctex_patch_cmd:Nnn \ps@fancy
- { \@chapapp\ \thechapter.~\ }
- { \if@mainmatter \ifodd \CTEX@chapter@numbering \CTEXthechapter \quad \fi \fi }
+ { \ifnum \c@secnumdepth > \m@ne \@chapapp \ \thechapter . ~ \ \fi }
+ { \CTEXifname { \CTEXthechapter \quad } { } }
\ctex_patch_cmd:Nnn \ps@fancy
- { \thesection.~\ }
- { \ifodd \CTEX@section@numbering \CTEXthesection \quad \fi }
+ { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi }
+ { \CTEXifname { \CTEXthesection } { } }
}
\cs_new_protected_nopar:Npn \CTEX@setcurrentlabel@n #1
{
diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo b/Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo
index ed5b743e8a7..b590e70d900 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{c5size option (CTEX)}
\ProvidesExplFile{ctex-c5size.clo}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 0641cf8e0cf..f80fcc21139 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{cs4size option (CTEX)}
\ProvidesExplFile{ctex-cs4size.clo}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 a79de680ad3..e6e5a1fb9f2 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Heading modification for report (CTEX)}
\ProvidesExplFile{ctex-report.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
\seq_new:N \c__ctex_section_headings_seq
\seq_gset_from_clist:Nn \c__ctex_section_headings_seq
{ section , subsection , subsubsection , paragraph , subparagraph }
@@ -88,6 +88,9 @@
#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 / break .tl_set:N = \exp_not:c { CTEX@#1@break } ,
+ #1 / break+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@break } { ####1 } } ,
#1 / format+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
#1 / nameformat+ .code:n =
@@ -135,9 +138,6 @@
\group_end:
\keys_define:nn { ctex } { \exp_not:o { \l__ctex_tmp_tl } }
}
-\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@fixtopskip
{
\CTEX@fixheadingskip
@@ -154,12 +154,15 @@
\cs_new_protected_nopar:Npn \CTEX@setheadingskip
{ \skip_set:Nn \l__ctex_heading_skip }
\cs_new_eq:NN \CTEX@headingskip \l__ctex_heading_skip
+\ProvideDocumentCommand \partmark { m }
+ { \markboth { } { } }
+\cs_new_eq:NN \CTEXifname \use_i:nn
+\cs_new_protected_nopar:Npn \CTEX@ifnametrue
+ { \cs_set_eq:NN \CTEXifname \use_i:nn }
+\cs_new_protected_nopar:Npn \CTEX@ifnamefalse
+ { \cs_set_eq:NN \CTEXifname \use_ii:nn }
\renewcommand\part{%
- \if@openright
- \cleardoublepage
- \else
- \clearpage
- \fi
+ \CTEX@part@break
\thispagestyle{\CTEX@part@pagestyle}%
\if@twocolumn
\onecolumn
@@ -174,16 +177,20 @@
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\ifodd \CTEX@part@numbering
+ \CTEX@ifnametrue
\refstepcounter{part}%
\addcontentsline{toc}{part}{\CTEXthepart\hspace{1em}#1}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{part*}%
\addcontentsline{toc}{part}{#1}%
\fi
\else
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@part{part*}%
\addcontentsline{toc}{part}{#1}%
\fi
- \markboth{}{}%
+ \partmark{#1}%
{\interlinepenalty \@M
\normalfont \CTEX@part@format
\ifnum \c@secnumdepth >-2\relax \ifodd \CTEX@part@numbering
@@ -193,6 +200,8 @@
\CTEX@part@aftertitle}%
\@endpart}
\def\@spart#1{%
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@spart{part*}%
{\interlinepenalty \@M
\normalfont \CTEX@part@format
\CTEX@part@titleformat{#1}%
@@ -213,7 +222,8 @@
\if@tempswa
\twocolumn
\fi}
-\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
+\renewcommand\chapter{%
+ \CTEX@chapter@break
\thispagestyle{\CTEX@chapter@pagestyle}%
\global\@topnum\z@
\ifodd \CTEX@chapter@afterindent
@@ -225,15 +235,19 @@
\def\@chapter[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
\ifodd \CTEX@chapter@numbering
+ \CTEX@ifnametrue
\refstepcounter{chapter}%
\typeout{\CTEXthechapter}%
\addcontentsline{toc}{chapter}
{\protect\numberline{\CTEXthechapter\hspace{0.3em}}#1}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{\Hy@chapapp*}%
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@chapter{\Hy@chapapp*}%
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
@@ -245,17 +259,22 @@
\@makechapterhead{#2}%
\@afterheading
\fi}
+\def\@schapter#1{%
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@schapter{\Hy@chapapp*}%
+ \if@twocolumn
+ \@topnewpage[\@makeschapterhead{#1}]%
+ \else
+ \@makeschapterhead{#1}%
+ \@afterheading
+ \fi}
\def\@makechapterhead#1{%
\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
- \ifodd \CTEX@chapter@numbering
- \CTEX@chaptername \CTEX@chapter@aftername
- \fi
- \fi
+ \CTEXifname{\CTEX@chaptername\CTEX@chapter@aftername}{}%
\interlinepenalty\@M
\CTEX@chapter@titleformat{#1}%
\CTEX@chapter@aftertitle
@@ -290,25 +309,30 @@
\if@nobreak
\everypar{}%
\else
- \addpenalty\@secpenalty
+ \csname CTEX@#1@break\endcsname
\CTEX@setheadingskip{#4}%
\ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi
\addvspace \CTEX@headingskip
\fi
\@ifstar
- {\@ssect{#3}{#4}{#5}{#6}}%
+ {\CTEX@makeanchor@ssect{#1*}\@ssect{#3}{#4}{#5}{#6}}%
{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
\def\@seccntformat#1{%
- \csname CTEX@#1name\endcsname \csname CTEX@#1@aftername\endcsname}
+ \csname CTEX@#1name\endcsname
+ \csname CTEX@#1@aftername\endcsname}
\def\@sect#1#2#3#4#5#6[#7]#8{%
\ifnum #2>\c@secnumdepth
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@sect{#1*}%
\let\@svsec\@empty
\else
\ifodd \csname CTEX@#1@numbering\endcsname
+ \CTEX@ifnametrue
\refstepcounter{#1}%
\protected@edef\@svsec{\@seccntformat{#1}\relax}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{#1*}%
\let\@svsec\@empty
\fi
\fi
@@ -322,11 +346,7 @@
\endgroup
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth \else
- \ifodd \csname CTEX@#1@numbering\endcsname
- \protect\numberline{\csname CTEXthe#1\endcsname}%
- \fi
- \fi
+ \CTEXifname{\protect\numberline{\csname CTEXthe#1\endcsname}}{}%
#7}%
\else
\def\@svsechd{%
@@ -336,15 +356,12 @@
\csname CTEX@#1@aftertitle\endcsname}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth \else
- \ifodd \csname CTEX@#1@numbering\endcsname
- \protect\numberline{\csname CTEXthe#1\endcsname}%
- \fi
- \fi
+ \CTEXifname{\protect\numberline{\csname CTEXthe#1\endcsname}}{}%
#7}}%
\fi
\@xsect{#5}}
\def\@ssect#1#2#3#4#5{%
+ \CTEX@ifnamefalse
\unless \ifodd \CTEX@runin
\begingroup
#4{%
@@ -429,6 +446,48 @@
\gdef \CTEX@postchapter { \CTEX@postappendix }
\gdef \CTEX@chapter@numbering { \CTEX@appendix@numbering }
}
+\cs_new_protected_nopar:Npn \CTEX@makeanchor #1
+ { }
+\seq_new:N \c__ctex_headings_cs_seq
+\seq_gset_from_clist:Nn \c__ctex_headings_cs_seq
+ { part , spart , chapter , schapter , sect , ssect }
+\seq_map_inline:Nn \c__ctex_headings_cs_seq
+ {
+ \cs_new_eq:cc { CTEX@ #1 } { @ #1 }
+ \cs_new_eq:cN { CTEX@makeanchor@ #1 } \CTEX@makeanchor
+ }
+\cs_new_protected_nopar:Npn \CTEX@hyperheadinghook
+ {
+ \group_begin:
+ \ifHy@implicit
+ \cs_set_eq:NN \H@old@chapter \Hy@org@chapter
+ \seq_map_inline:Nn \c__ctex_headings_cs_seq
+ {
+ \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 }
+ {
+ \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 }
+ \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor
+ }
+ }
+ \else:
+ \seq_map_inline:Nn \c__ctex_headings_cs_seq
+ { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor }
+ \fi:
+ \group_end:
+ }
+\ctex_at_end_package:nn { hyperref }
+ {
+ \cs_gset_protected_nopar:Npn \CTEX@makeanchor #1
+ {
+ \Hy@MakeCurrentHrefAuto {#1}
+ \Hy@raisedlink
+ {
+ \hyper@anchorstart { \@currentHref }
+ \hyper@anchorend
+ }
+ }
+ \CTEX@hyperheadinghook
+ }
\cs_new_protected_nopar:Npn \ctex_titlesec_hook:
{
\@ifpackagewith { titlesec } { explicit }
@@ -496,6 +555,29 @@
{ \ctex_titlesec_hook: }
}
}
+\ctex_at_end_package:nn { titlesec }
+ {
+ \tl_set:Nn \ttl@chapterout { \typeout { \CTEXthechapter } }
+ \cs_if_free:NF \ttl@tocpart
+ {
+ \cs_set_protected_nopar:Npn \ttl@tocpart
+ { \tl_set:Nn \ttl@a { \CTEXthepart \hspace { 1em } } }
+ }
+ \seq_map_inline:Nn \c__ctex_headings_seq
+ {
+ \cs_if_exist:cF { ttl@toc #1 }
+ {
+ \cs_new_protected_nopar:cpx { ttl@toc #1 }
+ {
+ \tl_set:Nn \exp_not:N \ttl@a
+ {
+ \exp_not:N \protect
+ \exp_not:N \numberline { \exp_not:c { CTEXthe #1 } }
+ }
+ }
+ }
+ }
+ }
\group_begin:
\char_set_catcode_other:N \#
\cs_new_protected_nopar:Npn \ctex_titleps_hook:
@@ -533,6 +615,18 @@
\ctex_at_end_package:nn { titlesec }
{ \cs_if_free:NF \ttl@settopmark { \ctex_titleps_hook: } }
\ctex_at_end_package:nn { titleps } { \ctex_titleps_hook: }
+\ctex_at_end_package:nn { titleps }
+ {
+ \cs_set_protected_nopar:Npn \ttl@setifthe #1
+ {
+ \exp_args:Nco \cs_set_nopar:Npn { ifthe #1 }
+ {
+ \CTEXifname
+ { \protect \@firstoftwo }
+ { \protect \@secondoftwo }
+ }
+ }
+ }
\cs_new_protected:Npn \CTEX@toc@width@n #1
{
\hbox_set:Nn \l__ctex_tmp_box {#1}
@@ -565,21 +659,25 @@
}
}
\ctex_patch_cmd:Nnn \ps@headings
- { \@chapapp\ \thechapter.~\ }
- { \ifodd \CTEX@chapter@numbering \CTEXthechapter \quad \fi }
+ {
+ \ifnum \c@secnumdepth > \m@ne \if@mainmatter
+ \@chapapp \ \thechapter . ~ \
+ \fi \fi
+ }
+ { \CTEXifname { \CTEXthechapter \quad } { } }
\if@twoside
\ctex_patch_cmd:Nnn \ps@headings
- { \thesection.~\ }
- { \ifodd \CTEX@section@numbering \CTEXthesection \quad \fi }
+ { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi }
+ { \CTEXifname { \CTEXthesection } { } }
\fi:
\ctex_at_end_package:nn { fancyhdr }
{
\ctex_patch_cmd:Nnn \ps@fancy
- { \@chapapp\ \thechapter.~\ }
- { \ifodd \CTEX@chapter@numbering \CTEXthechapter \quad \fi }
+ { \ifnum \c@secnumdepth > \m@ne \@chapapp \ \thechapter . ~ \ \fi }
+ { \CTEXifname { \CTEXthechapter \quad } { } }
\ctex_patch_cmd:Nnn \ps@fancy
- { \thesection.~\ }
- { \ifodd \CTEX@section@numbering \CTEXthesection \quad \fi }
+ { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi }
+ { \CTEXifname { \CTEXthesection } { } }
}
\cs_new_protected_nopar:Npn \CTEX@setcurrentlabel@n #1
{
diff --git a/Master/texmf-dist/tex/latex/ctex/ctex.sty b/Master/texmf-dist/tex/latex/ctex/ctex.sty
index 502dd3874fd..ca6c2b04b91 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese adapter in LaTeX (CTEX)}
\ProvidesExplPackage{\ExplFileName}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 }
@@ -71,8 +71,8 @@
\RequirePackage { fix-cm , everysel }
\tl_new:N \l__ctex_tmp_tl
\int_new:N \l__ctex_tmp_int
-\dim_new:N \l__ctex_tmp_dim
\box_new:N \l__ctex_tmp_box
+\dim_new:N \l__ctex_tmp_dim
\cs_new_protected:Npn \ctex_file_wrapper:nnn #1#2#3
{
\use:x
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexart.cls b/Master/texmf-dist/tex/latex/ctex/ctexart.cls
index 3daee3bd597..3612b6c88c7 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese adapter for class article (CTEX)}
\ProvidesExplClass{ctexart}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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
@@ -65,8 +65,8 @@
\RequirePackage { fix-cm , everysel }
\tl_new:N \l__ctex_tmp_tl
\int_new:N \l__ctex_tmp_int
-\dim_new:N \l__ctex_tmp_dim
\box_new:N \l__ctex_tmp_box
+\dim_new:N \l__ctex_tmp_dim
\cs_new_protected:Npn \ctex_file_wrapper:nnn #1#2#3
{
\use:x
@@ -650,6 +650,9 @@
#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 / break .tl_set:N = \exp_not:c { CTEX@#1@break } ,
+ #1 / break+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@break } { ####1 } } ,
#1 / format+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
#1 / nameformat+ .code:n =
@@ -693,9 +696,6 @@
\group_end:
\keys_define:nn { ctex } { \exp_not:o { \l__ctex_tmp_tl } }
}
-\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
@@ -706,9 +706,17 @@
\cs_new_protected_nopar:Npn \CTEX@setheadingskip
{ \skip_set:Nn \l__ctex_heading_skip }
\cs_new_eq:NN \CTEX@headingskip \l__ctex_heading_skip
+\ProvideDocumentCommand \partmark { m }
+ { \markboth { } { } }
+\cs_new_eq:NN \CTEXifname \use_i:nn
+\cs_new_protected_nopar:Npn \CTEX@ifnametrue
+ { \cs_set_eq:NN \CTEXifname \use_i:nn }
+\cs_new_protected_nopar:Npn \CTEX@ifnamefalse
+ { \cs_set_eq:NN \CTEXifname \use_ii:nn }
\renewcommand\part{%
\if@noskipsec \leavevmode \fi
\par
+ \CTEX@part@break
\CTEX@setheadingskip \CTEX@part@beforeskip
\ifodd \CTEX@part@fixskip \CTEX@fixheadingskip \fi
\addvspace \CTEX@headingskip
@@ -721,13 +729,17 @@
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
\ifodd \CTEX@part@numbering
+ \CTEX@ifnametrue
\refstepcounter{part}%
\addcontentsline{toc}{part}{\CTEXthepart\hspace{1em}#1}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{part*}%
\addcontentsline{toc}{part}{#1}%
\fi
\else
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@part{part*}%
\addcontentsline{toc}{part}{#1}%
\fi
{\interlinepenalty \@M
@@ -736,7 +748,7 @@
\CTEX@partname \CTEX@part@aftername
\fi \fi
\CTEX@part@titleformat{#2}%
- \markboth{}{}%
+ \partmark{#1}%
\CTEX@part@aftertitle}%
\nobreak
\CTEX@setheadingskip \CTEX@part@afterskip
@@ -744,6 +756,8 @@
\vskip \CTEX@headingskip
\@afterheading}
\def\@spart#1{%
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@spart{part*}%
{\interlinepenalty \@M
\normalfont \parindent \dimexpr \CTEX@part@indent \relax
\CTEX@part@format
@@ -766,25 +780,30 @@
\if@nobreak
\everypar{}%
\else
- \addpenalty\@secpenalty
+ \csname CTEX@#1@break\endcsname
\CTEX@setheadingskip{#4}%
\ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi
\addvspace \CTEX@headingskip
\fi
\@ifstar
- {\@ssect{#3}{#4}{#5}{#6}}%
+ {\CTEX@makeanchor@ssect{#1*}\@ssect{#3}{#4}{#5}{#6}}%
{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
\def\@seccntformat#1{%
- \csname CTEX@#1name\endcsname \csname CTEX@#1@aftername\endcsname}
+ \csname CTEX@#1name\endcsname
+ \csname CTEX@#1@aftername\endcsname}
\def\@sect#1#2#3#4#5#6[#7]#8{%
\ifnum #2>\c@secnumdepth
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@sect{#1*}%
\let\@svsec\@empty
\else
\ifodd \csname CTEX@#1@numbering\endcsname
+ \CTEX@ifnametrue
\refstepcounter{#1}%
\protected@edef\@svsec{\@seccntformat{#1}\relax}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{#1*}%
\let\@svsec\@empty
\fi
\fi
@@ -798,11 +817,7 @@
\endgroup
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth \else
- \ifodd \csname CTEX@#1@numbering\endcsname
- \protect\numberline{\csname CTEXthe#1\endcsname}%
- \fi
- \fi
+ \CTEXifname{\protect\numberline{\csname CTEXthe#1\endcsname}}{}%
#7}%
\else
\def\@svsechd{%
@@ -812,15 +827,12 @@
\csname CTEX@#1@aftertitle\endcsname}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth \else
- \ifodd \csname CTEX@#1@numbering\endcsname
- \protect\numberline{\csname CTEXthe#1\endcsname}%
- \fi
- \fi
+ \CTEXifname{\protect\numberline{\csname CTEXthe#1\endcsname}}{}%
#7}}%
\fi
\@xsect{#5}}
\def\@ssect#1#2#3#4#5{%
+ \CTEX@ifnamefalse
\unless \ifodd \CTEX@runin
\begingroup
#4{%
@@ -905,6 +917,48 @@
\gdef \CTEX@postsection { \CTEX@postappendix }
\gdef \CTEX@section@numbering { \CTEX@appendix@numbering }
}
+\cs_new_protected_nopar:Npn \CTEX@makeanchor #1
+ { }
+\seq_new:N \c__ctex_headings_cs_seq
+\seq_gset_from_clist:Nn \c__ctex_headings_cs_seq
+ { part , spart , sect , ssect }
+\seq_map_inline:Nn \c__ctex_headings_cs_seq
+ {
+ \cs_new_eq:cc { CTEX@ #1 } { @ #1 }
+ \cs_new_eq:cN { CTEX@makeanchor@ #1 } \CTEX@makeanchor
+ }
+\cs_new_protected_nopar:Npn \CTEX@hyperheadinghook
+ {
+ \group_begin:
+ \ifHy@implicit
+ \cs_set_eq:NN \H@old@chapter \Hy@org@chapter
+ \seq_map_inline:Nn \c__ctex_headings_cs_seq
+ {
+ \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 }
+ {
+ \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 }
+ \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor
+ }
+ }
+ \else:
+ \seq_map_inline:Nn \c__ctex_headings_cs_seq
+ { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor }
+ \fi:
+ \group_end:
+ }
+\ctex_at_end_package:nn { hyperref }
+ {
+ \cs_gset_protected_nopar:Npn \CTEX@makeanchor #1
+ {
+ \Hy@MakeCurrentHrefAuto {#1}
+ \Hy@raisedlink
+ {
+ \hyper@anchorstart { \@currentHref }
+ \hyper@anchorend
+ }
+ }
+ \CTEX@hyperheadinghook
+ }
\cs_new_protected_nopar:Npn \ctex_titlesec_hook:
{
\@ifpackagewith { titlesec } { explicit }
@@ -972,6 +1026,28 @@
{ \ctex_titlesec_hook: }
}
}
+\ctex_at_end_package:nn { titlesec }
+ {
+ \cs_if_free:NF \ttl@tocpart
+ {
+ \cs_set_protected_nopar:Npn \ttl@tocpart
+ { \tl_set:Nn \ttl@a { \CTEXthepart \hspace { 1em } } }
+ }
+ \seq_map_inline:Nn \c__ctex_headings_seq
+ {
+ \cs_if_exist:cF { ttl@toc #1 }
+ {
+ \cs_new_protected_nopar:cpx { ttl@toc #1 }
+ {
+ \tl_set:Nn \exp_not:N \ttl@a
+ {
+ \exp_not:N \protect
+ \exp_not:N \numberline { \exp_not:c { CTEXthe #1 } }
+ }
+ }
+ }
+ }
+ }
\group_begin:
\char_set_catcode_other:N \#
\cs_new_protected_nopar:Npn \ctex_titleps_hook:
@@ -1009,6 +1085,18 @@
\ctex_at_end_package:nn { titlesec }
{ \cs_if_free:NF \ttl@settopmark { \ctex_titleps_hook: } }
\ctex_at_end_package:nn { titleps } { \ctex_titleps_hook: }
+\ctex_at_end_package:nn { titleps }
+ {
+ \cs_set_protected_nopar:Npn \ttl@setifthe #1
+ {
+ \exp_args:Nco \cs_set_nopar:Npn { ifthe #1 }
+ {
+ \CTEXifname
+ { \protect \@firstoftwo }
+ { \protect \@secondoftwo }
+ }
+ }
+ }
\cs_new_protected:Npn \CTEX@toc@width@n #1
{
\hbox_set:Nn \l__ctex_tmp_box {#1}
@@ -1041,21 +1129,21 @@
}
}
\ctex_patch_cmd:Nnn \ps@headings
- { \thesection \quad }
- { \ifodd \CTEX@section@numbering \CTEXthesection \quad \fi }
+ { \ifnum \c@secnumdepth > \z@ \thesection \quad \fi }
+ { \CTEXifname { \CTEXthesection \quad } { } }
\if@twoside
\ctex_patch_cmd:Nnn \ps@headings
- { \thesubsection \quad }
- { \ifodd \CTEX@subsection@numbering \CTEXthesubsection \quad \fi }
+ { \ifnum \c@secnumdepth > \@ne \thesubsection \quad \fi }
+ { \CTEXifname { \CTEXthesubsection \quad } { } }
\fi:
\ctex_at_end_package:nn { fancyhdr }
{
\ctex_patch_cmd:Nnn \ps@fancy
- { \thesection \hskip 1em \relax }
- { \ifodd \CTEX@section@numbering \CTEXthesection \quad \fi }
+ { \ifnum \c@secnumdepth > \z@ \thesection \hskip 1em \relax \fi }
+ { \CTEXifname { \CTEXthesection \quad } { } }
\ctex_patch_cmd:Nnn \ps@fancy
- { \thesubsection \hskip 1em \relax }
- { \ifodd \CTEX@subsection@numbering \CTEXthesubsection \quad \fi }
+ { \ifnum \c@secnumdepth > \@ne \thesubsection \hskip 1em \relax \fi }
+ { \CTEXifname { \CTEXthesubsection \quad } { } }
}
\cs_new_protected_nopar:Npn \CTEX@setcurrentlabel@n #1
{
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexbeamer.cls b/Master/texmf-dist/tex/latex/ctex/ctexbeamer.cls
index 47b65aff430..ff46b745ac0 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese adapter for class beamer (CTEX)}
\ProvidesExplClass{ctexbeamer}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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
@@ -65,8 +65,8 @@
\RequirePackage { fix-cm , everysel }
\tl_new:N \l__ctex_tmp_tl
\int_new:N \l__ctex_tmp_int
-\dim_new:N \l__ctex_tmp_dim
\box_new:N \l__ctex_tmp_box
+\dim_new:N \l__ctex_tmp_dim
\cs_new_protected:Npn \ctex_file_wrapper:nnn #1#2#3
{
\use:x
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexbook.cls b/Master/texmf-dist/tex/latex/ctex/ctexbook.cls
index eca90d96246..fe02ff541c7 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese adapter for class book (CTEX)}
\ProvidesExplClass{ctexbook}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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
@@ -65,8 +65,8 @@
\RequirePackage { fix-cm , everysel }
\tl_new:N \l__ctex_tmp_tl
\int_new:N \l__ctex_tmp_int
-\dim_new:N \l__ctex_tmp_dim
\box_new:N \l__ctex_tmp_box
+\dim_new:N \l__ctex_tmp_dim
\cs_new_protected:Npn \ctex_file_wrapper:nnn #1#2#3
{
\use:x
@@ -651,6 +651,9 @@
#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 / break .tl_set:N = \exp_not:c { CTEX@#1@break } ,
+ #1 / break+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@break } { ####1 } } ,
#1 / format+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
#1 / nameformat+ .code:n =
@@ -698,9 +701,6 @@
\group_end:
\keys_define:nn { ctex } { \exp_not:o { \l__ctex_tmp_tl } }
}
-\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@fixtopskip
{
\CTEX@fixheadingskip
@@ -717,12 +717,15 @@
\cs_new_protected_nopar:Npn \CTEX@setheadingskip
{ \skip_set:Nn \l__ctex_heading_skip }
\cs_new_eq:NN \CTEX@headingskip \l__ctex_heading_skip
+\ProvideDocumentCommand \partmark { m }
+ { \markboth { } { } }
+\cs_new_eq:NN \CTEXifname \use_i:nn
+\cs_new_protected_nopar:Npn \CTEX@ifnametrue
+ { \cs_set_eq:NN \CTEXifname \use_i:nn }
+\cs_new_protected_nopar:Npn \CTEX@ifnamefalse
+ { \cs_set_eq:NN \CTEXifname \use_ii:nn }
\renewcommand\part{%
- \if@openright
- \cleardoublepage
- \else
- \clearpage
- \fi
+ \CTEX@part@break
\thispagestyle{\CTEX@part@pagestyle}%
\if@twocolumn
\onecolumn
@@ -737,16 +740,20 @@
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\ifodd \CTEX@part@numbering
+ \CTEX@ifnametrue
\refstepcounter{part}%
\addcontentsline{toc}{part}{\CTEXthepart\hspace{1em}#1}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{part*}%
\addcontentsline{toc}{part}{#1}%
\fi
\else
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@part{part*}%
\addcontentsline{toc}{part}{#1}%
\fi
- \markboth{}{}%
+ \partmark{#1}%
{\interlinepenalty \@M
\normalfont \CTEX@part@format
\ifnum \c@secnumdepth >-2\relax \ifodd \CTEX@part@numbering
@@ -756,6 +763,8 @@
\CTEX@part@aftertitle}%
\@endpart}
\def\@spart#1{%
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@spart{part*}%
{\interlinepenalty \@M
\normalfont \CTEX@part@format
\CTEX@part@titleformat{#1}%
@@ -776,7 +785,8 @@
\if@tempswa
\twocolumn
\fi}
-\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
+\renewcommand\chapter{%
+ \CTEX@chapter@break
\thispagestyle{\CTEX@chapter@pagestyle}%
\global\@topnum\z@
\ifodd \CTEX@chapter@afterindent
@@ -789,18 +799,24 @@
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\ifodd \CTEX@chapter@numbering
+ \CTEX@ifnametrue
\refstepcounter{chapter}%
\typeout{\CTEXthechapter}%
\addcontentsline{toc}{chapter}
{\protect\numberline{\CTEXthechapter\hspace{0.3em}}#1}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{\Hy@chapapp*}%
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@chapter{\Hy@chapapp*}%
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@chapter{\Hy@chapapp*}%
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
@@ -812,19 +828,22 @@
\@makechapterhead{#2}%
\@afterheading
\fi}
+\def\@schapter#1{%
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@schapter{\Hy@chapapp*}%
+ \if@twocolumn
+ \@topnewpage[\@makeschapterhead{#1}]%
+ \else
+ \@makeschapterhead{#1}%
+ \@afterheading
+ \fi}
\def\@makechapterhead#1{%
\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
- \if@mainmatter
- \ifodd \CTEX@chapter@numbering
- \CTEX@chaptername \CTEX@chapter@aftername
- \fi
- \fi
- \fi
+ \CTEXifname{\CTEX@chaptername\CTEX@chapter@aftername}{}%
\interlinepenalty\@M
\CTEX@chapter@titleformat{#1}%
\CTEX@chapter@aftertitle
@@ -859,25 +878,30 @@
\if@nobreak
\everypar{}%
\else
- \addpenalty\@secpenalty
+ \csname CTEX@#1@break\endcsname
\CTEX@setheadingskip{#4}%
\ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi
\addvspace \CTEX@headingskip
\fi
\@ifstar
- {\@ssect{#3}{#4}{#5}{#6}}%
+ {\CTEX@makeanchor@ssect{#1*}\@ssect{#3}{#4}{#5}{#6}}%
{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
\def\@seccntformat#1{%
- \csname CTEX@#1name\endcsname \csname CTEX@#1@aftername\endcsname}
+ \csname CTEX@#1name\endcsname
+ \csname CTEX@#1@aftername\endcsname}
\def\@sect#1#2#3#4#5#6[#7]#8{%
\ifnum #2>\c@secnumdepth
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@sect{#1*}%
\let\@svsec\@empty
\else
\ifodd \csname CTEX@#1@numbering\endcsname
+ \CTEX@ifnametrue
\refstepcounter{#1}%
\protected@edef\@svsec{\@seccntformat{#1}\relax}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{#1*}%
\let\@svsec\@empty
\fi
\fi
@@ -891,11 +915,7 @@
\endgroup
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth \else
- \ifodd \csname CTEX@#1@numbering\endcsname
- \protect\numberline{\csname CTEXthe#1\endcsname}%
- \fi
- \fi
+ \CTEXifname{\protect\numberline{\csname CTEXthe#1\endcsname}}{}%
#7}%
\else
\def\@svsechd{%
@@ -905,15 +925,12 @@
\csname CTEX@#1@aftertitle\endcsname}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth \else
- \ifodd \csname CTEX@#1@numbering\endcsname
- \protect\numberline{\csname CTEXthe#1\endcsname}%
- \fi
- \fi
+ \CTEXifname{\protect\numberline{\csname CTEXthe#1\endcsname}}{}%
#7}}%
\fi
\@xsect{#5}}
\def\@ssect#1#2#3#4#5{%
+ \CTEX@ifnamefalse
\unless \ifodd \CTEX@runin
\begingroup
#4{%
@@ -998,6 +1015,48 @@
\gdef \CTEX@postchapter { \CTEX@postappendix }
\gdef \CTEX@chapter@numbering { \CTEX@appendix@numbering }
}
+\cs_new_protected_nopar:Npn \CTEX@makeanchor #1
+ { }
+\seq_new:N \c__ctex_headings_cs_seq
+\seq_gset_from_clist:Nn \c__ctex_headings_cs_seq
+ { part , spart , chapter , schapter , sect , ssect }
+\seq_map_inline:Nn \c__ctex_headings_cs_seq
+ {
+ \cs_new_eq:cc { CTEX@ #1 } { @ #1 }
+ \cs_new_eq:cN { CTEX@makeanchor@ #1 } \CTEX@makeanchor
+ }
+\cs_new_protected_nopar:Npn \CTEX@hyperheadinghook
+ {
+ \group_begin:
+ \ifHy@implicit
+ \cs_set_eq:NN \H@old@chapter \Hy@org@chapter
+ \seq_map_inline:Nn \c__ctex_headings_cs_seq
+ {
+ \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 }
+ {
+ \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 }
+ \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor
+ }
+ }
+ \else:
+ \seq_map_inline:Nn \c__ctex_headings_cs_seq
+ { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor }
+ \fi:
+ \group_end:
+ }
+\ctex_at_end_package:nn { hyperref }
+ {
+ \cs_gset_protected_nopar:Npn \CTEX@makeanchor #1
+ {
+ \Hy@MakeCurrentHrefAuto {#1}
+ \Hy@raisedlink
+ {
+ \hyper@anchorstart { \@currentHref }
+ \hyper@anchorend
+ }
+ }
+ \CTEX@hyperheadinghook
+ }
\cs_new_protected_nopar:Npn \ctex_titlesec_hook:
{
\@ifpackagewith { titlesec } { explicit }
@@ -1065,6 +1124,29 @@
{ \ctex_titlesec_hook: }
}
}
+\ctex_at_end_package:nn { titlesec }
+ {
+ \tl_set:Nn \ttl@chapterout { \typeout { \CTEXthechapter } }
+ \cs_if_free:NF \ttl@tocpart
+ {
+ \cs_set_protected_nopar:Npn \ttl@tocpart
+ { \tl_set:Nn \ttl@a { \CTEXthepart \hspace { 1em } } }
+ }
+ \seq_map_inline:Nn \c__ctex_headings_seq
+ {
+ \cs_if_exist:cF { ttl@toc #1 }
+ {
+ \cs_new_protected_nopar:cpx { ttl@toc #1 }
+ {
+ \tl_set:Nn \exp_not:N \ttl@a
+ {
+ \exp_not:N \protect
+ \exp_not:N \numberline { \exp_not:c { CTEXthe #1 } }
+ }
+ }
+ }
+ }
+ }
\group_begin:
\char_set_catcode_other:N \#
\cs_new_protected_nopar:Npn \ctex_titleps_hook:
@@ -1102,6 +1184,18 @@
\ctex_at_end_package:nn { titlesec }
{ \cs_if_free:NF \ttl@settopmark { \ctex_titleps_hook: } }
\ctex_at_end_package:nn { titleps } { \ctex_titleps_hook: }
+\ctex_at_end_package:nn { titleps }
+ {
+ \cs_set_protected_nopar:Npn \ttl@setifthe #1
+ {
+ \exp_args:Nco \cs_set_nopar:Npn { ifthe #1 }
+ {
+ \CTEXifname
+ { \protect \@firstoftwo }
+ { \protect \@secondoftwo }
+ }
+ }
+ }
\cs_new_protected:Npn \CTEX@toc@width@n #1
{
\hbox_set:Nn \l__ctex_tmp_box {#1}
@@ -1134,21 +1228,25 @@
}
}
\ctex_patch_cmd:Nnn \ps@headings
- { \@chapapp\ \thechapter.~\ }
- { \ifodd \CTEX@chapter@numbering \CTEXthechapter \quad \fi }
+ {
+ \ifnum \c@secnumdepth > \m@ne \if@mainmatter
+ \@chapapp \ \thechapter . ~ \
+ \fi \fi
+ }
+ { \CTEXifname { \CTEXthechapter \quad } { } }
\if@twoside
\ctex_patch_cmd:Nnn \ps@headings
- { \thesection.~\ }
- { \ifodd \CTEX@section@numbering \CTEXthesection \quad \fi }
+ { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi }
+ { \CTEXifname { \CTEXthesection } { } }
\fi:
\ctex_at_end_package:nn { fancyhdr }
{
\ctex_patch_cmd:Nnn \ps@fancy
- { \@chapapp\ \thechapter.~\ }
- { \if@mainmatter \ifodd \CTEX@chapter@numbering \CTEXthechapter \quad \fi \fi }
+ { \ifnum \c@secnumdepth > \m@ne \@chapapp \ \thechapter . ~ \ \fi }
+ { \CTEXifname { \CTEXthechapter \quad } { } }
\ctex_patch_cmd:Nnn \ps@fancy
- { \thesection.~\ }
- { \ifodd \CTEX@section@numbering \CTEXthesection \quad \fi }
+ { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi }
+ { \CTEXifname { \CTEXthesection } { } }
}
\cs_new_protected_nopar:Npn \CTEX@setcurrentlabel@n #1
{
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexcap.sty b/Master/texmf-dist/tex/latex/ctex/ctexcap.sty
index d33c37d482e..426f21cacd1 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese adapter in LaTeX (CTEX)}
\ProvidesExplPackage{ctexcap}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 89e9fa4f385..8f067b5f049 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Heading style modification (CTEX)}
\ProvidesExplPackage{ctexheading}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 640dd23a389..d160a8b05d7 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Document and package hooks (CTEX)}
\ProvidesExplPackage{ctexhook}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 59ee535ec64..6dac05dc1eb 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Patching commands (CTEX)}
\ProvidesExplPackage{ctexpatch}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 7434d7e5ac2..08df376a680 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese adapter for class report (CTEX)}
\ProvidesExplClass{ctexrep}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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
@@ -65,8 +65,8 @@
\RequirePackage { fix-cm , everysel }
\tl_new:N \l__ctex_tmp_tl
\int_new:N \l__ctex_tmp_int
-\dim_new:N \l__ctex_tmp_dim
\box_new:N \l__ctex_tmp_box
+\dim_new:N \l__ctex_tmp_dim
\cs_new_protected:Npn \ctex_file_wrapper:nnn #1#2#3
{
\use:x
@@ -651,6 +651,9 @@
#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 / break .tl_set:N = \exp_not:c { CTEX@#1@break } ,
+ #1 / break+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@break } { ####1 } } ,
#1 / format+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
#1 / nameformat+ .code:n =
@@ -698,9 +701,6 @@
\group_end:
\keys_define:nn { ctex } { \exp_not:o { \l__ctex_tmp_tl } }
}
-\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@fixtopskip
{
\CTEX@fixheadingskip
@@ -717,12 +717,15 @@
\cs_new_protected_nopar:Npn \CTEX@setheadingskip
{ \skip_set:Nn \l__ctex_heading_skip }
\cs_new_eq:NN \CTEX@headingskip \l__ctex_heading_skip
+\ProvideDocumentCommand \partmark { m }
+ { \markboth { } { } }
+\cs_new_eq:NN \CTEXifname \use_i:nn
+\cs_new_protected_nopar:Npn \CTEX@ifnametrue
+ { \cs_set_eq:NN \CTEXifname \use_i:nn }
+\cs_new_protected_nopar:Npn \CTEX@ifnamefalse
+ { \cs_set_eq:NN \CTEXifname \use_ii:nn }
\renewcommand\part{%
- \if@openright
- \cleardoublepage
- \else
- \clearpage
- \fi
+ \CTEX@part@break
\thispagestyle{\CTEX@part@pagestyle}%
\if@twocolumn
\onecolumn
@@ -737,16 +740,20 @@
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\ifodd \CTEX@part@numbering
+ \CTEX@ifnametrue
\refstepcounter{part}%
\addcontentsline{toc}{part}{\CTEXthepart\hspace{1em}#1}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{part*}%
\addcontentsline{toc}{part}{#1}%
\fi
\else
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@part{part*}%
\addcontentsline{toc}{part}{#1}%
\fi
- \markboth{}{}%
+ \partmark{#1}%
{\interlinepenalty \@M
\normalfont \CTEX@part@format
\ifnum \c@secnumdepth >-2\relax \ifodd \CTEX@part@numbering
@@ -756,6 +763,8 @@
\CTEX@part@aftertitle}%
\@endpart}
\def\@spart#1{%
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@spart{part*}%
{\interlinepenalty \@M
\normalfont \CTEX@part@format
\CTEX@part@titleformat{#1}%
@@ -776,7 +785,8 @@
\if@tempswa
\twocolumn
\fi}
-\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
+\renewcommand\chapter{%
+ \CTEX@chapter@break
\thispagestyle{\CTEX@chapter@pagestyle}%
\global\@topnum\z@
\ifodd \CTEX@chapter@afterindent
@@ -788,15 +798,19 @@
\def\@chapter[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
\ifodd \CTEX@chapter@numbering
+ \CTEX@ifnametrue
\refstepcounter{chapter}%
\typeout{\CTEXthechapter}%
\addcontentsline{toc}{chapter}
{\protect\numberline{\CTEXthechapter\hspace{0.3em}}#1}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{\Hy@chapapp*}%
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@chapter{\Hy@chapapp*}%
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
@@ -808,17 +822,22 @@
\@makechapterhead{#2}%
\@afterheading
\fi}
+\def\@schapter#1{%
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@schapter{\Hy@chapapp*}%
+ \if@twocolumn
+ \@topnewpage[\@makeschapterhead{#1}]%
+ \else
+ \@makeschapterhead{#1}%
+ \@afterheading
+ \fi}
\def\@makechapterhead#1{%
\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
- \ifodd \CTEX@chapter@numbering
- \CTEX@chaptername \CTEX@chapter@aftername
- \fi
- \fi
+ \CTEXifname{\CTEX@chaptername\CTEX@chapter@aftername}{}%
\interlinepenalty\@M
\CTEX@chapter@titleformat{#1}%
\CTEX@chapter@aftertitle
@@ -853,25 +872,30 @@
\if@nobreak
\everypar{}%
\else
- \addpenalty\@secpenalty
+ \csname CTEX@#1@break\endcsname
\CTEX@setheadingskip{#4}%
\ifodd \CTEX@fixskip \CTEX@fixheadingskip \fi
\addvspace \CTEX@headingskip
\fi
\@ifstar
- {\@ssect{#3}{#4}{#5}{#6}}%
+ {\CTEX@makeanchor@ssect{#1*}\@ssect{#3}{#4}{#5}{#6}}%
{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
\def\@seccntformat#1{%
- \csname CTEX@#1name\endcsname \csname CTEX@#1@aftername\endcsname}
+ \csname CTEX@#1name\endcsname
+ \csname CTEX@#1@aftername\endcsname}
\def\@sect#1#2#3#4#5#6[#7]#8{%
\ifnum #2>\c@secnumdepth
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor@sect{#1*}%
\let\@svsec\@empty
\else
\ifodd \csname CTEX@#1@numbering\endcsname
+ \CTEX@ifnametrue
\refstepcounter{#1}%
\protected@edef\@svsec{\@seccntformat{#1}\relax}%
\else
- \CTEX@makeheadinganchor
+ \CTEX@ifnamefalse
+ \CTEX@makeanchor{#1*}%
\let\@svsec\@empty
\fi
\fi
@@ -885,11 +909,7 @@
\endgroup
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth \else
- \ifodd \csname CTEX@#1@numbering\endcsname
- \protect\numberline{\csname CTEXthe#1\endcsname}%
- \fi
- \fi
+ \CTEXifname{\protect\numberline{\csname CTEXthe#1\endcsname}}{}%
#7}%
\else
\def\@svsechd{%
@@ -899,15 +919,12 @@
\csname CTEX@#1@aftertitle\endcsname}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth \else
- \ifodd \csname CTEX@#1@numbering\endcsname
- \protect\numberline{\csname CTEXthe#1\endcsname}%
- \fi
- \fi
+ \CTEXifname{\protect\numberline{\csname CTEXthe#1\endcsname}}{}%
#7}}%
\fi
\@xsect{#5}}
\def\@ssect#1#2#3#4#5{%
+ \CTEX@ifnamefalse
\unless \ifodd \CTEX@runin
\begingroup
#4{%
@@ -992,6 +1009,48 @@
\gdef \CTEX@postchapter { \CTEX@postappendix }
\gdef \CTEX@chapter@numbering { \CTEX@appendix@numbering }
}
+\cs_new_protected_nopar:Npn \CTEX@makeanchor #1
+ { }
+\seq_new:N \c__ctex_headings_cs_seq
+\seq_gset_from_clist:Nn \c__ctex_headings_cs_seq
+ { part , spart , chapter , schapter , sect , ssect }
+\seq_map_inline:Nn \c__ctex_headings_cs_seq
+ {
+ \cs_new_eq:cc { CTEX@ #1 } { @ #1 }
+ \cs_new_eq:cN { CTEX@makeanchor@ #1 } \CTEX@makeanchor
+ }
+\cs_new_protected_nopar:Npn \CTEX@hyperheadinghook
+ {
+ \group_begin:
+ \ifHy@implicit
+ \cs_set_eq:NN \H@old@chapter \Hy@org@chapter
+ \seq_map_inline:Nn \c__ctex_headings_cs_seq
+ {
+ \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 }
+ {
+ \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 }
+ \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor
+ }
+ }
+ \else:
+ \seq_map_inline:Nn \c__ctex_headings_cs_seq
+ { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor }
+ \fi:
+ \group_end:
+ }
+\ctex_at_end_package:nn { hyperref }
+ {
+ \cs_gset_protected_nopar:Npn \CTEX@makeanchor #1
+ {
+ \Hy@MakeCurrentHrefAuto {#1}
+ \Hy@raisedlink
+ {
+ \hyper@anchorstart { \@currentHref }
+ \hyper@anchorend
+ }
+ }
+ \CTEX@hyperheadinghook
+ }
\cs_new_protected_nopar:Npn \ctex_titlesec_hook:
{
\@ifpackagewith { titlesec } { explicit }
@@ -1059,6 +1118,29 @@
{ \ctex_titlesec_hook: }
}
}
+\ctex_at_end_package:nn { titlesec }
+ {
+ \tl_set:Nn \ttl@chapterout { \typeout { \CTEXthechapter } }
+ \cs_if_free:NF \ttl@tocpart
+ {
+ \cs_set_protected_nopar:Npn \ttl@tocpart
+ { \tl_set:Nn \ttl@a { \CTEXthepart \hspace { 1em } } }
+ }
+ \seq_map_inline:Nn \c__ctex_headings_seq
+ {
+ \cs_if_exist:cF { ttl@toc #1 }
+ {
+ \cs_new_protected_nopar:cpx { ttl@toc #1 }
+ {
+ \tl_set:Nn \exp_not:N \ttl@a
+ {
+ \exp_not:N \protect
+ \exp_not:N \numberline { \exp_not:c { CTEXthe #1 } }
+ }
+ }
+ }
+ }
+ }
\group_begin:
\char_set_catcode_other:N \#
\cs_new_protected_nopar:Npn \ctex_titleps_hook:
@@ -1096,6 +1178,18 @@
\ctex_at_end_package:nn { titlesec }
{ \cs_if_free:NF \ttl@settopmark { \ctex_titleps_hook: } }
\ctex_at_end_package:nn { titleps } { \ctex_titleps_hook: }
+\ctex_at_end_package:nn { titleps }
+ {
+ \cs_set_protected_nopar:Npn \ttl@setifthe #1
+ {
+ \exp_args:Nco \cs_set_nopar:Npn { ifthe #1 }
+ {
+ \CTEXifname
+ { \protect \@firstoftwo }
+ { \protect \@secondoftwo }
+ }
+ }
+ }
\cs_new_protected:Npn \CTEX@toc@width@n #1
{
\hbox_set:Nn \l__ctex_tmp_box {#1}
@@ -1128,21 +1222,25 @@
}
}
\ctex_patch_cmd:Nnn \ps@headings
- { \@chapapp\ \thechapter.~\ }
- { \ifodd \CTEX@chapter@numbering \CTEXthechapter \quad \fi }
+ {
+ \ifnum \c@secnumdepth > \m@ne \if@mainmatter
+ \@chapapp \ \thechapter . ~ \
+ \fi \fi
+ }
+ { \CTEXifname { \CTEXthechapter \quad } { } }
\if@twoside
\ctex_patch_cmd:Nnn \ps@headings
- { \thesection.~\ }
- { \ifodd \CTEX@section@numbering \CTEXthesection \quad \fi }
+ { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi }
+ { \CTEXifname { \CTEXthesection } { } }
\fi:
\ctex_at_end_package:nn { fancyhdr }
{
\ctex_patch_cmd:Nnn \ps@fancy
- { \@chapapp\ \thechapter.~\ }
- { \ifodd \CTEX@chapter@numbering \CTEXthechapter \quad \fi }
+ { \ifnum \c@secnumdepth > \m@ne \@chapapp \ \thechapter . ~ \ \fi }
+ { \CTEXifname { \CTEXthechapter \quad } { } }
\ctex_patch_cmd:Nnn \ps@fancy
- { \thesection.~\ }
- { \ifodd \CTEX@section@numbering \CTEXthesection \quad \fi }
+ { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi }
+ { \CTEXifname { \CTEXthesection } { } }
}
\cs_new_protected_nopar:Npn \CTEX@setcurrentlabel@n #1
{
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexsize.sty b/Master/texmf-dist/tex/latex/ctex/ctexsize.sty
index f5f1b2d9cae..4457a4fbffd 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese font size definition (CTEX)}
\ProvidesExplPackage{ctexsize}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 fd335e4e329..790ae3defd2 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/08/27 v2.4.3 Space info for CJKpunct (CTEX)]
+ [2016/09/21 v2.4.4 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 068dd46bb46..dcc45a9024a 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls
+++ b/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls
@@ -28,10 +28,10 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{ctex documentation (CTEX)}
\ProvidesExplClass{ctxdoc}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
\ExplSyntaxOff
\let\pdfmdfivesum\mdfivesum
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{l3doc}}
@@ -63,6 +63,7 @@
\RequirePackage{xcolor}
\RequirePackage{caption}
\RequirePackage{fvrb-ex}
+\RequirePackage{zref-base}
\geometry{includemp,hmargin={0mm,15mm},vmargin={25mm,15mm},footskip=7mm}
\hypersetup{pdfstartview=FitH,bookmarksdepth=subparagraph}
\setcounter{secnumdepth}{4}
@@ -71,6 +72,7 @@
\setmainfont{TeX Gyre Pagella}
\setsansfont{TeX Gyre Heros}
\setmonofont[
+ HyphenChar = None ,
UprightFont=* Light, BoldFont=* Bold,
SlantedFont=* Light Oblique]{CMU Typewriter Text}
\setmathfont{texgyrepagella-math.otf}
@@ -171,10 +173,6 @@
\AfterEndEnvironment{function}{\ctexfixprevdepth}
\AtBeginEnvironment{syntax}{\linespread{1}\ctexplainps\ctexdisableecglue}
\BeforeBeginEnvironment{SideBySideExample}{\par\addvspace{\medskipamount}}
-\preto\MacroFont{\linespread{1}}
-\appto\MacroFont{\hyphenchar\font\m@ne\ctexdocverbaddon}
-\preto\AltMacroFont{\linespread{1}}
-\appto\AltMacroFont{\hyphenchar\font\m@ne\ctexdocverbaddon}
\newcommand*\exptarget{\Hy@raisedlink{\hypertarget{expstar}{}}}
\newcommand*\rexptarget{\Hy@raisedlink{\hypertarget{rexpstar}{}}}
\newcommand*\expstar{\hyperlink{expstar}{$\star$}}
@@ -220,29 +218,57 @@
{ \MacroFont \hbox:n }
{ \iow_term:n { *** ~ SUCCESS ~ *** } }
{ \iow_term:n { *** ~ FAIL ~ *** } }
-\ctex_patch_cmd_once:NnnnTF \__codedoc_macro_typeset_one:nN
- { }
- { \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 ~ *** } }
+\cs_set_eq:NN \__codedoc_macro_end_style:n \use_none:n
+\cs_set_protected:Npn \__codedoc_macro_typeset_one:nN #1#2
+ {
+ \vbox_set:Nn \l__codedoc_macro_box
+ {
+ \MacroFont
+ \vbox_unpack_clear:N \l__codedoc_macro_box
+ \hbox_set:Nn \l_tmpa_box
+ { \__codedoc_print_macroname:nN {#1} #2 }
+ \dim_set:Nn \l_tmpa_dim { \marginparwidth - \labelsep }
+ \dim_compare:nNnT { \box_wd:N \l_tmpa_box } > \l_tmpa_dim
+ {
+ \box_resize_to_wd_and_ht:Nnn \l_tmpa_box
+ { \l_tmpa_dim }
+ { \box_ht:N \l_tmpa_box }
+ }
+ \hbox_overlap_left:n
+ {
+ \box_use:N \l_tmpa_box
+ \skip_horizontal:n { \marginparsep - \labelsep }
+ }
+ }
+ \int_incr:N \l__codedoc_macro_int
+ }
+\cs_set_protected:Npn \__codedoc_print_macroname:nN #1#2
+ {
+ \strut
+ \__codedoc_get_hyper_target:xN
+ {
+ \exp_not:n {#1}
+ \bool_if:NT #2 { \tl_to_str:n {TF} }
+ }
+ \l__codedoc_tmpa_tl
+ \cs_if_exist:cTF { r@ \l__codedoc_tmpa_tl }
+ { \exp_args:NNo \label@hyperref [ \l__codedoc_tmpa_tl ] }
+ { \use:n }
+ {
+ \tl_set:Nn \l__codedoc_tmpa_tl {#1}
+ \tl_replace_all:Non \l__codedoc_tmpa_tl
+ { \c_catcode_other_space_tl }
+ { \fontspec_visible_space: }
+ \__codedoc_macroname_prefix:o \l__codedoc_tmpa_tl
+ \__codedoc_macroname_suffix:N #2
+ }
+ }
\AtBeginEnvironment { syntax }
{
\char_set_catcode_active:N \|
@@ -277,9 +303,6 @@
{ \fileinfo }
}
\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
{
@@ -298,18 +321,24 @@
\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
+ \int_zero:N \l_tmpa_int
+ \seq_set_split:Nnn \l_tmpa_seq { . } {#1}
+ \seq_map_function:NN \l_tmpa_seq \__ctxdoc_version_zfill:n
+ \int_compare:nNnF \l_tmpa_int > \c_two
+ {
+ \tl_put_right:Nx \l__ctxdoc_tmp_tl
+ { \prg_replicate:nn { \c_three - \l_tmpa_int } { 00000 } }
+ }
\__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
{
+ \int_incr:N \l_tmpa_int
\tl_put_right:Nx \l__ctxdoc_tmp_tl
{
\prg_replicate:nn
- { \int_max:nn { 0 } { 10 - \tl_count:n {#1} } } { 0 }
+ { \int_max:nn { 0 } { 5 - \tl_count:n {#1} } } { 0 }
\exp_not:n {#1}
}
}
@@ -465,7 +494,7 @@
\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 }
+ { \color { verb@guard } }
{ \__ctxdoc_module_pop:n { \l__ctxdoc_verbatim_line_tl } }
}
{ \tl_use:N \l__ctxdoc_verbatim_line_tl }
@@ -500,45 +529,39 @@
\cs_new_protected:Npn \__ctxdoc_module_star:w #1 > #2 \q_stop
{
\__ctxdoc_output_module:nn
- { star@guard }
+ { \__ctxdoc_star_color: }
{ \__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}
+ \__ctxdoc_star_format:
}
\cs_new_protected:Npn \__ctxdoc_module_slash:w #1 > #2 \q_stop
{
\__ctxdoc_output_module:nn
- { slash@guard }
+ { \__ctxdoc_slash_color: }
{ \__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}
+ \__ctxdoc_slash_format:
}
\cs_new_protected:Npn \__ctxdoc_module_at:w @ @ = #1 > #2 \q_stop
{
\__ctxdoc_output_module:nn
- { at@guard }
+ { \color { 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} }
+ \tex_noindent:D
+ \hbox_overlap_left:n
+ {
+ \__ctxdoc_output_module:nn
+ { \__ctxdoc_pm_color: }
+ { \__ctxdoc_module_angle:n {#1} }
+ \skip_horizontal:n { \leftskip + \smallskipamount }
+ }
\group_begin:
- \int_compare:nNnF \guard@level < \c@StandardModuleDepth
- { \AltMacroFont }
+ \__ctxdoc_pm_format:
\__ctxdoc_output_line:n {#2}
\group_end:
}
@@ -548,7 +571,7 @@
\tl_gset:Nx \g__ctxdoc_verbatim_verb_stop_tl
{ \c_percent_str \tl_tail:n {#1} }
\__ctxdoc_output_module:nn
- { star@guard }
+ { \color { verb@guard } }
{ \__ctxdoc_module_push:n { \l__ctxdoc_verbatim_line_tl } }
}
\group_end:
@@ -596,43 +619,141 @@
\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 } }
+ { \exp_args:No \__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 }
+ \hypersetup { hidelinks }
+ \exp_args:Nx \hdclindex
+ { \zref@extractdefault { HD.#1 } { guard@end } { 1 } } { }
}
\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 } { }
- }
+ { \exp_args:No \__ctxdoc_module_pop_aux:nn { \l__ctxdoc_tmp_tl } }
{ \BOOM \use:n }
}
+\cs_new_protected:Npn \__ctxdoc_module_pop_aux:nn #1
+ {
+ \zref@labelbylist { HD.#1 } { ctxdoc }
+ \hypersetup { hidelinks }
+ \hdclindex {#1} { }
+ }
\seq_new:N \g__ctxdoc_module_dest_seq
+\zref@newlist { ctxdoc }
+\zref@newprop { guard@end } [ 1 ]
+ { \int_eval:n { \c@HD@hypercount - 1 } }
+\zref@addprop { ctxdoc } { guard@end }
+\cs_new_protected_nopar:Npn \__ctxdoc_star_format:
+ {
+ \seq_gpush:No \g__ctxdoc_slash_format_seq { \macro@font }
+ \seq_gpop:NNF \g__ctxdoc_star_format_seq \l__ctxdoc_format_tl
+ { \__ctxdoc_pop_format: }
+ \__ctxdoc_select_format:
+ }
+\cs_new_protected_nopar:Npn \__ctxdoc_slash_format:
+ {
+ \seq_gpop:NNTF \g__ctxdoc_slash_format_seq \l__ctxdoc_format_tl
+ {
+ \seq_gpush:No \g__ctxdoc_star_format_seq { \macro@font }
+ \__ctxdoc_select_format:
+ }
+ { \BOOM }
+ }
+\cs_new_protected_nopar:Npn \__ctxdoc_pm_format:
+ {
+ \seq_get:NNF \g__ctxdoc_star_format_seq \l__ctxdoc_format_tl
+ {
+ \__ctxdoc_pop_format:
+ \seq_gpush:No \g__ctxdoc_star_format_seq { \l__ctxdoc_format_tl }
+ }
+ \cs_if_eq:NNF \macro@font \l__ctxdoc_format_tl
+ { \l__ctxdoc_format_tl }
+ }
+\cs_new_protected_nopar:Npn \__ctxdoc_pop_format:
+ {
+ \seq_gpop_left:NN \g__ctxdoc_format_seq \l__ctxdoc_format_tl
+ \seq_gput_right:No \g__ctxdoc_format_seq { \l__ctxdoc_format_tl }
+ }
+\cs_new_protected_nopar:Npn \__ctxdoc_select_format:
+ {
+ \cs_if_eq:NNF \macro@font \l__ctxdoc_format_tl
+ {
+ \cs_gset_eq:NN \macro@font \l__ctxdoc_format_tl
+ \macro@font
+ }
+ }
+\tl_new:N \l__ctxdoc_format_tl
+\seq_new:N \g__ctxdoc_format_seq
+\seq_new:N \g__ctxdoc_star_format_seq
+\seq_new:N \g__ctxdoc_slash_format_seq
+\seq_gput_right:Nn \g__ctxdoc_format_seq { \MacroFont }
+\seq_gput_right:Nn \g__ctxdoc_format_seq { \AltMacroFont }
+\cs_set_protected:Npn \MacroFont
+ {
+ \linespread { 1 }
+ \small
+ \fontseries { \mddefault }
+ \fontshape { \updefault }
+ \ttfamily
+ \ctexdocverbaddon
+ }
+\cs_set_protected:Npn \AltMacroFont
+ {
+ \linespread { 1 }
+ \small
+ \fontseries { \mddefault }
+ \fontshape { \sldefault }
+ \ttfamily
+ \ctexdocverbaddon
+ }
+\AtBeginDocument
+ {
+ \tl_gset:Nx \macro@font
+ { \seq_item:Nn \g__ctxdoc_format_seq { 1 } }
+ }
\cs_new_protected:Npn \__ctxdoc_output_module:nn #1#2
{
\tex_noindent:D
\group_begin:
- \color {#1} \footnotesize \normalfont \sffamily #2
+ #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 }
+\cs_new_protected_nopar:Npn \__ctxdoc_star_color:
+ {
+ \seq_gpop:NNTF \g__ctxdoc_star_color_seq \current@color
+ { \set@color }
+ { \__ctxdoc_select_color: }
+ \seq_gpush:No \g__ctxdoc_slash_color_seq { \current@color }
+ }
+\cs_new_protected_nopar:Npn \__ctxdoc_slash_color:
+ {
+ \seq_gpop:NNTF \g__ctxdoc_slash_color_seq \current@color
+ {
+ \set@color
+ \seq_gpush:No \g__ctxdoc_star_color_seq { \current@color }
+ }
+ { \BOOM }
+ }
+\cs_new_protected_nopar:Npn \__ctxdoc_pm_color:
+ {
+ \seq_get:NNTF \g__ctxdoc_star_color_seq \current@color
+ { \set@color }
+ {
+ \__ctxdoc_select_color:
+ \seq_gpush:No \g__ctxdoc_star_color_seq { \current@color }
+ }
+ }
+\seq_new:N \g__ctxdoc_star_color_seq
+\seq_new:N \g__ctxdoc_slash_color_seq
+\cs_new_protected_nopar:Npn \__ctxdoc_select_color:
+ { \color { guard@series!!+ } }
+\definecolorseries { guard@series }
+ { cmyk } { last } { blue } { purple }
+\resetcolorseries [ 3 ] { guard@series }
+\definecolor { verb@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 }
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 a5e094016ac..22714be069a 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/08/27 v2.4.3 Chinese translation for theorem name (CTEX)]
+ [2016/09/21 v2.4.4 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 1bc429292ed..674d6134469 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/08/27 v2.4.3 Chinese translation for theorem name (CTEX)]
+ [2016/09/21 v2.4.4 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 1059651422b..b5201eeb501 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,15 +26,15 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Asian pTeX adapter (CTEX)}
\ProvidesExplFile{ctex-engine-aptex.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
\cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1
{
- \AtBeginDvi { #1 }
+ \AtBeginDvi {#1}
\ctex_at_end_package:nn { atbegshi }
- { \AtBeginShipoutFirst { #1 } }
+ { \AtBeginShipoutFirst {#1} }
}
\@onlypreamble \ctex_set_zhmap:n
\tl_set:Nn \CJKrmdefault { rm }
@@ -161,9 +161,7 @@
}
\ctex_hypersetup:n { driverfallback = dvipdfmx }
\ctex_at_end_package:nn { hyperref }
- {
- \AtBeginShipoutFirst{ \special{ pdf:tounicode~ UTF8-UTF16 } }
- }
+ { \AtBeginShipoutFirst { \special { pdf:tounicode~ UTF8-UTF16 } } }
\msg_new:nnn { ctex } { fntef-not-available }
{ Functions~ of~ `CJKfntef'~ is~ not~ available~ in~ ApLaTeX. }
\msg_warning:nn { ctex } { fntef-not-available }
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 7db74f2b2dd..ace408634f3 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{LuaLaTeX adapter (CTEX)}
\ProvidesExplFile{ctex-engine-luatex.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
\msg_new:nnn { ctex } { luatexja-loaded }
{
Package~`luatexja'~can~not~be~loaded~before~`ctex'.\\
@@ -67,7 +67,7 @@
local s = kpse.find_file('ltj-kinsoku.lua', 'tex')
luatexja.stack.charprop_stack_table[0] = s and dofile(s) or {}
}
-\ltjsetparameter{kanjiskip=\z@ plus .4pt minus .4pt,
+\ltjsetparameter{kanjiskip=\z@ plus .4pt minus .5pt,
xkanjiskip=.25\zw plus 1pt minus 1pt,
autospacing, autoxspacing, jacharrange={-1},
yalbaselineshift=\z@, yjabaselineshift=\z@,
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 7163206437a..6efb3dc6c33 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,15 +26,15 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{(pdf)LaTeX adapter (CTEX)}
\ProvidesExplFile{ctex-engine-pdftex.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
\cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1
{
- \AtBeginDvi { #1 }
+ \AtBeginDvi {#1}
\ctex_at_end_package:nn { atbegshi }
- { \AtBeginShipoutFirst { #1 } }
+ { \AtBeginShipoutFirst {#1} }
}
\@onlypreamble \ctex_set_zhmap:n
\seq_new:N \c__ctex_cmap_encoding_seq
@@ -98,9 +98,22 @@
\tl_set:Nn \CJKrmdefault {#1}
\tl_set:Nn \CJKsfdefault {#2}
\tl_set:Nn \CJKttdefault {#3}
- \ctex_set_zhmap:n { \file_input:n {#4} }
+ \ctex_set_zhmap:n { \ctex_zhmap_input:n {#4} }
}
\@onlypreamble \ctex_load_zhmap:nnnn
+ \cs_new_protected_nopar:Npn \ctex_zhmap_input:n #1
+ {
+ \ctex_file_wrapper:nnn
+ {
+ \char_set_catcode_comment:n { 37 } % %
+ \char_set_catcode_escape:n { 92 } % \
+ }
+ { \file_input:n {#1} }
+ {
+ \char_set_catcode:nn { 37 } { \char_value_catcode:n { 37 } }
+ \char_set_catcode:nn { 92 } { \char_value_catcode:n { 92 } }
+ }
+ }
\tl_if_exist:NF \CJKfamilydefault
{ \tl_const:Nn \CJKfamilydefault { \CJKrmdefault } }
\tl_if_exist:NF \CJKrmdefault { \tl_new:N \CJKrmdefault }
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 42d3793ac72..8c373ed5dca 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,15 +26,15 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{upTeX adapter (CTEX)}
\ProvidesExplFile{ctex-engine-uptex.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
\cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1
{
- \AtBeginDvi { #1 }
+ \AtBeginDvi {#1}
\ctex_at_end_package:nn { atbegshi }
- { \AtBeginShipoutFirst { #1 } }
+ { \AtBeginShipoutFirst {#1} }
}
\@onlypreamble \ctex_set_zhmap:n
\tl_set:Nn \CJKrmdefault { rm }
@@ -171,9 +171,7 @@
\str_const:Nn \c__ctex_macosx_file_str { /Library/Fonts/Songti.ttc }
\ctex_hypersetup:n { driverfallback = dvipdfmx }
\ctex_at_end_package:nn { hyperref }
- {
- \AtBeginShipoutFirst{ \special{ pdf:tounicode~ UTF8-UTF16 } }
- }
+ { \AtBeginShipoutFirst { \special { pdf:tounicode~ UTF8-UTF16 } } }
\msg_new:nnn { ctex } { fntef-not-available }
{ Functions~ of~ `CJKfntef'~ is~ not~ available~ in~ upLaTeX. }
\msg_warning:nn { ctex } { fntef-not-available }
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 2d1e4ce0ae7..b6050d8c588 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,15 +26,14 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{XeLaTeX adapter (CTEX)}
\ProvidesExplFile{ctex-engine-xetex.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
\RequirePackage { xeCJK }
\exp_args:Nx \xeCJKsetup
{
LoadFandol = false ,
- AutoFakeBold = true ,
PunctStyle = \l__ctex_punct_tl
}
\@ifpackagelater { fontspec } { 2014/05/25 } { }
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd b/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd
index a73b6c5ea89..f753f4bddc4 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/08/27 v2.4.3 Chinese font definition (CTEX)]
+ [2016/09/21 v2.4.4 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 71d72221ba3..23b5b8d0bb2 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/08/27 v2.4.3 Chinese font definition (CTEX)]
+ [2016/09/21 v2.4.4 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 c46aeb62543..d888b06356c 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/08/27 v2.4.3 Chinese font definition (CTEX)]
+ [2016/09/21 v2.4.4 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 ee946f33439..c376e2776c1 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/08/27 v2.4.3 Chinese font definition (CTEX)]
+ [2016/09/21 v2.4.4 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 96e5f9b814c..b29dd68a5d4 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/08/27 v2.4.3 Chinese font definition (CTEX)]
+ [2016/09/21 v2.4.4 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 3e174451582..99d1f6eab30 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/08/27 v2.4.3 Chinese font definition (CTEX)]
+ [2016/09/21 v2.4.4 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 a9d9ce4e129..a091ba7960d 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Adobe fonts definition (CTEX)}
\ProvidesExplFile{ctex-fontset-adobe.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 0f13bc58b38..20f31ff5ce5 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Fandol fonts definition (CTEX)}
\ProvidesExplFile{ctex-fontset-fandol.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 33471678cb1..adf833fa9bb 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Founder fonts definition (CTEX)}
\ProvidesExplFile{ctex-fontset-founder.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 7333c17cba7..7725b6c97c8 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Mac OS X fonts definition (CTEX)}
\ProvidesExplFile{ctex-fontset-mac.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 64cc5aebf22..18aa75b3dd5 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Ubuntu fonts definition (CTEX)}
\ProvidesExplFile{ctex-fontset-ubuntu.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 bc1f88effd1..d5c108d3fdb 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Windows fonts definition (CTEX)}
\ProvidesExplFile{ctex-fontset-windows.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 c11dce2144f..82ac3e9b3d8 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Windows fonts definition for Vista or later version (CTEX)}
\ProvidesExplFile{ctex-fontset-windowsnew.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 a6f97fbf6fb..1c8ea4d162a 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Windows fonts definition for XP or earlier version (CTEX)}
\ProvidesExplFile{ctex-fontset-windowsold.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 fc8f1584bbc..64358c44c7c 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese scheme for article (CTEX)}
\ProvidesExplFile{ctex-scheme-chinese-article.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
\keys_set:nn { ctex / part }
{
aftertitle = \par ,
@@ -48,6 +48,7 @@
beforeskip = 3.5ex \@plus 1ex \@minus .2ex ,
afterskip = 2.3ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
format = \Large \bfseries \centering ,
afterindent = true
}
@@ -60,6 +61,7 @@
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1.5ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
afterindent = true
}
\keys_set:nn { ctex / subsubsection }
@@ -71,6 +73,7 @@
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1.5ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
afterindent = true
}
\keys_set:nn { ctex / paragraph }
@@ -79,6 +82,7 @@
format = \normalsize \bfseries ,
aftername = \quad ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
+ break = \addpenalty \@secpenalty ,
afterindent = true
}
\keys_set:nn { ctex / subparagraph }
@@ -87,6 +91,7 @@
format = \normalsize \bfseries ,
aftername = \quad ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
+ break = \addpenalty \@secpenalty ,
afterindent = true
}
\int_compare:nNnTF \g__ctex_section_depth_flag > \c_two
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 b4716185c90..43ec409b072 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese scheme for beamer (CTEX)}
\ProvidesExplFile{ctex-scheme-chinese-beamer.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 1973416383b..c180029d209 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese scheme for book (CTEX)}
\ProvidesExplFile{ctex-scheme-chinese-book.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
\keys_set:nn { ctex / part }
{
aftertitle = \par ,
@@ -38,6 +38,7 @@
beforeskip = 0pt \@plus 1fil ,
afterskip = 0pt \@plus 1fil ,
pagestyle = plain ,
+ break = \if@openright \cleardoublepage \else \clearpage \fi ,
format = \huge \bfseries \centering
}
\keys_set:nn { ctex / chapter }
@@ -46,6 +47,7 @@
aftertitle = \par ,
beforeskip = 50 \p@ ,
afterskip = 40 \p@ ,
+ break = \if@openright \cleardoublepage \else \clearpage \fi ,
number = \chinese { chapter } ,
format = \huge \bfseries \centering ,
aftername = \quad ,
@@ -59,6 +61,7 @@
beforeskip = 3.5ex \@plus 1ex \@minus .2ex ,
afterskip = 2.3ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
format = \Large \bfseries \centering ,
afterindent = true
}
@@ -71,6 +74,7 @@
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1.5ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
afterindent = true
}
\keys_set:nn { ctex / subsubsection }
@@ -82,6 +86,7 @@
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1.5ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
afterindent = true
}
\keys_set:nn { ctex / paragraph }
@@ -90,6 +95,7 @@
format = \normalsize \bfseries ,
aftername = \quad ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
+ break = \addpenalty \@secpenalty ,
afterindent = true
}
\keys_set:nn { ctex / subparagraph }
@@ -98,6 +104,7 @@
format = \normalsize \bfseries ,
aftername = \quad ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
+ break = \addpenalty \@secpenalty ,
afterindent = true
}
\int_compare:nNnTF \g__ctex_section_depth_flag > \c_two
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 cd71b7ae9a8..dd8995d2d92 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese scheme for report (CTEX)}
\ProvidesExplFile{ctex-scheme-chinese-report.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
\keys_set:nn { ctex / part }
{
aftertitle = \par ,
@@ -38,6 +38,7 @@
beforeskip = 0pt \@plus 1fil ,
afterskip = 0pt \@plus 1fil ,
pagestyle = plain ,
+ break = \if@openright \cleardoublepage \else \clearpage \fi ,
format = \huge \bfseries \centering
}
\keys_set:nn { ctex / chapter }
@@ -46,6 +47,7 @@
aftertitle = \par ,
beforeskip = 50 \p@ ,
afterskip = 40 \p@ ,
+ break = \if@openright \cleardoublepage \else \clearpage \fi ,
number = \chinese { chapter } ,
format = \huge \bfseries \centering ,
aftername = \quad ,
@@ -59,6 +61,7 @@
beforeskip = 3.5ex \@plus 1ex \@minus .2ex ,
afterskip = 2.3ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
format = \Large \bfseries \centering ,
afterindent = true
}
@@ -71,6 +74,7 @@
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1.5ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
afterindent = true
}
\keys_set:nn { ctex / subsubsection }
@@ -82,6 +86,7 @@
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1.5ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
afterindent = true
}
\keys_set:nn { ctex / paragraph }
@@ -90,6 +95,7 @@
format = \normalsize \bfseries ,
aftername = \quad ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
+ break = \addpenalty \@secpenalty ,
afterindent = true
}
\keys_set:nn { ctex / subparagraph }
@@ -98,6 +104,7 @@
format = \normalsize \bfseries ,
aftername = \quad ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
+ break = \addpenalty \@secpenalty ,
afterindent = true
}
\int_compare:nNnTF \g__ctex_section_depth_flag > \c_two
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 02fd2548e60..9b71d1df5ba 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese scheme for generic (CTEX)}
\ProvidesExplFile{ctex-scheme-chinese.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 cdb870f9105..666ee851723 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Plain scheme for article (CTEX)}
\ProvidesExplFile{ctex-scheme-plain-article.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
\keys_set:nn { ctex / part }
{
aftertitle = \par ,
@@ -51,6 +51,7 @@
beforeskip = 3.5ex \@plus 1ex \@minus .2ex ,
afterskip = 2.3ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
format = \Large \bfseries ,
afterindent = false
}
@@ -63,6 +64,7 @@
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1.5ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
afterindent = false
}
\keys_set:nn { ctex / subsubsection }
@@ -74,6 +76,7 @@
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1.5ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
afterindent = false
}
\keys_set:nn { ctex / paragraph }
@@ -82,6 +85,7 @@
format = \normalsize \bfseries ,
aftername = \quad ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
+ break = \addpenalty \@secpenalty ,
afterindent = false
}
\keys_set:nn { ctex / subparagraph }
@@ -90,6 +94,7 @@
format = \normalsize \bfseries ,
aftername = \quad ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
+ break = \addpenalty \@secpenalty ,
afterindent = false
}
\int_compare:nNnTF \g__ctex_section_depth_flag > \c_two
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 08ee4d11e98..c3e569c1093 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Plain scheme for beamer (CTEX)}
\ProvidesExplFile{ctex-scheme-plain-beamer.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\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 a34365f1653..a1e840e79d3 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Plain scheme for book (CTEX)}
\ProvidesExplFile{ctex-scheme-plain-book.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
\keys_set:nn { ctex / part }
{
aftertitle = \par ,
@@ -39,6 +39,7 @@
beforeskip = 0pt \@plus 1fil ,
afterskip = 0pt \@plus 1fil ,
pagestyle = plain ,
+ break = \if@openright \cleardoublepage \else \clearpage \fi ,
format = \centering ,
nameformat = \huge \bfseries ,
titleformat = \Huge \bfseries
@@ -49,6 +50,7 @@
aftertitle = \par ,
beforeskip = 50 \p@ ,
afterskip = 40 \p@ ,
+ break = \if@openright \cleardoublepage \else \clearpage \fi ,
name = \chaptername \space ,
number = \thechapter ,
format = \raggedright ,
@@ -65,6 +67,7 @@
beforeskip = 3.5ex \@plus 1ex \@minus .2ex ,
afterskip = 2.3ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
format = \Large \bfseries ,
afterindent = false
}
@@ -77,6 +80,7 @@
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1.5ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
afterindent = false
}
\keys_set:nn { ctex / subsubsection }
@@ -88,6 +92,7 @@
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1.5ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
afterindent = false
}
\keys_set:nn { ctex / paragraph }
@@ -96,6 +101,7 @@
format = \normalsize \bfseries ,
aftername = \quad ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
+ break = \addpenalty \@secpenalty ,
afterindent = false
}
\keys_set:nn { ctex / subparagraph }
@@ -104,6 +110,7 @@
format = \normalsize \bfseries ,
aftername = \quad ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
+ break = \addpenalty \@secpenalty ,
afterindent = false
}
\int_compare:nNnTF \g__ctex_section_depth_flag > \c_two
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 90eacdb46bd..cf917497eb3 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Plain scheme for report (CTEX)}
\ProvidesExplFile{ctex-scheme-plain-report.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
\keys_set:nn { ctex / part }
{
aftertitle = \par ,
@@ -39,6 +39,7 @@
beforeskip = 0pt \@plus 1fil ,
afterskip = 0pt \@plus 1fil ,
pagestyle = plain ,
+ break = \if@openright \cleardoublepage \else \clearpage \fi ,
format = \centering ,
nameformat = \huge \bfseries ,
titleformat = \Huge \bfseries
@@ -49,6 +50,7 @@
aftertitle = \par ,
beforeskip = 50 \p@ ,
afterskip = 40 \p@ ,
+ break = \if@openright \cleardoublepage \else \clearpage \fi ,
name = \chaptername \space ,
number = \thechapter ,
format = \raggedright ,
@@ -65,6 +67,7 @@
beforeskip = 3.5ex \@plus 1ex \@minus .2ex ,
afterskip = 2.3ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
format = \Large \bfseries ,
afterindent = false
}
@@ -77,6 +80,7 @@
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1.5ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
afterindent = false
}
\keys_set:nn { ctex / subsubsection }
@@ -88,6 +92,7 @@
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1.5ex \@plus .2ex ,
runin = false ,
+ break = \addpenalty \@secpenalty ,
afterindent = false
}
\keys_set:nn { ctex / paragraph }
@@ -96,6 +101,7 @@
format = \normalsize \bfseries ,
aftername = \quad ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
+ break = \addpenalty \@secpenalty ,
afterindent = false
}
\keys_set:nn { ctex / subparagraph }
@@ -104,6 +110,7 @@
format = \normalsize \bfseries ,
aftername = \quad ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
+ break = \addpenalty \@secpenalty ,
afterindent = false
}
\int_compare:nNnTF \g__ctex_section_depth_flag > \c_two
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 834f7b0fc86..8436dcc7906 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 e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
{Plain scheme for generic (CTEX)}
\ProvidesExplFile{ctex-scheme-plain.def}
- {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.4}{\ExplFileDescription}
%%
%%
%% End of file `ctex-scheme-plain.def'.