texlive[73054] Master/texmf-dist: spbmark (6dec24)
commits+karl at tug.org
commits+karl at tug.org
Fri Dec 6 23:32:42 CET 2024
Revision: 73054
https://tug.org/svn/texlive?view=revision&revision=73054
Author: karl
Date: 2024-12-06 23:32:42 +0100 (Fri, 06 Dec 2024)
Log Message:
-----------
spbmark (6dec24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/spbmark/README.md
trunk/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf
trunk/Master/texmf-dist/doc/latex/spbmark/spbmark.tex
trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
Modified: trunk/Master/texmf-dist/doc/latex/spbmark/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/spbmark/README.md 2024-12-06 22:32:28 UTC (rev 73053)
+++ trunk/Master/texmf-dist/doc/latex/spbmark/README.md 2024-12-06 22:32:42 UTC (rev 73054)
@@ -1,5 +1,5 @@
# The `spbmark` package
-Customize superscripts and subscripts (v1.46t)
+Customize superscripts and subscripts (v1.46u)
## Abstract
`spbmark` provides three commands `\super`, `\sub` and `\supersub` to improve the layout of superscripts and subscripts which can be adjusted the relative position and format, and can be used in text and math mode.
Modified: trunk/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/spbmark/spbmark.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/spbmark/spbmark.tex 2024-12-06 22:32:28 UTC (rev 73053)
+++ trunk/Master/texmf-dist/doc/latex/spbmark/spbmark.tex 2024-12-06 22:32:42 UTC (rev 73054)
@@ -8,8 +8,8 @@
\setcnltx
{
package = spbmark,
- version = v1.46t,
- date = 2024/10/31,
+ version = v1.46u,
+ date = 2024/12/06,
authors = Qu Yi,
title = \spbmark{} package,
info = Customize superscripts and subscripts,
@@ -181,6 +181,12 @@
\newcommand{\mysp}[2][]{\super[regex=\c{mysb},#1]{#2}}
\newcommand{\mysb}[2][]{\sub[regex=\c{mysp},#1]{#2}}
\end{codehigh}
+ \keychoice{nobox}{true,\fbox{false}}\newtag{New\\v1.46u}%
+ Causes the superscripts or subscripts not to be saved in the box, in which case the offset-related options are invalid. For example, there is a difference in nesting superscripts in math mode.
+\begin{demohigh}
+1A$\super{c\super{d}}$B \\
+2A$\super{c\super[nobox]{d}}$B
+\end{demohigh}
\end{options}
\section{Global control interface}
@@ -287,8 +293,7 @@
1A\super[vmove=0.2ex,hmove=0.2em,cmd=\textcolor{red}]{exam}B \\
2$A\sub[style=fancy,cmd+=\mathsf,mode=math]{exam}B$ \\
3A\supersub[vsep=0.6ex,halign=c]{examsuper}{sub}B \\
-4A\super{c}[vmove=5pt,hmove=-5.5pt]B\sub[vmove=5pt,hmove=-5pt]{d}AB \\
-5A\super{c\super{d}}B
+4A\super{c}[vmove=5pt,hmove=-5.5pt]B\sub[vmove=5pt,hmove=-5pt]{d}AB
\end{demohigh}
\subsection{siunitx}
Modified: trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty 2024-12-06 22:32:28 UTC (rev 73053)
+++ trunk/Master/texmf-dist/tex/latex/spbmark/spbmark.sty 2024-12-06 22:32:42 UTC (rev 73054)
@@ -9,7 +9,7 @@
% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2018/12/31]
\RequirePackage{xparse}
-\ProvidesExplPackage{spbmark}{2024/10/31}{1.46t}
+\ProvidesExplPackage{spbmark}{2024/12/06}{1.46u}
{Customize superscripts and subscripts}
\cs_generate_variant:Nn \box_set_ht:Nn { cv }
@@ -222,7 +222,7 @@
{ \box_move_up:nn {#1} { \box_use:N \g__super_ii_box } }
\cs_new:Npn \spb_box_sub_move_down_ii:n #1
{ \box_move_down:nn {#1} { \box_use:N \g__sub_ii_box } }
-\cs_new:Npn \spb_box_vmove_i:nn #1
+\cs_new:Npn \spb_inner_box_vmove_i:nn #1
{
\str_case:nn {#1}
{
@@ -347,7 +347,9 @@
\NewHookWithArguments{cmd+/sub/after}{2}
\cs_new:Npn \spb_math_print_store_i:nnnn #1#2#3#4
{
- \hbox_gset:cn { g__#1_i_inner_box }
+ \bool_if:NTF \l__spb_nobox_mark_bool
+ { \tl_gset:cn { g__#1_i_nobox_mark_tl } }
+ { \hbox_gset:cn { g__#1_i_inner_box } }
{
#3{
\UseHookWithArguments{spb/#1/before}{2}{#1}{#2}
@@ -448,7 +450,8 @@
spregex .tl_set:N = \l__spb_super_regex_next_tl,
spregex .initial:n = \c{sub}|\c{textsubscript}|\c{sb}|\_,
sbregex .tl_set:N = \l__spb_sub_regex_next_tl,
- sbregex .initial:n = \c{super}|\c{textsuperscript}|\c{sp}|\^
+ sbregex .initial:n = \c{super}|\c{textsuperscript}|\c{sp}|\^,
+ nobox .bool_set:N = \l__spb_nobox_mark_bool
}
\cs_new:Npn \spb_clear_thiswd:n #1
{
@@ -492,9 +495,13 @@
\tl_gset:Nn \g__spb_mark_case_init_tl {#1}
\spb_set:n { ##2,##3,##5 }
\spb_mode_switch:nnn {#1} {##4} { i }
- \spb_content_hbox_set:nn {#1} {##1}
- \spb_ht_dp_assign:nnnn {#1} {#1} { i } { _outer }
- \box_use:c { g__#1_i_outer_box }
+ \bool_if:NTF \l__spb_nobox_mark_bool
+ { \tl_use:c { g__#1_i_nobox_mark_tl } }
+ {
+ \spb_mark_box_set:nn {#1} {##1}
+ \spb_ht_dp_assign:nnnn {#1} {#1} { i } { _outer }
+ \box_use:c { g__#1_i_outer_box }
+ }
\exp_last_unbraced:Nx
\group_end:
{
@@ -505,7 +512,7 @@
}
}
}
-\cs_new_protected:Npn \spb_content_hbox_set:nn #1#2
+\cs_new_protected:Npn \spb_mark_box_set:nn #1#2
{
\dim_gset:Nn \clastwd { (\llastwd + \rlastwd)/2 }
\tl_set:Nn \abs at hmove@i { \dim_abs:v { l__spb_#1_hmove_tl } }
@@ -516,7 +523,7 @@
\hbox_overlap_left:n
{
\hbox_overlap_right:n
- { \spb_box_vmove_i:nn {#1} { \tl_use:c { l__spb_#1_vmove_tl } } }
+ { \spb_inner_box_vmove_i:nn {#1} { \tl_use:c { l__spb_#1_vmove_tl } } }
\skip_horizontal:n { \abs at hmove@i }
}
\IfBooleanT{#2}
@@ -528,7 +535,7 @@
{
\hbox_to_wd:nn
{ \tl_use:c { l__spb_box_#1_wd_i_tl } + \tl_use:c { l__spb_#1_hmove_tl } }
- { \hss\spb_box_vmove_i:nn {#1} { \tl_use:c { l__spb_#1_vmove_tl } } }
+ { \hss\spb_inner_box_vmove_i:nn {#1} { \tl_use:c { l__spb_#1_vmove_tl } } }
}
}
\dim_gset:Nv \llastwd { l__spb_box_#1_wd_i_tl }
More information about the tex-live-commits
mailing list.