From cdbf5b2c845ca6b373fff9043f2e00b14807950a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 25 Sep 2016 21:05:03 +0000 Subject: ctex git-svn-id: svn://tug.org/texlive/trunk@42148 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/ctex/config/ctex-name-gbk.cfg | 4 +- .../tex/latex/ctex/config/ctex-name-utf8.cfg | 4 +- Master/texmf-dist/tex/latex/ctex/config/ctex.cfg | 4 +- .../texmf-dist/tex/latex/ctex/config/ctexopts.cfg | 4 +- Master/texmf-dist/tex/latex/ctex/ctex-article.def | 146 ++++++++--- Master/texmf-dist/tex/latex/ctex/ctex-beamer.def | 4 +- Master/texmf-dist/tex/latex/ctex/ctex-book.def | 184 ++++++++++---- Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo | 4 +- Master/texmf-dist/tex/latex/ctex/ctex-cs4size.clo | 4 +- Master/texmf-dist/tex/latex/ctex/ctex-report.def | 180 ++++++++++---- Master/texmf-dist/tex/latex/ctex/ctex.sty | 6 +- Master/texmf-dist/tex/latex/ctex/ctexart.cls | 148 +++++++++--- Master/texmf-dist/tex/latex/ctex/ctexbeamer.cls | 6 +- Master/texmf-dist/tex/latex/ctex/ctexbook.cls | 186 ++++++++++---- Master/texmf-dist/tex/latex/ctex/ctexcap.sty | 4 +- Master/texmf-dist/tex/latex/ctex/ctexheading.sty | 4 +- Master/texmf-dist/tex/latex/ctex/ctexhook.sty | 4 +- Master/texmf-dist/tex/latex/ctex/ctexpatch.sty | 4 +- Master/texmf-dist/tex/latex/ctex/ctexrep.cls | 182 ++++++++++---- Master/texmf-dist/tex/latex/ctex/ctexsize.sty | 4 +- Master/texmf-dist/tex/latex/ctex/ctexspa.def | 2 +- Master/texmf-dist/tex/latex/ctex/ctxdoc.cls | 267 +++++++++++++++------ .../translator-theorem-dictionary-ChineseGBK.dict | 2 +- .../translator-theorem-dictionary-ChineseUTF8.dict | 2 +- .../tex/latex/ctex/engine/ctex-engine-aptex.def | 12 +- .../tex/latex/ctex/engine/ctex-engine-luatex.def | 6 +- .../tex/latex/ctex/engine/ctex-engine-pdftex.def | 23 +- .../tex/latex/ctex/engine/ctex-engine-uptex.def | 12 +- .../tex/latex/ctex/engine/ctex-engine-xetex.def | 5 +- Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd | 2 +- Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd | 2 +- Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd | 2 +- Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd | 2 +- Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd | 2 +- Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd | 2 +- .../tex/latex/ctex/fontset/ctex-fontset-adobe.def | 4 +- .../tex/latex/ctex/fontset/ctex-fontset-fandol.def | 4 +- .../latex/ctex/fontset/ctex-fontset-founder.def | 4 +- .../tex/latex/ctex/fontset/ctex-fontset-mac.def | 4 +- .../tex/latex/ctex/fontset/ctex-fontset-ubuntu.def | 4 +- .../latex/ctex/fontset/ctex-fontset-windows.def | 4 +- .../latex/ctex/fontset/ctex-fontset-windowsnew.def | 4 +- .../latex/ctex/fontset/ctex-fontset-windowsold.def | 4 +- .../ctex/scheme/ctex-scheme-chinese-article.def | 9 +- .../ctex/scheme/ctex-scheme-chinese-beamer.def | 4 +- .../latex/ctex/scheme/ctex-scheme-chinese-book.def | 11 +- .../ctex/scheme/ctex-scheme-chinese-report.def | 11 +- .../tex/latex/ctex/scheme/ctex-scheme-chinese.def | 4 +- .../ctex/scheme/ctex-scheme-plain-article.def | 9 +- .../latex/ctex/scheme/ctex-scheme-plain-beamer.def | 4 +- .../latex/ctex/scheme/ctex-scheme-plain-book.def | 11 +- .../latex/ctex/scheme/ctex-scheme-plain-report.def | 11 +- .../tex/latex/ctex/scheme/ctex-scheme-plain.def | 4 +- 53 files changed, 1137 insertions(+), 402 deletions(-) (limited to 'Master/texmf-dist/tex/latex/ctex') 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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {(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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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 $ +\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee $ {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'. -- cgit v1.2.3