summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/spbmark
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-12-18 20:56:50 +0000
committerKarl Berry <karl@freefriends.org>2021-12-18 20:56:50 +0000
commitf4c64624856e899e9cacb93d7e957fb2f7d4768e (patch)
tree4c06222c3056906030e35f6831f9b40dfa1ba809 /Master/texmf-dist/doc/latex/spbmark
parent5f692b0c97fc156abcb2eb1bb22cb7d3b5e17ed5 (diff)
spbmark (18dec21)
git-svn-id: svn://tug.org/texlive/trunk@61342 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/spbmark')
-rw-r--r--Master/texmf-dist/doc/latex/spbmark/spbmark.pdfbin68315 -> 69960 bytes
-rw-r--r--Master/texmf-dist/doc/latex/spbmark/spbmark.tex84
2 files changed, 46 insertions, 38 deletions
diff --git a/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf b/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf
index 0ba9784d340..07b2e984d43 100644
--- a/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf
+++ b/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/spbmark/spbmark.tex b/Master/texmf-dist/doc/latex/spbmark/spbmark.tex
index a8f74d041b2..8f9ed7f08d9 100644
--- a/Master/texmf-dist/doc/latex/spbmark/spbmark.tex
+++ b/Master/texmf-dist/doc/latex/spbmark/spbmark.tex
@@ -6,8 +6,8 @@
{
package = spbmark,
title = the spbmark package,
- version = v1.2B,
- date = 2021/12/16,
+ version = v1.2C,
+ date = 2021/12/18,
authors = Qu Yi,
info = Customize superscript and subscript,
email = q1jx@foxmail.com,
@@ -47,7 +47,7 @@ The following macro package options will redefine the scripts commands of the \L
\keybool{math}\Default{false}
\cs{sp} and \cs{sb} are equivalent to the \cs{super} and \cs{sub} commands.
\keybool{foot}\Default{false}
- The format of the footnote mark match the superscript offsets and format of the \cs{spbset} global setting.
+ The format of the footnote mark match the superscript move and format of the \cs{spbset} global setting.
\opt{both}\Default!
The values of \option{text} and \option{math} two options are \code{true} at the same time.
\opt{all}\Default!
@@ -71,14 +71,16 @@ There are currently three commands to set superscript and subscript. Their forma
The optional parameter \splitmeta{height}{depth} generally does not need to be used. The \meta{height} and \meta{depth} are separated by commas. Only the front part indicates the \meta{height} of the superscript or subscript, and only the back part indicates the \meta{depth}.
-The options common to \meta{kv list} of the three commands are as follows. They can be used in \meta{key-value list} for the \cs{spbset} command. If \option{vshift}, \option{hshift} and \option{cmd} are used in the \cs{spbset} command, it is set according to the type of the previous nearest command.
+The options common to \meta{kv list} of the three commands are as follows. They can be used in \meta{key-value list} for the \cs{spbset} command. If \option{vmove}, \option{hmove} and \option{cmd} are used in the \cs{spbset} command, it is set according to the type of the previous nearest command.
\begin{options}
- \keyval{vshift}{fixed length}\Default{0pt}
- Vertical shift of superscript or subscript. Represents the vertical distance \option{vsep} between superscript and subscript in the superscript and subscript commands.
- \keyval{hshift}{fixed length}\Default{0pt}
- Horizontal shift of superscript or subscript. Represents the common shift in the superscript and subscript commands.
+ \keyval{vmove}{fixed length}\Default{0pt}
+ Vertical move of superscript or subscript. Represents the vertical distance \option{vsep} between superscript and subscript in the superscript and subscript commands.
+ \keyval{hmove}{fixed length}\Default{0pt}
+ Horizontal move of superscript or subscript. Represents the common move in the superscript and subscript commands.
\keyval{cmd}{format cmds}\Default
- The format command 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.
+ 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}\Default
+ Add code to the previous global superscript or subscript format commands.
\keychoice{mode}{text,math,match}\Default{match}
The mode of superscript or subscript output can be \code{text} or \code{math} mode. The \code{match} option automatically matches output modes according to the current mode.
\end{options}
@@ -92,56 +94,62 @@ The options common to \meta{kv list} of the three commands are as follows. They
The following list of keys control the format both of superscript or subscript.
\begin{options}
- \keyval{spvshift}{fixed length}\Default{0pt}
- Extra vertical shift of the superscript.
- \keyval{sphshift}{fixed length}\Default{0pt}
- Extra horizontal shift of the superscript.
- \keyval{sbvshift}{fixed length}\Default{0pt}
- Extra vertical shift of the subscript.
- \keyval{sbhshift}{fixed length}\Default{0pt}
- Extra horizontal shift of the subscript.
- \opt{nohshift}\Default!
- Cancel the horizontal offset of superscript and subscript at the same time.
- \opt{novshift}\Default!
- Cancel the vertical offset of superscript and subscript at the same time.
+ \keyval{spvmove}{fixed length}\Default{0pt}
+ Extra vertical move of the superscript.
+ \keyval{sphmove}{fixed length}\Default{0pt}
+ Extra horizontal move of the superscript.
+ \keyval{sbvmove}{fixed length}\Default{0pt}
+ Extra vertical move of the subscript.
+ \keyval{sbhmove}{fixed length}\Default{0pt}
+ Extra horizontal move of the subscript.
+ \opt{nohmove}\Default!
+ Cancel the horizontal move of superscript and subscript at the same time.
+ \opt{novmove}\Default!
+ Cancel the vertical move of superscript and subscript at the same time.
\keyval{spcmd}{format cmds}\Default
- Control the format of superscript, the last command in the code can take an argument, which is a superscript.
+ The format commands of superscript. The last command in the code can take an argument, which is a superscript.
+ \keyval{spcmd+}{format cmds}\Default
+ Add code to the previous global superscript format commands.
\keyval{sbcmd}{format cmds}\Default
- Control the format of subscript, the last command in the code can take an argument, which is a subscript.
+ The format commands of subscript. The last command in the code can take an argument, which is a subscript.
+ \keyval{sbcmd+}{format cmds}\Default
+ Add code to the previous global subcript format commands.
\end{options}
-If \option{sphshift} is positive, the superscript or subscript moves to the right, and if it is negative, it moves to the left. However, for superscript, if \option{spvshift} is positive, the superscript moves up, and if spvshift is negative, it moves down. For subscripts, if \option{spvshift} is positive, the subscript moves down, and if spvshift is negative, it moves up.
+If \option{sphmove} is positive, the superscript or subscript moves to the right, and if it is negative, it moves to the left. However, for superscript, if \option{spvmove} is positive, the superscript moves up, and if spvmove is negative, it moves down. For subscripts, if \option{spvmove} is positive, the subscript moves down, and if spvmove is negative, it moves up.
The following list of keys control the format of superscript and subscript.
\begin{options}
- \keyval{spbhshift}{fixed length}\Default{0pt}
- Extra vertical shift of the superscript and the subscript.
+ \keyval{spbhmove}{fixed length}\Default{0pt}
+ Extra vertical move of the superscript and the subscript.
\kvsplit{spbcmd}{super cmds}{sub cmds}\Default
- Control the format of superscript or 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.
- \keyval{vsep}{fixed length}\Default{0.3ex}
- The distance between superscript and subscript, its default value is \code{0.3ex}.
+ 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.
+ \kvsplit{spbcmd+}{super cmds}{sub cmds}\Default
+ Add code to the previous global superscript and subscript format commands.
+ \keyval{vsep}{fixed length}\Default{0.6ex}
+ The vertical distance between superscript and subscript.
\keychoice{halign}{l,c,r}\Default{l}
The alignment of superscript and subscript, which contains \code{l}, \code{c}, and \code{r} parameters 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 offset 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 parameters. Note when the horizontal move is negative, the starting point is at the right end of the mark.
\begin{example}
\spbset{spbcmd={\ttfamily,\color{blue}}}
-A\super[vshift=0.2ex,hshift=0.2em,cmd=\textcolor{red}]{exam}B \\
+A\super[vmove=0.2ex,hmove=0.2em,cmd=\textcolor{red}]{exam}B \\
$A\sub[cmd=\mathsf,mode=math]{exam}B$ \\
-A\supersub[vsep=0.3ex,halign=c]{examsuper}{sub}B \\
-A\super{c}[vshift=5pt,hshift=-1.5pt]B\sub[vshift=5pt,hshift=-1pt]{d}AB
+A\supersub[vsep=0.6ex,halign=c]{examsuper}{sub}B \\
+A\super{c}[vmove=5pt,hmove=-5.5pt]B\sub[vmove=5pt,hmove=-5pt]{d}AB
\end{example}
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[vshift=-1pt]{2}} \\
-\qty[mode=text]{30}{A\supersub[hshift=1pt,cmd=\color{red}]{b}{c}} \\
-\spbset{sbhshift=2pt}\unit[mode=text]{A\sub{b}}
+\unit[mode=math]{kg.m/s\super[vmove=-1pt]{2}} \\
+\qty[mode=text]{30}{A\supersub[hmove=1pt,cmd=\color{red}]{b}{c}} \\
+\spbset{sbhmove=2pt}\unit[mode=text]{A\sub{b}}
\end{example}
-\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 shift does not work with footnote markers.
+\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}
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:
@@ -157,7 +165,7 @@ If you need to use the original definitions of \cs{textsuperscript}, \cs{textsub
\end{commands}
\section{Known issues}
-At present, the vertical and horizontal offsets 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 offset.
+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.
\nocite{*}