texlive[61337] Master/texmf-dist: spbmark (17dec21)

commits+karl at tug.org commits+karl at tug.org
Fri Dec 17 23:39:01 CET 2021


Revision: 61337
          http://tug.org/svn/texlive?view=revision&revision=61337
Author:   karl
Date:     2021-12-17 23:39:01 +0100 (Fri, 17 Dec 2021)
Log Message:
-----------
spbmark (17dec21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf
    trunk/Master/texmf-dist/doc/latex/spbmark/spbmark.tex
    trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty

Modified: trunk/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/spbmark/spbmark.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/spbmark/spbmark.tex	2021-12-17 22:37:41 UTC (rev 61336)
+++ trunk/Master/texmf-dist/doc/latex/spbmark/spbmark.tex	2021-12-17 22:39:01 UTC (rev 61337)
@@ -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 at foxmail.com,
@@ -150,9 +150,9 @@
   Save the original definition of the \cs{textsuperscript} command, output superscript in the text mode.
   \command{spb at textsubscript@save}[\marg{content}]
   Save the original definition of the \cs{textsubscript} command, output subscript in the text mode.
-  \command{spb at sp@save}[\marg{content}]
+  \command{spb at math@super at save}[\marg{content}]
   Save the original definition of the \cs{sp} command, output superscript in the math mode.
-  \command{spb at sb@save}[\marg{content}]
+  \command{spb at math@sub at save}[\marg{content}]
   Save the original definition of the \cs{sb} command, output subscript in the math mode.
 \end{commands}
 

Modified: trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty	2021-12-17 22:37:41 UTC (rev 61336)
+++ trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty	2021-12-17 22:39:01 UTC (rev 61337)
@@ -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 at textsuperscript@save \textsuperscript
 \cs_set_eq:NN \spb at textsubscript@save \textsubscript
-\cs_set_eq:NN \spb at sp@save \sp
-\cs_set_eq:NN \spb at sb@save \sb
-\cs_new:Npn \spb_math:nn #1
+\cs_set_eq:NN \spb at math@super at save \sp
+\cs_set_eq:NN \spb at math@sub at save \sb
+\cs_new:Npn \spb_math_print_store_i:nn #1#2
   {
-    \str_case:nn {#1}
+    \hbox_set:Nn \l_tmpa_box
       {
-        { super } { \spb at sp@save }
-        { sub } { \spb at sb@save }
+        \ensuremath
+          {
+            \use:c { spb at math@#1 at save }
+              { \tl_use:c { l__spb_#1_cmd_i_tl }{#2} }
+          }
       }
   }
-\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}}} }
-  }
 \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 at text#1script at save }{#2}} }
+      {
+        \use:c { spb at text#1script at 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 at sp@save{#1}}} }
+    \hbox_set:Nn \l_tmpa_box
+      { \ensuremath{\spb at math@super at 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 at sb@save{#2} }
-          } 
-      }
+      { \ensuremath{\spb at math@sub at 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 at textsuperscript@save{#1}} }
+      { \spb at 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 at textsubscript@save{#2} } 
-      }
+      { \spb at 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} }



More information about the tex-live-commits mailing list.