diff options
author | Karl Berry <karl@freefriends.org> | 2021-08-09 21:03:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-08-09 21:03:57 +0000 |
commit | d120ccc2b596c9c395d79efced328fed42d20c39 (patch) | |
tree | 2e986eb63a8429bbaeef46a9e5ea57364f53dd82 /Master/texmf-dist/tex | |
parent | 57f947c6aa7497724bc2621e5a86d85c02580253 (diff) |
easybook (9aug21)
git-svn-id: svn://tug.org/texlive/trunk@60202 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybase.sty | 74 | ||||
-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, 51 insertions, 27 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty index be5218b21c5..a46baa8c8a8 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/08/06}{1.28F} +\ProvidesExplPackage{easybase}{2021/08/09}{1.28H} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_add:Nn { NV,Nv } @@ -540,6 +540,8 @@ fnmark-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 } @@ -678,8 +680,7 @@ \selectfont\ignorespaces \l__eb_subfont_footnote_tl } -\ProvideDocumentCommand{\super}{mo}{\textsuperscript{#1}} -\providecommand{\spb@textsuperscript@save}{\textsuperscript} +\ProvideDocumentCommand{\super}{d()mo}{\textsuperscript{#2}} \providecommand{\spbset}{\use_none:n} \cs_set_protected:Npn \footref #1 { @@ -722,34 +723,38 @@ \H@@footnotemark } } +\NewDocumentCommand{\eb@fnmark@super}{sm} + { + \IfBooleanTF{#1} + {\super{#2}[0pt]} + {\super(\l__eb_fnmark_format_tl){#2}[0pt]} + } +\cs_new_protected:Npn \eb_fnmark_format_initial: + { + \spbset{super-format = { },nohshift} + \tl_use:N \l__eb_subfont_footnote_tl + } \cs_set:Npn \@makefnmark { \hbox:n { - \spbset{super-format = { }} - \tl_use:N \l__eb_subfont_footnote_tl - \tl_use:N \l__eb_fnmark_format_tl - { - \tl_if_eq:NnTF \@mpfn { footnote } - { \super{\eb@thefnmark}[0pt] } - { \super{\@thefnmark}[0pt] } - } + \eb_fnmark_format_initial: + \tl_if_eq:NnTF \@mpfn { footnote } + { \eb@fnmark@super{\eb@thefnmark} } + { \eb@fnmark@super{\@thefnmark} } } } \cs_new:Npn \eb@makefnmark { \hbox:n { - \tl_use:N \l__eb_subfont_footnote_tl - \tl_use:N \l__eb_fnmark_format_tl + \eb_fnmark_format_initial: + \tl_if_eq:NnT \l__eb_fnmark_position_tl { super } + { \eb@fnmark@super* } { - \tl_if_eq:NnT \l__eb_fnmark_position_tl { super } - { \spb@textsuperscript@save } - { - \tl_use:N \l__eb_fnmark_before_tl - \@thefnmark - \tl_use:N \l__eb_fnmark_after_tl - } + \tl_use:N \l__eb_fnmark_before_tl + \l__eb_fnmark_format_tl{\@thefnmark} + \tl_use:N \l__eb_fnmark_after_tl } } } @@ -765,16 +770,35 @@ \group_end: } } -\NewDocumentCommand{\Footnote}{O{#2}m} +\cs_new_protected:Npn \eb_fncust_format_initial: + { + \hdrset{fnmark-code = { }} + \tl_set_eq:NN + \l__eb_fnmark_format_tl \l__eb_fncust_format_tl + } +\NewDocumentCommand{\Footnote}{O{#2}mm} { + \group_begin: + \eb_fncust_format_initial: \eb@@makefnmark{#2}{#1} \@footnotemark - \@footnotetext + \@footnotetext{#3} + \group_end: } \cs_new_protected:Npn \Footnotemark #1 - { \eb@@makefnmark{#1}{#1}\@footnotemark } -\cs_new_protected:Npn \Footnotetext #1 - { \eb@@makefnmark{#1}{#1}\@footnotetext } + { + \group_begin: + \eb_fncust_format_initial: + \eb@@makefnmark{#1}{#1}\@footnotemark + \group_end: + } +\cs_new_protected:Npn \Footnotetext #1#2 + { + \group_begin: + \eb_fncust_format_initial: + \eb@@makefnmark{#1}{#1}\@footnotetext{#2} + \group_end: + } \cs_new:Npn \eb@footmisc@ifvoid #1#2#3 { \ifvoid #1#2\else #3\fi } \cs_set:Npn \thempfootnote { \int_to_alph:n { \c@mpfootnote } } diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 1dcaf4a847b..6632e1838bf 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybook.cls +++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls @@ -13,7 +13,7 @@ %% https://creativecommons.org/licenses/by/4.0/legalcode \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/08/06}{1.28F} +\ProvidesExplClass{easybook}{2021/08/09}{1.28H} {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 d44841da67b..36832045c23 100644 --- a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg +++ b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg @@ -11,7 +11,7 @@ %% conditions of the CC-BY 4.0 License. %% The latest version of this license is in %% https://creativecommons.org/licenses/by/4.0/legalcode -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/06}{1.28F} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/09}{1.28H} {Customization of tcolorbox for easybook} \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } |