summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-12-21 21:46:08 +0000
committerKarl Berry <karl@freefriends.org>2021-12-21 21:46:08 +0000
commit0b0d5b35b498bd04c7b7dc6bc60c931baf445b51 (patch)
treecbabefaae9d8b080675e88b1069fb7bd9ed47a6c /Master
parentc7c088867146fe0f03f16ce078685a9bda733d5f (diff)
spbmark (21dec21)
git-svn-id: svn://tug.org/texlive/trunk@61369 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/spbmark/spbmark.pdfbin70115 -> 70953 bytes
-rw-r--r--Master/texmf-dist/doc/latex/spbmark/spbmark.tex11
-rw-r--r--Master/texmf-dist/tex/latex/spbmark/spbmark.sty9
3 files changed, 16 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf b/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf
index 0dc97fd394d..90254e4b4ee 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 93620fd8a71..12c8cacfd0c 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.2E,
- date = 2021/12/20,
+ version = v1.2F,
+ date = 2021/12/21,
authors = Qu Yi,
info = Customize superscript and subscript,
email = q1jx@foxmail.com,
@@ -67,6 +67,8 @@ There are currently three commands to set superscript and subscript. Their forma
This is a subscript output command. The two \meta{kv list} are equivalent.
\command{supersub}[\oarg{kv list}\marg{super cont}\marg{sub cont}\oarg{kv list}]
This is a command that outputs both superscript and subscript at the same time. You can also use the shorter command \cs{spb} instead of it. The two \meta{kv list} are equivalent.
+ \command{defspbstyle}[\marg{style name}\marg{kv list}]
+ Defines the style of the superscript or subscript used for the \option{style} option.
\command{spbifmath}[\marg{math code}\marg{text code}]
In some cases, \code{math} or \code{text} output modes require different code for format or move. This command can be used when using the \code{match} option or changing the output mode locally, whitch should be used in the move or format options. It can switch the corresponding code according to different output modes.
\end{commands}
@@ -83,6 +85,8 @@ The options common to \meta{kv list} of the three commands are as follows. They
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.
+ \keyval{style}{style name}\Default
+ Use the \meta{style name} defined by the \cs{defspbstyle} command to make it work global or local.
\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}
@@ -137,9 +141,10 @@ The following list of keys control the format of superscript and subscript.
\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 move is negative, the starting point is at the right end of the mark.
\begin{example}
+\defspbstyle{fancy}{cmd=\color{purple}}
\spbset{spbcmd={\spbifmath{\mathtt}{\ttfamily},\color{blue}}}
A\super[vmove=0.2ex,hmove=0.2em,cmd=\textcolor{red}]{exam}B \\
-$A\sub[cmd=\mathsf,mode=math]{exam}B$ \\
+$A\sub[style=fancy,cmd+=\mathsf,mode=math]{exam}B$ \\
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}
diff --git a/Master/texmf-dist/tex/latex/spbmark/spbmark.sty b/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
index 10defa9e25f..3bc3a3dd01b 100644
--- a/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
+++ b/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
@@ -9,7 +9,7 @@
% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2018/12/31]
\RequirePackage{xparse,l3keys2e}
-\ProvidesExplPackage{spbmark}{2021/12/20}{1.2E}
+\ProvidesExplPackage{spbmark}{2021/12/21}{1.2F}
{Customize superscripts and subscripts}
\cs_generate_variant:Nn \dim_max:nn { VV }
@@ -53,6 +53,11 @@
{ supersub } {#4}
}
}
+\cs_new_protected:Npn \defspbstyle #1#2
+ {
+ \spb_define:n
+ { style/#1 .code:n = \keys_set:nn { ctex/style } {#2} }
+ }
\spb_define:n
{
spvmove .tl_set:N = \l__spb_super_vmove_tl,
@@ -105,6 +110,8 @@
vsep .initial:n = 0.6ex,
halign .tl_set:N = \l__spb_supersub_halign_tl,
halign .initial:n = l,
+ style .choice:,
+ style .value_required:n = true,
mode .tl_set:N = \l__spb_mode_value_tl,
mode .initial:n = match
}