texlive[69725] Master/texmf-dist: spbmark (6feb24)

commits+karl at tug.org commits+karl at tug.org
Tue Feb 6 21:34:11 CET 2024


Revision: 69725
          https://tug.org/svn/texlive?view=revision&revision=69725
Author:   karl
Date:     2024-02-06 21:34:11 +0100 (Tue, 06 Feb 2024)
Log Message:
-----------
spbmark (6feb24)

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-06 20:34:02 UTC (rev 69724)
+++ trunk/Master/texmf-dist/doc/latex/spbmark/spbmark.tex	2024-02-06 20:34:11 UTC (rev 69725)
@@ -1,13 +1,14 @@
 \documentclass[load-preamble+]{cnltx-doc}
 
-\usepackage{spbmark,siunitx,setspace,pifont,hologo}
+\usepackage{siunitx,setspace,pifont,hologo}
+\usepackage[spbmark]{altsubsup}
 \usepackage[noto]{newtxmath}
 \setcnltx
   {
     package           = spbmark,
     title             = the spbmark package,
-    version           = v1.46,
-    date              = 2024/02/05,
+    version           = v1.46b,
+    date              = 2024/02/06,
     authors           = Qu Yi,
     info              = Customize superscript and subscript,
     email             = toquyi at 163.com,
@@ -78,7 +79,7 @@
   \command{sub}[\sarg\oarg{kv list}\marg{content}\oarg{kv list}]
   This is a subscript output command. The two \meta{kv list} are equivalent.
 
-  When the horizontal movement distance of the marker is \emph{non-negative}, since the \cs{super} and \cs{sub} commands put the marker in a horizontal box, the horizontal position is staggered when using superscript and subscript \emph{consecutively}, which is a different mechanism than the sequential use of \code{\^{}} and \code{\_} symbols in math mode. The following three commands save the width of the previous marker, use it for negative move of the \option{hmove} option of the next marker, and provide the corresponding alignment.
+  When the horizontal movement distance of the marker is \emph{non-negative}, since the \cs{super} and \cs{sub} commands put the marker in a horizontal box, the horizontal position is staggered when using superscript and subscript \emph{consecutively}, which is a different mechanism than the sequential use of \code{\^{}} and \code{\_{}} symbols in math mode. The following three commands save the width of the previous marker, use it for negative move of the \option{hmove} option of the next marker, and provide the corresponding alignment.
 
   It should be noted that the following commands should save the longer width of the marker, that is, the longer width of the marker in the front, the shorter width of the marker in the back. This is due to the fact that horizontal movement uses a negative distance to leave the marker in a zero-width box state.
   \command{llastwd}\newtag%
@@ -222,6 +223,7 @@
   4A\super{c}[vmove=5pt,hmove=-5.5pt]B\sub[vmove=5pt,hmove=-5pt]{d}AB
 \end{example}
 
+\subsection{siunitx}
 It can also be used with the \pkg*{siunitx} package to output superscript and subscript in the unit:
 \begin{example}
   \unit[mode=math]{kg.m/s\super[vmove=-1pt]{2}} \\
@@ -229,6 +231,20 @@
   \spbset{sbhmove=2pt}\unit[mode=text]{A\sub{b}}
 \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} macro package before the \pkg*{spbmark} macro 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 macro 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}.
+\begin{example}
+  \defspbstyle{altsup}{sphmove=-\llastwd,spvmove=1pt}
+  $A_[bcd]^[e]B$
+\end{example}
+
+\subsection{footnote}
 \pkg*{spbmark} also patches the footer markers for standard document class and \cls*{KOMA-Script}. You can format the footer markers by redefining the \cs{fnmarkfont} command. Note that extra horizontal move does not work with footnote markers.
 
 \section{Developer commands}

Modified: trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty	2024-02-06 20:34:02 UTC (rev 69724)
+++ trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty	2024-02-06 20:34:11 UTC (rev 69725)
@@ -9,7 +9,7 @@
 %   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2018/12/31]
 \RequirePackage{xparse,l3keys2e}
-\ProvidesExplPackage{spbmark}{2024/02/05}{1.46}
+\ProvidesExplPackage{spbmark}{2024/02/06}{1.46b}
   {Customize superscripts and subscripts}
 
 \cs_generate_variant:Nn \box_set_ht:Nn { cv }
@@ -479,10 +479,21 @@
     Alignment~only~supports~l,~c,~and~r. \\
     The~l~parameter~will~be~used~by~default.
   }
-\@ifpackageloaded{easybase}
-  {\ctex_gadd_package_hook:nnn { after } { easybase }}
+\providecommand{\IfPackageLoadedTF}{\@ifpackageloaded}
+\providecommand{\IfFormatAtLeastTF}{\@ifl at t@r\fmtversion}
+\IfPackageLoadedTF{easybase}
+  {\AddToHook{package/easybase/after}}
   {\use:n}
   { \keys_define:nn { } { ctex/style .inherit:n = spbmark/option } }
+\IfFormatAtLeastTF{2021/11/15}
+  {
+    \AddToHook{package/altsubsup/after}
+      {
+        \ifaltsbsp at spbmark
+          \SetAltSubSupCommands{\relax}
+        \else\fi
+      }
+  }{}
 \cs_set_eq:NN \spb \supersub
 \endinput
 %



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