summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/spbmark/spbmark.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/spbmark/spbmark.sty')
-rw-r--r--macros/latex/contrib/spbmark/spbmark.sty25
1 files changed, 15 insertions, 10 deletions
diff --git a/macros/latex/contrib/spbmark/spbmark.sty b/macros/latex/contrib/spbmark/spbmark.sty
index b6af3d93c2..4b7a7f981b 100644
--- a/macros/latex/contrib/spbmark/spbmark.sty
+++ b/macros/latex/contrib/spbmark/spbmark.sty
@@ -9,7 +9,7 @@
% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2018/12/31]
\RequirePackage{xparse,l3keys2e}
-\ProvidesExplPackage{spbmark}{2024/02/04}{1.45}
+\ProvidesExplPackage{spbmark}{2024/02/05}{1.46}
{Customize superscripts and subscripts}
\cs_generate_variant:Nn \box_set_ht:Nn { cv }
@@ -36,8 +36,8 @@
text .choice:,
text/true .code:n =
{
- \cs_set:Npn \textsuperscript { \super }
- \cs_set:Npn \textsubscript { \sub }
+ \cs_set:Npn \textsuperscript { \super[textsp] }
+ \cs_set:Npn \textsubscript { \sub[textsb] }
},
text/false .code:n =
{
@@ -48,8 +48,8 @@
math .choice:,
math/true .code:n =
{
- \cs_set:Npn \sp { \super }
- \cs_set:Npn \sb { \sub }
+ \cs_set:Npn \sp { \super[mathsp] }
+ \cs_set:Npn \sb { \sub[mathsb] }
},
math/false .code:n =
{
@@ -61,7 +61,7 @@
foot/true .code:n =
{
\cs_set:Npn \@makefnmark
- { \hbox:n { \fnmarkfont{\super{\@thefnmark}} } }
+ { \hbox:n { \fnmarkfont{\super[fnmark]{\@thefnmark}} } }
},
foot/false .code:n =
{ \cs_set:Npn \@makefnmark { \spb@@makefnmark@save } },
@@ -112,6 +112,12 @@
}
\cs_new_protected:Npn \spbshortkv #1#2
{ \spb_define:n { #1 .meta:n = {#2} } }
+\clist_map_inline:nn
+ { textsp,textsb,mathsp,mathsb,fnmark }
+ {
+ \defspbstyle{#1}{}
+ \spbshortkv{#1}{style = #1}
+ }
\spb_define:n
{
mode .tl_set:N = \l__spb_mode_value_tl,
@@ -338,13 +344,13 @@
\cs_new_protected:Npn \spb_both_newcmd_map:n #1
{
- \exp_args:Nc \NewDocumentCommand {#1}{sO{}mO{}}
+ \exp_args:Nc \NewDocumentCommand {#1}{sO{}O{}mO{}}
{
\group_begin:
\mode_leave_vertical:
\tl_gset:Nn \g__spb_mark_case_init_tl {#1}
- \spb_set:n { ##2,##4 }
- \spb_mode_switch:nnn {#1} {##3} { i }
+ \spb_set:n { ##2,##3,##5 }
+ \spb_mode_switch:nnn {#1} {##4} { i }
\spb_content_hbox_set:nn {#1} {##1}
\spb_ht_dp_assign:nnnn {#1} {#1} { i } { _outer }
\box_use:c { l__#1_i_outer_box }
@@ -397,7 +403,6 @@
\group_begin:
\mode_leave_vertical:
\tl_gset:Nn \g__spb_mark_case_init_tl { supersub }
- \spb_define:n { unknown .undefine: }
\spb_set:n {#2,#5}
\spb_mode_switch:nnn {#3} {#4} { ii }
\spb_ht_dp_assign:nnnn { super } { sub } { ii } { }