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.dtx113
1 files changed, 33 insertions, 80 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 94ee574caf..b5ca727b02 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/11/09}{1.40M}
+\ProvidesExplClass{easybook}{2021/11/10}{1.40N}
{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/11/09}{1.40M}
+\ProvidesExplPackage{easybase}{2021/11/10}{1.40N}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -454,8 +454,7 @@
book .meta:n = { class = book },
article .meta:n = { class = article },
- unknown .code:n =
- { \clist_gput_right:NV \g__eb_ctex_options_clist \CurrentOption }
+ unknown .code:n = \clist_gput_right:NV \g__eb_ctex_options_clist \CurrentOption
}
\eb_clist_map_inline:nn
@@ -688,28 +687,23 @@
\ctex_define:nn { hdrset }
{
chap-mark .cs_set:Np = \eb_fancyhf_chapter_mark:n #1,
- chap-mark .initial:n =
- { \CTEXifname{\eb@mark@chapter@label}{}#1 },
+ chap-mark .initial:n = \CTEXifname{\eb@mark@chapter@label}{}#1,
sec-mark .cs_set:Np = \eb_fancyhf_section_mark:n #1,
- sec-mark .initial:n =
- { \CTEXifname{\eb@mark@section@label}{}#1 },
+ sec-mark .initial:n = \CTEXifname{\eb@mark@section@label}{}#1,
subsec-mark .cs_set:Np = \eb_fancyhf_subsection_mark:n #1,
- subsec-mark .initial:n =
- { \CTEXifname{\eb@mark@subsection@label}{}#1 },
+ subsec-mark .initial:n = \CTEXifname{\eb@mark@subsection@label}{}#1,
chap-label .code:n = \eb_mark_chapter_name_parse:n {#1},
chap-label .initial:n = \hspace{1em},
sec-label .code:n = \eb_mark_section_name_parse:n {#1},
sec-label .initial:n = \hspace{0.5em},
subsec-label .code:n = \eb_mark_subsection_name_parse:n {#1},
subsec-label .initial:n = \hspace{0.5em},
-
headrule .tl_gset:N = \headrule,
headrule .initial:n = \markrule{\l__eb_rule_width_dim},
footrule .tl_gset:N = \footrule,
footrule .initial:n = { },
footnoterule .tl_gset:N = \footnoterule,
- footnoterule .initial:n =
- { \markrule[0.35\textwidth]{\l__eb_rule_width_dim}[|2.6pt] }
+ footnoterule .initial:n = \markrule[0.35\textwidth]{\l__eb_rule_width_dim}[|2.6pt]
}
\cs_set_eq:NN \eb_mark_uppercase:n \text_uppercase:n
@@ -896,8 +890,7 @@
fntext-pos .tl_set:N = \l__eb_fntext_position_tl,
fntext-pos .initial:n = super,
fntext-code .code:n = \eb_assign_fntext_code:n {#1},
- fntext-code .initial:n =
- { ,\tl_if_eq:NnF \l__eb_fntext_position_tl { super } { ~ } },
+ fntext-code .initial:n = { ,\tl_if_eq:NnF \l__eb_fntext_position_tl { super } { ~ } },
fnmate-form .code:n = \eb_fnboth_format_set:nn {#1} { mate },
fncust-form .code:n = \eb_fnboth_format_set:nn {#1} { cust },
fnboth-form .meta:n = { fnmate-form = #1,fncust-form = #1 },
@@ -1229,10 +1222,8 @@
\ctex_define:n
{
#1/tocformat .tl_set:c = l__eb_toc_#1_format_tl,
- #1/tocformat+ .code:n =
- { \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1} },
- #1/tocformat~+ .code:n =
- { \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1} },
+ #1/tocformat+ .code:n = \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1},
+ #1/tocformat~+ .code:n = \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1},
#1/tocindent .dim_set:c = l__eb_toc_#1_indent_dim,
#1/tocrule .tl_set:c = l__eb_toc_#1_rule_tl,
#1/tocafter .tl_set:c = l__eb_toc_#1_after_tl
@@ -1263,10 +1254,9 @@
{
\ctex_define:n
{
- list/#1 .meta:n =
+ list/#1 .meta:n =
{
- figure/#1 = ##1,
- table/#1 = ##1,
+ figure/#1 = ##1,table/#1 = ##1,
lstlisting/#1 = ##1
}
}
@@ -1276,15 +1266,13 @@
{
\ctex_define:nn { tocset }
{
- #1-all .code:n =
+ #1-all .code:n =
{
\ctex_set:n
{
- part/#1 = ##1,
- chapter/#1 = ##1,
- section/#1 = ##1,
- subsection/#1 = ##1,
- list/#1 = ##1
+ part/#1 = ##1,chapter/#1 = ##1,
+ section/#1 = ##1,subsection/#1 = ##1,
+ list/#1 = ##1
}
}
}
@@ -1295,8 +1283,7 @@
lolskip .skip_set:N = \eb@toc@lolskip,
lolskip .initial:n = 10pt,
main-voffset .skip_set:N = \l__eb_toc_main_voffset_skip,
- main-voffset .initial:n =
- { \bool_if:NTF \l__eb_class_book_bool { 1pc } { 0.35pc } },
+ main-voffset .initial:n = \bool_if:NTF \l__eb_class_book_bool { 1pc } { 0.35pc },
line-align .bool_set:N = \l__eb_toc_line_align_bool,
line-align .default:n = true,
line-align .initial:n = true,
@@ -1345,19 +1332,12 @@
part/tocindent = 0em,
part/tocrule = \tocrule{}[\bfseries],
part/tocline = \CTEXnumberline{#1}#2,
-
chapter/tocformat = \addvspace{1pc}\sffamily\large,
chapter/tocindent = 0em,
chapter/tocrule = \tocrule{$\cdot$}[\bfseries],
chapter/tocline = \CTEXnumberline{#1}#2,
-
- section/tocformat =
- {
- \addvspace{0.35pc}
- \bool_if:NF \l__eb_class_book_bool { \sffamily }
- },
- section/tocindent =
- { \bool_if:NTF \l__eb_class_book_bool { 1.5em } { 0em } },
+ section/tocformat = \addvspace{0.35pc}\bool_if:NF \l__eb_class_book_bool { \sffamily },
+ section/tocindent = \bool_if:NTF \l__eb_class_book_bool { 1.5em } { 0em },
section/tocrule =
{
\bool_if:NTF \l__eb_class_book_bool
@@ -1365,18 +1345,14 @@
{ \tocrule{$\cdot$}[\bfseries] }
},
section/tocline = \CTEXnumberline{#1}#2,
-
subsection/tocformat = \addvspace{0.35pc},
- subsection/tocindent =
- { \bool_if:NTF \l__eb_class_book_bool { 3.8em } { 1.4em } },
+ subsection/tocindent = \bool_if:NTF \l__eb_class_book_bool { 3.8em } { 1.4em },
subsection/tocrule = \tocrule{$\cdot$},
subsection/tocline = \CTEXnumberline{#1}#2,
-
list/tocformat = \addvspace{0.2pc},
list/tocindent = 0em,
list/tocrule = \tocrule{$\cdot$},
- list/voffset =
- { 0.2pc\bool_if:NT \l__eb_class_book_bool { + 10pt } },
+ list/voffset = 0.2pc\bool_if:NT \l__eb_class_book_bool { + 10pt },
table/tocline = \listnumberline{table},
figure/tocline = \listnumberline{figure},
lstlisting/tocline = \listnumberline{lstlisting}
@@ -1505,10 +1481,8 @@
equation-connect .tl_set:N = \l__eb_equation_connector_tl,
connect-all .meta:n =
{
- figure-connect = #1,
- table-connect = #1,
- listing-connect = #1,
- equation-connect = #1
+ figure-connect = #1,table-connect = #1,
+ listing-connect = #1,equation-connect = #1
},
connect-all .initial:n = { . },
unknown .code:n = \eb_msg_unknown_option:n { style }
@@ -1674,8 +1648,7 @@
}
\ctex_define:nn { chapter }
{
- biname .code:n =
- { \ctex_assign_heading_name:nn { bichapter } {#1} },
+ biname .code:n = \ctex_assign_heading_name:nn { bichapter } {#1},
biname .initial:n = Chapter\space,
binmuber .tl_set:N = \CTEX@bichapter@number,
binmuber .initial:n = \arabic{chapter}
@@ -1756,14 +1729,7 @@
caption .initial:n = 1.2,
footnote .fp_set:N = \l__eb_spread_footnote_fp,
footnote .initial:n = 1.2,
- spread-all .meta:n =
- {
- line = #1,
- table = #1,
- math = #1,
- caption = #1,
- footnote = #1
- },
+ spread-all .meta:n = { line = #1,table = #1,math = #1,caption = #1,footnote = #1 },
unknown .code:n = \eb_msg_unknown_option:n { spread }
}
@@ -2138,14 +2104,11 @@
backend .choice:,
backend .value_required:n = true,
backend/bibtex .code:n = { },
- backend/biblatex .code:n =
- { \bool_set_false:N \l__eb_backend_bibtex_bool },
- bibstyle .code:n =
- { \tl_set:Nn \l__eb_bib_all_style_tl {#1} },
+ backend/biblatex .code:n = \bool_set_false:N \l__eb_backend_bibtex_bool,
+ bibstyle .code:n = \tl_set:Nn \l__eb_bib_all_style_tl {#1},
bibstyle .value_required:n = true,
bibstyle .initial:n = numerical,
- citestyle .code:n =
- { \tl_set:Nn \l__eb_bib_cite_style_tl {#1} },
+ citestyle .code:n = \tl_set:Nn \l__eb_bib_cite_style_tl {#1},
datafile .clist_set:N = \l__eb_bib_datafile_clist,
bitoc-title .tl_set:N = \l__eb_bib_en_bitoc_title_tl,
bitoc-title .initial:n = Reference,
@@ -2248,16 +2211,8 @@
style = lst-base,
language = [LaTeX]TeX,
texcsstyle = *\color{ctex@verb}\bfseries,
- basicstyle =
- {
- \ttfamily
- \eb@lst@if@display{\small}{\color{ctex@verb}}
- },
- keywordstyle =
- {
- \color{ctex@verb}
- \eb@lst@if@display{\bfseries}{}
- }
+ basicstyle = \ttfamily\eb@lst@if@display{\small}{\color{ctex@verb}},
+ keywordstyle = \color{ctex@verb}\eb@lst@if@display{\bfseries}{}
}
\lstset{style = lst-latex}
\lstloadlanguages{C,C++,Java,Python,Matlab}
@@ -2309,8 +2264,7 @@
\eb_link_color_set:n
linkcolor .default:n = navyblue,
linkcolor .initial:n = navyblue,
- linkcolor-all .code:n =
- { \eb_define_link_color:n { \exp_not:n {#1} } }
+ linkcolor-all .code:n = \eb_define_link_color:n { \exp_not:n {#1} }
}
\ctex_define:nx { style }
{
@@ -2325,8 +2279,7 @@
}
\eb_theme_color_set:n
color .initial:n = none,
- color-all .code:n =
- { \eb_define_theme_color:n { \exp_not:n {#1} } }
+ color-all .code:n = \eb_define_theme_color:n { \exp_not:n {#1} }
}
\bool_set_false:N \l__eb_toc_number_color_bool
@@ -2448,7 +2401,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/11/09}{1.40M}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/11/10}{1.40N}
{Customization of tcolorbox for easybook}
\tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }