summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/spbmark/spbmark.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/spbmark/spbmark.tex')
-rw-r--r--macros/latex/contrib/spbmark/spbmark.tex24
1 files changed, 20 insertions, 4 deletions
diff --git a/macros/latex/contrib/spbmark/spbmark.tex b/macros/latex/contrib/spbmark/spbmark.tex
index 727ee086a7..2c9319118c 100644
--- a/macros/latex/contrib/spbmark/spbmark.tex
+++ b/macros/latex/contrib/spbmark/spbmark.tex
@@ -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@163.com,
@@ -78,7 +79,7 @@ There are currently three commands to set superscript and subscript. Their forma
\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 @@ Here is a list of the three commands, please pay attention to the usage of optio
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 @@ It can also be used with the \pkg*{siunitx} package to output superscript and su
\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}