summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-03-04 21:59:23 +0000
committerKarl Berry <karl@freefriends.org>2022-03-04 21:59:23 +0000
commit815c00b5e712bcf5f934687398f6284cd5f9fc97 (patch)
tree559c9bbfc38ba0532bc986298d7dc0cd0c7388e7 /Master/texmf-dist/tex/latex
parentddcdcf719a911e7d37110284290b4ef0345a7132 (diff)
spbmark (4mar22) (branch)
git-svn-id: svn://tug.org/texlive/branches/branch2021.final@62416 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/spbmark/spbmark.sty23
1 files changed, 18 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/spbmark/spbmark.sty b/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
index dd9dac296d2..e78f1db6593 100644
--- a/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
+++ b/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
@@ -9,12 +9,13 @@
% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2018/12/31]
\RequirePackage{xparse,l3keys2e}
-\ProvidesExplPackage{spbmark}{2022/03/02}{1.38}
+\ProvidesExplPackage{spbmark}{2022/03/04}{1.39}
{Customize superscripts and subscripts}
\cs_generate_variant:Nn \box_set_ht:Nn { cv }
\cs_generate_variant:Nn \box_set_dp:Nn { cv }
\cs_generate_variant:Nn \dim_max:nn { VV }
+\cs_generate_variant:Nn \dim_gset:Nn { Nv }
\cs_generate_variant:Nn \dim_compare:nNnTF { V }
\cs_generate_variant:Nn \msg_warning:nnn { nnV }
\cs_generate_variant:Nn \str_case:nn { x }
@@ -227,6 +228,9 @@
\box_new:N \l__sub_i_box
\box_new:N \l__super_ii_box
\box_new:N \l__sub_ii_box
+\dim_new:N \llastwd
+\dim_new:N \clastwd
+\dim_new:N \rlastwd
\tl_set:Nn \l__spb_box_super_wd_i_tl { \box_wd:N \l__super_i_box }
\tl_set:Nn \l__spb_box_sub_wd_i_tl { \box_wd:N \l__sub_i_box }
\tl_set:Nn \l__spb_box_super_wd_ii_tl { \box_wd:N \l__super_ii_box }
@@ -243,6 +247,7 @@
{ \tl_use:c { l__spb_#1_cmd_i_tl }{#2} }
}
}
+ \dim_gset:Nv \rlastwd { l__spb_box_#1_wd_i_tl }
}
\cs_new:Npn \spb_text_print_store_i:nn #1#2
{
@@ -251,6 +256,7 @@
\use:c { spb@text#1script@save }
{ \tl_use:c { l__spb_#1_cmd_i_tl }{#2} }
}
+ \dim_gset:Nv \rlastwd { l__spb_box_#1_wd_i_tl }
}
\cs_new:Npn \spb_math_print_store_ii:nn #1#2
{
@@ -303,6 +309,7 @@
\exp_args:Nc \NewDocumentCommand {#1}{O{}mO{}}
{
\group_begin:
+ \mode_leave_vertical:
\tl_gset:Nn \g__spb_mark_case_init_tl {#1}
\spb_define:n { unknown .undefine: }
\spb_set:n { ##1,##3 }
@@ -315,6 +322,7 @@
}
\cs_new_protected:Npn \spb_content_hbox_set:n #1
{
+ \dim_gset:Nn \clastwd { (\llastwd + \rlastwd)/2 }
\hbox_set:cn { l__#1_i_box }
{
\dim_compare:nNnTF { \tl_use:c { l__spb_#1_hmove_tl } } < { 0pt }
@@ -323,7 +331,7 @@
{
\hbox_overlap_right:n
{ \spb_box_vmove_i:nn {#1} { \tl_use:c { l__spb_#1_vmove_tl } } }
- \skip_horizontal:n { -\tl_use:c { l__spb_#1_hmove_tl } }
+ \skip_horizontal:n { \dim_abs:n { \tl_use:c { l__spb_#1_hmove_tl } } }
}
}
{
@@ -332,6 +340,8 @@
{ \hss\spb_box_vmove_i:nn {#1} { \tl_use:c { l__spb_#1_vmove_tl } } }
}
}
+ \dim_gset:Nn \llastwd
+ { \tl_use:c { l__spb_box_#1_wd_i_tl } - \tl_use:c { l__spb_#1_hmove_tl } }
}
\clist_map_inline:nn { super,sub } { \spb_both_newcmd_map:n {#1} }
@@ -340,6 +350,7 @@
\NewDocumentCommand{\supersub}{O{}mmO{}}
{
\group_begin:
+ \mode_leave_vertical:
\tl_gset:Nn \g__spb_mark_case_init_tl { supersub }
\spb_define:n { unknown .undefine: }
\spb_set:n {#1,#4}
@@ -361,7 +372,7 @@
\hbox_overlap_left:n
{
\spb_hbox_overlap_vmove_ii:n { right }
- \skip_horizontal:n { -\l__spb_supersub_hmove_tl }
+ \skip_horizontal:n { \dim_abs:n { \l__spb_supersub_hmove_tl } }
}
}
{
@@ -379,7 +390,8 @@
\hbox_overlap_left:n
{
\spb_hbox_overlap_vmove_ii:n { center }
- \skip_horizontal:n { -\l__spb_supersub_hmove_tl - \l__spb_box_max_wd_tl/2 }
+ \skip_horizontal:n
+ { \dim_abs:n { \l__spb_supersub_hmove_tl + \l__spb_box_max_wd_tl/2 } }
}
}
{
@@ -397,7 +409,8 @@
\hbox_overlap_left:n
{
\spb_hbox_overlap_vmove_ii:n { left }
- \skip_horizontal:n { -\l__spb_supersub_hmove_tl - \l__spb_box_max_wd_tl }
+ \skip_horizontal:n
+ { \dim_abs:n { \l__spb_supersub_hmove_tl + \l__spb_box_max_wd_tl } }
}
}
{