summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctex/ctex-beamer.def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-25 21:49:35 +0000
committerKarl Berry <karl@freefriends.org>2016-04-25 21:49:35 +0000
commitbcd63dd9814f27dfadde30f6a94c2c376ea0a9fd (patch)
tree8e1b1812c87e4f08ff660b789f1207e2c8ffd147 /Master/texmf-dist/tex/latex/ctex/ctex-beamer.def
parent55fdf85117f36a34e5b38690a5be5d16902644d0 (diff)
ctex (25apr16)
git-svn-id: svn://tug.org/texlive/trunk@40745 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/ctex-beamer.def')
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctex-beamer.def202
1 files changed, 202 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-beamer.def b/Master/texmf-dist/tex/latex/ctex/ctex-beamer.def
new file mode 100644
index 00000000000..c672d635ad3
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/ctex-beamer.def
@@ -0,0 +1,202 @@
+%%
+%% This is file `ctex-beamer.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ctex.dtx (with options: `heading,beamer')
+%%
+%% Copyright (C) 2003--2016
+%% CTEX.ORG and any individual authors listed in the documentation.
+%% ------------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. This version of this license is in
+%% http://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainers of this work are Leo Liu, Qing Lee and Liam Huang.
+%%
+%% ------------------------------------------------------------------------------
+%%
+\GetIdInfo$Id: ctex.dtx 1fcc459 2016-04-25 13:35:13 +0800 Liu Haiyang <leoliu.pku@gmail.com> $
+ {Heading modification for beamer (CTEX)}
+\ProvidesExplFile{ctex-beamer.def}
+ {\ExplFileDate}{2.4}{\ExplFileDescription}
+\seq_new:N \c__ctex_headings_seq
+\seq_gset_from_clist:Nn \c__ctex_headings_seq
+ { part , section , subsection }
+\cs_new_protected_nopar:Npn \__ctex_initial_heading:n #1
+ {
+ \tl_new:c { CTEX@pre#1 }
+ \tl_new:c { CTEX@post#1 }
+ \tl_const:cx { CTEXthe#1 }
+ {
+ \exp_not:c { CTEX@pre#1 }
+ \exp_not:c { CTEX@the#1 }
+ \exp_not:c { CTEX@post#1 }
+ }
+ \tl_const:cx { CTEX@#1name }
+ {
+ \group_begin:
+ \exp_not:c { CTEX@#1@nameformat }
+ {
+ \exp_not:c { CTEX@pre#1 }
+ \exp_not:N \tl_if_empty:NTF
+ \exp_not:c { CTEX@#1@numberformat }
+ { \exp_not:c { CTEX@the#1 } }
+ {
+ \group_begin:
+ \exp_not:c { CTEX@#1@numberformat }
+ \exp_not:c { CTEX@the#1 }
+ \group_end:
+ }
+ \exp_not:c { CTEX@post#1 }
+ }
+ \group_end:
+ }
+ }
+\cs_new_protected_nopar:Npn \__ctex_def_heading_keys:n #1
+ {
+ \tl_put_right:Nx \l__ctex_tmp_tl
+ {
+ #1 .meta:nn = { ctex / #1 } { ####1 } ,
+ #1 / name .code:n =
+ { \ctex_assign_heading_name:nn {#1} { ####1 } } ,
+ #1 / number .tl_set:N = \exp_not:c { CTEX@the#1 } ,
+ #1 / format .tl_set:N = \exp_not:c { CTEX@#1@format } ,
+ #1 / nameformat .tl_set:N = \exp_not:c { CTEX@#1@nameformat } ,
+ #1 / numberformat .tl_set:N = \exp_not:c { CTEX@#1@numberformat } ,
+ #1 / aftername .tl_set:N = \exp_not:c { CTEX@#1@aftername } ,
+ #1 / titleformat .tl_set:N = \exp_not:c { CTEX@#1@titleformat } ,
+ #1 / aftertitle .tl_set:N = \exp_not:c { CTEX@#1@aftertitle } ,
+ #1 / beforeskip .tl_set:N = \exp_not:c { CTEX@#1@beforeskip } ,
+ #1 / afterskip .tl_set:N = \exp_not:c { CTEX@#1@afterskip} ,
+ #1 / indent .tl_set:N = \exp_not:c { CTEX@#1@indent } ,
+ #1 / numbering .bool_set:N = \exp_not:c { CTEX@#1@numbering } ,
+ #1 / format+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
+ #1 / nameformat+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@nameformat } { ####1 } } ,
+ #1 / numberformat+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@numberformat } { ####1 } } ,
+ #1 / aftername+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftername } { ####1 } } ,
+ #1 / titleformat+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@titleformat } { ####1 } } ,
+ #1 / aftertitle+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftertitle } { ####1 } } ,
+ #1 / numbering .initial:n = true ,
+ #1 / beforeskip .initial:n = \c_zero_skip ,
+ #1 / afterskip .initial:n = \c_zero_skip ,
+ #1 / indent .initial:n = \c_zero_dim ,
+ #1 / beforeskip .value_required:n = true ,
+ #1 / afterskip .value_required:n = true ,
+ #1 / indent .value_required:n = true ,
+ }
+ }
+\NewDocumentCommand \ctex_assign_heading_name:nn
+ { m > { \SplitArgument { \c_one } { , } } +m }
+ { \__ctex_assign_heading_name:nnn {#1} #2 }
+\cs_new_protected:Npn \__ctex_assign_heading_name:nnn #1#2#3
+ {
+ \tl_set:cn { CTEX@pre#1 } {#2}
+ \IfNoValueTF {#3}
+ { \tl_clear:c { CTEX@post#1 } }
+ { \tl_set:cn { CTEX@post#1 } {#3} }
+ }
+\seq_map_inline:Nn \c__ctex_headings_seq
+ {
+ \__ctex_initial_heading:n {#1}
+ \__ctex_def_heading_keys:n {#1}
+ }
+\use:x { \keys_define:nn { ctex } { \exp_not:o { \l__ctex_tmp_tl } } }
+\tl_clear:N \l__ctex_tmp_tl
+\ExplSyntaxOff
+\defbeamertemplate*{part page}{CTEX}[1][]{
+ \begingroup
+ \par \addvspace{\glueexpr\CTEX@part@beforeskip\relax}%
+ \parindent \dimexpr \CTEX@part@indent \relax
+ \CTEX@part@format
+ \ifodd \CTEX@part@numbering
+ \CTEX@partname \CTEX@part@aftername
+ \fi
+ \begin{beamercolorbox}[sep=16pt,center,#1]{part title}
+ \CTEX@part@titleformat \insertpart \CTEX@part@aftertitle
+ \end{beamercolorbox}
+ \par \addvspace{\glueexpr\CTEX@part@afterskip\relax}%
+ \endgroup
+}
+\defbeamertemplate*{section page}{CTEX}[1][]{
+ \begingroup
+ \par \addvspace{\glueexpr\CTEX@section@beforeskip\relax}%
+ \parindent \dimexpr \CTEX@section@indent \relax
+ \CTEX@section@format
+ \ifodd \CTEX@section@numbering
+ \CTEX@sectionname \CTEX@section@aftername
+ \fi
+ \begin{beamercolorbox}[sep=12pt,center,#1]{part title}
+ \CTEX@section@titleformat \insertsection \CTEX@section@aftertitle
+ \end{beamercolorbox}
+ \par \addvspace{\glueexpr\CTEX@section@afterskip\relax}%
+ \endgroup
+}
+\defbeamertemplate*{subsection page}{CTEX}[1][]{
+ \begingroup
+ \par \addvspace{\glueexpr\CTEX@subsection@beforeskip\relax}%
+ \parindent \dimexpr \CTEX@subsection@indent \relax
+ \CTEX@subsection@format
+ \ifodd \CTEX@subsection@numbering
+ \CTEX@subsectionname \CTEX@subsection@aftername
+ \fi
+ \begin{beamercolorbox}[sep=8pt,center,#1]{part title}
+ \CTEX@subsection@titleformat \insertsubsection \CTEX@subsection@aftertitle
+ \end{beamercolorbox}
+ \par \addvspace{\glueexpr\CTEX@subsection@afterskip\relax}%
+ \endgroup
+}
+\defbeamertemplatealias{part page}{default}{CTEX}
+\defbeamertemplatealias{section page}{default}{CTEX}
+\defbeamertemplatealias{subsection page}{default}{CTEX}
+\ExplSyntaxOn
+\cs_new_protected_nopar:Npn \CTEX@setcurrentlabel@n #1
+ {
+ \protected@edef \@currentlabel
+ {
+ \cs_if_exist:cTF { CTEX@the#1 }
+ { \exp_args:cc { p@#1 } { CTEX@the#1 } }
+ { \exp_not:o { \@currentlabel } }
+ }
+ }
+\cs_new_protected_nopar:Npn \ctex_varioref_hook:
+ {
+ \seq_map_inline:Nn \c__ctex_headings_seq
+ { \ctex_fix_varioref_label:n { ##1 } }
+ }
+\cs_new_protected_nopar:Npn \ctex_fix_varioref_label:n #1
+ {
+ \tl_if_empty:cT { p@#1 }
+ { \exp_args:Nno \labelformat {#1} { \cs:w CTEX@the#1 \cs_end: } }
+ }
+\@ifpackageloaded { varioref }
+ { \ctex_varioref_hook: }
+ {
+ \cs_new_eq:NN \CTEX@save@refstepcounter \refstepcounter
+ \RenewDocumentCommand \refstepcounter { m }
+ {
+ \CTEX@save@refstepcounter {#1}
+ \CTEX@setcurrentlabel@n {#1}
+ }
+ \ctex_at_end_package:nn { varioref } { \ctex_varioref_hook: }
+ }
+\ctex_scheme_input:o { \l__ctex_scheme_tl }
+%%
+%%
+%% End of file `ctex-beamer.def'.