diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/easybook/easybase.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybase.sty | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty index 950d2f0032f..75b17fa8c0f 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybase.sty +++ b/Master/texmf-dist/tex/latex/easybook/easybase.sty @@ -13,7 +13,7 @@ %% https://creativecommons.org/licenses/by/4.0/legalcode \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/07/22}{1.27L} +\ProvidesExplPackage{easybase}{2021/07/24}{1.27o} {Typeset Chinese theses or books} \cs_generate_variant:Nn \int_to_arabic:n { v } @@ -75,13 +75,30 @@ { \seq_set_split:Nnn \l_tmpa_seq { [ } {#1} \seq_pop_left:NN \l_tmpa_seq \l_tmpa_tl - \IfFileExists{\l_tmpa_tl.sty} + \seq_pop_right:NN \l_tmpa_seq \l_tmpb_tl + \eb_package_reload_check:nn { \l_tmpa_tl } { - \exp_last_unbraced:Nx \RequirePackage - { [\seq_use:Nn \l_tmpa_seq { , } }{\l_tmpa_tl} - }{} + \IfFileExists{\l_tmpa_tl.sty} + { + \exp_last_unbraced:Nx \RequirePackage + { [\l_tmpb_tl }{\l_tmpa_tl} + }{} + } + } + { + \eb_package_reload_check:nn {#1} + { \IfFileExists{#1.sty}{\RequirePackage{#1}}{} } } - { \IfFileExists{#1.sty}{\RequirePackage{#1}}{} } + } +\cs_new_protected:Npn \eb_package_reload_check:nn #1#2 + { + \@ifpackageloaded{#1} + {\msg_warning:nnn { easybase } { package-reload } {#1}}{#2} + } +\msg_new:nnn { easybase } { package-reload } + { + There~is~no~need~to~reload~the~#1~macro~package. \\ + Please~review~your~code. } \NewDocumentCommand{\LoadPackage}{O{}m} { @@ -1393,7 +1410,7 @@ item-align .initial:n = r, delim-align .tl_set:N = \l__eb_eqsymb_delim_align_tl, delim-align .initial:n = c, - intro .tl_set: = \l__eb_eqsymb_intro_tl, + intro .tl_set:N = \l__eb_eqsymb_intro_tl, font .tl_set:N = \l__eb_eqsymb_font_tl, mode .tl_set:N = \l__eb_eqsymb_mode_tl, mode .initial:n = math @@ -1893,15 +1910,15 @@ { \eb_define_theme_color:n { \exp_not:n {#1} } } } -\cs_new:Npn \eb_allow_urlbreak: +\cs_new:Npn \eb_allow_url_break: { \eb_appto_cmd:Nn \UrlBreaks { \UrlOrds - \tl_map_function:NN \c__eb_urlbreak_points_tl \do + \tl_map_function:NN \c__eb_url_break_points_tl \do } } -\tl_const:Nn \c__eb_urlbreak_points_tl +\tl_const:Nn \c__eb_url_break_points_tl { ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz @@ -1911,7 +1928,7 @@ { \LoadPackage{hyperref} \urlstyle{same} - \eb_allow_urlbreak: + \eb_allow_url_break: \exp_args:NV \hypersetup \l__eb_hyperref_clist } |