From b1cf361795a720dbfa84ca6546355be360964437 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 23 Aug 2020 20:53:47 +0000 Subject: ctex (23aug20) git-svn-id: svn://tug.org/texlive/trunk@56161 c570f23f-e606-0410-a88d-b1316a301751 --- .../latex/ctex/heading/ctex-heading-article.def | 25 ++++++++++++++++------ .../tex/latex/ctex/heading/ctex-heading-beamer.def | 25 ++++++++++++++++------ .../tex/latex/ctex/heading/ctex-heading-book.def | 25 ++++++++++++++++------ .../tex/latex/ctex/heading/ctex-heading-report.def | 25 ++++++++++++++++------ 4 files changed, 76 insertions(+), 24 deletions(-) (limited to 'Master/texmf-dist/tex/latex/ctex/heading') diff --git a/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-article.def b/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-article.def index a379007d77d..885d785e2a1 100644 --- a/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-article.def +++ b/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-article.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx 76d4e94 2020-06-06 23:22:18 +0800 Qing Lee $ +\GetIdInfo$Id: ctex.dtx e805781 2020-08-23 21:30:35 +0800 Qing Lee $ {Heading modification for article (CTEX)} \ProvidesExplFile{ctex-article.def} - {\ExplFileDate}{2.5.3}{\ExplFileDescription} + {\ExplFileDate}{2.5.4}{\ExplFileDescription} \seq_const_from_clist:Nn \c__ctex_section_headings_seq { section , subsection , subsubsection , paragraph , subparagraph } \seq_new:N \c__ctex_headings_seq @@ -709,12 +709,25 @@ } \cs_new_protected:Npn \ctex_cleveref_hook: { - \ctex_patch_cmd:Nnn \refstepcounter@noarg - { \endcsname \csname the } - { \expandafter \endcsname \csname the } - \ctex_patch_cmd:Nnn \refstepcounter@optarg + \@ifpackageloaded { hyperref } + { \__ctex_cleveref_hook_aux:N \H@refstepcounter } + { + \__ctex_cleveref_hook_aux:N \refstepcounter@noarg + \__ctex_cleveref_hook_aux:N \refstepcounter@optarg + } + \__ctex_cleveref_hook_aux:N \appendix + } +\cs_new_protected:Npn \__ctex_cleveref_hook_aux:N #1 + { + \ctex_patch_cmd_all:NnnnTF #1 + { + \ExplSyntaxOff + \char_set_catcode_letter:n { 64 } + } { \endcsname \csname the } { \expandafter \endcsname \csname the } + { } + { \ctex_patch_failure:N #1 } } \cs_if_exist:NTF \labelformat { \ctex_varioref_hook: } diff --git a/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-beamer.def b/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-beamer.def index dc38764ff74..180eec15942 100644 --- a/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-beamer.def +++ b/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-beamer.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx 76d4e94 2020-06-06 23:22:18 +0800 Qing Lee $ +\GetIdInfo$Id: ctex.dtx e805781 2020-08-23 21:30:35 +0800 Qing Lee $ {Heading modification for beamer (CTEX)} \ProvidesExplFile{ctex-beamer.def} - {\ExplFileDate}{2.5.3}{\ExplFileDescription} + {\ExplFileDate}{2.5.4}{\ExplFileDescription} \seq_const_from_clist:Nn \c__ctex_headings_seq { part , section , subsection } \cs_new_protected:Npn \__ctex_initial_heading:n #1 @@ -221,12 +221,25 @@ } \cs_new_protected:Npn \ctex_cleveref_hook: { - \ctex_patch_cmd:Nnn \refstepcounter@noarg - { \endcsname \csname the } - { \expandafter \endcsname \csname the } - \ctex_patch_cmd:Nnn \refstepcounter@optarg + \@ifpackageloaded { hyperref } + { \__ctex_cleveref_hook_aux:N \H@refstepcounter } + { + \__ctex_cleveref_hook_aux:N \refstepcounter@noarg + \__ctex_cleveref_hook_aux:N \refstepcounter@optarg + } + \__ctex_cleveref_hook_aux:N \appendix + } +\cs_new_protected:Npn \__ctex_cleveref_hook_aux:N #1 + { + \ctex_patch_cmd_all:NnnnTF #1 + { + \ExplSyntaxOff + \char_set_catcode_letter:n { 64 } + } { \endcsname \csname the } { \expandafter \endcsname \csname the } + { } + { \ctex_patch_failure:N #1 } } \cs_if_exist:NTF \labelformat { \ctex_varioref_hook: } diff --git a/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-book.def b/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-book.def index 551a33cce3f..98efa36e7af 100644 --- a/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-book.def +++ b/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-book.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx 76d4e94 2020-06-06 23:22:18 +0800 Qing Lee $ +\GetIdInfo$Id: ctex.dtx e805781 2020-08-23 21:30:35 +0800 Qing Lee $ {Heading modification for book (CTEX)} \ProvidesExplFile{ctex-book.def} - {\ExplFileDate}{2.5.3}{\ExplFileDescription} + {\ExplFileDate}{2.5.4}{\ExplFileDescription} \seq_const_from_clist:Nn \c__ctex_section_headings_seq { section , subsection , subsubsection , paragraph , subparagraph } \seq_new:N \c__ctex_headings_seq @@ -837,12 +837,25 @@ } \cs_new_protected:Npn \ctex_cleveref_hook: { - \ctex_patch_cmd:Nnn \refstepcounter@noarg - { \endcsname \csname the } - { \expandafter \endcsname \csname the } - \ctex_patch_cmd:Nnn \refstepcounter@optarg + \@ifpackageloaded { hyperref } + { \__ctex_cleveref_hook_aux:N \H@refstepcounter } + { + \__ctex_cleveref_hook_aux:N \refstepcounter@noarg + \__ctex_cleveref_hook_aux:N \refstepcounter@optarg + } + \__ctex_cleveref_hook_aux:N \appendix + } +\cs_new_protected:Npn \__ctex_cleveref_hook_aux:N #1 + { + \ctex_patch_cmd_all:NnnnTF #1 + { + \ExplSyntaxOff + \char_set_catcode_letter:n { 64 } + } { \endcsname \csname the } { \expandafter \endcsname \csname the } + { } + { \ctex_patch_failure:N #1 } } \cs_if_exist:NTF \labelformat { \ctex_varioref_hook: } diff --git a/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-report.def b/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-report.def index 071055fae3b..2493c18cf19 100644 --- a/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-report.def +++ b/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-report.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx 76d4e94 2020-06-06 23:22:18 +0800 Qing Lee $ +\GetIdInfo$Id: ctex.dtx e805781 2020-08-23 21:30:35 +0800 Qing Lee $ {Heading modification for report (CTEX)} \ProvidesExplFile{ctex-report.def} - {\ExplFileDate}{2.5.3}{\ExplFileDescription} + {\ExplFileDate}{2.5.4}{\ExplFileDescription} \seq_const_from_clist:Nn \c__ctex_section_headings_seq { section , subsection , subsubsection , paragraph , subparagraph } \seq_new:N \c__ctex_headings_seq @@ -832,12 +832,25 @@ } \cs_new_protected:Npn \ctex_cleveref_hook: { - \ctex_patch_cmd:Nnn \refstepcounter@noarg - { \endcsname \csname the } - { \expandafter \endcsname \csname the } - \ctex_patch_cmd:Nnn \refstepcounter@optarg + \@ifpackageloaded { hyperref } + { \__ctex_cleveref_hook_aux:N \H@refstepcounter } + { + \__ctex_cleveref_hook_aux:N \refstepcounter@noarg + \__ctex_cleveref_hook_aux:N \refstepcounter@optarg + } + \__ctex_cleveref_hook_aux:N \appendix + } +\cs_new_protected:Npn \__ctex_cleveref_hook_aux:N #1 + { + \ctex_patch_cmd_all:NnnnTF #1 + { + \ExplSyntaxOff + \char_set_catcode_letter:n { 64 } + } { \endcsname \csname the } { \expandafter \endcsname \csname the } + { } + { \ctex_patch_failure:N #1 } } \cs_if_exist:NTF \labelformat { \ctex_varioref_hook: } -- cgit v1.2.3