From 572dc806dd00d29ab418ec6deaa36762d1d59ae6 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 5 Aug 2022 03:01:02 +0000 Subject: CTAN sync 202208050301 --- macros/optex/base/math-preload.opm | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'macros/optex/base/math-preload.opm') diff --git a/macros/optex/base/math-preload.opm b/macros/optex/base/math-preload.opm index fde73e7e65..9f73ef24d1 100644 --- a/macros/optex/base/math-preload.opm +++ b/macros/optex/base/math-preload.opm @@ -1,6 +1,6 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \normalmath {Math fonts CM + AMS preloaded <2022-02-22>} % preloaded in format +\_codedecl \normalmath {Math fonts CM + AMS preloaded <2022-07-22>} % preloaded in format \_doc ------------------------------ We have two math macros \`\normalmath` for the normal shape of all math @@ -39,8 +39,6 @@ % \_setmathfamily 11 \_tenbi \_setmathdimens } -\_count18=9 % families declared by \newfam are 12, 13, ... - \_def \normalmath {\_normalmath} \_def\boldmath {\_boldmath} \_doc ----------------------------- @@ -170,17 +168,37 @@ \_public \setmathsizes \ptunit \ptmunit ; + \_doc ----------------------------- + \`\_setmathparam`` {}` sets + (like `\Umathspaceafterscript`) to values dependent + on `1em` of textfont, scriptfont, scriptscriptfont. The is + scaling factor of mentioned `1em`. + \_cod ----------------------------- + +\_def\_setmathparam#1#2{% + #1\_displaystyle =#2\_fontdimen6\_textfont1 + #1\_textstyle =#2\_fontdimen6\_textfont1 + #1\_scriptstyle =#2\_fontdimen6\_scriptfont1 + #1\_scriptscriptstyle =#2\_fontdimen6\_scriptscriptfont1 +} + \_doc ----------------------------- The \`\_setmathdimens` macro is used in \^`\normalmath` or \^`\boldmath` macros. It makes math dimensions dependent on the font size (plain \TeX/ sets them only for 10\,pt typesetting). The `\skewchar` of some math families are - set here too. + set here too.\nl + \^`\_setmathparam \Umathspaceafterscript` is used instead `\scriptspace` + setting because \LuaTeX/ ingnores `\scriptspace` in most cases. There is + small difference from classical \TeX/: we set \"scaled" + `\Umathspaceafterscript` dependent on textstyle, scriptstyle, etc.\ sizes. + The \`\_scriptspacefactor` is set to 0.05 which gives the same result + as Plain \TeX/ `\scriptspace=0.5pt` at 10\,pt font size. \_cod ----------------------------- \_def\_setmathdimens{% PlainTeX sets these dimens for 10pt size only: \_delimitershortfall=0.5\_fontdimen6\_textfont3 \_nulldelimiterspace=0.12\_fontdimen6\_textfont3 - \_scriptspace=0.05\_fontdimen6\_textfont3 + \_setmathparam\_Umathspaceafterscript \_scriptspacefactor \_skewchar\_textfont1=127 \_skewchar\_scriptfont1=127 \_skewchar\_scriptscriptfont1=127 \_skewchar\_textfont2=48 \_skewchar\_scriptfont2=48 @@ -188,6 +206,7 @@ \_skewchar\_textfont6=127 \_skewchar\_scriptfont6=127 \_skewchar\_scriptscriptfont6=127 } +\_def\_scriptspacefactor{.05} \_doc ----------------------------- Finally, we preload a math fonts collection in [10/7/5] sizes @@ -224,6 +243,7 @@ For example \_endinput +2022-07-22: \_setmathparam\_Umathspaceafterscript added. 2022-02-22: \rm, \it, etc moved to fonts-select, \_marm, \_mait etc. introduced 2020-05-06: \itfam, \ttfam removed, (Unicode math preferred) 2020-04-14: \skewchar\fam6 added -- cgit v1.2.3