diff options
author | Karl Berry <karl@freefriends.org> | 2021-10-29 21:32:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-10-29 21:32:57 +0000 |
commit | 0415899d65ffc7c9dcaef524b3a3f4643843e990 (patch) | |
tree | ead04fbf28044cffc2ed39481079f279dde6a5ca /Master/texmf-dist/tex/latex | |
parent | 037414ddfffaba15f5108179a25307b0e4c05095 (diff) |
spbmark (29oct21)
git-svn-id: svn://tug.org/texlive/trunk@60893 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/spbmark/spbmark.sty | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/spbmark/spbmark.sty b/Master/texmf-dist/tex/latex/spbmark/spbmark.sty index 5a887c2f99d..8ed460d1b83 100644 --- a/Master/texmf-dist/tex/latex/spbmark/spbmark.sty +++ b/Master/texmf-dist/tex/latex/spbmark/spbmark.sty @@ -9,21 +9,27 @@ % https://creativecommons.org/licenses/by/4.0/legalcode \NeedsTeXFormat{LaTeX2e}[2018/12/31] \RequirePackage{xparse,l3keys2e} -\ProvidesExplPackage{spbmark}{2021/10/16}{1.1D} +\ProvidesExplPackage{spbmark}{2021/10/29}{1.1F} {Customize superscripts and subscripts} \cs_new_protected:Npn \spb_define:n { \keys_define:nn { spbmark } } \cs_new_protected:Npn \spbset { \keys_set:nn { spbmark } } +\bool_new:N \l_spb_newsupb_text_bool +\bool_new:N \l_spb_newsupb_math_bool +\bool_new:N \l_spb_newsupb_foot_bool +\bool_new:N \l_spb_newsupb_all_bool + \keys_define:nn { spbmark/option } { - ctex .code:n = + ctex .code:n = { \cs_set:Npn \spb_define:n { \keys_define:nn { ctex/style } } \cs_set:Npn \spbset { \keys_set:nn { ctex/style } } }, - newsupb .bool_set:N = \l__spb_new_supersub_bool, - newsupb .default:n = true, - newsupb .initial:n = true + newsupb .multichoices:nn = + { text,math,foot,all } + { \bool_set_true:c { l_spb_newsupb_#1_bool } }, + newsupb .default:n = all } \ProcessKeysOptions{spbmark/option} @@ -254,21 +260,28 @@ The~l~parameter~will~be~used~by~default. } -\bool_if:NT \l__spb_new_supersub_bool +\bool_if:NT \l_spb_newsupb_all_bool { - \clist_map_inline:nn - { - { sp,sb }, - { textsuperscript,textsubscript } - } - { - \cs_set_eq:cN { \clist_item:nn {#1} { 1 } } \super - \cs_set_eq:cN { \clist_item:nn {#1} { 2 } } \sub - } + \bool_set_true:N \l_spb_newsupb_text_bool + \bool_set_true:N \l_spb_newsupb_math_bool + \bool_set_true:N \l_spb_newsupb_foot_bool + } +\bool_if:NT \l_spb_newsupb_text_bool + { + \cs_set_eq:NN \textsuperscript \super + \cs_set_eq:NN \textsubscript \sub + } +\bool_if:NT \l_spb_newsupb_math_bool + { + \cs_set_eq:NN \sp \super + \cs_set_eq:NN \sb \sub + } +\bool_if:NT \l_spb_newsupb_foot_bool + { + \cs_set:Npn \@makefnmark + { \hbox:n { \fnmarkfont\super{\@thefnmark} } } } \cs_set_eq:NN \spb \supersub -\cs_set:Npn \@makefnmark - { \hbox:n { \fnmarkfont\super{\@thefnmark}[0pt] } } \tl_if_exist:NTF \ftntm@font { \tl_set_eq:NN \fnmarkfont \ftntm@font } { \tl_set_eq:NN \fnmarkfont \normalfont } |