diff options
author | Karl Berry <karl@freefriends.org> | 2021-10-18 19:49:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-10-18 19:49:23 +0000 |
commit | b6c67ad0856449e51a22add69b5c29dc448710a9 (patch) | |
tree | 89504e3aae5ceeb84da2b6fab8b625a30ceb756d /Master/texmf-dist/tex/latex | |
parent | 35c5189954f8dae9b32d44e6e315a98adc9dd7e3 (diff) |
easybook (18oct21)
git-svn-id: svn://tug.org/texlive/trunk@60794 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybase.sty | 159 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybook.cls | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg | 2 |
3 files changed, 97 insertions, 66 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty index 1ab895b4862..cb1b30ed9cf 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybase.sty +++ b/Master/texmf-dist/tex/latex/easybook/easybase.sty @@ -20,7 +20,7 @@ %% This work has the LPPL maintenance status `maintained'. \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/10/16}{1.3N} +\ProvidesExplPackage{easybase}{2021/10/18}{1.3O} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -498,9 +498,9 @@ { \ding{\int_eval:n { 171 + #1 }} } \cs_new:Npn \eb_fnmark_counter_pifont_neg:N #1 { \ding{\int_eval:n { 181 + #1 }} } -\cs_new:Npn \eb_fnmark_counter_pifont_sans:N #1 +\cs_new:Npn \eb_fnmark_counter_pisans:N #1 { \ding{\int_eval:n { 191 + #1 }} } -\cs_new:Npn \eb_fnmark_counter_pifont_sans_neg:N #1 +\cs_new:Npn \eb_fnmark_counter_pisans_neg:N #1 { \ding{\int_eval:n { 201 + #1 }} } \cs_new:Npn \eb_int_format_trans:NN #1 { @@ -527,10 +527,10 @@ { \exp_not:N \eb_fnmark_counter_pifont:N } { pifont* } { \exp_not:N \eb_fnmark_counter_pifont_neg:N } - { pifont-sans } - { \exp_not:N \eb_fnmark_counter_pifont_sans:N } - { pifont-sans* } - { \exp_not:N \eb_fnmark_counter_pifont_sans_neg:N } + { pisans } + { \exp_not:N \eb_fnmark_counter_pisans:N } + { pisans* } + { \exp_not:N \eb_fnmark_counter_pisans_neg:N } } { \exp_not:N \c@footnote } } @@ -550,33 +550,49 @@ } \cs_set_eq:cN {#2} \l__eb_fnmark_short_tokens_tl } -\bool_new:N \l__eb_fntext_bottom_bool +\cs_new_protected:Npn \eb_footnote_choice_handle:n #1 + { + \str_case:nnF {#1} + { + { bottom } + { \bool_set_true:N \l__eb_fnpara_bottom_bool } + { flush } + { + \tl_set:Nn \l__eb_footnote_choice_tl { default } + \clist_push:Nn \l__eb_footnote_mulchoice_clist {#1} + } + } + { + \bool_lazy_or:nnT + { \str_if_eq_p:nn {#1} { hang } } + { \str_if_eq_p:nn {#1} { default } } + { \tl_set:Nn \l__eb_footnote_choice_tl {#1} } + } + } +\bool_new:N \l__eb_fnpara_bottom_bool +\clist_new:N \l__eb_footnote_mulchoice_clist \ctex_define:nn { hdrset } { - fnmargin .dim_set:N = \footnoteindent, - fnmargin .initial:n = 0.75em, + fnindent .dim_set:N = \footnoteindent, + fnindent .initial:n = 0.75em, fnparskip .skip_set:N = \footparskip, fnparskip .initial:n = 0ex, fnparindent .dim_set:N = \footparindent, fnparindent .initial:n = 2em, - fntext-form .tl_set:N = \l__eb_fntext_format_tl, + fnpara-form .tl_set:N = \l__eb_fnpara_format_tl, fnmark-pos .tl_set:N = \l__eb_fnmark_position_tl, fnmark-pos .initial:n = super, - fnmark-code .code:n = \eb_assign_fnmark_code:n {#1}, - fnmark-code .initial:n = + fntext-code .code:n = \eb_assign_fnmark_code:n {#1}, + fntext-code .initial:n = { ,\tl_if_eq:NnF \l__eb_fnmark_position_tl { super } { \space } }, fnmark-form .tl_set:N = \l__eb_fnmark_format_tl, fncust-form .tl_set:N = \l__eb_fncust_format_tl, fnboth-form .meta:n = { fnmark-form = #1,fncust-form = #1 }, footnotetype .multichoices:nn = - { default,hang,bottom,para } - { - \tl_if_eq:nnTF { bottom } {#1} - { \bool_set_true:N \l__eb_fntext_bottom_bool } - { \tl_set:Nn \l__eb_footnotetype_choice_tl {#1} } - }, + { default,hang,bottom,para,flush } + { \eb_footnote_choice_handle:n {#1} }, footnotetype .value_required:n = true, footnotetype .initial:n = hang, @@ -613,7 +629,11 @@ { part } { \counterwithin*{footnote}{part} } { page } { \counterwithin*{footnote}{page} } } - \bool_if:NT \l__eb_fntext_bottom_bool + \eb_fnpara_if_pos_bottom: + } +\cs_new_protected:Npn \eb_fnpara_if_pos_bottom: + { + \bool_if:NT \l__eb_fnpara_bottom_bool { \cs_set:Npn \@makecol { @@ -649,57 +669,66 @@ } } } -\cs_set:Npn \@makefntext #1 +\cs_new_protected:Npn \eb_footnote_direct_hang: { - \group_begin: - \str_case:Vn \l__eb_footnotetype_choice_tl + \hbox_set:Nn \l_tmpa_box { - { hang } { \use_i:nn } - { default } { \use_ii:nn } + \dim_compare:nNnTF { \footnoteindent } > { 0pt } + { \hbox_to_wd:nn { \footnoteindent } { \eb@makefnmark\hss } } + { \eb@makefnmark } + } + \dim_set:Nn \leftmargin { \box_wd:N \l_tmpa_box } + \dim_zero:N \rightmargin + \dim_set_eq:NN \linewidth \columnwidth + \dim_sub:Nn \linewidth { \leftmargin } + \parshape\@ne\leftmargin\linewidth + \@setpar{{\@@par}} + \mode_leave_vertical: + \hbox_overlap_left:n { \box_use:N \l_tmpa_box } + } +\cs_new_protected:Npn \eb_footnote_direct_default: + { + \noindent + \clist_if_in:NnT \l__eb_footnote_mulchoice_clist { flush } + { \dim_zero:N \footnoteindent } + \int_case:nn { \dim_sign:V \footnoteindent } + { + { 1 } { \use_i:nnn } + { 0 } { \use_ii:nnn } + { -1 } { \use_iii:nnn } } + { \hbox_to_wd:nn { \footnoteindent } { \hss\eb@makefnmark } } + { \hbox_overlap_left:n { \eb@makefnmark } } { - \hbox_set:Nn \l_tmpa_box + \hbox_overlap_left:n { - \dim_compare:nNnTF { \footnoteindent } > { 0pt } - { \hbox_to_wd:nn { \footnoteindent } { \eb@makefnmark\hss } } - { \eb@makefnmark } - } - \dim_set:Nn \leftmargin { \box_wd:N \l_tmpa_box } - \dim_zero:N \rightmargin - \dim_set_eq:NN \linewidth \columnwidth - \dim_sub:Nn \linewidth { \leftmargin } - \parshape\@ne\leftmargin\linewidth - \@setpar{{\@@par}} - \mode_leave_vertical: - \hbox_overlap_left:n { \box_use:N \l_tmpa_box } - } - { - \noindent - \int_case:nn { \dim_sign:V \footnoteindent } - { - { 1 } { \use_i:nnn } - { 0 } { \use_ii:nnn } - { -1 } { \use_iii:nnn } - } - { \hbox_to_wd:nn { \footnoteindent } { \hss\eb@makefnmark } } - { \hbox_overlap_left:n { \eb@makefnmark } } - { - \hbox_overlap_left:n - { - \hbox_to_wd:nn { -\footnoteindent } - { \eb@makefnmark\hss } - } + \hbox_to_wd:nn { -\footnoteindent } + { \eb@makefnmark\hss } } } + } +\cs_set:Npn \@makefntext #1 + { + \group_begin: + \str_case:Vn \l__eb_footnote_choice_tl + { + { hang } { \use_i:nn } + { default } { \use_ii:nn } + } + { \eb_footnote_direct_hang: } + { \eb_footnote_direct_default: } \skip_set:NV \parskip \footparskip \dim_set:NV \parindent \footparindent - \l__eb_fntext_format_tl{#1} - \tl_if_eq:NnT \l__eb_footnotetype_choice_tl { hang } { \par } + \l__eb_fnpara_format_tl{#1} + \tl_if_eq:NnT \l__eb_footnote_choice_tl { hang } { \par } \group_end: } \cs_set_eq:NN \eb@makefntext \@makefntext \ctex_at_end_package:nn { footmisc } - { \cs_set_eq:NN \@makefntext \eb@makefntext } + { + \@ifpackagewith{footmisc}{hang} + {\cs_set_eq:NN \@makefntext \eb@makefntext}{} + } \eb_at_end_patch_cmd:nnn { \@footnotetext,\@mpfootnotetext } { \reset@font } { @@ -780,7 +809,7 @@ { \eb@fnmark@super* } { \tl_use:N \l__eb_fnmark_before_tl - \l__eb_fnmark_format_tl{\@thefnmark} + {\l__eb_fnmark_format_tl{\@thefnmark}} \tl_use:N \l__eb_fnmark_after_tl } } @@ -799,7 +828,7 @@ } \cs_new_protected:Npn \eb_fncust_format_initial: { - \hdrset{fnmark-code = { }} + % \hdrset{fntext-code = { }} \tl_set_eq:NN \l__eb_fnmark_format_tl \l__eb_fncust_format_tl } @@ -1615,7 +1644,7 @@ name = \tl_use:c { c__eb_name_#1_tl }, style = easy-theorem,#5 ] - \bool_if:NT \l__eb_thmbox_bool + \bool_if:NT \l__eb_thmframe_bool { \@ifpackageloaded{tcolorbox} {\tcolorboxenvironment{#1}{#4}} @@ -1625,7 +1654,7 @@ } \msg_new:nnn { easybase } { need-tcolorbox } { - Now~that~the~thmbox~option~is~true. \\ + Now~that~the~thmframe~option~is~true. \\ Please~load~the~tcolorbox~macro~package. } \cs_set_eq:NN \EBNewTheorem \DeclareTheorem @@ -1650,9 +1679,11 @@ { \ctex_define:nn { thmset } { #1 .tl_set:N = #2 } } \ctex_define:nn { thmset } { - thmbox .bool_set:N = \l__eb_thmbox_bool, + thmframe .bool_set:N = \l__eb_thmframe_bool, + thmframe .default:n = true, + thmframe .initial:n = false, + thmbox .meta:n = { thmframe = #1 }, thmbox .default:n = true, - thmbox .initial:n = false, notebraces .tl_set:N = \l__eb_thm_notebraces_tl, unknown .code:n = \eb_msg_unknown_option:n { thmset } } diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 65704d5130d..3533a39aad0 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybook.cls +++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls @@ -20,7 +20,7 @@ %% This work has the LPPL maintenance status `maintained'. \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/10/16}{1.3N} +\ProvidesExplClass{easybook}{2021/10/18}{1.3O} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool diff --git a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg index 6a9af92f8b0..0e70735bc75 100644 --- a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg +++ b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg @@ -18,7 +18,7 @@ %% LaTeX version 2005/12/01 or later. %% %% This work has the LPPL maintenance status `maintained'. -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/16}{1.3N} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/18}{1.3O} {Customization of tcolorbox for easybook} \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } |