summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctex/ctexbook.cls
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-06-20 19:56:11 +0000
committerKarl Berry <karl@freefriends.org>2021-06-20 19:56:11 +0000
commit0e008fd431955e2802ab0abb5220e3bfb78256e6 (patch)
tree00a71b8590fe7dadb12de99f13729cb46a223dd2 /Master/texmf-dist/tex/latex/ctex/ctexbook.cls
parent0dfccc591702a7d52fd4739ddb2622d1769cf422 (diff)
ctex (20jun21)
git-svn-id: svn://tug.org/texlive/trunk@59654 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/ctexbook.cls')
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexbook.cls69
1 files changed, 19 insertions, 50 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexbook.cls b/Master/texmf-dist/tex/latex/ctex/ctexbook.cls
index d5d0cf01b0a..8a18c62b58c 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctexbook.cls
+++ b/Master/texmf-dist/tex/latex/ctex/ctexbook.cls
@@ -27,16 +27,10 @@
\NeedsTeXFormat{LaTeX2e}
\input{ctexbackend.cfg}
\RequirePackage{expl3}
-\GetIdInfo$Id: ctex.dtx 07425fe 2021-03-14 16:43:36 +0800 Xiangdong Zeng <xdzeng96@gmail.com> $
+\GetIdInfo$Id: ctex.dtx 6604451 2021-06-20 17:08:49 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese adapter for class book (CTEX)}
\ProvidesExplClass{ctexbook}
- {\ExplFileDate}{2.5.6}{\ExplFileDescription}
-\tl_const:Nx \c__ctex_version_tl
- { \cs_if_exist_use:cF { ver@ \@currname . \@currext } { 9999/99/99 } }
-\cs_new_eq:cN { ver@ctex. \@pkgextension } \c__ctex_version_tl
-\cs_new_eq:cN { ver@ctexcap. \@pkgextension } \c__ctex_version_tl
-\cs_new_eq:cN { ver@ctexsize. \@pkgextension } \c__ctex_version_tl
-\cs_new_eq:cN { ver@ctexheading. \@pkgextension } \c__ctex_version_tl
+ {\ExplFileDate}{2.5.7}{\ExplFileDescription}
\RequirePackage { xparse , l3keys2e }
\msg_new:nnnn { ctex } { l3-too-old }
{ Support~package~`#1'~too~old. }
@@ -62,7 +56,16 @@
{ \msg_critical:nnx { ctex } { engine-not-supported } { \c__ctex_engine_str } }
\RequirePackage { ctexhook , ctexpatch }
\RequirePackage { fix-cm }
-\RequirePackage { everysel }
+\ctex_disable_package:n { ctex }
+\ctex_disable_package:n { ctexcap }
+\ctex_disable_package:n { ctexsize }
+\ctex_disable_package:n { ctexheading }
+\ctex_if_format_at_least:nTF { 2021/06/01 }
+ { \bool_const:Nn \c__ctex_everysel_loaded_bool { \c_false_bool } }
+ {
+ \RequirePackage { everysel }
+ \bool_const:Nn \c__ctex_everysel_loaded_bool { \c_true_bool }
+ }
\tl_clear_new:N \l__ctex_tmp_tl
\int_new:N \l__ctex_tmp_int
\box_new:N \l__ctex_tmp_box
@@ -75,44 +78,6 @@
{ \keys_set:nn { ctex } }
\cs_new_protected:Npn \ctex_set:nn #1
{ \keys_set:nn { ctex / #1 } }
-\cs_new_protected:Npn \ctex_file_input:n #1
- {
- \ctex_push_file:
- \file_input:n {#1}
- \ctex_pop_file:
- }
-\cs_new_protected:Npn \ctex_push_file:
- {
- \seq_gpush:Nx \g__ctex_file_status_seq
- {
- {
- \bool_if:NTF \l__kernel_expl_bool
- { \ExplSyntaxOn }
- { \ExplSyntaxOff }
- }
- { \char_value_catcode:n { 64 } }
- { \char_value_catcode:n { 94 } }
- { \int_use:N \tex_endlinechar:D }
- }
- \ExplSyntaxOff
- \char_set_catcode_letter:n { 64 }
- \char_set_catcode_math_superscript:n { 94 }
- \int_set:Nn \tex_endlinechar:D { 13 }
- }
-\cs_new_protected:Npn \ctex_pop_file:
- {
- \seq_gpop:NN \g__ctex_file_status_seq \l__ctex_file_status_tl
- \exp_after:wN \__ctex_pop_file_aux:nnnn \l__ctex_file_status_tl
- }
-\cs_new_protected:Npn \__ctex_pop_file_aux:nnnn #1#2#3#4
- {
- #1
- \char_set_catcode:nn { 64 } {#2}
- \char_set_catcode:nn { 94 } {#3}
- \int_set:Nn \tex_endlinechar:D {#4}
- }
-\tl_new:N \l__ctex_file_status_tl
-\seq_new:N \g__ctex_file_status_seq
\cs_new_protected:Npn \ctex_scheme_input:n #1
{
\ctex_push_file:
@@ -1436,7 +1401,11 @@
\cs_new_protected:Npn \ctex_cleveref_hook:
{
\@ifpackageloaded { hyperref }
- { \__ctex_cleveref_hook_aux:N \H@refstepcounter }
+ {
+ \@ifpackagewith { hyperref } { implicit = false }
+ { }
+ { \__ctex_cleveref_hook_aux:N \H@refstepcounter }
+ }
{
\__ctex_cleveref_hook_aux:N \refstepcounter@noarg
\__ctex_cleveref_hook_aux:N \refstepcounter@optarg
@@ -1561,8 +1530,8 @@
{ \cs_set_protected:Npn #3 { \@setfontsize #3 {#1} {#2} #4 } }
\int_case:nn { \g__ctex_font_size_int }
{
- { 0 } { \ctex_file_input:n { ctex-c5size.clo } }
- { 1 } { \ctex_file_input:n { ctex-cs4size.clo } }
+ { 0 } { \file_input:n { ctex-c5size.clo } }
+ { 1 } { \file_input:n { ctex-cs4size.clo } }
}
\fp_if_nan:nF { \l__ctex_line_spread_fp }
{