texlive[71587] Master/texmf-dist: spbmark (22jun24)

commits+karl at tug.org commits+karl at tug.org
Sat Jun 22 22:21:44 CEST 2024


Revision: 71587
          https://tug.org/svn/texlive?view=revision&revision=71587
Author:   karl
Date:     2024-06-22 22:21:44 +0200 (Sat, 22 Jun 2024)
Log Message:
-----------
spbmark (22jun24)

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-06-21 23:41:48 UTC (rev 71586)
+++ trunk/Master/texmf-dist/doc/latex/spbmark/README.md	2024-06-22 20:21:44 UTC (rev 71587)
@@ -1,11 +1,15 @@
-# The spbmark package
+# The `spbmark` package
+Customize superscripts and subscripts (v1.46k)
 
+## 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.
 
 ## License
-
 This work may be distributed and/or modified under the conditions of the CC-BY 4.0 License. The latest version of this license is in https://creativecommons.org/licenses/by/4.0/legalcode
 
 ## Website
+| [Gitee](https://gitee.com/texno3/spbmark) | [Github](https://github.com/texno3/spbmark) | [CTAN](https://ctan.org/pkg/spbmark) |
 
-| [Gitee](https://gitee.com/texno3/spbmark) | [Github](https://github.com/texno3/spbmark) | [CTAN](https://ctan.org/pkg/spbmark) |
\ No newline at end of file
+## Maintainer
+QuYi<br/>
+Email: toquyi at 163.com
\ No newline at end of file

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-06-21 23:41:48 UTC (rev 71586)
+++ trunk/Master/texmf-dist/doc/latex/spbmark/spbmark.tex	2024-06-22 20:21:44 UTC (rev 71587)
@@ -1,6 +1,6 @@
 \documentclass[load-preamble+]{cnltx-doc}
 
-\usepackage{siunitx,setspace,pifont,hologo}
+\usepackage{siunitx,setspace,pifont,hologo,changelog,enumitem}
 \usepackage[spbmark]{altsubsup}
 \usepackage[margin = 1in,marginparwidth = 0.6in,footskip = 0.5in]{geometry}
 \usepackage[noto]{newtxmath}
@@ -7,9 +7,8 @@
 \setcnltx
   {
     package           = spbmark,
-    title             = the spbmark package,
-    version           = v1.46j,
-    date              = 2024/05/19,
+    version           = v1.46k,
+    date              = 2024/06/21,
     authors           = Qu Yi,
     info              = Customize superscript and subscript,
     email             = toquyi at 163.com,
@@ -19,7 +18,6 @@
         \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.
       },
     color-scheme      = blue,
-    title-format      = \huge\bfseries\scshape,
     listings-options  = {numbers = none,gobble = 2,lineskip = 1pt},
     pre-output        = {\parindent = 0em\setstretch{1.3}},
     before-skip       = \smallskipamount,
@@ -43,6 +41,9 @@
 \newnote{\newtag}[1]{\textcolor{red}{#1}}
 \renewcommand{\emph}[1]{\textcolor{red}{#1}}
 \renewcommand{\cnltx at write@lastname}{}
+\setlist{nosep,topsep = \smallskipamount}
+\setlist[description,1]{leftmargin = \parindent}
+\setlist[itemize,1]{leftmargin = *}
 \makeatother
 
 \begin{document}
@@ -71,6 +72,15 @@
   \usepackage[text,foot=true]{spbmark}
   \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.
+  \begin{example}[code-only]
+  \usepackage[spcore=none]{spbmark}
+  \usepackage{graphicx}
+  \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.
 \end{options}
 
 \section{User commands}
@@ -197,7 +207,7 @@
   \keyval{spcmd+}{format cmds}
   Add code to the previous global superscript format commands.
   \keyval{sbcmd}{format cmds}
-  The format commands of subscript. The last command in the code can take an argument, which is a subscript.
+  The format commands of subscript. Similar to the \option{spcmd} option, but for subscript.
   \keyval{sbcmd+}{format cmds}
   Add code to the previous global subcript format commands.
   \keyval{spheight}{fixed length}
@@ -215,7 +225,7 @@
   \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.
   \keyval{sbregex}{regular expression}
-  After the subscript 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.
+  Similar to the \option{spregex} option, but for subscript.
 \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.
@@ -294,6 +304,15 @@
 At present, the vertical and horizontal move are effective for the unit commands in the \pkg*{siunitx} macro package. However, due to the special mechanism that the decimal point is not recognized correctly because it's converted to a space in the \cs*{unit} command, it's recommended to use \code{pt} as the unit of move.
 
 \appendix
+\begin{changelog}[simple]
+  \begin{version}[v = 1.46j,date = 2024/05/19]
+  \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.
+  \end{version}
+\end{changelog}
 \nocite{*}
+\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-06-21 23:41:48 UTC (rev 71586)
+++ trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty	2024-06-22 20:21:44 UTC (rev 71587)
@@ -9,7 +9,7 @@
 %   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2018/12/31]
 \RequirePackage{xparse,l3keys2e}
-\ProvidesExplPackage{spbmark}{2024/05/19}{1.46j}
+\ProvidesExplPackage{spbmark}{2024/06/21}{1.46k}
   {Customize superscripts and subscripts}
 
 \cs_generate_variant:Nn \box_set_ht:Nn { cv }
@@ -32,6 +32,18 @@
 \cs_new_protected:Npn \spb_define:n { \keys_define:nn { ctex/tools } }
 \cs_new_protected:Npn \spb_set:n { \keys_set:nn { ctex/tools } }
 \cs_set_eq:NN \spbset \spb_set:n
+\cs_new_protected:Npn \spb_mark_core_set_trad:n #1
+  {
+    \cs_set:cpn { spb at text#1script at core }
+      { \use:c { spb at text#1script at save } }
+    \cs_set:cpn { spb at math@#1 at core }
+      { \use:c { spb at math@#1 at save } }
+  }
+\cs_new_protected:Npn \spb_mark_core_set_none:n #1
+  {
+    \cs_set:cpn { spb at text#1script at core } { \relax }
+    \cs_set:cpn { spb at math@#1 at core } { \relax }
+  }
 
 \keys_define:nn { spbmark/option }
   {
@@ -43,8 +55,8 @@
       },
     text/false .code:n  =
       {
-        \cs_set:Npn \textsuperscript { \spb at textsuperscript@save }
-        \cs_set:Npn \textsubscript { \spb at textsubscript@save }
+        \cs_set:Npn \textsuperscript { \spb at textsuperscript@core }
+        \cs_set:Npn \textsubscript { \spb at textsubscript@core }
       },
     text .default:n     = true,
     math .choice:,
@@ -55,8 +67,8 @@
       },
     math/false .code:n  =
       {
-        \cs_set:Npn \sp { \spb at math@super at save }
-        \cs_set:Npn \sb { \spb at math@sub at save }
+        \cs_set:Npn \sp { \spb at math@super at core }
+        \cs_set:Npn \sb { \spb at math@sub at core }
       },
     math .default:n     = true,
     foot .choice:,
@@ -71,7 +83,17 @@
     both .meta:n        = { text = #1,math = #1 },
     both .default:n     = true,
     all .meta:n         = { text = #1,math = #1,foot = #1 },
-    all .default:n      = true
+    all .default:n      = true,
+    spcore .choice:,
+    spcore .value_required:n = true,
+    spcore/trad .code:n = \spb_mark_core_set_trad:n { super },
+    spcore/none .code:n = \spb_mark_core_set_none:n { super },
+    spcore .initial:n   = trad,
+    sbcore .choice:,
+    sbcore .value_required:n = true,
+    sbcore/trad .code:n = \spb_mark_core_set_trad:n { sub },
+    sbcore/none .code:n = \spb_mark_core_set_none:n { sub },
+    sbcore .initial:n   = trad
   }
 \char_set_catcode_active:N \~
 \keys_define:nn { spbmark/option }
@@ -314,7 +336,7 @@
       {
         \ensuremath
           {
-            \use:c { spb at math@#1 at save }
+            \use:c { spb at math@#1 at core }
               { \tl_use:c { l__spb_#1_cmd_i_tl }{#2} }
           }
       }
@@ -324,7 +346,7 @@
   {
     \hbox_gset:cn { g__#1_i_inner_box }
       {
-        \use:c { spb at text#1script at save }
+        \use:c { spb at text#1script at core }
           { \tl_use:c { l__spb_#1_cmd_i_tl }{#2} }
       }
     \dim_gset:Nv \rlastwd { l__spb_box_#1_wd_i_tl }
@@ -332,16 +354,16 @@
 \cs_new:Npn \spb_math_print_store_ii:nn #1#2
   {
     \hbox_gset:Nn \g__super_ii_box
-      { \ensuremath{\spb at math@super at save{\l__spb_super_cmd_ii_tl{#1}}} }
+      { \ensuremath{\spb at math@super at core{\l__spb_super_cmd_ii_tl{#1}}} }
     \hbox_gset:Nn \g__sub_ii_box
-      { \ensuremath{\spb at math@sub at save{\l__spb_sub_cmd_ii_tl{#2}}} }
+      { \ensuremath{\spb at math@sub at core{\l__spb_sub_cmd_ii_tl{#2}}} }
   }
 \cs_new:Npn \spb_text_print_store_ii:nn #1#2
   {
     \hbox_gset:Nn \g__super_ii_box
-      { \spb at textsuperscript@save{\l__spb_super_cmd_ii_tl{#1}} }
+      { \spb at textsuperscript@core{\l__spb_super_cmd_ii_tl{#1}} }
     \hbox_gset:Nn \g__sub_ii_box
-      { \spb at textsubscript@save{\l__spb_sub_cmd_ii_tl{#2}} }
+      { \spb at textsubscript@core{\l__spb_sub_cmd_ii_tl{#2}} }
   }
 \cs_set_eq:NN \spbifmath \use_ii:nn
 \cs_new:Npn \spb at ifmathtrue { \cs_set_eq:NN \spbifmath \use_i:nn }
@@ -585,7 +607,7 @@
       {
         \ifaltsbsp at spbmark
           \SetAltSubSupCommands{\relax}
-        \else\fi
+        \fi
       }
   }{}
 \cs_set_eq:NN \spb \supersub



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