diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-report.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-report.def | 25 |
1 files changed, 19 insertions, 6 deletions
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 <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx e805781 2020-08-23 21:30:35 +0800 Qing Lee <sobenlee@gmail.com> $ {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: } |