summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/easybook/easybook.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/easybook/easybook.dtx')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx76
1 files changed, 34 insertions, 42 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 325fce01e5..de8fd66f10 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/10/21}{1.40B}
+\ProvidesExplClass{easybook}{2021/10/25}{1.40C}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -325,7 +325,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/10/21}{1.40B}
+\ProvidesExplPackage{easybase}{2021/10/25}{1.40C}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -619,7 +619,6 @@
marginparsep = 8pt,
marginparwidth = 2.54cm
}
-\clist_new:N \g__eb_geometry_clist
\ctex_define:nn { geoset }
{
headruleskip .tl_set:N = \headruleskip,
@@ -627,7 +626,7 @@
footruleskip .tl_set:N = \footruleskip,
unknown .code:n =
{
- \clist_gput_right:Nx \g__eb_geometry_clist
+ \exp_args:Nx \geometry
{
\l_keys_key_str
\tl_if_empty:NF \l_keys_value_tl { = {#1} }
@@ -688,20 +687,6 @@
}
\ctex_define:nn { hdrset }
{
- headfoot .tl_set:N = \l__eb_fancyhf_content_tl,
- headfoot .initial:n =
- {
- \ifbool{@twoside}
- {
- \easyhead[EC]{\color{ctex@frame}\kaishu\leftmark}
- \easyhead[OC]{\color{ctex@frame}\kaishu\rightmark}
- \easyhead[EL,OR]{\color{ctex@frame}\thepage}
- }{
- \easyhead[L]{\color{ctex@frame}\kaishu\leftmark}
- \easyhead[R]{\color{ctex@frame}\thepage}
- }
- },
-
chap-mark .cs_set:Np = \eb_fancyhf_chapter_mark:n #1,
chap-mark .initial:n =
{ \CTEXifname{\eb@mark@chapter@label}{}#1 },
@@ -744,32 +729,39 @@
}
\cs_new:Npn \eb@level@markright #1#2
{ \markright{\eb_mark_if_uppercase:nn {#1} {#2}} }
-\cs_new:Npn \eb@level@section@mark #1
+\cs_gset:Npn \chaptermark #1 { \eb@level@markdouble{chapter}{#1} }
+\cs_gset:Npn \sectionmark #1
{
\bool_if:NTF \l__eb_class_book_bool
{ \eb@level@markright{section}{#1} }
{ \eb@level@markdouble{section}{#1} }
}
-\cs_new:Npn \eb@level@subsection@mark #1
+\cs_gset:Npn \subsectionmark #1
{
\bool_if:NF \l__eb_class_book_bool
{ \eb@level@markright{subsection}{#1} }
}
+\cs_gset_eq:NN \ps@plain \ps@empty
+\fancyhf{}
+\ifbool{@twoside}
+ {
+ \fancyhead[EC]{\color{ctex@frame}\kaishu\leftmark}
+ \fancyhead[OC]{\color{ctex@frame}\kaishu\rightmark}
+ \fancyhead[EL,OR]{\color{ctex@frame}\thepage}
+ }{
+ \fancyhead[L]{\color{ctex@frame}\kaishu\leftmark}
+ \fancyhead[R]{\color{ctex@frame}\thepage}
+ }
+\bool_if:NT \l__eb_compile_draft_bool
+ {
+ \fancyfoot[C]{\color{SlateGray}\sffamily\today}
+ \geometry{showframe}
+ }
+\bool_new:N \l__eb_ps_used_bool
+\eb_appto_cmd:Nn \pagestyle { \bool_set_true:N \l__eb_ps_used_bool }
\ctex_at_end_preamble:n
{
- \exp_args:NV \geometry \g__eb_geometry_clist
- \fancyhf{}
- \tl_use:N \l__eb_fancyhf_content_tl
- \cs_gset_eq:NN \ps@plain \ps@empty
- \pagestyle{fancy}
- \cs_gset:Npn \chaptermark #1 { \eb@level@markdouble{chapter}{#1} }
- \cs_gset_eq:NN \sectionmark \eb@level@section@mark
- \cs_gset_eq:NN \subsectionmark \eb@level@subsection@mark
- \bool_if:NT \l__eb_compile_draft_bool
- {
- \easyfoot[C]{\color{SlateGray}\sffamily\today}
- \geometry{showframe}
- }
+ \bool_if:NF \l__eb_ps_used_bool { \pagestyle{fancy} }
\tl_if_empty:NF \l_eb_graphics_path_tl
{ \exp_args:NV \graphicspath \l_eb_graphics_path_tl }
\cs_if_exist:NF \kaishu { \cs_gset_eq:NN \kaishu \itshape }
@@ -1490,9 +1482,9 @@
\tl_set:Nn \l__eb__bitoc_mark_title_level_tl {#1}
\str_case:nn {#1}
{
- { chapter } { \eb@level@markdouble{chapter}{##2} }
- { section } { \eb@level@section@mark{##2} }
- { subsection } { \eb@level@subsection@mark{##2} }
+ { chapter } { \chaptermark{##2} }
+ { section } { \sectionmark{##2} }
+ { subsection } { \subsectionmark{##2} }
}
}{
\stepcounter{bi#1}
@@ -1578,11 +1570,11 @@
\tl_if_eq:NnTF \l__eb_toc_type_tl { chapter }
{
\bichapter*{#1}{\eb@bitoc@title}
- \eb@level@markdouble{chapter}{#1}
+ \chaptermark{#1}
}
{
\bisection*{#1}{\eb@bitoc@title}
- \eb@level@section@mark{#1}
+ \sectionmark{#1}
}
}
\cs_new_protected:Npn \eb_title_mark_notoc:n #1
@@ -1590,11 +1582,11 @@
\tl_if_eq:NnTF \l__eb_toc_type_tl { chapter }
{
\chapter*{\phantomsection #1}
- \eb@level@markdouble{chapter}{#1}
+ \chaptermark{#1}
}
{
\section*{\phantomsection #1}
- \eb@level@section@mark{#1}
+ \sectionmark{#1}
}
}
\cs_new_protected:Npn \eb_title_number_intoc_spec:nn #1#2
@@ -1615,7 +1607,7 @@
\bool_if:NTF \l__eb_class_book_bool
{ \bichapter*{#1}{\l__eb_bib_en_bitoc_title_tl} }
{ \bisection*{#1}{\l__eb_bib_en_bitoc_title_tl} }
- \eb@level@section@mark{#1}
+ \sectionmark{#1}
}
\cs_new_protected:Npn \eb_toc_start_multi_column_ext:n #1
{
@@ -2465,7 +2457,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/21}{1.40B}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/25}{1.40C}
{Customization of tcolorbox for easybook}
\tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }