summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/spbmark
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-12-18 03:01:04 +0000
committerNorbert Preining <norbert@preining.info>2021-12-18 03:01:04 +0000
commit0b26b7204c72706e2a9bb06b8f52ebbe454b3325 (patch)
treecf803ed180425a7bb671474a7e5ca23f8c6e2c56 /macros/latex/contrib/spbmark
parent6827f87d3315fc677ae89a9260d455a312a90864 (diff)
CTAN sync 202112180301
Diffstat (limited to 'macros/latex/contrib/spbmark')
-rw-r--r--macros/latex/contrib/spbmark/spbmark.pdfbin68292 -> 68315 bytes
-rw-r--r--macros/latex/contrib/spbmark/spbmark.sty54
-rw-r--r--macros/latex/contrib/spbmark/spbmark.tex8
3 files changed, 26 insertions, 36 deletions
diff --git a/macros/latex/contrib/spbmark/spbmark.pdf b/macros/latex/contrib/spbmark/spbmark.pdf
index a7d8f24997..0ba9784d34 100644
--- a/macros/latex/contrib/spbmark/spbmark.pdf
+++ b/macros/latex/contrib/spbmark/spbmark.pdf
Binary files differ
diff --git a/macros/latex/contrib/spbmark/spbmark.sty b/macros/latex/contrib/spbmark/spbmark.sty
index 37be59700c..72c6240a5f 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}{2021/12/15}{1.2A}
+\ProvidesExplPackage{spbmark}{2021/12/16}{1.2B}
{Customize superscripts and subscripts}
\cs_generate_variant:Nn \dim_max:nn { VV }
@@ -130,50 +130,40 @@
}
\cs_set_eq:NN \spb@textsuperscript@save \textsuperscript
\cs_set_eq:NN \spb@textsubscript@save \textsubscript
-\cs_set_eq:NN \spb@sp@save \sp
-\cs_set_eq:NN \spb@sb@save \sb
-\cs_new:Npn \spb_math:nn #1
- {
- \str_case:nn {#1}
- {
- { super } { \spb@sp@save }
- { sub } { \spb@sb@save }
- }
- }
+\cs_set_eq:NN \spb@math@super@save \sp
+\cs_set_eq:NN \spb@math@sub@save \sb
\cs_new:Npn \spb_math_print_store_i:nn #1#2
{
\hbox_set:Nn \l_tmpa_box
- { \ensuremath{\tl_use:c { l__spb_#1_cmd_i_tl }{\spb_math:nn {#1} {#2}}} }
+ {
+ \ensuremath
+ {
+ \use:c { spb@math@#1@save }
+ { \tl_use:c { l__spb_#1_cmd_i_tl }{#2} }
+ }
+ }
}
\cs_new:Npn \spb_text_print_store_i:nn #1#2
{
\hbox_set:Nn \l_tmpa_box
- { \tl_use:c { l__spb_#1_cmd_i_tl }{\use:c { spb@text#1script@save }{#2}} }
+ {
+ \use:c { spb@text#1script@save }
+ { \tl_use:c { l__spb_#1_cmd_i_tl }{#2} }
+ }
}
\cs_new:Npn \spb_math_print_store_ii:nn #1#2
{
- \hbox_set:Nn \l_tmpa_box
- { \ensuremath{\l__spb_super_cmd_ii_tl{\spb@sp@save{#1}}} }
+ \hbox_set:Nn \l_tmpa_box
+ { \ensuremath{\spb@math@super@save{\l__spb_super_cmd_ii_tl{#1}}} }
\hbox_set:Nn \l_tmpb_box
- {
- \ensuremath
- {
- \tl_if_novalue:VF \l__spb_sub_cmd_ii_tl
- { \l__spb_sub_cmd_ii_tl }
- { \spb@sb@save{#2} }
- }
- }
+ { \ensuremath{\spb@math@sub@save{\l__spb_sub_cmd_ii_tl{#2}}} }
}
\cs_new:Npn \spb_text_print_store_ii:nn #1#2
{
\hbox_set:Nn \l_tmpa_box
- { \l__spb_super_cmd_ii_tl{\spb@textsuperscript@save{#1}} }
+ { \spb@textsuperscript@save{\l__spb_super_cmd_ii_tl{#1}} }
\hbox_set:Nn \l_tmpb_box
- {
- \tl_if_novalue:VF \l__spb_sub_cmd_ii_tl
- { \l__spb_sub_cmd_ii_tl }
- { \spb@textsubscript@save{#2} }
- }
+ { \spb@textsubscript@save{\l__spb_sub_cmd_ii_tl{#2}} }
}
\cs_new_protected:Npn \spb_box_ht_dp_assign:nn #1#2
{
@@ -199,7 +189,7 @@
{ match } {#3}
}
}
-\cs_new_protected:Npn \spb_local_value_init:n #1
+\cs_new_protected:Npn \spb_global_value_init:n #1
{
\tl_gset:Nn \g__spb_hshift_init_tl {#1}
\tl_gset:Nn \g__spb_vshift_init_tl {#1}
@@ -212,7 +202,7 @@
{O{}>{\SplitArgument{1}{,}}O{}mO{}}
{
\group_begin:
- \spb_local_value_init:n {#1}
+ \spb_global_value_init:n {#1}
\keys_set:nn { ctex/style } {##1,##4}
\spb_mode_switch:nnn
{ \spb_math_print_store_i:nn {#1} {##3} }
@@ -261,7 +251,7 @@
\NewDocumentCommand{\supersub}{O{}mmO{}}
{
\group_begin:
- \spb_local_value_init:n { supersub }
+ \spb_global_value_init:n { supersub }
\keys_set:nn { ctex/style } {#1,#4}
\spb_mode_switch:nnn
{ \spb_math_print_store_ii:nn {#2} {#3} }
diff --git a/macros/latex/contrib/spbmark/spbmark.tex b/macros/latex/contrib/spbmark/spbmark.tex
index 8a4e5d9a92..a8f74d041b 100644
--- a/macros/latex/contrib/spbmark/spbmark.tex
+++ b/macros/latex/contrib/spbmark/spbmark.tex
@@ -6,8 +6,8 @@
{
package = spbmark,
title = the spbmark package,
- version = v1.2A,
- date = 2021/12/15,
+ version = v1.2B,
+ date = 2021/12/16,
authors = Qu Yi,
info = Customize superscript and subscript,
email = q1jx@foxmail.com,
@@ -150,9 +150,9 @@ If you need to use the original definitions of \cs{textsuperscript}, \cs{textsub
Save the original definition of the \cs{textsuperscript} command, output superscript in the text mode.
\command{spb@textsubscript@save}[\marg{content}]
Save the original definition of the \cs{textsubscript} command, output subscript in the text mode.
- \command{spb@sp@save}[\marg{content}]
+ \command{spb@math@super@save}[\marg{content}]
Save the original definition of the \cs{sp} command, output superscript in the math mode.
- \command{spb@sb@save}[\marg{content}]
+ \command{spb@math@sub@save}[\marg{content}]
Save the original definition of the \cs{sb} command, output subscript in the math mode.
\end{commands}