diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/easybook/easybase.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybase.sty | 63 |
1 files changed, 45 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty index 5e03fb2e6af..2a7e98a7335 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybase.sty +++ b/Master/texmf-dist/tex/latex/easybook/easybase.sty @@ -12,8 +12,8 @@ %% The latest version of this license is in %% https://creativecommons.org/licenses/by/4.0/legalcode \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\RequirePackage{etoolbox} -\ProvidesExplPackage{easybase}{2021/07/11}{1.27b} +\RequirePackage{l3keys2e,etoolbox} +\ProvidesExplPackage{easybase}{2021/07/12}{1.27c} {Typeset Chinese theses or books} \cs_generate_variant:Nn \ctex_define:nn { nx } @@ -78,12 +78,12 @@ } \NewDocumentCommand{\LoadPackage}{O{}m} { - \seq_set_split:Nnn \l__eb_package_names_seq { + } {#2} + \seq_set_split:Nnn \l_tmpb_seq { + } {#2} \int_compare:oNnT - { \seq_count:N \l__eb_package_names_seq } = { 1 } + { \seq_count:N \l_tmpb_seq } = { 1 } { \PassOptionsToPackage{#1}{#2} } \seq_map_function:NN - \l__eb_package_names_seq \eb_match_load_package:n + \l_tmpb_seq \eb_match_load_package:n } \cs_new_protected:Npn \eb_at_end_preamble:n { \BeforeBeginEnvironment{document} } @@ -95,6 +95,7 @@ { \bool_set_true:N \l__eb_page_twoside_bool } \bool_if_exist:NF \l__eb_compile_draft_bool { \bool_set_false:N \l__eb_compile_draft_bool } +\clist_new:N \g__eb_ctex_options_clist \keys_define:nn { easybase } { @@ -118,7 +119,10 @@ }, class .initial:n = book, book .meta:n = { class = #1 }, - article .meta:n = { class = #1 } + article .meta:n = { class = #1 }, + + unknown .code:n = + { \clist_gput_right:NV \g__eb_ctex_options_clist \CurrentOption } } \clist_map_inline:nn @@ -131,6 +135,15 @@ } { \PassOptionsToPackage #1 } \ProcessKeysOptions{easybase} +\PassOptionsToPackage{\g__eb_ctex_options_clist}{ctex} +\@ifclassloaded{ctexbook}{} + { + \@ifclassloaded{ctexart}{} + { + \@ifclassloaded{ctexrep}{} + {\RequirePackage[heading]{ctex}} + } + } \bool_new:N \l__eb_toc_multi_column_bool \bool_new:N \l__eb_mark_uppercase_bool @@ -843,7 +856,17 @@ listing-con = #1, equation-con = #1 }, - number-con .initial:n = { . } + number-con .initial:n = { . }, + unknown .code:n = + { + \msg_warning:nnx + { easybase } { ignore-style } { \l_keys_key_str } + } + } +\msg_new:nnn { easybase } { ignore-style } + { + #1~is~an~unknown~style~option. \\ + Please~check~the~user~manual~for~the~supported~options. } \eb_clist_map_inline:nn { figure,table,lstlisting,equation } @@ -1077,8 +1100,8 @@ math .choices:nn = { - noto,notosans,times,scholax,stix, - charter,ebgaramond,libertine,none + noto,notosans,times,libertine, + charter,garamond,none,nc,stix } { \tl_gset_eq:NN @@ -1096,11 +1119,11 @@ { { noto } { \eb_put_newtxmath:n { noto } } { notosans } { \eb_put_newtxmath:n { notosans } } - { ebgaramond } { \eb_put_newtxmath:n { ebgaramond } } + { garamond } { \eb_put_newtxmath:n { ebgaramond } } { times } { \eb_put_newtxmath:n { noOT1 } } { libertine } { \eb_put_newtxmath:n { libertine,noOT1 } } { stix } { \eb_put_newtxmath:n { stix2,noOT1 } } - { scholax } { \eb_put_newtxmath:n { nc,noOT1 } } + { nc } { \eb_put_newtxmath:n { nc,noOT1 } } { charter } { \eb_put_newtxmath:n { charter,noOT1 } } } { \LoadPackage{newtxmath+bm} } @@ -1600,7 +1623,7 @@ % numbers = left, numberstyle = \footnotesize, aboveskip = 1.5ex plus .2ex minus .1ex, - belowskip = 1ex plus .2ex minus .1ex, + belowskip = 1.5ex plus .2ex minus .1ex, keepspaces = true, framerule = \l__eb_rule_width_dim, columns = flexible, @@ -1656,13 +1679,17 @@ { linktype .choice:, linktype .value_required:n = true, - linktype/edge .code:n = { }, - linktype/none .code:n = \eb_put_hyperref:n { hidelinks }, - linktype/various .code:n = + linktype/edge .code:n = + { \AtBeginDocument[hyperref]{\tl_set:Nn \@pdfborder { 0~0~1 }} }, + linktype/none .code:n = + { \AtBeginDocument[hyperref]{\tl_set:Nn \@pdfborder { 0~0~0 }} }, + linktype/colors .code:n = { \bool_set_true:N \l__eb_toc_number_color_bool \eb_put_hyperref:n { colorlinks } }, + linktype/various .meta:n = linktype/colors, + linktype .initial:n = edge, linktoc .choice:, linktoc/unknown .code:n = @@ -1709,7 +1736,7 @@ \clist_map_function:nN { { none, 000000,000000,000000 }, - { seaside, 4169e1,708090,9932cc }, + { seaside, 4169e1,007130,9932cc }, { energy, f39800,00a0e9,893895 }, { cyberpunk, 601986,eb6877,a4005b } } @@ -1732,13 +1759,13 @@ abcdefghijklmnopqrstuvwxyz 0123456789 } -\AtBeginDocument[hyperref] +\ctex_at_end_preamble:n { \LoadPackage{hyperref} \urlstyle{same} \eb_allow_urlbreak: - \ctex_hypersetup:n { pdfstartview = FitH } \exp_args:NV \hypersetup \l__eb_hyperref_clist + \use:c { makeindex } } \labelformat{part}{\CTEXthepart} |