diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-beamer.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-beamer.def | 25 |
1 files changed, 23 insertions, 2 deletions
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 |