texlive[75001] Master: bracealign (22apr25)

commits+karl at tug.org commits+karl at tug.org
Tue Apr 22 22:31:37 CEST 2025


Revision: 75001
          https://tug.org/svn/texlive?view=revision&revision=75001
Author:   karl
Date:     2025-04-22 22:31:37 +0200 (Tue, 22 Apr 2025)
Log Message:
-----------
bracealign (22apr25)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/libexec/ctan2tds
    trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/bracealign/
    trunk/Master/texmf-dist/doc/latex/bracealign/LICENSE
    trunk/Master/texmf-dist/doc/latex/bracealign/README.md
    trunk/Master/texmf-dist/doc/latex/bracealign/bracealign-doc.sty
    trunk/Master/texmf-dist/doc/latex/bracealign/bracealign.pdf
    trunk/Master/texmf-dist/source/latex/bracealign/
    trunk/Master/texmf-dist/source/latex/bracealign/bracealign.dtx
    trunk/Master/texmf-dist/source/latex/bracealign/bracealign.ins
    trunk/Master/texmf-dist/tex/latex/bracealign/
    trunk/Master/texmf-dist/tex/latex/bracealign/bracealign.sty
    trunk/Master/tlpkg/tlpsrc/bracealign.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/bracealign/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bracealign/LICENSE	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/bracealign/LICENSE	2025-04-22 20:31:37 UTC (rev 75001)
@@ -0,0 +1,416 @@
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.3c  2008-05-04
+
+Copyright 1999 2002-2008 LaTeX3 Project
+    Everyone is allowed to distribute verbatim copies of this
+    license document, but modification of it is not allowed.
+
+
+PREAMBLE
+========
+
+The LaTeX Project Public License (LPPL) is the primary license under
+which the LaTeX kernel and the base LaTeX packages are distributed.
+
+You may use this license for any work of which you hold the copyright
+and which you wish to distribute.  This license may be particularly
+suitable if your work is TeX-related (such as a LaTeX package), but 
+it is written in such a way that you can use it even if your work is 
+unrelated to TeX.
+
+The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
+below, gives instructions, examples, and recommendations for authors
+who are considering distributing their works under this license.
+
+This license gives conditions under which a work may be distributed
+and modified, as well as conditions under which modified versions of
+that work may be distributed.
+
+We, the LaTeX3 Project, believe that the conditions below give you
+the freedom to make and distribute modified versions of your work
+that conform with whatever technical specifications you wish while
+maintaining the availability, integrity, and reliability of
+that work.  If you do not see how to achieve your goal while
+meeting these conditions, then read the document `cfgguide.tex'
+and `modguide.tex' in the base LaTeX distribution for suggestions.
+
+
+DEFINITIONS
+===========
+
+In this license document the following terms are used:
+
+   `Work'
+    Any work being distributed under this License.
+    
+   `Derived Work'
+    Any work that under any applicable law is derived from the Work.
+
+   `Modification' 
+    Any procedure that produces a Derived Work under any applicable
+    law -- for example, the production of a file containing an
+    original file associated with the Work or a significant portion of
+    such a file, either verbatim or with modifications and/or
+    translated into another language.
+
+   `Modify'
+    To apply any procedure that produces a Derived Work under any
+    applicable law.
+    
+   `Distribution'
+    Making copies of the Work available from one person to another, in
+    whole or in part.  Distribution includes (but is not limited to)
+    making any electronic components of the Work accessible by
+    file transfer protocols such as FTP or HTTP or by shared file
+    systems such as Sun's Network File System (NFS).
+
+   `Compiled Work'
+    A version of the Work that has been processed into a form where it
+    is directly usable on a computer system.  This processing may
+    include using installation facilities provided by the Work,
+    transformations of the Work, copying of components of the Work, or
+    other activities.  Note that modification of any installation
+    facilities provided by the Work constitutes modification of the Work.
+
+   `Current Maintainer'
+    A person or persons nominated as such within the Work.  If there is
+    no such explicit nomination then it is the `Copyright Holder' under
+    any applicable law.
+
+   `Base Interpreter' 
+    A program or process that is normally needed for running or
+    interpreting a part or the whole of the Work.    
+
+    A Base Interpreter may depend on external components but these
+    are not considered part of the Base Interpreter provided that each
+    external component clearly identifies itself whenever it is used
+    interactively.  Unless explicitly specified when applying the
+    license to the Work, the only applicable Base Interpreter is a
+    `LaTeX-Format' or in the case of files belonging to the 
+    `LaTeX-format' a program implementing the `TeX language'.
+
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+1.  Activities other than distribution and/or modification of the Work
+are not covered by this license; they are outside its scope.  In
+particular, the act of running the Work is not restricted and no
+requirements are made concerning any offers of support for the Work.
+
+2.  You may distribute a complete, unmodified copy of the Work as you
+received it.  Distribution of only part of the Work is considered
+modification of the Work, and no right to distribute such a Derived
+Work may be assumed under the terms of this clause.
+
+3.  You may distribute a Compiled Work that has been generated from a
+complete, unmodified copy of the Work as distributed under Clause 2
+above, as long as that Compiled Work is distributed in such a way that
+the recipients may install the Compiled Work on their system exactly
+as it would have been installed if they generated a Compiled Work
+directly from the Work.
+
+4.  If you are the Current Maintainer of the Work, you may, without
+restriction, modify the Work, thus creating a Derived Work.  You may
+also distribute the Derived Work without restriction, including
+Compiled Works generated from the Derived Work.  Derived Works
+distributed in this manner by the Current Maintainer are considered to
+be updated versions of the Work.
+
+5.  If you are not the Current Maintainer of the Work, you may modify
+your copy of the Work, thus creating a Derived Work based on the Work,
+and compile this Derived Work, thus creating a Compiled Work based on
+the Derived Work.
+
+6.  If you are not the Current Maintainer of the Work, you may
+distribute a Derived Work provided the following conditions are met
+for every component of the Work unless that component clearly states
+in the copyright notice that it is exempt from that condition.  Only
+the Current Maintainer is allowed to add such statements of exemption 
+to a component of the Work. 
+
+  a. If a component of this Derived Work can be a direct replacement
+     for a component of the Work when that component is used with the
+     Base Interpreter, then, wherever this component of the Work
+     identifies itself to the user when used interactively with that
+     Base Interpreter, the replacement component of this Derived Work
+     clearly and unambiguously identifies itself as a modified version
+     of this component to the user when used interactively with that
+     Base Interpreter.
+     
+  b. Every component of the Derived Work contains prominent notices
+     detailing the nature of the changes to that component, or a
+     prominent reference to another file that is distributed as part
+     of the Derived Work and that contains a complete and accurate log
+     of the changes.
+  
+  c. No information in the Derived Work implies that any persons,
+     including (but not limited to) the authors of the original version
+     of the Work, provide any support, including (but not limited to)
+     the reporting and handling of errors, to recipients of the
+     Derived Work unless those persons have stated explicitly that
+     they do provide such support for the Derived Work.
+
+  d. You distribute at least one of the following with the Derived Work:
+
+       1. A complete, unmodified copy of the Work; 
+          if your distribution of a modified component is made by
+          offering access to copy the modified component from a
+          designated place, then offering equivalent access to copy
+          the Work from the same or some similar place meets this
+          condition, even though third parties are not compelled to
+          copy the Work along with the modified component;
+
+       2. Information that is sufficient to obtain a complete,
+          unmodified copy of the Work.
+
+7.  If you are not the Current Maintainer of the Work, you may
+distribute a Compiled Work generated from a Derived Work, as long as
+the Derived Work is distributed to all recipients of the Compiled
+Work, and as long as the conditions of Clause 6, above, are met with
+regard to the Derived Work.
+
+8.  The conditions above are not intended to prohibit, and hence do not
+apply to, the modification, by any method, of any component so that it
+becomes identical to an updated version of that component of the Work as
+it is distributed by the Current Maintainer under Clause 4, above.
+
+9.  Distribution of the Work or any Derived Work in an alternative
+format, where the Work or that Derived Work (in whole or in part) is
+then produced by applying some process to that format, does not relax or
+nullify any sections of this license as they pertain to the results of
+applying that process.
+     
+10. a. A Derived Work may be distributed under a different license
+       provided that license itself honors the conditions listed in
+       Clause 6 above, in regard to the Work, though it does not have
+       to honor the rest of the conditions in this license.
+      
+    b. If a Derived Work is distributed under a different license, that
+       Derived Work must provide sufficient documentation as part of
+       itself to allow each recipient of that Derived Work to honor the 
+       restrictions in Clause 6 above, concerning changes from the Work.
+
+11. This license places no restrictions on works that are unrelated to
+the Work, nor does this license place any restrictions on aggregating
+such works with the Work by any means.
+
+12.  Nothing in this license is intended to, or may be used to, prevent
+complete compliance by all parties with all applicable laws.
+
+
+NO WARRANTY
+===========
+
+There is no warranty for the Work.  Except when otherwise stated in
+writing, the Copyright Holder provides the Work `as is', without
+warranty of any kind, either expressed or implied, including, but not
+limited to, the implied warranties of merchantability and fitness for a
+particular purpose.  The entire risk as to the quality and performance
+of the Work is with you.  Should the Work prove defective, you assume
+the cost of all necessary servicing, repair, or correction.
+
+In no event unless required by applicable law or agreed to in writing
+will The Copyright Holder, or any author named in the components of the
+Work, or any other party who may distribute and/or modify the Work as
+permitted above, be liable to you for damages, including any general,
+special, incidental or consequential damages arising out of any use of
+the Work or out of inability to use the Work (including, but not limited
+to, loss of data, data being rendered inaccurate, or losses sustained by
+anyone as a result of any failure of the Work to operate with any other
+programs), even if the Copyright Holder or said author or said other
+party has been advised of the possibility of such damages.
+
+
+MAINTENANCE OF THE WORK
+=======================
+
+The Work has the status `author-maintained' if the Copyright Holder
+explicitly and prominently states near the primary copyright notice in
+the Work that the Work can only be maintained by the Copyright Holder
+or simply that it is `author-maintained'.
+
+The Work has the status `maintained' if there is a Current Maintainer
+who has indicated in the Work that they are willing to receive error
+reports for the Work (for example, by supplying a valid e-mail
+address). It is not required for the Current Maintainer to acknowledge
+or act upon these error reports.
+
+The Work changes from status `maintained' to `unmaintained' if there
+is no Current Maintainer, or the person stated to be Current
+Maintainer of the work cannot be reached through the indicated means
+of communication for a period of six months, and there are no other
+significant signs of active maintenance.
+
+You can become the Current Maintainer of the Work by agreement with
+any existing Current Maintainer to take over this role.
+
+If the Work is unmaintained, you can become the Current Maintainer of
+the Work through the following steps:
+
+ 1.  Make a reasonable attempt to trace the Current Maintainer (and
+     the Copyright Holder, if the two differ) through the means of
+     an Internet or similar search.
+
+ 2.  If this search is successful, then enquire whether the Work
+     is still maintained.
+
+  a. If it is being maintained, then ask the Current Maintainer
+     to update their communication data within one month.
+     
+  b. If the search is unsuccessful or no action to resume active
+     maintenance is taken by the Current Maintainer, then announce
+     within the pertinent community your intention to take over
+     maintenance.  (If the Work is a LaTeX work, this could be
+     done, for example, by posting to comp.text.tex.)
+
+ 3a. If the Current Maintainer is reachable and agrees to pass
+     maintenance of the Work to you, then this takes effect
+     immediately upon announcement.
+     
+  b. If the Current Maintainer is not reachable and the Copyright
+     Holder agrees that maintenance of the Work be passed to you,
+     then this takes effect immediately upon announcement.  
+    
+ 4.  If you make an `intention announcement' as described in 2b. above
+     and after three months your intention is challenged neither by
+     the Current Maintainer nor by the Copyright Holder nor by other
+     people, then you may arrange for the Work to be changed so as
+     to name you as the (new) Current Maintainer.
+     
+ 5.  If the previously unreachable Current Maintainer becomes
+     reachable once more within three months of a change completed
+     under the terms of 3b) or 4), then that Current Maintainer must
+     become or remain the Current Maintainer upon request provided
+     they then update their communication data within one month.
+
+A change in the Current Maintainer does not, of itself, alter the fact
+that the Work is distributed under the LPPL license.
+
+If you become the Current Maintainer of the Work, you should
+immediately provide, within the Work, a prominent and unambiguous
+statement of your status as Current Maintainer.  You should also
+announce your new status to the same pertinent community as
+in 2b) above.
+
+
+WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
+======================================================
+
+This section contains important instructions, examples, and
+recommendations for authors who are considering distributing their
+works under this license.  These authors are addressed as `you' in
+this section.
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your work you want or need to use *distribution*
+conditions that differ significantly from those in this license, then
+do not refer to this license anywhere in your work but, instead,
+distribute your work under a different license.  You may use the text
+of this license as a model for your own license, but your license
+should not refer to the LPPL or otherwise give the impression that
+your work is distributed under the LPPL.
+
+The document `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license.  It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate.  Even if your work is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their works under any
+license are encouraged to read it.
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+It is wise never to modify a component of the Work, even for your own
+personal use, without also meeting the above conditions for
+distributing the modified component.  While you might intend that such
+modifications will never be distributed, often this will happen by
+accident -- you may forget that you have modified that component; or
+it may not occur to you when allowing others to access the modified
+version that you are thus distributing it and violating the conditions
+of this license in ways that could have legal implications and, worse,
+cause problems for the community.  It is therefore usually in your
+best interest to keep your copy of the Work identical with the public
+one.  Many works provide ways to control the behavior of that work
+without altering any of its licensed components.
+
+How to Use This License
+-----------------------
+
+To use this license, place in each of the components of your work both
+an explicit copyright notice including your name and the year the work
+was authored and/or last substantially modified.  Include also a
+statement that the distribution and/or modification of that
+component is constrained by the conditions in this license.
+
+Here is an example of such a notice and statement:
+
+  %% pig.dtx
+  %% Copyright 2005 M. Y. Name
+  %
+  % This work may be distributed and/or modified under the
+  % conditions of the LaTeX Project Public License, either version 1.3
+  % of this license or (at your option) any later version.
+  % The latest version of this license is in
+  %   http://www.latex-project.org/lppl.txt
+  % and version 1.3 or later is part of all distributions of LaTeX
+  % version 2005/12/01 or later.
+  %
+  % This work has the LPPL maintenance status `maintained'.
+  % 
+  % The Current Maintainer of this work is M. Y. Name.
+  %
+  % This work consists of the files pig.dtx and pig.ins
+  % and the derived file pig.sty.
+
+Given such a notice and statement in a file, the conditions
+given in this license document would apply, with the `Work' referring
+to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
+generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
+referring to any `LaTeX-Format', and both `Copyright Holder' and
+`Current Maintainer' referring to the person `M. Y. Name'.
+
+If you do not want the Maintenance section of LPPL to apply to your
+Work, change `maintained' above into `author-maintained'.  
+However, we recommend that you use `maintained', as the Maintenance
+section was added in order to ensure that your Work remains useful to
+the community even when you can no longer maintain and support it
+yourself.
+
+Derived Works That Are Not Replacements
+---------------------------------------
+
+Several clauses of the LPPL specify means to provide reliability and
+stability for the user community. They therefore concern themselves
+with the case that a Derived Work is intended to be used as a
+(compatible or incompatible) replacement of the original Work. If
+this is not the case (e.g., if a few lines of code are reused for a
+completely different task), then clauses 6b and 6d shall not apply.
+
+
+Important Recommendations
+-------------------------
+
+ Defining What Constitutes the Work
+
+   The LPPL requires that distributions of the Work contain all the
+   files of the Work.  It is therefore important that you provide a
+   way for the licensee to determine which files constitute the Work.
+   This could, for example, be achieved by explicitly listing all the
+   files of the Work near the copyright notice of each file or by
+   using a line such as:
+
+    % This work consists of all files listed in manifest.txt.
+   
+   in that place.  In the absence of an unequivocal list it might be
+   impossible for the licensee to determine what is considered by you
+   to comprise the Work and, in such a case, the licensee would be
+   entitled to make reasonable conjectures as to which files comprise
+   the Work.
+

Added: trunk/Master/texmf-dist/doc/latex/bracealign/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bracealign/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/bracealign/README.md	2025-04-22 20:31:37 UTC (rev 75001)
@@ -0,0 +1,28 @@
+# bracealign - Align underbraces and overbraces
+
+## Presentation
+
+A LaTeX package to align braces under and over math expressions. A new
+environment called bracealign is provided, inside which math braces drawn with
+the commands \underbrace, \overbrace, \underbracket, \overbracket, \underparen
+and \overparen are vertically aligned. The package also allows adding support
+for new commands.
+
+## Author
+
+Julien Labbé <Julien.Labbe at univ-grenoble-alpes.fr> Université Grenoble-Alpes
+
+## Repository
+
+https://github.com/julienlabbe/latex-packages/tree/main/bracealign
+
+## Licence
+
+Copyright (C) 2025 by Julien Labbé
+
+This file may be distributed and/or modified under the conditions of the LaTeX
+Project Public License (LPPL), either version 1.3c of this license or (at your
+option) any later version. The latest version of this license is in the file
+https://www.latex-project.org/lppl.txt
+
+


Property changes on: trunk/Master/texmf-dist/doc/latex/bracealign/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bracealign/bracealign-doc.sty
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bracealign/bracealign-doc.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/bracealign/bracealign-doc.sty	2025-04-22 20:31:37 UTC (rev 75001)
@@ -0,0 +1,248 @@
+%%
+%% This is file `bracealign-doc.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% bracealign.dtx  (with options: `docstyle')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright (C) 2025 by Julien Labbé <Julien.Labbe at univ-grenoble-alpes.fr>
+%% 
+%% This file may be distributed and/or modified under the conditions of the LaTeX
+%% Project Public License (LPPL), either version 1.3c of this license or (at your
+%% option) any later version. The latest version of this license is in the file
+%% https://www.latex-project.org/lppl.txt
+%% 
+\RequirePackage{xcolor}
+\RequirePackage{metalogo}
+\PassOptionsToPackage{hyperref}{xcolor}
+\RequirePackage[many]{tcolorbox}
+\tcbuselibrary{listings}
+\tcbuselibrary{documentation}
+\hypersetup{hidelinks}
+\definecolor{bracealign_lavender}{rgb}{0.92,0.92,1}
+\definecolor{bracealign_darkblue}{rgb}{0.1,0.2,0.5}
+\definecolor{bracealign_darkgreen}{rgb}{0,0.39,0}
+\definecolor{bracealign_beige}{rgb}{.96,.96,.86}
+\colorlet{bracealign_commands}{bracealign_darkblue}
+\colorlet{bracealign_keys}{bracealign_darkgreen}
+\colorlet{bracealign_lengths}{violet}
+\colorlet{bracealign_options}{Definition} % from tcolorbox documentation
+\lstdefinestyle{lstbracealigndoc}{%
+  language = [LaTeX]TeX,
+  alsoletter      = {_,:},% for expl3
+  columns         = fullflexible,
+  keepspaces      = true,
+  keywordstyle    = {\bfseries\color{bracealign_darkblue}},
+  texcsstyle      = *{\bfseries\color{bracealign_darkblue}},
+  commentstyle    = {\color{gray}},
+  identifierstyle = {\color{bracealign_darkgreen}},
+  morekeywords    = {},% keywordsprefix needs a morekeywords before
+  keywordsprefix  = {\\},
+  literate        = *{\$}{{\textcolor{red}{\$}}}{1}
+                    {\&}{{\textcolor{red}{\&}}}{1}
+                    {\}}{{\textcolor{darkgray}{\}}}}{1}
+                    {\{}{{\textcolor{darkgray}{\{}}}{1}
+                    {\\\\}{{\textcolor{red}{\textbackslash\textbackslash}}}{2}
+                    {\%\ \ \ \ }{}0,
+  basicstyle      = \ttfamily\footnotesize,
+  frame           = none,
+  framesep        = 0pt,
+  aboveskip       = 0pt,
+  belowskip       = 0pt,
+}
+\lstdefinestyle{lstbracealigncode}{%
+  style           = lstbracealigndoc,
+  backgroundcolor = \color{bracealign_beige},
+  breakindent     = 1cm,
+  numbers         = left,
+  numberstyle     = \scriptsize\ttfamily\color{gray},
+  aboveskip       = \smallskipamount,
+  belowskip       = \smallskipamount,
+}
+\tcbset{% copied and adapted from tcolorbox.doc.s_main.sty
+  documentation listing style=lstbracealigndoc,%
+  doc keypath=bracealign,
+  size=small,%
+  % verbatim ignore percent,
+  %% styles
+  docexample/.style={%
+    bicolor jigsaw,
+    before skip balanced=\medskipamount,
+    after skip balanced=\medskipamount,
+    fonttitle=\bfseries,
+    fontlower=\normalfont,
+    halign lower=center,
+    colframe=bracealign_darkblue,
+    colback=bracealign_lavender,
+    colbacklower=white,
+    drop fuzzy shadow,
+  },
+  color key=bracealign_keys,
+  color command=bracealign_commands,
+  color length=bracealign_lengths,
+  doc head key={fontlower=\footnotesize, collower=darkgray},
+  before doc body={\parskip=\smallskipamount},
+}
+\DeclareTotalTCBox{\code}{ v }
+  {
+    verbatim,
+    colframe=bracealign_beige,
+    colback=bracealign_beige,
+    sharp corners,
+    size=tight,
+    left=2pt,
+    right=2pt,
+  }
+  {%
+    \strut\lstinline[basicstyle=\ttfamily\small\color{bracealign_darkblue}]!#1!%
+  }
+\begin{filecontents*}{\jobname.mst}
+actual '='
+\end{filecontents*}
+\tcbset{%
+  index actual={=},
+  index colorize=true,
+  index gather all,
+  index format=pgfsection,
+}
+\def\tcb at doc@index at pgfsection{%
+  \def\index at prologue{%
+    \section*{\kvtcb at text@index}\addcontentsline{toc}{section}{\kvtcb at text@index}
+    {\small%
+      Entries listed in the categories ``commands" and ``internal macros" also
+      include references to package implementation. }
+    \bigskip\par\noindent%
+  }%
+  \tcb at doc@index at pgf@%
+}
+\newcommand{\indexmacro}[1]{%
+  \begingroup
+  \let\lst at UM\@empty%
+  \index{{Commands!#1=\tcbIndexPrintComC {#1}}}%
+  \endgroup
+}
+\newcommand{\indexmacrointernal}[1]{%
+  \begingroup
+  \let\lst at UM\@empty%
+  \index{{Internal macros!#1=\tcbIndexPrintComC {#1}}}%
+  \endgroup
+}
+\newcommand{\indexlength}[1]{%
+  \begingroup
+  \let\lst at UM\@empty%
+  \index{{Lengths!#1=\tcbIndexPrintLenC {#1}}}%
+  \endgroup
+}
+\let\macrocode\relax
+\lstnewenvironment{macrocode}{%
+  \lstset{%
+    name=macrocode,
+    firstnumber=auto,
+    style=lstbracealigncode,
+    showlines=false,
+    keepspaces=true,
+    texcs       = [2]{% commands
+      bracealignsetup
+      ,bracealign_add_brace:e
+      ,bracealign_add_brace:n
+      ,bracealign_add_brace:N
+      ,bracealign_bracealign:n
+    },
+    index       = [2][texcs2],%
+    indexstyle  = [2]\indexmacro,%
+    texcs       = [3]{% lengths
+    },
+    index       = [3][texcs3],%
+    indexstyle  = [3]\indexlength,%
+    texcs       = [4]{% internal macros (@@ → __bracealign with DocStrip)
+      @@_define_switches:e
+      ,@@_define_switches:n
+      ,@@_define_switches:N
+      ,@@_finalize:n
+      ,@@_initialize:n
+      ,@@_update_active_braces:
+      ,@@_use_strutcontent:n
+      ,l@@_active_brace_seq
+      ,l@@_default_brace_clist
+      ,l@@_overbrace_bool
+      ,l@@_overbracket_bool
+      ,l@@_overparen_bool
+      ,l@@_underbrace_bool
+      ,l@@_underbracket_bool
+      ,l@@_underparen_bool
+    },
+    index       = [4][texcs4],%
+    indexstyle  = [4]\indexmacrointernal,%
+    morekeywords = [2]{%
+      bracealign/add-brace
+      ,bracealign/add-braces
+      ,bracealign/default-braces
+      ,bracealign/nooverbrace
+      ,bracealign/nooverbracket
+      ,bracealign/nooverparen
+      ,bracealign/nounderbrace
+      ,bracealign/nounderbracket
+      ,bracealign/nounderparen
+      ,bracealign/overbrace
+      ,bracealign/overbracket
+      ,bracealign/overparen
+      ,bracealign/underbrace
+      ,bracealign/underbracket
+      ,bracealign/underparen
+    },
+    index       = [3][keywords2],%
+    indexstyle  = [3]\lstindexmacro,%
+  }
+  \csname\@lst @SetFirstNumber\endcsname
+}{%
+  \csname \@lst @SaveFirstNumber\endcsname
+}
+\DeclareDocumentEnvironment{macro}{m}{%
+ \count@\escapechar \escapechar=-1
+ \edef\macroname{\string#1}
+ \escapechar\count@
+ \marginpar{%
+   \parbox{0.88\linewidth}{%
+     \scriptsize\flushright\ifcsdef{r at com:\macroname}{\refCom*{\macroname}}{\cs{\macroname}}%
+   }%
+ }
+}{% end of macro environment
+}
+\def\refDoc#1{\tcb at ref@doc{#1}}
+\newcommand{\pkg}[1]{\textsf{#1}}
+\ExplSyntaxOn
+\cs_new_protected:Nn \bracealigndoc_cs:n
+  {
+   \str_set:Nn \l_tmpa_str { #1 }
+   \exp_args:Ne \texttt{ \c_backslash_str \str_use:N \l_tmpa_str }
+ }
+\cs_generate_variant:Nn \bracealigndoc_cs:n { e }
+\RenewDocumentCommand{\cs}{ m }{\bracealigndoc_cs:e { #1} }
+\ExplSyntaxOff
+\newrobustcmd{\tcbIndexPrintOptionCA}[1]{% adapted from \tcbIndexPrintKeyCA
+  \tcb at Index@Print at CA{#1}{bracealign_options}{package option}%
+}
+\newrobustcmd{\tcbIndexPrintOptionC}[1]{% adapted from \tcbIndexPrintKeyCA
+  \tcb at Index@Print at C{#1}{bracealign_options}%
+}
+\DeclareDocumentEnvironment{docOption}{ O{} m }{%
+  \begin{docKey*}[]
+    [doc name={#2}, doc label={opt:#2}, color key=bracealign_options, #1]
+    {#2}{}{}%
+    \kvtcb at index@command{%
+      \kvtcb at doc@sortindex\idx at actual\tcbIndexPrintOptionCA{#2}%
+    }%
+    \kvtcb at index@command{%
+      {Package options}\idx at level\kvtcb at doc@sortindex\idx at actual%
+      \tcbIndexPrintOptionC{#2}%
+    }%
+}{%
+  \end{docKey*}%
+}
+\def\refOpt{\refDoc{key:opt}}
+\endinput
+%%
+%% End of file `bracealign-doc.sty'.


Property changes on: trunk/Master/texmf-dist/doc/latex/bracealign/bracealign-doc.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bracealign/bracealign.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bracealign/bracealign.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bracealign/bracealign.pdf	2025-04-22 20:30:01 UTC (rev 75000)
+++ trunk/Master/texmf-dist/doc/latex/bracealign/bracealign.pdf	2025-04-22 20:31:37 UTC (rev 75001)

Property changes on: trunk/Master/texmf-dist/doc/latex/bracealign/bracealign.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/bracealign/bracealign.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/bracealign/bracealign.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/bracealign/bracealign.dtx	2025-04-22 20:31:37 UTC (rev 75001)
@@ -0,0 +1,1162 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2025 by Julien Labbé <Julien.Labbe at univ-grenoble-alpes.fr>
+%
+% This file may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this license or
+% (at your option) any later version. The latest version of this license is in
+% the file https://www.latex-project.org/lppl.txt
+%
+% \fi
+%
+% \iffalse
+%
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesExplPackage{bracealign}{2025/04/17}{v1.0}{Align underbraces and overbraces}
+%
+%<*driver>
+\documentclass[nohyperref]{ltxdoc}
+
+\usepackage{bracealign-doc} %^^A defined at end of this file, with guard <docstyle>
+\usepackage{bracealign}
+
+\usepackage{mathtools}
+
+\EnableCrossrefs
+\PageIndex
+% \CodelineIndex
+\RecordChanges
+% \OnlyDescription
+
+\begin{document}
+
+\DocInput{bracealign.dtx}
+
+\PrintIndex
+\PrintChanges
+
+\end{document}
+%</driver>
+% \fi
+%
+% \changes{v1.0}{2025/04/17}{Initial version.}
+%
+% \GetFileInfo{\jobname.sty}
+%
+% \title{The \pkg{bracealign} package\thanks{This document corresponds to
+% \pkg{bracealign}~\fileversion, dated \filedate.}}
+% \author{Julien Labb\'e \\ {\small \url{https://github.com/julienlabbe/latex-packages}}}
+%
+% \maketitle
+%
+% \begin{abstract}
+%   A \LaTeX{} package to align braces under and over math expressions. A new
+%   environment called \refEnv{bracealign} is provided, inside which braces and
+%   brackets drawn with the commands \cs{underbrace}, \cs{overbrace},
+%   \cs{underbracket}, \cs{overbracket}, \cs{underparen} or \cs{overparen} are
+%   vertically aligned. The package also allows adding support for new commands.
+%
+% \bigskip
+%
+% Example:
+% \iffalse
+%<*example>
+% \fi
+\begin{dispExample}
+  \[
+    \rho c \frac{\partial T}{\partial t} =
+    \begin{bracealign}
+      \underbrace{
+        \begin{bracealign}
+          \underbrace{
+            - \lambda \frac{\partial^2 T}{\partial x^2}
+          }_{\text{diffusion}}
+          - \underbrace{
+            \mu (T^4 - {T_0}^4)
+          }_{\substack{\text{radiative loss}}}
+        \end{bracealign}
+      }_{\text{heat transferts}}
+      + \underbrace{
+        \sum_{i=1}^{n} \dot{q}_i
+      }_{\substack{\text{heat}\\{\text{sources}}}}
+    \end{bracealign}
+  \]
+\end{dispExample}
+% \iffalse
+%</example>
+% \fi
+%
+% \end{abstract}
+%
+% \clearpage
+%
+% \tableofcontents{}
+%
+% \clearpage
+%
+% \section{Introduction}
+%
+% The \pkg{bracealign} package provides the environment \refEnv{bracealign}
+% inside which brace-like commands are vertically aligned. Supported brace-like
+% commands are:
+% \begin{center}
+%   \begin{tabular}{lll}
+%     \cs{underbrace} &
+%     \cs{underbracket} &
+%     \cs{underparen} \\
+%     \cs{overbrace} &
+%     \cs{overbracket} &
+%     \cs{overparen}
+%   \end{tabular}
+% \end{center}
+% \cs{underbrace} and \cs{overbrace} are standard \LaTeX{} commands. 
+% The commands \cs{underbracket} and \cs{overbracket} are defined, for example,
+% by the packages: \pkg{unicode-math}, \pkg{mathtools}, \pkg{stix2} or
+% \pkg{libertinus}; the commands \cs{underparen} and \cs{overparen} by:
+% \pkg{unicode-math}, \pkg{stix2} or \pkg{libertinus}. The support for new
+% commands can be added by the user.
+%
+% Inside the \refEnv{bracealign} environment, the content of brace-like commands
+% is grabbed and appended inside all same braces with a \cs{vphantom} macro to
+% generate the braces alignment. Note that this prohibits the use of optional
+% arguments for the commands (see \emph{Known issue}, section~\ref{sec:issue-command-with-optionnal-arguments}, page~\pageref{sec:issue-command-with-optionnal-arguments}).
+%
+% \medskip
+%
+% This package originates in an answer on the TeX -- LaTeX Stack
+% Exchange network\footnote{\url{https://tex.stackexchange.com/a/740290}.}.
+%
+% \section{User interface}
+% \label{sec:user-interface}
+%
+% \newcommand{\smallcontent}{\textcolor{cyan}{\rule[-3pt]{1cm}{6pt}}}
+% \newcommand{\medcontent}  {\textcolor{cyan}{\rule[-6pt]{1.2cm}{12pt}}}
+% \newcommand{\bigcontent}  {\textcolor{cyan}{\rule[-12pt]{2cm}{24pt}}}
+% \newcommand{\hugecontent} {\textcolor{cyan}{\rule[-18pt]{2.5cm}{36pt}}}
+%
+% The examples given in this section use the following commands:
+% \iffalse
+%<*example>
+% \fi
+\begin{dispListing}
+\newcommand{\smallcontent}{\textcolor{cyan}{\rule[-3pt]{1cm}{6pt}}}
+\newcommand{\medcontent}  {\textcolor{cyan}{\rule[-6pt]{1.2cm}{12pt}}}
+\newcommand{\bigcontent}  {\textcolor{cyan}{\rule[-12pt]{2cm}{24pt}}}
+\newcommand{\hugecontent} {\textcolor{cyan}{\rule[-18pt]{2.5cm}{36pt}}}
+\end{dispListing}
+% \iffalse
+%</example>
+% \fi
+% \noindent The \pkg{xcolor} package is also required (for the command
+% \cs{textcolor}), as loading the \pkg{amsmath} package (for the command
+% \cs{text}) and a package that defines \cs{underbracket} (such as
+% \pkg{mathtools}).
+%
+% \subsection{Environment}
+%
+% \begin{docEnvironment}{bracealign}{ \oarg{options list} }
+%   Vertically aligns the brace-like commands in \meta{environment content}.
+%   Each command is aligned separately (note that commands that uses
+%   internally a brace-like command are also aligned). \refEnv{bracealign}
+%   environments can be nested.
+%
+%   The keys described in section~\ref{sec:keys}, can be used in \meta{options list} to
+%   activate, or deactivate, the alignment of each braces.
+%
+%\clearpage
+%
+% \noindent\vspace{-\baselineskip}
+%
+% \marginpar{\hfill
+%   \parbox[t]{0.88\linewidth}{\vspace*{1cm}\raggedright
+%     Separate alignment of brace-like commands
+%   }
+% }
+% \iffalse
+%<*example>
+% \fi
+\begin{dispExample}
+\[
+  \begin{bracealign}
+    \underbrace{\medcontent}_{1}
+    ~+~ \underbracket{\smallcontent}_{A}
+    ~=~ \underbrace{\hugecontent}_{2}
+    ~+~ \underbracket{\bigcontent}_{B}
+    ~+~ \underbrace{\smallcontent}_{3}
+  \end{bracealign}
+\]
+\end{dispExample}
+% \iffalse
+%</example>
+% \fi
+%
+% \vfill
+%
+% \marginpar{\hfill
+%   \parbox[t]{0.88\linewidth}{\vspace*{1cm}\raggedright
+%     Nested \refEnv*{bracealign} environments
+%   }
+% }
+% \iffalse
+%<*example>
+% \fi
+\begin{dispExample}
+\[
+  \begin{bracealign}
+    \underbrace{
+      \begin{bracealign}
+        \underbrace{\medcontent}_{1}
+        ~+~ \underbrace{\smallcontent}_{2}
+      \end{bracealign}
+    }_{\text{nested}}
+    ~=~ \underbrace{\hugecontent}_{3}
+    ~+~ \underbrace{\bigcontent}_{4}
+    ~+~ \underbrace{\smallcontent}_{5}
+  \end{bracealign}
+\]
+\end{dispExample}
+% \iffalse
+%</example>
+% \fi
+%
+%\vfill
+%
+% \marginpar{\hfill
+%   \parbox[t]{0.88\linewidth}{\vspace*{1cm}\raggedright
+%     Using internally a brace-like command
+%
+%     \bigskip
+%
+%     \itshape\footnotesize Note: the {\normalfont \cs{ubrace}} command has been
+%     suggested by Enrico Gregorio to fix the syntax and spacing issues of
+%     \cs{underbrace} (see {\normalfont
+%     \url{https://tex.stackexchange.com/a/728627/}}).
+%   }
+% }
+% \iffalse
+%<*example>
+% \fi
+\begin{dispExample}
+\newcommand{\ubrace}[2]{{\underbrace{#1}_{#2}}}
+\[
+  \begin{bracealign}
+    \ubrace{\medcontent}{1}
+    ~+~ \underbrace{\smallcontent}_{A}
+    ~=~ \ubrace{\hugecontent}{2}
+    ~+~ \underbrace{\bigcontent}_{B}
+    ~+~ \ubrace{\smallcontent}{3}
+  \end{bracealign}
+\]
+\end{dispExample}
+% \iffalse
+%</example>
+% \fi
+%
+% \clearpage
+%
+% \end{docEnvironment}
+%
+% \subsection{Command}
+%
+%\begin{docCommand}{bracealignsetup}{ \marg{options list} }
+%  Sets options for every \refEnv{bracealign} environments. All keys described
+%  in the section~\ref{sec:keys} can be used in \meta{options list}.
+%
+%  This is equivalent to \cs{SetKeys} |[bracealign]| \marg{options list}.
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{dispExample}
+\bracealignsetup{underbracket=false}
+
+\[
+  \begin{bracealign}
+    \underbrace{\medcontent}_{1}
+    ~+~ \underbracket{\smallcontent}_{A}
+    ~=~ \underbrace{\hugecontent}_{2}
+    ~+~ \underbracket{\bigcontent}_{B}
+    ~+~ \underbrace{\smallcontent}_{3}
+  \end{bracealign}
+\]
+\end{dispExample}
+% \iffalse
+%</example>
+% \fi
+% \end{docCommand}
+%
+% \subsection{Keys}
+% \label{sec:keys}
+%
+% \begin{docKeys}[
+%   doc keypath = bracealign,
+%   doc parameter = {=true\textbar{}false}
+%   ]
+%   {
+%     {
+%       doc name = {overbrace},
+%       doc description = {default |true|, initially |true|},
+%     },
+%     {
+%       doc name = {nooverbrace},
+%       doc description = {default |true|, inverse of |overbrace|},
+%     },
+%   }
+% \end{docKeys}
+% \begin{docKeys}[
+%   doc keypath = bracealign,
+%   doc parameter = {=true\textbar{}false}
+%   ]
+%   {
+%     {
+%       doc name = {underbrace},
+%       doc description = {default |true|, initially |true|},
+%     },
+%     {
+%       doc name = {nounderbrace},
+%       doc description = {default |true|, inverse of |underbrace|},
+%     },
+%   }
+% \end{docKeys}
+% \begin{docKeys}[
+%   doc keypath = bracealign,
+%   doc parameter = {=true\textbar{}false}
+%   ]
+%   {
+%     {
+%       doc name = {overbracket},
+%       doc description = {default |true|, initially |true|},
+%     },
+%     {
+%       doc name = {nooverbracket},
+%       doc description = {default |true|, inverse of |overbracket|},
+%     },
+%   }
+% \end{docKeys}
+% \begin{docKeys}[
+%   doc keypath = bracealign,
+%   doc parameter = {=true\textbar{}false}
+%   ]
+%   {
+%     {
+%       doc name = {underbracket},
+%       doc description = {default |true|, initially |true|},
+%     },
+%     {
+%       doc name = {nounderbracket},
+%       doc description = {default |true|, inverse of |underbracket|},
+%     },
+%   }
+% \end{docKeys}
+% \begin{docKeys}[
+%   doc keypath = bracealign,
+%   doc parameter = {=true\textbar{}false}
+%   ]
+%   {
+%     {
+%       doc name = {overparen},
+%       doc description = {default |true|, initially |true|},
+%     },
+%     {
+%       doc name = {nooverparen},
+%       doc description = {default |true|, inverse of |overparen|},
+%     },
+%   }
+% \end{docKeys}
+% \begin{docKeys}[
+%   doc keypath = bracealign,
+%   doc parameter = {=true\textbar{}false}
+%   ]
+%   {
+%     {
+%       doc name = {underparen},
+%       doc description = {default |true|, initially |true|},
+%     },
+%     {
+%       doc name = {nounderparen},
+%       doc description = {default |true|, inverse of |underparen|},
+%     },
+%   }
+%     Activates, or deactivates, the alignment of the corresponding brace-like
+%     command. These boolean keys are defined when the package \pkg{bracealign}
+%     is loaded, whether the commands are defined or not (as they can be defined
+%     later).
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{dispExample}
+\[
+  \begin{bracealign}[underbrace=false]
+    \underbrace{\medcontent}_{1}
+    ~+~ \underbracket{\smallcontent}_{A}
+    ~=~ \underbrace{\hugecontent}_{2}
+    ~+~ \underbracket{\bigcontent}_{B}
+    ~+~ \underbrace{\smallcontent}_{3}
+  \end{bracealign}
+\]
+\end{dispExample}
+% \iffalse
+%</example>
+% \fi
+% \end{docKeys}
+%
+% \begin{docKeys}[
+%   doc keypath = bracealign,
+%   ]
+%   {
+%     {
+%       doc name = {add-brace},
+%       doc parameter = {=\textbackslash\meta{command} }
+%     },
+%     {
+%       doc name = {add-braces},
+%       doc parameter = {=\marg{commands list}}
+%     }
+%   }
+%     \refKey{/bracealign/add-brace} adds the support for the new brace-like
+%     command
+%     |\|\meta{command}. This also defines the keys \meta{command}
+%     and |no|\meta{command} to activate or deactivate the alignment of
+%     |\|\meta{command} braces.
+%
+%     \refKey{/bracealign/add-braces} adds the support for multiple brace-like
+%     commands, given as a comma separated list of commands.
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{dispExample}
+\newcommand*{\mybrace}[1]{\mathop{\overleftrightarrow{#1}}\limits}
+\bracealignsetup{add-brace=\mybrace}
+
+\[
+  \begin{bracealign}
+    \mybrace{
+      \begin{bracealign}[mybrace=false]
+        \mybrace{\medcontent}^{1}
+        ~+~ \mybrace{\smallcontent}^{2}
+      \end{bracealign}
+    }^{\text{nested}}
+    ~=~ \mybrace{\hugecontent}^{3}
+    ~+~ \mybrace{\bigcontent}^{4}
+    ~+~ \mybrace{\smallcontent}^{5}
+  \end{bracealign}
+\]
+\end{dispExample}
+% \iffalse
+%</example>
+% \fi
+% \end{docKeys}
+%
+% \begin{docKey}[bracealign][before lower=\bigskip\par]{default-braces}
+% {=\marg{commands list}}
+% {no default, initially |\{\cs{underbrace}, \cs{overbrace},\par
+% \cs{underbracket}, \cs{overbracket},\par \cs{underparen}, \cs{overparen}\}|}
+% Sets the list of brace-like commands that must be supported by
+% \refEnv{bracealign}. At the beginning of the document (through the
+% |begindocument| hook) the existence of each command is tested and, if the test
+% sucesses, the command is passed to \refKey{/bracealign/add-brace}.
+% \end{docKey}
+%
+% \section{Complements}
+%
+% \subsection{Known issue: Commands with optional arguments}
+% \label{sec:issue-command-with-optionnal-arguments}
+%
+% The brace-like commands are expected to have only one mandatory argument (this
+% argument is grabbed and used to align the braces). In particular, if a command
+% handles optional arguments (such as the commands
+% \cs{underbracket} and \cs{overbracket} as defined by the \pkg{mathtools}
+% package), these optional arguments can't be used inside the
+% \refEnv{bracealign} environment.
+%
+% \subsection{Changelog}
+%
+% \begin{description}
+%  \item[v1.0] Initial version.
+% \end{description}
+%
+% \MaybeStop{}
+%
+% \section{Implementation}
+%
+%\iffalse
+%<*package>
+%\fi
+% \setlength{\parindent}{0em}
+% \setlength{\parskip}{\smallskipamount}
+%
+% \iffalse ^^A Not in doc to get the right line numbering
+% Internal prefix for \pkg{DocStrip}.
+%    \begin{macrocode}
+%<@@=bracealign>
+%    \end{macrocode}
+% \fi
+%
+% \subsection{Adding brace command}
+%
+% The sequence that store the brace-like commands.
+%    \begin{macrocode}
+\seq_new:N \l_bracealign_brace_seq
+%    \end{macrocode}
+%
+% \begin{macro}{\bracealign_add_brace:n}
+% \begin{macro}{\bracealign_add_brace:e}
+% \begin{macro}{\bracealign_add_brace:N}
+%   Add the brace command |#1|.
+%    \begin{macrocode}
+\msg_new:nnn { bracealign } { already-added-brace }
+  { Brace~command~\token_to_str:c #1~has~already~been~added.~Skipped. }
+\cs_new:Nn \bracealign_add_brace:n
+  {
+    \seq_if_in:NnTF \l_bracealign_brace_seq { #1 }
+      {
+        \msg_warning:nnn { bracealign } { already-added-brace } { #1 }
+      }
+      {
+        \seq_put_right:Nn \l_bracealign_brace_seq { #1 }
+%    \end{macrocode}
+%
+%   Backup the standard command.
+%    \begin{macrocode}
+        \cs_set_eq:cc { @@_#1_std_cmd:n } { #1 }
+%    \end{macrocode}
+%
+%   Define switches, if needed (for commands initially in
+%   \cs{l@@_default_brace_clist}, the switches are defined when the
+%   package is loaded, but the commands are added through the hook
+%   |begindocument|).
+%    \begin{macrocode}
+        \bool_if_exist:cF { l@@_#1_bool }
+          { \@@_define_switches:e { #1 } }
+%    \end{macrocode}
+%
+%   These token lists store the content of braces.
+%    \begin{macrocode}
+        \tl_new:c { g@@_#1_strutcontent_tl }
+        \tl_new:c { l@@_#1_strutcontent_tl }
+        \tl_new:c { l@@_#1_strutcontent_surround_tl }
+%    \end{macrocode}
+%
+%   Command wrapper to collect the braces content.
+%    \begin{macrocode}
+        \cs_new:cn { @@_#1_collect_strutcontent:n }
+          {
+            \tl_gput_right:cn { g@@_#1_strutcontent_tl } { ##1 }
+            \use:c { @@_#1_std_cmd:n } { }
+          }
+%    \end{macrocode}
+%
+%   Command wrapper to use the braces content in \cs{vphantom}.
+%    \begin{macrocode}
+        \cs_new:cn { @@_#1_use_strutcontent:n }
+          {
+            \use:c {  @@_#1_std_cmd:n }
+              {
+                \vphantom
+                  {
+                    \tl_use:c { l@@_#1_strutcontent_tl }
+                  }
+                  ##1
+              }
+          }
+      }
+  }
+\cs_generate_variant:Nn \bracealign_add_brace:n { e }
+\cs_new:Nn \bracealign_add_brace:N
+  {
+    \bracealign_add_brace:e { \cs_to_str:N #1 }
+  }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% Keys \refKey{/bracealign/add-brace} and \refKey{/bracealign/add-braces}
+% (wrapper to \cs{bracealign_add_brace:N}).
+%    \begin{macrocode}
+\keys_define:nn { bracealign }
+  {
+    add-brace   .code:n = { \bracealign_add_brace:N  #1 },
+    add-braces  .code:n =
+      {
+        \clist_map_function:nN { #1 } \bracealign_add_brace:N
+      },
+  }
+%    \end{macrocode}
+%
+% \begin{macro}{\@@_define_switches:n}
+% \begin{macro}{\@@_define_switches:e}
+% \begin{macro}{\@@_define_switches:N}
+%   Define the switches for the brace command |#1|.
+%    \begin{macrocode}
+\cs_new:Nn \@@_define_switches:n
+  {
+    \bool_new:c { l@@_#1_bool }
+    \bool_set_true:c { l@@_#1_bool }
+    \keys_define:nn { bracealign }
+      {
+        #1   .bool_set:c          = { l@@_#1_bool },
+        no#1 .bool_set_inverse:c  = { l@@_#1_bool },
+      }
+  }
+\cs_generate_variant:Nn \@@_define_switches:n { e }
+\cs_new:Nn \@@_define_switches:N
+  {
+    \@@_define_switches:e { \cs_to_str:N #1 }
+  }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Alteration of brace command}
+%
+% These three commands are used for each brace. |#1| is the brace name.
+%
+% \begin{macro}{\@@_initialize:n}
+%   Sets the brace command to collect its content in |\g@@_#1_strutcontent_tl|.
+%    \begin{macrocode}
+\cs_new:Nn \@@_initialize:n
+  {
+    \tl_set_eq:cc
+      { l@@_#1_strutcontent_surround_tl }
+      { g@@_#1_strutcontent_tl }
+    \tl_clear:c { g@@_#1_strutcontent_tl }
+    \cs_set_eq:cc
+      { #1 }
+      { @@_#1_collect_strutcontent:n }
+  }
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_use_strutcontent:n}
+%   Set the brace command to use the all braces contents as strut (using
+%   \cs{vphantom}).
+%    \begin{macrocode}
+\cs_new:Nn \@@_use_strutcontent:n
+  {
+    \tl_set_eq:cc
+      { l@@_#1_strutcontent_tl }
+      { g@@_#1_strutcontent_tl }
+    \cs_set_eq:cc
+      { #1 }
+      { @@_#1_use_strutcontent:n }
+  }
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_finalize:n}
+% Restore |\g@@_#1_strutcontent_tl| for the surrounding group.
+%    \begin{macrocode}
+\cs_new:Nn \@@_finalize:n
+  {
+    \tl_set_eq:cc
+      { g@@_#1_strutcontent_tl }
+      { l@@_#1_strutcontent_surround_tl }
+  }
+%    \end{macrocode}
+% \end{macro}
+%
+% \subsection{Main command}
+%
+% Sequence of active braces.
+%    \begin{macrocode}
+\seq_new:N \l@@_active_brace_seq
+%    \end{macrocode}
+%
+% \begin{macro}{\@@_update_active_braces:}
+% Update the sequence of active brace commands.
+%    \begin{macrocode}
+\cs_new:Nn \@@_update_active_braces:
+  {
+%    \end{macrocode}
+%   Restore standard brace commands (in the case the command is set is the
+%   surrounding group, and unset in the current one).
+%    \begin{macrocode}
+    \seq_map_inline:Nn \l@@_active_brace_seq
+      {
+        \cs_set_eq:cc { ##1 } { @@_##1_std_cmd:n }
+      }
+%    \end{macrocode}
+%    Set \cs{l@@_active_brace_seq}.
+%    \begin{macrocode}
+    \seq_clear:N \l@@_active_brace_seq
+    \seq_map_inline:Nn \l_bracealign_brace_seq
+      {
+        \bool_if:cT { l@@_##1_bool }
+          { \seq_put_right:Nn \l@@_active_brace_seq { ##1 } }
+      }
+  }
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bracealign_bracealign:n}
+% Align braces in |#1|.
+%    \begin{macrocode}
+\cs_new:Nn \bracealign_bracealign:n
+  {
+%    \end{macrocode}
+%
+% List active brace commands.
+%    \begin{macrocode}
+    \@@_update_active_braces:
+%    \end{macrocode}
+%
+%   Set the braces to collect their contents.
+%    \begin{macrocode}
+    \seq_map_inline:Nn \l@@_active_brace_seq
+      { \@@_initialize:n { ##1 } }
+%    \end{macrocode}
+%
+%   Expand |#1| in an unused box.
+%    \begin{macrocode}
+    \hbox_set:Nn \l_tmpa_box { $ #1 $ }
+%    \end{macrocode}
+%
+%   Set the braces to automatically use a strut, and align.
+%    \begin{macrocode}
+    \seq_map_inline:Nn \l@@_active_brace_seq
+      { \@@_use_strutcontent:n { ##1 } }
+%    \end{macrocode}
+%
+%   Typeset |#1|.
+%    \begin{macrocode}
+    #1
+%    \end{macrocode}
+%
+%   Finalize.
+%    \begin{macrocode}
+    \seq_map_inline:Nn \l@@_active_brace_seq
+      { \@@_finalize:n { ##1 } }
+  }
+%    \end{macrocode}
+% \end{macro}
+%
+% \subsection{User interface}
+%
+% \begin{macro}{\bracealignsetup}
+% Set \pkg{bracealign} keys.
+%    \begin{macrocode}
+\NewDocumentCommand { \bracealignsetup } { m }
+  {
+    \keys_set:nn { bracealign } { #1 }
+  }
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{bracealign}
+% Main environment.
+%    \begin{macrocode}
+\NewDocumentEnvironment { bracealign } { O{} b }
+  {
+    \bracealignsetup{ #1 }
+    \bracealign_bracealign:n { #2 }
+  }
+  {
+  }
+%    \end{macrocode}
+% \end{environment}
+%
+% \subsection{Default braces}
+%
+% The |clist| that stores the default brace commands.
+%    \begin{macrocode}
+\clist_new:N \l@@_default_brace_clist
+\keys_define:nn { bracealign }
+  {
+    default-braces  .clist_set:N = \l@@_default_brace_clist,
+    default-braces  .initial:n =
+      {
+        \underbrace,    \overbrace,
+        \underbracket,  \overbracket,
+        \underparen,    \overparen
+      },
+  }
+%    \end{macrocode}
+%
+% Define the switches for the commands initially in
+% \cs{l@@_default_brace_clist} to make them available in the preamble
+% (these commands are added through the hook |begindocument|).
+%    \begin{macrocode}
+\clist_map_inline:Nn \l@@_default_brace_clist
+  {
+   \@@_define_switches:N #1
+  }
+%    \end{macrocode}
+%
+% \subsection{Hook: \texttt{begindocument}}
+%
+% All these packages define brace commands. Wait for their commands definition.
+%    \begin{macrocode}
+\clist_map_inline:nn
+  {
+    mathtools,
+    unicode-math-luatex, unicode-math-xetex,
+    libertinus, libertinust1math,
+    stix2-type1, stix2
+  }
+  { \hook_gset_rule:nnnn { begindocument } { . } { after } { #1 } }
+%    \end{macrocode}
+%
+% Add braces in \cs{l@@_default_brace_clist}.
+%    \begin{macrocode}
+\hook_gput_code:nnn { begindocument } { . }
+  {
+    \clist_map_inline:Nn \l@@_default_brace_clist
+      {
+        \cs_if_exist:NT #1 { \bracealign_add_brace:N #1 }
+      }
+  }
+%    \end{macrocode}
+%
+%\iffalse
+%</package> ^^A End of package implementation.
+%\fi
+%
+% \iffalse % ^^A The following is not for doc
+%
+%<*docstyle>
+%
+% \section*{bracealign-doc package}
+%
+% The following define some styles used for documentation and should not be
+% included in the documentation itself.
+%
+% \subsection*{Packages}
+%
+%    \begin{macrocode}
+\RequirePackage{xcolor}
+\RequirePackage{metalogo}
+\PassOptionsToPackage{hyperref}{xcolor}
+\RequirePackage[many]{tcolorbox}
+\tcbuselibrary{listings}
+\tcbuselibrary{documentation}
+\hypersetup{hidelinks}
+%    \end{macrocode}
+%
+% \subsection*{Colors}
+%
+%    \begin{macrocode}
+\definecolor{bracealign_lavender}{rgb}{0.92,0.92,1}
+\definecolor{bracealign_darkblue}{rgb}{0.1,0.2,0.5}
+\definecolor{bracealign_darkgreen}{rgb}{0,0.39,0}
+\definecolor{bracealign_beige}{rgb}{.96,.96,.86}
+\colorlet{bracealign_commands}{bracealign_darkblue}
+\colorlet{bracealign_keys}{bracealign_darkgreen}
+\colorlet{bracealign_lengths}{violet}
+\colorlet{bracealign_options}{Definition} % from tcolorbox documentation
+%    \end{macrocode}
+%
+% \subsection*{listings styles}
+%
+%    \begin{macrocode}
+\lstdefinestyle{lstbracealigndoc}{%
+  language = [LaTeX]TeX,
+  alsoletter      = {_,:},% for expl3
+  columns         = fullflexible,
+  keepspaces      = true,
+  keywordstyle    = {\bfseries\color{bracealign_darkblue}},
+  texcsstyle      = *{\bfseries\color{bracealign_darkblue}},
+  commentstyle    = {\color{gray}},
+  identifierstyle = {\color{bracealign_darkgreen}},
+  morekeywords    = {},% keywordsprefix needs a morekeywords before
+  keywordsprefix  = {\\},
+%    \end{macrocode}
+% For literate, the extra braces around the replacement text avoid the error: "Argument of |lst at FillFixed@| has an extra \}."
+%    \begin{macrocode}
+  literate        = *{\$}{{\textcolor{red}{\$}}}{1}
+                    {\&}{{\textcolor{red}{\&}}}{1}
+                    {\}}{{\textcolor{darkgray}{\}}}}{1}
+                    {\{}{{\textcolor{darkgray}{\{}}}{1}
+                    {\\\\}{{\textcolor{red}{\textbackslash\textbackslash}}}{2}
+%    \begin{macrocode}
+% One \% and four spaces to remove extra lines added by \cs{macrocode}
+%    \end{macrocode}
+                    {\%\ \ \ \ }{}0,
+  basicstyle      = \ttfamily\footnotesize,
+  frame           = none,
+  framesep        = 0pt,
+  aboveskip       = 0pt,
+  belowskip       = 0pt,
+}
+\lstdefinestyle{lstbracealigncode}{%
+  style           = lstbracealigndoc,
+  backgroundcolor = \color{bracealign_beige},
+  breakindent     = 1cm,
+  numbers         = left,
+  numberstyle     = \scriptsize\ttfamily\color{gray},
+  aboveskip       = \smallskipamount,
+  belowskip       = \smallskipamount,
+}
+%    \end{macrocode}
+%
+% \subsection*{tcolorbox}
+%
+%    \begin{macrocode}
+\tcbset{% copied and adapted from tcolorbox.doc.s_main.sty
+  documentation listing style=lstbracealigndoc,%
+  doc keypath=bracealign,
+  size=small,%
+  % verbatim ignore percent,
+  %% styles
+  docexample/.style={%
+    bicolor jigsaw,
+    before skip balanced=\medskipamount,
+    after skip balanced=\medskipamount,
+    fonttitle=\bfseries,
+    fontlower=\normalfont,
+    halign lower=center,
+    colframe=bracealign_darkblue,
+    colback=bracealign_lavender,
+    colbacklower=white,
+    drop fuzzy shadow,
+  },
+  color key=bracealign_keys,
+  color command=bracealign_commands,
+  color length=bracealign_lengths,
+  doc head key={fontlower=\footnotesize, collower=darkgray},
+  before doc body={\parskip=\smallskipamount},
+}
+%    \end{macrocode}
+%
+% Inline code
+%
+%    \begin{macrocode}
+\DeclareTotalTCBox{\code}{ v }
+  {
+    verbatim,
+    colframe=bracealign_beige,
+    colback=bracealign_beige,
+    sharp corners, 
+    size=tight,
+    left=2pt,
+    right=2pt,
+  }
+  {%
+    \strut\lstinline[basicstyle=\ttfamily\small\color{bracealign_darkblue}]!#1!%
+  }
+%    \end{macrocode}
+%
+% \subsection*{Index}
+%
+% To deal with DocStrip @@ prefix, use '=' as index actual, in place of '@'.
+%    \begin{macrocode}
+\begin{filecontents*}{\jobname.mst}
+actual '='
+\end{filecontents*}
+%    \begin{macrocode}
+\tcbset{%
+  index actual={=},
+  index colorize=true,
+  index gather all,
+  index format=pgfsection,
+}
+%    \end{macrocode}
+% Redefine \cs{tcb at doc@index at pgfsection} to add prologue (adapted from
+% tcbdocumentation.code.tex).
+%    \begin{macrocode}
+\def\tcb at doc@index at pgfsection{%
+  \def\index at prologue{%
+    \section*{\kvtcb at text@index}\addcontentsline{toc}{section}{\kvtcb at text@index}
+    {\small%
+      Entries listed in the categories ``commands" and ``internal macros" also
+      include references to package implementation. }
+    \bigskip\par\noindent%
+  }%
+  \tcb at doc@index at pgf@%
+}
+%    \end{macrocode}
+% Unset |\lst at UM| before indexing, to deal with comma (avoid |\unhbox \voidb at x
+% \kern \z@| in index file, see: \url{https://tex.stackexchange.com/a/510108}).
+%    \begin{macrocode}
+\newcommand{\indexmacro}[1]{%
+  \begingroup
+  \let\lst at UM\@empty%
+  \index{{Commands!#1=\tcbIndexPrintComC {#1}}}%
+  \endgroup
+}
+\newcommand{\indexmacrointernal}[1]{%
+  \begingroup
+  \let\lst at UM\@empty%
+  \index{{Internal macros!#1=\tcbIndexPrintComC {#1}}}%
+  \endgroup
+}
+\newcommand{\indexlength}[1]{%
+  \begingroup
+  \let\lst at UM\@empty%
+  \index{{Lengths!#1=\tcbIndexPrintLenC {#1}}}%
+  \endgroup
+}
+%    \end{macrocode}
+%
+% \subsection*{Redefinition of macrocode environment}
+%
+%    \begin{macrocode}
+\let\macrocode\relax
+\lstnewenvironment{macrocode}{%
+  \lstset{%
+    name=macrocode,
+    firstnumber=auto,
+    style=lstbracealigncode,
+    showlines=false,
+    keepspaces=true,
+%    \end{macrocode}
+% Commands identification and indexing
+%
+% Note: index works badly with inherited styles. It seems that "texcs" and
+% "index" keys should be set together.
+%    \begin{macrocode}
+    texcs       = [2]{% commands
+      bracealignsetup
+      ,bracealign_add_brace:e
+      ,bracealign_add_brace:n
+      ,bracealign_add_brace:N
+      ,bracealign_bracealign:n
+    },
+    index       = [2][texcs2],%
+    indexstyle  = [2]\indexmacro,%
+    texcs       = [3]{% lengths
+    },
+    index       = [3][texcs3],%
+    indexstyle  = [3]\indexlength,%
+%    \end{macrocode}
+% Internal macros identification and indexing
+%    \begin{macrocode}
+    texcs       = [4]{% internal macros (@@@@ → @@ with DocStrip)
+      @@@@_define_switches:e
+      ,@@@@_define_switches:n
+      ,@@@@_define_switches:N
+      ,@@@@_finalize:n
+      ,@@@@_initialize:n
+      ,@@@@_update_active_braces:
+      ,@@@@_use_strutcontent:n
+      ,l@@@@_active_brace_seq
+      ,l@@@@_default_brace_clist
+      ,l@@@@_overbrace_bool
+      ,l@@@@_overbracket_bool
+      ,l@@@@_overparen_bool
+      ,l@@@@_underbrace_bool
+      ,l@@@@_underbracket_bool
+      ,l@@@@_underparen_bool
+    },
+    index       = [4][texcs4],%
+    indexstyle  = [4]\indexmacrointernal,%
+%    \end{macrocode}
+% Keys identification and indexing ^^A works badly if keys have spaces
+%    \begin{macrocode}
+    morekeywords = [2]{%
+      bracealign/add-brace
+      ,bracealign/add-braces
+      ,bracealign/default-braces
+      ,bracealign/nooverbrace
+      ,bracealign/nooverbracket
+      ,bracealign/nooverparen
+      ,bracealign/nounderbrace
+      ,bracealign/nounderbracket
+      ,bracealign/nounderparen
+      ,bracealign/overbrace
+      ,bracealign/overbracket
+      ,bracealign/overparen
+      ,bracealign/underbrace
+      ,bracealign/underbracket
+      ,bracealign/underparen
+    },
+    index       = [3][keywords2],%
+    indexstyle  = [3]\lstindexmacro,%
+  }
+%    \end{macrocode}
+% Save and restore the line number (not done by environments defined with
+% |\lstnewenvironment|, see \url{https://tex.stackexchange.com/a/95048}):
+%    \begin{macrocode}
+  \csname\@lst @SetFirstNumber\endcsname
+}{%
+  \csname \@lst @SaveFirstNumber\endcsname
+}
+%    \end{macrocode}
+%
+% \subsection*{Redefinition of macro environment}
+%
+%    \begin{macrocode}
+\DeclareDocumentEnvironment{macro}{m}{%
+%    \end{macrocode}
+% Extraction of macro name. Save/restore current \cs{escapechar} in \cs{count@}.
+%    \begin{macrocode}
+ \count@\escapechar \escapechar=-1
+ \edef\macroname{\string#1}
+ \escapechar\count@
+ \marginpar{%
+   \parbox{0.88\linewidth}{%
+     \scriptsize\flushright\ifcsdef{r at com:\macroname}{\refCom*{\macroname}}{\cs{\macroname}}%
+   }%
+ }
+}{% end of macro environment
+}
+%    \end{macrocode}
+%
+% \subsection*{Documentation styles}
+%
+% \subsubsection*{Tool for references}
+%
+%    \begin{macrocode}
+\def\refDoc#1{\tcb at ref@doc{#1}}
+%    \end{macrocode}
+%
+% \subsubsection*{Package name}
+%
+%    \begin{macrocode}
+\newcommand{\pkg}[1]{\textsf{#1}}
+%    \end{macrocode}
+%
+%
+% \subsubsection*{Redefinition of the \cs{cs} command}
+%
+% To handle |expl3| syntax.
+%
+%    \begin{macrocode}
+\ExplSyntaxOn
+\cs_new_protected:Nn \bracealigndoc_cs:n
+  {
+   \str_set:Nn \l_tmpa_str { #1 }
+   \exp_args:Ne \texttt{ \c_backslash_str \str_use:N \l_tmpa_str }
+ }
+\cs_generate_variant:Nn \bracealigndoc_cs:n { e }
+\RenewDocumentCommand{\cs}{ m }{\bracealigndoc_cs:e { #1} }
+\ExplSyntaxOff
+%    \end{macrocode}
+%
+% \subsubsection*{Package options}
+%
+% Definition of docOption environment to document package options, like keys.
+%    \begin{macrocode}
+\newrobustcmd{\tcbIndexPrintOptionCA}[1]{% adapted from \tcbIndexPrintKeyCA
+  \tcb at Index@Print at CA{#1}{bracealign_options}{package option}%
+}
+\newrobustcmd{\tcbIndexPrintOptionC}[1]{% adapted from \tcbIndexPrintKeyCA
+  \tcb at Index@Print at C{#1}{bracealign_options}%
+}
+\DeclareDocumentEnvironment{docOption}{ O{} m }{%
+  \begin{docKey*}[]
+    [doc name={#2}, doc label={opt:#2}, color key=bracealign_options, #1]
+    {#2}{}{}%
+    \kvtcb at index@command{%
+      \kvtcb at doc@sortindex\idx at actual\tcbIndexPrintOptionCA{#2}%
+    }%
+    \kvtcb at index@command{%
+      {Package options}\idx at level\kvtcb at doc@sortindex\idx at actual%
+      \tcbIndexPrintOptionC{#2}%
+    }%
+}{%
+  \end{docKey*}%
+}
+\def\refOpt{\refDoc{key:opt}}
+%    \end{macrocode}
+%
+%</docstyle>
+%
+% \fi %^^A end of \iffalse
+%
+% \Finale
+%
+\endinput


Property changes on: trunk/Master/texmf-dist/source/latex/bracealign/bracealign.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/bracealign/bracealign.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/bracealign/bracealign.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/bracealign/bracealign.ins	2025-04-22 20:31:37 UTC (rev 75001)
@@ -0,0 +1,48 @@
+%%
+%% Copyright (C) 2025 by Julien Labbé <Julien.Labbe at univ-grenoble-alpes.fr>
+%%
+%% This file may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License (LPPL), either version 1.3c of this license or
+%% (at your option) any later version. The latest version of this license is in
+%% the file https://www.latex-project.org/lppl.txt
+%%
+
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/bracealign}
+
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2025 by Julien Labbé <Julien.Labbe at univ-grenoble-alpes.fr>
+
+This file may be distributed and/or modified under the conditions of the LaTeX
+Project Public License (LPPL), either version 1.3c of this license or (at your
+option) any later version. The latest version of this license is in the file
+https://www.latex-project.org/lppl.txt
+
+\endpreamble
+
+\askforoverwritefalse
+
+\generate{\file{bracealign.sty}{\from{bracealign.dtx}{package}}}
+\generate{\file{bracealign-doc.sty}{\from{bracealign.dtx}{docstyle}}}
+
+\obeyspaces
+\Msg{*************************************************************}
+\Msg{*                                                           *}
+\Msg{* To finish the installation you have to move the following *}
+\Msg{* file into a directory searched by TeX:                    *}
+\Msg{*                                                           *}
+\Msg{*     bracealign.sty                                      *}
+\Msg{*                                                           *}
+\Msg{* To produce the documentation run the file                 *}
+\Msg{* bracealign.dtx through LaTeX.                           *}
+\Msg{*                                                           *}
+\Msg{* Happy TeXing!                                             *}
+\Msg{*                                                           *}
+\Msg{*************************************************************}
+
+\endbatchfile

Added: trunk/Master/texmf-dist/tex/latex/bracealign/bracealign.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bracealign/bracealign.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/bracealign/bracealign.sty	2025-04-22 20:31:37 UTC (rev 75001)
@@ -0,0 +1,177 @@
+%%
+%% This is file `bracealign.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% bracealign.dtx  (with options: `package')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright (C) 2025 by Julien Labbé <Julien.Labbe at univ-grenoble-alpes.fr>
+%% 
+%% This file may be distributed and/or modified under the conditions of the LaTeX
+%% Project Public License (LPPL), either version 1.3c of this license or (at your
+%% option) any later version. The latest version of this license is in the file
+%% https://www.latex-project.org/lppl.txt
+%% 
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesExplPackage{bracealign}{2025/04/17}{v1.0}{Align underbraces and overbraces}
+\seq_new:N \l_bracealign_brace_seq
+\msg_new:nnn { bracealign } { already-added-brace }
+  { Brace~command~\token_to_str:c #1~has~already~been~added.~Skipped. }
+\cs_new:Nn \bracealign_add_brace:n
+  {
+    \seq_if_in:NnTF \l_bracealign_brace_seq { #1 }
+      {
+        \msg_warning:nnn { bracealign } { already-added-brace } { #1 }
+      }
+      {
+        \seq_put_right:Nn \l_bracealign_brace_seq { #1 }
+        \cs_set_eq:cc { __bracealign_#1_std_cmd:n } { #1 }
+        \bool_if_exist:cF { l__bracealign_#1_bool }
+          { \__bracealign_define_switches:e { #1 } }
+        \tl_new:c { g__bracealign_#1_strutcontent_tl }
+        \tl_new:c { l__bracealign_#1_strutcontent_tl }
+        \tl_new:c { l__bracealign_#1_strutcontent_surround_tl }
+        \cs_new:cn { __bracealign_#1_collect_strutcontent:n }
+          {
+            \tl_gput_right:cn { g__bracealign_#1_strutcontent_tl } { ##1 }
+            \use:c { __bracealign_#1_std_cmd:n } { }
+          }
+        \cs_new:cn { __bracealign_#1_use_strutcontent:n }
+          {
+            \use:c {  __bracealign_#1_std_cmd:n }
+              {
+                \vphantom
+                  {
+                    \tl_use:c { l__bracealign_#1_strutcontent_tl }
+                  }
+                  ##1
+              }
+          }
+      }
+  }
+\cs_generate_variant:Nn \bracealign_add_brace:n { e }
+\cs_new:Nn \bracealign_add_brace:N
+  {
+    \bracealign_add_brace:e { \cs_to_str:N #1 }
+  }
+\keys_define:nn { bracealign }
+  {
+    add-brace   .code:n = { \bracealign_add_brace:N  #1 },
+    add-braces  .code:n =
+      {
+        \clist_map_function:nN { #1 } \bracealign_add_brace:N
+      },
+  }
+\cs_new:Nn \__bracealign_define_switches:n
+  {
+    \bool_new:c { l__bracealign_#1_bool }
+    \bool_set_true:c { l__bracealign_#1_bool }
+    \keys_define:nn { bracealign }
+      {
+        #1   .bool_set:c          = { l__bracealign_#1_bool },
+        no#1 .bool_set_inverse:c  = { l__bracealign_#1_bool },
+      }
+  }
+\cs_generate_variant:Nn \__bracealign_define_switches:n { e }
+\cs_new:Nn \__bracealign_define_switches:N
+  {
+    \__bracealign_define_switches:e { \cs_to_str:N #1 }
+  }
+\cs_new:Nn \__bracealign_initialize:n
+  {
+    \tl_set_eq:cc
+      { l__bracealign_#1_strutcontent_surround_tl }
+      { g__bracealign_#1_strutcontent_tl }
+    \tl_clear:c { g__bracealign_#1_strutcontent_tl }
+    \cs_set_eq:cc
+      { #1 }
+      { __bracealign_#1_collect_strutcontent:n }
+  }
+\cs_new:Nn \__bracealign_use_strutcontent:n
+  {
+    \tl_set_eq:cc
+      { l__bracealign_#1_strutcontent_tl }
+      { g__bracealign_#1_strutcontent_tl }
+    \cs_set_eq:cc
+      { #1 }
+      { __bracealign_#1_use_strutcontent:n }
+  }
+\cs_new:Nn \__bracealign_finalize:n
+  {
+    \tl_set_eq:cc
+      { g__bracealign_#1_strutcontent_tl }
+      { l__bracealign_#1_strutcontent_surround_tl }
+  }
+\seq_new:N \l__bracealign_active_brace_seq
+\cs_new:Nn \__bracealign_update_active_braces:
+  {
+    \seq_map_inline:Nn \l__bracealign_active_brace_seq
+      {
+        \cs_set_eq:cc { ##1 } { __bracealign_##1_std_cmd:n }
+      }
+    \seq_clear:N \l__bracealign_active_brace_seq
+    \seq_map_inline:Nn \l_bracealign_brace_seq
+      {
+        \bool_if:cT { l__bracealign_##1_bool }
+          { \seq_put_right:Nn \l__bracealign_active_brace_seq { ##1 } }
+      }
+  }
+\cs_new:Nn \bracealign_bracealign:n
+  {
+    \__bracealign_update_active_braces:
+    \seq_map_inline:Nn \l__bracealign_active_brace_seq
+      { \__bracealign_initialize:n { ##1 } }
+    \hbox_set:Nn \l_tmpa_box { $ #1 $ }
+    \seq_map_inline:Nn \l__bracealign_active_brace_seq
+      { \__bracealign_use_strutcontent:n { ##1 } }
+    #1
+    \seq_map_inline:Nn \l__bracealign_active_brace_seq
+      { \__bracealign_finalize:n { ##1 } }
+  }
+\NewDocumentCommand { \bracealignsetup } { m }
+  {
+    \keys_set:nn { bracealign } { #1 }
+  }
+\NewDocumentEnvironment { bracealign } { O{} b }
+  {
+    \bracealignsetup{ #1 }
+    \bracealign_bracealign:n { #2 }
+  }
+  {
+  }
+\clist_new:N \l__bracealign_default_brace_clist
+\keys_define:nn { bracealign }
+  {
+    default-braces  .clist_set:N = \l__bracealign_default_brace_clist,
+    default-braces  .initial:n =
+      {
+        \underbrace,    \overbrace,
+        \underbracket,  \overbracket,
+        \underparen,    \overparen
+      },
+  }
+\clist_map_inline:Nn \l__bracealign_default_brace_clist
+  {
+   \__bracealign_define_switches:N #1
+  }
+\clist_map_inline:nn
+  {
+    mathtools,
+    unicode-math-luatex, unicode-math-xetex,
+    libertinus, libertinust1math,
+    stix2-type1, stix2
+  }
+  { \hook_gset_rule:nnnn { begindocument } { . } { after } { #1 } }
+\hook_gput_code:nnn { begindocument } { . }
+  {
+    \clist_map_inline:Nn \l__bracealign_default_brace_clist
+      {
+        \cs_if_exist:NT #1 { \bracealign_add_brace:N #1 }
+      }
+  }
+\endinput
+%%
+%% End of file `bracealign.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/bracealign/bracealign.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2025-04-22 20:30:01 UTC (rev 75000)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2025-04-22 20:31:37 UTC (rev 75001)
@@ -157,7 +157,7 @@
     bookshelf booktabs booktabs-de booktabs-fr boolexpr boondox bophook
     borceux bosisio
     boxedminipage boxhandler bpchem bpolynomial
-    br-lex bracketkey braids braille braket
+    br-lex bracealign bracketkey braids braille braket
     brandeis-dissertation brandeis-problemset brandeis-thesis
     breakcites breakurl bredzenie breqn bropd brushscr
     bubblesort buctthesis bullcntr bundledoc burmese

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2025-04-22 20:30:01 UTC (rev 75000)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2025-04-22 20:31:37 UTC (rev 75001)
@@ -2172,7 +2172,8 @@
  'booktabs-de', 'NULL',                 # doc package
  'booktabs-fr', 'NULL',                 # doc package
  'bmstu',	'img|sty|logo.pdf|' . $standardtex,
- 'bussproofs-extra', 'bussproofs-extra.sty',		# not bpextra.sty
+ 'bussproofs-extra', 'bussproofs-extra.sty',	# not bpextra.sty
+ 'bracealign',  'bracealign.sty',		# not -doc.sty
  'breqn',       '\.sty|\.sym',
  'buctthesis',	'buct.*cls',
  'c-pascal',    '^[^d].*\.tex|' . $standardtex, # not demo*.tex

Added: trunk/Master/tlpkg/tlpsrc/bracealign.tlpsrc
===================================================================
Modified: trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2025-04-22 20:30:01 UTC (rev 75000)
+++ trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2025-04-22 20:31:37 UTC (rev 75001)
@@ -32,6 +32,7 @@
 depend boldtensors
 depend bosisio
 depend bpchem
+depend bracealign
 depend bropd
 depend bussproofs
 depend bussproofs-extra



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