summaryrefslogtreecommitdiff
path: root/macros/optex/base/math-macros.opm
diff options
context:
space:
mode:
Diffstat (limited to 'macros/optex/base/math-macros.opm')
-rw-r--r--macros/optex/base/math-macros.opm24
1 files changed, 14 insertions, 10 deletions
diff --git a/macros/optex/base/math-macros.opm b/macros/optex/base/math-macros.opm
index fa4317f25a..ccdcfbc933 100644
--- a/macros/optex/base/math-macros.opm
+++ b/macros/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 <2023-05-24>} % preloaded in format
+\_codedecl \sin {Math macros plus mathchardefs <2024-11-19>} % preloaded in format
\_doc -----------------------------
The category code of the character `_` remains as the letter (11) and the mathcode
@@ -33,18 +33,18 @@
\_newifi\_ifmathsb \_mathsbfalse
\_def \_mathsbon {%
- \_directlua{
+ \_ifmathsb \_else \_directlua{
callback.add_to_callback("process_input_buffer",
function (str)
local num
str, num = string.gsub(str.." ", \_gsubrule)
if num>0 then str = string.gsub(str, \_gsubrule) end % \phi_i\rho_j -> \phi _i\rho _j
return str
- end, "_mathsb") }%
+ end, "_mathsb") }\_fi
\_global\_mathsbtrue
}
\_def \_mathsboff {%
- \_directlua{ callback.remove_from_callback("process_input_buffer", "_mathsb") }%
+ \_ifmathsb \_directlua{ callback.remove_from_callback("process_input_buffer", "_mathsb") }\_fi
\_global \_mathsbfalse
}
\_edef\_gsubrule{"(\_nbb[a-zA-Z]+)_([a-zA-Z]?[^_a-zA-Z])", "\_pcent 1 _\_pcent 2"}
@@ -385,7 +385,7 @@
height+depth in em units.\nl
The \^`\big`, \^`\Big`, \^`\bigg`, \^`\Bigg` macros keep the strut height+depth
from plain \TeX/ and \^`\bbig` is a new macro in \OpTeX/. It generates the size
- 1.44\,em beween \^`\big` and \^`\Big` which is
+ 1.44\,em between \^`\big` and \^`\Big` which is
accessible in most of Unicode math fonts (but not in classical `cmex10`).
\_cod -----------------------------
@@ -707,7 +707,7 @@
impossible to use `\eqno` or `\leqno` or \^`\eqmark`.
\OpTeX/ offers
- `\dislaylines to<dimen>{<formula>\cr<formula>\cr...<formula>}`
+ `\displaylines to<dimen>{<formula>\cr<formula>\cr...<formula>}`
as an alternative case of usage `\displaylines`. See section 4.3 in the
\ulink[http://petr.olsak.net/ftp/olsak/optex/optex-math.pdf]
{Typesetting Math with \OpTeX/}.
@@ -1101,15 +1101,19 @@
\_def\_mathbox#1{{\_mathstyles{\_hbox{%
\_ifnum\_stylenum<2 \_everymath{\_currstyle}%
- \_else
+ \_else \_ifx \_normalmath\_normalunimath
\_ifnum\_stylenum=2 \_def\_textmff{ssty=1;}\_fi
\_ifnum\_stylenum=3 \_def\_textmff{ssty=2;}\_def\_scriptmff{ssty=2;}\_fi
- \_typoscale[\_dobystyle{}{}{700}{500}/]\_fi #1}}}%
+ \_typosize[\_ea\_ignorept\_the\_fontdimen6\_dobystyle{}{}\_scriptfont\_scriptscriptfont1/]%
+ \_else \_typoscale[\_dobystyle{}{}{700}{500}/]%
+ \_fi\_fi #1}}}%
}
\_public \mathbox ;
\_endcode %---------------------------------------------------
+2024-11-19 \typosize used fo Uni-fonts in \mathbox in order to respect their sizes
+2024-06-02 don't apply \mathsbon twice
2023-05-24 \matsbon: "local num" added
2023-05-22 \mathsbon: \alpha_i\beta_j -> \alpha _i\beta _j (bug fixed)
2023-04-15 \bbig introduced
@@ -1120,13 +1124,13 @@
2021-03-19 allow text mode \{ and \}
2021-02-15 \_mathbox redefines \_textmff etc. in order to respect optical sizes
2021-02-04 \_bordermatrixwithdelims introduced.
-2021-01-23 better expession for math styles in \matrix
+2021-01-23 better expression 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
-2020-06-02 $$\par$$ error is supressed, so we define \(l)eqalign(no), \displayines as \long
+2020-06-02 $$\par$$ error is suppressed, so we define \(l)eqalign(no), \displayines as \long
2020-05-30 \cases: group added in the second column.
"\displaylines to<size>" implemented and documented.
2020-05-11 \let\|=\Vert, bug fixed