texlive[69714] Master/texmf-dist: spbmark (5feb24)

commits+karl at tug.org commits+karl at tug.org
Mon Feb 5 22:11:37 CET 2024


Revision: 69714
          https://tug.org/svn/texlive?view=revision&revision=69714
Author:   karl
Date:     2024-02-05 22:11:37 +0100 (Mon, 05 Feb 2024)
Log Message:
-----------
spbmark (5feb24)

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	2024-02-05 21:11:28 UTC (rev 69713)
+++ trunk/Master/texmf-dist/doc/latex/spbmark/spbmark.tex	2024-02-05 21:11:37 UTC (rev 69714)
@@ -6,8 +6,8 @@
   {
     package           = spbmark,
     title             = the spbmark package,
-    version           = v1.44,
-    date              = 2024/02/04,
+    version           = v1.46,
+    date              = 2024/02/05,
     authors           = Qu Yi,
     info              = Customize superscript and subscript,
     email             = toquyi at 163.com,
@@ -19,7 +19,7 @@
     color-scheme      = blue,
     title-format      = \huge\bfseries\scshape,
     listings-options  = {numbers = none,gobble = 2,lineskip = 1pt},
-    pre-output        = {\parindent = 0em \setstretch{1.3}},
+    pre-output        = {\parindent = 0em\setstretch{1.3}},
     before-skip       = \smallskipamount,
     after-skip        = \smallskipamount
   }
@@ -40,6 +40,7 @@
 \newsplitarg{\splitdarg}{(}{)}
 \newnote{\newtag}[1][New]{\textcolor{red}{\ding{73}\ #1}}
 \renewcommand{\emph}[1]{\textcolor{red}{#1}}
+\renewcommand{\cnltx at write@lastname}{}
 \makeatother
 
 \begin{document}
@@ -47,12 +48,17 @@
 \label{sec:macro package options}
 The following macro package options will redefine the script commands of the \LaTeX{} kernel. If you do not specify the values of boolean options, they default to \code{true}. These options can also be changed in the preamble area and main body using the global control command \cs{sbpset}.
 \begin{options}
-  \keychoice{text}{true,\fbox{false}}
-  \cs{textsuperscript} and \cs{textsubscript} are equivalent to the \cs{super} and \cs{sub} commands.
-  \keychoice{math}{true,\fbox{false}}
-  \cs{sp} and \cs{sb} are equivalent to the \cs{super} and \cs{sub} commands.
-  \keychoice{foot}{true,\fbox{false}}
-  The format of the footnote mark match the superscript global move and format settings.
+  \keychoice{text}{true,\fbox{false}}\newtag[Changed]%
+  \cs{textsuperscript} and \cs{textsubscript} are equivalent to the \cs{super} and \cs{sub} commands. At this point, you can use the \cs{defspbstyle} command to define the style \code{textsp} and \code{textsb} to change the format of the text superscript and subscript.
+  \keychoice{math}{true,\fbox{false}}\newtag[Changed]%
+  \cs{sp} and \cs{sb} are equivalent to the \cs{super} and \cs{sub} commands. At this point, you can use the \cs{defspbstyle} command to define the style \code{mathsp} and \code{mathsb} to change the format of the math superscript and subscript.
+  \keychoice{foot}{true,\fbox{false}}\newtag[Changed]%
+  The format of the footnote mark match the superscript global move and format settings. At this point, you can use the \cs{defspbstyle} command to define the superscript style \code{fnmark} to change the format of the footnote mark.
+  \begin{example}[code-only]
+  \defspbstyle{textsp}{vmove=-1pt,cmd=\bfseries}
+  \defspbstyle{mathsb}{hmove=0.5em}
+  \defspbstyle{fnmark}{cmd=\small\color{red}}
+  \end{example}
   \keychoice{both}{true,\fbox{false}}
   The values of \option{text} and \option{math} two options are \code{true} or \code{false} at the same time.
   \keychoice{all}{true,\fbox{false}}
@@ -60,7 +66,7 @@
   \begin{example}[code-only]
   \usepackage[both]{spbmark}
   \usepackage[text,foot=true]{spbmark}
-  \spbset{all = false,math}
+  \spbset{all=false,math}
   \end{example}
 \end{options}
 

Modified: trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty	2024-02-05 21:11:28 UTC (rev 69713)
+++ trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty	2024-02-05 21:11:37 UTC (rev 69714)
@@ -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.44}
+\ProvidesExplPackage{spbmark}{2024/02/05}{1.46}
   {Customize superscripts and subscripts}
 
 \cs_generate_variant:Nn \box_set_ht:Nn { cv }
@@ -36,25 +36,25 @@
     text .choice:,
     text/true .code:n       =
       {
-        \cs_set_eq:NN \textsuperscript \super
-        \cs_set_eq:NN \textsubscript \sub
+        \cs_set:Npn \textsuperscript { \super[textsp] }
+        \cs_set:Npn \textsubscript { \sub[textsb] }
       },
     text/false .code:n      =
       {
-        \cs_set_eq:NN \textsuperscript \spb at textsuperscript@save
-        \cs_set_eq:NN \textsubscript \spb at textsubscript@save
+        \cs_set:Npn \textsuperscript { \spb at textsuperscript@save }
+        \cs_set:Npn \textsubscript { \spb at textsubscript@save }
       },
     text .default:n         = true,
     math .choice:,
     math/true .code:n       =
       {
-        \cs_set_eq:NN \sp \super
-        \cs_set_eq:NN \sb \sub
+        \cs_set:Npn \sp { \super[mathsp] }
+        \cs_set:Npn \sb { \sub[mathsb] }
       },
     math/false .code:n      =
       {
-        \cs_set_eq:NN \sp \spb at math@super at save
-        \cs_set_eq:NN \sb \spb at math@sub at save
+        \cs_set:Npn \sp { \spb at math@super at save }
+        \cs_set:Npn \sb { \spb at math@sub at save }
       },
     math .default:n         = true,
     foot .choice:,
@@ -61,10 +61,10 @@
     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_eq:NN \@makefnmark \spb@@makefnmark at save },
+      { \cs_set:Npn \@makefnmark { \spb@@makefnmark at save } },
     foot .default:n         = true,
     both .meta:n            = { text = #1,math = #1 },
     both .default:n         = true,
@@ -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 } { }
@@ -474,7 +479,10 @@
     Alignment~only~supports~l,~c,~and~r. \\
     The~l~parameter~will~be~used~by~default.
   }
-\keys_define:nn { } { ctex/style .inherit:n = spbmark/option }
+\@ifpackageloaded{easybase}
+  {\ctex_gadd_package_hook:nnn { after } { easybase }}
+  {\use:n}
+  { \keys_define:nn { } { ctex/style .inherit:n = spbmark/option } }
 \cs_set_eq:NN \spb \supersub
 \endinput
 %



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