From 4b21bd421eed56bd327acd7774ab8f8ea353682e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 6 Feb 2024 20:34:11 +0000 Subject: spbmark (6feb24) git-svn-id: svn://tug.org/texlive/trunk@69725 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/spbmark/spbmark.pdf | Bin 86873 -> 89117 bytes Master/texmf-dist/doc/latex/spbmark/spbmark.tex | 24 ++++++++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) (limited to 'Master/texmf-dist/doc') diff --git a/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf b/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf index bd7701a44a8..90e46b31bf6 100644 Binary files a/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf and b/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf differ diff --git a/Master/texmf-dist/doc/latex/spbmark/spbmark.tex b/Master/texmf-dist/doc/latex/spbmark/spbmark.tex index 727ee086a7a..2c9319118cc 100644 --- a/Master/texmf-dist/doc/latex/spbmark/spbmark.tex +++ b/Master/texmf-dist/doc/latex/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} -- cgit v1.2.3