texlive[71716] Master/texmf-dist: spbmark (5jul24)

commits+karl at tug.org commits+karl at tug.org
Fri Jul 5 23:08:38 CEST 2024


Revision: 71716
          https://tug.org/svn/texlive?view=revision&revision=71716
Author:   karl
Date:     2024-07-05 23:08:38 +0200 (Fri, 05 Jul 2024)
Log Message:
-----------
spbmark (5jul24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/spbmark/README.md
    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/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/spbmark/README.md	2024-07-05 21:08:26 UTC (rev 71715)
+++ trunk/Master/texmf-dist/doc/latex/spbmark/README.md	2024-07-05 21:08:38 UTC (rev 71716)
@@ -1,5 +1,5 @@
 # The `spbmark` package
-Customize superscripts and subscripts (v1.46k)
+Customize superscripts and subscripts (v1.46l)
 
 ## Abstract
 `spbmark` provides three commands `\super`, `\sub` and `\supersub` to improve the layout of superscripts and subscripts which can be adjusted the relative position and format, and can be used in text and math mode.

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-07-05 21:08:26 UTC (rev 71715)
+++ trunk/Master/texmf-dist/doc/latex/spbmark/spbmark.tex	2024-07-05 21:08:38 UTC (rev 71716)
@@ -7,15 +7,15 @@
 \setcnltx
   {
     package           = spbmark,
-    version           = v1.46k,
-    date              = 2024/06/21,
+    version           = v1.46l,
+    date              = 2024/07/04,
     authors           = Qu Yi,
-    info              = Customize superscript and subscript,
+    info              = Customize superscripts and subscripts,
     email             = toquyi at 163.com,
     url               = https://github.com/texno3/spbmark,
     abstract          =
       {
-        \pkg*{spbmark} provides three commands \cs{super}, \cs{sub} and \cs{supersub} to improve the layout of superscript and subscript which can be adjusted the relative position and format, and can be used in text and math mode.
+        \pkg*{spbmark} provides three commands \cs{super}, \cs{sub} and \cs{supersub} to improve the layout of superscripts and subscripts which can be adjusted the relative position and format, and can be used in text and math mode.
       },
     color-scheme      = blue,
     listings-options  = {numbers = none,gobble = 2,lineskip = 1pt},
@@ -51,13 +51,13 @@
 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{spbset}.
 \begin{options}
   \keychoice{text}{true,\fbox{false}}
-  \cs{textsuperscript} and \cs{textsubscript} are equivalent to the \cs{super} and \cs{sub} commands. The command \cs{defspbstyle} can be used to define the style \code{textsp} and \code{textsb} to change the format of the text superscript and subscript.
+  \cs{textsuperscript} and \cs{textsubscript} are equivalent to the \cs{super} and \cs{sub} commands. The command \cs{defspbstyle} can be used to define the style \code{textsp} and \code{textsb} to change the format of the text superscripts and subscripts.
   \keychoice{math}{true,\fbox{false}}
-  \cs{sp} and \cs{sb} are equivalent to the \cs{super} and \cs{sub} commands. The command \cs{defspbstyle} can be used to define the style \code{mathsp} and \code{mathsb} to change the format of the math superscript and subscript.
+  \cs{sp} and \cs{sb} are equivalent to the \cs{super} and \cs{sub} commands. The command \cs{defspbstyle} can be used to define the style \code{mathsp} and \code{mathsb} to change the format of the math superscripts and subscripts.
   \keychoice{math*}{true,\fbox{false}}\newtag{Exp\\v1.46j}%
-  The \code{\^{}} and \code{\_{}} tokens in the math mode are equivalent to the \cs{super} and \cs{sub} commands. The command \cs{defspbstyle} can be used to define the style \code{mathsp*} and \code{mathsb*} to change the format of the math superscript and subscript.
+  The \code{\^{}} and \code{\_{}} tokens in the math mode are equivalent to the \cs{super} and \cs{sub} commands. The command \cs{defspbstyle} can be used to define the style \code{mathsp*} and \code{mathsb*} to change the format of the math superscripts and subscripts.
   \keychoice{foot}{true,\fbox{false}}
-  The format of the footnote mark match the superscript global move and format settings. \cs{defspbstyle} can be used to define the superscript style \code{fnmark} to change the format of the footnote mark.
+  The format of the footnote mark match the superscripts global move and format settings. \cs{defspbstyle} can be used to define the superscripts 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}
@@ -73,7 +73,7 @@
   \spbset{all=false,math}
   \end{example}
   \keychoice{spcore}{\fbox{trad},none}\newtag{New\\v1.46k}%
-  Kernel command case for text and math modes superscript. If \code{none} is selected, support for the superscript kernel command is removed, and the \option{cmd} and \option{vmove} options need to be set to control the size and offset of the superscript.
+  Kernel command case for text and math modes superscripts. If \code{none} is selected, support for the superscripts kernel command is removed, and the \option{cmd} and \option{vmove} options need to be set to control the size and offset of the superscripts.
   \begin{example}[code-only]
   \usepackage[spcore=none]{spbmark}
   \usepackage{graphicx}
@@ -80,12 +80,12 @@
   \spbset{spcmd=\scalebox{0.6},spvmove=5pt}
   \end{example}
   \keychoice{sbcore}{\fbox{trad},none}\newtag{New\\v1.46k}%
-  Option for subscript kernel command case, similar to the \option{spcore} option.
+  Option for subscripts kernel command case, similar to the \option{spcore} option.
 \end{options}
 
 \section{User commands}
 \label{sec:user commands}
-There are currently three commands to set superscript and subscript. Their format can be set temporarily using the optional parameters of the command, or set globally using a key-value list, see Section \ref{sec:global control interface}.
+There are currently three commands to print superscripts and subscripts. Their format can be set locally using the optional parameter of the command, or set globally using a key-value list, see Section \ref{sec:global control interface}.
 \begin{commands}
   \command{super}[\sarg\oarg{kv list}\marg{content}\oarg{kv list}]
   This is a superscript output command. The two \meta{kv list} are equivalent.
@@ -128,7 +128,7 @@
   6A\supersub[hmove=-8pt]{examsuper}{sub}\hspace{\dimexpr(\maxwd-8pt)}B
   \end{example}
   \command{defspbstyle}[\marg{style name}\marg{kv list}]
-  Defines the style of the superscript or subscript used for the \option{style} option.
+  Defines the style of the superscripts or subscripts used for the \option{style} option.
   \command{spbifmath}[\marg{math code}\marg{text code}]
   In some cases, \code{math} or \code{text} output modes require different code for format or move. This command can be used when using the \code{match} option or changing the output mode locally, whitch should be used in the move or format options. It can switch the corresponding code according to different output modes.
   \command{spbshortkv}[\marg{short opt}\marg{key value}]
@@ -155,11 +155,11 @@
   \keyval{cmd}{format cmds}
   The format commands of superscript or subscript. The last command can take a parameter, which accepts superscript or subscript. Represents the format of superscript and subscript in the superscript and subscript commands.
   \keyval{cmd+}{format cmds}
-  Add code to the previous global superscript or subscript format commands.
+  Add code to the previous option \option{cmd}.
   \keyval{height}{fixed length}
-  The distance between the superscript or subscript baseline and the previous line. It is recommended that the superscript adjusts the height and the subscript adjusts the depth.
+  The height of the marker box above the baseline. It is recommended that the superscript adjusts the height and the subscript adjusts the depth.
   \keyval{depth}{fixed length}
-  The distance between the superscript or subscript baseline and the next line.
+  The depth of the marker box below the baseline.
   \keyval{style}{style name}
   Use the \meta{style name} defined by the \cs{defspbstyle} command to make it work global or local.
   \keychoice{mode}{text,math,\fbox{match}}
@@ -185,71 +185,74 @@
 \label{sec:global control interface}
 \begin{commands}
   \command{spbset}[\marg{key-value list}]
-  \pkg*{spbmark} uses the \cs{spbset} command to control the global default format of superscript and subscript. These options also apply to \meta{kv list} of the above commands. The values ​set by it will be overwritten by the optional parameters of the superscript and other commands.
+  \pkg*{spbmark} uses the \cs{spbset} command to control the global default format of superscripts and subscripts. These options also apply to \meta{kv list} of the \textcolor{red}{above} print commands. The values set by it will be overwritten by the optional parameter of superscripts and subscripts commands.
+
+  Note that the relative length units in the options such as \code{ex} and \code{em} are for the \textcolor{red}{body} font size, not the marker itself.
+
+  The following list of keys control the format both of superscripts \emph{or} subscripts. They can also be used in the optional parameter of the \cs{super} or \cs{sub} command.
 \end{commands}
 
-The following list of keys control the format both of superscript \emph{or} subscript.
 \begin{options}
   \keyval{spvmove}{fixed length}\Default{0pt}
-  Extra vertical move of the superscript. 
+  Extra vertical move of the superscripts.
   \keyval{sphmove}{fixed length}\Default{0pt}
-  Extra horizontal move of the superscript.
+  Extra horizontal move of the superscripts.
   \keyval{sbvmove}{fixed length}\Default{0pt}
-  Extra vertical move of the subscript.
+  Extra vertical move of the subscripts.
   \keyval{sbhmove}{fixed length}\Default{0pt}
-  Extra horizontal move of the subscript.
+  Extra horizontal move of the subscripts.
   \opt{nohmove}
-  Cancel the horizontal move of superscript and subscript at the same time.
+  Cancel the horizontal move of superscripts and subscripts at the same time.
   \opt{novmove}
-  Cancel the vertical move of superscript and subscript at the same time.
+  Cancel the vertical move of superscripts and subscripts at the same time.
   \keyval{spcmd}{format cmds}
-  The format commands of superscript. The last command in the code can take an argument, which is a superscript.
+  The format commands of superscripts. The last command in the code can take an argument, which is a superscripts.
   \keyval{spcmd+}{format cmds}
-  Add code to the previous global superscript format commands.
+  Add code to the previous option \option{spcmd}.
   \keyval{sbcmd}{format cmds}
-  The format commands of subscript. Similar to the \option{spcmd} option, but for subscript.
+  The format commands of subscripts. Similar to the \option{spcmd} option, but for subscripts.
   \keyval{sbcmd+}{format cmds}
-  Add code to the previous global subcript format commands.
+  Add code to the previous option \option{sbcmd}.
   \keyval{spheight}{fixed length}
-  The distance between the superscript baseline and the previous line.
+  The height of the superscript box above the baseline.
   \keyval{spdepth}{fixed length}
-  The distance between the superscript baseline and the next line.
+  The depth of the superscript box below the baseline.
   \keyval{sbheight}{fixed length}
-  The distance between the subscript baseline and the previous line.
+  The height of the subscript box above the baseline.
   \keyval{sbdepth}{fixed length}
-  The distance between the subscript baseline and the next line.
+  The depth of the subscript box below the baseline.
   \keychoice{spthiswd}{auto,\fbox{keep}}
-  Width processing mode after using this superscript. See Section \ref{sec:user commands} for the meaning of this option.
+  Width processing mode after using this superscripts. See Section \ref{sec:user commands} for the meaning of this option.
   \keychoice{sbthiswd}{auto,\fbox{keep}}
-  Width processing mode after using this subscript. See Section \ref{sec:user commands} for the meaning of this option.
+  Width processing mode after using this subscripts. See Section \ref{sec:user commands} for the meaning of this option.
   \keyval{spregex}{regular expression}
-  After the superscript command is used, the regular expression rules of the following tokens are matched. See Section \ref{sec:user commands} for the meaning of this option.
+  After the superscripts command is used, the regular expression rules of the following tokens are matched. See Section \ref{sec:user commands} for the meaning of this option.
   \keyval{sbregex}{regular expression}
-  Similar to the \option{spregex} option, but for subscript.
+  Similar to the \option{spregex} option, but for subscripts.
 \end{options}
 
-If \option{sphmove} is positive, the superscript or subscript moves to the right, conversely it moves to the left. The positive direction of vertical offset of subscript and superscript is \textcolor{red}{opposite}. For superscript, if \option{spvmove} is positive, the superscript moves up, conversely it moves down. For subscript, if \option{spvmove} is positive, the subscript moves down, conversely it moves up.
+If \option{sphmove} is positive, the superscripts or subscripts moves to the right, conversely it moves to the left. The positive direction of vertical offset of subscripts and superscripts is \textcolor{red}{opposite}. For superscripts, if \option{spvmove} is positive, the superscripts moves up, conversely it moves down. For subscripts, if \option{spvmove} is positive, the subscripts moves down, conversely it moves up.
 
-The following list of keys control the format of superscript \emph{and} subscript.
+The following list of keys control the format of superscripts \emph{and} subscripts. They can also be used in the optional parameter of the \cs{supersub} command.
 \begin{options}
   \keyval{spbhmove}{fixed length}\Default{0pt}
-  Extra vertical move of the superscript and the subscript.
+  Extra vertical move of the superscripts and the subscripts.
   \kvsplit{spbcmd}{super cmds}{sub cmds}
-  The format commands of superscript and subscript. The first part is in superscript format, and the latter part is in subscript format. They are separated by commas, or only the first part exists.
+  The format commands of superscripts and subscripts. The first part is in superscripts format, and the latter part is in subscripts format. They are separated by commas, or only the first part exists.
   \kvsplit{spbcmd+}{super cmds}{sub cmds}
-  Add code to the previous global superscript and subscript format commands.
+  Add code to the previous option \option{spbcmd}.
   \keyval{spbheight}{fixed length}
-  The distance between the superscript baseline and the previous line.
+  The height of the superscript box above the baseline.
   \keyval{spbdepth}{fixed length}
-  The distance between the subscript baseline and the next line.
+  The depth of the subscript box below the baseline.
   \kvsplit{vsep}{super move}{sub move}\Default{0.6ex}
-  The extra vertical distance between superscript and subscript. The front part is the movement amount of the superscript, and the latter part is the movement amount of the subscript. If only the front part means that both are vertically shifted by one-half of the current value.
+  The extra vertical distance between superscripts and subscripts. The front part is the movement amount of the superscripts, and the latter part is the movement amount of the subscripts. If only the front part means that both are vertically shifted by one-half of the current value.
   \keychoice{halign}{\fbox{l},c,r}
-  The alignment of superscript and subscript, which contains \code{l}, \code{c}, and \code{r} parameters respectively for left, center, and right alignment.
+  The alignment of superscripts and subscripts, which contains \code{l}, \code{c}, and \code{r} parameter respectively for left, center, and right alignment.
 \end{options}
 
 \section{Examples of use}
-Here is a list of the three commands, please pay attention to the usage of optional parameters. Note when the horizontal move is negative, the starting point is at the right end of the mark.
+Here is a list of the three commands, please pay attention to the usage of optional parameter. Note when the horizontal move is negative, the starting point is at the right end of the mark.
 \begin{example}
   \defspbstyle{fancy}{cmd=\color{purple}}
   \spbset{spbcmd={\spbifmath{\mathtt}{\ttfamily},\color{blue}}}
@@ -261,7 +264,7 @@
 \end{example}
 
 \subsection{siunitx}
-It can also be used with the \pkg*{siunitx} package to output superscript and subscript in the unit:
+It can also be used with the \pkg*{siunitx} package to output superscripts and subscripts in the unit:
 \begin{example}
   \spbset{spcmd=\spbifmath{}{\color{purple}}}
   \sisetup{text-superscript-command=\super}
@@ -272,13 +275,13 @@
 \end{example}
 
 \subsection{realscripts}
-If the OpenType text font you are using does not have optical sizes, the superscript and subscript may not appear correctly. Loading the \pkg*{realscripts} package before the \pkg*{spbmark} package fixes this behavior.
+If the OpenType text font you are using does not have optical sizes, the superscripts and subscripts may not appear correctly. Loading the \pkg*{realscripts} package before the \pkg*{spbmark} package fixes this behavior.
 \begin{example}[code-only]
   \usepackage{realscripts,spbmark}
 \end{example}
 
 \subsection{altsubsup}
-The \pkg*{altsubsup} package allows to write alternate superscript and subscript in math mode with \code{\^{}}\oarg{mark} and \code{\_{}}\oarg{mark} dimensions. When the package is loaded using the \code{spbmark} option, the superscript and subscript mechanism of \pkg*{spbmark} is used, you can use \cs{defspbstyle} to define its superscript style \code{altsup} and subscript style \code{altsub}.
+The \pkg*{altsubsup} package allows to write alternate superscripts and subscripts in math mode with \code{\^{}}\oarg{mark} and \code{\_{}}\oarg{mark} dimensions. When the package is loaded using the \code{spbmark} option, the superscripts and subscripts mechanism of \pkg*{spbmark} is used, you can use \cs{defspbstyle} to define its superscripts style \code{altsup} and subscripts style \code{altsub}.
 \begin{example}
   \defspbstyle{altsup}{sphmove=-\llastwd,spthiswd=auto,spvmove=1pt}
   $A_[bcd]^[e]B$
@@ -291,13 +294,13 @@
 If you need to use the original definitions of \cs{textsuperscript}, \cs{textsubscript}, \cs{sp} and \cs{sb} after using the \option{text} or \option{math} option, then you can use the following commands:
 \begin{commands}
   \command{spb at textsuperscript@save}[\marg{content}]
-  Save the original definition of the \cs{textsuperscript} command, output superscript in the text mode.
+  Save the original definition of the \cs{textsuperscript} command, output superscripts 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.
+  Save the original definition of the \cs{textsubscript} command, output subscripts in the text mode.
   \command{spb at math@super at save}[\marg{content}]
-  Save the original definition of the \cs{sp} command, output superscript in the math mode.
+  Save the original definition of the \cs{sp} command, output superscripts in the math mode.
   \command{spb at math@sub at save}[\marg{content}]
-  Save the original definition of the \cs{sb} command, output subscript in the math mode.
+  Save the original definition of the \cs{sb} command, output subscripts in the math mode.
 \end{commands}
 
 \section{Known issues}
@@ -309,10 +312,10 @@
   \item Add option \option{math*}: The \code{\^{}} and \code{\_{}} tokens in the math mode are equivalent to the \cs{super} and \cs{sub} commands.
   \end{version}
   \begin{version}[v = 1.46k,date = 2024/06/21]
-  \item Add options \option{spcore} and \option{sbcore}: Set kernel commands for superscript and subscript of text and math modes.
+  \item Add options \option{spcore} and \option{sbcore}: Set kernel commands for superscripts and subscripts of text and math modes.
   \end{version}
 \end{changelog}
 \nocite{*}
-\AddToHook{cmd/printindex/before}{\clearpage}
+% \AddToHook{cmd/printindex/before}{\clearpage}
 
 \end{document}
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty	2024-07-05 21:08:26 UTC (rev 71715)
+++ trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty	2024-07-05 21:08:38 UTC (rev 71716)
@@ -8,8 +8,8 @@
 % The latest version of this license is in
 %   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2018/12/31]
-\RequirePackage{xparse,l3keys2e}
-\ProvidesExplPackage{spbmark}{2024/06/21}{1.46k}
+\RequirePackage{xparse}
+\ProvidesExplPackage{spbmark}{2024/07/04}{1.46l}
   {Customize superscripts and subscripts}
 
 \cs_generate_variant:Nn \box_set_ht:Nn { cv }
@@ -130,7 +130,12 @@
   { \tl_set_eq:NN \fnmarkfont \ftntm at font }
   { \tl_set_eq:NN \fnmarkfont \normalfont }
 
-\ProcessKeysOptions{spbmark/option}
+\cs_if_exist:NTF \ProcessKeyOptions
+  { \ProcessKeyOptions[spbmark/option] }
+  {
+    \RequirePackage{l3keys2e}
+    \ProcessKeysOptions{spbmark/option}
+  }
 
 \tl_new:N \g__spb_mark_case_init_tl
 \cs_new_protected:Npn \spb_local_case_init:nnn #1#2#3



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