Skip to content

Commit f71c7b3

Browse files
u-fischerzauguin
authored andcommitted
add mathtools patch, latex3/tagging-project#734
1 parent dc2d92e commit f71c7b3

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

luamml-patches-mathtools.sty

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
\ProvidesExplPackage {luamml-patches-mathtools} {2024-10-26} {0.1.0}
2+
{Feel free to add a description here}
3+
4+
\RequirePackage{luamml-patches-amsmath}
5+
% see https://github.com/latex3/tagging-project/issues/734
6+
\renewcommand*\MT_mult_internal:n [1]{
7+
\MH_if_boolean:nF {outer_mult}{\alignedspace@left} %<-- requires amsmath 2016/11/05
8+
\MT_next:
9+
\bgroup
10+
\Let@
11+
\def\l_MT_multline_lastline_fint{0 }
12+
\chardef\dspbrk@context\@ne \restore@math@cr
13+
\MH_let:NwN \math@cr@@\MT_mult_mathcr_atat:w
14+
\MH_let:NwN \shoveleft\MT_shoveleft:wn
15+
\MH_let:NwN \shoveright\MT_shoveright:wn
16+
\spread@equation
17+
\MH_set_boolean_F:n {mult_firstline}
18+
\MT_measure_mult:n {#1}
19+
\MH_if_dim:w \l_MT_multwidth_dim<\l_MT_multline_measure_fdim
20+
\MH_setlength:dn \l_MT_multwidth_dim{\l_MT_multline_measure_fdim}
21+
\fi
22+
\MH_set_boolean_T:n {mult_firstline}
23+
\MH_if_num:w \l_MT_multline_lastline_fint=\@ne
24+
\MH_let:NwN \math@cr@@ \MT_mult_firstandlast_mathcr:w
25+
\MH_fi:
26+
\ialign\bgroup
27+
\hfil\strut@$\m@th\displaystyle{}##
28+
\luamml_save:nNn {} \displaystyle {mtd}
29+
$
30+
\__luamml_amsmath_add_last_to_row:
31+
\hfil
32+
\crcr
33+
\hfilneg
34+
#1
35+
}

luamml.dtx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@
540540
%<*luatex>
541541
\__luamml_patch_package:n {amstext}
542542
\__luamml_patch_package:n {amsmath}
543+
\__luamml_patch_package:n {mathtools}
543544
\__luamml_patch_package:n {array}
544545
%</luatex>
545546
% \end{macrocode}

0 commit comments

Comments
 (0)