~reviczky/context/mirror

« back to all changes in this revision

Viewing changes to tex/context/base/mkxl/math-ini.mkxl

  • Committer: Context Git Mirror Bot
  • Author(s): Hans Hagen
  • Date: 2022-05-02 15:02:40 UTC
  • Revision ID: git-v1:d2e1112ef8921f361ac7cf1b49e30923cce6d5f0
2022-05-02 15:50:00

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
\writestatus{loading}{ConTeXt Math Macros / Initializations}
15
15
 
16
 
% todo: hpack as we skip math anyway
17
 
 
18
 
% a bit tricky way to set ... no (pseudo) registers but math hash values:
19
 
%
20
 
% \normalexpanded{\Umathlimitabovevgap\displaystyle=40\dimexpr\the\Umathlimitabovevgap\displaystyle\relax}
21
 
 
22
 
% Todo in luatex maincontrol.w: also accept a number here:
23
 
%
24
 
%    case set_math_param_cmd:
25
 
%        p = cur_chr;
26
 
%        get_token();
27
 
%        if (cur_cmd != math_style_cmd) {
28
 
%
29
 
% plus two new math styles: larger/smaller
30
 
%
31
 
% \protected\def\Umathshow#1%
32
 
%   {\hbox{\infofont(\string#1:\the#1\textstyle,\the#1\scriptstyle,\the#1\scriptscriptstyle)}}
33
 
 
34
16
%D This module provides namespaces for math fonts, thereby permitting mixed usage of
35
17
%D math fonts. Although not strictly needed, we also provide a family name mapping
36
18
%D mechanism as used in the (original) AMS math definition files, but here these
38
20
%D tried to minimize the number of definition commands and use plain \TEX\
39
21
%D definitions as fallback. We've tried to follow a couple of conventions from plain
40
22
%D and AMS math in order to achieve backward compatinility. We also kept an eye on
41
 
%D future usage of these modules in the perspective of MathML and unicode fonts.
 
23
%D future usage of these modules in the perspective of MathML and unicode fonts. In
 
24
%D the meantime much has been dropped in favour of better alternatives.
42
25
 
43
26
%D There is a subtle issue with grouping: the \type {\begingroup} method will not
44
27
%D restore a changed mathstyle so best avoid that one. However, there are cases where
45
 
%D we really need to use such grouping.
46
 
 
47
 
% Weird, these fail, maybe amp is solved in a later state from char noads (needs a
48
 
% fix in luatex):
49
 
%
50
 
% $\char"26$
51
 
% $\a$
52
 
% $\string&$
53
 
 
54
 
% mathop applied to characters centers it vertically
 
28
%D we really need to use such grouping. We now have \type {\beginmathgroup} etc.
 
29
 
 
30
%D Musical timestamp for the April 2022 math (inline) snapping sub activity: eNerd⁴
 
31
%D Time Capsule 2020 a.k.a. Farewell Party for Normalcy (DSD on the squeezebox with
 
32
%D a proper DAC connected but it can hardly keep up which also counts for me with MS
 
33
%D testing faster than I can provide variants (www.youtube.com/watch?v=xzQCqAJNOSM).
55
34
 
56
35
\unprotect
57
36
 
58
37
%D We move these definitions into the format:
59
38
 
60
 
% test  [[\char948 \cldcontext{utf.char(948)}]]
61
 
% test $[[\char948 \cldcontext{utf.char(948)}]]$
62
 
 
63
39
\registerctxluafile{math-ini}{autosuffix}
64
40
\registerctxluafile{math-dim}{autosuffix}
65
41
\registerctxluafile{math-act}{autosuffix}
204
180
   +\rightbottomkernclassoptioncode
205
181
\relax
206
182
 
207
 
 
208
183
% obsolete
209
184
 
210
185
\setnewconstant\mathboxcode     \zerocount
212
187
\setnewconstant\mathalphacode   \zerocount
213
188
\setnewconstant\mathnothingcode \zerocount
214
189
 
 
190
%D At some point we will drop these in the \LUAMETATEX\ engine becuase we have many
 
191
%D more options there.
 
192
 
215
193
\pushoverloadmode
216
194
    \untraced\permanent\protected\def\binoppenalty   {\setmathpostpenalty\mathbinarycode}
217
195
    \untraced\permanent\protected\def\prebinoppenalty{\setmathprepenalty \mathbinarycode}
219
197
    \untraced\permanent\protected\def\prerelpenalty  {\setmathprepenalty \mathrelationcode}
220
198
\popoverloadmode
221
199
 
222
 
% \newcount\binoppenalty
223
 
% \newcount\prebinoppenalty
224
 
% \newcount\relpenalty
225
 
% \newcount\prerelpenalty
226
 
 
227
 
% topaccent botaccent .. but do we ever need these so they will be inlined or we need them for all
 
200
%D These verbose commands are obsolete because there are plenty more classes in
 
201
%D \LMTX\ than in \MKIV.
228
202
 
229
203
\permanent\protected\def\ordordspacing      {\setmathspacing \mathordinarycode    \mathordinarycode   }
230
204
\permanent\protected\def\ordopspacing       {\setmathspacing \mathordinarycode    \mathoperatorcode   }
382
356
\permanent\protected\def\accentmiddlespacing{\setmathspacing \mathaccentcode      \mathmiddlecode     }
383
357
\permanent\protected\def\accentaccentspacing{\setmathspacing \mathaccentcode      \mathaccentcode     }
384
358
 
385
 
%D In the end Mikael and I prefer for this:
 
359
%D In the end Mikael and I prefer this but we need a high level interface:
386
360
 
387
361
% \setmathignore\Umathspacebeforescript\plusone
388
362
% \setmathignore\Umathspaceafterscript \plusone
392
366
 
393
367
\mathslackmode \plusone
394
368
 
395
 
\setmathoptions\mathoperatorcode   \plusthree
396
 
\setmathoptions\mathbinarycode     \plusthree
397
 
\setmathoptions\mathrelationcode   \plusthree
398
 
\setmathoptions\mathopencode       \plusthree
399
 
\setmathoptions\mathclosecode      \plusthree
400
 
\setmathoptions\mathpunctuationcode\plusthree
401
 
\setmathoptions\mathfractioncode   \plusthree
402
 
 
403
 
%D For now \unknown
 
369
\integerdef\defaultmathclassoptions\numexpr
 
370
    \nopreslackclassoptioncode
 
371
   +\nopostslackclassoptioncode
 
372
 % +\lefttopkernclassoptioncode
 
373
 % +\righttopkernclassoptioncode
 
374
 % +\leftbottomkernclassoptioncode
 
375
 % +\rightbottomkernclassoptioncode
 
376
 % +\lookaheadforendclassoptioncode
 
377
\relax
 
378
 
 
379
\setmathoptions\mathbinarycode\numexpr
 
380
    \defaultmathclassoptions
 
381
   +\lookaheadforendclassoptioncode
 
382
\relax
 
383
 
 
384
\setmathoptions\mathoperatorcode   \defaultmathclassoptions
 
385
\setmathoptions\mathrelationcode   \defaultmathclassoptions
 
386
\setmathoptions\mathopencode       \defaultmathclassoptions
 
387
\setmathoptions\mathclosecode      \defaultmathclassoptions
 
388
\setmathoptions\mathpunctuationcode\defaultmathclassoptions
 
389
\setmathoptions\mathfractioncode   \defaultmathclassoptions
 
390
 
 
391
%D For now \unknown (todo: make it adapt to style but we're in text anyway)
404
392
 
405
393
\permanent\protected\def\math_discretionary_plus {\discretionary class \mathbinarycode {$+$}{$+$}{$+$}}
406
394
\permanent\protected\def\math_discretionary_minus{\discretionary class \mathbinarycode {$-$}{$-$}{$-$}}
757
745
 
758
746
% \Umathspacingmode\allmathstyles\plusone % always pair driven
759
747
 
760
 
% todo: use fullnames instead shirt ones
 
748
% \startsetups math:spacing:presets
 
749
%     \resetmathspacing
 
750
%   % \ordordspacing                 \allmathstyles  \zeromuskip
 
751
%     \inherited\ordopspacing        \allmathstyles  \thinmuskip
 
752
%     \inherited\ordbinspacing       \allsplitstyles \medmuskip
 
753
%     \inherited\ordbinspacing       \allscriptstyles\tinymuskip
 
754
%     \inherited\ordrelspacing       \allsplitstyles \thickmuskip
 
755
%     \inherited\ordrelspacing       \allscriptstyles\tinymuskip
 
756
%   % \inherited\ordopenspacing      \allmathstyles  \zeromuskip
 
757
%     \inherited\ordmiddlespacing    \allsplitstyles \medmuskip
 
758
%     \inherited\ordmiddlespacing    \allscriptstyles\tinymuskip
 
759
%   % \inherited\ordclosespacing     \allmathstyles  \zeromuskip
 
760
%   % \inherited\ordpunctspacing     \allmathstyles  \zeromuskip
 
761
%     \inherited\ordinnerspacing     \allsplitstyles \thinmuskip
 
762
%     \inherited\ordinnerspacing     \allscriptstyles\tinymuskip
 
763
%     \inherited\ordfracspacing      \allmathstyles  \tinymuskip
 
764
%     \inherited\ordradspacing       \allmathstyles  \tinymuskip
 
765
%     \inherited\opordspacing        \allmathstyles  \thinmuskip
 
766
%     \inherited\opopspacing         \allmathstyles  \thinmuskip
 
767
%   % \inherited \opbinspacing        \allmathstyles \zeromuskip
 
768
%     \inherited\oprelspacing        \allsplitstyles \thickmuskip
 
769
%     \inherited\oprelspacing        \allscriptstyles\tinymuskip
 
770
%   % \inherited\opopenspacing       \allmathstyles  \zeromuskip
 
771
%     \inherited\opmiddlespacing     \allsplitstyles \medmuskip
 
772
%     \inherited\opmiddlespacing     \allscriptstyles\tinymuskip
 
773
%   % \inherited\opclosespacing      \allmathstyles  \zeromuskip
 
774
%   % \inherited\oppunctspacing      \allmathstyles  \zeromuskip
 
775
%     \inherited\opinnerspacing      \allsplitstyles \thinmuskip
 
776
%     \inherited\opinnerspacing      \allscriptstyles\tinymuskip
 
777
%     \inherited\opfracspacing       \allmathstyles  \thinmuskip
 
778
%     \inherited\opradspacing        \allmathstyles  \thinmuskip
 
779
%     \inherited\binordspacing       \allsplitstyles \medmuskip
 
780
%     \inherited\binordspacing       \allscriptstyles\tinymuskip
 
781
%     \inherited\binopspacing        \allsplitstyles \medmuskip
 
782
%     \inherited\binopspacing        \allscriptstyles\tinymuskip
 
783
%   % \inherited\binbinspacing       \allmathstyles  \zeromuskip
 
784
%   % \inherited\binrelspacing       \allmathstyles  \zeromuskip
 
785
%     \inherited\binopenspacing      \allsplitstyles \medmuskip
 
786
%     \inherited\binopenspacing      \allscriptstyles\tinymuskip
 
787
%     \inherited\binmiddlespacing    \allsplitstyles \medmuskip
 
788
%     \inherited\binmiddlespacing    \allscriptstyles\tinymuskip
 
789
%   % \inherited\binclosespacing     \allmathstyles  \zeromuskip
 
790
%   % \inherited\binpunctspacing     \allmathstyles  \zeromuskip
 
791
%     \inherited\bininnerspacing     \allsplitstyles \medmuskip
 
792
%     \inherited\bininnerspacing     \allscriptstyles\tinymuskip
 
793
%     \inherited\binfracspacing      \allsplitstyles \medmuskip
 
794
%     \inherited\binfracspacing      \allscriptstyles\tinymuskip
 
795
%     \inherited\binradspacing       \allsplitstyles \medmuskip
 
796
%     \inherited\binradspacing       \allscriptstyles\tinymuskip
 
797
%     \inherited\relordspacing       \allsplitstyles \thickmuskip
 
798
%     \inherited\relordspacing       \allscriptstyles\tinymuskip
 
799
%     \inherited\relopspacing        \allsplitstyles \thickmuskip
 
800
%     \inherited\relopspacing        \allscriptstyles\tinymuskip
 
801
%   % \inherited\relbinspacing       \allmathstyles  \zeromuskip
 
802
%   % \inherited\relrelspacing       \allmathstyles  \zeromuskip
 
803
%     \inherited\relopenspacing      \allsplitstyles \thickmuskip
 
804
%     \inherited\relopenspacing      \allscriptstyles\tinymuskip
 
805
%     \inherited\relmiddlespacing    \allsplitstyles \thickmuskip
 
806
%     \inherited\relmiddlespacing    \allscriptstyles\thinmuskip
 
807
%   % \inherited\relclosespacing     \allmathstyles  \zeromuskip
 
808
%   % \inherited\relpunctspacing     \allmathstyles  \zeromuskip
 
809
%     \inherited\relinnerspacing     \allsplitstyles \thickmuskip
 
810
%     \inherited\relinnerspacing     \allscriptstyles\tinymuskip
 
811
%     \inherited\relfracspacing      \allsplitstyles \thickmuskip
 
812
%     \inherited\relfracspacing      \allscriptstyles\tinymuskip
 
813
%     \inherited\relradspacing       \allsplitstyles \thickmuskip
 
814
%     \inherited\relradspacing       \allscriptstyles\tinymuskip
 
815
%   % \inherited\openordspacing      \allmathstyles  \zeromuskip
 
816
%   % \inherited\openopspacing       \allmathstyles  \zeromuskip
 
817
%   % \inherited\openbinspacing      \allmathstyles  \zeromuskip
 
818
%   % \inherited\openrelspacing      \allmathstyles  \zeromuskip
 
819
%   % \inherited\openopenspacing     \allmathstyles  \zeromuskip
 
820
%   % \inherited\openmiddlespacing   \allmathstyles  \zeromuskip
 
821
%   % \inherited\openclosespacing    \allmathstyles  \zeromuskip
 
822
%   % \inherited\openpunctspacing    \allmathstyles  \zeromuskip
 
823
%   % \inherited\openinnerspacing    \allmathstyles  \zeromuskip
 
824
%     \inherited\openfracspacing     \allmathstyles  \tinymuskip
 
825
%   % \inherited\openradspacing      \allmathstyles  \zeromuskip
 
826
%   % \inherited\closeordspacing     \allmathstyles  \zeromuskip
 
827
%     \inherited\closeopspacing      \allmathstyles  \thinmuskip
 
828
%     \inherited\closebinspacing     \allsplitstyles \medmuskip
 
829
%     \inherited\closebinspacing     \allscriptstyles\tinymuskip
 
830
%     \inherited\closerelspacing     \allsplitstyles \thickmuskip
 
831
%     \inherited\closerelspacing     \allscriptstyles\tinymuskip
 
832
%   % \inherited\closeopenspacing    \allmathstyles  \zeromuskip
 
833
%   % \inherited\closemiddlespacing  \allmathstyles  \zeromuskip
 
834
%   % \inherited\closeclosespacing   \allmathstyles  \zeromuskip
 
835
%   % \inherited\closepunctspacing   \allmathstyles  \zeromuskip
 
836
%     \inherited\closeinnerspacing   \allsplitstyles \thinmuskip
 
837
%     \inherited\closeinnerspacing   \allscriptstyles\tinymuskip
 
838
%     \inherited\closefracspacing    \allsplitstyles \thinmuskip
 
839
%     \inherited\closefracspacing    \allscriptstyles\tinymuskip
 
840
%   % \inherited\closeradspacing     \allmathstyles  \zeromuskip
 
841
%     \inherited\punctordspacing     \allsplitstyles \thinmuskip
 
842
%     \inherited\punctordspacing     \allscriptstyles\tinymuskip
 
843
%     \inherited\punctopspacing      \allsplitstyles \thinmuskip
 
844
%     \inherited\punctopspacing      \allscriptstyles\tinymuskip
 
845
%   % \inherited\punctbinspacing     \allmathstyles  \zeromuskip
 
846
%     \inherited\punctrelspacing     \allsplitstyles \thinmuskip
 
847
%     \inherited\punctrelspacing     \allscriptstyles\tinymuskip
 
848
%     \inherited\punctopenspacing    \allsplitstyles \thinmuskip
 
849
%     \inherited\punctopenspacing    \allscriptstyles\tinymuskip
 
850
%     \inherited\punctmiddlespacing  \allsplitstyles \thinmuskip
 
851
%     \inherited\punctmiddlespacing  \allscriptstyles\tinymuskip
 
852
%     \inherited\punctclosespacing   \allsplitstyles \thinmuskip
 
853
%     \inherited\punctclosespacing   \allscriptstyles\tinymuskip
 
854
%     \inherited\punctpunctspacing   \allsplitstyles \thinmuskip
 
855
%     \inherited\punctpunctspacing   \allscriptstyles\tinymuskip
 
856
%     \inherited\punctinnerspacing   \allsplitstyles \thinmuskip
 
857
%     \inherited\punctinnerspacing   \allscriptstyles\tinymuskip
 
858
%     \inherited\punctfracspacing    \allsplitstyles \thinmuskip
 
859
%     \inherited\punctfracspacing    \allscriptstyles\tinymuskip
 
860
%     \inherited\punctradspacing     \allsplitstyles \thinmuskip
 
861
%     \inherited\punctradspacing     \allscriptstyles\tinymuskip
 
862
%     \inherited\innerordspacing     \allsplitstyles \thinmuskip
 
863
%     \inherited\innerordspacing     \allscriptstyles\tinymuskip
 
864
%     \inherited\inneropspacing      \allmathstyles  \thinmuskip
 
865
%     \inherited\innerbinspacing     \allsplitstyles \medmuskip
 
866
%     \inherited\innerbinspacing     \allscriptstyles\tinymuskip
 
867
%     \inherited\innerrelspacing     \allsplitstyles \thickmuskip
 
868
%     \inherited\innerrelspacing     \allscriptstyles\tinymuskip
 
869
%     \inherited\inneropenspacing    \allsplitstyles \thinmuskip
 
870
%     \inherited\inneropenspacing    \allscriptstyles\tinymuskip
 
871
%     \inherited\innermiddlespacing  \allsplitstyles \thinmuskip
 
872
%     \inherited\innermiddlespacing  \allscriptstyles\tinymuskip
 
873
%   % \inherited\innerclosespacing   \allmathstyles  \zeromuskip
 
874
%     \inherited\innerpunctspacing   \allsplitstyles \thinmuskip
 
875
%     \inherited\innerpunctspacing   \allscriptstyles\tinymuskip
 
876
%     \inherited\innerinnerspacing   \allsplitstyles \thinmuskip
 
877
%     \inherited\innerinnerspacing   \allscriptstyles\tinymuskip
 
878
%     \inherited\innerfracspacing    \allsplitstyles \thinmuskip
 
879
%     \inherited\innerfracspacing    \allscriptstyles\tinymuskip
 
880
%     \inherited\innerradspacing     \allsplitstyles \thinmuskip
 
881
%     \inherited\innerradspacing     \allscriptstyles\tinymuskip
 
882
%     \inherited\fracordspacing      \allmathstyles  \tinymuskip
 
883
%     \inherited\fracopspacing       \allmathstyles  \thinmuskip
 
884
%     \inherited\fracbinspacing      \allsplitstyles \medmuskip
 
885
%     \inherited\fracbinspacing      \allscriptstyles\tinymuskip
 
886
%     \inherited\fracrelspacing      \allsplitstyles \thickmuskip
 
887
%     \inherited\fracrelspacing      \allscriptstyles\tinymuskip
 
888
%     \inherited\fracopenspacing     \allsplitstyles \thinmuskip
 
889
%     \inherited\fracopenspacing     \allscriptstyles\tinymuskip
 
890
%     \inherited\fracmiddlespacing   \allsplitstyles \medmuskip
 
891
%     \inherited\fracmiddlespacing   \allscriptstyles\tinymuskip
 
892
%     \inherited\fracclosespacing    \allmathstyles  \tinymuskip
 
893
%   % \inherited\fracpunctspacing    \allmathstyles  \zeromuskip
 
894
%     \inherited\fracinnerspacing    \allsplitstyles \thinmuskip
 
895
%     \inherited\fracinnerspacing    \allscriptstyles\tinymuskip
 
896
%     \inherited\fracfracspacing     \allsplitstyles \thinmuskip
 
897
%     \inherited\fracfracspacing     \allscriptstyles\tinymuskip
 
898
%     \inherited\fracradspacing      \allmathstyles  \tinymuskip
 
899
%     \inherited\radordspacing       \allsplitstyles \tinymuskip
 
900
%     \inherited\radopspacing        \allmathstyles  \thinmuskip
 
901
%     \inherited\radbinspacing       \allsplitstyles \medmuskip
 
902
%     \inherited\radbinspacing       \allscriptstyles\tinymuskip
 
903
%     \inherited\radrelspacing       \allsplitstyles \thickmuskip
 
904
%     \inherited\radrelspacing       \allscriptstyles\tinymuskip
 
905
%   % \inherited\radopenspacing      \allmathstyles  \zeromuskip
 
906
%   % \inherited\radmiddlespacing    \allmathstyles  \zeromuskip
 
907
%   % \inherited\radclosespacing     \allmathstyles  \zeromuskip
 
908
%   % \inherited\radpunctspacing     \allmathstyles  \zeromuskip
 
909
%     \inherited\radinnerspacing     \allsplitstyles \thinmuskip
 
910
%     \inherited\radinnerspacing     \allscriptstyles\tinymuskip
 
911
%     \inherited\radfracspacing      \allmathstyles  \tinymuskip
 
912
%     \inherited\radradspacing       \allmathstyles  \tinymuskip
 
913
%     \inherited\middleordspacing    \allsplitstyles \medmuskip
 
914
%     \inherited\middleordspacing    \allscriptstyles\tinymuskip
 
915
%     \inherited\middleopspacing     \allmathstyles  \thinmuskip
 
916
%     \inherited\middlebinspacing    \allsplitstyles \medmuskip
 
917
%     \inherited\middlebinspacing    \allscriptstyles\tinymuskip
 
918
%     \inherited\middlerelspacing    \allsplitstyles \thickmuskip
 
919
%     \inherited\middlerelspacing    \allscriptstyles\tinymuskip
 
920
%   % \inherited\middleopenspacing   \allmathstyles  \zeromuskip
 
921
%   % \inherited\middlemiddlespacing \allmathstyles  \zeromuskip
 
922
%   % \inherited\middleclosespacing  \allmathstyles  \zeromuskip
 
923
%   % \inherited\middlepunctspacing  \allmathstyles  \zeromuskip
 
924
%     \inherited\middleinnerspacing  \allsplitstyles \thinmuskip
 
925
%     \inherited\middleinnerspacing  \allscriptstyles\tinymuskip
 
926
%     \inherited\middlefracspacing   \allsplitstyles \medmuskip
 
927
%     \inherited\middlefracspacing   \allscriptstyles\tinymuskip
 
928
%   % \inherited\middleradspacing    \allmathstyles  \zeromuskip
 
929
%     %
 
930
%     \inherited\setmathspacing \mathclosecode     \mathdifferentialcode \allsplitstyles  \thinmuskip
 
931
%     \inherited\setmathspacing \mathclosecode     \mathdifferentialcode \allscriptstyles \tinymuskip
 
932
%     \inherited\setmathspacing \mathordinarycode  \mathdifferentialcode \allsplitstyles  \thinmuskip
 
933
%     \inherited\setmathspacing \mathordinarycode  \mathdifferentialcode \allscriptstyles \tinymuskip
 
934
%     \inherited\setmathspacing \mathfactorialcode \mathordinarycode     \allsplitstyles  \thinmuskip
 
935
%     \inherited\setmathspacing \mathfactorialcode \mathordinarycode     \allscriptstyles \tinymuskip
 
936
%     \inherited\setmathspacing \mathfactorialcode \mathfactorialcode    \allmathstyles   \zeromuskip
 
937
%     %
 
938
%     \inherited\setmathspacing \mathopencode      \mathconstructcode    \allmathstyles   \thinmuskip
 
939
%     \inherited\setmathspacing \mathconstructcode \mathclosecode        \allmathstyles   \thinmuskip
 
940
% \stopsetups
761
941
 
762
942
\startsetups math:spacing:presets
763
943
    \resetmathspacing
764
 
  % \ordordspacing                 \allmathstyles  \zeromuskip
765
 
    \inherited\ordopspacing        \allmathstyles  \thinmuskip
766
 
    \inherited\ordbinspacing       \allsplitstyles \medmuskip
767
 
    \inherited\ordbinspacing       \allscriptstyles\tinymuskip
768
 
    \inherited\ordrelspacing       \allsplitstyles \thickmuskip
769
 
    \inherited\ordrelspacing       \allscriptstyles\tinymuskip
770
 
  % \inherited\ordopenspacing      \allmathstyles  \zeromuskip
771
 
    \inherited\ordmiddlespacing    \allsplitstyles \medmuskip
772
 
    \inherited\ordmiddlespacing    \allscriptstyles\tinymuskip
773
 
  % \inherited\ordclosespacing     \allmathstyles  \zeromuskip
774
 
  % \inherited\ordpunctspacing     \allmathstyles  \zeromuskip
775
 
    \inherited\ordinnerspacing     \allsplitstyles \thinmuskip
776
 
    \inherited\ordinnerspacing     \allscriptstyles\tinymuskip
777
 
    \inherited\ordfracspacing      \allmathstyles  \tinymuskip
778
 
    \inherited\ordradspacing       \allmathstyles  \tinymuskip
779
 
    \inherited\opordspacing        \allmathstyles  \thinmuskip
780
 
    \inherited\opopspacing         \allmathstyles  \thinmuskip
781
 
  %%\inherited \opbinspacing        \allmathstyles \zeromuskip
782
 
    \inherited\oprelspacing        \allsplitstyles \thickmuskip
783
 
    \inherited\oprelspacing        \allscriptstyles\tinymuskip
784
 
  % \inherited\opopenspacing       \allmathstyles  \zeromuskip
785
 
    \inherited\opmiddlespacing     \allsplitstyles \medmuskip
786
 
    \inherited\opmiddlespacing     \allscriptstyles\tinymuskip
787
 
  % \inherited\opclosespacing      \allmathstyles  \zeromuskip
788
 
  % \inherited\oppunctspacing      \allmathstyles  \zeromuskip
789
 
    \inherited\opinnerspacing      \allsplitstyles \thinmuskip
790
 
    \inherited\opinnerspacing      \allscriptstyles\tinymuskip
791
 
    \inherited\opfracspacing       \allmathstyles  \thinmuskip
792
 
    \inherited\opradspacing        \allmathstyles  \thinmuskip
793
 
    \inherited\binordspacing       \allsplitstyles \medmuskip
794
 
    \inherited\binordspacing       \allscriptstyles\tinymuskip
795
 
    \inherited\binopspacing        \allsplitstyles \medmuskip
796
 
    \inherited\binopspacing        \allscriptstyles\tinymuskip
797
 
 %% \inherited\binbinspacing       \allmathstyles  \zeromuskip
798
 
 %% \inherited\binrelspacing       \allmathstyles  \zeromuskip
799
 
    \inherited\binopenspacing      \allsplitstyles \medmuskip
800
 
    \inherited\binopenspacing      \allscriptstyles\tinymuskip
801
 
    \inherited\binmiddlespacing    \allsplitstyles \medmuskip
802
 
    \inherited\binmiddlespacing    \allscriptstyles\tinymuskip
803
 
 %% \inherited\binclosespacing     \allmathstyles  \zeromuskip
804
 
 %% \inherited\binpunctspacing     \allmathstyles  \zeromuskip
805
 
    \inherited\bininnerspacing     \allsplitstyles \medmuskip
806
 
    \inherited\bininnerspacing     \allscriptstyles\tinymuskip
807
 
    \inherited\binfracspacing      \allsplitstyles \medmuskip
808
 
    \inherited\binfracspacing      \allscriptstyles\tinymuskip
809
 
    \inherited\binradspacing       \allsplitstyles \medmuskip
810
 
    \inherited\binradspacing       \allscriptstyles\tinymuskip
811
 
    \inherited\relordspacing       \allsplitstyles \thickmuskip
812
 
    \inherited\relordspacing       \allscriptstyles\tinymuskip
813
 
    \inherited\relopspacing        \allsplitstyles \thickmuskip
814
 
    \inherited\relopspacing        \allscriptstyles\tinymuskip
815
 
 %% \inherited\relbinspacing       \allmathstyles  \zeromuskip
816
 
  % \inherited\relrelspacing       \allmathstyles  \zeromuskip
817
 
    \inherited\relopenspacing      \allsplitstyles \thickmuskip
818
 
    \inherited\relopenspacing      \allscriptstyles\tinymuskip
819
 
    \inherited\relmiddlespacing    \allsplitstyles \thickmuskip
820
 
    \inherited\relmiddlespacing    \allscriptstyles\thinmuskip
821
 
  % \inherited\relclosespacing     \allmathstyles  \zeromuskip
822
 
  % \inherited\relpunctspacing     \allmathstyles  \zeromuskip
823
 
    \inherited\relinnerspacing     \allsplitstyles \thickmuskip
824
 
    \inherited\relinnerspacing     \allscriptstyles\tinymuskip
825
 
    \inherited\relfracspacing      \allsplitstyles \thickmuskip
826
 
    \inherited\relfracspacing      \allscriptstyles\tinymuskip
827
 
    \inherited\relradspacing       \allsplitstyles \thickmuskip
828
 
    \inherited\relradspacing       \allscriptstyles\tinymuskip
829
 
  % \inherited\openordspacing      \allmathstyles  \zeromuskip
830
 
  % \inherited\openopspacing       \allmathstyles  \zeromuskip
831
 
 %% \inherited\openbinspacing      \allmathstyles  \zeromuskip
832
 
  % \inherited\openrelspacing      \allmathstyles  \zeromuskip
833
 
  % \inherited\openopenspacing     \allmathstyles  \zeromuskip
834
 
  % \inherited\openmiddlespacing   \allmathstyles  \zeromuskip
835
 
  % \inherited\openclosespacing    \allmathstyles  \zeromuskip
836
 
  % \inherited\openpunctspacing    \allmathstyles  \zeromuskip
837
 
  % \inherited\openinnerspacing    \allmathstyles  \zeromuskip
838
 
    \inherited\openfracspacing     \allmathstyles  \tinymuskip
839
 
  % \inherited\openradspacing      \allmathstyles  \zeromuskip
840
 
  % \inherited\closeordspacing     \allmathstyles  \zeromuskip
841
 
    \inherited\closeopspacing      \allmathstyles  \thinmuskip
842
 
    \inherited\closebinspacing     \allsplitstyles \medmuskip
843
 
    \inherited\closebinspacing     \allscriptstyles\tinymuskip
844
 
    \inherited\closerelspacing     \allsplitstyles \thickmuskip
845
 
    \inherited\closerelspacing     \allscriptstyles\tinymuskip
846
 
  % \inherited\closeopenspacing    \allmathstyles  \zeromuskip
847
 
  % \inherited\closemiddlespacing  \allmathstyles  \zeromuskip
848
 
  % \inherited\closeclosespacing   \allmathstyles  \zeromuskip
849
 
  % \inherited\closepunctspacing   \allmathstyles  \zeromuskip
850
 
    \inherited\closeinnerspacing   \allsplitstyles \thinmuskip
851
 
    \inherited\closeinnerspacing   \allscriptstyles\tinymuskip
852
 
    \inherited\closefracspacing    \allsplitstyles \thinmuskip
853
 
    \inherited\closefracspacing    \allscriptstyles\tinymuskip
854
 
  % \inherited\closeradspacing     \allmathstyles  \zeromuskip
855
 
    \inherited\punctordspacing     \allsplitstyles \thinmuskip
856
 
    \inherited\punctordspacing     \allscriptstyles\tinymuskip
857
 
    \inherited\punctopspacing      \allsplitstyles \thinmuskip
858
 
    \inherited\punctopspacing      \allscriptstyles\tinymuskip
859
 
 % \inherited\punctbinspacing     \allmathstyles  \zeromuskip
860
 
    \inherited\punctrelspacing     \allsplitstyles \thinmuskip
861
 
    \inherited\punctrelspacing     \allscriptstyles\tinymuskip
862
 
    \inherited\punctopenspacing    \allsplitstyles \thinmuskip
863
 
    \inherited\punctopenspacing    \allscriptstyles\tinymuskip
864
 
    \inherited\punctmiddlespacing  \allsplitstyles \thinmuskip
865
 
    \inherited\punctmiddlespacing  \allscriptstyles\tinymuskip
866
 
    \inherited\punctclosespacing   \allsplitstyles \thinmuskip
867
 
    \inherited\punctclosespacing   \allscriptstyles\tinymuskip
868
 
    \inherited\punctpunctspacing   \allsplitstyles \thinmuskip
869
 
    \inherited\punctpunctspacing   \allscriptstyles\tinymuskip
870
 
    \inherited\punctinnerspacing   \allsplitstyles \thinmuskip
871
 
    \inherited\punctinnerspacing   \allscriptstyles\tinymuskip
872
 
    \inherited\punctfracspacing    \allsplitstyles \thinmuskip
873
 
    \inherited\punctfracspacing    \allscriptstyles\tinymuskip
874
 
    \inherited\punctradspacing     \allsplitstyles \thinmuskip
875
 
    \inherited\punctradspacing     \allscriptstyles\tinymuskip
876
 
    \inherited\innerordspacing     \allsplitstyles \thinmuskip
877
 
    \inherited\innerordspacing     \allscriptstyles\tinymuskip
878
 
    \inherited\inneropspacing      \allmathstyles  \thinmuskip
879
 
    \inherited\innerbinspacing     \allsplitstyles \medmuskip
880
 
    \inherited\innerbinspacing     \allscriptstyles\tinymuskip
881
 
    \inherited\innerrelspacing     \allsplitstyles \thickmuskip
882
 
    \inherited\innerrelspacing     \allscriptstyles\tinymuskip
883
 
    \inherited\inneropenspacing    \allsplitstyles \thinmuskip
884
 
    \inherited\inneropenspacing    \allscriptstyles\tinymuskip
885
 
    \inherited\innermiddlespacing  \allsplitstyles \thinmuskip
886
 
    \inherited\innermiddlespacing  \allscriptstyles\tinymuskip
887
 
  % \inherited\innerclosespacing   \allmathstyles  \zeromuskip
888
 
    \inherited\innerpunctspacing   \allsplitstyles \thinmuskip
889
 
    \inherited\innerpunctspacing   \allscriptstyles\tinymuskip
890
 
    \inherited\innerinnerspacing   \allsplitstyles \thinmuskip
891
 
    \inherited\innerinnerspacing   \allscriptstyles\tinymuskip
892
 
    \inherited\innerfracspacing    \allsplitstyles \thinmuskip
893
 
    \inherited\innerfracspacing    \allscriptstyles\tinymuskip
894
 
    \inherited\innerradspacing     \allsplitstyles \thinmuskip
895
 
    \inherited\innerradspacing     \allscriptstyles\tinymuskip
896
 
    \inherited\fracordspacing      \allmathstyles  \tinymuskip
897
 
    \inherited\fracopspacing       \allmathstyles  \thinmuskip
898
 
    \inherited\fracbinspacing      \allsplitstyles \medmuskip
899
 
    \inherited\fracbinspacing      \allscriptstyles\tinymuskip
900
 
    \inherited\fracrelspacing      \allsplitstyles \thickmuskip
901
 
    \inherited\fracrelspacing      \allscriptstyles\tinymuskip
902
 
    \inherited\fracopenspacing     \allsplitstyles \thinmuskip
903
 
    \inherited\fracopenspacing     \allscriptstyles\tinymuskip
904
 
    \inherited\fracmiddlespacing   \allsplitstyles \medmuskip
905
 
    \inherited\fracmiddlespacing   \allscriptstyles\tinymuskip
906
 
    \inherited\fracclosespacing    \allmathstyles  \tinymuskip
907
 
  % \inherited\fracpunctspacing    \allmathstyles  \zeromuskip
908
 
    \inherited\fracinnerspacing    \allsplitstyles \thinmuskip
909
 
    \inherited\fracinnerspacing    \allscriptstyles\tinymuskip
910
 
    \inherited\fracfracspacing     \allsplitstyles \thinmuskip
911
 
    \inherited\fracfracspacing     \allscriptstyles\tinymuskip
912
 
    \inherited\fracradspacing      \allmathstyles  \tinymuskip
913
 
    \inherited\radordspacing       \allsplitstyles \tinymuskip
914
 
    \inherited\radopspacing        \allmathstyles  \thinmuskip
915
 
    \inherited\radbinspacing       \allsplitstyles \medmuskip
916
 
    \inherited\radbinspacing       \allscriptstyles\tinymuskip
917
 
    \inherited\radrelspacing       \allsplitstyles \thickmuskip
918
 
    \inherited\radrelspacing       \allscriptstyles\tinymuskip
919
 
  % \inherited\radopenspacing      \allmathstyles  \zeromuskip
920
 
  % \inherited\radmiddlespacing    \allmathstyles  \zeromuskip
921
 
  % \inherited\radclosespacing     \allmathstyles  \zeromuskip
922
 
  % \inherited\radpunctspacing     \allmathstyles  \zeromuskip
923
 
    \inherited\radinnerspacing     \allsplitstyles \thinmuskip
924
 
    \inherited\radinnerspacing     \allscriptstyles\tinymuskip
925
 
    \inherited\radfracspacing      \allmathstyles  \tinymuskip
926
 
    \inherited\radradspacing       \allmathstyles  \tinymuskip
927
 
    \inherited\middleordspacing    \allsplitstyles \medmuskip
928
 
    \inherited\middleordspacing    \allscriptstyles\tinymuskip
929
 
    \inherited\middleopspacing     \allmathstyles  \thinmuskip
930
 
    \inherited\middlebinspacing    \allsplitstyles \medmuskip
931
 
    \inherited\middlebinspacing    \allscriptstyles\tinymuskip
932
 
    \inherited\middlerelspacing    \allsplitstyles \thickmuskip
933
 
    \inherited\middlerelspacing    \allscriptstyles\tinymuskip
934
 
  % \inherited\middleopenspacing   \allmathstyles  \zeromuskip
935
 
  % \inherited\middlemiddlespacing \allmathstyles  \zeromuskip
936
 
  % \inherited\middleclosespacing  \allmathstyles  \zeromuskip
937
 
  % \inherited\middlepunctspacing  \allmathstyles  \zeromuskip
938
 
    \inherited\middleinnerspacing  \allsplitstyles \thinmuskip
939
 
    \inherited\middleinnerspacing  \allscriptstyles\tinymuskip
940
 
    \inherited\middlefracspacing   \allsplitstyles \medmuskip
941
 
    \inherited\middlefracspacing   \allscriptstyles\tinymuskip
942
 
  % \inherited\middleradspacing    \allmathstyles  \zeromuskip
943
 
    %
944
 
    \inherited\setmathspacing \mathclosecode     \mathdifferentialcode \allsplitstyles  \thinmuskip
945
 
    \inherited\setmathspacing \mathclosecode     \mathdifferentialcode \allscriptstyles \tinymuskip
946
 
    \inherited\setmathspacing \mathordinarycode  \mathdifferentialcode \allsplitstyles  \thinmuskip
947
 
    \inherited\setmathspacing \mathordinarycode  \mathdifferentialcode \allscriptstyles \tinymuskip
948
 
    \inherited\setmathspacing \mathfactorialcode \mathordinarycode     \allsplitstyles  \thinmuskip
949
 
    \inherited\setmathspacing \mathfactorialcode \mathordinarycode     \allscriptstyles \tinymuskip
950
 
    \inherited\setmathspacing \mathfactorialcode \mathfactorialcode    \allmathstyles   \zeromuskip
951
 
    %
952
 
    \inherited\setmathspacing \mathopencode      \mathconstructcode    \allmathstyles   \thinmuskip
953
 
    \inherited\setmathspacing \mathconstructcode \mathclosecode        \allmathstyles   \thinmuskip
 
944
    %
 
945
  % \inherited\setmathspacing \mathordinarycode    \mathordinarycode     \allmathstyles   \zeromuskip
 
946
    \inherited\setmathspacing \mathordinarycode    \mathoperatorcode     \allmathstyles   \thinmuskip
 
947
    \inherited\setmathspacing \mathordinarycode    \mathbinarycode       \allsplitstyles  \medmuskip
 
948
    \inherited\setmathspacing \mathordinarycode    \mathbinarycode       \allscriptstyles \tinymuskip
 
949
    \inherited\setmathspacing \mathordinarycode    \mathrelationcode     \allsplitstyles  \thickmuskip
 
950
    \inherited\setmathspacing \mathordinarycode    \mathrelationcode     \allscriptstyles \tinymuskip
 
951
  % \inherited\setmathspacing \mathordinarycode    \mathopencode         \allmathstyles   \zeromuskip
 
952
    \inherited\setmathspacing \mathordinarycode    \mathmiddlecode       \allsplitstyles  \medmuskip
 
953
    \inherited\setmathspacing \mathordinarycode    \mathmiddlecode       \allscriptstyles \tinymuskip
 
954
  % \inherited\setmathspacing \mathordinarycode    \mathclosecode        \allmathstyles   \zeromuskip
 
955
  % \inherited\setmathspacing \mathordinarycode    \mathpunctuationcode  \allmathstyles   \zeromuskip
 
956
    \inherited\setmathspacing \mathordinarycode    \mathinnercode        \allsplitstyles  \thinmuskip
 
957
    \inherited\setmathspacing \mathordinarycode    \mathinnercode        \allscriptstyles \tinymuskip
 
958
    \inherited\setmathspacing \mathordinarycode    \mathfractioncode     \allmathstyles   \tinymuskip
 
959
    \inherited\setmathspacing \mathordinarycode    \mathradicalcode      \allmathstyles   \tinymuskip
 
960
    %
 
961
    \inherited\setmathspacing \mathoperatorcode    \mathordinarycode     \allmathstyles   \thinmuskip
 
962
    \inherited\setmathspacing \mathoperatorcode    \mathoperatorcode     \allmathstyles   \thinmuskip
 
963
  % \inherited\setmathspacing \mathoperatorcode    \mathbinarycode       \allmathstyles \ zeromuskip
 
964
    \inherited\setmathspacing \mathoperatorcode    \mathrelationcode     \allsplitstyles  \thickmuskip
 
965
    \inherited\setmathspacing \mathoperatorcode    \mathrelationcode     \allscriptstyles \tinymuskip
 
966
  % \inherited\setmathspacing \mathoperatorcode    \mathopencode         \allmathstyles   \zeromuskip
 
967
    \inherited\setmathspacing \mathoperatorcode    \mathmiddlecode       \allsplitstyles  \medmuskip
 
968
    \inherited\setmathspacing \mathoperatorcode    \mathmiddlecode       \allscriptstyles \tinymuskip
 
969
  % \inherited\setmathspacing \mathoperatorcode    \mathclosecode        \allmathstyles   \zeromuskip
 
970
  % \inherited\setmathspacing \mathoperatorcode    \mathpunctuationcode  \allmathstyles   \zeromuskip
 
971
    \inherited\setmathspacing \mathoperatorcode    \mathinnercode        \allsplitstyles  \thinmuskip
 
972
    \inherited\setmathspacing \mathoperatorcode    \mathinnercode        \allscriptstyles \tinymuskip
 
973
    \inherited\setmathspacing \mathoperatorcode    \mathfractioncode     \allmathstyles   \thinmuskip
 
974
    \inherited\setmathspacing \mathoperatorcode    \mathradicalcode      \allmathstyles   \thinmuskip
 
975
    %
 
976
    \inherited\setmathspacing \mathbinarycode      \mathordinarycode     \allsplitstyles  \medmuskip
 
977
    \inherited\setmathspacing \mathbinarycode      \mathordinarycode     \allscriptstyles \tinymuskip
 
978
    \inherited\setmathspacing \mathbinarycode      \mathoperatorcode     \allsplitstyles  \medmuskip
 
979
    \inherited\setmathspacing \mathbinarycode      \mathoperatorcode     \allscriptstyles \tinymuskip
 
980
 %% \inherited\setmathspacing \mathbinarycode      \mathbinarycode       \allmathstyles   \zeromuskip
 
981
 %% \inherited\setmathspacing \mathbinarycode      \mathrelationcode     \allmathstyles   \zeromuskip
 
982
    \inherited\setmathspacing \mathbinarycode      \mathopencode         \allsplitstyles  \medmuskip
 
983
    \inherited\setmathspacing \mathbinarycode      \mathopencode         \allscriptstyles \tinymuskip
 
984
    \inherited\setmathspacing \mathbinarycode      \mathmiddlecode       \allsplitstyles  \medmuskip
 
985
    \inherited\setmathspacing \mathbinarycode      \mathmiddlecode       \allscriptstyles \tinymuskip
 
986
 %% \inherited\setmathspacing \mathbinarycode      \mathclosecode        \allmathstyles   \zeromuskip
 
987
 %% \inherited\setmathspacing \mathbinarycode      \mathpunctuationcode  \allmathstyles   \zeromuskip
 
988
    \inherited\setmathspacing \mathbinarycode      \mathinnercode        \allsplitstyles  \medmuskip
 
989
    \inherited\setmathspacing \mathbinarycode      \mathinnercode        \allscriptstyles \tinymuskip
 
990
    \inherited\setmathspacing \mathbinarycode      \mathfractioncode     \allsplitstyles  \medmuskip
 
991
    \inherited\setmathspacing \mathbinarycode      \mathfractioncode     \allscriptstyles \tinymuskip
 
992
    \inherited\setmathspacing \mathbinarycode      \mathradicalcode      \allsplitstyles  \medmuskip
 
993
    \inherited\setmathspacing \mathbinarycode      \mathradicalcode      \allscriptstyles \tinymuskip
 
994
    %
 
995
    \inherited\setmathspacing \mathrelationcode    \mathordinarycode     \allsplitstyles  \thickmuskip
 
996
    \inherited\setmathspacing \mathrelationcode    \mathordinarycode     \allscriptstyles \tinymuskip
 
997
    \inherited\setmathspacing \mathrelationcode    \mathoperatorcode     \allsplitstyles  \thickmuskip
 
998
    \inherited\setmathspacing \mathrelationcode    \mathoperatorcode     \allscriptstyles \tinymuskip
 
999
 %% \inherited\setmathspacing \mathrelationcode    \mathbinarycode       \allmathstyles   \zeromuskip
 
1000
  % \inherited\setmathspacing \mathrelationcode    \mathrelationcode     \allmathstyles   \zeromuskip
 
1001
    \inherited\setmathspacing \mathrelationcode    \mathopencode         \allsplitstyles  \thickmuskip
 
1002
    \inherited\setmathspacing \mathrelationcode    \mathopencode         \allscriptstyles \tinymuskip
 
1003
    \inherited\setmathspacing \mathrelationcode    \mathmiddlecode       \allsplitstyles  \thickmuskip
 
1004
    \inherited\setmathspacing \mathrelationcode    \mathmiddlecode       \allscriptstyles \thinmuskip
 
1005
  % \inherited\setmathspacing \mathrelationcode    \mathclosecode        \allmathstyles   \zeromuskip
 
1006
  % \inherited\setmathspacing \mathrelationcode    \mathpunctuationcode  \allmathstyles   \zeromuskip
 
1007
    \inherited\setmathspacing \mathrelationcode    \mathinnercode        \allsplitstyles  \thickmuskip
 
1008
    \inherited\setmathspacing \mathrelationcode    \mathinnercode        \allscriptstyles \tinymuskip
 
1009
    \inherited\setmathspacing \mathrelationcode    \mathfractioncode     \allsplitstyles  \thickmuskip
 
1010
    \inherited\setmathspacing \mathrelationcode    \mathfractioncode     \allscriptstyles \tinymuskip
 
1011
    \inherited\setmathspacing \mathrelationcode    \mathradicalcode      \allsplitstyles  \thickmuskip
 
1012
    \inherited\setmathspacing \mathrelationcode    \mathradicalcode      \allscriptstyles \tinymuskip
 
1013
    %
 
1014
  % \inherited\setmathspacing \mathopencode        \mathordinarycode     \allmathstyles   \zeromuskip
 
1015
  % \inherited\setmathspacing \mathopencode        \mathoperatorcode     \allmathstyles   \zeromuskip
 
1016
  % \inherited\setmathspacing \mathopencode        \mathbinarycode       \allmathstyles   \zeromuskip
 
1017
  % \inherited\setmathspacing \mathopencode        \mathrelationcode     \allmathstyles   \zeromuskip
 
1018
  % \inherited\setmathspacing \mathopencode        \mathopencode         \allmathstyles   \zeromuskip
 
1019
  % \inherited\setmathspacing \mathopencode        \mathmiddlecode       \allmathstyles   \zeromuskip
 
1020
  % \inherited\setmathspacing \mathopencode        \mathclosecode        \allmathstyles   \zeromuskip
 
1021
  % \inherited\setmathspacing \mathopencode        \mathpunctuationcode  \allmathstyles   \zeromuskip
 
1022
  % \inherited\setmathspacing \mathopencode        \mathinnercode        \allmathstyles   \zeromuskip
 
1023
    \inherited\setmathspacing \mathopencode        \mathfractioncode     \allmathstyles   \tinymuskip
 
1024
  % \inherited\setmathspacing \mathopencode        \mathradicalcode      \allmathstyles   \zeromuskip
 
1025
    %
 
1026
  % \inherited\setmathspacing \mathclosecode       \mathordinarycode     \allmathstyles   \zeromuskip
 
1027
    \inherited\setmathspacing \mathclosecode       \mathoperatorcode     \allmathstyles   \thinmuskip
 
1028
    \inherited\setmathspacing \mathclosecode       \mathbinarycode       \allsplitstyles  \medmuskip
 
1029
    \inherited\setmathspacing \mathclosecode       \mathbinarycode       \allscriptstyles \tinymuskip
 
1030
    \inherited\setmathspacing \mathclosecode       \mathrelationcode     \allsplitstyles  \thickmuskip
 
1031
    \inherited\setmathspacing \mathclosecode       \mathrelationcode     \allscriptstyles \tinymuskip
 
1032
  % \inherited\setmathspacing \mathclosecode       \mathopencode         \allmathstyles   \zeromuskip
 
1033
  % \inherited\setmathspacing \mathclosecode       \mathmiddlecode       \allmathstyles   \zeromuskip
 
1034
  % \inherited\setmathspacing \mathclosecode       \mathclosecode        \allmathstyles   \zeromuskip
 
1035
  % \inherited\setmathspacing \mathclosecode       \mathpunctuationcode  \allmathstyles   \zeromuskip
 
1036
    \inherited\setmathspacing \mathclosecode       \mathinnercode        \allsplitstyles  \thinmuskip
 
1037
    \inherited\setmathspacing \mathclosecode       \mathinnercode        \allscriptstyles \tinymuskip
 
1038
    \inherited\setmathspacing \mathclosecode       \mathfractioncode     \allsplitstyles  \thinmuskip
 
1039
    \inherited\setmathspacing \mathclosecode       \mathfractioncode     \allscriptstyles \tinymuskip
 
1040
  % \inherited\setmathspacing \mathclosecode       \mathradicalcode      \allmathstyles   \zeromuskip
 
1041
    %
 
1042
    \inherited\setmathspacing \mathpunctuationcode \mathordinarycode     \allsplitstyles  \thinmuskip
 
1043
    \inherited\setmathspacing \mathpunctuationcode \mathordinarycode     \allscriptstyles \tinymuskip
 
1044
    \inherited\setmathspacing \mathpunctuationcode \mathoperatorcode     \allsplitstyles  \thinmuskip
 
1045
    \inherited\setmathspacing \mathpunctuationcode \mathoperatorcode     \allscriptstyles \tinymuskip
 
1046
  % \inherited\setmathspacing \mathpunctuationcode \mathbinarycode       \allmathstyles   \zeromuskip
 
1047
    \inherited\setmathspacing \mathpunctuationcode \mathrelationcode     \allsplitstyles  \thinmuskip
 
1048
    \inherited\setmathspacing \mathpunctuationcode \mathrelationcode     \allscriptstyles \tinymuskip
 
1049
    \inherited\setmathspacing \mathpunctuationcode \mathopencode         \allsplitstyles  \thinmuskip
 
1050
    \inherited\setmathspacing \mathpunctuationcode \mathopencode         \allscriptstyles \tinymuskip
 
1051
    \inherited\setmathspacing \mathpunctuationcode \mathmiddlecode       \allsplitstyles  \thinmuskip
 
1052
    \inherited\setmathspacing \mathpunctuationcode \mathmiddlecode       \allscriptstyles \tinymuskip
 
1053
    \inherited\setmathspacing \mathpunctuationcode \mathclosecode        \allsplitstyles  \thinmuskip
 
1054
    \inherited\setmathspacing \mathpunctuationcode \mathclosecode        \allscriptstyles \tinymuskip
 
1055
    \inherited\setmathspacing \mathpunctuationcode \mathpunctuationcode  \allsplitstyles  \thinmuskip
 
1056
    \inherited\setmathspacing \mathpunctuationcode \mathpunctuationcode  \allscriptstyles \tinymuskip
 
1057
    \inherited\setmathspacing \mathpunctuationcode \mathinnercode        \allsplitstyles  \thinmuskip
 
1058
    \inherited\setmathspacing \mathpunctuationcode \mathinnercode        \allscriptstyles \tinymuskip
 
1059
    \inherited\setmathspacing \mathpunctuationcode \mathfractioncode     \allsplitstyles  \thinmuskip
 
1060
    \inherited\setmathspacing \mathpunctuationcode \mathfractioncode     \allscriptstyles \tinymuskip
 
1061
    \inherited\setmathspacing \mathpunctuationcode \mathradicalcode      \allsplitstyles  \thinmuskip
 
1062
    \inherited\setmathspacing \mathpunctuationcode \mathradicalcode      \allscriptstyles \tinymuskip
 
1063
    %
 
1064
    \inherited\setmathspacing \mathinnercode       \mathordinarycode     \allsplitstyles  \thinmuskip
 
1065
    \inherited\setmathspacing \mathinnercode       \mathordinarycode     \allscriptstyles \tinymuskip
 
1066
    \inherited\setmathspacing \mathinnercode       \mathoperatorcode     \allmathstyles   \thinmuskip
 
1067
    \inherited\setmathspacing \mathinnercode       \mathbinarycode       \allsplitstyles  \medmuskip
 
1068
    \inherited\setmathspacing \mathinnercode       \mathbinarycode       \allscriptstyles \tinymuskip
 
1069
    \inherited\setmathspacing \mathinnercode       \mathrelationcode     \allsplitstyles  \thickmuskip
 
1070
    \inherited\setmathspacing \mathinnercode       \mathrelationcode     \allscriptstyles \tinymuskip
 
1071
    \inherited\setmathspacing \mathinnercode       \mathopencode         \allsplitstyles  \thinmuskip
 
1072
    \inherited\setmathspacing \mathinnercode       \mathopencode         \allscriptstyles \tinymuskip
 
1073
    \inherited\setmathspacing \mathinnercode       \mathmiddlecode       \allsplitstyles  \thinmuskip
 
1074
    \inherited\setmathspacing \mathinnercode       \mathmiddlecode       \allscriptstyles \tinymuskip
 
1075
  % \inherited\setmathspacing \mathinnercode       \mathclosecode        \allmathstyles   \zeromuskip
 
1076
    \inherited\setmathspacing \mathinnercode       \mathpunctuationcode  \allsplitstyles  \thinmuskip
 
1077
    \inherited\setmathspacing \mathinnercode       \mathpunctuationcode  \allscriptstyles \tinymuskip
 
1078
    \inherited\setmathspacing \mathinnercode       \mathinnercode        \allsplitstyles  \thinmuskip
 
1079
    \inherited\setmathspacing \mathinnercode       \mathinnercode        \allscriptstyles \tinymuskip
 
1080
    \inherited\setmathspacing \mathinnercode       \mathfractioncode     \allsplitstyles  \thinmuskip
 
1081
    \inherited\setmathspacing \mathinnercode       \mathfractioncode     \allscriptstyles \tinymuskip
 
1082
    \inherited\setmathspacing \mathinnercode       \mathradicalcode      \allsplitstyles  \thinmuskip
 
1083
    \inherited\setmathspacing \mathinnercode       \mathradicalcode      \allscriptstyles \tinymuskip
 
1084
    %
 
1085
    \inherited\setmathspacing \mathfractioncode    \mathordinarycode     \allmathstyles   \tinymuskip
 
1086
    \inherited\setmathspacing \mathfractioncode    \mathoperatorcode     \allmathstyles   \thinmuskip
 
1087
    \inherited\setmathspacing \mathfractioncode    \mathbinarycode       \allsplitstyles  \medmuskip
 
1088
    \inherited\setmathspacing \mathfractioncode    \mathbinarycode       \allscriptstyles \tinymuskip
 
1089
    \inherited\setmathspacing \mathfractioncode    \mathrelationcode     \allsplitstyles  \thickmuskip
 
1090
    \inherited\setmathspacing \mathfractioncode    \mathrelationcode     \allscriptstyles \tinymuskip
 
1091
    \inherited\setmathspacing \mathfractioncode    \mathopencode         \allsplitstyles  \thinmuskip
 
1092
    \inherited\setmathspacing \mathfractioncode    \mathopencode         \allscriptstyles \tinymuskip
 
1093
    \inherited\setmathspacing \mathfractioncode    \mathmiddlecode       \allsplitstyles  \medmuskip
 
1094
    \inherited\setmathspacing \mathfractioncode    \mathmiddlecode       \allscriptstyles \tinymuskip
 
1095
    \inherited\setmathspacing \mathfractioncode    \mathclosecode        \allmathstyles   \tinymuskip
 
1096
  % \inherited\setmathspacing \mathfractioncode    \mathpunctuationcode  \allmathstyles   \zeromuskip
 
1097
    \inherited\setmathspacing \mathfractioncode    \mathinnercode        \allsplitstyles  \thinmuskip
 
1098
    \inherited\setmathspacing \mathfractioncode    \mathinnercode        \allscriptstyles \tinymuskip
 
1099
    \inherited\setmathspacing \mathfractioncode    \mathfractioncode     \allsplitstyles  \thinmuskip
 
1100
    \inherited\setmathspacing \mathfractioncode    \mathfractioncode     \allscriptstyles \tinymuskip
 
1101
    \inherited\setmathspacing \mathfractioncode    \mathradicalcode      \allmathstyles   \tinymuskip
 
1102
    %
 
1103
    \inherited\setmathspacing \mathradicalcode     \mathordinarycode     \allsplitstyles  \tinymuskip
 
1104
    \inherited\setmathspacing \mathradicalcode     \mathoperatorcode     \allmathstyles   \thinmuskip
 
1105
    \inherited\setmathspacing \mathradicalcode     \mathbinarycode       \allsplitstyles  \medmuskip
 
1106
    \inherited\setmathspacing \mathradicalcode     \mathbinarycode       \allscriptstyles \tinymuskip
 
1107
    \inherited\setmathspacing \mathradicalcode     \mathrelationcode     \allsplitstyles  \thickmuskip
 
1108
    \inherited\setmathspacing \mathradicalcode     \mathrelationcode     \allscriptstyles \tinymuskip
 
1109
  % \inherited\setmathspacing \mathradicalcode     \mathopencode         \allmathstyles   \zeromuskip
 
1110
  % \inherited\setmathspacing \mathradicalcode     \mathmiddlecode       \allmathstyles   \zeromuskip
 
1111
  % \inherited\setmathspacing \mathradicalcode     \mathclosecode        \allmathstyles   \zeromuskip
 
1112
  % \inherited\setmathspacing \mathradicalcode     \mathpunctuationcode  \allmathstyles   \zeromuskip
 
1113
    \inherited\setmathspacing \mathradicalcode     \mathinnercode        \allsplitstyles  \thinmuskip
 
1114
    \inherited\setmathspacing \mathradicalcode     \mathinnercode        \allscriptstyles \tinymuskip
 
1115
    \inherited\setmathspacing \mathradicalcode     \mathfractioncode     \allmathstyles   \tinymuskip
 
1116
    \inherited\setmathspacing \mathradicalcode     \mathradicalcode      \allmathstyles   \tinymuskip
 
1117
    %
 
1118
    \inherited\setmathspacing \mathmiddlecode      \mathordinarycode     \allsplitstyles  \medmuskip
 
1119
    \inherited\setmathspacing \mathmiddlecode      \mathordinarycode     \allscriptstyles \tinymuskip
 
1120
    \inherited\setmathspacing \mathmiddlecode      \mathoperatorcode     \allmathstyles   \thinmuskip
 
1121
    \inherited\setmathspacing \mathmiddlecode      \mathbinarycode       \allsplitstyles  \medmuskip
 
1122
    \inherited\setmathspacing \mathmiddlecode      \mathbinarycode       \allscriptstyles \tinymuskip
 
1123
    \inherited\setmathspacing \mathmiddlecode      \mathrelationcode     \allsplitstyles  \thickmuskip
 
1124
    \inherited\setmathspacing \mathmiddlecode      \mathrelationcode     \allscriptstyles \tinymuskip
 
1125
  % \inherited\setmathspacing \mathmiddlecode      \mathopencode         \allmathstyles   \zeromuskip
 
1126
  % \inherited\setmathspacing \mathmiddlecode      \mathmiddlecode       \allmathstyles   \zeromuskip
 
1127
  % \inherited\setmathspacing \mathmiddlecode      \mathclosecode        \allmathstyles   \zeromuskip
 
1128
  % \inherited\setmathspacing \mathmiddlecode      \mathpunctuationcode  \allmathstyles   \zeromuskip
 
1129
    \inherited\setmathspacing \mathmiddlecode      \mathinnercode        \allsplitstyles  \thinmuskip
 
1130
    \inherited\setmathspacing \mathmiddlecode      \mathinnercode        \allscriptstyles \tinymuskip
 
1131
    \inherited\setmathspacing \mathmiddlecode      \mathfractioncode     \allsplitstyles  \medmuskip
 
1132
    \inherited\setmathspacing \mathmiddlecode      \mathfractioncode     \allscriptstyles \tinymuskip
 
1133
  % \inherited\setmathspacing \mathmiddlecode      \mathradicalcode      \allmathstyles   \zeromuskip
 
1134
    %
 
1135
    \inherited\setmathspacing \mathclosecode       \mathdifferentialcode \allsplitstyles  \thinmuskip
 
1136
    \inherited\setmathspacing \mathclosecode       \mathdifferentialcode \allscriptstyles \tinymuskip
 
1137
    \inherited\setmathspacing \mathordinarycode    \mathdifferentialcode \allsplitstyles  \thinmuskip
 
1138
    \inherited\setmathspacing \mathordinarycode    \mathdifferentialcode \allscriptstyles \tinymuskip
 
1139
    \inherited\setmathspacing \mathfactorialcode   \mathordinarycode     \allsplitstyles  \thinmuskip
 
1140
    \inherited\setmathspacing \mathfactorialcode   \mathordinarycode     \allscriptstyles \tinymuskip
 
1141
    \inherited\setmathspacing \mathfactorialcode   \mathfactorialcode    \allmathstyles   \zeromuskip
 
1142
    %
 
1143
    \inherited\setmathspacing \mathopencode        \mathconstructcode    \allmathstyles   \thinmuskip
 
1144
    \inherited\setmathspacing \mathconstructcode   \mathclosecode        \allmathstyles   \thinmuskip
954
1145
\stopsetups
955
1146
 
956
1147
\directsetup{math:spacing:default}
1335
1526
 
1336
1527
\immutable\chardef\c_math_strut"28
1337
1528
 
1338
 
% \protected\def\math_strut_htdp#1%
1339
 
%   {\s!height\fontcharht#1\c_math_strut
1340
 
%    \s!depth \fontchardp#1\c_math_strut}
1341
 
%
1342
 
% now we need this (kind of inefficient):
1343
 
 
1344
 
% \protected\def\math_strut_htdp#1% nasty!
1345
 
%   {\s!height\dimexpr\mathscale#1\fontcharht#1\c_math_strut/\glyphscale\relax
1346
 
%    \s!depth \dimexpr\mathscale#1\fontchardp#1\c_math_strut/\glyphscale\relax}
1347
 
%
1348
 
% this overflows so we use this instead:
1349
 
 
1350
 
% \protected\def\math_strut_htdp#1% nasty!
1351
 
%   {\s!height\dimexpr(\fontcharht#1\c_math_strut/\glyphscale)*\mathscale#1\relax
1352
 
%    \s!depth \dimexpr(\fontchardp#1\c_math_strut/\glyphscale)*\mathscale#1\relax}
1353
 
%
1354
 
% \protected\def\math_strut_normal
1355
 
%   {\vrule
1356
 
%       \s!width \zeropoint
1357
 
%       \normalexpanded{\math_strut_htdp{\mathstylefont\normalmathstyle}}%
1358
 
%    \relax}
1359
 
%
1360
 
% \protected\def\math_strut_visual
1361
 
%   {\hskip-.01\emwidth
1362
 
%    \vrule
1363
 
%       \s!width .02\emwidth
1364
 
%       \normalexpanded{\math_strut_htdp{\mathstylefont\normalmathstyle}}%
1365
 
%    \relax
1366
 
%    \hskip-.01\emwidth}
 
1529
%D For the evolution of these struts see the git repositories and older code in
 
1530
%D \MKIV\ and \MKI\ (commented code removed end April 2022).
1367
1531
 
1368
1532
\let\math_strut_math_style\normalmathstyle
1369
1533
 
1415
1579
\permanent\protected\def\topstrut{\srule\s!width\zeropoint\s!height\strutht  \s!depth\zeropoint\relax}
1416
1580
\permanent\protected\def\botstrut{\srule\s!width\zeropoint\s!height\zeropoint\s!depth\strutdp  \relax}
1417
1581
 
 
1582
\newdimen\mathstrutht
 
1583
\newdimen\mathstrutdp
 
1584
 
 
1585
\appendtoks
 
1586
    \mathstrutht\strutht
 
1587
    \mathstrutdp\strutdp
 
1588
  % \writestatus{!!!!!!}{\the\mathstrutht,\the\mathstrutdp}%
 
1589
\to \everymathematics
 
1590
 
1418
1591
%D We could have a arg variant \unknown\ but not now.
1419
1592
 
1420
1593
\permanent\protected\def\mathopwithlimits#1#2{\mathop{#1{#2}}\limits}
1431
1604
 
1432
1605
% \let\normalmathop\mathop % already defined
1433
1606
 
1434
 
% no longer needed as we no longer switch fonts
1435
 
%
1436
 
% \protected\def\mathop
1437
 
%   {\normalmathop
1438
 
%    \bgroup
1439
 
%   % no: \let\rm\mf
1440
 
%    \afterassignment\math_op\let\nexttoken=}
1441
 
%
1442
 
% \def\math_op{\ifx\nexttoken\bgroup\else\nexttoken\egroup\fi}
1443
 
 
1444
 
% this one too: \letvalue{\??mathcodecommand op}\mathop ?
1445
 
 
1446
1607
\permanent\protected\def\normalmbox
1447
1608
  {\normalhbox\bgroup
1448
1609
   \usemathematicsstyleandcolor\c!textstyle\c!textcolor % new
1507
1668
% \Umathcode"2063 = \mathghostcode \zerocount "2063 % \invisiblecomma
1508
1669
% \Umathcode"2064 = \mathghostcode \zerocount "2063 % \invisibleplus
1509
1670
 
1510
 
% \protected\def\math_mfunction_styled
1511
 
%   {%\begingroup
1512
 
%    \usemathematicscolorparameter\c!functioncolor
1513
 
%    \edef\p_functionstyle{\mathematicsparameter\c!functionstyle}%
1514
 
%    \ifempty\p_functionstyle
1515
 
%      \expandafter\math_mfunction_styled_none
1516
 
%    \orelse\ifcsname\??alternativestyle\p_functionstyle\endcsname
1517
 
%      \expandafter\math_mfunction_styled_text
1518
 
%    \else
1519
 
%      \expandafter\math_mfunction_styled_math
1520
 
%    \fi}
1521
 
%
1522
 
% \protected\def\math_mfunction_styled_text#1%
1523
 
%   {\expandafter$\expandafter\mathoptext\expandafter{\lastnamedcs#1}$%
1524
 
%  %{\normalexpanded{$\mathoptext{\csname\??alternativestyle\p_functionstyle\endcsname#1}$}%
1525
 
%    }%\endgroup}
1526
 
%
1527
 
% \protected\def\math_mfunction_styled_math#1%
1528
 
%   {\p_functionstyle
1529
 
%    #1%
1530
 
%    }%\endgroup}
1531
 
%
1532
 
% \protected\def\math_mfunction_styled_none#1%
1533
 
%   {\math_upright
1534
 
%    #1%
1535
 
%    }%\endgroup}
1536
 
%
1537
 
% \permanent\protected\def\mfunction#1%
1538
 
%   {\mathatom mathfont class \mathfunctioncode \bgroup
1539
 
%      \math_tags_mfunctiontxt{#1}\c_apply_function
1540
 
%      \hbox{\math_mfunction_styled{#1}}%
1541
 
%    \egroup}
1542
 
%
1543
 
% \permanent\protected\def\mfunctionlabeltext#1%
1544
 
%   {\mathatom mathfont class \mathfunctioncode \bgroup
1545
 
%      \math_tags_mfunctionlab{#1}\c_apply_function
1546
 
%      \hbox{\math_mfunction_styled{\mathlabeltext{#1}}}%
1547
 
%    \egroup}
1548
 
 
1549
 
% \def\math_function_handle#1#2%
1550
 
%   {\begingroup
1551
 
%    \usemathematicscolorparameter\c!functioncolor
1552
 
%    \edef\p_functionstyle{\mathematicsparameter\c!functionstyle}%
1553
 
%    \ifempty\p_functionstyle
1554
 
%      \expandafter\math_upright
1555
 
%    \orelse\ifcsname\??alternativestyle\p_functionstyle\endcsname
1556
 
%      \expandafter\lastnamedcs
1557
 
%    \else
1558
 
%      \expandafter\p_functionstyle
1559
 
%    \fi
1560
 
%    \mathatom mathfont class \mathfunctioncode \bgroup
1561
 
%      \math_tags_mfunctionlab{#2}\c_apply_function % maybe move this before mathatom
1562
 
%      #1{#2}% how to avoid going ord, we need something text with no spacing at all
1563
 
%    \egroup
1564
 
%    \endgroup}
1565
 
 
1566
 
\protected\def\math_function_handle#1#2%
1567
 
  {\mathatom mathfont class \mathfunctioncode \bgroup % textfont
1568
 
     \math_tags_mfunctionlab{#2}\c_apply_function
1569
 
     \usemathematicscolorparameter\c!functioncolor
1570
 
     \edef\p_functionstyle{\mathematicsparameter\c!functionstyle}%
1571
 
     \ifempty\p_functionstyle
1572
 
       \expandafter\math_upright
1573
 
     \orelse\ifcsname\??alternativestyle\p_functionstyle\endcsname
1574
 
       \expandafter\lastnamedcs
1575
 
     \else
1576
 
       \expandafter\p_functionstyle
1577
 
     \fi
1578
 
     #1{#2}%
1579
 
   \egroup}
1580
 
 
1581
 
\permanent\protected\def\mfunction         {\math_function_handle\firstofoneargument}
1582
 
\permanent\protected\def\mfunctionlabeltext{\math_function_handle\mathlabeltext}
 
1671
%D For previous variants of the function styling you can check the git repository
 
1672
%D end April 2022.
 
1673
 
 
1674
\protected\def\math_function_handle#1#2#3%
 
1675
  {\begingroup
 
1676
   \getdummyparameters[\c!mathlimits=,#1]%
 
1677
   \edef\p_limits{\dummyparameter\c!mathlimits}%
 
1678
   \mathatom
 
1679
        mathfont
 
1680
        class \mathfunctioncode
 
1681
        \ifx\p_limits\v!no
 
1682
          nolimits
 
1683
        \orelse\ifx\p_limits\v!yes
 
1684
          limits
 
1685
        \orelse\ifx\p_limits\v!auto
 
1686
          nolimits
 
1687
          limits
 
1688
        \fi
 
1689
     \bgroup % textfont
 
1690
       \math_tags_mfunctionlab{#3}\c_apply_function
 
1691
       \usemathematicscolorparameter\c!functioncolor
 
1692
       \edef\p_functionstyle{\mathematicsparameter\c!functionstyle}%
 
1693
       \ifempty\p_functionstyle
 
1694
         \expandafter\math_upright
 
1695
       \orelse\ifcsname\??alternativestyle\p_functionstyle\endcsname
 
1696
         \expandafter\lastnamedcs
 
1697
       \else
 
1698
         \expandafter\p_functionstyle
 
1699
       \fi
 
1700
       #2{#3}%
 
1701
     \egroup
 
1702
   \endgroup}
 
1703
 
 
1704
\permanent\tolerant\protected\def\mfunction         [#1]{\math_function_handle{#1}\firstofoneargument}
 
1705
\permanent\tolerant\protected\def\mfunctionlabeltext[#1]{\math_function_handle{#1}\mathlabeltext}
1583
1706
 
1584
1707
\permanent\tolerant\protected\def\definemathfunction[#1]#*[#2]%
1585
 
  {\frozen\protected\defcsname#1\endcsname{\math_function_handle_label{#1}{#2}}}
1586
 
 
1587
 
\protected\def\math_function_handle_label#1#2% tag settings
1588
 
  {\begingroup
1589
 
   \getdummyparameters[\c!mathlimits=,#2]%
1590
 
   \math_function_handle\mathlabeltext{#1}%
1591
 
   \ifcstok{\dummyparameter\c!mathlimits}\v!yes\limits\fi
1592
 
   \endgroup}
1593
 
 
 
1708
  {\frozen\protected\defcsname#1\endcsname{\math_function_handle{#2}\mathlabeltext{#1}}}
1594
1709
 
1595
1710
\let\math_tags_mfunctiontxt\gobbletwoarguments
1596
1711
\let\math_tags_mfunctionlab\gobbletwoarguments
1636
1751
    \enforced\let\apply\math_tags_apply
1637
1752
\to\everymathematics
1638
1753
 
1639
 
% \def\mlimitsfunction  #1{\mathlimopcomm{{\mr#1}}
1640
 
% \def\mnolimitsfunction#1{\mathnolopcomm{{\mr#1}}
1641
 
 
1642
 
% %D Taco posted this solution as response to a mail by Olivier, so let's integrate
1643
 
% %D it here.
1644
 
%
1645
 
% \def\currentmscaledstyle{rm} % will be plugged into the typeface text=ss option
1646
 
%
1647
 
% \protected\def\math_function_style_opnolimits        #1{\mathop{\mscaledtext{#1}}\nolimits}
1648
 
% \protected\def\math_function_style_mfunction         #1{\mscaledtext{\math_tags_function{#1}}}
1649
 
% \protected\def\math_function_style_mfunctionlabeltext#1{\mscaledtext{\math_tags_functionlabeltext{#1}}}
1650
 
%
1651
 
% \protected\def\setmathfunctionstyle#1% rm ss tt (can be made faster if needed)
1652
 
%   {\doifsomething{#1}
1653
 
%      {\def\currentmscaledstyle{#1}%
1654
 
%       \let\mathopnolimits    \math_function_style_opnolimits
1655
 
%       \let\mfunction         \math_function_style_mfunction
1656
 
%       \let\mfunctionlabeltext\math_function_style_mfunctionlabeltext}}
1657
 
 
1658
1754
\mutable\def\currentmscaledstyle{rm} % will be plugged into the typeface text=ss option
1659
1755
 
1660
1756
\permanent\protected\def\mscaledtext#1%
1694
1790
%D \donknuthmode $x_2$ x_2 \test{$x_2$} \test{x_2}
1695
1791
%D \stoptyping
1696
1792
%D
1697
 
%D The result is as expected: the first line typesets ok, while the second
1698
 
%D one triggers an error message.
 
1793
%D The result is as expected: the first line typesets ok, while the second one
 
1794
%D triggers an error message.
1699
1795
 
1700
1796
\setnewconstant\activemathcharcode "8000
1701
1797
 
1713
1809
 
1714
1810
\activatemathcharacter\circumflexasciicode
1715
1811
\activatemathcharacter\underscoreasciicode
1716
 
\activatemathcharacter\ampersandasciicode
1717
 
 
1718
 
\permanent\def\normalmathaligntab{&} % \let\normalmathaligntab\aligntab doesn;t work well in a let to & (a def works ok)
1719
 
 
1720
 
\appendtoks
1721
 
    \edef\p_ampersand{\mathematicsparameter\s!ampersand}%
1722
 
    \ifx\p_ampersand\v!normal
1723
 
        \enforced\let\specialmathaligntab\normalmathaligntab
1724
 
    \else
1725
 
        \enforced\let\specialmathaligntab\mathampersand
1726
 
    \fi
1727
 
\to \everysetupmathematics
 
1812
%activatemathcharacter\ampersandasciicode
 
1813
 
 
1814
% \permanent\def\normalmathaligntab{&}
 
1815
%
 
1816
% \appendtoks
 
1817
%     \edef\p_ampersand{\mathematicsparameter\s!ampersand}%
 
1818
%     \ifx\p_ampersand\v!normal
 
1819
%         \enforced\let\specialmathaligntab\normalmathaligntab
 
1820
%     \else
 
1821
%         \enforced\let\specialmathaligntab\mathampersand
 
1822
%     \fi
 
1823
% \to \everysetupmathematics
1728
1824
 
1729
1825
%D A simplified version of this code is:
1730
1826
%D
1762
1858
%D $A \char"26 B$
1763
1859
%D \stoptyping
1764
1860
%D
1765
 
%D fails with: \type{Misplaced alignment tab character &} and here is the
1766
 
%D reason.
1767
 
%D
1768
 
%D When we have a letter or other category a check happens for an active
1769
 
%D character and when it has one then it gets expanded and fed back into the
1770
 
%D scanner (sort of).
1771
 
%D
1772
 
%D A \type {\char} is also fed back as raw character and again when it's letter
1773
 
%D of other goes through the same process.
 
1861
%D fails with: \type{Misplaced alignment tab character &} and here is the reason.
 
1862
%D
 
1863
%D When we have a letter or other category a check happens for an active character
 
1864
%D and when it has one then it gets expanded and fed back into the scanner (sort
 
1865
%D of).
 
1866
%D
 
1867
%D A \type {\char} is also fed back as raw character and again when it's letter of
 
1868
%D other goes through the same process.
1774
1869
%D
1775
1870
%D This means that we cannot have a definition like:
1776
1871
%D
1786
1881
%D
1787
1882
%D Maybe we need an option to treat chars like chars.
1788
1883
 
1789
 
% \activatemathcharacter\primeasciicode
1790
 
 
1791
 
% not used:
1792
 
%
1793
 
% \mathcode\spaceasciicode\activemathcharcode
1794
 
%
1795
 
% not used:
1796
 
%
1797
 
% \bgroup
1798
 
%     \catcode\underscoreasciicode\activecatcode
1799
 
%     \doglobal\appendtoks
1800
 
%         \mathcode\underscoreasciicode\activemathcharcode
1801
 
%         \let_\activemathunderscore
1802
 
%     \to \everymathematics
1803
 
% \egroup
1804
 
 
1805
 
% Here follows some plain legacy: primes.
1806
 
%
1807
 
% The \let\prime\math_prime_indeed might become an obsolete as we have \doubleprime
1808
 
% and \tripleprime and collapsing can nicely handle the script then.
1809
 
%
1810
 
% Collapsing to 0x2033 and 0x2034 happens elsewhere.
1811
 
%
1812
 
% \switchtobodyfont[modern]
1813
 
% \switchtobodyfont[cambria]
1814
 
% \switchtobodyfont[xits]
1815
 
% \switchtobodyfont[minion]
1816
 
% \setupbodyfont[dejavu]
1817
 
%
1818
 
% \startbuffer
1819
 
% \def\SampleLine#1{%
1820
 
%    \NC#1
1821
 
%    \NC\switchtobodyfont[#1]$f^2$                       %  1
1822
 
%    \NC\switchtobodyfont[#1]$f\prime^2$                 %  2
1823
 
%    \NC\switchtobodyfont[#1]$f\prime\prime^2$           %  3
1824
 
%    \NC\switchtobodyfont[#1]$f\prime\prime\prime^2$     %  4
1825
 
%    \NC\switchtobodyfont[#1]$f{\prime}^2$               %  5
1826
 
%    \NC\switchtobodyfont[#1]$f{\prime\prime}^2$         %  6
1827
 
%    \NC\switchtobodyfont[#1]$f{\prime\prime\prime}^2$   %  7
1828
 
%    \NC\switchtobodyfont[#1]$f'(x)$                     %  8
1829
 
%    \NC\switchtobodyfont[#1]$f''(x)$                    %  9
1830
 
%    \NC\switchtobodyfont[#1]$f'''(x)$                   % 10
1831
 
%    \NC\NR
1832
 
% }
1833
 
%
1834
 
% \starttabulate[|Tl|Tc|Tc|Tc|Tc|Tc|Tc|Tc|Tc|Tc|Tc|]
1835
 
%     \NC\NC1\NC2\NC3\NC4\NC5\NC6\NC7\NC8\NC9\NC10\NC\NR
1836
 
%     \SampleLine{modern}
1837
 
%     \SampleLine{cambria}
1838
 
%     \SampleLine{xits}
1839
 
%     \SampleLine{minion}
1840
 
% \stoptabulate
1841
 
% \stopbuffer
1842
 
%
1843
 
% \typebuffer \getbuffer
1844
 
 
1845
 
% most math fonts have messed up primes, just test this: $\prime^{\prime^{\prime}}$
1846
 
 
1847
 
{ \catcode\circumflexasciicode\othercatcode       \immutable\glet\othercircumflextoken      ^ }
1848
 
{ \catcode\circumflexasciicode\superscriptcatcode \immutable\glet\superscriptcircumflextoken^ }
 
1884
%D The commented prime related code (dating from \MKII\ times has been removed in
 
1885
%D April 2022 but it's in the archives. In \LUAMETATEX\ primes are part of the
 
1886
%D machinery and additional magic (as in \MKIV) happens elsewhere. There is no
 
1887
%D need to remember old stuff because \MKII\ times are long gone.
1849
1888
 
1850
1889
\ifdefined \prime \else
1851
1890
    \Umathchardef\prime "0 "0 "2032
1852
1891
\fi
1853
1892
 
1854
 
% \let\math_prime_indeed_normal\prime
1855
 
%
1856
 
% \appendtoks
1857
 
%     \let\math_prime_indeed_normal\prime    % gets defined later
1858
 
%     \let\mathfontprime\prime               % for tracing
1859
 
%     \let\prime\math_prime_indeed           % so this is needed
1860
 
% \to \everydump
1861
 
%
1862
 
% \protected\def\math_prime_indeed
1863
 
%   {\iffontchar\textfont\zerocount"FE325\relax
1864
 
%     ^\bgroup
1865
 
%      \expandafter\math_prime_indeed_virtual % virtual mess (using funny signal)
1866
 
%    \else
1867
 
%    % \expandafter\math_prime_indeed_normal  % gets collapsed
1868
 
%      \expandafter\math_prime_indeed_crapped  % gets collapsed
1869
 
%    \fi}
1870
 
%
1871
 
% \def\math_prime_indeed_crapped
1872
 
%   {{^{\math_prime_indeed_normal}}}
1873
 
%
1874
 
% % \let\prime\math_prime_indeed
1875
 
%
1876
 
% \def\math_prime_indeed_virtual
1877
 
%   {\math_prime_indeed_normal
1878
 
%    \futurelet\nexttoken\math_prime_indeed_choice}
1879
 
%
1880
 
% \installcorenamespace{mathprime}
1881
 
%
1882
 
% \def\math_prime_indeed_choice
1883
 
%   {\csname\??mathprime
1884
 
%      \ifx                          '\nexttoken a\else
1885
 
%      \ifx  \math_prime_indeed_normal\nexttoken a\else
1886
 
%      \ifx                     \prime\nexttoken a\else
1887
 
%      \ifx\superscriptcircumflextoken\nexttoken b\else
1888
 
%      \ifx\othercircumflextoken      \nexttoken b\else
1889
 
%                                                c\fi\fi\fi\fi\fi
1890
 
%    \endcsname}
1891
 
%
1892
 
% \setvalue{\??mathprime a}#1{\math_prime_indeed_virtual}
1893
 
% \setvalue{\??mathprime b}#1#2{#2\egroup}
1894
 
% \setvalue{\??mathprime c}{\egroup}
1895
 
%
1896
 
% \let\activemathprime\math_prime_indeed
1897
 
%
1898
 
% \bgroup
1899
 
%
1900
 
%     \catcode\primeasciicode\activecatcode
1901
 
%
1902
 
%     \global\everymathematics\expandafter{\the\everymathematics\let'\math_prime_indeed} % todo: do this at the lua end
1903
 
%
1904
 
% \egroup
1905
 
 
1906
 
% $\char26$ gives an error because it expands to an active character that
1907
 
% then becomes an & which is then seen as an alignment character; anyway,
1908
 
% even when we switch like this the different meaning only happens when
1909
 
% we're in math mode which can be delayed till we're in a cell
 
1893
%D We also dropped th eoption to let ampersands be alignment tabs. That has never
 
1894
%D been a \CONTEXT\ option anyway.
1910
1895
 
1911
1896
\bgroup
1912
1897
 
1913
1898
    \catcode\underscoreasciicode\activecatcode
1914
1899
    \catcode\circumflexasciicode\activecatcode
1915
 
    \catcode\ampersandasciicode \activecatcode
 
1900
  % \catcode\ampersandasciicode \activecatcode
1916
1901
 
1917
1902
    \aliased\glet\specialmathaligntab\normalmathaligntab
1918
1903
 
1919
1904
    \permanent\protected\gdef\obeymathcatcodes{%
1920
1905
        \enforced\let _\normalsubscript
1921
1906
        \enforced\let ^\normalsuperscript
1922
 
        \enforced\def &\specialmathaligntab
 
1907
      % \enforced\def &\specialmathaligntab
1923
1908
    }
1924
1909
 
1925
1910
    \doglobal\appendtoks
1926
1911
        \enforced\let _\normalsubscript
1927
1912
        \enforced\let ^\normalsuperscript
1928
 
        \enforced\let &\specialmathaligntab
 
1913
      % \enforced\let &\specialmathaligntab
1929
1914
    \to \everymathematics
1930
1915
 
1931
 
  % \permanent\protected\gdef\normalmathampersands
1932
 
  %   {\let\specialmathaligntab\mathampersand}
1933
 
 
1934
1916
\egroup
1935
1917
 
 
1918
%D We keep this, just for the fun of it:
 
1919
 
1936
1920
\newtoks\everydonknuthmode
1937
1921
\newtoks\everynonknuthmode
1938
1922
 
2152
2136
\defcsname\??mathgreek\v!normal\endcsname{2}
2153
2137
\defcsname\??mathgreek\v!italic\endcsname{3}
2154
2138
 
2155
 
% \appendtoks
2156
 
%     \edef\p_sygreek{\mathematicsparameter\s!sygreek}%
2157
 
%     \edef\p_lcgreek{\mathematicsparameter\s!lcgreek}%
2158
 
%     \edef\p_ucgreek{\mathematicsparameter\s!ucgreek}%
2159
 
%     \c_math_greek_attribute"% hex digits
2160
 
%       \csname\??mathgreek\ifcsname\??mathgreek\p_sygreek\endcsname\p_sygreek\else\v!none\fi\endcsname
2161
 
%       \csname\??mathgreek\ifcsname\??mathgreek\p_lcgreek\endcsname\p_lcgreek\else\v!none\fi\endcsname
2162
 
%       \csname\??mathgreek\ifcsname\??mathgreek\p_ucgreek\endcsname\p_ucgreek\else\v!none\fi\endcsname
2163
 
%     \relax
2164
 
%     \ifcase\c_math_greek_attribute
2165
 
%       \c_math_greek_attribute\attributeunsetvalue
2166
 
%     \fi
2167
 
% \to \everyswitchmathematics
2168
 
 
2169
2139
\appendtoks
2170
2140
    \edef\p_sygreek{\mathematicsparameter\s!sygreek}% still needed ?
2171
2141
    \edef\p_lcgreek{\mathematicsparameter\s!lcgreek}% still needed ?
2234
2204
%D Math italics (experiment)
2235
2205
 
2236
2206
%D We need keys but what names to use and because we have hardcoded solution
2237
 
%D we can stick to numbers.
 
2207
%D we can stick to numbers. At some point this will change because we can now
 
2208
%D control in in the engine and goodies per font.
2238
2209
 
2239
2210
\installcorenamespace{mathitalics}
2240
2211
 
3188
3159
 
3189
3160
\let\m_math_text_choice_face\relax
3190
3161
 
3191
 
% if needed we can get rid of the normalize (predo in font code)
3192
 
 
3193
 
% \def\math_text_choice_font#1#2#%
3194
 
%   {\normalizebodyfontsize\m_math_text_choice_face{\mathstyleface\normalmathstyle}%
3195
 
%    \hbox#2\bgroup
3196
 
%    \font_basics_switchtobodyfont\m_math_text_choice_face
3197
 
%    #1%
3198
 
%    \let\next}
3199
 
 
3200
 
% \def\math_text_choice_word#1#2#%
3201
 
%   {\normalizebodyfontsize\m_math_text_choice_face{\mathstyleface\normalmathstyle}%
3202
 
%    \hbox#2\bgroup
3203
 
%    \font_basics_switchtobodyfont\m_math_text_choice_face
3204
 
%    #1%
3205
 
%    \nospacing % \normalnospaces\plusone
3206
 
%    \let\next}
3207
 
 
3208
3162
%D We accept a low level box specification so that one can make helpers:
3209
3163
%D
3210
3164
%D \startbuffer
3283
3237
    \enforced\let\text\mathtext
3284
3238
\to \everymathematics
3285
3239
 
3286
 
%D The next code is derived from plain \TEX. The names will change!
3287
 
 
3288
3240
\newcount\interdisplaylinepenalty \interdisplaylinepenalty\plushundred
3289
3241
 
3290
 
% Actually, not using an if saves one macro so there is no penalty for splitting up
3291
 
% this macro.
3292
 
%
3293
 
% \newif\ifdt@p
3294
 
%
3295
 
% \def\displ@y
3296
 
%   {\global\dt@ptrue
3297
 
%    \math_openup\displayopenupvalue % was \openup\jot
3298
 
%    \everycr
3299
 
%      {\noalign
3300
 
%         {\ifdt@p
3301
 
%            \global\dt@pfalse
3302
 
%            \ifdim\prevdepth>-\thousandpoint
3303
 
%              \vskip-\lineskiplimit
3304
 
%              \vskip\normallineskiplimit
3305
 
%            \fi
3306
 
%          \else
3307
 
%            \penalty\interdisplaylinepenalty
3308
 
%          \fi}}}
3309
 
 
3310
 
\newtoks\mathdisplayaligntweaks
3311
 
 
3312
 
% this can become an option:
3313
 
 
3314
 
\let\math_display_align_hack_indeed\relax
3315
 
 
3316
 
\protected\def\math_display_align_hack % I don't like the global, maybe we should push and pop
3317
 
  {\glet\math_display_align_hack_indeed\math_display_align_hack_remove_skip
3318
 
   \math_openup\displayopenupvalue % was \math_openup\jot
3319
 
   \everycr{\noalign{\math_display_align_hack_indeed}}}
3320
 
 
3321
 
\def\math_display_align_hack_remove_skip
3322
 
  {\ifdim\prevdepth>-\thousandpoint
3323
 
     \vskip\dimexpr-\lineskiplimit+\normallineskiplimit\relax
3324
 
   \fi
3325
 
   \glet\math_display_align_hack_indeed\math_display_align_hack_insert_penalty}
3326
 
 
3327
 
\def\math_display_align_hack_insert_penalty
3328
 
  {\penalty\interdisplaylinepenalty}
3329
 
 
3330
 
\appendtoks
3331
 
    \math_display_align_hack
3332
 
\to \mathdisplayaligntweaks
3333
 
 
3334
3242
%D Text in math:
3335
3243
 
3336
3244
\permanent\protected\def\mathortext