diff options
author | Norbert Preining <norbert@preining.info> | 2024-12-09 03:03:06 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-12-09 03:03:06 +0000 |
commit | c6f62b747db710a4daa4a422ac4f125847c88ac4 (patch) | |
tree | 83a6b0f722e218ceb153871417c9ec5428f65ce5 /macros/latex | |
parent | 138526c38632d026b86e27a83962c72c74793c94 (diff) |
CTAN sync 202412090302
Diffstat (limited to 'macros/latex')
-rw-r--r-- | macros/latex/contrib/spbmark/README.md | 2 | ||||
-rw-r--r-- | macros/latex/contrib/spbmark/spbmark.pdf | bin | 92476 -> 92371 bytes | |||
-rw-r--r-- | macros/latex/contrib/spbmark/spbmark.sty | 17 | ||||
-rw-r--r-- | macros/latex/contrib/spbmark/spbmark.tex | 20 |
4 files changed, 23 insertions, 16 deletions
diff --git a/macros/latex/contrib/spbmark/README.md b/macros/latex/contrib/spbmark/README.md index d6bf429485..3792fd31de 100644 --- a/macros/latex/contrib/spbmark/README.md +++ b/macros/latex/contrib/spbmark/README.md @@ -1,5 +1,5 @@ # The `spbmark` package -Customize superscripts and subscripts (v1.46v) +Customize superscripts and subscripts (v1.46w) ## 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. diff --git a/macros/latex/contrib/spbmark/spbmark.pdf b/macros/latex/contrib/spbmark/spbmark.pdf Binary files differindex ff659aed99..0c7a6f7ffd 100644 --- a/macros/latex/contrib/spbmark/spbmark.pdf +++ b/macros/latex/contrib/spbmark/spbmark.pdf diff --git a/macros/latex/contrib/spbmark/spbmark.sty b/macros/latex/contrib/spbmark/spbmark.sty index 85238242b5..2e4a13bf4c 100644 --- a/macros/latex/contrib/spbmark/spbmark.sty +++ b/macros/latex/contrib/spbmark/spbmark.sty @@ -9,7 +9,7 @@ % https://creativecommons.org/licenses/by/4.0/legalcode \NeedsTeXFormat{LaTeX2e}[2018/12/31] \RequirePackage{xparse} -\ProvidesExplPackage{spbmark}{2024/12/06}{1.46v} +\ProvidesExplPackage{spbmark}{2024/12/08}{1.46w} {Customize superscripts and subscripts} \cs_generate_variant:Nn \box_set_ht:Nn { cv } @@ -136,14 +136,19 @@ } \tl_new:N \g__spb_mark_case_init_tl +\bool_new:N \l__spb_mark_at_local_bool \cs_new_protected:Npn \spb_local_case_init:nnn #1#2#3 { - \str_case:Vn \g__spb_mark_case_init_tl + \bool_if:NTF \l__spb_mark_at_local_bool { - { super } {#1} - { sub } {#2} - { supersub } {#3} + \str_case:Vn \g__spb_mark_case_init_tl + { + { super } {#1} + { sub } {#2} + { supersub } {#3} + } } + { #1#2#3 } } \NewDocumentCommand{\spb@both@vsep@assign} {>{\SplitArgument{1}{,}}m} @@ -491,6 +496,7 @@ \exp_args:Nc \NewDocumentCommand {#1}{sO{}O{}mO{}} { \group_begin: + \bool_set_true:N \l__spb_mark_at_local_bool \mode_leave_vertical: \tl_gset:Nn \g__spb_mark_case_init_tl {#1} \spb_set:n { ##2,##3,##5 } @@ -556,6 +562,7 @@ \NewDocumentCommand{\supersub}{sO{}mmO{}} { \group_begin: + \bool_set_true:N \l__spb_mark_at_local_bool \mode_leave_vertical: \tl_gset:Nn \g__spb_mark_case_init_tl { supersub } \spb_set:n {#2,#5} diff --git a/macros/latex/contrib/spbmark/spbmark.tex b/macros/latex/contrib/spbmark/spbmark.tex index 72bf9039ac..990770ed60 100644 --- a/macros/latex/contrib/spbmark/spbmark.tex +++ b/macros/latex/contrib/spbmark/spbmark.tex @@ -7,8 +7,8 @@ \setcnltx { package = spbmark, - version = v1.46v, - date = 2024/12/06, + version = v1.46w, + date = 2024/12/08, authors = Qu Yi, title = \spbmark{} package, info = Customize superscripts and subscripts, @@ -97,7 +97,7 @@ The following macro package options will redefine the script commands of the \La \section{User commands} \label{sec:user commands} -There are currently three commands to print superscripts and subscripts. Their format can be set locally using the optional parameter of the command, or set globally using a key-value list, see Section \ref{sec:global control interface}. +There are currently three commands to print superscripts and subscripts. Their format can be set locally using the optional parameter of the command, or set globally using a \meta{key-value list}, see Section \ref{sec:global control interface}. \begin{commands} \command{super}[\sarg\oarg{kv list}\marg{content}\oarg{kv list}] This is a superscript output command. The two \meta{kv list} are equivalent. @@ -154,8 +154,12 @@ There are currently three commands to print superscripts and subscripts. Their f \end{demohigh} \end{commands} -The options common to \meta{kv list} of the three commands are as follows. They can also be used in \meta {key-value list} of the \cs{spbset} command. In this situation, the symbol \sface{} before options indicates that they will be set according to the type of the previous most recent command. The symbol \hface{} before options indicates that they are invalid for the \cs{supersub} command. +The options common to \meta{kv list} of the three commands are as follows. These options can also be used in \meta {key-value list} of the \cs{spbset} command to represent the simultaneous setting of three commands. The symbol \hface{} before options indicates that they are invalid for the \cs{supersub} command. \begin{options} + \keyval{style}{style name} + Use the \meta{style name} defined by the \cs{defspbstyle} command to make it work global or local. + \keychoice{mode}{text,math,\fbox{match}} + The mode of superscripts or subscripts output can be \code{text} or \code{math} mode. The \code{match} option automatically matches output modes according to the current mode. \keyval{vmove}{fixed length}\Default{0pt} Vertical move of superscripts or subscripts. Represents the extra vertical distance \option{vsep} between superscript and subscript in the \cs{supersub} command. The vertical movement starts at the marker horizontal baseline position. \keyval{hmove}{fixed length}\Default{0pt} @@ -165,7 +169,7 @@ The options common to \meta{kv list} of the three commands are as follows. They 2A\supersub[vsep={3pt,6pt-2bp}]{examsuper}{sub} \end{demohigh} \keyval{cmd}{format cmds} - The format commands of superscripts or subscripts. The last command can take a parameter, which accepts superscript or subscript. Represents the format \option{spbcmd} of superscript and subscript in the \cs{supersub} command. + The format commands of superscripts or subscripts. The last command can take a parameter, which accepts superscript or subscript. Represents the format option \option{spbcmd} of superscript and subscript in the \cs{supersub} command. \keyval{cmd+}{format cmds} Add code to the previous option \option{cmd}. \keyval{height}{fixed length} @@ -187,11 +191,7 @@ The options common to \meta{kv list} of the three commands are as follows. They \newcommand{\mysp}[2][]{\super[regex=\c{mysb},#1]{#2}} \newcommand{\mysb}[2][]{\sub[regex=\c{mysp},#1]{#2}} \end{codehigh} - \keyval{style}{style name}\dtag[\sface] - Use the \meta{style name} defined by the \cs{defspbstyle} command to make it work global or local. - \keychoice{mode}{text,math,\fbox{match}}\dtag[\sface] - The mode of superscripts or subscripts output can be \code{text} or \code{math} mode. The \code{match} option automatically matches output modes according to the current mode. - \keychoice{nobox}{true,\fbox{false}}\dtag[\sface\hface]\newtag{New\\v1.46v}% + \keychoice{nobox}{true,\fbox{false}}\dtag\newtag{New\\v1.46v}% 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 \\ |