diff options
author | Karl Berry <karl@freefriends.org> | 2015-06-30 21:26:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-06-30 21:26:14 +0000 |
commit | aaec8ff3cf7236ae9429a6d9238b1838af2441d6 (patch) | |
tree | 7d00cf0ec8459200ac8e721eed28d09e155012c9 /Master/texmf-dist/tex/latex/ctex/ctexheading.sty | |
parent | 56e4ae7a5ecbbf9bf7b858d20cb0c3e0d21edc8a (diff) |
ctex (30jun15)
git-svn-id: svn://tug.org/texlive/trunk@37720 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/ctexheading.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/ctex/ctexheading.sty | 117 |
1 files changed, 6 insertions, 111 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexheading.sty b/Master/texmf-dist/tex/latex/ctex/ctexheading.sty index efff90fbbdd..92d61d817d6 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexheading.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctexheading.sty @@ -28,38 +28,15 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 6255367 2015-07-01 01:15:24 +0800 Qing Lee <sobenlee@gmail.com> $ {Heading style modification (CTEX)} \ProvidesExplPackage{ctexheading} - {\ExplFileDate}{2.1}{\ExplFileDescription} + {\ExplFileDate}{2.2}{\ExplFileDescription} \RequirePackage { xparse , l3keys2e } -\RequirePackage { etoolbox } +\RequirePackage { ctexhook , ctexpatch } \tl_new:N \l__ctex_tmp_tl \int_new:N \l__ctex_tmp_int \box_new:N \l__ctex_tmp_box -\cs_new_protected:Npn \ctex_at_end_package:nn #1#2 - { - \@ifpackageloaded {#1} - {#2} - { \ctex_gadd_hook:cn { g__ctex_at_end_ #1 _hook_tl } {#2} } - } -\cs_new_protected:Npn \ctex_gadd_hook:Nn #1#2 - { - \tl_if_exist:NF #1 { \tl_new:N #1 } - \tl_gput_right:Nn #1 {#2} - } -\cs_generate_variant:Nn \ctex_gadd_hook:Nn { c } -\cs_new_protected_nopar:Npn \ctex_package_end_hook:n #1 - { - \cs_if_exist_use:cT { g__ctex_at_end_ #1 _hook_tl } - { \cs_undefine:c { g__ctex_at_end_ #1 _hook_tl } } - } -\cs_generate_variant:Nn \ctex_package_end_hook:n { o } -\tl_put_left:Nn \@popfilename - { - \cs_if_eq:NNT \@currext \@pkgextension - { \ctex_package_end_hook:o { \@currname } } - } \cs_new_protected:Npn \ctex_file_wrapper:nnn #1#2#3 { \use:x @@ -92,90 +69,6 @@ { } } \cs_generate_variant:Nn \ctex_scheme_input:n { o } -\cs_new_protected:Npn \ctex_parse_name:NN #1#2 - { \ctex_parse_name:NNx #1#2 { \cs_to_str:N #2 } } -\group_begin: -\char_set_lccode:nn { `\< } { `\{ } -\char_set_lccode:nn { `\/ } { `\\ } -\char_set_lccode:nn { `\A } { `\t } -\tl_map_function:nN { \A \E \S \O \P } \char_set_catcode_other:N -\tex_lowercase:D - { - \group_end: - \cs_new_protected:Npn \ctex_parse_name:NNn #1#2#3 - { - \bool_if:nTF { \cs_if_exist_p:c { #3 ~ } || \cs_if_exist_p:c { /#3 } } - { - \group_begin: - \use:x - { - \group_end: - \__ctex_parse_name:nNNNnN { \token_get_replacement_spec:N #2 } - \exp_not:N #2 \exp_not:c { #3 ~ } \exp_not:c { /#3 } - } {#3} #1 - } - { #1#2 } - } - \cs_new_protected:Npn \__ctex_parse_name:nNNNnN #1#2#3#4#5#6 - { - \exp_args:Nc #6 - { - \str_case:nnTF {#1} - { - { \protect #3 } { } - { \x@protect #2 \protect #3 } { } - } - { - \str_if_eq_x:nnTF { \exp_not:n { /@protected@ #3 /#3 } } - { - \exp_last_unbraced:Nf \__ctex_parse_name:w - \token_get_replacement_spec:N #3 AESAOPA ~ < \q_stop - } - { /#5 ~ } { #5 ~ } - } - { - \str_case:onTF { \__ctex_parse_name:w #1 AESAOPA ~ < \q_stop } - { - { /@protected@ #2 #4 } { } - { /@ #4 } { } - } - { /#5 } {#5} - } - } - } - \cs_new:Npn \__ctex_parse_name:w #1 AESAOPA ~ #2 < #3 \q_stop { #1#2 } - } -\cs_generate_variant:Nn \ctex_parse_name:NNn { NNx } -\cs_new_protected_nopar:Npn \ctex_patch_cmd:NnnTF { \ctex_parse_name:NN \patchcmd } -\cs_new_protected_nopar:Npn \ctex_preto_cmd:NnTF { \ctex_parse_name:NN \pretocmd } -\cs_new_protected_nopar:Npn \ctex_appto_cmd:NnTF { \ctex_parse_name:NN \apptocmd } -\cs_new_protected:Npn \ctex_patch_cmd:Nnn - { - \group_begin: - \char_set_catcode_other:N \# - \__ctex_patch_cmd:Nnn - } -\cs_new_protected:Npn \__ctex_patch_cmd:Nnn #1#2#3 - { - \group_end: - \group_begin: - \ExplSyntaxOff - \ctex_patch_cmd:NnnTF #1 {#2} {#3} - { - \cs_gset_eq:NN \__ctex_tmp:w #1 - \group_end: - \cs_set_eq:NN #1 \__ctex_tmp:w - \cs_undefine:N \__ctex_tmp:w - } - { \group_end: \ctex_patch_failure:N #1 } - } -\cs_new_protected:Npn \ctex_patch_failure:N #1 - { \msg_warning:nnx { ctex } { patch-failure } { \token_to_str:N #1 } } -\msg_new:nnn { ctex } { patch-failure } - { - Patching~command~`#1'~failed.\\ - ctex~may~not~work~as~expected. - } \cs_new_eq:NN \g__ctex_section_depth_flag \c_two \keys_define:nn { ctex / option } { @@ -224,12 +117,14 @@ %% and the derived files ctex.pdf, %% ctex.ins, %% ctex.sty, -%% ctexcap.sty, %% ctexsize.sty, %% ctexheading.sty, %% ctexart.cls, %% ctexbook.cls, %% ctexrep.cls, +%% ctexcap.sty, +%% ctexhook.sty, +%% ctexpatch.sty, %% ctex-c5size.clo, %% ctex-cs4size.clo, %% ctex-article.def, |