summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/spbmark/spbmark.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/spbmark/spbmark.dtx')
-rw-r--r--macros/latex/contrib/spbmark/spbmark.dtx24
1 files changed, 14 insertions, 10 deletions
diff --git a/macros/latex/contrib/spbmark/spbmark.dtx b/macros/latex/contrib/spbmark/spbmark.dtx
index 87e40645db..33498e535e 100644
--- a/macros/latex/contrib/spbmark/spbmark.dtx
+++ b/macros/latex/contrib/spbmark/spbmark.dtx
@@ -21,9 +21,9 @@
%</driver>
% \fi
%
-% \title{\pkg{spbmark} -- Superscript and subscript of text}
+% \title{\pkg{spbmark} -- Customize superscripts and subscripts}
% \author{Qu Yi}
-% \date{2021/06/30\hskip 1em\relax v1.01\thanks{\url{https://github.com/texl3/spbmark}}}
+% \date{2021/07/22\hskip 1em\relax v1.02\thanks{\url{https://github.com/texl3/spbmark}}}
%
% \maketitle
% \begin{abstract}
@@ -60,7 +60,7 @@
% The \meta{code} is used to format superscripts and subscripts, and can insert commands such as fonts or colors. The last command in the code can take an argument, which is either a superscript or a subscript.
%
% \begin{function}[added = 2021-06-30]{\sp,\sb,\spb,\textsuperscript,\textsubscript}
-% Except for the \tn{spb} command which is equivalent to \tn{supersub}, the others are \LaTeX{} kernel commands. If you use the \texttt{newsupb} package options then they will be redefined to make the command shorter, see section \ref{sec:macro package options}.
+% Except for the \tn{spb} command which is equivalent to \tn{supersub}, the others are \LaTeX{} kernel commands. If you use the \texttt{newsupb} package option then they will be redefined to make the command shorter, see section \ref{sec:macro package options}.
%
% If you need to use the original definitions of \tn{textsuperscript} and \tn{textsubscript}, then \tn{spb@textsuperscript@save} and \tn{spb@textsubscript@save} will be available. If you need to use the original definitions of \tn{sp} and \tn{sb}, then \tn{spb@sp@save} and \tn{spb@sb@save} will be available.
% \end{function}
@@ -136,7 +136,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2018/12/31]
\RequirePackage{xparse,l3keys2e}
-\ProvidesExplPackage{spbmark}{2021/06/30}{1.01}
+\ProvidesExplPackage{spbmark}{2021/07/22}{1.02}
{Customize superscripts and subscripts}
\cs_new_protected:Npn \spb_define:n { \keys_define:nn { spbmark } }
@@ -222,12 +222,16 @@
}
{
\IfBooleanTF{##1}
- {\spb_tmp_hboxa_set:n { $##4{\spb_math:nn {#1} {##5}}$ }}
{
+ \spb_tmp_hboxa_set:n
+ { \ensuremath{##4{\spb_math:nn {#1} {##5}}} }
+ }{
\mode_if_math:TF
- { \spb_tmp_hboxa_set:n { $##4{\spb_math:nn {#1} {##5}}$ } }
{
\spb_tmp_hboxa_set:n
+ { \ensuremath{##4{\spb_math:nn {#1} {##5}}} }
+ }{
+ \spb_tmp_hboxa_set:n
{ ##4{\use:c { spb@text#1script@save }{##5}} }
}
}
@@ -245,13 +249,13 @@
{
\IfBooleanTF{#1}
{
- \spb_tmp_hboxa_set:n { $#4{\spb@sp@save{#5}}$ }
- \spb_tmp_hboxb_set:n { $#8{\spb@sb@save{#6}}$ }
+ \spb_tmp_hboxa_set:n { \ensuremath{#4{\spb@sp@save{#5}}} }
+ \spb_tmp_hboxb_set:n { \ensuremath{#8{\spb@sb@save{#6}}} }
}{
\mode_if_math:TF
{
- \spb_tmp_hboxa_set:n { $#4{\spb@sp@save{#5}}$ }
- \spb_tmp_hboxb_set:n { $#8{\spb@sb@save{#6}}$ }
+ \spb_tmp_hboxa_set:n { \ensuremath{#4{\spb@sp@save{#5}}} }
+ \spb_tmp_hboxb_set:n { \ensuremath{#8{\spb@sb@save{#6}}} }
}
{
\spb_tmp_hboxa_set:n { #4{\spb@textsuperscript@save{#5}} }