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.dtx97
1 files changed, 46 insertions, 51 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 7a2475dd58..87098257ca 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/09/28}{1.3F}
+\ProvidesExplClass{easybook}{2021/10/06}{1.3G}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -33,32 +33,40 @@
scheme .code:n = \eb_put_ctexbook:n { scheme = #1 },
enmode .meta:n = { newline,scheme = plain },
- font .choices:nn =
+ font .choices:nn =
{ noto,garamond,times,libertine,palatino,auto }
{ \tl_set:Nn \l__eb_font_choice_tl {#1} },
- font .value_required:n = true,
- font .initial:n = auto,
- cjkfont .code:n = \eb_put_ctexbook:n { fontset = #1 },
+ font .value_required:n = true,
+ font .initial:n = auto,
+ cjkfont .code:n = \eb_put_ctexbook:n { fontset = #1 },
+ mathfont .choices:nn =
+ {
+ noto,notosans,times,libertine,
+ charter,garamond,none,nc,stix
+ }
+ { \tl_set:Nn \l__eb_mathfont_choice_tl {#1} },
+ mathfont .value_required:n = true,
+ mathfont .initial:n = times,
paper .choice:,
- paper .value_required:n = true,
- paper/unknown .code:n = \PassOptionsToPackage{#1}{geometry},
+ paper .value_required:n = true,
+ paper/unknown .code:n = \PassOptionsToPackage{#1}{geometry},
class .choice:,
- class .value_required:n = true,
- class/book .code:n = { },
- class/article .code:n =
+ class .value_required:n = true,
+ class/book .code:n = { },
+ class/article .code:n =
{
\bool_set_false:N \l__eb_class_book_bool
\eb_put_ctexbook:n { oneside }
},
- book .meta:n = { class = book },
- article .meta:n = { class = article },
+ book .meta:n = { class = book },
+ article .meta:n = { class = article },
- config .tl_set:N = \g__eb_config_tl,
- floatpage .bool_set:N = \l__eb_float_page_bool,
- floatpage .default:n = true,
- unknown .code:n =
+ config .tl_set:N = \g__eb_config_tl,
+ floatpage .bool_set:N = \l__eb_float_page_bool,
+ floatpage .default:n = true,
+ unknown .code:n =
{ \clist_gput_right:NV \g__eb_options_clist \CurrentOption }
}
@@ -221,6 +229,20 @@
\eb_font_load_libertinus_sans:
\eb_font_load_lmmonolt_mono:
}
+\cs_new_protected:Npn \eb_put_newtxmath:n #1
+ { \PassOptionsToPackage{#1}{newtxmath} }
+\str_case:VnT \l__eb_mathfont_choice_tl
+ {
+ { times } { }
+ { nc } { \eb_put_newtxmath:n { nc } }
+ { noto } { \eb_put_newtxmath:n { noto } }
+ { stix } { \eb_put_newtxmath:n { stix2 } }
+ { charter } { \eb_put_newtxmath:n { charter } }
+ { notosans } { \eb_put_newtxmath:n { notosans } }
+ { garamond } { \eb_put_newtxmath:n { ebgaramond } }
+ { libertine } { \eb_put_newtxmath:n { libertine } }
+ }
+ { \LoadPackage{newtxmath+bm} }
\ctex_set:n
{
@@ -297,7 +319,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/09/28}{1.3F}
+\ProvidesExplPackage{easybase}{2021/10/06}{1.3G}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1153,7 +1175,7 @@
\ctex_define:nn { tocset }
{
#1/voffset .skip_set:c = l__eb_toc_#1_voffset_skip,
- #1/tocline .cs_set:cp = { eb@labelname@#1 } ##1,
+ #1/tocline .cs_set:cp = { eb@toc@label@#1 } ##1,
}
}
\eb_clist_map_inline:nn
@@ -1301,8 +1323,8 @@
\prop_new:N \l__eb_list_label_name_prop
\prop_set_from_keyval:Nn \l__eb_list_label_name_prop
{
- figure = \eb@labelname@figure,
- table = \eb@labelname@table
+ figure = \eb@toc@label@figure,
+ table = \eb@toc@label@table
}
\cs_gset:Npn \caption@@@addcontentsline #1#2#3#4
{
@@ -1321,7 +1343,7 @@
\addcontentsline{lol}{lstlisting}
{
\ifbool{eb@titletoc@hang@fix}{\eb@numberline}{}
- {\eb@labelname@lstlisting}\lst@@caption
+ {\eb@toc@label@lstlisting{}}\lst@@caption
}
}
@@ -1652,36 +1674,9 @@
footnote .initial:n = \rmfamily,
marginpar .tl_set:N = \marginfont,
marginpar .initial:n = \rmfamily\footnotesize,
-
- math .choices:nn =
- {
- noto,notosans,times,libertine,
- charter,garamond,none,nc,stix
- }
- { \tl_set:Nn \l__eb_subfont_math_choice_tl {#1} },
- math .value_required:n = true,
- math .initial:n = times,
unknown .code:n = \eb_msg_unknown_option:n { subfont }
}
-\cs_new_protected:Npn \eb_put_newtxmath:n #1
- { \PassOptionsToPackage{#1}{newtxmath} }
-\eb_at_end_preamble:n
- {
- \str_case:VnT \l__eb_subfont_math_choice_tl
- {
- { times } { }
- { nc } { \eb_put_newtxmath:n { nc } }
- { noto } { \eb_put_newtxmath:n { noto } }
- { stix } { \eb_put_newtxmath:n { stix2 } }
- { charter } { \eb_put_newtxmath:n { charter } }
- { notosans } { \eb_put_newtxmath:n { notosans } }
- { garamond } { \eb_put_newtxmath:n { ebgaramond } }
- { libertine } { \eb_put_newtxmath:n { libertine } }
- }
- { \LoadPackage{newtxmath+bm} }
- }
-
\fp_new:N \l__eb_spread_line_fp
\fp_new:N \l__eb_spread_table_fp
\fp_new:N \l__eb_spread_math_fp
@@ -1693,9 +1688,9 @@
line .fp_set:N = \l__eb_spread_line_fp,
line .initial:n = 1.3,
table .fp_set:N = \l__eb_spread_table_fp,
- table .initial:n = 1.05,
+ table .initial:n = 1.1,
math .fp_set:N = \l__eb_spread_math_fp,
- math .initial:n = 1.05,
+ math .initial:n = 1.1,
caption .fp_set:N = \l__eb_spread_caption_fp,
caption .initial:n = 1.1,
footnote .fp_set:N = \l__eb_spread_footnote_fp,
@@ -2390,7 +2385,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/09/28}{1.3F}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/06}{1.3G}
{Customization of tcolorbox for easybook}
\tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }