summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/optex/base/math-macros.opm')
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/math-macros.opm32
1 files changed, 18 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm b/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm
index a087d31c686..6d5278d5c2e 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \sin {Math macros plus mathchardefs <2020-06-13>} % preloaded in format
+\_codedecl \sin {Math macros plus mathchardefs <2021-02-04>} % preloaded in format
\_doc -----------------------------
The category code of the character `_` remains as the letter (11) and the mathocode
@@ -594,7 +594,7 @@
\_cod -----------------------------
\_protected\_def\_matrix#1{\_null\_thinsk
- \_edef\_stylenum{\_the\_numexpr\_mathstyle/2\_relax}%
+ \_edef\_tmpa{\_the\_numexpr \_mathstyle/4\_relax}% 0 0 1 1 1 1 2 2
\_vcenter{\_matrixbaselines\_math
\_ialign{\_the\_lmfil$\_matrixstyle##$\_hfil&&\_quad\_the\_lmfil$\_matrixstyle##$\_hfil\_crcr
\_mathstrut\_crcr\_noalign{\_kern-\_baselineskip}
@@ -602,22 +602,22 @@
\_def\_matrixbaselines{\_normalbaselines \_def\_matrixstyle{}%
\_let\_matrixbaselines=\_relax % \matrix inside matrix does not change size again
- \_ifcase\_stylenum \_or \_matrixscriptbaselines \_or \_matrixscriptbaselines
+ \_ifcase\_tmpa \_or
+ \_baselineskip=.7\_baselineskip \_def\_quad {\_hskip.7em\_relax}%
+ \_let\_matrixstyle=\_scriptstyle
\_or
- \_baselineskip=.5\_baselineskip
- \_def\_quad {\_hskip.5em\_relax}%
+ \_baselineskip=.5\_baselineskip \_def\_quad {\_hskip.5em\_relax}%
\_let\_matrixstyle=\_scriptscriptstyle
\_fi
}
-\_def\_matrixscriptbaselines{\_baselineskip=.7\_baselineskip
- \_def\_quad {\_hskip.7em\_relax}\_let\_matrixstyle=\_scriptstyle
-}
\_protected\_def\_pmatrix#1{\_left(\_matrix{#1}\_right)}
\_public \matrix \pmatrix ;
\_doc -----------------------------
- The \`\cases` and `\bordermatrix` macros are identical from plain \TeX/.
+ The \`\cases` and \`\bordermatrix` macros are almost identical as in plain \TeX/.
+ You can simply re-define `\bordermatrix` with other delimiters
+ using the common \`\_bordermatrixwithdelims` macro.
\_cod -----------------------------
\_protected\_long\_def\_cases#1{\_left\{\_thinsk\_vcenter{\_normalbaselines\_math
@@ -625,13 +625,14 @@
\_newdimen\_ptrenwd
\_ptrenwd=8.75pt % width of the big left (
-\_protected\_def\_bordermatrix#1{\_begingroup \_math
- \_setbox0=\_vbox{\_bordermatrixA #1\_stopbmatrix}%
+\_protected\_def\_bordermatrix{\_bordermatrixwithdelims()}
+\_def\_bordermatrixwithdelims#1#2#3{\_begingroup \_math
+ \_setbox0=\_vbox{\_bordermatrixA #3\_stopbmatrix}%
\_setbox2=\_vbox{\_unvcopy0 \_global\_setbox1=\_lastbox}%
\_setbox2=\_hbox{\_unhbox1 \_unskip\_global\_setbox1=\_lastbox}%
- \_setbox2=\_hbox{$\_kern\_wd1 \_kern-\_ptrenwd\_left(\_kern-\_wd1
+ \_setbox2=\_hbox{$\_kern\_wd1 \_kern-\_ptrenwd\_left#1\_kern-\_wd1
\_global\_setbox1=\_vbox{\_box1 \_kern.2em}%
- \_vcenter{\_kern-\_ht1 \_unvbox0 \_kern-\_baselineskip}\_thinsk\_right)$}%
+ \_vcenter{\_kern-\_ht1 \_unvbox0 \_kern-\_baselineskip}\_thinsk\_right#2$}%
\_null\_thicksk\_vbox{\_kern\_ht1 \_box2}\_endgroup}
\_def\_bordermatrixA #1\cr#2\_stopbmatrix{%
\_ialign{$##$\_hfil\_kern.2em\_kern\_ptrenwd&\_thinspace\_hfil$##$\_hfil
@@ -1054,7 +1055,10 @@
\_endcode %---------------------------------------------------
-2020=12-17 \box0->\hbox{\box0} in \_finphant and \_finsmash, see https://tex.stackexchange.com/questions/574997/
+2021-02-04 \_bordermatrixwithdelims introduced.
+2021-01-23 better expession for math styles in \matrix
+2021-01-22 bad use of \_stylenum in \matrix + bad value (bug fix: \_stylenum->\_mtstylenum)
+2020-12-17 \box0->\hbox{\box0} in \_finphant and \_finsmash, see https://tex.stackexchange.com/questions/574997/
2020-06-14 \borermatrix, \cases corrected
2020-06-13 \adots introduced, \matrix smaller in T mode too.
2020-06-03 \notin corrected