| 1 |
%% |
| 2 |
%% This is file `latex-lab-mathtools.ltx', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% latex-lab-mathtools.dtx (with options: `kernel') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% Copyright 2021-2025 LaTeX Project |
| 12 |
%% |
| 13 |
%% This file was generated from file(s) of the `LaTeX-lab Bundle'. |
| 14 |
%% ------------------------------------------------------------------------------------ |
| 15 |
%% |
| 16 |
%% It may be distributed and/or modified under the |
| 17 |
%% conditions of the LaTeX Project Public License, either version 1.3c |
| 18 |
%% of this license or (at your option) any later version. |
| 19 |
%% The latest version of this license is in |
| 20 |
%% http://www.latex-project.org/lppl.txt |
| 21 |
%% and version 1.3c or later is part of all distributions of LaTeX |
| 22 |
%% version 2008 or later. |
| 23 |
%% |
| 24 |
%% This file may only be distributed together with a copy of the LaTeX |
| 25 |
%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' |
| 26 |
%% without such generated files. |
| 27 |
%% |
| 28 |
%% The newest sources can be found below |
| 29 |
%% |
| 30 |
%% https://github.com/latex3/latex2e/required/latex-lab |
| 31 |
%% |
| 32 |
%% where one can also log issues in case there are any. |
| 33 |
%% |
| 34 |
%% |
| 35 |
%% File: latex-lab-mathtools.dtx |
| 36 |
\def\ltlabmathtoolsdate{2025-06-18} |
| 37 |
\def\ltlabmathtoolsversion{0.80c} |
| 38 |
\ProvidesFile{latex-lab-mathtools.ltx} |
| 39 |
[2024-07-13 v0.1a mathtools adaptions] |
| 40 |
\RequirePackage{tagpdf-base} |
| 41 |
\ExplSyntaxOn |
| 42 |
\tl_new:N\l__math_mathtools_init_tl |
| 43 |
\cs_if_eq:NNTF\intertext@ \MT_intertext: |
| 44 |
{ |
| 45 |
\tl_set:Nn \l__math_mathtools_init_tl {\MT_orig_intertext_false:} |
| 46 |
} |
| 47 |
{ |
| 48 |
\tl_set:Nn \l__math_mathtools_init_tl {\MT_orig_intertext_true:} |
| 49 |
} |
| 50 |
\cs_if_eq:NNTF\shortintertext@ \MT_shortintertext:n |
| 51 |
{ |
| 52 |
\tl_put_right:Nn \l__math_mathtools_init_tl |
| 53 |
{\MT_orig_shortintertext_false:} |
| 54 |
} |
| 55 |
{ |
| 56 |
\tl_put_right:Nn \l__math_mathtools_init_tl |
| 57 |
{\MT_orig_shortintertext_true:} |
| 58 |
} |
| 59 |
\def\MT_intertext: {% |
| 60 |
\def\intertext##1{% |
| 61 |
\ifvmode\else\\\@empty\fi |
| 62 |
\noalign{% |
| 63 |
\penalty\postdisplaypenalty\vskip\belowdisplayskip |
| 64 |
\vskip-\lineskiplimit % CCS |
| 65 |
\vskip\normallineskiplimit % CCS |
| 66 |
\vskip\l_MT_above_intertext_sep |
| 67 |
\vbox{% |
| 68 |
\ifmeasuring@\tag_suspend:n{\measuring}\fi |
| 69 |
\normalbaselines |
| 70 |
\ifdim |
| 71 |
\ifdim\@totalleftmargin=\z@ |
| 72 |
\linewidth |
| 73 |
\else |
| 74 |
-\maxdimen |
| 75 |
\fi |
| 76 |
=\columnwidth |
| 77 |
\else \parshape\@ne \@totalleftmargin \linewidth |
| 78 |
\fi |
| 79 |
\tag_mc_end_push: |
| 80 |
\tagpdfsetup{para/tag=Span} |
| 81 |
\noindent\ignorespaces##1\par |
| 82 |
\tag_mc_begin_pop:n{}}% |
| 83 |
\penalty\predisplaypenalty\vskip\abovedisplayskip% |
| 84 |
\vskip-\lineskiplimit % CCS |
| 85 |
\vskip\normallineskiplimit % CCS |
| 86 |
\vskip\l_MT_below_intertext_sep |
| 87 |
}% |
| 88 |
}% |
| 89 |
\MH_let:NwN \shortintertext \shortintertext@ |
| 90 |
} |
| 91 |
\def\MT_orig_shortintertext:n #1{% |
| 92 |
\ifvmode\else\\\@empty\fi |
| 93 |
\noalign{% |
| 94 |
\penalty\postdisplaypenalty\vskip\abovedisplayshortskip |
| 95 |
\vbox{% |
| 96 |
\ifmeasuring@\tag_suspend:n{\measuring}\fi |
| 97 |
\normalbaselines |
| 98 |
\MH_if_dim:w |
| 99 |
\MH_if_dim:w \@totalleftmargin=\z@ |
| 100 |
\linewidth |
| 101 |
\MH_else: |
| 102 |
-\maxdimen |
| 103 |
\MH_fi: |
| 104 |
=\columnwidth |
| 105 |
\MH_else: |
| 106 |
\parshape\@ne \@totalleftmargin \linewidth |
| 107 |
\MH_fi: |
| 108 |
\tag_mc_end_push: |
| 109 |
\tagpdfsetup{para/tag=Span} |
| 110 |
\tagpdfparaOn |
| 111 |
\noindent\ignorespaces#1\par |
| 112 |
\tag_mc_begin_pop:n{}} |
| 113 |
\penalty\predisplaypenalty\vskip\abovedisplayshortskip% |
| 114 |
}% |
| 115 |
} |
| 116 |
\def\MT_shortintertext:n #1{% |
| 117 |
\ifvmode\else\\\@empty\fi |
| 118 |
\noalign{% |
| 119 |
\penalty\postdisplaypenalty\vskip\abovedisplayshortskip |
| 120 |
\vskip-\lineskiplimit |
| 121 |
\vskip\normallineskiplimit |
| 122 |
\vskip\l_MT_above_shortintertext_sep |
| 123 |
\vbox{% |
| 124 |
\ifmeasuring@\tag_suspend:n{\measuring}\fi |
| 125 |
\normalbaselines |
| 126 |
\MH_if_dim:w |
| 127 |
\MH_if_dim:w \@totalleftmargin=\z@ |
| 128 |
\linewidth |
| 129 |
\MH_else: |
| 130 |
-\maxdimen |
| 131 |
\MH_fi: |
| 132 |
=\columnwidth |
| 133 |
\MH_else: |
| 134 |
\parshape\@ne \@totalleftmargin \linewidth |
| 135 |
\MH_fi: |
| 136 |
\tag_mc_end_push: |
| 137 |
\tagpdfsetup{para/tag=P} |
| 138 |
\tagpdfparaOn |
| 139 |
\noindent\ignorespaces#1\par |
| 140 |
\tag_mc_begin_pop:n{}}% |
| 141 |
\penalty\predisplaypenalty\vskip\abovedisplayshortskip% |
| 142 |
\vskip-\lineskiplimit |
| 143 |
\vskip\normallineskiplimit |
| 144 |
\vskip\l_MT_below_shortintertext_sep |
| 145 |
}% |
| 146 |
} |
| 147 |
\renewcommand*\MT_mult_internal:n [1]{ |
| 148 |
\MH_if_boolean:nF {outer_mult}{\alignedspace@left} %<-- requires amsmath 2016/11/05 |
| 149 |
\MT_next: |
| 150 |
\bgroup |
| 151 |
\Let@ |
| 152 |
\def\l_MT_multline_lastline_fint{0 } |
| 153 |
\chardef\dspbrk@context\@ne \restore@math@cr |
| 154 |
\MH_let:NwN \math@cr__math\MT_mult_mathcr_atat:w |
| 155 |
\MH_let:NwN \shoveleft\MT_shoveleft:wn |
| 156 |
\MH_let:NwN \shoveright\MT_shoveright:wn |
| 157 |
\spread@equation |
| 158 |
\MH_set_boolean_F:n {mult_firstline} |
| 159 |
\MT_measure_mult:n {#1} |
| 160 |
\MH_if_dim:w \l_MT_multwidth_dim<\l_MT_multline_measure_fdim |
| 161 |
\MH_setlength:dn \l_MT_multwidth_dim{\l_MT_multline_measure_fdim} |
| 162 |
\fi |
| 163 |
\MH_set_boolean_T:n {mult_firstline} |
| 164 |
\MH_if_num:w \l_MT_multline_lastline_fint=\@ne |
| 165 |
\MH_let:NwN \math@cr__math \MT_mult_firstandlast_mathcr:w |
| 166 |
\MH_fi: |
| 167 |
\ialign\bgroup |
| 168 |
\hfil\strut@$\m@th\displaystyle{}## |
| 169 |
\UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd}} |
| 170 |
$ |
| 171 |
\UseTaggingSocket{math/luamml/mtable/finalizecol}{last} |
| 172 |
\hfil |
| 173 |
\crcr |
| 174 |
\hfilneg |
| 175 |
#1 |
| 176 |
} |
| 177 |
\l__math_mathtools_init_tl |
| 178 |
\ExplSyntaxOff |
| 179 |
\endinput |
| 180 |
%% |
| 181 |
%% End of file `latex-lab-mathtools.ltx'. |