summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-10-29 21:32:57 +0000
committerKarl Berry <karl@freefriends.org>2021-10-29 21:32:57 +0000
commit0415899d65ffc7c9dcaef524b3a3f4643843e990 (patch)
treeead04fbf28044cffc2ed39481079f279dde6a5ca /Master/texmf-dist
parent037414ddfffaba15f5108179a25307b0e4c05095 (diff)
spbmark (29oct21)
git-svn-id: svn://tug.org/texlive/trunk@60893 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/spbmark/spbmark.pdfbin66032 -> 67357 bytes
-rw-r--r--Master/texmf-dist/doc/latex/spbmark/spbmark.tex14
-rw-r--r--Master/texmf-dist/tex/latex/spbmark/spbmark.sty47
3 files changed, 39 insertions, 22 deletions
diff --git a/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf b/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf
index f42d42ea4a5..6031d8553bc 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 fc6071aedd1..73019e147ed 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.1D,
- date = 2021/10/16,
+ version = v1.1F,
+ date = 2021/10/29,
authors = Qu Yi,
info = Customize superscript and subscript,
email = q1jx@foxmail.com,
@@ -44,8 +44,12 @@
\begin{options}
\opt{ctex}\Default!
This option works with the C\TeX{} document class used by simplified Chinese users, there's actually no functional change. Adding path \module*{style} to \cs*{ctexset} command, which is equivalent to using \cs{spbset}.
- \keybool{newsupb}\Default{true}
- \option{newsupb} is a boolean option with a default value of true that redefines the \LaTeX{} kernel commands to cause \cs{sp} and \cs{textsuperscript} are equivalent to \cs{super} command, and \cs{sb} and \cs{textsubscript} are equivalent to \cs{sub} command.
+ \keychoice{newsupb}{text,math,foot,all}\Default
+ \option{newsupb} is a compound option that can select multiple values and will redefine the subscript commands of the \LaTeX{} kernel. \code{text} stands for \cs{textsuperscript} and \cs{textsubscript} are equivalent to the \cs{super} and \cs{sub} commands. \code{math} indicates that \cs{sp} and \cs{sb} are equivalent to the \cs{super} and \cs{sub} commands. \code{foot} will make the format of the footnote mark match the superscript offsets and format of the \cs{spbset} global setting. \code{all} will selects all previous three values at the same time.
+ \begin{example}[code-only]
+ \usepackage[newsupb = {text,math,foot}]{spbmark}
+ \usepackage[newsupb = all]{spbmark}
+ \end{example}
\end{options}
\section{User commands}
@@ -130,7 +134,7 @@ It can also be used with the \pkg*{siunitx} package to output superscript and su
\begin{example}
\unit[mode = math]{kg.m/s\super*[-1pt]{2}} \\
\qty[mode = text]{30}{A\supersub{b}{c}[1pt](\color{red})} \\
-\spbset{sub-hshift = 2pt}\unit[mode = text]{A_b}
+\spbset{sub-hshift = 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.
diff --git a/Master/texmf-dist/tex/latex/spbmark/spbmark.sty b/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
index 5a887c2f99d..8ed460d1b83 100644
--- a/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
+++ b/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
@@ -9,21 +9,27 @@
% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2018/12/31]
\RequirePackage{xparse,l3keys2e}
-\ProvidesExplPackage{spbmark}{2021/10/16}{1.1D}
+\ProvidesExplPackage{spbmark}{2021/10/29}{1.1F}
{Customize superscripts and subscripts}
\cs_new_protected:Npn \spb_define:n { \keys_define:nn { spbmark } }
\cs_new_protected:Npn \spbset { \keys_set:nn { spbmark } }
+\bool_new:N \l_spb_newsupb_text_bool
+\bool_new:N \l_spb_newsupb_math_bool
+\bool_new:N \l_spb_newsupb_foot_bool
+\bool_new:N \l_spb_newsupb_all_bool
+
\keys_define:nn { spbmark/option }
{
- ctex .code:n =
+ ctex .code:n =
{
\cs_set:Npn \spb_define:n { \keys_define:nn { ctex/style } }
\cs_set:Npn \spbset { \keys_set:nn { ctex/style } }
},
- newsupb .bool_set:N = \l__spb_new_supersub_bool,
- newsupb .default:n = true,
- newsupb .initial:n = true
+ newsupb .multichoices:nn =
+ { text,math,foot,all }
+ { \bool_set_true:c { l_spb_newsupb_#1_bool } },
+ newsupb .default:n = all
}
\ProcessKeysOptions{spbmark/option}
@@ -254,21 +260,28 @@
The~l~parameter~will~be~used~by~default.
}
-\bool_if:NT \l__spb_new_supersub_bool
+\bool_if:NT \l_spb_newsupb_all_bool
{
- \clist_map_inline:nn
- {
- { sp,sb },
- { textsuperscript,textsubscript }
- }
- {
- \cs_set_eq:cN { \clist_item:nn {#1} { 1 } } \super
- \cs_set_eq:cN { \clist_item:nn {#1} { 2 } } \sub
- }
+ \bool_set_true:N \l_spb_newsupb_text_bool
+ \bool_set_true:N \l_spb_newsupb_math_bool
+ \bool_set_true:N \l_spb_newsupb_foot_bool
+ }
+\bool_if:NT \l_spb_newsupb_text_bool
+ {
+ \cs_set_eq:NN \textsuperscript \super
+ \cs_set_eq:NN \textsubscript \sub
+ }
+\bool_if:NT \l_spb_newsupb_math_bool
+ {
+ \cs_set_eq:NN \sp \super
+ \cs_set_eq:NN \sb \sub
+ }
+\bool_if:NT \l_spb_newsupb_foot_bool
+ {
+ \cs_set:Npn \@makefnmark
+ { \hbox:n { \fnmarkfont\super{\@thefnmark} } }
}
\cs_set_eq:NN \spb \supersub
-\cs_set:Npn \@makefnmark
- { \hbox:n { \fnmarkfont\super{\@thefnmark}[0pt] } }
\tl_if_exist:NTF \ftntm@font
{ \tl_set_eq:NN \fnmarkfont \ftntm@font }
{ \tl_set_eq:NN \fnmarkfont \normalfont }