texlive[62448] branches/branch2021.final/Master: easybook, spbmark

commits+karl at tug.org commits+karl at tug.org
Sat Mar 5 22:07:12 CET 2022


Revision: 62448
          http://tug.org/svn/texlive?view=revision&revision=62448
Author:   karl
Date:     2022-03-05 22:07:12 +0100 (Sat, 05 Mar 2022)
Log Message:
-----------
easybook, spbmark (5mar22) (branch)

Modified Paths:
--------------
    branches/branch2021.final/Master/texmf-dist/doc/latex/easybook/README.md
    branches/branch2021.final/Master/texmf-dist/doc/latex/easybook/easybook.pdf
    branches/branch2021.final/Master/texmf-dist/doc/latex/easybook/easybook.tex
    branches/branch2021.final/Master/texmf-dist/doc/latex/spbmark/README.md
    branches/branch2021.final/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf
    branches/branch2021.final/Master/texmf-dist/doc/latex/spbmark/spbmark.tex
    branches/branch2021.final/Master/texmf-dist/source/latex/easybook/easybook.dtx
    branches/branch2021.final/Master/texmf-dist/tex/latex/easybook/easybase.sty
    branches/branch2021.final/Master/texmf-dist/tex/latex/easybook/easybook.cls
    branches/branch2021.final/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg
    branches/branch2021.final/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
    branches/branch2021.final/Master/tlpkg/bin/c2lx

Modified: branches/branch2021.final/Master/texmf-dist/doc/latex/easybook/README.md
===================================================================
--- branches/branch2021.final/Master/texmf-dist/doc/latex/easybook/README.md	2022-03-05 21:06:29 UTC (rev 62447)
+++ branches/branch2021.final/Master/texmf-dist/doc/latex/easybook/README.md	2022-03-05 21:07:12 UTC (rev 62448)
@@ -1,6 +1,6 @@
 # Easybook document class
 
-Easybook is a pure academic template created based on the ctexbook book document class. It also has the functions of book and article document class. Combined with the general framework design of the dissertation of many universities in China, providing multiple commands and interfaces allows users to easily customize the thesis template. Its basic macro package easybase can also be used with CTeX and standard document classes.
+`easybook` is a pure academic template created based on the `ctexbook` book document class. It also has the functions of book and article document class. Combined with the general framework design of the dissertation of many universities in China, providing multiple commands and interfaces allows users to easily customize the thesis template. Its basic macro package `easybase` can also be used with `ctex` and standard document classes.
 
 ## License
 

Modified: branches/branch2021.final/Master/texmf-dist/doc/latex/easybook/easybook.pdf
===================================================================
(Binary files differ)

Modified: branches/branch2021.final/Master/texmf-dist/doc/latex/easybook/easybook.tex
===================================================================
--- branches/branch2021.final/Master/texmf-dist/doc/latex/easybook/easybook.tex	2022-03-05 21:06:29 UTC (rev 62447)
+++ branches/branch2021.final/Master/texmf-dist/doc/latex/easybook/easybook.tex	2022-03-05 21:07:12 UTC (rev 62448)
@@ -21,8 +21,8 @@
     name            = easybook,
     color-scheme    = blue,
     title           = EASYBOOK使用手册,
-    version         = v1.638,
-    date            = 2022/03/04,
+    version         = v1.639,
+    date            = 2022/03/05,
     authors         = 瞿毅,
     info            = 简便地排版中文学位论文或书籍,
     email           = q1jx at foxmail.com,
@@ -1172,15 +1172,15 @@
 
 \subsection{图表题注}
 \begin{commands}
-  \command*{captionsetup}[\oarg{题注类型}\marg{键值列表}]
+  \command*{captionsetup}[\oarg{条目名}\marg{键值列表}]
   这是 \pkg*{caption} 宏包的接口命令,\meta{键值列表} 提供多个选项更改图表题注的格式。题注主要由三部分组成:标题标签即图表名与题注编号的组合,标题文本本身通常是内容的简短描述,以及将文本与标签分开的题注分隔符。可以在导言区设置整体格式,也可以在正文使用局部更改格式。
 \end{commands}
 
 \begin{commands}\noitemsep
   \command{caption}[\sarg\oarg{目录标题}\marg{标题}]\default{}
-  \command{captionof}[\sarg\marg{题注类型}\oarg{目录标题}\marg{标题}]\default{}
-  \command{bicaption}[\sarg\oarg{目录标题1}\marg{标题2}\oarg{目录标题1}\marg{标题2}]
-  题注命令 \cs{caption} 用于在图表上下方插入题注,需要在浮动体环境 \env*{figure} 和 \env*{table} 中使用,在浮动环境外可以使用 \cs{captionof} 命令,第一个参数指定题注类型。\cs{bicaption} 命令可以实现中英文双语题注,需要在导言区载入 \pkg*{bicaption} 宏包,具体用法见说明文档。
+  \command{captionof}[\sarg\marg{条目名}\oarg{目录标题}\marg{标题}]\default{}
+  \command{bicaption}[\sarg\oarg{目录标题1}\marg{标题1}\oarg{目录标题2}\marg{标题2}]
+  题注命令 \cs{caption} 用于在图表上下方插入题注,需要在浮动体环境 \env*{figure} 和 \env*{table} 中使用。在浮动环境外可以使用 \cs{captionof} 命令,第一个参数指定条目名。可以搭配 \pkg*{newfloat} 宏包创建更多类型的浮动环境并设置相应题注。\cs{bicaption} 命令可以实现中英文双语题注,需要在导言区载入 \pkg*{bicaption} 宏包,具体用法见说明文档。
 \end{commands}
 
 \subsection{化学式}

Modified: branches/branch2021.final/Master/texmf-dist/doc/latex/spbmark/README.md
===================================================================
--- branches/branch2021.final/Master/texmf-dist/doc/latex/spbmark/README.md	2022-03-05 21:06:29 UTC (rev 62447)
+++ branches/branch2021.final/Master/texmf-dist/doc/latex/spbmark/README.md	2022-03-05 21:07:12 UTC (rev 62448)
@@ -1,6 +1,6 @@
 # The spbmark package
 
-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.
+`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.
 
 ## License
 

Modified: branches/branch2021.final/Master/texmf-dist/doc/latex/spbmark/spbmark.pdf
===================================================================
(Binary files differ)

Modified: branches/branch2021.final/Master/texmf-dist/doc/latex/spbmark/spbmark.tex
===================================================================
--- branches/branch2021.final/Master/texmf-dist/doc/latex/spbmark/spbmark.tex	2022-03-05 21:06:29 UTC (rev 62447)
+++ branches/branch2021.final/Master/texmf-dist/doc/latex/spbmark/spbmark.tex	2022-03-05 21:07:12 UTC (rev 62448)
@@ -6,8 +6,8 @@
   {
     package           = spbmark,
     title             = the spbmark package,
-    version           = v1.39,
-    date              = 2022/03/04,
+    version           = v1.4,
+    date              = 2022/03/05,
     authors           = Qu Yi,
     info              = Customize superscript and subscript,
     email             = q1jx at foxmail.com,
@@ -55,7 +55,7 @@
   \keybool{math}\Default{false}
   \cs{sp} and \cs{sb} are equivalent to the \cs{super} and \cs{sub} commands.
   \keybool{foot}\Default{false}
-  The format of the footnote mark match the superscript move and format of the \cs{spbset} global setting.
+  The format of the footnote mark match the superscript global move and format settings.
   \opt{both}
   The values of \option{text} and \option{math} two options are \code{true} at the same time.
   \opt{all}
@@ -69,26 +69,20 @@
 \section{User commands}
 There are currently three commands to set superscript and subscript. Their format can be set temporarily using the optional parameters of the command, or set globally using a key-value list, see section \ref{sec:global control interface}.
 \begin{commands}
-  \command{super}[\oarg{kv list}\marg{content}\oarg{kv list}]
+  \command{super}[\sarg\oarg{kv list}\marg{content}\oarg{kv list}]
   This is a superscript output command. The two \meta{kv list} are equivalent.
-  \command{sub}[\oarg{kv list}\marg{content}\oarg{kv list}]
+  \command{sub}[\sarg\oarg{kv list}\marg{content}\oarg{kv list}]
   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.
 
   When the horizontal movement distance of the marker is \emph{non-negative}, since the \cs{super} and \cs{sub} commands put the marker in a horizontal box, the horizontal position is staggered when using superscript and subscript \emph{consecutively}, which is a different mechanism than the sequential use of \code{\^{}} and \code{\_} symbols in math mode. The following three commands save the width of the previous marker, use it for negative move of the \option{hmove} option of the next marker, and provide the corresponding alignment.
 
   It should be noted that the following commands should save the longer width of the marker, that is, the longer width of the marker in the front, the shorter width of the marker in the back. This is due to the fact that horizontal movement uses a negative distance to leave the marker in a zero-width box state.
   \command{llastwd}\newtag%
-  Save the width of the previous marker and provide left alignment.
+  Save the width of the previous marker and provide left alignment. This is actually the width of the previous marker, and is the same as the value of \cs{rlastwd} after the next command is used.
   \command{clastwd}\newtag%
-  Save the width of the previous marker and provide center alignment.
+  Save the width of the previous marker and provide center alignment. 
   \command{rlastwd}\newtag%
-  Save the width of the previous marker and provide right alignment.
+  Save the width of the previous marker and provide right alignment. Actually this is the width of the next marker.
   \begin{example}
   A\super{bcd}\sub{e}B \\
   A\super{bcd}\sub[hmove=-\llastwd]{e}B \\
@@ -96,6 +90,29 @@
   A\super{bcd}\sub[hmove=-\clastwd]{e}B \\
   A\super{bcd}\sub[hmove=-\rlastwd]{e}B \\
   \end{example}
+  \command{supersub}[\sarg\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{superwd}
+  Save the width of the superscript in the previous super-subscript command.
+  \command{subwd}
+  Save the width of the subscript in the previous super-subscript command.
+  \command{maxwd}
+  Save the maximum width of superscript and subscript in the previous super-subscript command. That is, it is the larger of the \cs{superwd} and \cs{subwd} commands.
+
+  If horizontally move is negative and its absolute value is \emph{less} than the maximum width of the marker, then the marker overlaps the subsequent text. To avoid this use the command with the \emph{asterisk} parameter or adjust the horizontal distance with the marker length commands.
+  \begin{example}
+  \spbset{spvmove=5pt,vsep=1.8ex,spcmd=\color{blue}}
+  A\super[hmove=-8pt]{super}B \\
+  A\supersub[hmove=-8pt]{examsuper}{sub}B \\
+  A\super*[hmove=-8pt]{super}B \\
+  A\supersub*[hmove=-8pt]{examsuper}{sub}B \\
+  A\super[hmove=-8pt]{super}\hspace{\dimexpr(\llastwd-8pt)}B \\
+  A\supersub[hmove=-8pt]{examsuper}{sub}\hspace{\dimexpr(\maxwd-8pt)}B
+  \end{example}
+  \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.
   \command{spbshortkv}[\marg{short opt}\marg{key value}]\newtag%
   Converts any existing key-value pair to a shorthand option. The value of key \code{\#1} indicates that the shorthand option needs to be assigned a value.
   \begin{example}
@@ -110,9 +127,9 @@
 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, in addition to \option{style} and \option{mode}, they will be set according to the type of the previous most recent command.
 \begin{options}
   \keyval{vmove}{fixed length}\Default{0pt}
-  Vertical move of superscript or subscript. Represents the extra vertical distance \option{vsep} between superscript and subscript in the superscript and subscript commands.
+  Vertical move of superscript or subscript. Represents the extra vertical distance \option{vsep} between superscript and subscript in super-subscript command. The vertical movement starts at the marker horizontal baseline position.
   \keyval{hmove}{fixed length}\Default{0pt}
-  Horizontal move of superscript or subscript. Represents the common move in the superscript and subscript commands. Moved values can be expressed mathematically:
+  Horizontal move of superscript or subscript. Represents the \emph{common} move of superscript and subscript in super-subscript command. The starting point for horizontal movement is to the left of the marker. Moved values can be expressed mathematically:
   \begin{example}
   A\super{b}[vmove=0.4ex+4pt/2,hmove=2pt*3-11.5pt] \\
   A\supersub[vsep={3pt,6pt-2bp}]{examsuper}{sub}

Modified: branches/branch2021.final/Master/texmf-dist/source/latex/easybook/easybook.dtx
===================================================================
--- branches/branch2021.final/Master/texmf-dist/source/latex/easybook/easybook.dtx	2022-03-05 21:06:29 UTC (rev 62447)
+++ branches/branch2021.final/Master/texmf-dist/source/latex/easybook/easybook.dtx	2022-03-05 21:07:12 UTC (rev 62448)
@@ -15,7 +15,7 @@
 %<*class>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2022/03/04}{1.638}
+\ProvidesExplClass{easybook}{2022/03/05}{1.639}
   {Easily typesetting Chinese theses or books}
 
 \bool_set_false:N \l__eb_compile_draft_bool
@@ -303,7 +303,7 @@
 %<*package>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2022/03/04}{1.638}
+\ProvidesExplPackage{easybase}{2022/03/05}{1.639}
   {Easily typesetting Chinese theses or books}
 
 \cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -2302,7 +2302,7 @@
   }
 %</package>
 %<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2022/03/04}{1.638}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2022/03/05}{1.639}
   {Customization of tcolorbox for easybook}
 
 \cs_set_protected:Npn \addtotcbstyle #1#2

Modified: branches/branch2021.final/Master/texmf-dist/tex/latex/easybook/easybase.sty
===================================================================
--- branches/branch2021.final/Master/texmf-dist/tex/latex/easybook/easybase.sty	2022-03-05 21:06:29 UTC (rev 62447)
+++ branches/branch2021.final/Master/texmf-dist/tex/latex/easybook/easybase.sty	2022-03-05 21:07:12 UTC (rev 62448)
@@ -20,7 +20,7 @@
 %% This work has the LPPL maintenance status `maintained'.
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2022/03/04}{1.638}
+\ProvidesExplPackage{easybase}{2022/03/05}{1.639}
   {Easily typesetting Chinese theses or books}
 
 \cs_generate_variant:Nn \dim_set:Nn { NV }

Modified: branches/branch2021.final/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- branches/branch2021.final/Master/texmf-dist/tex/latex/easybook/easybook.cls	2022-03-05 21:06:29 UTC (rev 62447)
+++ branches/branch2021.final/Master/texmf-dist/tex/latex/easybook/easybook.cls	2022-03-05 21:07:12 UTC (rev 62448)
@@ -20,7 +20,7 @@
 %% This work has the LPPL maintenance status `maintained'.
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2022/03/04}{1.638}
+\ProvidesExplClass{easybook}{2022/03/05}{1.639}
   {Easily typesetting Chinese theses or books}
 
 \bool_set_false:N \l__eb_compile_draft_bool

Modified: branches/branch2021.final/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg
===================================================================
--- branches/branch2021.final/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg	2022-03-05 21:06:29 UTC (rev 62447)
+++ branches/branch2021.final/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg	2022-03-05 21:07:12 UTC (rev 62448)
@@ -18,7 +18,7 @@
 %% LaTeX version 2005/12/01 or later.
 %% 
 %% This work has the LPPL maintenance status `maintained'.
-\ProvidesExplFile{eb-tcolorbox.cfg}{2022/03/04}{1.638}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2022/03/05}{1.639}
   {Customization of tcolorbox for easybook}
 
 \cs_set_protected:Npn \addtotcbstyle #1#2

Modified: branches/branch2021.final/Master/texmf-dist/tex/latex/spbmark/spbmark.sty
===================================================================
--- branches/branch2021.final/Master/texmf-dist/tex/latex/spbmark/spbmark.sty	2022-03-05 21:06:29 UTC (rev 62447)
+++ branches/branch2021.final/Master/texmf-dist/tex/latex/spbmark/spbmark.sty	2022-03-05 21:07:12 UTC (rev 62448)
@@ -9,7 +9,7 @@
 %   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2018/12/31]
 \RequirePackage{xparse,l3keys2e}
-\ProvidesExplPackage{spbmark}{2022/03/04}{1.39}
+\ProvidesExplPackage{spbmark}{2022/03/05}{1.4}
   {Customize superscripts and subscripts}
 
 \cs_generate_variant:Nn \box_set_ht:Nn { cv }
@@ -16,7 +16,8 @@
 \cs_generate_variant:Nn \box_set_dp:Nn { cv }
 \cs_generate_variant:Nn \dim_max:nn { VV }
 \cs_generate_variant:Nn \dim_gset:Nn { Nv }
-\cs_generate_variant:Nn \dim_compare:nNnTF { V }
+\cs_generate_variant:Nn \dim_abs:n { V,v }
+\cs_generate_variant:Nn \dim_compare:nNnTF { V,v }
 \cs_generate_variant:Nn \msg_warning:nnn { nnV }
 \cs_generate_variant:Nn \str_case:nn { x }
 \cs_generate_variant:Nn \tl_if_novalue:nF { V }
@@ -120,9 +121,9 @@
     novmove .meta:n     = { spvmove = 0pt,sbvmove = 0pt }
   }
 \cs_new:Npn \spb_box_super_move_up_i:n #1
-  { \box_move_up:nn {#1} { \box_use:N \l__super_i_box } }
+  { \box_move_up:nn {#1} { \box_use:N \l__super_i_inner_box } }
 \cs_new:Npn \spb_box_sub_move_down_i:n #1
-  { \box_move_down:nn {#1} { \box_use:N \l__sub_i_box } }
+  { \box_move_down:nn {#1} { \box_use:N \l__sub_i_inner_box } }
 \cs_new:Npn \spb_box_super_move_up_ii:n #1
   { \box_move_up:nn {#1} { \box_use:N \l__super_ii_box } }
 \cs_new:Npn \spb_box_sub_move_down_ii:n #1
@@ -216,30 +217,31 @@
           { \tl_set:Nn \l__sub_depth_ii_tl {#1} }
       }
   }
-\cs_new_protected:Npn \spb_ht_dp_assign:nnn #1#2#3
+\cs_new_protected:Npn \spb_ht_dp_assign:nnnn #1#2#3#4
   {
     \tl_if_blank:vF { l__#1_height_#3_tl }
-      { \box_set_ht:cv { l__#1_#3_box } { l__#1_height_#3_tl } }
+      { \box_set_ht:cv { l__#1_#3#4_box } { l__#1_height_#3_tl } }
     \tl_if_blank:vF { l__#1_depth_i_tl }
-      { \box_set_dp:cv { l__#2_#3_box } { l__#2_depth_#3_tl } }
+      { \box_set_dp:cv { l__#2_#3#4_box } { l__#2_depth_#3_tl } }
   }
 
-\box_new:N \l__super_i_box
-\box_new:N \l__sub_i_box
+\box_new:N \l__super_i_outer_box
+\box_new:N \l__super_i_inner_box
+\box_new:N \l__sub_i_outer_box
+\box_new:N \l__sub_i_inner_box
 \box_new:N \l__super_ii_box
 \box_new:N \l__sub_ii_box
 \dim_new:N \llastwd
 \dim_new:N \clastwd
 \dim_new:N \rlastwd
-\tl_set:Nn \l__spb_box_super_wd_i_tl { \box_wd:N \l__super_i_box }
-\tl_set:Nn \l__spb_box_sub_wd_i_tl { \box_wd:N \l__sub_i_box }
-\tl_set:Nn \l__spb_box_super_wd_ii_tl { \box_wd:N \l__super_ii_box }
-\tl_set:Nn \l__spb_box_sub_wd_ii_tl { \box_wd:N \l__sub_ii_box }
-\tl_set:Nn \l__spb_box_max_wd_tl
-  { \dim_max:VV \l__spb_box_super_wd_ii_tl \l__spb_box_sub_wd_ii_tl }
+\tl_set:Nn \superwd { \box_wd:N \l__super_ii_box }
+\tl_set:Nn \subwd { \box_wd:N \l__sub_ii_box }
+\tl_set:Nn \maxwd { \dim_max:VV \superwd \subwd }
+\tl_set:Nn \l__spb_box_super_wd_i_tl { \box_wd:N \l__super_i_inner_box }
+\tl_set:Nn \l__spb_box_sub_wd_i_tl { \box_wd:N \l__sub_i_inner_box }
 \cs_new:Npn \spb_math_print_store_i:nn #1#2
   {
-    \hbox_set:cn { l__#1_i_box }
+    \hbox_gset:cn { l__#1_i_inner_box }
       {
         \ensuremath
           {
@@ -251,7 +253,7 @@
   }
 \cs_new:Npn \spb_text_print_store_i:nn #1#2
   {
-    \hbox_set:cn { l__#1_i_box }
+    \hbox_gset:cn { l__#1_i_inner_box }
       {
         \use:c { spb at text#1script at save }
           { \tl_use:c { l__spb_#1_cmd_i_tl }{#2} }
@@ -260,16 +262,16 @@
   }
 \cs_new:Npn \spb_math_print_store_ii:nn #1#2
   {
-    \hbox_set:Nn \l__super_ii_box
+    \hbox_gset:Nn \l__super_ii_box
       { \ensuremath{\spb at math@super at save{\l__spb_super_cmd_ii_tl{#1}}} }
-    \hbox_set:Nn \l__sub_ii_box
+    \hbox_gset:Nn \l__sub_ii_box
       { \ensuremath{\spb at math@sub at save{\l__spb_sub_cmd_ii_tl{#2}}} }
   }
 \cs_new:Npn \spb_text_print_store_ii:nn #1#2
   {
-    \hbox_set:Nn \l__super_ii_box
+    \hbox_gset:Nn \l__super_ii_box
       { \spb at textsuperscript@save{\l__spb_super_cmd_ii_tl{#1}} }
-    \hbox_set:Nn \l__sub_ii_box
+    \hbox_gset:Nn \l__sub_ii_box
       { \spb at textsubscript@save{\l__spb_sub_cmd_ii_tl{#2}} }
   }
 \cs_set_eq:NN \spbifmath \use_ii:nn
@@ -306,33 +308,39 @@
 
 \cs_new_protected:Npn \spb_both_newcmd_map:n #1
   {
-    \exp_args:Nc \NewDocumentCommand {#1}{O{}mO{}}
+    \exp_args:Nc \NewDocumentCommand {#1}{sO{}mO{}}
       {
         \group_begin:
         \mode_leave_vertical:
         \tl_gset:Nn \g__spb_mark_case_init_tl {#1}
         \spb_define:n { unknown .undefine: }
-        \spb_set:n { ##1,##3 }
-        \spb_mode_switch:nnn {#1} {##2} { i }
-        \spb_content_hbox_set:n {#1}
-        \spb_ht_dp_assign:nnn {#1} {#1} { i }
-        \box_use:c { l__#1_i_box }
+        \spb_set:n { ##2,##4 }
+        \spb_mode_switch:nnn {#1} {##3} { i }
+        \spb_content_hbox_set:nn {#1} {##1}
+        \spb_ht_dp_assign:nnnn {#1} {#1} { i } { _outer }
+        \box_use:c { l__#1_i_outer_box }
         \group_end:
       }
   }
-\cs_new_protected:Npn \spb_content_hbox_set:n #1
+\cs_new_protected:Npn \spb_content_hbox_set:nn #1#2
   {
     \dim_gset:Nn \clastwd { (\llastwd + \rlastwd)/2 }
-    \hbox_set:cn { l__#1_i_box }
+    \tl_set:Nn \abs at hmove@i { \dim_abs:v { l__spb_#1_hmove_tl } }
+    \hbox_set:cn { l__#1_i_outer_box }
       {
-        \dim_compare:nNnTF { \tl_use:c { l__spb_#1_hmove_tl } } < { 0pt }
+        \dim_compare:vNnTF { l__spb_#1_hmove_tl } < { 0pt }
           {
             \hbox_overlap_left:n
               {
                 \hbox_overlap_right:n
                   { \spb_box_vmove_i:nn {#1} { \tl_use:c { l__spb_#1_vmove_tl } } }
-                \skip_horizontal:n { \dim_abs:n { \tl_use:c { l__spb_#1_hmove_tl } } }
+                \skip_horizontal:n { \abs at hmove@i }
               }
+            \IfBooleanT{#2}
+              {
+                \dim_compare:nNnT { \abs at hmove@i } < { \rlastwd }
+                  { \skip_horizontal:n { \rlastwd - \abs at hmove@i } }
+              }
           }
           {
             \hbox_to_wd:nn
@@ -340,22 +348,30 @@
               { \hss\spb_box_vmove_i:nn {#1} { \tl_use:c { l__spb_#1_vmove_tl } } }
           }
       }
-    \dim_gset:Nn \llastwd
-      { \tl_use:c { l__spb_box_#1_wd_i_tl } - \tl_use:c { l__spb_#1_hmove_tl } }
+    \dim_gset:Nv \llastwd { l__spb_box_#1_wd_i_tl }
   }
 \clist_map_inline:nn { super,sub } { \spb_both_newcmd_map:n {#1} }
 
 \cs_new:Npn \spb_supersub_hmove_if_negative:TF #1#2
   { \dim_compare:VNnTF \l__spb_supersub_hmove_tl < { 0pt } {#1} {#2} }
-\NewDocumentCommand{\supersub}{O{}mmO{}}
+\tl_set:Nn \abs at hmove@ii { \dim_abs:V \l__spb_supersub_hmove_tl }
+\cs_new:Npn \spb_supersub_avoid_overlap:n #1
   {
+    \IfBooleanT{#1}
+      {
+        \dim_compare:nNnT { \abs at hmove@ii } < { \maxwd }
+          { \skip_horizontal:n { \maxwd - \abs at hmove@ii } }
+      }
+  }
+\NewDocumentCommand{\supersub}{sO{}mmO{}}
+  {
     \group_begin:
     \mode_leave_vertical:
     \tl_gset:Nn \g__spb_mark_case_init_tl { supersub }
     \spb_define:n { unknown .undefine: }
-    \spb_set:n {#1,#4}
-    \spb_mode_switch:nnn {#2} {#3} { ii }
-    \spb_ht_dp_assign:nnn { super } { sub } { ii }
+    \spb_set:n {#2,#5}
+    \spb_mode_switch:nnn {#3} {#4} { ii }
+    \spb_ht_dp_assign:nnnn { super } { sub } { ii } { }
     \str_case:VnF \l__spb_supersub_halign_tl
       {
         { l } { \use_i:nnn }
@@ -372,8 +388,9 @@
             \hbox_overlap_left:n
               {
                 \spb_hbox_overlap_vmove_ii:n { right }
-                \skip_horizontal:n { \dim_abs:n { \l__spb_supersub_hmove_tl } }
+                \skip_horizontal:n { \abs at hmove@ii }
               }
+            \spb_supersub_avoid_overlap:n {#1}
           }
           {
             \hbox:n
@@ -380,7 +397,7 @@
               {
                 \skip_horizontal:n { \l__spb_supersub_hmove_tl }
                 \spb_hbox_overlap_vmove_ii:n { right } 
-                \skip_horizontal:n { \l__spb_box_max_wd_tl }
+                \skip_horizontal:n { \maxwd }
               }
           }
       }
@@ -390,16 +407,16 @@
             \hbox_overlap_left:n
               {
                 \spb_hbox_overlap_vmove_ii:n { center }
-                \skip_horizontal:n
-                  { \dim_abs:n { \l__spb_supersub_hmove_tl + \l__spb_box_max_wd_tl/2 } }
+                \skip_horizontal:n { \abs at hmove@ii - \maxwd/2 }
               }
+            \spb_supersub_avoid_overlap:n {#1}
           }
           {
             \hbox:n
               {
-                \skip_horizontal:n { \l__spb_box_max_wd_tl/2 + \l__spb_supersub_hmove_tl }
+                \skip_horizontal:n { \maxwd/2 + \l__spb_supersub_hmove_tl }
                 \spb_hbox_overlap_vmove_ii:n { center } 
-                \skip_horizontal:n { \l__spb_box_max_wd_tl/2 }
+                \skip_horizontal:n { \maxwd/2 }
               }
           }
       }
@@ -409,14 +426,14 @@
             \hbox_overlap_left:n
               {
                 \spb_hbox_overlap_vmove_ii:n { left }
-                \skip_horizontal:n
-                  { \dim_abs:n { \l__spb_supersub_hmove_tl + \l__spb_box_max_wd_tl } }
+                \skip_horizontal:n { \abs at hmove@ii - \maxwd }
               }
+            \spb_supersub_avoid_overlap:n {#1}
           }
           {
             \hbox:n
               {
-                \skip_horizontal:n { \l__spb_box_max_wd_tl + \l__spb_supersub_hmove_tl }
+                \skip_horizontal:n { \maxwd + \l__spb_supersub_hmove_tl }
                 \spb_hbox_overlap_vmove_ii:n { left } 
               }
           }

Modified: branches/branch2021.final/Master/tlpkg/bin/c2lx
===================================================================
--- branches/branch2021.final/Master/tlpkg/bin/c2lx	2022-03-05 21:06:29 UTC (rev 62447)
+++ branches/branch2021.final/Master/tlpkg/bin/c2lx	2022-03-05 21:07:12 UTC (rev 62448)
@@ -17,7 +17,7 @@
 cp /dev/null $dirsfile.tmp
 cp /dev/null /tmp/first
 
-if test "x$1" = xe; then
+if test "x$1" = xe || test "x$1" = x2e; then
   shift; label=l2e
   pkgs="amsmath cyrillic graphics tools latex firstaid"
 elif test "x$1" = xdev; then
@@ -38,7 +38,8 @@
   shift; label=minim 
   pkgs="minim-hatching minim-math minim-mp minim-pdf minim-xmp minim"
 else
-  echo "$0: unknown latex or group type: $1 (one of: e dev 3 jxu)" >&2
+  echo "$0: unknown latex or group type: $1" >&2
+  echo "$0: must be one of: e dev 3 jxu qyi minimal-all" >&2
   exit 1
 fi
 



More information about the tex-live-commits mailing list.