diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/heading')
4 files changed, 100 insertions, 8 deletions
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 ea14835dcfa..a9141a12f83 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 320df30 2020-05-02 06:45:05 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 4819efe 2020-05-16 21:20:43 +0800 Qing Lee <sobenlee@gmail.com> $ {Heading modification for article (CTEX)} \ProvidesExplFile{ctex-article.def} - {\ExplFileDate}{2.5.1}{\ExplFileDescription} + {\ExplFileDate}{2.5.2}{\ExplFileDescription} \seq_const_from_clist:Nn \c__ctex_section_headings_seq { section , subsection , subsubsection , paragraph , subparagraph } \seq_new:N \c__ctex_headings_seq @@ -664,6 +664,29 @@ { \ifnum \c@secnumdepth > \@ne \thesubsection \hskip 1em \relax \fi } { \CTEXifname { \CTEXthesubsection \quad } { } } } +\ctex_define:n + { + secnumdepth .code:n = \ctex_heading_depth:ne { secnumdepth } {#1} , + secnumdepth .value_required:n = true , + tocdepth .code:n = \ctex_heading_depth:ne { tocdepth } {#1} , + tocdepth .value_required:n = true + } +\cs_new_protected:Npn \ctex_heading_depth:nn #1#2 + { + \prop_get:NnNTF \c__ctex_heading_level_prop {#2} \l__ctex_tmp_tl + { \setcounter {#1} { \l__ctex_tmp_tl } } + { \setcounter {#1} { \int_eval:n {#2} } } + } +\cs_generate_variant:Nn \ctex_heading_depth:nn { ne } +\prop_const_from_keyval:Nn \c__ctex_heading_level_prop + { + part = 0 , + section = 1 , + subsection = 2 , + subsubsection = 3 , + paragraph = 4 , + subparagraph = 5 + } \cs_new_protected:Npn \CTEX@setcurrentlabel@n #1 { \protected@edef \@currentlabel 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 438a97a00c2..0904906df43 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 320df30 2020-05-02 06:45:05 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 4819efe 2020-05-16 21:20:43 +0800 Qing Lee <sobenlee@gmail.com> $ {Heading modification for beamer (CTEX)} \ProvidesExplFile{ctex-beamer.def} - {\ExplFileDate}{2.5.1}{\ExplFileDescription} + {\ExplFileDate}{2.5.2}{\ExplFileDescription} \seq_const_from_clist:Nn \c__ctex_headings_seq { part , section , subsection } \cs_new_protected:Npn \__ctex_initial_heading:n #1 @@ -178,6 +178,27 @@ \defbeamertemplatealias{section page}{default}{CTEX} \defbeamertemplatealias{subsection page}{default}{CTEX} \ExplSyntaxOn +\ctex_define:n + { + tocdepth .code:n = \ctex_heading_depth:ne { tocdepth } {#1} , + tocdepth .value_required:n = true + } +\cs_new_protected:Npn \ctex_heading_depth:nn #1#2 + { + \prop_get:NnNTF \c__ctex_heading_level_prop {#2} \l__ctex_tmp_tl + { \setcounter {#1} { \l__ctex_tmp_tl } } + { \setcounter {#1} { \int_eval:n {#2} } } + } +\cs_generate_variant:Nn \ctex_heading_depth:nn { ne } +\prop_const_from_keyval:Nn \c__ctex_heading_level_prop + { + part = 0 , + section = 1 , + subsection = 2 , + subsubsection = 3 , + paragraph = 4 , + subparagraph = 5 + } \cs_new_protected:Npn \CTEX@setcurrentlabel@n #1 { \protected@edef \@currentlabel 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 df344f2c679..39c0e6cb695 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 320df30 2020-05-02 06:45:05 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 4819efe 2020-05-16 21:20:43 +0800 Qing Lee <sobenlee@gmail.com> $ {Heading modification for book (CTEX)} \ProvidesExplFile{ctex-book.def} - {\ExplFileDate}{2.5.1}{\ExplFileDescription} + {\ExplFileDate}{2.5.2}{\ExplFileDescription} \seq_const_from_clist:Nn \c__ctex_section_headings_seq { section , subsection , subsubsection , paragraph , subparagraph } \seq_new:N \c__ctex_headings_seq @@ -791,6 +791,30 @@ { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } { \CTEXifname { \CTEXthesection \quad } { } } } +\ctex_define:n + { + secnumdepth .code:n = \ctex_heading_depth:ne { secnumdepth } {#1} , + secnumdepth .value_required:n = true , + tocdepth .code:n = \ctex_heading_depth:ne { tocdepth } {#1} , + tocdepth .value_required:n = true + } +\cs_new_protected:Npn \ctex_heading_depth:nn #1#2 + { + \prop_get:NnNTF \c__ctex_heading_level_prop {#2} \l__ctex_tmp_tl + { \setcounter {#1} { \l__ctex_tmp_tl } } + { \setcounter {#1} { \int_eval:n {#2} } } + } +\cs_generate_variant:Nn \ctex_heading_depth:nn { ne } +\prop_const_from_keyval:Nn \c__ctex_heading_level_prop + { + part = -1 , + chapter = 0 , + section = 1 , + subsection = 2 , + subsubsection = 3 , + paragraph = 4 , + subparagraph = 5 + } \cs_new_protected:Npn \CTEX@setcurrentlabel@n #1 { \protected@edef \@currentlabel 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 751de60273c..2d418a839fe 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 320df30 2020-05-02 06:45:05 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 4819efe 2020-05-16 21:20:43 +0800 Qing Lee <sobenlee@gmail.com> $ {Heading modification for report (CTEX)} \ProvidesExplFile{ctex-report.def} - {\ExplFileDate}{2.5.1}{\ExplFileDescription} + {\ExplFileDate}{2.5.2}{\ExplFileDescription} \seq_const_from_clist:Nn \c__ctex_section_headings_seq { section , subsection , subsubsection , paragraph , subparagraph } \seq_new:N \c__ctex_headings_seq @@ -786,6 +786,30 @@ { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } { \CTEXifname { \CTEXthesection \quad } { } } } +\ctex_define:n + { + secnumdepth .code:n = \ctex_heading_depth:ne { secnumdepth } {#1} , + secnumdepth .value_required:n = true , + tocdepth .code:n = \ctex_heading_depth:ne { tocdepth } {#1} , + tocdepth .value_required:n = true + } +\cs_new_protected:Npn \ctex_heading_depth:nn #1#2 + { + \prop_get:NnNTF \c__ctex_heading_level_prop {#2} \l__ctex_tmp_tl + { \setcounter {#1} { \l__ctex_tmp_tl } } + { \setcounter {#1} { \int_eval:n {#2} } } + } +\cs_generate_variant:Nn \ctex_heading_depth:nn { ne } +\prop_const_from_keyval:Nn \c__ctex_heading_level_prop + { + part = -1 , + chapter = 0 , + section = 1 , + subsection = 2 , + subsubsection = 3 , + paragraph = 4 , + subparagraph = 5 + } \cs_new_protected:Npn \CTEX@setcurrentlabel@n #1 { \protected@edef \@currentlabel |