1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
|
%%
%% This is file `ctexheading.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% ctex.dtx (with options: `style,ctexheading')
%%
%% Copyright (C) 2003--2022
%% 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".
%%
%% ---------------------------------------------------------------------
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $
{Heading style modification (CTEX)}
\ProvidesExplPackage{ctexheading}
{\ExplFileDate}{2.5.10}{\ExplFileDescription}
\cs_if_exist:NF \NewDocumentCommand
{ \RequirePackage { xparse } }
\prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexheading }
\RequirePackage { ctexhook , ctexpatch }
\tl_clear_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_define_option:n
{ \keys_define:nn { ctex / option } }
\cs_new_protected:Npn \ctex_define:n
{ \keys_define:nn { ctex } }
\cs_new_protected:Npn \ctex_set:n
{ \keys_set:nn { ctex } }
\cs_new_protected:Npn \ctex_set:nn #1
{ \keys_set:nn { ctex / #1 } }
\cs_new_protected:Npn \ctex_scheme_input:n #1
{
\ctex_push_file:
\tl_if_exist:NTF \c__ctex_class_tl
{
\file_if_exist_input:nF { ctex-scheme- #1 - \c__ctex_class_tl .def }
{ \file_input:n { ctex-scheme- #1 .def } }
}
{ \file_input:n { ctex-scheme- #1 .def } }
\ctex_pop_file:
}
\cs_generate_variant:Nn \ctex_scheme_input:n { o }
\int_new:N \g__ctex_section_depth_int
\int_gset:Nn \g__ctex_section_depth_int { 2 }
\ctex_define_option:n
{
sub3section .code:n =
{ \int_gset:Nn \g__ctex_section_depth_int { 3 } } ,
sub4section .code:n =
{ \int_gset:Nn \g__ctex_section_depth_int { 4 } } ,
sub3section .value_forbidden:n = true ,
sub4section .value_forbidden:n = true ,
scheme .tl_set:N = \l__ctex_scheme_tl ,
scheme .default:n = { plain } ,
scheme .initial:n = { plain }
}
\cs_if_exist:NTF \ProcessKeyOptions
{ \ProcessKeyOptions [ ctex / option ] }
{
\RequirePackage { l3keys2e }
\ProcessKeysOptions { ctex / option }
}
\NewDocumentCommand \ctexset { } { \ctex_set:n }
\clist_map_inline:nn { article , book , report , beamer }
{
\@ifclassloaded {#1}
{ \clist_map_break:n { \tl_const:Nn \c__ctex_std_class_tl {#1} } }
{ }
}
\msg_new:nnn { ctex } { not-standard-class }
{
None~of~the~standard~document~classes~was~loaded.\\
Heading~`#1'~is~selected.\\
ctex~may~not~work~as~expected.
}
\use:n
{
\tl_if_exist:NTF \c__ctex_std_class_tl
{ \cs_new_eq:NN \c__ctex_class_tl \c__ctex_std_class_tl }
{
\cs_if_exist:NTF \chapter
{
\cs_if_exist:NF \if@mainmatter
{ \cs_new_eq:NN \if@mainmatter \tex_iftrue:D }
\tl_const:Nn \c__ctex_class_tl { book }
}
{ \tl_const:Nn \c__ctex_class_tl { article } }
\msg_warning:nnx { ctex } { not-standard-class } { \c__ctex_class_tl }
}
\ctex_file_input:n { ctex-heading- \c__ctex_class_tl .def }
}
%%
%% This package consists of the files ctex.dtx,
%% ctxdoc.cls,
%% ctxdocstrip.tex,
%% ctex-zhconv.lua,
%% ctex-zhconv-make.lua,
%% and the derived files ctex.pdf,
%% ctex.ins,
%% ctex.sty,
%% ctexsize.sty,
%% ctexheading.sty,
%% ctexart.cls,
%% ctexbook.cls,
%% ctexrep.cls,
%% ctexbeamer.cls,
%% ctexcap.sty,
%% ctexhook.sty,
%% ctexpatch.sty,
%% ctex-c5size.clo,
%% ctex-cs4size.clo,
%% ctex-heading-article.def,
%% ctex-heading-book.def,
%% ctex-heading-report.def,
%% ctex-heading-beamer.def,
%% ctex-scheme-plain.def,
%% ctex-scheme-plain-article.def,
%% ctex-scheme-plain-book.def,
%% ctex-scheme-plain-report.def,
%% ctex-scheme-plain-beamer.def,
%% ctex-scheme-chinese.def,
%% ctex-scheme-chinese-article.def,
%% ctex-scheme-chinese-book.def,
%% ctex-scheme-chinese-report.def,
%% ctex-scheme-chinese-beamer.def,
%% ctex-name-gbk.cfg,
%% ctex-name-utf8.cfg,
%% ctex.cfg,
%% ctexopts.cfg,
%% ctexbackend.cfg,
%% ctex-engine-pdftex.def,
%% ctex-engine-xetex.def,
%% ctex-engine-luatex.def,
%% ctex-engine-aptex.def,
%% ctex-engine-uptex.def,
%% c19rm.fd,
%% c19sf.fd,
%% c19tt.fd,
%% c70rm.fd,
%% c70sf.fd,
%% c70tt.fd,
%% jy2zhrm.fd,
%% jy2zhsf.fd,
%% jy2zhtt.fd,
%% jt2zhrm.fd,
%% jt2zhsf.fd,
%% jt2zhtt.fd,
%% ctex-fontset-adobe.def,
%% ctex-fontset-fandol.def,
%% ctex-fontset-founder.def,
%% ctex-fontset-mac.def,
%% ctex-fontset-macnew.def,
%% ctex-fontset-macold.def,
%% ctex-fontset-ubuntu.def,
%% ctex-fontset-windows.def,
%% ctexspa.def,
%% ctexpunct.spa,
%% ctex-spa-make.tex,
%% ctex-spa-macro.tex,
%% ctex-zhmap-adobe.tex,
%% ctex-zhmap-fandol.tex,
%% ctex-zhmap-founder.tex,
%% ctex-zhmap-mac.tex,
%% ctex-zhmap-ubuntu.tex,
%% ctex-zhmap-windows.tex,
%% ctex-zhconv-index.lua,
%% translator-theorem-dictionary-ChineseGBK.dict,
%% translator-theorem-dictionary-ChineseUTF8.dict, and
%% README.md.
%%
%% End of file `ctexheading.sty'.
|