texlive[51914] Master/texmf-dist: mathastext (20aug19)

commits+karl at tug.org commits+karl at tug.org
Tue Aug 20 22:44:27 CEST 2019


Revision: 51914
          http://tug.org/svn/texlive?view=revision&revision=51914
Author:   karl
Date:     2019-08-20 22:44:27 +0200 (Tue, 20 Aug 2019)
Log Message:
-----------
mathastext (20aug19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/mathastext/README.md
    trunk/Master/texmf-dist/doc/latex/mathastext/mathastext.pdf
    trunk/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.pdf
    trunk/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
    trunk/Master/texmf-dist/tex/latex/mathastext/mathastext.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md
    trunk/Master/texmf-dist/source/latex/mathastext/INSTALL.txt

Removed Paths:
-------------
    trunk/Master/texmf-dist/source/latex/mathastext/mathastext.ins

Added: trunk/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md	2019-08-20 20:44:27 UTC (rev 51914)
@@ -0,0 +1,545 @@
+MATHASTEXT CHANGE LOG
+=====================
+
+1.3u \[2019/08/20\]
+----
+
+* new feature: the initial release dealt with only one font, and
+  although shortly thereafter the 1.11 version added support for
+  extended math versions, it was documented that some font-dependent
+  set-up (minus as endash, dotless i and j, hbar, math accents) was
+  done only once. This release makes the relevant characters font
+  encoding savvy in each mathastext-extended math version. Thus,
+  they should render correctly even with multiple math versions
+  using fonts with varying encodings.
+
+  This reinforces importance of using `\MTversion` and not the
+  LaTeX `\mathversion` when switching to a new math version (which
+  got declared via the package interface). The implementation is
+  compatible with Unicode engines and mixed usage of `TU` encoding
+  (OpenType fonts) with traditional 8bits TeX font encodings. For
+  all engines, all used (8bits) encodings must have been passed as
+  options to the `fontenc` package.
+
+  Thanks to Falk Hanisch for feature request and code suggestions.
+
+* new option `unimathaccents`: this adds to option `mathaccents`
+  the demand to use the text font accents for OpenType fonts in math
+  mode via the `\Umathaccent` primitive. Indeed, as my testing
+  showed that this gave non-satisfactory results both with XeTeX
+  and LuaTeX regarding the horizontal placement of the accents,
+  the main option `mathaccents` acts only on 8bits encoded fonts.
+
+* bugfix: the `\Mathastext` without optional argument forgot to
+  repeat some font-encoding dependent initialization set-up done
+  originally during package loading.
+
+* bugfix: under the `subdued` option macros `\MTmathactiveletters`
+  or `\MTnonlettersobeymathxx` now act like no-ops if
+  issued explicitly while in the `normal` or `bold` math version.
+  Formerly, this was not the case and could cause bugs such as a
+  disappearing minus sign in math mode.
+
+* bugfix: the letter `h` used in the `\hbar` obeyed the extra
+  skips as set-up by `\MTsetmathskips`, badly interfering with the
+  horizontal positioning of the bar accent. They are now ignored
+  (as well as the added italic correction).
+
+1.3t \[2018/08/22\]
+----
+
+* bugfix: the 1.3s bugfix about `subdued` compatibility with
+  `fontspec` was deficient.
+
+* bugfix: very old (v1.2, 2012/12/20) bug causing low-level TeX error
+  during package loading (with pdflatex) when setting up the math minus
+  sign to be the text font endash character, in cases with
+  `\encodingdefault` other than OT1, T1 or LY1, e.g. something like
+  T2A.
+
+* `\imath` and `\jmath` obey the `subdued` regime. And the minus sign
+  is now handled especially to ensure perfect compatibility with the
+  `subdued` option.
+
+* breaking change: `mathastext` does not redefine anymore
+  `\i` and `\j` to let them be usable both in text and math mode.
+
+1.3s \[2018/08/21\]
+----
+
+* fix to an issue with `subdued` option in a `fontspec` context.
+
+
+1.3r \[2016/11/06\]
+----
+
+* documentation tweaks.
+
+1.3q \[2016/10/31\]
+----
+
+* new option `unicodeminus`.
+
+* the `Recent Changes` section of the documentation has been removed as it
+  was a duplicate of information available in the `Change Log`.
+
+* some other
+  changes in the documentation, in particular the use of straight quotes
+  in verbatim.
+
+1.3p \[2016/05/13\]
+----
+
+* bugfix: release `1.3n` had forgotten to activate by default its new
+  customization of the amsmath macro `\newmcodes@` (it was done from
+  using `\MTversion` in the document body but not by default at start
+  of body.)
+
+* public name `\MTfixmathfonts` for a `1.3o` macro.
+
+1.3o \[2016/05/03\]
+----
+
+* `mathastext` fixes an issue related to a feature of `LuaLaTeX` and
+  `luaotfload` that OpenType fonts are declared in one of two modes:
+  `node` and `base`, and only the latter is functional in math mode. But
+  by default text fonts are declared in mode `node`. Thus `mathastext`
+  now intervenes to make it so that the font it declares in math mode
+  will use mode `base`. This fixes issues with for example old style
+  figures being used while the text font used lining figures (or vice
+  versa, depending on the font). But see the code comments for more.
+
+1.3n \[2016/04/22\]
+----
+
+* at long last, `mathastext` takes care properly of annoying and perplexing
+  amsmath's `\newmcodes@`. The very recent change in `amsopn.sty` finally
+  made it compatible with Unicode engines, but anyhow, `mathastext` must do
+  its own patch to use the correct font. All of this taking into account
+  the various options passed to the package. Lots of trouble for a tiny thing.
+
+1.3m \[2016/04/02\]
+----
+
+* minor code maintenance before annual TL freeze.
+
+1.3l \[2016/01/29\]
+----
+
+* compatibility with fontspec's upcoming switch from `EU1/EU2` to
+  `TU` common to both Unicode engines.
+
+1.3k \[2016/01/24\]
+----
+
+* typos fixed in the documentation. In particular, the README link to
+  the package homepage had remained broken from day one of the package
+  releases: `mathastext.html` therein was misspelled as
+  `mathsastext.html` ! (but the pdf documentation had the correct link;
+  as well as the CTAN catalogue).
+
+1.3j \[2016/01/15\]
+----
+
+* renamed and modified recent `1.3i`'s `\MTactivemathoff` into
+  `\MTeverymathoff`. Added `\MTeverymathdefault`.
+
+* `subdued` mode is a bit stronger: also the asterisk reverts to the
+  default (if it was modified due to option `asterisk`), the added
+  extra `\mskip`'s (useful with upright fonts) for `'`, `\exists`,
+  and `\forall` are suppressed rather than re-configured to use `0mu`.
+  Related new commands `\MTexistsdoesskip`, `\MTforalldoesskip`,
+  `\MTprimedoesskip`, `\MTnormalexists`, `\MTnormalforall`,
+  `\MTnormalprime`.
+
+* the toggle for using mathematically active letters is only emitted
+  once during package loading; the `\Mathastext` command does not do
+  it anymore; the use in the preamble of `\MTmathstandardletters`,
+  or `\MTnoicinmath` and related commands is not overruled by later
+  use of `\Mathastext`.
+
+* quite a few documentation improvements and rewrites, particularly
+  in the description of commands which are related to the
+  modifications of mathcodes (mainly for math activation of
+  characters or letters) as done by mathastext at `\everymath` or
+  `\everydisplay`.
+
+1.3i \[2016/01/06\]
+----
+
+* `\url` from `url.sty` as well as `\url` and `\nolinkurl` from
+  `hyperref.sty` use math mode and (by default) the monospace text
+  font. To avoid mathastext overwriting the special preparation done
+  by `{url,hyperref}.sty` the commands `\url/\nolinkurl` are patched
+  to do automatically `\MTactivemathoff` (now `\MTeverymathoff`)
+  before entering math mode.
+
+* the extra skips specified by `\MTsetmathskips` are not inserted
+  around letters if inside the arguments of math alphabet commands,
+  or within operator names.
+
+* the added explicit italic corrections (for non-oblique fonts) were
+  disabled within math alphabet scopes, except `mathnormal`; they
+  are now disabled within all math alphabets, inclusive of
+  `mathnormal`.
+
+1.3h \[2015/10/31\]
+----
+
+* bugfixes: since `1.3d 2014/05/23` the option `symbolgreek` caused
+  `\ell` to become undefined, and, similarly but far worse, options
+  `selfGreek`, `selfGreeks` caused all lowercase Greek letters
+  `\alpha`, `\beta`, etc.. to become undefined.
+
+1.3g \[2015/10/15\]
+----
+
+* following `2015/10/01` LaTeX release, removal of the `"luatex"`
+  prefix from the names of the LuaLaTeX math primitives. Compatibility
+  maintained with older LaTeX formats.
+
+1.3f \[2015/09/12\]
+----
+
+* the replacement of amsmath's `\resetMathstrut@`, when it is
+  done, emits an Info rather than a Warning as this could be
+  potentially stressful to some users.
+
+* the `README` self-extracts from the `dtx` source, as a text
+  file `README.md` with Markdown syntax.
+
+1.3e \[2015/09/10\]
+----
+
+* bugfix: under option nosmalldelims, `\lbrace` and `\rbrace` were
+  redefined as math symbols and could not be used as delimiters.
+
+1.3d \[2015/02/26\]
+----
+
+* the documentation mentions the improved compatibility of mathastext
+  with the latest (3.34) beamer release: no more need for
+  `\usefonttheme{professionalfonts}`.
+
+1.3d \[2014/05/23\]
+----
+
+* new commands `\MTstandardgreek` and `\MTcustomgreek`.
+
+* The Greek letters, in case of use of one of the package related
+  options, are left to their defaults in the normal and bold math
+  versions if the subdued option was also used (this was so far
+  the case only with options LGRgreek/LGRgreeks).
+
+* `\newmcodes@` of amsmath is left untouched if package
+  lualatex-math is detected.
+
+1.3c \[2013/12/14\]
+----
+
+* added a starred variant to `\MTversion` which tells mathastext to
+  only do the math set-up and not modify the text fonts.
+
+* added second optional version name argument to `\Mathastext` and
+  to `\MTDeclareVersion`, to transfer settings for things not
+  otherwise changed by mathastext from a math version to the one
+  declared. This is mainly for symbols and large symbols to be the
+  bold ones when the user sets up the series of a mathastextified
+  font to be bold in a mathastext-declared version.
+
+* renamed `\defaultprod` to `\MToriginalprod`, `\defaultsum` to
+  `\MToriginalsum`, (this is in case of option symbolmisc).
+
+* changes to the dtx organization; options for generating the
+  documentation can be customized in generated mathastext.tex file.
+
+* 1.2d code for `\#`, `\$`, `\%`, and `\&` modified erroneously the
+  earlier correct 1.2c code and created a bug showing up with more
+  than 16 math families (a possibility only with lualatex or
+  xelatex).
+
+1.3a \[2013/09/04\]
+----
+
+* the somewhat silly `\string`'s are removed from the
+  `\MTsetmathskips` command of release 1.3, thus allowing its first
+  argument to be a macro, or any expandable code, giving a letter.
+
+* the amsmath `\resetMathstrut@`, which is incompatible with a
+  mathematically active parenthesis ( is now modified only if
+  necessary (i.e. only when `\MTnonlettersobeymathxx` is issued) and
+  is restored to its original value if not needed anymore (i.e.
+  after `\MTnonlettersdonotobeymathxx`, as for example when
+  switching to the normal version under option subdued).
+
+* improved documentation.
+
+1.3  \[2013/09/02\]
+----
+
+* commands `\MTsetmathskips` and `\MTunsetmathskips` added.
+
+* commands `\MTmathactiveletters` and `\MTmathstandardletters` to
+  govern the math activation of letters independently of its use
+  for insertion of the italic corrections (`\MTicinmath` and
+  `\MTnoicinmath` correspondingly modified).
+
+* the new `\luatexUmathcodenum` as available since TL2013 allows
+  identical treatment by mathastext of = and - under both LuaTeX
+  and XeTeX.
+
+* `\newmcodes@` of amsmath is left untouched in case of option basic.
+
+* a sentence containing | which was written to the log during the
+  loading caused a problem if | was active (typically if
+  `\MakeShortVerb`{\|} was added to the preamble prior to the
+  loading of mathastext).
+
+* some preemptive measures taken regarding things such as `\mid`,
+  `\lbrace`, and `\rbrace`, as some packages define these things in
+  manners which made the re-definitions done by mathastext issue
+  errors.
+
+1.2f \[2013/01/21\]
+----
+
+* minor code improvements. Change log added to the user manual.
+
+1.2e \[2013/01/10\]
+----
+
+This version should be the last one in the 1.2 series as it seems to
+correct most of the main problems which were introduced with the massive
+use of mathematically active characters in versions 1.2 and 1.2b.
+
+* It is indeed a thorny point when one wants to modify an active character in
+  math mode only (without breaking usage in label's and ref's for example).
+  The package now does that _only_ if the activation originated in the Babel
+  system as it is then possible to modify appropriately the Babel macros
+  `\user at active<char>` and `\normal at char<char>`, at the time of entering math
+  mode (mathastext does all its activation job at `\everymath` and
+  `\everydisplay`).
+
+  The relevant issues are discussed in section 2.10 of the user manual, in the
+  test file mathastexttestalphabets.tex, and in the source code comments for
+  macro `\mst at mathactivate`. The inherent incompatibility of Babel with
+  packages having made mathematically active the characters itself makes
+  document active is circumvented by this interference of mathastext. A
+  generally applicable Babel patch could be derived from the method used by
+  mathastext.
+
+  For the non catcode active characters, mathematical activation is used.
+  This is done at the entrance in math mode.
+
+* Sadly, the feature of added italic corrections introduced in
+     version 1.2b did not behave as described in the user manual, due to
+     forgotten group braces. Fixed.
+
+* The command `\MTlowerast` from the user manual of v1.2d was not the
+     one implemented in the source code. Fixed.
+
+* The test files automatically extracted from a latex run on the dtx
+     file have been revised and extended.
+
+* The code is better documented.
+
+1.2d \[2013/01/02\]
+----
+
+*  an incompatibility with amsmath (its macro `\resetMathstrut@`),
+      exists since version 1.2 of the package. This is fixed
+      here.
+
+*  various improvements in dealing with the asterisk and in the
+      mechanism of letting non-letter symbols obey the math alphabet
+      commands.
+
+*  documentation extended and improved.
+
+1.2c \[2012/12/31\]
+----
+
+*  mathastext now inserts automatically after all (latin)
+      letters in math mode their italic corrections, if the font
+      used is upright (sic). This improves the spacings for the
+      positioning of subscripts. The feature is de-activated
+      inside the math alphabets commands (apart from `\mathnormal`),
+      so as to not prohibit the formation of ligatures.
+
+*  the documentation has been extended to explain in detail the
+      issues which are relevant to the new feature of added italic
+      corrections.
+
+* version 1.2 had some bad bugs when confronted to active
+  characters. This is corrected and additionally
+  `\MTnonlettersdonotobeymathxx` is made the default, as the user
+  input is too much constrained in its absence.
+
+*  a less fatal, but still annoying, typo had made the dot in 1.2
+      of type `\mathpunct` rather than `\mathord`.
+
+*  the inner namespace has been rationalized a bit.
+
+1.2 \[2012/12/20\]
+----
+
+*  a new command sets up the amount of space to be automatically
+      inserted before the derivative glyph (useful when using an
+      upright font).
+
+*  the scope of the math alphabets has been extended to apply
+      to the non-alphabetical characters, and also to operator
+      names.
+
+*  the format of the dtx file has changed. The package file
+      is self-extracting from the dtx, and four additional test
+      files are also produced during `latex mathastext.dtx`.
+
+1.15f and 1.15g \[2012/10/25\]
+----
+
+*  `\$`, `\#`, `\&`, and `\%` had been re-defined by mathastext since its
+      inception in a rather strange (but working) way, which
+      could cause surprises to other packages. Fixed.
+
+*  the subdued mechanism for the math alphabets is implemented
+      in a simpler and more efficient manner than in 1.15e.
+
+*  the `defaultxx` options act a bit differently, and are more
+      useful in case of a `too many math alphabets` situation.
+
+*  various improvements in the documentation.
+
+*  general clean up and better commenting of the source code.
+
+1.15e \[2012/10/22\]
+----
+
+*  new user commands to specify skip or glue to be
+      inserted after the math symbols `\exists` and `\forall`
+
+*  complete (user transparent) rewrite of the code
+      implementing the subdued option; and its action has
+      been extended to apply also to the `\mathbf`, `\mathit`,
+      `\mathsf`, `\mathtt` alphabets and not only to `\mathrm` and
+      `\mathnormal` as in the previous versions.
+
+*  improvements in the documentation.
+
+1.15d \[2012/10/13\]
+----
+
+* the Unicode situation is now correctly treated, throughout the
+  code (this had been left in a half-done way from version 1.14 of
+  April 2011).
+
+* this includes an issue related to amsmath and its
+  DeclareMathOperator macro which has been fixed,
+
+* and the code related to `\relbar` and `\Relbar` (and
+  `\models`) has been revised.
+
+1.15c \[2012/10/05\]
+----
+
+*  it is now possible to use distinct fonts in LGR encoding
+      for the Greek letters according to the current math
+      version.
+
+*  improvements to the documentation.
+
+1.15b
+----
+
+*  corrected a 'feature' of 1.15 which was backward-incompatible
+
+*  improvements to the pdf documentation
+
+1.15  \[2012/09/26\]
+----
+
+*  the subdued option allows the mathastextification to
+      act only locally.
+
+*  some measures taken to deal with amsmath related
+      issues when using xetex or luatex.
+
+1.14c
+----
+
+*  a bug is fixed: the `\Mathastext` macro reinitializes
+      the fonts in the normal and bold math versions, but it
+      also erroneously redeclared the math alphabet changing
+      commands which could have been set up in previously
+      defined math versions (via earlier calls to
+      `\Mathastext`\[version_name\]).
+
+1.14b \[2011/04/03\]
+----
+
+*  there was a bug with `\$`, `\#`, `\&`, `\%` in math mode which
+      showed up when ten or more math families had been
+      declared. This bug affected also the minus sign under
+      the same circumstances, when Unicode engines were
+      used. Fixed.
+
+*  the options LGRgreek and selfGreek act now a bit
+      differently, and new options LGRgreeks and selfGreeks
+      have been defined.
+
+*  I also cleaned up a bit the code, for a more
+      structured namespace.
+
+1.14
+----
+
+*  mathastext now modifies also the math alphabets `\mathit`,
+      `\mathsf` and `\mathtt`, thus making it a quite generic
+      complete manner to adapt the math configuration to fonts
+      provided with no math support.
+
+1.13b
+----
+
+*  when the Symbol font is used for `\prod` and `\sum` this
+      will be only for inline math; display math will use the
+      default glyphs
+
+1.13 \[2011/03/11\]
+----
+
+*  the LGRgreek option is added.
+
+*  internal changes for better readability of the code.
+
+1.12
+----
+
+*  various bugs have been corrected.
+
+*  the endash and alldelims options are active by default.
+
+*  the package is more Unicode aware.
+
+*  the `\Mathastext` command has been improved to
+      facilitate the mechanism of math versions also when
+      using XeTeX or LuaTeX (with package fontspec.)
+
+*  the en-dash and dotless i and j now work with all
+      encodings, Unicode inclusive.
+
+1.11 \[2011/02/06\]
+----
+
+*  optional argument to `\Mathastext` macro.
+
+1.1  \[2011/02/01\]
+----
+
+*  options italic and frenchmath.
+
+1.0  \[2011/01/25\]
+----
+
+*  Initial version.
+


Property changes on: trunk/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/mathastext/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mathastext/README.md	2019-08-19 23:53:25 UTC (rev 51913)
+++ trunk/Master/texmf-dist/doc/latex/mathastext/README.md	2019-08-20 20:44:27 UTC (rev 51914)
@@ -12,11 +12,10 @@
 
 The Author of this Work is Jean-Francois Burnol
 
-Copyright (C) 2011-2018 Jean-Francois Burnol (`jfbu at free dot fr`)
+Copyright (C) 2011-2019 Jean-Francois Burnol (`jfbu at free dot fr`)
 
-      Source: mathastext.dtx 1.3t 2018/08/22
+      Source: mathastext.dtx 1.3u 2019/08/20
 
-> cumulative Change Log at bottom of this file.
 
 DESCRIPTION
 ===========
@@ -80,551 +79,50 @@
   font.
 - `\MTsetmathskips` allows to set up extra spacings around letters.
 
-INSTALLATION
-============
+RECENT CHANGES
+==============
 
-### Using the manager of your TeX installation
+1.3u (2019/08/20)
+---
 
-mathastext is in TeXLive and MikTeX. Just use the package manager to upgrade
-or install it.
+* new feature: the initial release dealt with only one font, and
+  although shortly thereafter the 1.11 version added support for
+  extended math versions, it was documented that some font-dependent
+  set-up (minus as endash, dotless i and j, hbar, math accents) was
+  done only once. This release makes the relevant characters font
+  encoding savvy in each mathastext-extended math version. Thus,
+  they should render correctly even with multiple math versions
+  using fonts with varying encodings.
 
-### From `mathastext.tds.zip`
+  This reinforces importance of using `\MTversion` and not the
+  LaTeX `\mathversion` when switching to a new math version (which
+  got declared via the package interface). The implementation is
+  compatible with Unicode engines and mixed usage of `TU` encoding
+  (OpenType fonts) with traditional 8bits TeX font encodings. For
+  all engines, all used (8bits) encodings must have been passed as
+  options to the `fontenc` package.
 
-user install in \$HOME folder: `unzip -d <destfolder> mathastext.tds.zip`,
-where `<destfolder>` could be `~/texmf` or on macosx  `~/Library/texmf`.
+  Thanks to Falk Hanisch for feature request and code suggestions.
 
-### From `mathastext.dtx`
+* new option `unimathaccents`: this adds to option `mathaccents`
+  the demand to use the text font accents for OpenType fonts in math
+  mode via the `\Umathaccent` primitive. Indeed, as my testing
+  showed that this gave non-satisfactory results both with XeTeX
+  and LuaTeX regarding the horizontal placement of the accents,
+  the main option `mathaccents` acts only on 8bits encoded fonts.
 
-- with mathastext.ins: run tex on mathastext.ins to generate the package
-  style file mathastext.sty as well as mathastext.tex and some test
-  files.
-- without mathastext.ins: run tex (or etex) on mathastext.dtx to
-  generate the package style file mathastext.sty as well as
-  mathastext.tex and some test files. (and also mathastext.ins)
-- Move the style file mathastext.sty to a location where TeX can find it.
-  In a TDS compliant hierarchy this will be
-        <TDS>:tex/latex/mathastext/mathastext.sty
+* bugfix: the `\Mathastext` without optional argument forgot to
+  repeat some font-encoding dependent initialization set-up done
+  originally during package loading.
 
-### Generating documentation and test files
+* bugfix: under the `subdued` option macros `\MTmathactiveletters`
+  or `\MTnonlettersobeymathxx` now act like no-ops if
+  issued explicitly while in the `normal` or `bold` math version.
+  Formerly, this was not the case and could cause bugs such as a
+  disappearing minus sign in math mode.
 
-Run tex (or etex) on mathastext.dtx to generate mathastext.tex and some
-test files:
+* bugfix: the letter `h` used in the `\hbar` obeyed the extra
+  skips as set-up by `\MTsetmathskips`, badly interfering with the
+  horizontal positioning of the bar accent. They are now ignored
+  (as well as the added italic correction).
 
-    mathastexttestmathversions.tex
-    mathastexttestunicodemacos.tex
-    mathastexttestunicodelinux.tex
-    mathastexttestalphabets.tex
-
-To generate the documentation (with source code):
-
-    latex mathastext.tex (thrice)
-    dvipdfmx mathastext.dvi
-
-The file mathastext.tex can be customized to change the font size or set
-other options therein. Alternative: pdflatex mathastext.dtx (thrice).
-This produces the documentation without the source code.
-
-> (One cannot use lualatex or xelatex to compile the documentation.)
-
-CHANGE LOG
-==========
-
-1.3t \[2018/08/22\]
-----
-
-* bugfix: the 1.3s bugfix about `subdued` compatibility with
-  `fontspec` was deficient.
-
-* bugfix: very old (v1.2, 2012/12/20) bug causing low-level TeX error
-  during package loading (with pdflatex) when setting up the math minus
-  sign to be the text font endash character, in cases with
-  `\encodingdefault` other than OT1, T1 or LY1, e.g. something like
-  T2A.
-
-* `\imath` and `\jmath` obey the `subdued` regime. And the minus sign
-  is now handled especially to ensure perfect compatibility with the
-  `subdued` option.
-
-* breaking change: `mathastext` does not redefine anymore
-  `\i` and `\j` to let them be usable both in text and math mode.
-
-1.3s \[2018/08/21\]
-----
-
-* fix to an issue with `subdued` option in a `fontspec` context.
-
-  https://tex.stackexchange.com/q/444565/4686
-
-1.3r \[2016/11/06\]
-----
-
-* documentation tweaks.
-
-1.3q \[2016/10/31\]
-----
-
-* new option `unicodeminus`.
-
-* the `Recent Changes` section of the documentation has been removed as it
-  was a duplicate of information available in the `Change Log`.
-
-* some other
-  changes in the documentation, in particular the use of straight quotes
-  in verbatim.
-
-1.3p \[2016/05/13\]
-----
-
-* bugfix: release `1.3n` had forgotten to activate by default its new
-  customization of the amsmath macro `\newmcodes@` (it was done from
-  using `\MTversion` in the document body but not by default at start
-  of body.)
-
-* public name `\MTfixmathfonts` for a `1.3o` macro.
-
-1.3o \[2016/05/03\]
-----
-
-* `mathastext` fixes an issue related to a feature of `LuaLaTeX` and
-  `luaotfload` that OpenType fonts are declared in one of two modes:
-  `node` and `base`, and only the latter is functional in math mode. But
-  by default text fonts are declared in mode `node`. Thus `mathastext`
-  now intervenes to make it so that the font it declares in math mode
-  will use mode `base`. This fixes issues with for example old style
-  figures being used while the text font used lining figures (or vice
-  versa, depending on the font). But see the code comments for more.
-
-1.3n \[2016/04/22\]
-----
-
-* at long last, `mathastext` takes care properly of annoying and perplexing
-  amsmath's `\newmcodes@`. The very recent change in `amsopn.sty` finally
-  made it compatible with Unicode engines, but anyhow, `mathastext` must do
-  its own patch to use the correct font. All of this taking into account
-  the various options passed to the package. Lots of trouble for a tiny thing.
-
-1.3m \[2016/04/02\]
-----
-
-* minor code maintenance before annual TL freeze.
-
-1.3l \[2016/01/29\]
-----
-
-* compatibility with fontspec's upcoming switch from `EU1/EU2` to
-  `TU` common to both Unicode engines.
-
-1.3k \[2016/01/24\]
-----
-
-* typos fixed in the documentation. In particular, the README link to
-  the package homepage had remained broken from day one of the package
-  releases: `mathastext.html` therein was misspelled as
-  `mathsastext.html` ! (but the pdf documentation had the correct link;
-  as well as the CTAN catalogue).
-
-1.3j \[2016/01/15\]
-----
-
-* renamed and modified recent `1.3i`'s `\MTactivemathoff` into
-  `\MTeverymathoff`. Added `\MTeverymathdefault`.
-
-* `subdued` mode is a bit stronger: also the asterisk reverts to the
-  default (if it was modified due to option `asterisk`), the added
-  extra `\mskip`'s (useful with upright fonts) for `'`, `\exists`,
-  and `\forall` are suppressed rather than re-configured to use `0mu`.
-  Related new commands `\MTexistsdoesskip`, `\MTforalldoesskip`,
-  `\MTprimedoesskip`, `\MTnormalexists`, `\MTnormalforall`,
-  `\MTnormalprime`.
-
-* the toggle for using mathematically active letters is only emitted
-  once during package loading; the `\Mathastext` command does not do
-  it anymore; the use in the preamble of `\MTmathstandardletters`,
-  or `\MTnoicinmath` and related commands is not overruled by later
-  use of `\Mathastext`.
-
-* quite a few documentation improvements and rewrites, particularly
-  in the description of commands which are related to the
-  modifications of mathcodes (mainly for math activation of
-  characters or letters) as done by mathastext at `\everymath` or
-  `\everydisplay`.
-
-1.3i \[2016/01/06\]
-----
-
-* `\url` from `url.sty` as well as `\url` and `\nolinkurl` from
-  `hyperref.sty` use math mode and (by default) the monospace text
-  font. To avoid mathastext overwriting the special preparation done
-  by `{url,hyperref}.sty` the commands `\url/\nolinkurl` are patched
-  to do automatically `\MTactivemathoff` (now `\MTeverymathoff`)
-  before entering math mode.
-
-* the extra skips specified by `\MTsetmathskips` are not inserted
-  around letters if inside the arguments of math alphabet commands,
-  or within operator names.
-
-* the added explicit italic corrections (for non-oblique fonts) were
-  disabled within math alphabet scopes, except `mathnormal`; they
-  are now disabled within all math alphabets, inclusive of
-  `mathnormal`.
-
-1.3h \[2015/10/31\]
-----
-
-* bugfixes: since `1.3d 2014/05/23` the option `symbolgreek` caused
-  `\ell` to become undefined, and, similarly but far worse, options
-  `selfGreek`, `selfGreeks` caused all lowercase Greek letters
-  `\alpha`, `\beta`, etc.. to become undefined.
-
-1.3g \[2015/10/15\]
-----
-
-* following `2015/10/01` LaTeX release, removal of the `"luatex"`
-  prefix from the names of the LuaLaTeX math primitives. Compatibility
-  maintained with older LaTeX formats.
-
-1.3f \[2015/09/12\]
-----
-
-* the replacement of amsmath's `\resetMathstrut@`, when it is
-  done, emits an Info rather than a Warning as this could be
-  potentially stressful to some users.
-
-* the `README` self-extracts from the `dtx` source, as a text
-  file `README.md` with Markdown syntax.
-
-1.3e \[2015/09/10\]
-----
-
-* bugfix: under option nosmalldelims, `\lbrace` and `\rbrace` were
-  redefined as math symbols and could not be used as delimiters.
-
-1.3d \[2015/02/26\]
-----
-
-* the documentation mentions the improved compatibility of mathastext
-  with the latest (3.34) beamer release: no more need for
-  `\usefonttheme{professionalfonts}`.
-
-1.3d \[2014/05/23\]
-----
-
-* new commands `\MTstandardgreek` and `\MTcustomgreek`.
-
-* The Greek letters, in case of use of one of the package related
-  options, are left to their defaults in the normal and bold math
-  versions if the subdued option was also used (this was so far
-  the case only with options LGRgreek/LGRgreeks).
-
-* `\newmcodes@` of amsmath is left untouched if package
-  lualatex-math is detected.
-
-1.3c \[2013/12/14\]
-----
-
-* added a starred variant to `\MTversion` which tells mathastext to
-  only do the math set-up and not modify the text fonts.
-
-* added second optional version name argument to `\Mathastext` and
-  to `\MTDeclareVersion`, to transfer settings for things not
-  otherwise changed by mathastext from a math version to the one
-  declared. This is mainly for symbols and large symbols to be the
-  bold ones when the user sets up the series of a mathastextified
-  font to be bold in a mathastext-declared version.
-
-* renamed `\defaultprod` to `\MToriginalprod`, `\defaultsum` to
-  `\MToriginalsum`, (this is in case of option symbolmisc).
-
-* changes to the dtx organization; options for generating the
-  documentation can be customized in generated mathastext.tex file.
-
-* 1.2d code for `\#`, `\$`, `\%`, and `\&` modified erroneously the
-  earlier correct 1.2c code and created a bug showing up with more
-  than 16 math families (a possibility only with lualatex or
-  xelatex).
-
-1.3a \[2013/09/04\]
-----
-
-* the somewhat silly `\string`'s are removed from the
-  `\MTsetmathskips` command of release 1.3, thus allowing its first
-  argument to be a macro, or any expandable code, giving a letter.
-
-* the amsmath `\resetMathstrut@`, which is incompatible with a
-  mathematically active parenthesis ( is now modified only if
-  necessary (i.e. only when `\MTnonlettersobeymathxx` is issued) and
-  is restored to its original value if not needed anymore (i.e.
-  after `\MTnonlettersdonotobeymathxx`, as for example when
-  switching to the normal version under option subdued).
-
-* improved documentation.
-
-1.3  \[2013/09/02\]
-----
-
-* commands `\MTsetmathskips` and `\MTunsetmathskips` added.
-
-* commands `\MTmathactiveletters` and `\MTmathstandardletters` to
-  govern the math activation of letters independently of its use
-  for insertion of the italic corrections (`\MTicinmath` and
-  `\MTnoicinmath` correspondingly modified).
-
-* the new `\luatexUmathcodenum` as available since TL2013 allows
-  identical treatment by mathastext of = and - under both LuaTeX
-  and XeTeX.
-
-* `\newmcodes@` of amsmath is left untouched in case of option basic.
-
-* a sentence containing | which was written to the log during the
-  loading caused a problem if | was active (typically if
-  `\MakeShortVerb`{\|} was added to the preamble prior to the
-  loading of mathastext).
-
-* some preemptive measures taken regarding things such as `\mid`,
-  `\lbrace`, and `\rbrace`, as some packages define these things in
-  manners which made the re-definitions done by mathastext issue
-  errors.
-
-1.2f \[2013/01/21\]
-----
-
-* minor code improvements. Change log added to the user manual.
-
-1.2e \[2013/01/10\]
-----
-
-This version should be the last one in the 1.2 series as it seems to
-correct most of the main problems which were introduced with the massive
-use of mathematically active characters in versions 1.2 and 1.2b.
-
-* It is indeed a thorny point when one wants to modify an active character in
-  math mode only (without breaking usage in label's and ref's for example).
-  The package now does that _only_ if the activation originated in the Babel
-  system as it is then possible to modify appropriately the Babel macros
-  `\user at active<char>` and `\normal at char<char>`, at the time of entering math
-  mode (mathastext does all its activation job at `\everymath` and
-  `\everydisplay`).
-
-  The relevant issues are discussed in section 2.10 of the user manual, in the
-  test file mathastexttestalphabets.tex, and in the source code comments for
-  macro `\mst at mathactivate`. The inherent incompatibility of Babel with
-  packages having made mathematically active the characters itself makes
-  document active is circumvented by this interference of mathastext. A
-  generally applicable Babel patch could be derived from the method used by
-  mathastext.
-
-  For the non catcode active characters, mathematical activation is used.
-  This is done at the entrance in math mode.
-
-* Sadly, the feature of added italic corrections introduced in
-     version 1.2b did not behave as described in the user manual, due to
-     forgotten group braces. Fixed.
-
-* The command `\MTlowerast` from the user manual of v1.2d was not the
-     one implemented in the source code. Fixed.
-
-* The test files automatically extracted from a latex run on the dtx
-     file have been revised and extended.
-
-* The code is better documented.
-
-1.2d \[2013/01/02\]
-----
-
-*  an incompatibility with amsmath (its macro `\resetMathstrut@`),
-      exists since version 1.2 of the package. This is fixed
-      here.
-
-*  various improvements in dealing with the asterisk and in the
-      mechanism of letting non-letter symbols obey the math alphabet
-      commands.
-
-*  documentation extended and improved.
-
-1.2c \[2012/12/31\]
-----
-
-*  mathastext now inserts automatically after all (latin)
-      letters in math mode their italic corrections, if the font
-      used is upright (sic). This improves the spacings for the
-      positioning of subscripts. The feature is de-activated
-      inside the math alphabets commands (apart from `\mathnormal`),
-      so as to not prohibit the formation of ligatures.
-
-*  the documentation has been extended to explain in detail the
-      issues which are relevant to the new feature of added italic
-      corrections.
-
-* version 1.2 had some bad bugs when confronted to active
-  characters. This is corrected and additionally
-  `\MTnonlettersdonotobeymathxx` is made the default, as the user
-  input is too much constrained in its absence.
-
-*  a less fatal, but still annoying, typo had made the dot in 1.2
-      of type `\mathpunct` rather than `\mathord`.
-
-*  the inner namespace has been rationalized a bit.
-
-1.2 \[2012/12/20\]
-----
-
-*  a new command sets up the amount of space to be automatically
-      inserted before the derivative glyph (useful when using an
-      upright font).
-
-*  the scope of the math alphabets has been extended to apply
-      to the non-alphabetical characters, and also to operator
-      names.
-
-*  the format of the dtx file has changed. The package file
-      is self-extracting from the dtx, and four additional test
-      files are also produced during `latex mathastext.dtx`.
-
-1.15f and 1.15g \[2012/10/25\]
-----
-
-*  `\$`, `\#`, `\&`, and `\%` had been re-defined by mathastext since its
-      inception in a rather strange (but working) way, which
-      could cause surprises to other packages. Fixed.
-
-*  the subdued mechanism for the math alphabets is implemented
-      in a simpler and more efficient manner than in 1.15e.
-
-*  the `defaultxx` options act a bit differently, and are more
-      useful in case of a `too many math alphabets` situation.
-
-*  various improvements in the documentation.
-
-*  general clean up and better commenting of the source code.
-
-1.15e \[2012/10/22\]
-----
-
-*  new user commands to specify skip or glue to be
-      inserted after the math symbols `\exists` and `\forall`
-
-*  complete (user transparent) rewrite of the code
-      implementing the subdued option; and its action has
-      been extended to apply also to the `\mathbf`, `\mathit`,
-      `\mathsf`, `\mathtt` alphabets and not only to `\mathrm` and
-      `\mathnormal` as in the previous versions.
-
-*  improvements in the documentation.
-
-1.15d \[2012/10/13\]
-----
-
-* the Unicode situation is now correctly treated, throughout the
-  code (this had been left in a half-done way from version 1.14 of
-  April 2011).
-
-* this includes an issue related to amsmath and its
-  DeclareMathOperator macro which has been fixed,
-
-* and the code related to `\relbar` and `\Relbar` (and
-  `\models`) has been revised.
-
-1.15c \[2012/10/05\]
-----
-
-*  it is now possible to use distinct fonts in LGR encoding
-      for the Greek letters according to the current math
-      version.
-
-*  improvements to the documentation.
-
-1.15b
-----
-
-*  corrected a 'feature' of 1.15 which was backward-incompatible
-
-*  improvements to the pdf documentation
-
-1.15  \[2012/09/26\]
-----
-
-*  the subdued option allows the mathastextification to
-      act only locally.
-
-*  some measures taken to deal with amsmath related
-      issues when using xetex or luatex.
-
-1.14c
-----
-
-*  a bug is fixed: the `\Mathastext` macro reinitializes
-      the fonts in the normal and bold math versions, but it
-      also erroneously redeclared the math alphabet changing
-      commands which could have been set up in previously
-      defined math versions (via earlier calls to
-      `\Mathastext`\[version_name\]).
-
-1.14b \[2011/04/03\]
-----
-
-*  there was a bug with `\$`, `\#`, `\&`, `\%` in math mode which
-      showed up when ten or more math families had been
-      declared. This bug affected also the minus sign under
-      the same circumstances, when Unicode engines were
-      used. Fixed.
-
-*  the options LGRgreek and selfGreek act now a bit
-      differently, and new options LGRgreeks and selfGreeks
-      have been defined.
-
-*  I also cleaned up a bit the code, for a more
-      structured namespace.
-
-1.14
-----
-
-*  mathastext now modifies also the math alphabets `\mathit`,
-      `\mathsf` and `\mathtt`, thus making it a quite generic
-      complete manner to adapt the math configuration to fonts
-      provided with no math support.
-
-1.13b
-----
-
-*  when the Symbol font is used for `\prod` and `\sum` this
-      will be only for inline math; display math will use the
-      default glyphs
-
-1.13 \[2011/03/11\]
-----
-
-*  the LGRgreek option is added.
-
-*  internal changes for better readability of the code.
-
-1.12
-----
-
-*  various bugs have been corrected.
-
-*  the endash and alldelims options are active by default.
-
-*  the package is more Unicode aware.
-
-*  the `\Mathastext` command has been improved to
-      facilitate the mechanism of math versions also when
-      using XeTeX or LuaTeX (with package fontspec.)
-
-*  the en-dash and dotless i and j now work with all
-      encodings, Unicode inclusive.
-
-1.11 \[2011/02/06\]
-----
-
-*  optional argument to `\Mathastext` macro.
-
-1.1  \[2011/02/01\]
-----
-
-*  options italic and frenchmath.
-
-1.0  \[2011/01/25\]
-----
-
-*  Initial version.
-

Modified: trunk/Master/texmf-dist/doc/latex/mathastext/mathastext.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/source/latex/mathastext/INSTALL.txt
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathastext/INSTALL.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/mathastext/INSTALL.txt	2019-08-20 20:44:27 UTC (rev 51914)
@@ -0,0 +1,44 @@
+The simplest for most users is to use the manager script of the TeX
+installation to either install or upgrade mathastext to its current
+version.
+
+Else, for manual install, grab mathastext.tds.zip from CTAN then run
+
+    unzip -d <destfolder> mathastext.tds.zip
+
+where  <destfolder> could be ~/texmf or, on mac os x, ~/Library/texmf.
+
+Else, download mathastext.dtx and follow these instructions:
+
+- Run tex or etex on mathastext.dtx to generate the package style
+  file mathastext.sty as well as additional files:
+
+  mathastext.tex, README.md, ChangeLog.md, and some test files.
+
+- Move the style file mathastext.sty to a location where TeX can
+  find it. In a TDS compliant hierarchy this will be
+
+      <TDS>:tex/latex/mathastext/mathastext.sty
+
+For the documentation:
+
+- Follow the above steps, then run latex thrice on mathastext.tex
+  then dvipdfmx on mathastext.dvi. The file mathastext.tex can be
+  customized to change the font size or set other options therein.
+  The produced file mathastext.pdf will by default include the
+  commented source code.
+
+It is also possible to run pdflatex (thrice) directly on mathastext.dtx.
+In that case mathastext.pdf is produced without the commented source code.
+
+One can NOT use lualatex or xelatex to compile the documentation.
+
+The test files
+
+    mathastexttestmathversions.tex
+    mathastexttestunicodemacos.tex
+    mathastexttestunicodelinux.tex
+    mathastexttestalphabets.tex
+
+illustrate some features of the package and are an addendum to the
+main documentation mathastext.pdf.


Property changes on: trunk/Master/texmf-dist/source/latex/mathastext/INSTALL.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathastext/mathastext.dtx	2019-08-19 23:53:25 UTC (rev 51913)
+++ trunk/Master/texmf-dist/source/latex/mathastext/mathastext.dtx	2019-08-20 20:44:27 UTC (rev 51914)
@@ -1,14 +1,14 @@
 % -*- coding: iso-latin-1; time-stamp-format: "%02d-%02m-%:y at %02H:%02M:%02S %Z" -*-
-% N.B.: this dtx file does NOT use \DocInput (only docstrip), the
-% LaTeX source of the documentation is NOT prefixed with % signs.
+% N.B.: this dtx file does NOT use \DocInput, it only uses docstrip.
+% The LaTeX source of the documentation is NOT prefixed with percent characters.
 %<*dtx>
-\def\dtxtimestamp {Time-stamp: <22-08-2018 at 19:31:52 CEST>}%
-\def\docdate{2018/08/22}
+\def\dtxtimestamp {Time-stamp: <20-08-2019 at 11:13:40 CEST>}%
+\def\docdate{2019/08/20}
 %</dtx>
-%<*drv|ins>
-\def\MSTpkgdate    {2018/08/22}
-\def\MSTpkgversion {1.3t}
-%</drv|ins>
+%<*drv>
+\def\MSTpkgdate    {2019/08/20}
+\def\MSTpkgversion {1.3u}
+%</drv>
 %<*dtx>
 \iffalse % meta-comment
 %</dtx>
@@ -27,32 +27,32 @@
 
 The Author of this Work is Jean-Francois Burnol
 
-Copyright (C) 2011-2018 Jean-Francois Burnol (`jfbu at free dot fr`)
+Copyright (C) 2011-2019 Jean-Francois Burnol (`jfbu at free dot fr`)
 
-      Source: mathastext.dtx 1.3t 2018/08/22
+      Source: mathastext.dtx 1.3u 2019/08/20
 
 %</readme>
 %<*dtx>
 Generating the documentation from source:
 
-1a) tex (or etex) mathastext.dtx to extract the sty file (and README.md)
-1b) then latex mathastext.tex (thrice) + dvipdfmx mathastext.dvi
+1a) tex (or etex) mathastext.dtx to extract generated files
+1b) then latex mathastext.tex (thrice) and dvipdfmx mathastext.dvi
 2) alternative to 1a)+1b): pdflatex mathastext.dtx. The documentation does
 not include the documented source code then, in contrast to 1a)+1b) method
 \fi % end of meta-comment
 %</dtx>
-%<*!readme>
+%<*!readme&!changelog>
 %%----------------------------------------------------------------
 %% Package: mathastext
 %% Info:    Use the text font in math mode (JFB)
-%% Version: 1.3t 2018/08/22
+%% Version: 1.3u 2019/08/20
 %% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
-%% Copyright (C) 2011-2018 Jean-Francois Burnol <jfbu at free dot fr>
+%% Copyright (C) 2011-2019 Jean-Francois Burnol <jfbu at free dot fr>
 %% Examples of use of mathastext:
 %%        http://jf.burnol.free.fr/mathastext.html
 %%        http://jf.burnol.free.fr/showcase.html
 %%----------------------------------------------------------------
-%</!readme>
+%</!readme&!changelog>
 %<*dtx>
 \chardef\noetex 0
 \ifx\numexpr\undefined\chardef\noetex 1 \fi
@@ -100,8 +100,8 @@
     version \string\texttt{\MSTpkgversion} of \string\texttt{\MSTpkgdate}}}
 \generate{\nopreamble\nopostamble
     \file{README.md}{\from{mathastext.dtx}{readme}}
+    \file{ChangeLog.md}{\from{mathastext.dtx}{changelog}}
   \usepostamble\defaultpostamble
-    \file{mathastext.ins}{\from{mathastext.dtx}{ins}}
     \file{mathastext.tex}{\from{mathastext.dtx}{drv}}
   \usepreamble\testfilepreamble
     \file{mathastexttestmathversions.tex}{\from{mathastext.dtx}{mathversions}}
@@ -124,7 +124,6 @@
 ^^Aiffalse
 %</dtx>
 %<*readme>
-> cumulative Change Log at bottom of this file.
 
 DESCRIPTION
 ===========
@@ -191,55 +190,103 @@
 - `\MTsetmathskips` allows to set up extra spacings around letters.
 
 
-INSTALLATION
-============
+RECENT CHANGES
+==============
 
-### Using the manager of your TeX installation
+1.3u (2019/08/20)
+---
 
-mathastext is in TeXLive and MikTeX. Just use the package manager to upgrade
-or install it.
+* new feature: the initial release dealt with only one font, and
+  although shortly thereafter the 1.11 version added support for
+  extended math versions, it was documented that some font-dependent
+  set-up (minus as endash, dotless i and j, hbar, math accents) was
+  done only once. This release makes the relevant characters font
+  encoding savvy in each mathastext-extended math version. Thus,
+  they should render correctly even with multiple math versions
+  using fonts with varying encodings.
 
-### From `mathastext.tds.zip`
+  This reinforces importance of using `\MTversion` and not the
+  LaTeX `\mathversion` when switching to a new math version (which
+  got declared via the package interface). The implementation is
+  compatible with Unicode engines and mixed usage of `TU` encoding
+  (OpenType fonts) with traditional 8bits TeX font encodings. For
+  all engines, all used (8bits) encodings must have been passed as
+  options to the `fontenc` package.
 
-user install in \$HOME folder: `unzip -d <destfolder> mathastext.tds.zip`,
-where `<destfolder>` could be `~/texmf` or on macosx  `~/Library/texmf`.
+  Thanks to Falk Hanisch for feature request and code suggestions.
 
-### From `mathastext.dtx`
+* new option `unimathaccents`: this adds to option `mathaccents`
+  the demand to use the text font accents for OpenType fonts in math
+  mode via the `\Umathaccent` primitive. Indeed, as my testing
+  showed that this gave non-satisfactory results both with XeTeX
+  and LuaTeX regarding the horizontal placement of the accents,
+  the main option `mathaccents` acts only on 8bits encoded fonts.
+  
+* bugfix: the `\Mathastext` without optional argument forgot to
+  repeat some font-encoding dependent initialization set-up done
+  originally during package loading.
 
-- with mathastext.ins: run tex on mathastext.ins to generate the package
-  style file mathastext.sty as well as mathastext.tex and some test
-  files.
-- without mathastext.ins: run tex (or etex) on mathastext.dtx to
-  generate the package style file mathastext.sty as well as
-  mathastext.tex and some test files. (and also mathastext.ins)
-- Move the style file mathastext.sty to a location where TeX can find it.
-  In a TDS compliant hierarchy this will be
-        <TDS>:tex/latex/mathastext/mathastext.sty
+* bugfix: under the `subdued` option macros `\MTmathactiveletters`
+  or `\MTnonlettersobeymathxx` now act like no-ops if
+  issued explicitly while in the `normal` or `bold` math version.
+  Formerly, this was not the case and could cause bugs such as a
+  disappearing minus sign in math mode.
 
-### Generating documentation and test files
+* bugfix: the letter `h` used in the `\hbar` obeyed the extra
+  skips as set-up by `\MTsetmathskips`, badly interfering with the
+  horizontal positioning of the bar accent. They are now ignored
+  (as well as the added italic correction).
 
-Run tex (or etex) on mathastext.dtx to generate mathastext.tex and some
-test files:
+%</readme>
+%<*changelog>
+MATHASTEXT CHANGE LOG
+=====================
 
-    mathastexttestmathversions.tex
-    mathastexttestunicodemacos.tex
-    mathastexttestunicodelinux.tex
-    mathastexttestalphabets.tex
+1.3u \[2019/08/20\]
+----
 
-To generate the documentation (with source code):
+* new feature: the initial release dealt with only one font, and
+  although shortly thereafter the 1.11 version added support for
+  extended math versions, it was documented that some font-dependent
+  set-up (minus as endash, dotless i and j, hbar, math accents) was
+  done only once. This release makes the relevant characters font
+  encoding savvy in each mathastext-extended math version. Thus,
+  they should render correctly even with multiple math versions
+  using fonts with varying encodings.
 
-    latex mathastext.tex (thrice)
-    dvipdfmx mathastext.dvi
+  This reinforces importance of using `\MTversion` and not the
+  LaTeX `\mathversion` when switching to a new math version (which
+  got declared via the package interface). The implementation is
+  compatible with Unicode engines and mixed usage of `TU` encoding
+  (OpenType fonts) with traditional 8bits TeX font encodings. For
+  all engines, all used (8bits) encodings must have been passed as
+  options to the `fontenc` package.
 
-The file mathastext.tex can be customized to change the font size or set
-other options therein. Alternative: pdflatex mathastext.dtx (thrice).
-This produces the documentation without the source code.
+  Thanks to Falk Hanisch for feature request and code suggestions.
 
-> (One cannot use lualatex or xelatex to compile the documentation.)
+* new option `unimathaccents`: this adds to option `mathaccents`
+  the demand to use the text font accents for OpenType fonts in math
+  mode via the `\Umathaccent` primitive. Indeed, as my testing
+  showed that this gave non-satisfactory results both with XeTeX
+  and LuaTeX regarding the horizontal placement of the accents,
+  the main option `mathaccents` acts only on 8bits encoded fonts.
+  
+* bugfix: the `\Mathastext` without optional argument forgot to
+  repeat some font-encoding dependent initialization set-up done
+  originally during package loading.
 
-CHANGE LOG
-==========
+* bugfix: under the `subdued` option macros `\MTmathactiveletters`
+  or `\MTnonlettersobeymathxx` now act like no-ops if
+  issued explicitly while in the `normal` or `bold` math version.
+  Formerly, this was not the case and could cause bugs such as a
+  disappearing minus sign in math mode.
 
+* bugfix: the letter `h` used in the `\hbar` obeyed the extra
+  skips as set-up by `\MTsetmathskips`, badly interfering with the
+  horizontal positioning of the bar accent. They are now ignored
+  (as well as the added italic correction).
+
+
 1.3t \[2018/08/22\]
 ----
 
@@ -259,14 +306,14 @@
 * breaking change: `mathastext` does not redefine anymore
   `\i` and `\j` to let them be usable both in text and math mode.
 
+
 1.3s \[2018/08/21\]
 ----
 
 * fix to an issue with `subdued` option in a `fontspec` context.
 
-  https://tex.stackexchange.com/q/444565/4686
+% https://tex.stackexchange.com/q/444565/4686
 
-
 1.3r \[2016/11/06\]
 ----
 
@@ -754,7 +801,7 @@
 
 *  Initial version.
 
-%</readme>
+%</changelog>
 %<*drv>
 %% This is a generated file. Run latex thrice on this file mathastext.tex then
 %% run dvipdfmx on mathastext.dvi to produce the documentation mathastext.pdf,
@@ -777,49 +824,6 @@
 %%% mode: latex
 %%% End:
 %</drv>
-%<*ins>
-%% This is a generated file. "tex mathastext.ins" extracts mathastext.sty from
-%% mathastext.dtx as well as mathastext.tex (for typesetting the documentation),
-%% and some test files to check the package commands.
-%%
-%% See mathastext.dtx for the copyright and the conditions for distribution
-%% and/or modification of this work.
-%%
-\input docstrip.tex
-\askforoverwritefalse
-\def\testfilepreamble{%
-        \string\def\string\testfileincipit{Test file
-        to accompany \string\texttt{mathastext}^^J%
-        version \string\texttt{\MSTpkgversion} of \string\texttt{\MSTpkgdate}}}
-\generate{\nopreamble\nopostamble
-  \file{README.md}{\from{mathastext.dtx}{readme}}
-\usepostamble\defaultpostamble
-  \file{mathastext.tex}{\from{mathastext.dtx}{drv}}
-\usepreamble\testfilepreamble
-  \file{mathastexttestmathversions.tex}{\from{mathastext.dtx}{mathversions}}
-  \file{mathastexttestunicodemacos.tex}{\from{mathastext.dtx}{macos}}
-  \file{mathastexttestunicodelinux.tex}{\from{mathastext.dtx}{linux}}
-  \file{mathastexttestalphabets.tex}{\from{mathastext.dtx}{alphabets}}
-\usepreamble\defaultpreamble
-  \file{mathastext.sty}{\from{mathastext.dtx}{package}}%
-}
-\catcode32=13\relax% active space
-\let =\space%
-\Msg{************************************************************************}
-\Msg{*}
-\Msg{* To finish the installation you have to move the following}
-\Msg{* file into a directory searched by TeX:}
-\Msg{*}
-\Msg{*     mathastext.sty} 
-\Msg{*}
-\Msg{* To produce the documentation run latex thrice on file mathastext.tex}
-\Msg{* and then run dvipdfmx on file mathastext.dvi}
-\Msg{*}
-\Msg{* Happy TeXing!}
-\Msg{*}
-\Msg{************************************************************************}
-\endbatchfile
-%</ins>
 %<*mathversions>
 %% This file `mathastexttestversions.tex' is for testing the enhanced
 %% concept of math versions provided by the package `mathastext'.
@@ -886,31 +890,43 @@
 
 This test uses \verb|mathastext| with its \emph{italic}, \emph{asterisk}, and
 \emph{subdued} options. The base document fonts are the Latin Modern ones (in
-OpenType format). The other fonts used were chosen from those of a Mac OS
-machine. We also used the Times font in T1 encoding, to illustrate a warning
-from the user manual when using different encodings in the various math
-versions: here the minus sign has disappeared from the Times math mode block,
-precisely for this matter of encoding.
+OpenType format). The other OpenType fonts were chosen from those available on
+a Mac OS machine. We also used the Times font in traditional \TeX\ font T1
+encoding, to demonstrate the removal since release \texttt{1.3u} of a former
+limitation that all math versions had to share the same font encoding, else
+some characters such as the dotless \texttt{i} ($\imath$), or the minus sign
+could well vanish from the output in the non-normal math versions.
 
-Furthermore we test if the non-letter characters obey the math alphabet
-\verb|\mathbf|. In the normal and bold math versions, this feature is
-de-activated, as option \emph{subdued} was used; and if activated we
-should then use in these math versions the package \verb|\Mathbf| rather
-than \verb|\mathbf| which is there still the original one, which will
-use encoding \verb|OT1| in the normal and bold versions, as we loaded
-\verb|fontspec| with its option \emph{no-math}.
+Furthermore we test (last line of each block, on the left) if the non-letter
+characters obey the math alphabet \verb|\mathbf|. In the normal and bold math
+versions, this feature is de-activated, as option \emph{subdued} was used; and
+if activated we should then use in these math versions the package
+\verb|\Mathbf| rather than \verb|\mathbf| which is there still the original
+one, which will use encoding \verb|OT1| in the normal and bold versions, as we
+loaded \verb|fontspec| with its option \emph{no-math}.
 
 Some among the fonts tested have no bold variant or no italic variant.
 
 Note (tested 2013/09/03): for some reason the \verb|Color| specifications in the
 \verb|\setmainfont| commands work only
-with \XeTeX{}, not with \LuaLaTeX{}; a few months back I had not noticed
+with \XeLaTeX{}, not with \LuaLaTeX{}; a few months back I had not noticed
 such a difference between the two engines.
 
-Update (2016/01/15, with reasonably up-to-date TL2015): \verb|Color| spec in
-use of \verb|\setmainfont| command now functional again with
+Update (tested 2016/01/15 with reasonably up-to-date TL2015): \verb|Color|
+spec in use of \verb|\setmainfont| command now functional again with
 \LuaLaTeX.
 
+Note (tested 2019/08/11, reasonably up-to-date TL2019): spacing with the Didot
+font differs widely between \XeLaTeX\ and \LuaLaTeX{} (perhaps related to
+italic corrections, see the package documentation), and also it seems
+\LuaLaTeX{} will not find (from our generic usage of the \verb|fontspec|
+interface, at least) bold variants of the Hoefler Text and American Typewriter
+fonts, contrarily to \XeLaTeX. Also, the \emph{italic} option remains
+seemingly without effect with \LuaLaTeX{} in the case of the Hoefler Text font
+(see the package source code comments on some problems with the two ``modes''
+for text fonts under \LuaLaTeX, which may be related with this specific issue
+here).
+
 \newcommand\TEST[1]{\MTversion{#1}\def\tmpa{#1}%
   \def\tmpb{normal}\def\tmpc{bold}%
   \ifx\tmpa\tmpb\else\ifx\tmpa\tmpc\else \MTnonlettersobeymathxx
@@ -985,22 +1001,32 @@
 
 This test uses \verb|mathastext| with its \emph{italic}, \emph{asterisk}, and
 \emph{subdued} options. The base document fonts are the Latin Modern ones (in
-OpenType format). The other fonts used were chosen from those of a Linux
-machine. We also used the Times font in T1 encoding, to illustrate a warning
-from the user manual when using different encodings in the various math
-versions: here the minus sign has disappeared from the Times math mode block,
-precisely for this matter of encoding.
+OpenType format). The other OpenType fonts were chosen from those available on
+a Linux machine. We also used the Times font in traditional \TeX\ font T1
+encoding, to demonstrate the removal since release \texttt{1.3u} of a former
+limitation that all math versions had to share the same font encoding, else
+some characters such as the dotless \texttt{i} ($\imath$), or the minus sign
+could well vanish from the output in the non-normal math versions.
 
-Furthermore we test if the non-letter characters obey the math alphabet
-\verb|\mathbf|. In the normal and bold math versions, this feature
-is de-activated, as option \emph{subdued} was used; and if activated we
-should then use in these math versions the package \verb|\Mathbf| rather
-than \verb|\mathbf| which is there still the original one, which will
-use encoding \verb|OT1| in the normal and bold versions, as we loaded
-\verb|fontspec| with its option \emph{no-math}.
+Furthermore we test (last line of each block, on the left) if the non-letter
+characters obey the math alphabet \verb|\mathbf|. In the normal and bold math
+versions, this feature is de-activated, as option \emph{subdued} was used; and
+if activated we should then use in these math versions the package
+\verb|\Mathbf| rather than \verb|\mathbf| which is there still the original
+one, which will use encoding \verb|OT1| in the normal and bold versions, as we
+loaded \verb|fontspec| with its option \emph{no-math}.
 
 Some among the fonts tested have no bold variant or no italic variant.
 
+Note: the two unicode engines \XeLaTeX\ and \LuaLaTeX\ give likely not fully
+identical results particularly for the math mode. At least this is what I
+observed regularly over the years with the variant of this file prepared for
+fonts available on Mac OS, which is my main system where I develop
+|\mathastext|. Lastly for example (TL2019, august 2019), \LuaLaTeX\ could not
+find the bold variant of some system font, but \XeLaTeX\ did. And the spacing
+for the letters of the Didot font was vastly different between the two
+engines.
+
 \newcommand\TEST[1]{\MTversion{#1}\def\tmpa{#1}%
   \def\tmpb{normal}\def\tmpc{bold}%
   \ifx\tmpa\tmpb\else\ifx\tmpa\tmpc\else \MTnonlettersobeymathxx
@@ -1378,10 +1404,10 @@
     {\hbox to \linewidth \bgroup \hss \bgroup \aftergroup\centeredline@ }
 \makeatother
 
-\DeclareRobustCommand\cs[1]%
-        {{\ttfamily\hyphenchar\font=189 \char`\\#1}}
+\DeclareRobustCommand\cs[1]% j'utilisais avant 189, j'ai essay\xE9 23
+        {{\ttfamily\hyphenchar\font=127 \char`\\#1}}
 \DeclareRobustCommand\csb[1]%
-        {\hyperref[#1]{\ttfamily\hyphenchar\font=189 \char`\\#1}}
+        {\hyperref[#1]{\ttfamily\hyphenchar\font=127 \char`\\#1}}
 
 \newcommand*\blueit[1]{\texorpdfstring{\blueitaux #1\relax}{#1}}
 \def\blueitaux #1#2\relax{\hyperref[#2]{\ttfamily #1#2}}
@@ -1395,7 +1421,7 @@
 \def\xA7{\begingroup
            \let\do\@makeother\dospecials
       \@jfendshrtverb }
-\def\@jfendshrtverb #1#2\xA7{\hyperref[#2]{\ttfamily\hyphenchar\font=189 #1#2}\endgroup}
+\def\@jfendshrtverb #1#2\xA7{\hyperref[#2]{\ttfamily\hyphenchar\font=127 #1#2}\endgroup}
 \makeatother
 
 \newcommand\mst{%
@@ -1567,8 +1593,7 @@
 
 \section{What \mst does}
 
-For changes see \autoref{sec:changelog}. For installation instructions see
-\autoref{sec:install}.
+For changes see \autoref{sec:changelog}.
 
 \subsection{Examples}
 
@@ -1697,7 +1722,7 @@
   document uses the |LGR| encoded fonts |cmtt|, |cmss|, and |txr|,
   which are part of standard \TeX{}
   distributions.\footnote{The first two are available (with no need to
-  load explicitely any package in the document) via the combination
+  load explicitly any package in the document) via the combination
   |cbfonts| (|cbgreek-complete|) \& |babel|, and the |LGR| encoded |txr| font
   (again no package loading is necessary) is part of the files of the
   |txfontsb| package.}
@@ -1934,18 +1959,35 @@
 to the whole of the document (and one may also define additional
 math versions in the preamble); with the \xA7subdued\xA7 option the
 \emph{mathastextification} is done only in \emph{math versions} distinct from
-the standard and bold ones. 
+the standard and bold ones.
 
-The previous description is in fact a bit optimistic: \mst was not
-written initially in order to allow its action to be completely
-canceled, and achieving this would require a complete rewrite of
-large portions of the code.%
-%
-\footnote{\mst does not store mathcodes nor does it set them when
-changing math versions; only that would allow a perfect subdued
-mode. The sole exception, since \texttt{1.3t}, is for the handling of
-the minus sign.}
+Despite some limitations I will now partially describe, the \xA7subdued\xA7 option
+has its utility, as I think is illustrated enough by the examples given at the
+start of this document and it works reasonably well.
 
+\begin{framed}
+  \mst was not written initially in order to allow its action to
+  be completely canceled. It does not store (all) mathcodes nor
+  does it set them (all) when changing math versions; only that would
+  allow a perfect subdued mode (and \LaTeX\ is rather obstinate in
+  making that tricky or at least uneasy if sticking to its
+  official interface to math mode, as it is almost entirely
+  preamble only).
+
+  Releases |1.3t| and |1.3u| do this kind of things to maintain
+  usability across multiple \mst-ified math versions of characters
+  which are obviously font encoding dependent such as the minus
+  sign as en-dash (or unicode minus), the dotless i, the |\hbar|,
+  the text accents.
+
+  But this should be extended to all \mst-ified characters which
+  basically would amount to an extensive rewrite of large legacy
+  portions of the code. Currently the support for the |subdued|
+  mode and to multiple math versions amounts to some kind of a
+  kludge, added to an initial design which handled a single unique
+  text font.
+\end{framed}
+
 To get the displayed math
 (almost) as if \mst had not been loaded, one must also
 use the option \xA7defaultmathsizes\xA7. But this does not quite suffice,
@@ -1961,30 +2003,31 @@
 en-dash or minus character in non-subdued math versions.}
 %
 and although it will make a reasonable choice of this font,
-this is not a return to the previously prevailing situation. And
-then arbitrary packages could have done arbitrary things... so to
+this is not an exact re-installement of the previously prevailing situation. And
+then other packages could have done arbitrary things regarding character
+mathcodes, so to
 be on the safe side one needs the \xA7basic\xA7 option which limits the
-mathastextification to letters and digits; and also the \xA7nohbar\xA7 to
-avoid the redefinition of the \cs{hbar} macro.%
+mathastextification to letters and digits.%
+%
+\footnote{\CHANGED{1.3d}The \xA7subdued\xA7 mode does extinguish
+in the normal and bold math versions the action of options \xA7selfGreek\xA7,
+\xA7eulergreek\xA7, and \xA7symbolgreek\xA7 (previously only \xA7LGRgreek\xA7 was
+subdue-able).}
 \footnote{\CHANGED{1.3t}The \texttt{\string\imath} and
-\texttt{\string\jmath} now obey automatically the subdued regime.}
-
-And even then, in some circumstances, this
-may not suffice; for example the \emph{euler} package puts
+\texttt{\string\jmath} now obey the subdued regime.}
+\footnote{\CHANGED{1.3u}Also \texttt{\string\hbar} 
+and the math accents (see \xA7mathaccents\xA7 option) obey the subdued regime.}
+%
+Even then, in some circumstances, this
+may not suffice: for example the \emph{euler} package puts
 the digits in the same font as the Latin letters in math mode, but
 the subdued \mst will pick them up in the same font as used for
 operator names, which for example in the case of the \emph{euler} package, is
-is the main document font. So, even subdued, \mst still kicks. But,
-as I think is illustrated by the examples given at the start of
-this document, the \xA7subdued\xA7 option has its utility, and works
-reasonably well. 
+the main document font.
 
-Starting with package version |1.3d|, the \xA7subdued\xA7 mode does extinguish
-in the normal and bold math versions the action of options \xA7selfGreek\xA7,
-\xA7eulergreek\xA7, and \xA7symbolgreek\xA7 (previously only \xA7LGRgreek\xA7 was
-subdue-able).
 
 
+
 \subsection{Math versions}\label{sec:mathversions}
 
 \LaTeX{} has the concept of \emph{math versions}, but most font packages
@@ -2054,10 +2097,10 @@
 
 The native \LaTeX{} command
 \cs{mathversion}\marg{version\_name} would change only the fonts used in math
-mode. It is recommended to use instead the package command
+mode. It is important to use rather the package command
 \csb{MTversion} (or one of its synonyms \cs{mathastextversion},
-\cs{Mathastextversion}, \cs{MTVersion}), with a mandatory argument
-\marg{version\_name}, which does additional actions:
+\cs{Mathastextversion}, \cs{MTVersion}), with its mandatory argument
+\marg{version\_name}, as it does additional actions:
 \begin{itemize}
 \item it sets the font for math mode (letters, math operator names, digits,
   punctuations, some other symbols) according to the version name given as
@@ -2066,7 +2109,16 @@
   |\(family,rm,sf,...)default|s to their values as registered at the time of
   definition of the version. \emph{Use the starred variant in case this is not
     desired.} It is possible to also specify within brackets an extra optional
-  version name, and the text font will be set according to it,
+  version name, and the text font will be set according to it.
+\end{itemize}
+For all math versions if not using the \xA7subdued\xA7 option, or only
+for the non-\emph{normal} and non-\emph{bold} math versions if
+using the \xA7subdued\xA7 option, \cs{MTversion} does further additional tasks:
+\begin{itemize}
+\item it resets\RLNote{NEW FEATURE!}{1.3u} the \xA7\hbar\xA7, \cs{imath}
+  (see \xA7\inodot\xA7), \cs{jmath}, math accents (see option
+  \xA7mathaccents\xA7) and minus sign as en dash according to the used
+  font encoding for the \mst-ified text font,
 \item (see sections \ref{sec:mathskips} and \ref{sec:ic}) it re-issues the
   command \xA7\MTmathactiveletters\xA7 to let a to z, A to Z, be mathematically
   active in order to automatically insert the skips as defined by the user
@@ -2084,8 +2136,9 @@
   received one of the Greek related options.
 \end{itemize}
 The scope is limited to the current \LaTeX{}
-environment or group. When switching to the \emph{normal} or \emph{bold} math
-versions under option \xA7subdued\xA7 most of the above is canceled.
+environment or group.
+%  When switching to the \emph{normal} or \emph{bold} math
+% versions under option \xA7subdued\xA7 most of the above is canceled.
 
 
 It is sometimes not compatible with \mst to load a font package after it, as the
@@ -2260,7 +2313,7 @@
 We learn in Appendix G of the \TeX book that the italic correction is used for
 the horizontal shift of the superscript with respect to the position of
 the subscript: $\mathit{f_i^j}$, or, 
-going back now to the the standard math italics $f_i^j$. In the next paragraphs
+going back now to the standard math italics $f_i^j$. In the next paragraphs
 we use $f_i^i$ for more accurate comparison of the positioning of the sub- and superscript.
 
 If we try something like this: |${f\/}_i^i$| we obtain ${f\/}_i^i$. Our
@@ -2377,10 +2430,12 @@
 \footnotemark }
 
 \footnotetext {2016/11/04: the situation hasn't changed a iota since,
-at least on current TL2016. For more see
-\url{http://tex.stackexchange.com/a/337076} which explores also the differences
-between the two Unicode engines regarding italic corrections in pure text mode.}
+at least on current TL2016.}
 
+% For more see
+% \url{http://tex.stackexchange.com/a/337076} which explores also the differences
+% between the two Unicode engines regarding italic corrections in pure text mode.}
+
 \subsection{Extra  glue after \texorpdfstring{\cs{exists}}{\textbackslash
 exists}, \texorpdfstring{\cs{forall}}{\textbackslash forall}, and before the prime glyph}
 \label{sec:extraskips}
@@ -2502,7 +2557,7 @@
 \emph{on} for the `easy' cases
 ${\#}\,{\$}\,{\%}\,{\&}\,.\,/\,\vert\,\backslash$ (activating the feature for
 them puts no constraint on the user input and should not be too upsetting to
-other packages), and also for $*$ but only if this was required explicitely by
+other packages), and also for $*$ but only if this was required explicitly by
 the option \xA7asterisk\xA7, as the user then is supposed to know that |$R^*$| is no
 valid input anymore and should be replaced by |$R^{*}$|. The remaining `difficult'
 cases create similar
@@ -2518,14 +2573,18 @@
   Their scope is limited to the current \LaTeX{} environment or group. They use
   the \cs{everymath} and \cs{everydisplay} mechanism so if the document needs to
   modify these token lists it has to do so in a responsible manner, extending
-  not annihilating their previous contents.} \footnote{when in subdued mode, the
-  math alphabets are the default ones, not the ones modified by \mst to use the
-  document text fonts. As a result, matters of font encodings may then give
-  unexpected results, for example for $-$. On the present document page we
-  switched to a math version to escape from the |subdued| mode and avoid the
-  problem with \cs{mathbf\{-\}} giving in the normal (subdued) math version
-  {\MTversion{normal}\MTnonlettersobeymathxx$\mathbf-$\sffamily, when
-    `non-letters' are declared to obey math alphabets.}}
+  not annihilating their previous contents.} 
+%% suppression de cette note de bas de page \xE0 1.3u car elle est obsol\xE8te
+%% (pas s\xFBr si \xE0 100%, mais en tout cas l'exemple avec \mathbf{-} n'a plus
+%% de probl\xE8me.
+% \footnote{when in subdued mode, the
+%   math alphabets are the default ones, not the ones modified by \mst to use the
+%   document text fonts. As a result, matters of font encodings may then give
+%   unexpected results, for example for $-$. On the present document page we
+%   switched to a math version to escape from the |subdued| mode and avoid the
+%   problem with \cs{mathbf\{-\}} giving in the normal (subdued) math version
+%   {\MTversion{normal}\MTnonlettersobeymathxx$\mathbf-$\sffamily, when
+%     `non-letters' are declared to obey math alphabets.}}
 
 \begin{framed}
   \textbf{Important:} the package does \csb{MTnonlettersdonotobeymathxx} by
@@ -2747,7 +2806,7 @@
 Greek letters. Again the user is strongly advised to look at |mathspec| and
 |unicode-math|.
 
-Let me point out explicitely that \mst has not been tested in any systematic
+Let me point out explicitly that \mst has not been tested in any systematic
 manner under the Unicode engines; and that it is expected to be most definitely
 incompatible with |unicode-math|, although your mileage may vary and some
 features may appear to work.
@@ -2770,8 +2829,9 @@
   The |amsmath| package, if used, \emph{must} be loaded \emph{prior} to \mst.
 
 \item
-  Under |lualatex| engine, it is recommended to also load the package
-  |lualatex-math|.
+  Under |lualatex| engine, it has long been recommended to also load the package
+  |lualatex-math|. Please check its documentation as possibly it has now
+  been incorporated upstream (I am not following up on the situation).
 \end{itemize}
 \end{framed}
 
@@ -2796,12 +2856,9 @@
 \cs{setmainfont} before the \cs{Mathastext}\oarg{version} command, or simply
 before loading \mst for the default math versions.
 
-It is possible to mix Unicode fonts and classical \TeX{} fonts. But this is
-definitely \emph{not} recommended as \mst decides once and for all at loading
-time what should be (on the basis of \cs{encodindefault}) the font slot of
-things such as the minus sign. So it is best to have either only Unicode
-fonts, or only old-fashioned \TeX{} fonts in a fixed encoding (T1, or LY1 for
-example).
+It is possible to mix usage of Unicode fonts and classical \TeX{}
+fonts. All used 8bits font encoding must have been passed as
+options to the |fontenc| package.
 
 \subsubsection{The unicodeminus option}
 
@@ -3069,30 +3126,33 @@
     1.6} does nothing as it is already fixed ``upstream'' in |amsopn.sty|, but
   anyhow in both cases, this still hardcoded the font, so finally \mst does
   the right thing from its point of view. See the code comments for more,
-  there is an issue here with \LuaLaTeX not applying the curly right quote
+  there is an issue here with \LuaLaTeX\ not applying the curly right quote
   contrarily to \XeLaTeX.}
 %
 This customization is suppressed in \xA7subdued\xA7 mode for the |normal| and |bold|
 math versions.
 
-\item[hbar:] the definition of \cs{hbar} inherited from
-  default \LaTeX{} will in our context make use of the
-  |h| of the current math font (so for us, it is also
-  the text font, perhaps in italic shape), but the bar
-  accross the |h| will come from the original default
-  math font for letters (usually |cmmi|), and
-  furthermore its placement on the |h| can be
-  odd-looking. So we redefine \cs{hbar} to use only the
-  text font (and this will be aware of the \xA7italic\xA7
-  option). Our construction does not always give an
-  optimal result (and its scope is limited to the |OT1|,
-  |LY1| and |T1| encodings), so an option \xA7nohbar\xA7
-  deactivates it. There is no \cs{hslash} provided by
-  the package, though. The version |1.12| of the
-  package when dealing with a Unicode font tries to get
-  the \cs{hbar} directly as a glyph from the font.
+\item[hbar:] the default \LaTeX\ definition of \xA7\hbar\xA7 would in our context
+  make use of the |h| of the current math font (so for us, it is also the text
+  font, perhaps in italic shape), but with a bar accross the |h| from the
+  original default math font for letters (usually |cmmi|). We redefine
+  \cs{hbar} to use the text font macron accent (|\=|) as a mock math accent
+  (this takes into account the \xA7italic\xA7 option and is compatible with
+  subscripts and superscripts).
 
+  Since |1.12| \mst when dealing with a Unicode font sets the \cs{hbar}
+  to be the character from the font having hexadecimal codepoint |U+0127|.
 
+  Since |1.3u| the general 8bits font encoding is
+  supported\RLNote{changed:}{1.3u} (see discussion of the |mathaccents| option
+  at end of this list for the shared limitations). Brief testing with
+  various usual \TeX\ fonts shows that the vertical positioning of
+  the bar isn't satisfying. It is planned to either add a parameter to
+  adjust it or to modify altogether the mode of construction of the |\hbar|.
+
+  Use \xA7nohbar\xA7 to tell \mst not do provide its own |\hbar|.
+
+
 \item[dotless i and j:] by default the package redefines \cs{imath} and
   \cs{jmath} to give (in math mode) the dotless i and j (if it exists at
   all) from the text font.%
@@ -3099,7 +3159,7 @@
 %
 \footnote{\CHANGED{1.3t}Since \texttt{1.12} it also redefined \cs{i} and
   \cs{j} for usability both in text and math modes, but this has been
-  dropped at \texttt{1.13t}. Breaking change!}
+  dropped at \texttt{1.3t}. Breaking change!}
 
 \item[asterisk:] versions of \mst earlier than |1.2d [2013/01/02]|
   did not do anything
@@ -3132,18 +3192,22 @@
   |$R^{*}$| and |$R^{\ast}$|. Furthermore, they will obey the
   math alphabet commands.
 
-\item[\XeTeX{} and \LuaLaTeX{}:] for the en-dash and the dotless i and j, the
-  package expects to detect either the |fontspec| encodings EU1 (\XeTeX), EU2
-  (\LuaLaTeX), or TU\RightNote{1.3l} (both), or one of |OT1|, |LY1| or |T1|,
-    else it will renounce and not attempt to access the en-dash (or the
-    Unicode minus) and the dotless i and j glyphs. With \LaTeX{} and
-    Pdf\LaTeX{}, there is no such limitation and all 8bit-encodings
-    (containing these glyphs) should be ok.
+\item[\XeTeX{} and \LuaLaTeX{}:] regarding the en-dash and the
+  dotless i and j, the package is now under the Unicode engines
+  compatible not only with the ``Unicode'' \LaTeX\ font encodings
+  EU1 (\XeTeX, old fontspec), EU2 (\LuaLaTeX, old fontspec), TU
+  (\XeTeX\ and \LuaLaTeX, modern fontspec), but also with
+  traditional 8bits-encodings declared as a |fontenc|
+  option.\RLNote{NEW FEATURE!}{1.3u} Formerly, with a Unicode engine,
+  only OT1, T1 and LY1 were supported by \mst as the 8bit encoding
+  of the document text font, regarding the minus as en-dash and
+  the dotless i and j.
 
  \item[fontspec:] one more note to users of
-\XeTeX{}/\LuaLaTeX{} with |fontspec|: it has to be
-loaded {with the option} |no-math|, 
-{and before} \mst.
+\XeTeX{}/\LuaLaTeX{} with |fontspec|:\newline 
+\fbox{it has to be
+loaded {with the option} |no-math|}, 
+and \emph{before} \mst.
 
 \item[vec accent:] The default \cs{vec} accent is not
   appropriate for upright letters, so  \mst
@@ -3187,26 +3251,60 @@
   \autoref{sec:ic}) are removed in the scope of the math alphabets.
   \end{itemize}
 
-\item[math accents:] an option \xA7mathaccents\xA7 is
-  provided to pick up the accents in math mode from the
-  text font, but the package knows only |T1|, |LY1| or
-  |OT1|-compatible encodings.
+\item[math accents:] if option \xA7mathaccents\xA7 is used then \mst attempts to let
+  the math accents |\acute|, |\grave|, etc... use the suitable glyphs from the
+  text font. Prior to |1.3u| only |OT1|, |T1|, and |LY1| were supported (via
+  hardcoded slots). It should now work with any 8bits font
+  encoding\RLNote{NEW FEATURE!}{1.3u} having been declared as an option to the
+  |fontenc| package (and of course providing the ten needed text accents which
+  will mock math accents).%
+  %
+  \footnote{The code will raise low-level \TeX\ errors if the user attempts to
+    use an 8bits font encoding whose \LaTeX\ definition file is lacking the
+    suitable uses of \cs{DeclareTextAccent} or if the low level \LaTeX\ macro
+    implementation of text accents changes significantly; in such cases please
+    report the problem to the author, so that it can be documented in future
+    releases!}
+
+  The |\vec| math accent is not handled here, as it is not available in the
+  usual 8bits font encodings. See the \xA7fouriervec\xA7 option or the \xA7\pmvec\xA7
+  command.
+
+  The math accents obey the \xA7subdued\xA7 option\RLNote{NEW FEATURE!}{1.3u}
+  and will change in sync with the \mst-ified text font used in
+  each non subdued math version.
+
+  (Very) brief testing during |1.3u| development with \XeTeX\ and \LuaTeX\ let
+  the author conclude that usage with the \cs{Umathaccent} primitive of an
+  OpenType accent glyph slot (which in the text font is for usage as a
+  postpended combining character) gives definitely bad horizontal placements
+  for both engines (each in its own way). Thus, the redefinitions of accents
+  for a \mst declared math version with an OpenType font is by default
+  canceled.%
+%
+\footnote{I.e., the \cs{grave} etc... control sequences will, in math versions
+  with an OpenType \mst-ified font, expand to macros holding their initial
+  meanings, unmodified by \mst, which was in force at the
+  |\string\begin\string{document\string}|.}
+%
+  Use \xA7unimathaccents\xA7 to force usage of the OpenType font text
+  accents glyph slots with the \cs{Umathaccent} primitive. Expert users are
+  invited to check out the code and to contribute suggestions if some extras
+  can improve it.
  
-\end{description}
+\item[varying font encodings:] the very first release of \mst dealt with only
+  one font; very soon thereafter it acquired the capacity to define multiple
+  math versions, each one using its own text font. But, as was documented at
+  this location formerly, various encoding dependent decisions were done once
+  and for all during package loading.
 
-Regarding the encoding-dependent glyphs: the en-dash, the
-dotless i and j, the math accents, the hbar, are encoding
-dependent and the relevant decisions are made once by \mst at
-the time it is loaded and are applied to all declared math
-versions. So you can use math versions with different
-encodings but, regarding these characters only those with the
-same encoding as the normal math version will display them
-correctly.
+  This meant in particular that the minus sign (using the text endash), the
+  dotless |i| and |j|, the |\hbar|, the math accents were all set up for only
+  one unique font encoding. It was thus recommended that all math versions
+  share the same font encoding.
 
-\begin{framed}
-  It is thus recommended that all declared mathastext math
-  versions use the same font encoding.
-\end{framed}
+  The |1.3u| release has lifted this restriction.\RLNote{NEW FEATURE!}{1.3u}
+\end{description}
 
 % 2 septembre 2013; finalis\xE9 22:58
 \makeatletter
@@ -3454,7 +3552,7 @@
   % arguments to all math alphabets (\emph{i.e.} also \cs{mathnormal}) are
   % suppressed (with \cs{MTicinmath} the italic corrections are suppressed
   % inside the scope of math alphabets \emph{except} \cs{mathnormal}.)
-  % No italic corrections are explicitely added inside arguments of math
+  % No italic corrections are explicitly added inside arguments of math
   % alphabets.
 
  \xA7\MTicalsoinmathxx\xA7: this command de-activates the de-activation of
@@ -3495,6 +3593,21 @@
   it will have to be coded |$a^{!}$|. Hence, by default, the package does
   \xA7\MTnonlettersdonotobeymathxx\xA7.
 
+  \begin{framed}
+    Under |subdued| option, \cs{MTnonlettersobeymathxx} effect is of course
+    canceled in the \emph{normal} and \emph{bold} math versions; but please
+    note that when switching back to a non-subdued math version it will be
+    mandatory to issue again \cs{MTnonlettersobeymathxx} explicitly if its
+    effect is to be re-activated.
+
+    In particular, executing \cs{MTnonlettersobeymathxx} in the preamble or at
+    the start of the document body serves nothing, because the document is in
+    the subdued \emph{normal} math version regime then. It must thus be
+    executed after the first usage of \cs{Mtversion} switching to a
+    non-subdued math version, and again on each successive exit from the
+    \emph{normal} or \emph{bold} math versions.
+  \end{framed}
+
   {\footnotesize 
 \xA7\MTexplicitbracesobeymathxx\xA7 extends an earlier \xA7\MTnonlettersobeymathxx\xA7
   to also treat  \verb|\{| and \verb|\}|. But then |\left\{|, |\right\}| must
@@ -3527,10 +3640,12 @@
 \end{verbatim}
   {\footnotesize Notice that under |subdued| option, switching to the
     \emph{normal} or \emph{bold} version does \csb{MTeverymathoff} which
-    includes \cs{MTnonlettersdonotobeymathxx}. But the default
+    includes \cs{MTnonlettersdonotobeymathxx}.
+
+    The default
     \xA7\MTeverymathdefault\xA7 which is issued when going back to a
     non-\emph{normal} or \emph{bold} math version doesn't do
-    \cs{MTnonlettersobeymathxx}. It is up to the user to correct this if
+    \cs{MTnonlettersobeymathxx}: thus it is up to the user to correct this if
     needed (no issue without |subdued| option).
 
 
@@ -3795,13 +3910,22 @@
 
 All further commands are usable only inside math mode.
 \begin{enumerate}[label=$\bullet$]
-\item \xA7\hbar\xA7: this macro is by default redefined
-  (in a way compatible with the |italic| option) combining
-  the |h| letter and the \={ } accent from the
-  \mst font. Note that \cs{mathrm}|{\hbar}| and
-  \cs{mathbf}|{\hbar}| should work and that \cs{hbar}
-  does scale in subscripts and exponents. Only for |T1|
-  and |OT1| (or |LY1|) encodings.
+\item \xA7\hbar\xA7: this macro is by default redefined (in a way compatible with
+  the |italic| option) combining the |h| letter and the \={ } accent from the
+  \mst font. Note that \cs{mathrm}|{\hbar}| and \cs{mathbf}|{\hbar}| will
+  work and that \cs{hbar} does scale in subscripts and exponents. Since
+  |1.3u|, this is a priori compatible with all 8bits text font
+  encodings\RLNote{changed:}{1.3u} supporting the |\=| text accent in
+  the LaTeX way.%
+%
+\footnote{\CHANGED{1.3u}The horizontal skips for letter |h| from
+  \cs{MTsetmathskips} are ignored for \cs{hbar}. Formerly, a positive
+  ``before'' skip was not properly taken into account for the horizontal
+  positioning of the accent and thus gave a bad result. The user can extend
+  the package \cs{hbar} definition to add skips.}
+\footnote{\CHANGED{1.3u}The \cs{hbar} redefinition is canceled in normal and
+  bold math versions under the |subdued| option.}
+  
 \item \xA7\fouriervec\xA7: this is a |\vec| accent taken from the Fourier font;
 the |fourier| package need not be loaded. Active only
 if option \xA7fouriervec\xA7.
@@ -3823,10 +3947,7 @@
 when the math version has been declared via \xA7\MTDeclareVersion\xA7 with
 its optional parameter for shape of letters.
 \item \xA7\inodot\xA7, \xA7\jnodot\xA7: the corresponding glyphs in the \mst-ified
-  font for use in math mode. This should work for all 8bit-encodings
-  having these glyphs, and also with Unicode engines (except for the
-  latter if the font encoding is an 8-bit one distinct from |OT1|, |T1|
-  or |LY1|). By default, |\imath| and |\jmath| are redefined to use
+  font for use in math mode. By default, |\imath| and |\jmath| are redefined to use
   them. Since \texttt{1.3t}, these macros obey the \texttt{subdued}
   regime.
 %
@@ -3993,7 +4114,9 @@
  \item \xA7mathaccents\xA7: use the text font also for the math
 accents. As in vanilla \LaTeX{}, they are taken from the font
 for the digits and \cs{log}-like names. Obey the alphabet
-changing commands. Will work only for |T1|, |LY1|, or |OT1|-compatible encodings.
+changing commands.
+ \item \xA7unimathaccents\xA7:\RLNote{new:}{1.3u} extends |mathaccents| to
+OpenType fonts. Gave bad results in my brief testing.
  \item \xA7defaultbf\xA7, \xA7defaultit\xA7, \xA7defaultsf\xA7, \xA7defaulttt\xA7: do not
 set up, respectively, the \cs{mathbf}, \cs{mathit}, \cs{mathsf},
 and \cs{mathtt} commands to use the mathastext-ified
@@ -4033,47 +4156,6 @@
 \clearpage
 
 
-\section{Installation}\label{sec:install}
-
-\def\MacroFont{\footnotesize\ttfamily}
-\begin{verbatim}
-Use the managing tools of your TeX installation to install or upgrade
-mathastext.
-
-Else, for manual user install, grab mathastext.tds.zip from CTAN and run
-
-    unzip -d <destfolder> mathastext.tds.zip
-
-where  <destfolder> could be ~/texmf or, on mac os x, ~/Library/texmf.
-
-Else, download mathastext.dtx, possibly also mathastext.ins, and follow
-these instructions:
-
-* with mathastext.ins: run tex on mathastext.ins to generate the package
-style file mathastext.sty as well as mathastext.tex and some test files.
-
-* without mathastext.ins: run tex on mathastext.dtx to generate the package
-style file mathastext.sty as well as mathastext.tex and some test files.
-(and also mathastext.ins)
-
-  Move the style file mathastext.sty to a location where TeX can find it.
-  In a TDS compliant hierarchy this will be
-      <TDS>:tex/latex/mathastext/mathastext.sty
-
-*documentation*: run latex thrice on mathastext.tex then dvipdfmx. Or, run
-pdflatex thrice on mathastext.dtx. In the former case the documentation is
-with source code included, in the latter without. The file mathastext.tex
-can be customized to change the font size or set other options therein.
-
-   (One cannot use lualatex or xelatex to compile the documentation.)
-
-*test files*: mathastexttestmathversions.tex
-              mathastexttestunicodemacos.tex
-              mathastexttestunicodelinux.tex
-              mathastexttestalphabets.tex
-
-\end{verbatim}
-
 \normalsize
 
 \section{Change log}
@@ -4107,11 +4189,12 @@
 % 
 % Ici je dois faire un input appropri\xE9.
 
-% Cette version a uniquement un README.md, dont il faut retirer le d\xE9but.
+% 2019/08/12: le ChangeLog.md est directement disponible, alors qu'auparavant
+% il \xE9tait inclus dans le README.md.
+%
 % Les items sont initi\xE9s par des *
 % Il faut se d\xE9barrasser des ---- et remplacer les \[, \]
-% Il faut aussi g\xE9rer les `, et par ailleurs se d\xE9barrasser du d\xE9but du
-% README.md
+% Il faut aussi g\xE9rer les `.
 
 \catcode`*=\active
 \def*{\ifvmode\smallskip
@@ -4134,13 +4217,13 @@
 
 \catcode`-=\active
 \def-{%
-  \catcode`\<=\active
+  \catcode`M\active
   \begingroup
-  \lccode`\-`\<
-  \lowercase{\endgroup\long\def-}##1CHANGE LOG =========={\catcode`\<=12 \catcode`\-=12 }%
+  \lccode`\-`M % MATHASTEXT CHANGE LOG est la premi\xE8re ligne...
+  \lowercase{\endgroup\long\def-}##1\par{\catcode`\M=12 \catcode`\-=12 }%
   \catcode`1=\active
   \catcode`\` 9 % l\xE9g\xE8rement ennuyeux mais bon, c'est le plus simple.
-  \input README.md
+  \input ChangeLog.md
 }
 
 \makeatother
@@ -4206,7 +4289,7 @@
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage {mathastext}
-  [2018/08/22 v1.3t Use the text font in math mode (JFB)]
+  [2019/08/20 v1.3u Use the text font in math mode (JFB)]
 %    \end{macrocode}
 % Testing for \XeTeX\ and \LuaLaTeX.
 %
@@ -4222,6 +4305,7 @@
   \let\mst at Umathcodenum   \Umathcodenum
   \let\mst at Umathcode      \Umathcode
   \let\mst at Umathchardef   \Umathchardef
+  \let\mst at Umathaccent    \Umathaccent
 \newif\ifmst at XeTeX
 \ifx\XeTeXinterchartoks\@undefined
   \mst at XeTeXfalse
@@ -4232,6 +4316,7 @@
     \let\mst at Umathcodenum   \XeTeXmathcodenum
     \let\mst at Umathcode      \XeTeXmathcode
     \let\mst at Umathchardef   \XeTeXmathchardef
+    \let\mst at Umathaccent    \XeTeXmathaccent
   \fi
 \fi
 \newif\ifmst at LuaTeX
@@ -4244,6 +4329,7 @@
     \let\mst at Umathcodenum   \luatexUmathcodenum
     \let\mst at Umathcode      \luatexUmathcode
     \let\mst at Umathchardef   \luatexUmathchardef
+    \let\mst at Umathaccent    \luatexUmathaccent
   \fi
 \fi
 \newif\ifmst at XeOrLua
@@ -4262,9 +4348,12 @@
 % |`EU1/EU2'| Anyhow, the code in \mst has been common to the two Unicode
 % engines for a while, hence it is not hard to adapt to the replacement of
 % |EU1/EU2| by |TU|, maintaining compatibility with legacy installations.
+%
 % \begin{macro}{\mst at OneifUniEnc}
+% The \cs{mst at OneifUniEnc} is expandable but must be used after
+% having set \cs{mst at tmp@enc}... 
 %    \begin{macrocode}
-\def\mst at oti{OT1}\def\mst at ti{T1}\def\mst at lyi{LY1}
+\def\mst at oti{OT1}
 \def\mst at eui{EU1}\def\mst at euii{EU2}\def\mst at tu{TU}
 \def\mst at OneifUniEnc {%
     \ifx \mst at tmp@enc\mst at tu   1\else
@@ -4316,27 +4405,22 @@
         \def\mst at ltsh{\itdefault}}
     \DeclareOption{frenchmath}{\mst at frenchmathtrue\mst at italictrue
       \def\mst at ltsh{\itdefault}}
-%%
 \newif\ifmst at endash\mst at endashtrue  
     \DeclareOption{endash}{\mst at endashtrue}
     \DeclareOption{noendash}{\mst at endashfalse}
 \newif\ifmst at emdash
     \DeclareOption{emdash}{\mst at emdashtrue\mst at endashfalse}
-%%
 \newif\ifmst at alldelims
 \edef\mst at tmp{\encodingdefault}\ifx\mst at oti\mst at tmp\else\mst at alldelimstrue\fi 
     \DeclareOption{alldelims}{\mst at alldelimstrue}
     \DeclareOption{nolessnomore}{\mst at alldelimsfalse}
-%% new with 1.2
 \newif\ifmst at nosmalldelims
     \DeclareOption{nosmalldelims}{\mst at nosmalldelimstrue}
-%%
 \newif\ifmst at noplus
     \DeclareOption{noplus}{\mst at noplustrue}
 \newif\ifmst at nominus
     \DeclareOption{nominus}{\mst at nominustrue}
 \DeclareOption{noplusnominus}{\ExecuteOptions{noplus,nominus}}
-%%
 \newif\ifmst at noparen
     \DeclareOption{noparenthesis}{\mst at noparentrue}
 \newif\ifmst at nopunct
@@ -4353,10 +4437,9 @@
 \newif\ifmst at nospecials
     \DeclareOption{nospecials}{\mst at nospecialstrue}
 \newif\ifmst at basic % 1.3 to avoid unnecessary patch of amsmath \newmcodes@
-\DeclareOption{basic}{\mst at basictrue
+    \DeclareOption{basic}{\mst at basictrue
     \ExecuteOptions{noparenthesis,nopunctuation,%
                     noplusnominus,noequal,noexclam,nospecials,nolessnomore}}
-%%
 \newif\ifmst at nohbar
     \DeclareOption{nohbar}{\mst at nohbartrue}
 \newif\ifmst at nodigits
@@ -4365,7 +4448,8 @@
     \DeclareOption{defaultimath}{\mst at defaultimathtrue}
 \newif\ifmst at mathaccents
     \DeclareOption{mathaccents}{\mst at mathaccentstrue}
-%%
+\newif\ifmst at unimathaccents % 1.3u
+    \DeclareOption{unimathaccents}{\mst at mathaccentstrue\mst at unimathaccentstrue}
 \newif\ifmst at needsymbol
 \newif\ifmst at symboldelimiters
     \DeclareOption{symboldelimiters}{\mst at needsymboltrue\mst at symboldelimiterstrue}
@@ -4379,9 +4463,8 @@
     \DeclareOption{symbolre}{\mst at needsymboltrue\mst at symbolretrue}
 \newif\ifmst at symbolmisc
     \DeclareOption{symbolmisc}{\mst at needsymboltrue\mst at symbolmisctrue}
-\DeclareOption{symbol}{\ExecuteOptions{symbolgreek,symbolmisc,symbolre}}
-\DeclareOption{symbolmax}{\ExecuteOptions{symbol,symboldelimiters}}
-%%
+    \DeclareOption{symbol}{\ExecuteOptions{symbolgreek,symbolmisc,symbolre}}
+    \DeclareOption{symbolmax}{\ExecuteOptions{symbol,symboldelimiters}}
 \newif\ifmst at needeuler
 \newif\ifmst at eulerdigits
     \DeclareOption{eulerdigits}{\mst at needeulertrue\mst at eulerdigitstrue}
@@ -4388,7 +4471,6 @@
 \newif\ifmst at eulergreek
     \DeclareOption{eulergreek}{\mst at needeulertrue\mst at eulergreektrue
                                \mst at customgreektrue }
-%%
 \newif\ifmst at selfGreek
     \DeclareOption{selfGreek}{\mst at selfGreektrue\mst at customgreektrue}
 \newif\ifmst at selfGreeks
@@ -4399,7 +4481,6 @@
 \newif\ifmst at LGRgreeks
     \DeclareOption{LGRgreeks}{\mst at LGRgreekstrue\mst at LGRgreektrue
                               \mst at customgreektrue}
-%%
 \def\mst at greek@select{0}
 \newif\ifmst at itgreek
 \newif\ifmst at upgreek
@@ -4407,7 +4488,6 @@
     \DeclareOption{upgreek}{\mst at upgreektrue}
     \DeclareOption{itGreek}{\def\mst at greek@select{1}}
     \DeclareOption{upGreek}{\def\mst at greek@select{2}}
-%%
 %    \end{macrocode}
 % Starting with |1.15f| the meaning of the `defaultxx' options has changed. They
 % now prevent |mathastext| from defining additional alphabets rather than
@@ -4761,7 +4841,8 @@
 %    by Babel, its fall-back does not invoke |\string'| so being still
 %    of mathcode |32768| is not a problem.
 %  
-%    I have posted on TeX StackExchange how Babel should possibly modify
+%    I have posted online ^^A on TeX StackExchange 
+%    how Babel should possibly modify
 %    its definitions and I use this here. I simplify a bit my proposed
 %    replacement of \cs{normal at char}\meta{char} as the check for
 %    \cs{protect} is superfluous, I think, having been
@@ -4841,7 +4922,7 @@
 %    the added macros \cs{mst at itcorr} and \cs{mst at before<letter>} expanding to
 %    nothing).
 %
-%    Added note |2016/01/06|: it should be explicitely said that the extra
+%    Added note |2016/01/06|: it should be explicitly said that the extra
 %    |{..}| in |\mst at mathactivate| for letters end up creating |\hbox|'es
 %    around each letter with its extra skips and explicit italic correction,
 %    when present. These skips are thus set at natural width and do not add
@@ -4880,6 +4961,14 @@
 %    The new version of \cs{resetMathStrut@} from LaTeX team release
 %    |2016/03/03 v2.15a| of |amsmath.sty| is still not compatible with a math
 %    active opening parenthesis. Hence my patch here is still needed.
+%
+%    At |1.3u| \cs{MTnonlettersobeymathxx} and \cs{MTeasynonlettersobeymathxx}
+%    are made no-ops under subdued mode. This fixes some bug if for example
+%    the former was used in preamble or immediately after |\begin{document}|
+%    making the minus sign math active although the \mst action was
+%    supposedly subdued. Similarly \cs{MTmathactiveletters} is now a no-op
+%    if issued under subdued mode in the \emph{normal} or \emph{bold} math
+%    versions.
 %    \begin{macrocode}
 \newtoks\mst at do@nonletters
 \newtoks\mst at do@easynonletters
@@ -4894,8 +4983,27 @@
       \let\resetMathstrut@\mst at savedresetMathstrut@}%
     \fi
     \let\mst at the\@gobble
-}
-\newcommand*\MTnonlettersobeymathxx{%
+}%
+%    \end{macrocode}
+% |1.3u| adds this check that we are not in a subdued normal or bold math
+% version. No need for expandable coding.
+%    \begin{macrocode}
+\def\mst at OnlyIfNotSubdued#1{%
+    \ifmst at subdued
+      \def\mst at tmpa{normal}%
+      \ifx\math at version\mst at tmpa
+      \else
+        \def\mst at tmpa{bold}%
+        \ifx\math at version\mst at tmpa
+        \else
+          #1%
+        \fi
+      \fi
+    \else
+      #1%
+    \fi
+}%
+\def\mst at nonlettersobeymathxx{%
     \ifx\mst at the\the
     \else
       \@ifundefined{mst at savedresetMathstrut@}{}{%
@@ -4915,14 +5023,22 @@
       from amsmath replaced (for this group or environment)}}%
     \fi
     \let\mst at the\the
-}
-\newcommand*\MTeasynonlettersdonotobeymathxx{\let\mst at theeasy\@gobble}
-\newcommand*\MTeasynonlettersobeymathxx{\let\mst at theeasy\the}
-\MTeasynonlettersobeymathxx
-\newcommand*\MTmathactiveletters{\let\mst at thef\the \let\mst at theF\the}
-\ifmst at subdued\else\MTmathactiveletters\fi
-\newcommand*\MTmathactiveLetters{\let\mst at theF\the}
-\newcommand*\MTmathstandardletters{\let\mst at thef\@gobble \let\mst at theF\@gobble}
+}%
+\newcommand*\MTnonlettersobeymathxx
+   {\mst at OnlyIfNotSubdued\mst at nonlettersobeymathxx}%
+\newcommand*\MTeasynonlettersdonotobeymathxx{\let\mst at theeasy\@gobble}%
+\def\mst at easynonlettersobeymathxx{\let\mst at theeasy\the}%
+\newcommand*\MTeasynonlettersobeymathxx
+   {\mst at OnlyIfNotSubdued\mst at easynonlettersobeymathxx}%
+\MTeasynonlettersobeymathxx % no-op here if subdued mode
+\def\mst at mathactiveletters{\let\mst at thef\the \let\mst at theF\the}%
+\newcommand*\MTmathactiveletters
+   {\mst at OnlyIfNotSubdued\mst at mathactiveletters}%
+\MTmathactiveletters % no-op here if subdued mode
+\def\mst at mathactiveLetters{\let\mst at theF\the}%
+\newcommand*\MTmathactiveLetters
+   {\mst at OnlyIfNotSubdued\mst at mathactiveLetters}%
+\newcommand*\MTmathstandardletters{\let\mst at thef\@gobble \let\mst at theF\@gobble}%
 %    \end{macrocode}
 %  \begin{macro}{\MTicinmath}
 %  \begin{macro}{\MTICinmath}
@@ -4965,74 +5081,7 @@
 \newcommand*\MTicalsoinmathxx{%
     \ifx\mst at itcorr\@empty\else\def\mst at itcorr{\/}\fi
     \ifx\mst at ITcorr\@empty\else\def\mst at ITcorr{\/}\fi}
-\AtEndOfPackage{\AtBeginDocument{%
-  \everymath\expandafter{\the\everymath 
-    \mst at the\mst at do@nonletters \let\mst at the\@gobble
-    \mst at theeasy\mst at do@easynonletters  \let\mst at theeasy\@gobble
-    \mst at thef\mst at do@az \let\mst at thef\@gobble
-    \mst at theF\mst at do@AZ \let\mst at theF\@gobble}%
-  \everydisplay\expandafter{\the\everydisplay 
-    \mst at the\mst at do@nonletters \let\mst at the\@gobble
-    \mst at theeasy\mst at do@easynonletters  \let\mst at theeasy\@gobble
-    \mst at thef\mst at do@az \let\mst at thef\@gobble
-    \mst at theF\mst at do@AZ \let\mst at theF\@gobble}%
 %    \end{macrocode}
-% |1.3j|: moved here to be executed at begin document (and not from inside
-% \cs{Mathastext@}.) The \cs{MTeverymathoff} does: \cs{MTnormalasterisk},
-% \cs{MTnormalprime}, \cs{MTnonlettersdonotobeymathxx},
-% \cs{MTeasynonlettersdonotobeymathxx}, \cs{MTmathstandardletters}.
-%
-% |1.3m|: doing \cs{MTmathactiveletters} in subdued mode immediately after
-% |\begin{document}| resulted in errors because \cs{mst at itcorr} had been left
-% undefined. We thus add \cs{MTnoicinmath} to the subdued initialization.
-%
-% Since |1.3n| there is \cs{MTresetnewmcodes} which needs
-% \cs{mst at originalnewmcodes@}, itself defined at begin document. Thus we have
-% wrapped the whole thing in \cs{AtEndOfPackage}.
-%
-% And |1.3p| adds here \cs{MTcustomizenewmcodes} which had been regrettably
-% forgotten by |1.3n|.
-%
-% |1.3t| adds some extras to handle correctly the minus sign and
-% dotless i and j in subdued mode, even in case of usage with fontspec.
-%    \begin{macrocode}
-  \MTcustomizenewmcodes
-  \let\mst at imath\imath
-  \let\mst at jmath\jmath
-  \ifmst at subdued
-    \MTeverymathoff
-    \MTresetnewmcodes
-    \MTnoicinmath
-    \MTmathoperatorsdonotobeymathxx
-    \let\inodot\mst at imath
-    \let\jnodot\mst at jmath
-    \mst at subduedminus
-  \else
-     \mst at nonsubduedminus
-%    \end{macrocode}
-% |1.3j|: an earlier version of this code was earlier part of \cs{Mathastext@}.
-% As we are now in \cs{AtBeginDocument} we try to be careful not to overwrite
-% \cs{MTicinmath}, \cs{MTnoicinmath}, \cs{MTicalsoinmathxx}, ... if issued by
-% the user in the preamble, though. And we do not execute
-% \cs{MTmathactiveletters}, it is issued by the package at loading time in
-% order to allow user to cancel it if desired from inside the preamble.
-%    \begin{macrocode}
-     \ifx\mst at itcorr\@undefined
-         \def\mst at itcorr{\ifnum\fam=\m at ne\/\fi}%
-         \@for\mst at tmp:=it,sl\do 
-           {\ifx\mst at tmp\mst at ltshape@normal\let\mst at itcorr\@empty\fi }%
-     \fi
-     \ifx\mst at ITcorr\@undefined
-         \let\mst at ITcorr\mst at itcorr
-         \ifmst at frenchmath
-           \def\mst at ITcorr{\ifnum\fam=\m at ne\/\fi}%
-           \@for\mst at tmp:=it,sl\do
-                {\ifx\mst at tmp\mst at shape@normal\let\mst at ITcorr\@empty\fi }%
-         \fi
-     \fi
-  \fi
-}}
-%    \end{macrocode}
 % \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
 % \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
 % \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
@@ -5041,7 +5090,7 @@
 %   |1.3| |2013/09/02|: user level command to specify extra spaces in math mode
 %   around the letters (only the 7bit a,b,..,z and A,B,..,Z). First parameter is
 %   the letter, second is the math skip to be inserted before, and third the
-%   skip to be inserted after; for example \cs{thickmuskip} or explicitely
+%   skip to be inserted after; for example \cs{thickmuskip} or explicitly
 %   |0.1mu|.
 %
 %   For this, letters are made mathematically active. This is now the package
@@ -5236,9 +5285,10 @@
 %     SINGLE QUOTATION MARK in math mode, but \XeLaTeX\ does. From the point
 %     of view of \mst, the behaviour of \XeLaTeX\ is the coherent one. It
 %     appears that \LuaLaTeX\ use in math mode of a text font does not obey
-%     the set features, like this
-%     \url{http://tex.stackexchange.com/questions/208688/oldstylefigure-issue-with-lualatex-and-mathastext}
-%     perhaps illustrates. I opened a ticket at
+%     the set features.^^A like this
+%^^A     \url{http://tex.stackexchange.com/questions/208688/oldstylefigure-issue-with-lualatex-and-mathastext}
+%^^A     perhaps illustrates.
+%     I opened a ticket at
 %     \url{https://github.com/wspr/fontspec/issues/238}, but as usual it is
 %     hard to figure out the best place where to report font matters.
 %     \emph{This item might be obsolete -- not checked (1.3q).}
@@ -5308,133 +5358,6 @@
                                \let\newmcodes@\mst at newmcodes@\fi}
 %    \end{macrocode}
 % \end{macro}\end{macro}\end{macro}\end{macro}
-% \begin{macro}{subdued}
-%   |1.15|: The subdued code was initiated in May 2011. I returned to
-%   |mathastext| on Sep 24, 2012, and decided to complete what I had started
-%   then, but in the mean time I had forgotten almost all of the little I knew
-%   about \LaTeX{} macro programming.
-%
-%   The point was to extract the data about how are `letters' and
-%   `operators' in the normal and bold versions, through obtaining the
-%   math families of `a' and `1', respectively$^1$. Due to the
-%   reassignements done for characters by |mathastext| I also had
-%   decided in 2011 that the OT1 encoding, if detected, should be
-%   replaced by T1 ($(1)$: but the \emph{euler} package for example
-%   assigns the digits to the \emph{letters} symbol font...)
-%
-%   |1.15d|: Oct 13, 2012. The \cs{mathcode} thing has to be used with care
-%   under Unicode engines. Unfortunately the \cs{luatexUmathcode} macro is
-%   helpless as it is not possible to know if it will return a legacy mathcode
-%   or a Unicode mathcode. On the other hand the much saner
-%   \cs{XeTeXmathcodenum} always return a Unicode mathcode. 
-%
-%   {UPDATE for \mst\ 1.3 (|2013/09/02|): since the release of lualatex as
-%   included in 
-%   TL2013, \cs{luatexUmathcodenum} behaves as \cs{XeTeXmathcodenum} so \mst 1.3
-%   treats identically under both unicode engines the equal and minus signs (and
-%   the vertical bar).}
-%
-%   |1.15e|: Oct 22, 2012. I add the necessary things to also subdue the
-%   \cs{mathbf}, \cs{mathit}, \cs{mathsf} and \cs{mathtt} macros (previous
-%   version only took care of the symbol alphabets \cs{mathnormal} and
-%   \cs{mathrm}.) [update: |1.15f| does that in a completely different and much
-%   simpler way] Notice that the package defines a \cs{mathnormalbold} macro,
-%   but it will not be subdued in the normal and bold math versions.
-%
-%   |1.15f|: Oct 23, 2012. The previous version of the code queried the math
-%   family of a, respectively 1, to guess and then extract the fonts to be
-%   reassigned to mtletterfont and mtoperatorfont (which is done at the end of
-%   this .sty file). The present code simply directly uses letters and operators
-%   (so mathastext could not subdue itself... if it was somehow cloned), but
-%   obtains indeed the corresponding font specifications in normal and bold in a
-%   cleaner manner. But it is so much shorter (and avoids the \LuaLaTeX{}
-%   problem with \cs{luatexUmathcode}). Anyhow, for example the euler package
-%   puts the digits in the letters math family! so the previous method was also
-%   error prone. In fact there is no way to do this subdued mechanism on the
-%   basis of the legacy code of mathastext. The only way is to rewrite entirely
-%   the package to query all mathcodes of things it changes in order to be able
-%   to revert these changes (and one would have to do even more hacking for
-%   |\mathversion{normal}| and not only |\MTversion{normal}| to work).
-%
-%   |1.15f|: and also I take this opportunity to do the subdued math
-%   alphabets things in a much much easier way, see below.
-%
-%   |1.3s 2018/08/21|: I have half-forgotten the reasons for modifiying the
-%   font encoding to current |\encodingdefault|, but at any rate this should
-%   not be done in a |fontspec| context, encoding default being (now) |TU| it
-%   is very unlikely modifying from |TU| or to |TU| from something else will
-%   do any good. See
-%   \centeredline{\url{https://tex.stackexchange.com/questions/444565/mathastext-wrong-digits-in-math-mode/}}
-%   for original report. I add workaround here for case of |fontspec| being
-%   detected via the |\encodingdefault| setting.
-%
-%   |1.3t 2018/08/22|: the |1.3s| fix erroneously removed the
-%   |OT1->T1| replacement in |TU| context.
-%    \begin{macrocode}
-\ifmst at subdued
-  \def\mst at reserved#1\getanddefine at fonts\symletters#2#3\@nil{%
-        \def\mst at normalmv@letter{#2}}
-  \expandafter\mst at reserved\mv at normal\@nil
-  \def\mst at reserved#1\getanddefine at fonts\symletters#2#3\@nil{%
-        \def\mst at boldmv@letter{#2}}
-  \expandafter\mst at reserved\mv at bold\@nil
-  \def\mst at reserved#1\getanddefine at fonts\symoperators#2#3\@nil{%
-        \def\mst at normalmv@operator{#2}}
-  \expandafter\mst at reserved\mv at normal\@nil
-  \def\mst at reserved#1\getanddefine at fonts\symoperators#2#3\@nil{%
-        \def\mst at boldmv@operator{#2}}
-  \expandafter\mst at reserved\mv at bold\@nil
-%%
-  \edef\mst at tmp@enc{\encodingdefault}
-  \def\mst at reserved#1/#2/#3/#4/{\gdef\mst at debut{#1}\gdef\mst at reste{#2/#3/#4}}
-  \begingroup\escapechar\m at ne
-      \xdef\mst at funnyoti{\expandafter\string\csname OT1\endcsname}
-      \expandafter\expandafter\expandafter
-          \mst at reserved\expandafter\string\mst at normalmv@operator/
-  \endgroup
-  \ifx\mst at debut\mst at funnyoti\ifx\mst at tmp@enc\mst at oti\def\mst at tmp@enc{T1}\fi\fi
-  \edef\mst at normalmv@operator{\expandafter\noexpand\csname 
-       \if1\mst at OneifUniEnc
-         \ifx\mst at debut\mst at funnyoti T1\else\mst at debut\fi
-       \else
-         \mst at tmp@enc
-       \fi/\mst at reste\endcsname}
-  \begingroup\escapechar\m at ne
-      \expandafter\expandafter\expandafter
-          \mst at reserved\expandafter\string\mst at boldmv@operator/
-  \endgroup
-  \ifx\mst at debut\mst at funnyoti\ifx\mst at tmp@enc\mst at oti\def\mst at tmp@enc{T1}\fi\fi
-  \edef\mst at boldmv@operator{\expandafter\noexpand\csname 
-       \if1\mst at OneifUniEnc
-         \ifx\mst at debut\mst at funnyoti T1\else\mst at debut\fi
-       \else
-         \mst at tmp@enc
-       \fi/\mst at reste\endcsname}
-  \AtEndOfPackage{
-  \typeout{** ...entering subdued mode...}
-  \expandafter\SetSymbolFont@ \expandafter\mv at normal\mst at normalmv@letter\symmtletterfont
-  \expandafter\SetSymbolFont@ \expandafter\mv at bold\mst at boldmv@letter\symmtletterfont
-  \expandafter\SetSymbolFont@ \expandafter\mv at normal\mst at normalmv@operator\symmtoperatorfont
-  \expandafter\SetSymbolFont@ \expandafter\mv at bold\mst at boldmv@operator\symmtoperatorfont
-  \typeout{** ...done.}
-  }
-\fi % fin de ce \ifmst at subdued
-%    \end{macrocode}
-%  In the short-lived |1.15e| I was doing the following for alphabets:\\
-%  |\def\mst at reservedc#1#2#3#4{\def\mst at normalmv@mathbf{#4#3}}|\\
-%  |\def\mst at reserveda#1{%|\\
-%  |\def\mst at reservedb##1\install at mathalphabet#1##2##3\@nil{\mst at reservedc##2}%|\\
-%  |\expandafter\mst at reservedb\mv at normal\@nil}|\\
-%  |\expandafter\mst at reserveda\csname mathbf\space\endcsname|\\
-%  and later in the code:\\
-%  |\expandafter\expandafter\expandafter\SetMathAlphabet@|\\
-%  |\expandafter\expandafter\expandafter\mv at normal|\\
-%  |\expandafter\mst at normalmv@mathbf\csname Mathbf\space \endcsname\Mathbf|\\
-%  It does work! but |\let\mst at original@bf\mathbf| is so
-%  much simpler. And also safer, because \cs{mathbf} could have been
-%  redefined using \cs{DeclareSymbolFontAlphabet}... (I could have
-%  provided the necessary check to the already bloated code...)
-% \end{macro}
 % \begin{macro}{mtoperatorfont}
 %   Declaration of the current default font as our math
 %   font. The characteristics of the used font can be
@@ -5472,7 +5395,7 @@
 %    \end{macrocode}
 % \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
 % \begin{macro}{mtletterfont}
-%   In version |1.1|, we add the possibility to mimick the standard
+%   At version |1.1|, we add the possibility to mimick the standard
 %   behavior, that is to have italic letters and upright
 %   digits. Thanks to Tariq~\textsc{Perwez} and
 %   Kevin~\textsc{Klement} who asked for such a feature.
@@ -5488,7 +5411,8 @@
 %   fonts, the default in text being to use the |node| mode, and this mode is
 %   non-working in math, thus \mst needs to force use of |base| mode. Else one
 %   sees old style figures where one does not expect them, or the opposite,
-%   depending on the default font feature, see for example \url{http://tex.stackexchange.com/questions/208688/oldstylefigure-issue-with-lualatex-and-mathastext/277628}.
+%   depending on the default font feature.
+%^^A see for example \url{http://tex.stackexchange.com/questions/208688/oldstylefigure-issue-with-lualatex-and-mathastext/277628}.
 %
 %   Once we know the cause, the fix is relatively easy. I will go for the
 %   |\everymath| way, because I don't want to dwelve at all with the details
@@ -5498,12 +5422,12 @@
 %   present patch by \mst will be unneeded. Naturally, here we care only about
 %   the two maths fonts used by \mst: |mtoperatorfont| and |mtletterfont|.
 %
-%   For the |\url| situation, I have posted a patch at:
-%   \url{http://tex.stackexchange.com/questions/264206/cant-get-oldstyle-figures-in-url-with-lualatex}.
+%   For the |\url| situation, I have posted online a patch.
+%^^A   \url{http://tex.stackexchange.com/questions/264206/cant-get-oldstyle-figures-in-url-with-lualatex}.
 %
-%   Not all is resolved, as I comment at
-%   \url{http://tex.stackexchange.com/a/307585/4686} and at
-%   \url{https://github.com/lualatex/luaotfload/issues/204#issuecomment-216465680}
+%   Not all is resolved, as I comment online
+%^^A   \url{http://tex.stackexchange.com/a/307585/4686} and at
+%   at \url{https://github.com/lualatex/luaotfload/issues/204#issuecomment-216465680}
 %   that with |TeX Gyre Termes| for example I can not get simultaneously Old
 %   Style and Tabular Figures to work in math mode, although the font name as
 %   constructed by my patch (which is like the code below, only simpler as we
@@ -5844,18 +5768,8 @@
 \let\Mathastextupgreek\MTupgreek
 \let\MathastextitGreek\MTitGreek
 \let\MathastextupGreek\MTupGreek
-\@onlypreamble\MTitgreek
-\@onlypreamble\MTupgreek
-\@onlypreamble\MTitGreek
-\@onlypreamble\MTitGreek
-\@onlypreamble\Mathastextitgreek
-\@onlypreamble\Mathastextupgreek
-\@onlypreamble\MathastextitGreek
-\@onlypreamble\MathastextitGreek
     \newcommand*\MTgreekfont[1]{\def\mst at greekfont{#1}}
 \let\Mathastextgreekfont\MTgreekfont
-\@onlypreamble\MTgreekfont
-\@onlypreamble\Mathastextgreekfont
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -5862,619 +5776,6 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
-%  \begin{macro}{\MTWillUse}
-% This is a preamble-only command, which can be used more than once, only the
-% latest one counts. Sets up the math fonts in the normal and bold
-% versions, as does \cs{Mathastext}.
-%    \begin{macrocode}
-\newcommand*\MTWillUse[5][]{
-  \MTencoding{#2}
-  \MTfamily{#3}
-  \MTseries{#4}
-  \MTshape{#5}
-    \ifmst at italic\MTlettershape{\itdefault}\fi % was missing in v 1.14 and prior
-  \edef\mst at tmp{#1}
-  \ifx\mst at tmp\empty\else\MTlettershape{#1}\fi
-  \Mathastext}
-\let\MathastextWillUse\MTWillUse
-\let\Mathastextwilluse\MTWillUse
-\@onlypreamble\MTWillUse
-\@onlypreamble\MathastextWillUse
-\@onlypreamble\Mathastextwilluse
-%    \end{macrocode}
-% \end{macro}
-%  \begin{macro}{\Mathastext}
-%    The command \cs{Mathastext} can be used anywhere in the
-%    preamble and any number of time, the last one is the
-%    one that counts.
-%
-%    In version |1.1| we have two fonts: they only differ in
-%    shape. The |mtletterfont| is for letters, and the
-%    |mtoperatorfont| for digits and log-like operator
-%    names. The default is that both are upright.
-%
-%    Starting with version |1.12|, an optional argument makes
-%    \cs{Mathastext} act as the declaration of a math
-%    version, to be later used in the document.
-%
-%    Versions |1.15x| brought some adaptations related to the subdued
-%    option.
-%
-%    |1.3c| adds a second optional parameter to inherit previous settings
-%    from another version; mostly done to inherit the bold version fonts for
-%    symbols and large symbols. This is done in |\MTDeclareVersion|.
-%
-%    |1.3j| moves the code related to \cs{MTicinmath} from \cs{Mathastext@} to
-%    \cs{AtBeginDocument} (code depending on whether |subdued| option in use).
-%    But we omit for this from \cs{MTicinmath} the \cs{MTmathactiveletters}
-%    and issue the latter during loading of package, hence allowing
-%    \cs{MTmathstandardletters} to be effective in the preamble.
-%
-%    I forgot to document that under |subdued| option the \cs{Mathastext}
-%    command without optional parameter does not any |\SetSymbolFont| etc...
-%    has a few other taks to complete nevertheless.
-%    \begin{macrocode}
-\def\Mathastext {\@ifnextchar [\Mathastext at declare\Mathastext@ }
-\def\Mathastext at declare [#1]{%
-  \edef\mst at tmp{#1}%
-  \ifx\mst at tmp\empty
-       \expandafter\@firstoftwo
-  \else\expandafter\@secondoftwo
-  \fi
-  \Mathastext@
-  {\MTDeclareVersion[\mst at ltsh]{#1}{\mst at enc}{\mst at fam}{\mst at ser}{\mst at opsh}}%
-}
-\def\Mathastext@ {%
-  \mst at update@greeksh 
-  \edef\mst at encoding@normal{\mst at enc}%
-  \edef\mst at family@normal{\mst at fam}%
-  \edef\mst at series@normal{\mst at ser}%
-  \edef\mst at shape@normal{\mst at opsh}%
-  \edef\mst at ltshape@normal{\mst at ltsh}%
-  \edef\mst at itdefault@normal{\itdefault}%
-  \edef\mst at rmdefault@normal{\rmdefault}%
-  \edef\mst at sfdefault@normal{\sfdefault}%
-  \edef\mst at ttdefault@normal{\ttdefault}%
-  \edef\mst at boldvariant@normal{\mst at bold}%
-  \edef\mst at exists@skip at normal{\mst at exists@skip}%
-  \edef\mst at forall@skip at normal{\mst at forall@skip}%
-  \edef\mst at prime@skip at normal{\mst at prime@skip}%
-  \edef\mst at encoding@bold{\mst at enc}%
-  \edef\mst at family@bold{\mst at fam}%
-  \edef\mst at series@bold{\mst at bold}%
-  \edef\mst at shape@bold{\mst at opsh}%
-  \edef\mst at ltshape@bold{\mst at ltsh}%
-  \edef\mst at boldvariant@bold{\mst at bold}%
-  \edef\mst at itdefault@bold{\itdefault}%
-  \edef\mst at rmdefault@bold{\rmdefault}%
-  \edef\mst at sfdefault@bold{\sfdefault}%
-  \edef\mst at ttdefault@bold{\ttdefault}%
-  \edef\mst at exists@skip at bold{\mst at exists@skip}%
-  \edef\mst at forall@skip at bold{\mst at forall@skip}%
-  \edef\mst at prime@skip at bold{\mst at prime@skip}%
-  \ifmst at subdued
-%    \end{macrocode}
-% Since |1.3j| this branch is actually almost superfluous, as entering
-% |normal| or |bold| with \cs{MTversion} does \cs{MTnormalexists},
-% \cs{MTnormalforall}, and \cs{MTnormalprime}. But some default values are
-% needed if the user insists on issuing \cs{MTexistsdoesskip}, etc...
-% nevertheless.
-%    \begin{macrocode}
-    \def\mst at exists@skip at normal{0mu}%
-    \def\mst at forall@skip at normal{0mu}%
-    \def\mst at prime@skip at normal{0mu}%
-    \def\mst at exists@skip at bold{0mu}%
-    \def\mst at forall@skip at bold{0mu}%
-    \def\mst at prime@skip at bold{0mu}%
-  \else % not subdued
-    \ifmst at italic
-      \ifmst at frenchmath
-        \mst at exists@muskip\mst at exists@skip\relax
-        \mst at forall@muskip\mst at forall@skip\relax
-        \mst at prime@muskip\mst at prime@skip\relax
-      \else
-       \def\mst at exists@skip at normal{0mu}%
-       \def\mst at forall@skip at normal{0mu}%
-       \def\mst at prime@skip at normal{0mu}%
-       \def\mst at exists@skip at bold{0mu}%
-       \def\mst at forall@skip at bold{0mu}%
-       \def\mst at prime@skip at bold{0mu}%
-      \fi
-    \else
-        \mst at exists@muskip\mst at exists@skip\relax
-        \mst at forall@muskip\mst at forall@skip\relax
-        \mst at prime@muskip\mst at prime@skip\relax
-    \fi
-  \fi
-%% v1.15f 
-  \ifmst at nonormalbold\else
-   \SetMathAlphabet{\mathnormalbold}{normal}{\mst at encoding@normal}%
-                                 {\mst at family@normal}%
-                                 {\mst at boldvariant@normal}%
-                                 {\mst at ltshape@normal}%
-   \SetMathAlphabet{\mathnormalbold}{bold}{\mst at encoding@bold}%
-                                 {\mst at family@bold}%
-                                 {\mst at boldvariant@bold}%
-                                 {\mst at ltshape@bold}%
-  \fi
-%% v1.15f adds \ifmst at default.. checks
-  \ifmst at subdued\else
-   \SetSymbolFont{mtletterfont}{normal}{\mst at encoding@normal}%
-                                       {\mst at family@normal}%
-                                       {\mst at series@normal}%
-                                       {\mst at ltshape@normal}%
-   \SetSymbolFont{mtletterfont}{bold}  {\mst at encoding@bold}%
-                                       {\mst at family@bold}%
-                                       {\mst at series@bold}%
-                                       {\mst at ltshape@bold}%
-   \SetSymbolFont{mtoperatorfont}{normal}{\mst at encoding@normal}%
-                                       {\mst at family@normal}%
-                                       {\mst at series@normal}%
-                                       {\mst at shape@normal}%
-   \SetSymbolFont{mtoperatorfont}{bold} {\mst at encoding@bold}%
-                                       {\mst at family@bold}%
-                                       {\mst at series@bold}%
-                                       {\mst at shape@bold}%
-   \ifmst at defaultbf\else
-    \SetMathAlphabet{\Mathbf}{normal}{\mst at encoding@normal}%
-                                 {\mst at family@normal}%
-                                 {\mst at series@bold}%
-                                 {\mst at shape@normal}%
-    \SetMathAlphabet{\Mathbf}{bold}{\mst at encoding@bold}%
-                                 {\mst at family@bold}%
-                                 {\mst at series@bold}%
-                                 {\mst at shape@bold}%
-   \fi
-   \ifmst at defaultit\else
-    \SetMathAlphabet{\Mathit}{normal}{\mst at encoding@normal}%
-                                 {\mst at family@normal}%
-                                 {\mst at series@normal}%
-                                 {\mst at itdefault@normal}%
-    \SetMathAlphabet{\Mathit}{bold}{\mst at encoding@bold}%
-                                 {\mst at family@bold}%
-                                 {\mst at series@bold}%
-                                 {\mst at itdefault@bold}%
-   \fi
-   \ifmst at defaultsf\else
-    \SetMathAlphabet{\Mathsf}{normal}{\mst at encoding@normal}%
-                                 {\mst at sfdefault@normal}%
-                                 {\mst at series@normal}%
-                                 {\mst at shape@normal}%
-    \SetMathAlphabet{\Mathsf}{bold}{\mst at encoding@bold}%
-                                 {\mst at sfdefault@bold}%
-                                 {\mst at series@bold}%
-                                 {\mst at shape@bold}%
-   \fi
-   \ifmst at defaulttt\else
-    \SetMathAlphabet{\Mathtt}{normal}{\mst at encoding@normal}%
-                                 {\mst at ttdefault@normal}%
-                                 {\mst at series@normal}%
-                                 {\mst at shape@normal}%
-    \SetMathAlphabet{\Mathtt}{bold}{\mst at encoding@bold}%
-                                 {\mst at ttdefault@bold}%
-                                 {\mst at series@bold}%
-                                 {\mst at shape@bold}%
-   \fi
-  \fi % de \ifmst at subdued
-%    \end{macrocode}
-% \begin{macro}{\MathEulerBold}
-%   |1.14c|: We reset |mteulervm| and \cs{MathEulerBold} here as the
-%   variant for bold may have been changed by the user via
-%   \cs{Mathastextboldvariant}|{m}|; and we should keep this local to
-%   math versions.
-%    \begin{macrocode}
-  \ifmst at needeuler
-    \SetSymbolFont{mteulervm}{bold}{U}{zeur}{\mst at boldvariant@normal}{n}%
-    \SetMathAlphabet{\MathEulerBold}{normal}%
-               {U}{zeur}{\mst at boldvariant@normal}{n}%
-    \SetMathAlphabet{\MathEulerBold}{bold}%
-               {U}{zeur}{\mst at boldvariant@normal}{n}%
-  \fi
-%    \end{macrocode}
-% \end{macro}
-%    \begin{macrocode}
-  \ifmst at needsymbol\SetSymbolFont{mtpsymbol}{bold}%
-                     {U}{psy}{\mst at boldvariant@normal}{n}%
-  \fi
-%    \end{macrocode}
-% \begin{macro}{LGRgreek*}
-% \begin{macro}{selfGreek*}
-% LGRgreek, LGRgreeks, selfGreek, and selfGreeks options.
-%    \begin{macrocode}
-  \ifmst at subdued\else 
-   \ifmst at LGRgreek
-    \SetSymbolFont{mtlgrfontlower}{normal}{LGR}%
-            {\mst at greekfont}{\mst at series@normal}{\mst at greek@lsh}%
-    \SetSymbolFont{mtlgrfontlower}{bold}{LGR}%
-            {\mst at greekfont}{\mst at boldvariant@normal}{\mst at greek@lsh}%
-    \SetSymbolFont{mtlgrfontupper}{normal}{LGR}%
-            {\mst at greekfont}{\mst at series@normal}{\mst at greek@ush}%
-    \SetSymbolFont{mtlgrfontupper}{bold}{LGR}%
-            {\mst at greekfont}{\mst at boldvariant@bold}{\mst at greek@ush}%
-   \else
-    \ifmst at selfGreek
-     \SetSymbolFont{mtselfGreekfont}{normal}{OT1}%
-            {\mst at greekfont}{\mst at series@normal}{\mst at greek@ush}%
-     \SetSymbolFont{mtselfGreekfont}{bold}{OT1}%
-            {\mst at greekfont}{\mst at boldvariant@bold}{\mst at greek@ush}%
-    \fi
-   \fi
-  \fi
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%    \begin{macrocode}
-  \ifmst at subdued
-   \typeout{** subdued mode will be activated for the normal and bold math versions}%
-  \else 
-   \typeout{** Latin letters in the normal (resp. bold) math versions are now^^J%
-            ** set up to use the fonts 
-   \mst at encoding@normal/\mst at family@normal/\mst at series@normal%
-               (\mst at boldvariant@normal)/\mst at ltshape@normal}%
-   \ifmst at LGRgreek\typeout{** Greek letters (\mst at greek@lsh/\mst at greek@ush) 
-                              will use LGR/\mst at greekfont}%
-   \fi
-   \ifmst at nodigits\else
-     \typeout{** Other characters (digits, ...) and \protect\log-like names will be^^J%
-              ** typeset with the \mst at shape@normal\space shape.}%
-   \fi
-  \fi
-}
-\let\mathastext\Mathastext
-\@onlypreamble\Mathastext
-\@onlypreamble\mathastext
-%    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MTDeclareVersion}
-%   The \cs{MTDeclareVersion} command is to be used in the preamble
-%   to declare a math version. A more complicated variant would also
-%   specify a choice of series for the Euler and Symbol font: anyhow
-%   Symbol only has the medium series, and Euler has medium and bold,
-%   so what is lacking is the possibility to create a version with a
-%   bold Euler. There is already one such version: the default |bold|
-%   one. And there is always the possibility to add to the preamble
-%   \cs{SetSymbolFont}|{mteulervm}||{versionname}||{U}{zeur}{bx}{n}| if
-%   one wants to have a math version with bold Euler characters.
-%
-%   For version |1.1| we add an optional parameter specifying the shape
-%   to be used for letters.
-%
-%   Note: (|2012/10/24|) I really should check whether the user attempts to
-%   redefine the `normal' and `bold' versions and issue a warning in
-%   that case!
-%
-%   |1.3c| (|2013/12/14|) adds an extra optional parameter after all
-%   previous ones, to inherit the settings from another version. Typically
-%   to be used with [bold]. I take this opportunity to sanitize a bit some
-%   line endings to avoid generating (in the preamble, document macros were
-%   already careful of course) too many space
-%   tokens, at least inside macros. And I modifiy (correct? perhaps it was on
-%   purpose) the strange way I used |\@onlypreamble| in earlier version.
-%    \begin{macrocode}
-\newcommand*\MTDeclareVersion[6][]{%
-  \def\mst at declareversionargs{{#1}{#2}{#3}{#4}{#5}{#6}}%
-  \edef\mst at version{#2}%
-  \DeclareMathVersion{\mst at version}%
-  \MTDeclareVersion@
-}
-\newcommand*\MTDeclareVersion@[1][]{%
-    \edef\mst at tmp{#1}%
-    \ifx\mst at tmp\empty\else
-      \global\expandafter\let\csname mv@\mst at version\expandafter\endcsname
-                             \csname mv@#1\endcsname
-      \typeout{** Math version `\mst at version\string' inherits from `#1\string'.}%
-    \fi
-    \expandafter\MTDeclareVersion@@\mst at declareversionargs
-}
-\newcommand*\MTDeclareVersion@@[6]{%
-  \edef\mst at tmp{#1}%
-  \expandafter\edef\csname mst at encoding@\mst at version\endcsname{#3}%
-  \expandafter\edef\csname mst at family@\mst at version\endcsname{#4}%
-  \expandafter\edef\csname mst at series@\mst at version\endcsname{#5}%
-  \expandafter\edef\csname mst at shape@\mst at version\endcsname{#6}%
-  \expandafter\edef\csname mst at boldvariant@\mst at version\endcsname{\mst at bold}%
-  \expandafter\edef\csname mst at itdefault@\mst at version\endcsname{\itdefault}%
-  \expandafter\edef\csname mst at rmdefault@\mst at version\endcsname{\rmdefault}%
-  \expandafter\edef\csname mst at sfdefault@\mst at version\endcsname{\sfdefault}%
-  \expandafter\edef\csname mst at ttdefault@\mst at version\endcsname{\ttdefault}%
-  \expandafter\edef\csname mst at exists@skip@\mst at version\endcsname
-        {\mst at exists@skip}%
-  \expandafter\edef\csname mst at forall@skip@\mst at version\endcsname
-        {\mst at forall@skip}%
-  \expandafter\edef\csname mst at prime@skip@\mst at version\endcsname
-        {\mst at prime@skip}%
-  \ifx\mst at tmp\empty
-    \ifmst at italic
-      \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{\mst at ltsh}%
-      \typeout{** Latin letters in math version `#2\string' will use the font
-                  #3/#4/#5/\mst at ltsh^^J%    
-               ** Other characters (digits, ...) and \protect\log-like names 
-                    will be in #6 shape.}%
-      \expandafter\edef\csname mst at ltshape@\mst at version\endcsname{\mst at ltsh}%
-    \else
-      \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#6}%
-       \typeout{** Latin letters in math version `#2\string' will use the fonts
-                   #3/#4/#5(\mst at bold)/#6}%
-      \expandafter\edef\csname mst at ltshape@\mst at version\endcsname{#6}%
-    \fi
-  \else
-    \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#1}%
-    \typeout{** Latin letters in math version `#2\string' will use the font
-                #3/#4/#5/#1^^J%
-             ** Other characters (digits, ...) and \protect\log-like
-                names will be in #6 shape.}%
-      \expandafter\edef\csname mst at ltshape@\mst at version\endcsname{#1}%
-  \fi
-  \ifmst at nonormalbold\else
-       \SetMathAlphabet{\mathnormalbold}{#2}{#3}{#4}{\mst at bold}%
-                   {\csname mst at ltshape@\mst at version\endcsname}%
-  \fi
-  \SetSymbolFont{mtoperatorfont}{#2}{#3}{#4}{#5}{#6}%
-  \ifmst at defaultbf\else\SetMathAlphabet{\Mathbf}{#2}{#3}{#4}{\mst at bold}{#6}\fi
-  \ifmst at defaultit\else\SetMathAlphabet{\Mathit}{#2}{#3}{#4}{#5}{\itdefault}\fi
-  \ifmst at defaultsf\else\SetMathAlphabet{\Mathsf}{#2}{#3}{\sfdefault}{#5}{#6}\fi
-  \ifmst at defaulttt\else\SetMathAlphabet{\Mathtt}{#2}{#3}{\ttdefault}{#5}{#6}\fi
-  \ifmst at needeuler
-      \SetMathAlphabet{\MathEulerBold}{#2}{U}{zeur}{\mst at bold}{n}%
-  \fi
-%    \end{macrocode}
-% \begin{macro}{LGRgreeks}
-% \begin{macro}{selfGreeks}
-%   In the case of option LGRgreeks (selfGreeks), it is expected that
-%   the fonts used in each math versions exist in LGR (OT1) encoding. We
-%   first recalculate the shapes to be used for lowercase and uppercase
-%   Greek letters depending on the frenchmath and [it/up][g/G]reek
-%   options as well as on the (local to this version) shapes for letters
-%   and digits.
-%    \begin{macrocode}
-  \def\mst at greek@lsh at loc{\csname mst at ltshape@\mst at version\endcsname}%
-  \def\mst at greek@ush at loc{\csname mst at shape@\mst at version\endcsname}%
-  \ifmst at itgreek\def\mst at greek@lsh at loc{\itdefault}%
-                     \def\mst at greek@ush at loc{\itdefault}\fi
-  \ifmst at upgreek\def\mst at greek@lsh at loc{\updefault}%
-                     \def\mst at greek@ush at loc{\updefault}\fi
-  \ifmst at frenchmath
-      \ifmst at itgreek\else
-      \ifmst at upgreek\else
-        \def\mst at greek@lsh at loc{\csname mst at shape@\mst at version\endcsname}%
-        \def\mst at greek@ush at loc{\csname mst at shape@\mst at version\endcsname}%
-      \fi\fi
-  \fi
-  \ifcase\mst at greek@select
-        \or\def\mst at greek@ush at loc{\itdefault}%
-        \or\def\mst at greek@ush at loc{\updefault}%
-  \fi
-  \ifmst at LGRgreeks
-      \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{#4}{#5}{\mst at greek@lsh at loc}%
-      \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{#4}{#5}{\mst at greek@ush at loc}%
-    \typeout{** Greek letters (\mst at greek@lsh at loc/\mst at greek@ush at loc) will use
-                LGR font #4\ifmst at subdued ^^J** (in non subdued versions)\fi}%
-  \else
-   \ifmst at selfGreeks
-      \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{#4}{#5}{\mst at greek@ush at loc}%
-     \typeout{** Capital Greek letters (\mst at greek@lsh at loc/\mst at greek@ush at loc)
-                 will use OT1 font #4\ifmst at subdued ^^J** (in non subdued versions)\fi}%
-   \else
-    \ifmst at LGRgreek 
-      \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{\mst at greekfont}{#5}{\mst at greek@lsh at loc}%
-      \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{\mst at greekfont}{#5}{\mst at greek@ush at loc}%
-    \typeout{** Greek letters (\mst at greek@lsh at loc/\mst at greek@ush at loc) will use
-                LGR font \mst at greekfont\ifmst at subdued ^^J** (in non subdued versions)\fi}%
-    \else
-     \ifmst at selfGreek
-       \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{\mst at greekfont}{#5}{\mst at greek@ush at loc}%
-       \typeout{** Capital Greek letters (\mst at greek@lsh at loc/\mst at greek@ush at loc)
-                   will use OT1 font \mst at greekfont\ifmst at subdued ^^J** (in non subdued versions)\fi}%
-     \fi
-    \fi
-   \fi
-  \fi
-}
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%    \begin{macrocode}
-\let\MathastextDeclareVersion\MTDeclareVersion
-\@onlypreamble\MTDeclareVersion
-\@onlypreamble\MathastextDeclareVersion
-%    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MTversion}
-% \begin{macro}{\MTversion@}
-% \begin{macro}{\MTversion at s}
-% \begin{macro}{\MTversion@@}
-%   This is a wrapper around \LaTeX{}'s \cs{mathversion}: here we have an
-%   optional argument allowing a quick and easy change of the text fonts
-%   additionally to the math fonts. Present already in the initial
-%   version of the package (January 2011.)
-%  
-%   |1.15|: some modifications for the subdued option vs LGRgreek and
-%   for the math muskips after \cs{exists} and \cs{forall}.
-%
-%   |1.2|: with the subdued option sets the math alphabets in the
-%   normal and bold math versions do not apply to operator
-%   names and non-alphabetical symbols. The switch for braces
-%   is left as it is.
-%
-%   |1.2b|: with the subdued option, the italic corrections are not added.
-%   Else, we check the shape of letters in this version. Also, there was a bug
-%   since |1.15|: the values of the math skips were taken not from the
-%   settings for the math version (\#2) but from those of the optional argument
-%   (\#1), if present...
-%
-%   |1.3|: activation of italic corrections is now separated from actual math
-%   activation of letters.
-%
-%   |1.3c|: a starred variant is added which does not modify the text fonts,
-%   only the math set-tup.
-%
-%   |1.3d|: replaced in |\MTversion@| things like |\edef\mst at encoding{...}| and
-%   |\renewcommand{\encodingdefault}{\mst@@encoding}| by
-%   |\edef\encodingdefault{...}| etc\dots All those |\mst@@...| things were
-%   useless. I also redefine |\seriesdefault| rather than |\mddefault|.
-%
-%   |1.3d|: mechanism of restoration of Greek in subdued normal and bold
-%   versions has been to all cases, and not only for the |LGRgreek| option.
-%    \begin{macrocode}
-\newcommand*\MTversion {\@ifstar\MTversion at s\MTversion@ }
-\newcommand*\MTversion at s [1]{\mathversion{#1}\MTversion@@ {#1}}
-\newcommand*\MTversion@ [2][]{%
-    \mathversion{#2}%
-    \edef\mst at tmpa{#1}%
-    \ifx\mst at tmpa\empty
-        \edef\mst at tmp{#2}%
-    \else
-        \let\mst at tmp\mst at tmpa
-    \fi
-    \edef\encodingdefault {\csname mst at encoding@\mst at tmp\endcsname}%
-    \edef\familydefault   {\csname mst at family@\mst at tmp\endcsname}%
-    \edef\seriesdefault   {\csname mst at series@\mst at tmp\endcsname}%        
-    \edef\shapedefault    {\csname mst at shape@\mst at tmp\endcsname}%
-    \edef\bfdefault {\csname mst at boldvariant@\mst at tmp\endcsname}%
-    \edef\itdefault {\csname mst at itdefault@\mst at tmp\endcsname}%
-    \edef\rmdefault {\csname mst at rmdefault@\mst at tmp\endcsname}%
-    \edef\sfdefault {\csname mst at sfdefault@\mst at tmp\endcsname}%
-    \edef\ttdefault {\csname mst at ttdefault@\mst at tmp\endcsname}%
-    \usefont{\encodingdefault}{\familydefault}{\seriesdefault}{\shapedefault}%
-    \MTversion@@ {#2}%
-}
-%    \end{macrocode}
-%   |1.3j| has a stronger subdued which does \cs{MTnormalprime},
-%   \cs{MTnormalexists}, \cs{MTnormalforall} rather than setting the skips to
-%   |0mu|. Hence \cs{MTversion} by default should do \cs{MTprimedoesskip},
-%   \cs{MTexistsdoesskip}, \cs{MTforalldoesskip}.
-%    \begin{macrocode}
-\newcommand*\MTversion@@ [1]{%
-    \MTexistsdoesskip
-    \MTforalldoesskip
-    \MTprimedoesskip
-    \edef\mst at tmp{#1}%
-%    \end{macrocode}
-% |v1.15e|: muskips.
-%    \begin{macrocode}
-    \expandafter
-     \mst at exists@muskip\csname mst at exists@skip@\mst at tmp\endcsname\relax
-    \expandafter
-     \mst at forall@muskip\csname mst at forall@skip@\mst at tmp\endcsname\relax
-%    \end{macrocode}
-% |v1.2|: muskip for \cs{prime}.
-%    \begin{macrocode}
-    \expandafter
-     \mst at prime@muskip\csname mst at prime@skip@\mst at tmp\endcsname\relax
-%    \end{macrocode}
-% |v1.2b|: italic corrections except for italic/slanted (sic) letters, and of
-% course except in the subdued normal and bold math versions.
-%
-% |v1.3|: by default, letters are made mathematically active, even if italic
-% corrections are not used, to allow the action of \cs{MTsetmathskips}.
-%    \begin{macrocode}
-    \edef\mst at tmpa{\csname mst at ltshape@\mst at tmp\endcsname}%
-    \edef\mst at tmpb{\csname mst at shape@\mst at tmp\endcsname}%
-%    \end{macrocode}
-% |v1.15c|: extending subdued to LGRgreek.
-%
-% |v1.15f|: subdueing math alphabets in a simpler way than in |1.15e|.
-%
-% |v1.2b|: subdueing the activation of characters in math mode.
-%
-% |v1.2d|: special treatment of the asterisk.
-%
-% |v1.3d|: extended LGRgreek mechanism of activation/restoration of Greek to all
-% cases.
-%
-% |v1.3j|: use of \cs{MTeverymathdefault}, which includes \cs{MTicinmath}, but
-% must be corrected then according to shape of letters and presence or absence
-% of option |frenchmath|. We do only |\def\mst at ITcorr{\ifnum\fam=\m at ne\/\fi}|
-% and not \cs{MTICinmath} to not overwrite some user-defined
-% \cs{MTeverymathdefault}. Code for italic corrections or not according to
-% letter shape is executed after \cs{MTeverymathdefault} which limits a bit
-% user customizing possibilities, but if I moved it later, I would possibly
-% have to put inside the \cs{MTicinmath} the check for |it| ot |sl|. Similary
-% the \cs{MTcustomgreek} always executed (if not |subdued|).
-%    \begin{macrocode}
-    \MTmathoperatorsobeymathxx
-    \MTeverymathdefault
-    \MTcustomizenewmcodes       
-    \@for\mst at tmpc:=it,sl\do{\ifx\mst at tmpc\mst at tmpa\MTnoicinmath\fi}%
-    \ifmst at frenchmath
-      \def\mst at ITcorr{\ifnum\fam=\m at ne\/\fi}%
-      \@for\mst at tmpc:=it,sl\do{\ifx\mst at tmpc\mst at tmpb\MTnoICinmath\fi}%
-    \fi
-%    \end{macrocode}
-% |1.3j| has a stronger subdued which does \cs{MTnormalprime},
-% \cs{MTnormalexists}, \cs{MTnormalforall} rather than simply setting the
-% skips to |0mu|. Note: \cs{MTnormalprime} is done as part of
-% \cs{MTeverymathoff}. 
-%    \begin{macrocode}
-    \ifmst at subdued
-      \def\mst at tmpa{normal}%
-      \ifx\mst at tmp\mst at tmpa
-        \mst at restorealphabets
-        \MTstandardgreek
-        \MTmathoperatorsdonotobeymathxx
-        \MTnormalexists
-        \MTnormalforall
-        \MTeverymathoff
-        \MTresetnewmcodes
-%    \end{macrocode}
-% |1.3t| adds better compatibility with |subdued| mode for
-% |\imath/\jmath| and perfect compatibility for the minus sign.
-%    \begin{macrocode}
-        \let\inodot\mst at imath
-        \let\jnodot\mst at jmath
-        \mst at subduedminus
-      \else
-        \def\mst at tmpa{bold}%
-        \ifx\mst at tmp\mst at tmpa
-          \mst at restorealphabets
-          \MTstandardgreek
-          \MTmathoperatorsdonotobeymathxx
-          \MTnormalexists
-          \MTnormalforall
-          \MTeverymathoff
-          \MTresetnewmcodes
-          \let\inodot\mst at imath
-          \let\jnodot\mst at jmath
-          \mst at subduedminus
-        \else
-          \mst at setalphabets
-          \MTcustomgreek
-          \let\inodot\mst at inodot
-          \let\jnodot\mst at jnodot
-          \mst at nonsubduedminus
-        \fi
-      \fi
-    \else
-      \MTcustomgreek % new with 1.3d
-    \fi
-}
-\let\MathastextVersion\MTversion
-\let\Mathastextversion\MTversion
-\let\MTVersion\MTversion
-\let\mathastextversion\MTversion
-%    \end{macrocode}
-% \end{macro}\end{macro}\end{macro}\end{macro}
-% \begin{macro}{\Mathastext}
-% Initialization call:
-%    \begin{macrocode}
-\Mathastext
-%    \end{macrocode}
-% \end{macro}
-% Additional appropriate messages to the terminal and the log.
-%    \begin{macrocode}
-\ifmst at eulergreek
-      \typeout{** Greek letters will use the Euler font. Use \protect\MathastextEulerScale{<factor>} to scale the
-               font.}%
-      \ifmst at subdued{\typeout{** (subdued mode: normal and bold math
-          version with default Greek letters.)}}\fi
-\else
-\ifmst at symbolgreek
-       \typeout{** Greek letters will use the PostScript Symbol font. Use^^J%
-                ** \protect\MathastextSymbolScale{<factor>} to scale the font.}%
-      \ifmst at subdued{\typeout{** (subdued mode: normal and bold math
-          version with default Greek letters.)}}\fi
-\fi\fi
-%    \end{macrocode}
 % At (long...) last we now change the font for the letters of the
 % latin alphabet. In version |1.1|, Latin letters have their own font
 % (shape).
@@ -6504,7 +5805,6 @@
 \@tfor\mst at tmp:=ABCDEFGHIJKLMNOPQRSTUVWXYZ\do
      {\expandafter\mst at DeclareMathLetter\mst at tmp}%
 \let\mst at DeclareMathLetter\relax
-%%
 \ifmst at nodigits\else
 \def\mst at font@tbu{mtoperatorfont}%
 %    \end{macrocode}
@@ -6725,149 +6025,110 @@
 % change. This means also that |\MTversion| and not |\mathversion|
 % must be used for good functioning.
 %    \begin{macrocode}
-\def\mst at dothe@endashstuff{\edef\mst at tmp@enc{\encodingdefault}
-\if1\mst at OneifUniEnc
-  \AtBeginDocument{% Unicode engines and font
-    \mst at Umathcode`\-=2 \symmtoperatorfont "\mst at unicodeminus\relax
-    \mst at Umathchardef\mst at varfam@minus=7 \symmtoperatorfont "\mst at unicodeminus\relax
-  }
-\else
-\ifx\mst at tmp@enc\mst at ti % T1
-   \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{21}
-   \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}{21}
-\else
-\ifx\mst at tmp@enc\mst at oti % OT1
-   \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{123}
-   \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}{123}
-\else
-\ifx\mst at tmp@enc\mst at lyi % LY1
-   \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{150}
-   \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}{150}
-\else % make sure we have neither xetex nor luatex
- \ifmst at XeOrLua\mst at aborttrue
- \else
-   \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
-{\expandafter\the\expandafter\csname\mst at tmp@enc\string\textendash\endcsname}
-   \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}
-{\expandafter\the\expandafter\csname\mst at tmp@enc\string\textendash\endcsname}
- \fi
-\fi\fi\fi\fi}
-\def\mst at dothe@emdashstuff{\edef\mst at tmp@enc{\encodingdefault}
-\if1\mst at OneifUniEnc
-  \AtBeginDocument{% Unicode engine and font
-    \mst at Umathcode`\-=2 \symmtoperatorfont "2014\relax
-    \mst at Umathchardef\mst at varfam@minus=7 \symmtoperatorfont "2014\relax
-  }
-\else
-\ifx\mst at tmp@enc\mst at ti % T1
-   \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{22}
-   \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}{22}
-\else
-\ifx\mst at tmp@enc\mst at oti % OT1
-   \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{124}
-   \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}{124}
-\else
-\ifx\mst at tmp@enc\mst at lyi % LY1
-   \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{151}
-   \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}{151}
-\else % make sure we have neither xetex nor luatex
- \ifmst at XeOrLua\mst at aborttrue
- \else
-   \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
-{\expandafter\the\expandafter\csname\mst at tmp@enc\string\textemdash\endcsname}
-   \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}
-{\expandafter\the\expandafter\csname\mst at tmp@enc\string\textemdash\endcsname}
- \fi
-\fi\fi\fi\fi}
 \let\mst at subduedminus\empty
 \let\mst at nonsubduedminus\empty
-\ifmst at nominus\else\typeout{** minus as endash}
-  \edef\mst at tmp@enc{\encodingdefault}
-  \ifmst at XeOrLua
-    \if1\mst at OneifUniEnc\expandafter\AtBeginDocument
-          \else\expandafter\@firstofone
-    \fi
-    {\edef\mst at subduedminus
-       {\mst at Umathcodenum`\noexpand\-=\the\mst at Umathcodenum`\-\relax}}%
+\def\mst at dothe@endashstuff#1#2#3{%
+  \edef\mst at tmp@enc{#3}%
+  \if1\mst at OneifUniEnc
+    \mst at Umathchardef#1=2 \symmtoperatorfont "\mst at unicodeminus\relax
+    \mst at Umathchardef#2=7 \symmtoperatorfont "\mst at unicodeminus\relax
   \else
-    \edef\mst at subduedminus{\mathcode`\noexpand\-=\the\mathcode`\-\relax}%
-  \fi
-  \mst at abortfalse
-  \ifmst at endash\mst at dothe@endashstuff\else
-  \ifmst at emdash\mst at dothe@emdashstuff\else
-     \if1\mst at OneifUniEnc\expandafter\AtBeginDocument
-         \else\expandafter\@firstofone
-     \fi
-     {\DeclareMathSymbol{-}{\mathbin}{\mst at font@tbu}{"2D}%
-      \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{\mst at font@tbu}{"2D}}%
-  \fi\fi
-  \ifmst at abort
-    \DeclareMathSymbol{-}{\mathbin}{\mst at font@tbu}{"2D}
-    \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{\mst at font@tbu}{"2D}
-  \fi
+    \DeclareMathSymbol{#1}{\mathbin}{mtoperatorfont}
+                      {\csname\mst at tmp@enc\string\textendash\endcsname}
+    \DeclareMathSymbol{#2}{\mathalpha}{mtoperatorfont}
+                      {\csname\mst at tmp@enc\string\textendash\endcsname}
+  \fi}% mst at dothe@endashstuff
+\def\mst at dothe@emdashstuff#1#2#3{%
+  \edef\mst at tmp@enc{#3}%
+  \if1\mst at OneifUniEnc
+    \mst at Umathchardef#1=2 \symmtoperatorfont "2014\relax
+    \mst at Umathchardef#2=7 \symmtoperatorfont "2014\relax
+  \else
+    \DeclareMathSymbol{#1}{\mathbin}{mtoperatorfont}
+                      {\csname\mst at tmp@enc\string\textemdash\endcsname}
+    \DeclareMathSymbol{#2}{\mathalpha}{mtoperatorfont}
+                      {\csname\mst at tmp@enc\string\textemdash\endcsname}
+  \fi}% mst at dothe@emdashstuff
+\def\mst at dothe@hyphenstuff#1#2{%
+  \DeclareMathSymbol{#1}{\mathbin}{\mst at font@tbu}{"2D}%
+  \DeclareMathSymbol{#2}{\mathalpha}{\mst at font@tbu}{"2D}%
+}%
+\def\mst at varfam@minus{\@nameuse{mst at varfam@minus at mv\math at version}}%
+\ifmst at nominus\else
   \expandafter\mst at addtodo@nonletters\string-\mathbin\mst at varfam@minus
-  \ifmst at XeOrLua
-     \if1\mst at OneifUniEnc\expandafter\AtBeginDocument
-         \else\expandafter\@firstofone
-     \fi
-     {\edef\mst at nonsubduedminus
-        {\mst at Umathcodenum`\noexpand\-=\the\mst at Umathcodenum`\-\relax}}%
-  \else
-    \edef\mst at nonsubduedminus{\mathcode`\noexpand\-=\the\mathcode`\-\relax}%
-  \fi
+  \def\mst at nonsubduedminus{%
+    \edef\mst at tmp@enc{\csname mst at encoding@\math at version\endcsname}%
+    \if1\mst at OneifUniEnc
+     \mst at Umathcode`\-=\expandafter
+     % Working around a bug (or feature...) of XeTeX/LuaTeX: afaict it is
+     % impossible to use straightforwardly in extended mathcode assignments
+     % a control sequence as created by \Umathchardef.
+     % This is counter-intuitive and breaks expectations.
+                       \mst at UmathchardefWorkAround@i
+                       \csname mst at minus@mv\math at version\endcsname
+                       \relax
+    \else
+     \mathcode`\-=\@nameuse{mst at minus@mv\math at version}% self-delimiting
+    \fi
+   }% \mst at nonsubduedminus
 \fi
+\def\mst at UmathchardefWorkAround@i
+    {\expandafter\mst at UmathchardefWorkAround@ii\meaning}%
+\def\mst at UmathchardefWorkAround@ii#1"{"}%
 %    \end{macrocode}
 % \end{macro}\end{macro}\end{macro}
-% \begin{macro}{\hbar}
-% \begin{macro}{\mst at ltbar}
-%   |2011/01/31|, |1.1| I decide to settle the question of the |\hbar|. First, the
-%   \LaTeX{} definition
-%    \begin{macrocode}
-%%\def\hbar{{\mathchar'26\mkern-9muh}} % (original definition from latex.ltx)
-%    \end{macrocode}
-% Well, the fact is that there is a \cs{DeclareMathSymbol} in |amsfonts.sty|, so
-% I can not always rely on the original which had the advantage that at least
-% |h| would be in the correct font. But of course not the macron character
-% (|\=|, |\bar|). And there is also the issue of the kern whose length is given
-% in a way which depends on |cmsy| (18mu=1em and em taken from info in |cmsy|).
-% The first problem is that I don't know how to get the slot position of the
-% macron, given the encoding. So I found another way. I will need an |rlap|
-% adapted to math mode, and this is provided by code from
-% Alexander~R.~\textsc{Perlis} in his TugBoat article 22 (2001), 350--352, which
-% I found by googling |rlap|. (as an aside, I am only now (April 2, 2011) aware
-% that the package |mathtools| provides the |mathrlap| etc... )
+% \begin{macro}{\mst at hbar@mvnormal}
+% \begin{macro}{\mst at ltbar@mvnormal}
+%   |2011/01/31|, |1.1| I decide to settle the question of the |\hbar|. The
+%   \LaTeX{} definition is |\def\hbar{{\mathchar'26\mkern-9muh}}|
+%   and its advantage is that |h| is in the correct font. But of course not
+%   the macron character (|\=|, |\bar|). And anyway |amsfonts| uses a
+%   \cs{DeclareMathSymbol}. Also there is the kern whose length depends on
+%   |cmsy| (18mu=1em and em taken from info in |cmsy|).
 %
-% |1.3l| |2016/01/29|: anticipating TL2016 fontspec's switch to |TU|.
+%   I will need an |rlap| adapted to math
+%   mode, and this is provided by code from Alexander~R.~\textsc{Perlis} in
+%   his TugBoat article 22 (2001), 350--352, which I found by googling |rlap|.
+%   (as an aside, I am only now (April 2, 2011) aware that the package
+%   |mathtools| provides the |mathrlap| etc... )
+%
+%   |1.3l 2016/01/29|: anticipating TL2016 fontspec's switch to |TU|.
+%
+%   |1.3u 2019/08/20|: encoding (8bits) agnostic construct for hbar, using same
+%   method as for |mathaccents| option. I should add some way to adjust the
+%   vertical positioning.
+%
+%   On this occasion I replace |h| by |\mst at h| because the mechanism for
+%   before and after skips does not interact well with the rlap construct.
 %    \begin{macrocode}
+\let\mst at subduedhbar\@empty
+\let\mst at nonsubduedhbar\@empty
+\ifmst at nohbar\else
+  \def\mst at subduedhbar{\let\hbar\mst at original@hbar}%
+  \def\mst at nonsubduedhbar{%
+      \expandafter\let\expandafter\hbar
+                  \csname mst at hbar@mv\math at version\endcsname
+  }%
+\fi
 \def\mst at mathrlap{\mathpalette\mst at mathrlapinternal}
 \def\mst at mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}}
-\def\mst at dothe@hbarstuff{\edef\mst at tmp@enc{\encodingdefault}
-\if1\mst at OneifUniEnc
-   % Unicode engine and font
-   \mst at Umathchardef\hbar="7 \symmtletterfont "0127 \relax %% or 210F?
-\else % I must leave open the T1, OT1 possibility also for XeTeX or LuaTeX 
-    \ifx\mst at ti\mst at tmp@enc
-    \DeclareMathAccent{\mst at ltbar}{\mathalpha}{mtletterfont}{9}
-       \else  %% assume OT1. Bad idea? Should not provoke an error anyhow
-    \DeclareMathAccent{\mst at ltbar}{\mathalpha}{mtletterfont}{22}
-    \fi
-    \def\hbar{\mst at mathrlap{\mst at ltbar{\ }}h}
-\fi }
-\ifmst at nohbar\else\typeout{** \string\hbar}\mst at dothe@hbarstuff\fi
+\def\mst at dothe@hbarstuff#1#2#3{%
+  \edef\mst at tmp@enc{#3}%
+  \if1\mst at OneifUniEnc % Unicode engine and font
+    \mst at Umathchardef#1="7 \symmtletterfont "0127 \relax %% or 210F?
+  \else
+    \begingroup
+    \def\@text at composite##1\@text at composite##2{##2}%
+    \let\add at accent\@firstoftwo
+    \DeclareMathAccent{#2}{\mathalpha}{mtletterfont}%
+                      {\csname\mst at tmp@enc\string\=\endcsname{}}%
+    \endgroup
+    \def#1{\mst at mathrlap{#2{\ }}\mst at h}%
+  \fi
+}% end of \mst at dothe@hbarstuff
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
-% As |h| is from |mtletterfont|, the accent \cs{mst at ltbar} is the
-% \cs{bar} accent from that same font. Of course, if the user
-% defines math versions with other encodings than the default one
-% when loading the package this will probably not work there (if I
-% knew how to do for accents what I did for the endash I could do
-% it for all encodings. Surely easy for a \TeX{}pert.)  Not to
-% mention if he/she changes the letter shape... one never should
-% give so much freedom to users ;-) Well this construction gives
-% an acceptable result for some of the fonts I have tested,
-% whether upright or in italics.
-%
 % |1.15d|: Oct 13, 2012. The \cs{mathcode} thing with = is (belatedly,
 % sorry!) made Unicode compatible.
 % \begin{macro}{+,=,\Relbar}
@@ -7596,7 +6857,7 @@
 %
     \let\mst at origpartial\partial
     \let\mst at origwp\wp
-    \let\mst at origell\ell }
+    \let\mst at origell\ell }% \MTrecordstandardgreek
 \MTrecordstandardgreek 
 \renewcommand*{\MTstandardgreek}{%
     \let\Alpha\mst at origAlpha
@@ -7660,7 +6921,7 @@
     \let\partial\mst at origpartial
     \let\wp\mst at origwp
     \let\ell\mst at origell
-}
+}% \MTstandardgreek
 \renewcommand*{\MTcustomgreek}{%
     \let\Alpha\mst at Alpha
     \let\Beta\mst at Beta
@@ -7737,7 +6998,7 @@
       \ifmst at symbolgreek\else\let\ell\mst at ell\fi
     \fi
  \fi
-}
+}% \MTcustomgreek
 \fi
 \let\Mathastextstandardgreek\MTstandardgreek
 \let\Mathastextcustomgreek\MTcustomgreek
@@ -7757,93 +7018,888 @@
 %
 % |1.3t| |2018/08/22| removes the definitions done of |\i| and |\j|
 % since |1.12| (as robust commands usable both in text and math mode).
+%
+% |1.3u| lets the \cs{imath} and \cs{jmath} react to the font encoding at each
+% math version.
 %    \begin{macrocode}
-\edef\mst at tmp@enc{\encodingdefault}
-\mst at goaheadtrue
-\if1\mst at OneifUniEnc
-  % Unicode engine and font
-  \mst at Umathchardef\inodot="7 \symmtletterfont "0131 \relax
-  \mst at Umathchardef\jnodot="7 \symmtletterfont "0237 \relax
-\else 
-\ifx\mst at tmp@enc\mst at ti % T1
-   \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}{25}
-   \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}{26}
-\else
-\ifx\mst at tmp@enc\mst at oti % OT1
-   \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}{16}
-   \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}{17}
-\else
-\ifx\mst at tmp@enc\mst at lyi % LY1
-   \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}{16}
-   \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}{17}
-\else
-   \ifmst at XeOrLua\mst at goaheadfalse\else
-   \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}
-{\expandafter\the\expandafter\csname\mst at tmp@enc\string\i\endcsname}
-   \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}
-{\expandafter\the\expandafter\csname\mst at tmp@enc\string\j\endcsname}
-   \fi
-\fi\fi\fi\fi
-\let\mst at inodot\inodot
-\let\mst at jnodot\jnodot
+\def\mst at subduedinodot{%
+   \let\inodot\mst at original@imath
+   \let\jnodot\mst at original@jmath
+}%
+\def\mst at nonsubduedinodot{%
+   \expandafter\let\expandafter\inodot
+               \csname mst at inodot@mv\math at version\endcsname
+   \expandafter\let\expandafter\jnodot
+               \csname mst at jnodot@mv\math at version\endcsname
+}%
+\def\mst at dothe@inodotstuff#1#2#3{%
+  \edef\mst at tmp@enc{#3}%
+  \if1\mst at OneifUniEnc
+    % Unicode engine and font
+    \mst at Umathchardef#1="7 \symmtletterfont "0131 \relax
+    \mst at Umathchardef#2="7 \symmtletterfont "0237 \relax
+  \else 
+   \DeclareMathSymbol{#1}{\mathalpha}{mtletterfont}
+                     {\csname\mst at tmp@enc\string\i\endcsname}
+   \DeclareMathSymbol{#2}{\mathalpha}{mtletterfont}
+                     {\csname\mst at tmp@enc\string\j\endcsname}
+  \fi}% \mst at dothe@inodotstuff
 \ifmst at defaultimath\else\typeout{** \string\imath\space and \string\jmath\space}
-  \ifmst at goahead
     \AtEndOfPackage{\AtBeginDocument{%
         \renewcommand*{\imath}{\inodot}%
         \renewcommand*{\jmath}{\jnodot}%
     }}%
-  \fi
 \fi
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
 % \begin{macro}{math accents}
+%   \emph{Obsolete comments relative to the 2011 code:}
+%   \begin{quote}
 %   I don't know how to get from the encoding to the slot
 %   positions of the accents (apart from going to look at
 %   all possible encodings definition files and putting this
-%   info here).  In standard \LaTeX{}, the mathaccents are
+%   info here).  In standard \LaTeX{}, the math accents are
 %   taken from the `operators' font. So we do the same
 %   here. Of course there is the problem that the user can
 %   define math versions with different encodings. Here I
 %   take T1 if it was the default at the time of loading the
 %   package, else OT1.
-%   |1.12b|: I add LY1 which is quasi like OT1
+%   |1.12b|: I add LY1 which is quasi like OT1.
+%   \end{quote}
+%
+%   At |1.3u 2019/08/20| I decide to remove the hard-coded slot positions
+%   for OT1, T1 and LY1, and replace them with some hack which assumes
+%   LaTeX2e way of handling text accents got executed by the encoding
+%   definition file. If not, some breakage on package loading could occur, but
+%   this whole thing is conditional on the |mathaccents| option anyway, which
+%   per default is not executed.
+%
+%   The |\vec| accent is not considered here because it has no suitable
+%   available glyph in a standard 8bits text font encodings.
+%
+%   Also at |1.3u| the math accents adapt to the font encoding at each math
+%   version.
 %    \begin{macrocode}
-\edef\mst at tmp@enc{\encodingdefault} %% rather one too many than sorry 
-\ifmst at mathaccents\typeout{** math accents}
-\ifx\mst at ti\mst at tmp@enc
-\DeclareMathAccent{\acute}{\mathalpha}{mtoperatorfont}{1}
-\DeclareMathAccent{\grave}{\mathalpha}{mtoperatorfont}{0}
-\DeclareMathAccent{\ddot}{\mathalpha}{mtoperatorfont}{4}
-\DeclareMathAccent{\tilde}{\mathalpha}{mtoperatorfont}{3}
-\DeclareMathAccent{\bar}{\mathalpha}{mtoperatorfont}{9}
-\DeclareMathAccent{\breve}{\mathalpha}{mtoperatorfont}{8}
-\DeclareMathAccent{\check}{\mathalpha}{mtoperatorfont}{7}
-\DeclareMathAccent{\hat}{\mathalpha}{mtoperatorfont}{2}
-\DeclareMathAccent{\dot}{\mathalpha}{mtoperatorfont}{10}
-\DeclareMathAccent{\mathring}{\mathalpha}{mtoperatorfont}{6}
-\else 
-\DeclareMathAccent{\acute}{\mathalpha}{mtoperatorfont}{19}
-\DeclareMathAccent{\grave}{\mathalpha}{mtoperatorfont}{18}
-\DeclareMathAccent{\ddot}{\mathalpha}{mtoperatorfont}{127}
-\DeclareMathAccent{\tilde}{\mathalpha}{mtoperatorfont}{126}
-\DeclareMathAccent{\bar}{\mathalpha}{mtoperatorfont}{22}
-\DeclareMathAccent{\breve}{\mathalpha}{mtoperatorfont}{21}
-\DeclareMathAccent{\check}{\mathalpha}{mtoperatorfont}{20}
-\DeclareMathAccent{\hat}{\mathalpha}{mtoperatorfont}{94}
-\DeclareMathAccent{\dot}{\mathalpha}{mtoperatorfont}{95}
-\DeclareMathAccent{\mathring}{\mathalpha}{mtoperatorfont}{23}
-  \ifx\mst at lyi\mst at tmp@enc   % LY1 encoding
-    \DeclareMathAccent{\dot}{\mathalpha}{mtoperatorfont}{5}
+\let\mst at subduedmathaccents\@empty
+\let\mst at nonsubduedmathaccents\@empty
+\ifmst at mathaccents
+\def\mst at subduedmathaccents{%
+  \@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
+                 {dot}{ddot}{mathring}{hat}{tilde}%
+  \do
+  {\expandafter\let\csname\@tempa\expandafter\endcsname
+                   \csname mst at original@\@tempa\endcsname}%
+}%
+\def\mst at nonsubduedmathaccents{%
+  \@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
+                 {dot}{ddot}{mathring}{hat}{tilde}%
+  \do
+  {\expandafter\let\csname\@tempa\expandafter\endcsname
+                   \csname mst@\@tempa @mv\math at version\endcsname}%
+}%
+\def\mst at dothe@mathaccentsstuff#1#2{%
+  \begingroup
+  \edef\mst at tmp@enc{#2}%
+  \def\@text at composite##1\@text at composite##2{##2}%
+  \let\add at accent\@firstoftwo
+  \let\add at unicode@accent\@firstoftwo
+  \if1\mst at OneifUniEnc
+    \ifmst at unimathaccents
+      % \` -> \grave
+      \expandafter\xdef\csname mst at grave@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\`\endcsname{}\relax}%
+      % \' -> \acute
+      \expandafter\xdef\csname mst at acute@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\'\endcsname{}\relax}%
+      % \v -> \check
+      \expandafter\xdef\csname mst at check@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\v\endcsname{}\relax}%
+      % \u -> \breve
+      \expandafter\xdef\csname mst at breve@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\u\endcsname{}\relax}%
+      % \= -> \bar
+      \expandafter\xdef\csname mst at bar@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\=\endcsname{}\relax}%
+      % \. -> \dot
+      \expandafter\xdef\csname mst at dot@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\.\endcsname{}\relax}%
+      % \" -> \ddot
+      \expandafter\xdef\csname mst at ddot@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\"\endcsname{}\relax}%
+      % \r -> \mathring
+      \expandafter\xdef\csname mst at mathring@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\r\endcsname{}\relax}%
+      % \^ -> \hat
+      \expandafter\xdef\csname mst at hat@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\^\endcsname{}\relax}%
+      % \~ -> \tilde
+      \expandafter\xdef\csname mst at tilde@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\~\endcsname{}\relax}%
+    \else
+      \@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
+                     {dot}{ddot}{mathring}{hat}{tilde}%
+      \do
+      {\expandafter\gdef\csname mst@\@tempa @mv#1\expandafter\endcsname
+                   \expandafter{\csname mst at original@\@tempa\endcsname}}%
+    \fi
   \else
-     \ifx\mst at oti\mst at tmp@enc\else
-      \typeout{** mathastext: math accents have been assumed to be^^J%
-        ** as in OT1 encoding.}
+    % \` -> \grave
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at grave@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\`\endcsname{}}
+    % \' -> \acute
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at acute@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\'\endcsname{}}
+    % \v -> \check
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at check@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\v\endcsname{}}
+    % \u -> \breve
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at breve@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\u\endcsname{}}
+    % \= -> \bar
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at bar@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\=\endcsname{}}
+    % \. -> \dot
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at dot@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\.\endcsname{}}
+    % \" -> \ddot
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at ddot@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\"\endcsname{}}
+    % \r -> \mathring
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at mathring@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\r\endcsname{}}
+    % \^ -> \hat
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at hat@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\^\endcsname{}}
+    % \~ -> \tilde
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at tilde@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\~\endcsname{}}
+  \fi
+  \endgroup
+}%
+\fi % \ifmst at mathaccents
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\MTDeclareVersion}
+%   The \cs{MTDeclareVersion} command is to be used in the preamble
+%   to declare a math version. A more complicated variant would also
+%   specify a choice of series for the Euler and Symbol font: anyhow
+%   Symbol only has the medium series, and Euler has medium and bold,
+%   so what is lacking is the possibility to create a version with a
+%   bold Euler. There is already one such version: the default |bold|
+%   one. And there is always the possibility to add to the preamble
+%   \cs{SetSymbolFont}|{mteulervm}||{versionname}||{U}{zeur}{bx}{n}| if
+%   one wants to have a math version with bold Euler characters.
+%
+%   For version |1.1| we add an optional parameter specifying the shape
+%   to be used for letters.
+%
+%   Note: (|2012/10/24|) I really should check whether the user attempts to
+%   redefine the `normal' and `bold' versions and issue a warning in
+%   that case!
+%
+%   |1.3c| (|2013/12/14|) adds an extra optional parameter after all
+%   previous ones, to inherit the settings from another version. Typically
+%   to be used with [bold]. I take this opportunity to sanitize a bit some
+%   line endings to avoid generating (in the preamble, document macros were
+%   already careful of course) too many space
+%   tokens, at least inside macros. And I modifiy (correct? perhaps it was on
+%   purpose) the strange way I used |\@onlypreamble| in earlier
+%   version.
+%
+%   |1.3u| adds storage of macros holding the needed meanings for
+%   \cs{imath}, \cs{hbar}, math accents, and the minus symbol,
+%   version wise.
+%    \begin{macrocode}
+\newcommand*\MTDeclareVersion[6][]{%
+  \edef\mst at declareversionargs{{#1}{#2}{#3}{#4}{#5}{#6}}%
+  \edef\mst at version{#2}%
+  \DeclareMathVersion{\mst at version}%
+  \MTDeclareVersion@
+}% \MTDeclareVersion
+\newcommand*\MTDeclareVersion@[1][]{%
+    \edef\mst at tmp{#1}%
+    \ifx\mst at tmp\empty\else
+      \global\expandafter\let\csname mv@\mst at version\expandafter\endcsname
+                             \csname mv@#1\endcsname
+      \typeout{** Math version `\mst at version\string' inherits from `#1\string'.}%
+    \fi
+    \expandafter\MTDeclareVersion@@\mst at declareversionargs
+}% \MTDeclareVersion@
+\newcommand*\MTDeclareVersion@@[6]{%
+  \expandafter\edef\csname mst at encoding@\mst at version\endcsname{#3}%
+  \expandafter\edef\csname mst at family@\mst at version\endcsname{#4}%
+  \expandafter\edef\csname mst at series@\mst at version\endcsname{#5}%
+  \expandafter\edef\csname mst at shape@\mst at version\endcsname{#6}%
+  \expandafter\edef\csname mst at boldvariant@\mst at version\endcsname{\mst at bold}%
+  \expandafter\edef\csname mst at itdefault@\mst at version\endcsname{\itdefault}%
+  \expandafter\edef\csname mst at rmdefault@\mst at version\endcsname{\rmdefault}%
+  \expandafter\edef\csname mst at sfdefault@\mst at version\endcsname{\sfdefault}%
+  \expandafter\edef\csname mst at ttdefault@\mst at version\endcsname{\ttdefault}%
+  \expandafter\edef\csname mst at exists@skip@\mst at version\endcsname
+        {\mst at exists@skip}%
+  \expandafter\edef\csname mst at forall@skip@\mst at version\endcsname
+        {\mst at forall@skip}%
+  \expandafter\edef\csname mst at prime@skip@\mst at version\endcsname
+        {\mst at prime@skip}%
+  \def\mst at tmp{#1}%
+  \ifx\mst at tmp\empty
+    \ifmst at italic
+      \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{\mst at ltsh}%
+      \typeout{** Latin letters in math version `#2\string' will use the font
+                  #3/#4/#5/\mst at ltsh^^J%    
+               ** Other characters (digits, ...) and \protect\log-like names 
+                    will be in #6 shape.}%
+      \expandafter\edef\csname mst at ltshape@\mst at version\endcsname{\mst at ltsh}%
+    \else
+      \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#6}%
+       \typeout{** Latin letters in math version `#2\string' will use the fonts
+                   #3/#4/#5(\mst at bold)/#6}%
+      \expandafter\edef\csname mst at ltshape@\mst at version\endcsname{#6}%
+    \fi
+  \else
+    \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#1}%
+    \typeout{** Latin letters in math version `#2\string' will use the font
+                #3/#4/#5/#1^^J%
+             ** Other characters (digits, ...) and \protect\log-like
+                names will be in #6 shape.}%
+      \expandafter\edef\csname mst at ltshape@\mst at version\endcsname{#1}%
+  \fi
+  \ifmst at nonormalbold\else
+       \SetMathAlphabet{\mathnormalbold}{#2}{#3}{#4}{\mst at bold}%
+                   {\csname mst at ltshape@\mst at version\endcsname}%
+  \fi
+  \SetSymbolFont{mtoperatorfont}{#2}{#3}{#4}{#5}{#6}%
+  \ifmst at defaultbf\else\SetMathAlphabet{\Mathbf}{#2}{#3}{#4}{\mst at bold}{#6}\fi
+  \ifmst at defaultit\else\SetMathAlphabet{\Mathit}{#2}{#3}{#4}{#5}{\itdefault}\fi
+  \ifmst at defaultsf\else\SetMathAlphabet{\Mathsf}{#2}{#3}{\sfdefault}{#5}{#6}\fi
+  \ifmst at defaulttt\else\SetMathAlphabet{\Mathtt}{#2}{#3}{\ttdefault}{#5}{#6}\fi
+  \ifmst at needeuler
+      \SetMathAlphabet{\MathEulerBold}{#2}{U}{zeur}{\mst at bold}{n}%
+  \fi
+%    \end{macrocode}
+% \begin{macro}{LGRgreeks}
+% \begin{macro}{selfGreeks}
+%   In the case of option LGRgreeks (selfGreeks), it is expected that
+%   the fonts used in each math versions exist in LGR (OT1) encoding. We
+%   first recalculate the shapes to be used for lowercase and uppercase
+%   Greek letters depending on the frenchmath and [it/up][g/G]reek
+%   options as well as on the (local to this version) shapes for letters
+%   and digits.
+%    \begin{macrocode}
+  \def\mst at greek@lsh at loc{\csname mst at ltshape@\mst at version\endcsname}%
+  \def\mst at greek@ush at loc{\csname mst at shape@\mst at version\endcsname}%
+  \ifmst at itgreek\def\mst at greek@lsh at loc{\itdefault}%
+                     \def\mst at greek@ush at loc{\itdefault}%
+  \fi
+  \ifmst at upgreek\def\mst at greek@lsh at loc{\updefault}%
+                     \def\mst at greek@ush at loc{\updefault}%
+  \fi
+  \ifmst at frenchmath
+      \ifmst at itgreek\else
+      \ifmst at upgreek\else
+        \def\mst at greek@lsh at loc{\csname mst at shape@\mst at version\endcsname}%
+        \def\mst at greek@ush at loc{\csname mst at shape@\mst at version\endcsname}%
+      \fi\fi
+  \fi
+  \ifcase\mst at greek@select
+        \or\def\mst at greek@ush at loc{\itdefault}%
+        \or\def\mst at greek@ush at loc{\updefault}%
+  \fi
+  \ifmst at LGRgreeks
+      \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{#4}{#5}{\mst at greek@lsh at loc}%
+      \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{#4}{#5}{\mst at greek@ush at loc}%
+    \typeout{** Greek letters (\mst at greek@lsh at loc/\mst at greek@ush at loc) will use
+                LGR font #4\ifmst at subdued ^^J** (in non subdued versions)\fi}%
+  \else
+   \ifmst at selfGreeks
+      \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{#4}{#5}{\mst at greek@ush at loc}%
+     \typeout{** Capital Greek letters (\mst at greek@lsh at loc/\mst at greek@ush at loc)
+                 will use OT1 font #4\ifmst at subdued ^^J** (in non subdued versions)\fi}%
+   \else
+    \ifmst at LGRgreek 
+      \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{\mst at greekfont}{#5}{\mst at greek@lsh at loc}%
+      \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{\mst at greekfont}{#5}{\mst at greek@ush at loc}%
+    \typeout{** Greek letters (\mst at greek@lsh at loc/\mst at greek@ush at loc) will use
+                LGR font \mst at greekfont\ifmst at subdued ^^J** (in non subdued versions)\fi}%
+    \else
+     \ifmst at selfGreek
+       \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{\mst at greekfont}{#5}{\mst at greek@ush at loc}%
+       \typeout{** Capital Greek letters (\mst at greek@lsh at loc/\mst at greek@ush at loc)
+                   will use OT1 font \mst at greekfont\ifmst at subdued ^^J** (in non subdued versions)\fi}%
+     \fi
+    \fi
+   \fi
+  \fi
+  \edef\mst at tmp{\expandafter\noexpand\csname mst at hbar@mv#2\endcsname
+                \expandafter\noexpand\csname mst at ltbar@mv#2\endcsname}%
+  \expandafter\mst at dothe@hbarstuff\mst at tmp{#3}%
+  \edef\mst at tmp{\expandafter\noexpand\csname mst at inodot@mv#2\endcsname
+                \expandafter\noexpand\csname mst at jnodot@mv#2\endcsname}%
+  \expandafter\mst at dothe@inodotstuff\mst at tmp{#3}%
+  \ifmst at mathaccents
+    \mst at dothe@mathaccentsstuff{#2}{#3}%
+  \fi
+  \edef\mst at tmp{\expandafter\noexpand\csname mst at minus@mv#2\endcsname
+                \expandafter\noexpand\csname mst at varfam@minus at mv#2\endcsname}%
+  \ifmst at endash
+    \expandafter\mst at dothe@endashstuff\mst at tmp{#3}%
+  \else
+    \ifmst at emdash
+      \expandafter\mst at dothe@emdashstuff\mst at tmp{#3}%
+    \else
+      \expandafter\mst at dothe@hyphenstuff\mst at tmp
+    \fi
+  \fi
+}% \MTDeclareVersion@@
+\let\MathastextDeclareVersion\MTDeclareVersion
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\MTversion}
+% \begin{macro}{\MTversion@}
+% \begin{macro}{\MTversion at s}
+% \begin{macro}{\MTversion@@}
+%   This is a wrapper around \LaTeX{}'s \cs{mathversion}: here we have an
+%   optional argument allowing a quick and easy change of the text fonts
+%   additionally to the math fonts. Present already in the initial
+%   version of the package (January 2011.)
+%  
+%   |1.15|: some modifications for the subdued option vs LGRgreek and
+%   for the math muskips after \cs{exists} and \cs{forall}.
+%
+%   |1.2|: with the subdued option sets the math alphabets in the
+%   normal and bold math versions do not apply to operator
+%   names and non-alphabetical symbols. The switch for braces
+%   is left as it is.
+%
+%   |1.2b|: with the subdued option, the italic corrections are not added.
+%   Else, we check the shape of letters in this version. Also, there was a bug
+%   since |1.15|: the values of the math skips were taken not from the
+%   settings for the math version (\#2) but from those of the optional argument
+%   (\#1), if present...
+%
+%   |1.3|: activation of italic corrections is now separated from actual math
+%   activation of letters.
+%
+%   |1.3c|: a starred variant is added which does not modify the text fonts,
+%   only the math set-tup.
+%
+%   |1.3d|: replaced in |\MTversion@| things like |\edef\mst at encoding{...}| and
+%   |\renewcommand{\encodingdefault}{\mst@@encoding}| by
+%   |\edef\encodingdefault{...}| etc\dots All those |\mst@@...| things were
+%   useless. I also redefine |\seriesdefault| rather than |\mddefault|.
+%
+%   |1.3d|: mechanism of restoration of Greek in subdued normal and bold
+%   versions has been to all cases, and not only for the
+%   |LGRgreek| option.
+%
+%   |1.3u|: version savvy (i.e. font-encoding savvy) minus sign,
+%   \cs{hbar}, \cs{imath}, math accents.
+%    \begin{macrocode}
+\newcommand*\MTversion {\@ifstar\MTversion at s\MTversion@ }
+\newcommand*\MTversion at s [1]{\mathversion{#1}\MTversion@@ }
+\newcommand*\MTversion@ [2][]{%
+    \mathversion{#2}% defines \math at version as expanded #2
+    \edef\mst at tmpa{#1}%
+    \ifx\mst at tmpa\empty
+        \let\mst at tmp\math at version
+    \else
+        \let\mst at tmp\mst at tmpa
+    \fi
+    \edef\encodingdefault {\csname mst at encoding@\mst at tmp\endcsname}%
+    \edef\familydefault   {\csname mst at family@\mst at tmp\endcsname}%
+    \edef\seriesdefault   {\csname mst at series@\mst at tmp\endcsname}%        
+    \edef\shapedefault    {\csname mst at shape@\mst at tmp\endcsname}%
+    \edef\bfdefault {\csname mst at boldvariant@\mst at tmp\endcsname}%
+    \edef\itdefault {\csname mst at itdefault@\mst at tmp\endcsname}%
+    \edef\rmdefault {\csname mst at rmdefault@\mst at tmp\endcsname}%
+    \edef\sfdefault {\csname mst at sfdefault@\mst at tmp\endcsname}%
+    \edef\ttdefault {\csname mst at ttdefault@\mst at tmp\endcsname}%
+    \usefont{\encodingdefault}{\familydefault}{\seriesdefault}{\shapedefault}%
+    \MTversion@@
+}% \MTversion@
+%    \end{macrocode}
+%   |1.3j| has a stronger subdued which does \cs{MTnormalprime},
+%   \cs{MTnormalexists}, \cs{MTnormalforall} rather than setting the skips to
+%   |0mu|. Hence \cs{MTversion} by default should do \cs{MTprimedoesskip},
+%   \cs{MTexistsdoesskip}, \cs{MTforalldoesskip}.
+%
+%   |1.3u| drops the argument, as the info is in \cs{math at version} from
+%   \LaTeX2e code.
+%    \begin{macrocode}
+\newcommand*\MTversion@@ {%
+    \MTexistsdoesskip
+    \MTforalldoesskip
+    \MTprimedoesskip
+%    \end{macrocode}
+% |v1.15e|: muskips.
+%    \begin{macrocode}
+     \mst at exists@muskip\csname mst at exists@skip@\math at version\endcsname\relax
+     \mst at forall@muskip\csname mst at forall@skip@\math at version\endcsname\relax
+%    \end{macrocode}
+% |v1.2|: muskip for \cs{prime}.
+%    \begin{macrocode}
+     \mst at prime@muskip\csname mst at prime@skip@\math at version\endcsname\relax
+%    \end{macrocode}
+% |v1.2b|: italic corrections except for italic/slanted (sic) letters, and of
+% course except in the subdued normal and bold math versions.
+%
+% |v1.3|: by default, letters are made mathematically active, even if italic
+% corrections are not used, to allow the action of \cs{MTsetmathskips}.
+%    \begin{macrocode}
+    \edef\mst at tmpa{\csname mst at ltshape@\math at version\endcsname}%
+    \edef\mst at tmpb{\csname mst at shape@\math at version\endcsname}%
+%    \end{macrocode}
+% |v1.15c|: extending subdued to LGRgreek.
+%
+% |v1.15f|: subdueing math alphabets in a simpler way than in |1.15e|.
+%
+% |v1.2b|: subdueing the activation of characters in math mode.
+%
+% |v1.2d|: special treatment of the asterisk.
+%
+% |v1.3d|: extended LGRgreek mechanism of activation/restoration of Greek to all
+% cases.
+%
+% |v1.3j|: use of \cs{MTeverymathdefault}, which includes \cs{MTicinmath}, but
+% must be corrected then according to shape of letters and presence or absence
+% of option |frenchmath|. We do only |\def\mst at ITcorr{\ifnum\fam=\m at ne\/\fi}|
+% and not \cs{MTICinmath} to not overwrite some user-defined
+% \cs{MTeverymathdefault}. Code for italic corrections or not according to
+% letter shape is executed after \cs{MTeverymathdefault} which limits a bit
+% user customizing possibilities, but if I moved it later, I would possibly
+% have to put inside the \cs{MTicinmath} the check for |it| ot |sl|. Similary
+% the \cs{MTcustomgreek} always executed (if not |subdued|).
+%    \begin{macrocode}
+    \MTmathoperatorsobeymathxx
+    \MTeverymathdefault
+    \MTcustomizenewmcodes       
+    \@for\mst at tmpc:=it,sl\do{\ifx\mst at tmpc\mst at tmpa\MTnoicinmath\fi}%
+    \ifmst at frenchmath
+      \def\mst at ITcorr{\ifnum\fam=\m at ne\/\fi}%
+      \@for\mst at tmpc:=it,sl\do{\ifx\mst at tmpc\mst at tmpb\MTnoICinmath\fi}%
+    \fi
+%    \end{macrocode}
+% |1.3j| has a stronger subdued which does \cs{MTnormalprime},
+% \cs{MTnormalexists}, \cs{MTnormalforall} rather than simply setting the
+% skips to |0mu|. Note: \cs{MTnormalprime} is done as part of
+% \cs{MTeverymathoff}. 
+%    \begin{macrocode}
+    \ifmst at subdued
+      \def\mst at tmpa{normal}%
+      \ifx\math at version\mst at tmpa
+        \mst at restorealphabets
+        \MTstandardgreek
+        \MTmathoperatorsdonotobeymathxx
+        \MTnormalexists
+        \MTnormalforall
+        \MTeverymathoff
+        \MTresetnewmcodes
+%    \end{macrocode}
+% |1.3t| adds better compatibility with |subdued| mode for
+% |\imath/\jmath| and perfect compatibility for the minus sign.
+%
+% |1.3u| extends this further to allow per-math-version meanings
+% for them.
+%    \begin{macrocode}
+        \mst at subduedhbar
+        \mst at subduedinodot
+        \mst at subduedmathaccents
+        \mst at subduedminus
+      \else
+        \def\mst at tmpa{bold}%
+        \ifx\math at version\mst at tmpa
+          \mst at restorealphabets
+          \MTstandardgreek
+          \MTmathoperatorsdonotobeymathxx
+          \MTnormalexists
+          \MTnormalforall
+          \MTeverymathoff
+          \MTresetnewmcodes
+          \mst at subduedhbar
+          \mst at subduedinodot
+          \mst at subduedmathaccents
+          \mst at subduedminus
+        \else
+          \mst at setalphabets
+          \MTcustomgreek
+          \mst at nonsubduedhbar
+          \mst at nonsubduedinodot
+          \mst at nonsubduedmathaccents
+          \mst at nonsubduedminus
+        \fi
       \fi
+    \else
+      \MTcustomgreek % new with 1.3d
+      \mst at nonsubduedhbar
+      \mst at nonsubduedinodot
+      \mst at nonsubduedmathaccents
+      \mst at nonsubduedminus
+    \fi
+}% \MTversion@@
+\let\MathastextVersion\MTversion
+\let\Mathastextversion\MTversion
+\let\MTVersion\MTversion
+\let\mathastextversion\MTversion
+%    \end{macrocode}
+% \end{macro}\end{macro}\end{macro}\end{macro}
+% \begin{macro}{\MTWillUse}
+% This is a preamble-only command, which can be used more than once, only the
+% latest one counts. Sets up the math fonts in the normal and bold
+% versions, as does \cs{Mathastext}.
+%    \begin{macrocode}
+\newcommand*\MTWillUse[5][]{
+  \MTencoding{#2}
+  \MTfamily{#3}
+  \MTseries{#4}
+  \MTshape{#5}
+    \ifmst at italic\MTlettershape{\itdefault}\fi % was missing in v 1.14 and prior
+  \edef\mst at tmp{#1}
+  \ifx\mst at tmp\empty\else\MTlettershape{#1}\fi
+  \Mathastext}
+\let\MathastextWillUse\MTWillUse
+\let\Mathastextwilluse\MTWillUse
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\Mathastext}
+%    The command \cs{Mathastext} can be used anywhere in the
+%    preamble and any number of time, the last one is the
+%    one that counts.
+%
+%    In version |1.1| we have two fonts: they only differ in
+%    shape. The |mtletterfont| is for letters, and the
+%    |mtoperatorfont| for digits and log-like operator
+%    names. The default is that both are upright.
+%
+%    Starting with version |1.12|, an optional argument makes
+%    \cs{Mathastext} act as the declaration of a math
+%    version, to be later used in the document.
+%
+%    Versions |1.15x| brought some adaptations related to the subdued
+%    option.
+%
+%    |1.3c| adds a second optional parameter to inherit previous settings
+%    from another version; mostly done to inherit the bold version fonts for
+%    symbols and large symbols. This is done in |\MTDeclareVersion|.
+%
+%    |1.3j| moves the code related to \cs{MTicinmath} from \cs{Mathastext@} to
+%    \cs{AtBeginDocument} (code depending on whether |subdued| option in use).
+%    But we omit for this from \cs{MTicinmath} the \cs{MTmathactiveletters}
+%    and issue the latter during loading of package, hence allowing
+%    \cs{MTmathstandardletters} to be effective in the preamble.
+%
+%    I forgot to document that under |subdued| option the \cs{Mathastext}
+%    command without optional parameter does not any |\SetSymbolFont| etc...
+%    but it has a few other tasks to complete nevertheless.
+%
+% |1.3u| fixes some long-standing bug that \cs{Mathastext} did not repeat some
+% font-encoding dependent things: they got done only once during package
+% loading (things regarding the \cs{hbar}, \cs{imath}, the math accents and
+% the minus sign). They are now part of the contents of \cs{Mathastext} macro
+% itself (which is executed during package loading).
+%    \begin{macrocode}
+\def\Mathastext {\@ifnextchar [\Mathastext at declare\Mathastext@ }
+\def\Mathastext at declare [#1]{%
+  \edef\mst at tmp{#1}%
+  \ifx\mst at tmp\empty
+       \expandafter\@firstoftwo
+  \else\expandafter\@secondoftwo
+  \fi
+  \Mathastext@
+  {\MTDeclareVersion[\mst at ltsh]{#1}{\mst at enc}{\mst at fam}{\mst at ser}{\mst at opsh}}%
+}% \Mathastext at declare
+\def\Mathastext@ {%
+  \mst at update@greeksh 
+  \edef\mst at encoding@normal{\mst at enc}%
+  \edef\mst at family@normal{\mst at fam}%
+  \edef\mst at series@normal{\mst at ser}%
+  \edef\mst at shape@normal{\mst at opsh}%
+  \edef\mst at ltshape@normal{\mst at ltsh}%
+  \edef\mst at itdefault@normal{\itdefault}%
+  \edef\mst at rmdefault@normal{\rmdefault}%
+  \edef\mst at sfdefault@normal{\sfdefault}%
+  \edef\mst at ttdefault@normal{\ttdefault}%
+  \edef\mst at boldvariant@normal{\mst at bold}%
+  \edef\mst at exists@skip at normal{\mst at exists@skip}%
+  \edef\mst at forall@skip at normal{\mst at forall@skip}%
+  \edef\mst at prime@skip at normal{\mst at prime@skip}%
+  \edef\mst at encoding@bold{\mst at enc}%
+  \edef\mst at family@bold{\mst at fam}%
+  \edef\mst at series@bold{\mst at bold}%
+  \edef\mst at shape@bold{\mst at opsh}%
+  \edef\mst at ltshape@bold{\mst at ltsh}%
+  \edef\mst at boldvariant@bold{\mst at bold}%
+  \edef\mst at itdefault@bold{\itdefault}%
+  \edef\mst at rmdefault@bold{\rmdefault}%
+  \edef\mst at sfdefault@bold{\sfdefault}%
+  \edef\mst at ttdefault@bold{\ttdefault}%
+  \edef\mst at exists@skip at bold{\mst at exists@skip}%
+  \edef\mst at forall@skip at bold{\mst at forall@skip}%
+  \edef\mst at prime@skip at bold{\mst at prime@skip}%
+  \ifmst at subdued
+%    \end{macrocode}
+% Since |1.3j| this branch is actually almost superfluous, as entering
+% |normal| or |bold| with \cs{MTversion} does \cs{MTnormalexists},
+% \cs{MTnormalforall}, and \cs{MTnormalprime}. But some default values are
+% needed if the user insists on issuing \cs{MTexistsdoesskip}, etc...
+% nevertheless.
+%    \begin{macrocode}
+    \def\mst at exists@skip at normal{0mu}%
+    \def\mst at forall@skip at normal{0mu}%
+    \def\mst at prime@skip at normal{0mu}%
+    \def\mst at exists@skip at bold{0mu}%
+    \def\mst at forall@skip at bold{0mu}%
+    \def\mst at prime@skip at bold{0mu}%
+  \else % not subdued
+    \ifmst at italic
+      \ifmst at frenchmath
+        \mst at exists@muskip\mst at exists@skip\relax
+        \mst at forall@muskip\mst at forall@skip\relax
+        \mst at prime@muskip\mst at prime@skip\relax
+      \else
+       \def\mst at exists@skip at normal{0mu}%
+       \def\mst at forall@skip at normal{0mu}%
+       \def\mst at prime@skip at normal{0mu}%
+       \def\mst at exists@skip at bold{0mu}%
+       \def\mst at forall@skip at bold{0mu}%
+       \def\mst at prime@skip at bold{0mu}%
+      \fi
+    \else
+        \mst at exists@muskip\mst at exists@skip\relax
+        \mst at forall@muskip\mst at forall@skip\relax
+        \mst at prime@muskip\mst at prime@skip\relax
+    \fi
+  \fi
+%% v1.15f 
+  \ifmst at nonormalbold\else
+   \SetMathAlphabet{\mathnormalbold}{normal}{\mst at encoding@normal}%
+                                 {\mst at family@normal}%
+                                 {\mst at boldvariant@normal}%
+                                 {\mst at ltshape@normal}%
+   \SetMathAlphabet{\mathnormalbold}{bold}{\mst at encoding@bold}%
+                                 {\mst at family@bold}%
+                                 {\mst at boldvariant@bold}%
+                                 {\mst at ltshape@bold}%
+  \fi
+%% v1.15f adds \ifmst at default.. checks
+  \ifmst at subdued\else
+   \SetSymbolFont{mtletterfont}{normal}{\mst at encoding@normal}%
+                                       {\mst at family@normal}%
+                                       {\mst at series@normal}%
+                                       {\mst at ltshape@normal}%
+   \SetSymbolFont{mtletterfont}{bold}  {\mst at encoding@bold}%
+                                       {\mst at family@bold}%
+                                       {\mst at series@bold}%
+                                       {\mst at ltshape@bold}%
+   \SetSymbolFont{mtoperatorfont}{normal}{\mst at encoding@normal}%
+                                       {\mst at family@normal}%
+                                       {\mst at series@normal}%
+                                       {\mst at shape@normal}%
+   \SetSymbolFont{mtoperatorfont}{bold} {\mst at encoding@bold}%
+                                       {\mst at family@bold}%
+                                       {\mst at series@bold}%
+                                       {\mst at shape@bold}%
+   \ifmst at defaultbf\else
+    \SetMathAlphabet{\Mathbf}{normal}{\mst at encoding@normal}%
+                                 {\mst at family@normal}%
+                                 {\mst at series@bold}%
+                                 {\mst at shape@normal}%
+    \SetMathAlphabet{\Mathbf}{bold}{\mst at encoding@bold}%
+                                 {\mst at family@bold}%
+                                 {\mst at series@bold}%
+                                 {\mst at shape@bold}%
    \fi
+   \ifmst at defaultit\else
+    \SetMathAlphabet{\Mathit}{normal}{\mst at encoding@normal}%
+                                 {\mst at family@normal}%
+                                 {\mst at series@normal}%
+                                 {\mst at itdefault@normal}%
+    \SetMathAlphabet{\Mathit}{bold}{\mst at encoding@bold}%
+                                 {\mst at family@bold}%
+                                 {\mst at series@bold}%
+                                 {\mst at itdefault@bold}%
+   \fi
+   \ifmst at defaultsf\else
+    \SetMathAlphabet{\Mathsf}{normal}{\mst at encoding@normal}%
+                                 {\mst at sfdefault@normal}%
+                                 {\mst at series@normal}%
+                                 {\mst at shape@normal}%
+    \SetMathAlphabet{\Mathsf}{bold}{\mst at encoding@bold}%
+                                 {\mst at sfdefault@bold}%
+                                 {\mst at series@bold}%
+                                 {\mst at shape@bold}%
+   \fi
+   \ifmst at defaulttt\else
+    \SetMathAlphabet{\Mathtt}{normal}{\mst at encoding@normal}%
+                                 {\mst at ttdefault@normal}%
+                                 {\mst at series@normal}%
+                                 {\mst at shape@normal}%
+    \SetMathAlphabet{\Mathtt}{bold}{\mst at encoding@bold}%
+                                 {\mst at ttdefault@bold}%
+                                 {\mst at series@bold}%
+                                 {\mst at shape@bold}%
+   \fi
+  \fi % de \ifmst at subdued
+%    \end{macrocode}
+% \begin{macro}{\MathEulerBold}
+%   |1.14c|: We reset |mteulervm| and \cs{MathEulerBold} here as the
+%   variant for bold may have been changed by the user via
+%   \cs{Mathastextboldvariant}|{m}|; and we should keep this local to
+%   math versions.
+%    \begin{macrocode}
+  \ifmst at needeuler
+    \SetSymbolFont{mteulervm}{bold}{U}{zeur}{\mst at boldvariant@normal}{n}%
+    \SetMathAlphabet{\MathEulerBold}{normal}%
+               {U}{zeur}{\mst at boldvariant@normal}{n}%
+    \SetMathAlphabet{\MathEulerBold}{bold}%
+               {U}{zeur}{\mst at boldvariant@normal}{n}%
+  \fi
+%    \end{macrocode}
+% \end{macro}
+%    \begin{macrocode}
+  \ifmst at needsymbol\SetSymbolFont{mtpsymbol}{bold}%
+                     {U}{psy}{\mst at boldvariant@normal}{n}%
+  \fi
+%    \end{macrocode}
+% \begin{macro}{LGRgreek*}
+% \begin{macro}{selfGreek*}
+% LGRgreek, LGRgreeks, selfGreek, and selfGreeks options.
+%    \begin{macrocode}
+  \ifmst at subdued\else 
+   \ifmst at LGRgreek
+    \SetSymbolFont{mtlgrfontlower}{normal}{LGR}%
+            {\mst at greekfont}{\mst at series@normal}{\mst at greek@lsh}%
+    \SetSymbolFont{mtlgrfontlower}{bold}{LGR}%
+            {\mst at greekfont}{\mst at boldvariant@normal}{\mst at greek@lsh}%
+    \SetSymbolFont{mtlgrfontupper}{normal}{LGR}%
+            {\mst at greekfont}{\mst at series@normal}{\mst at greek@ush}%
+    \SetSymbolFont{mtlgrfontupper}{bold}{LGR}%
+            {\mst at greekfont}{\mst at boldvariant@bold}{\mst at greek@ush}%
+   \else
+    \ifmst at selfGreek
+     \SetSymbolFont{mtselfGreekfont}{normal}{OT1}%
+            {\mst at greekfont}{\mst at series@normal}{\mst at greek@ush}%
+     \SetSymbolFont{mtselfGreekfont}{bold}{OT1}%
+            {\mst at greekfont}{\mst at boldvariant@bold}{\mst at greek@ush}%
+    \fi
+   \fi
+  \fi
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%    \begin{macrocode}
+  \ifmst at subdued
+   \typeout{** subdued mode will be activated for the normal and bold math versions}%
+  \else 
+   \typeout{** Latin letters in the normal (resp. bold) math versions are now^^J%
+            ** set up to use the fonts 
+   \mst at encoding@normal/\mst at family@normal/\mst at series@normal%
+               (\mst at boldvariant@normal)/\mst at ltshape@normal}%
+   \ifmst at LGRgreek\typeout{** Greek letters (\mst at greek@lsh/\mst at greek@ush) 
+                              will use LGR/\mst at greekfont}%
+   \fi
+   \ifmst at nodigits\else
+     \typeout{** Other characters (digits, ...) and \protect\log-like names will be^^J%
+              ** typeset with the \mst at shape@normal\space shape.}%
+   \fi
+  \fi
+  \ifmst at nohbar\else
+     \typeout{** \string\hbar}%
+     \mst at dothe@hbarstuff
+         \mst at hbar@mvnormal\mst at ltbar@mvnormal\mst at encoding@normal
+     \let\mst at hbar@mvbold\mst at hbar@mvnormal
+  \fi
+  \mst at dothe@inodotstuff\inodot\jnodot\mst at encoding@normal
+  \let\mst at inodot@mvnormal\inodot
+  \let\mst at inodot@mvbold\inodot
+  \let\mst at jnodot@mvnormal\jnodot
+  \let\mst at jnodot@mvbold\jnodot
+  \ifmst at mathaccents
+    \typeout{** math accents}%
+    \mst at dothe@mathaccentsstuff{normal}\mst at encoding@normal
+  \fi
+  \ifmst at nominus\else
+   \typeout{** minus as endash}%
+   \ifmst at endash
+    \mst at dothe@endashstuff\mst at minus@mvnormal\mst at varfam@minus at mvnormal
+                          \mst at encoding@normal
+    \mst at dothe@endashstuff\mst at minus@mvbold\mst at varfam@minus at mvbold
+                          \mst at encoding@normal
+   \else
+    \ifmst at emdash
+      \mst at dothe@emdashstuff\mst at minus@mvnormal\mst at varfam@minus at mvnormal
+                            \mst at encoding@normal
+      \mst at dothe@emdashstuff\mst at minus@mvbold\mst at varfam@minus at mvbold
+                            \mst at encoding@normal
+    \else
+      \mst at dothe@hyphenstuff\mst at minus@mvnormal\mst at varfam@minus at mvnormal
+      \let\mst at minus@mvbold\mst at minus@mvnormal
+      \let\mst at varfam@minus at mvbold\mst at varfam@minus at mvnormal
+    \fi
+   \fi
+  \fi
+}% \Mathastext@
+\let\mathastext\Mathastext
+\Mathastext
+%    \end{macrocode}
+% \end{macro}
+% Additional appropriate messages to the terminal and the log.
+%    \begin{macrocode}
+\ifmst at eulergreek
+      \typeout{** Greek letters will use the Euler font. Use \protect\MathastextEulerScale{<factor>} to scale the
+               font.}%
+      \ifmst at subdued{\typeout{** (subdued mode: normal and bold math
+          version with default Greek letters.)}}\fi
+\else
+\ifmst at symbolgreek
+       \typeout{** Greek letters will use the PostScript Symbol font. Use^^J%
+                ** \protect\MathastextSymbolScale{<factor>} to scale the font.}%
+      \ifmst at subdued{\typeout{** (subdued mode: normal and bold math
+          version with default Greek letters.)}}\fi
 \fi\fi
 %    \end{macrocode}
-% \end{macro}
 % \begin{macro}{Math sizes}
 % I took the code for \cs{Huge} and \cs{HUGE} from the |moresize| package of
 % Christian~\textsc{Cornelssen}
@@ -7938,6 +7994,258 @@
     \MTicinmath
     \MTfixfonts
 }%
+%    \end{macrocode}
+% \end{macro}
+% \let\temp~
+% \def~{\rlap}
+% \begin{macro}{Things to do last ~{``at begin document''}}
+% \let~\temp
+%    \begin{macrocode}
+\AtBeginDocument{%
+  \everymath\expandafter{\the\everymath 
+    \mst at the\mst at do@nonletters \let\mst at the\@gobble
+    \mst at theeasy\mst at do@easynonletters  \let\mst at theeasy\@gobble
+    \mst at thef\mst at do@az \let\mst at thef\@gobble
+    \mst at theF\mst at do@AZ \let\mst at theF\@gobble}%
+  \everydisplay\expandafter{\the\everydisplay 
+    \mst at the\mst at do@nonletters \let\mst at the\@gobble
+    \mst at theeasy\mst at do@easynonletters  \let\mst at theeasy\@gobble
+    \mst at thef\mst at do@az \let\mst at thef\@gobble
+    \mst at theF\mst at do@AZ \let\mst at theF\@gobble}%
+%    \end{macrocode}
+% |1.3j|: moved here to be executed at begin document (and not from inside
+% \cs{Mathastext@}.) The \cs{MTeverymathoff} does: \cs{MTnormalasterisk},
+% \cs{MTnormalprime}, \cs{MTnonlettersdonotobeymathxx},
+% \cs{MTeasynonlettersdonotobeymathxx}, \cs{MTmathstandardletters}.
+%
+% |1.3m|: doing \cs{MTmathactiveletters} in subdued mode immediately after
+% |\begin{document}| resulted in errors because \cs{mst at itcorr} had been left
+% undefined. We thus add \cs{MTnoicinmath} to the subdued initialization.
+%
+% Since |1.3n| there is \cs{MTresetnewmcodes} which needs
+% \cs{mst at originalnewmcodes@}, itself defined at begin document. Thus we have
+% wrapped the whole thing in \cs{AtEndOfPackage} (at |1.3u| whole code
+% directly moved at end of package).
+%
+% And |1.3p| adds here \cs{MTcustomizenewmcodes} which had been regrettably
+% forgotten by |1.3n|.
+%
+% |1.3t| adds some extras to handle correctly the minus sign and
+% dotless i and j in subdued mode, even in case of usage with fontspec.
+%
+% |1.3u| similarly lets math accents be correctly subdued.
+%    \begin{macrocode}
+  \MTcustomizenewmcodes
+  \let\mst at original@hbar\hbar
+  \let\mst at original@imath\imath
+  \let\mst at original@jmath\jmath
+  \@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
+                 {dot}{ddot}{mathring}{hat}{tilde}%
+  \do
+  {\expandafter\let\csname mst at original@\@tempa\expandafter\endcsname
+                   \csname \@tempa\endcsname}%
+  \ifmst at XeOrLua
+     \edef\mst at subduedminus
+         {\mst at Umathcodenum`\noexpand\-=\the\mst at Umathcodenum`\-\relax}%
+  \else
+     \edef\mst at subduedminus{\mathcode`\noexpand\-=\the\mathcode`\-\relax}%
+  \fi
+  \ifmst at subdued
+    \MTeverymathoff
+    \MTresetnewmcodes
+    \MTnoicinmath
+    \MTmathoperatorsdonotobeymathxx
+    %\mst at subduedhbar
+    \let\inodot\imath
+    \let\jnodot\jmath
+    %\mst at subduedmathaccents
+    \mst at subduedminus
+  \else
+     \mst at nonsubduedhbar
+     \mst at nonsubduedmathaccents
+     \mst at nonsubduedminus
+%    \end{macrocode}
+% |1.3j|: an earlier version of this code was earlier part of \cs{Mathastext@}.
+% As we are now in \cs{AtBeginDocument} we try to be careful not to overwrite
+% \cs{MTicinmath}, \cs{MTnoicinmath}, \cs{MTicalsoinmathxx}, ... if issued by
+% the user in the preamble, though. And we do not execute
+% \cs{MTmathactiveletters}, it is issued by the package at loading time in
+% order to allow user to cancel it if desired from inside the preamble.
+%    \begin{macrocode}
+     \ifx\mst at itcorr\@undefined
+         \def\mst at itcorr{\ifnum\fam=\m at ne\/\fi}%
+         \@for\mst at tmp:=it,sl\do 
+           {\ifx\mst at tmp\mst at ltshape@normal\let\mst at itcorr\@empty\fi }%
+     \fi
+     \ifx\mst at ITcorr\@undefined
+         \let\mst at ITcorr\mst at itcorr
+         \ifmst at frenchmath
+           \def\mst at ITcorr{\ifnum\fam=\m at ne\/\fi}%
+           \@for\mst at tmp:=it,sl\do
+                {\ifx\mst at tmp\mst at shape@normal\let\mst at ITcorr\@empty\fi }%
+         \fi
+     \fi
+  \fi
+}% \AtBeginDocument
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{subdued}
+%   |1.15|: The subdued code was initiated in May 2011. I returned to
+%   |mathastext| on Sep 24, 2012, and decided to complete what I had started
+%   then, but in the mean time I had forgotten almost all of the little I knew
+%   about \LaTeX{} macro programming.
+%
+%   The point was to extract the data about how are `letters' and
+%   `operators' in the normal and bold versions, through obtaining the
+%   math families of `a' and `1', respectively$^1$. Due to the
+%   reassignements done for characters by |mathastext| I also had
+%   decided in 2011 that the OT1 encoding, if detected, should be
+%   replaced by T1 ($(1)$: but the \emph{euler} package for example
+%   assigns the digits to the \emph{letters} symbol font...)
+%
+%   |1.15d|: Oct 13, 2012. The \cs{mathcode} thing has to be used with care
+%   under Unicode engines. Unfortunately the \cs{luatexUmathcode} macro is
+%   helpless as it is not possible to know if it will return a legacy mathcode
+%   or a Unicode mathcode. On the other hand the much saner
+%   \cs{XeTeXmathcodenum} always return a Unicode mathcode. 
+%
+%   {UPDATE for \mst\ 1.3 (|2013/09/02|): since the release of lualatex as
+%   included in 
+%   TL2013, \cs{luatexUmathcodenum} behaves as \cs{XeTeXmathcodenum} so \mst 1.3
+%   treats identically under both unicode engines the equal and minus signs (and
+%   the vertical bar).}
+%
+%   |1.15e|: Oct 22, 2012. I add the necessary things to also subdue the
+%   \cs{mathbf}, \cs{mathit}, \cs{mathsf} and \cs{mathtt} macros (previous
+%   version only took care of the symbol alphabets \cs{mathnormal} and
+%   \cs{mathrm}.) [update: |1.15f| does that in a completely different and much
+%   simpler way] Notice that the package defines a \cs{mathnormalbold} macro,
+%   but it will not be subdued in the normal and bold math versions.
+%
+%   |1.15f|: Oct 23, 2012. The previous version of the code queried the math
+%   family of a, respectively 1, to guess and then extract the fonts to be
+%   reassigned to mtletterfont and mtoperatorfont (which is done at the end of
+%   this .sty file). The present code simply directly uses letters and operators
+%   (so mathastext could not subdue itself... if it was somehow cloned), but
+%   obtains indeed the corresponding font specifications in normal and bold in a
+%   cleaner manner. But it is so much shorter (and avoids the \LuaLaTeX{}
+%   problem with \cs{luatexUmathcode}). Anyhow, for example the euler package
+%   puts the digits in the letters math family! so the previous method was also
+%   error prone. In fact there is no way to do this subdued mechanism on the
+%   basis of the legacy code of mathastext. The only way is to rewrite entirely
+%   the package to query all mathcodes of things it changes in order to be able
+%   to revert these changes (and one would have to do even more hacking for
+%   |\mathversion{normal}| and not only |\MTversion{normal}| to work).
+%
+%   |1.15f|: and also I take this opportunity to do the subdued math
+%   alphabets things in a much much easier way, see below.
+%
+%   |1.3s 2018/08/21|: I have half-forgotten the reasons for modifiying the
+%   font encoding to current |\encodingdefault|, but at any rate this should
+%   not be done in a |fontspec| context, encoding default being (now) |TU| it
+%   is very unlikely modifying from |TU| or to |TU| from something else will
+%   do any good.^^A See
+%^^A   \centeredline{\url{https://tex.stackexchange.com/questions/444565/mathastext-wrong-digits-in-math-mode/}}
+%^^A   for original report.
+%   I add workaround here for case of |fontspec| being
+%   detected via the |\encodingdefault| setting.
+%
+%   |1.3t 2018/08/22|: the |1.3s| fix erroneously removed the
+%   |OT1->T1| replacement in |TU| context.
+%
+%   |1.3u|: the whole thing will only get executed At Begin Document.
+%    \begin{macrocode}
+\ifmst at subdued
+\AtBeginDocument{%
+  \def\mst at reserved#1\getanddefine at fonts\symletters#2#3\@nil{%
+        \def\mst at normalmv@letter{#2}}%
+  \expandafter\mst at reserved\mv at normal\@nil
+  \def\mst at reserved#1\getanddefine at fonts\symletters#2#3\@nil{%
+        \def\mst at boldmv@letter{#2}}%
+  \expandafter\mst at reserved\mv at bold\@nil
+  \def\mst at reserved#1\getanddefine at fonts\symoperators#2#3\@nil{%
+        \def\mst at normalmv@operator{#2}}%
+  \expandafter\mst at reserved\mv at normal\@nil
+  \def\mst at reserved#1\getanddefine at fonts\symoperators#2#3\@nil{%
+        \def\mst at boldmv@operator{#2}}%
+  \expandafter\mst at reserved\mv at bold\@nil
+  \edef\mst at tmp@enc{\mst at encoding@normal}%
+  \def\mst at reserved#1/#2/#3/#4/{\gdef\mst at debut{#1}\gdef\mst at reste{#2/#3/#4}}%
+  \begingroup\escapechar\m at ne
+      \xdef\mst at funnyoti{\expandafter\string\csname OT1\endcsname}%
+      \expandafter\expandafter\expandafter
+          \mst at reserved\expandafter\string\mst at normalmv@operator/%
+  \endgroup
+  \ifx\mst at debut\mst at funnyoti\ifx\mst at tmp@enc\mst at oti\def\mst at tmp@enc{T1}\fi\fi
+  \edef\mst at normalmv@operator{\expandafter\noexpand\csname 
+       \if1\mst at OneifUniEnc
+         \ifx\mst at debut\mst at funnyoti T1\else\mst at debut\fi
+       \else
+         \mst at tmp@enc
+       \fi/\mst at reste\endcsname}%
+  \edef\mst at tmp@enc{\mst at encoding@bold}%
+  \begingroup\escapechar\m at ne
+      \expandafter\expandafter\expandafter
+          \mst at reserved\expandafter\string\mst at boldmv@operator/%
+  \endgroup
+  \ifx\mst at debut\mst at funnyoti\ifx\mst at tmp@enc\mst at oti\def\mst at tmp@enc{T1}\fi\fi
+  \edef\mst at boldmv@operator{\expandafter\noexpand\csname 
+       \if1\mst at OneifUniEnc
+         \ifx\mst at debut\mst at funnyoti T1\else\mst at debut\fi
+       \else
+         \mst at tmp@enc
+       \fi/\mst at reste\endcsname}%
+  \typeout{** ...entering subdued mode...}%
+  \expandafter\SetSymbolFont@ \expandafter\mv at normal\mst at normalmv@letter\symmtletterfont
+  \expandafter\SetSymbolFont@ \expandafter\mv at bold\mst at boldmv@letter\symmtletterfont
+  \expandafter\SetSymbolFont@ \expandafter\mv at normal\mst at normalmv@operator\symmtoperatorfont
+  \expandafter\SetSymbolFont@ \expandafter\mv at bold\mst at boldmv@operator\symmtoperatorfont
+  \typeout{** ...done.}%
+}% \AtBeginDocument
+\fi % \ifmst at subdued
+%    \end{macrocode}
+%^^A  In the short-lived |1.15e| I was doing the following for alphabets:\\
+%^^A  |\def\mst at reservedc#1#2#3#4{\def\mst at normalmv@mathbf{#4#3}}|\\
+%^^A  |\def\mst at reserveda#1{%|\\
+%^^A  |\def\mst at reservedb##1\install at mathalphabet#1##2##3\@nil{\mst at reservedc##2}%|\\
+%^^A  |\expandafter\mst at reservedb\mv at normal\@nil}|\\
+%^^A  |\expandafter\mst at reserveda\csname mathbf\space\endcsname|\\
+%^^A  and later in the code:\\
+%^^A  |\expandafter\expandafter\expandafter\SetMathAlphabet@|\\
+%^^A  |\expandafter\expandafter\expandafter\mv at normal|\\
+%^^A  |\expandafter\mst at normalmv@mathbf\csname Mathbf\space \endcsname\Mathbf|\\
+%^^A  It does work! but |\let\mst at original@bf\mathbf| is so
+%^^A  much simpler. And also safer, because \cs{mathbf} could have been
+%^^A  redefined using \cs{DeclareSymbolFontAlphabet}... (I could have
+%^^A  provided the necessary check to the already bloated code...)
+% \end{macro}
+% \begin{macro}{Preamble-only...}
+% ``Only preamble'' restrictions. I was way too much obedient back in 2011,
+% particularly taking into account how much of a pain it has been and still is
+% that things such as \cs{DeclareMathSymbol} or \cs{DeclareMathAccent} are
+% preamble-only. But keeping this for time being, however not using
+% \cs{@onlypreamble} which breaks one's heart when tracing to see how much
+% place it takes, so we do it in one go.
+%    \begin{macrocode}
+\expandafter \gdef \expandafter \@preamblecmds \expandafter {\@preamblecmds
+\do\MTitgreek
+\do\MTupgreek
+\do\MTitGreek
+\do\MTitGreek
+\do\Mathastextitgreek
+\do\Mathastextupgreek
+\do\MathastextitGreek
+\do\MathastextitGreek
+\do\MTgreekfont
+\do\Mathastextgreekfont
+\do\MTDeclareVersion
+\do\MathastextDeclareVersion
+\do\MTWillUse
+\do\MathastextWillUse
+\do\Mathastextwilluse
+\do\Mathastext
+\do\mathastext
+}
 \endinput
 %    \end{macrocode}
 % \end{macro}
@@ -7961,7 +8269,7 @@
   Grave accent  \`     Left brace    \{     Vertical bar  \|
   Right brace   \}     Tilde         \~}
 
-\CheckSum{5692}
+\CheckSum{6010}
 \makeatletter\check at checksum\makeatother
 \Finale
 %%

Deleted: trunk/Master/texmf-dist/source/latex/mathastext/mathastext.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathastext/mathastext.ins	2019-08-19 23:53:25 UTC (rev 51913)
+++ trunk/Master/texmf-dist/source/latex/mathastext/mathastext.ins	2019-08-20 20:44:27 UTC (rev 51914)
@@ -1,56 +0,0 @@
-\def\MSTpkgdate    {2018/08/22}
-\def\MSTpkgversion {1.3t}
-%%----------------------------------------------------------------
-%% Package: mathastext
-%% Info:    Use the text font in math mode (JFB)
-%% Version: 1.3t 2018/08/22
-%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
-%% Copyright (C) 2011-2018 Jean-Francois Burnol <jfbu at free dot fr>
-%% Examples of use of mathastext:
-%%        http://jf.burnol.free.fr/mathastext.html
-%%        http://jf.burnol.free.fr/showcase.html
-%%----------------------------------------------------------------
-%% This is a generated file. "tex mathastext.ins" extracts mathastext.sty from
-%% mathastext.dtx as well as mathastext.tex (for typesetting the documentation),
-%% and some test files to check the package commands.
-%%
-%% See mathastext.dtx for the copyright and the conditions for distribution
-%% and/or modification of this work.
-%%
-\input docstrip.tex
-\askforoverwritefalse
-\def\testfilepreamble{%
-        \string\def\string\testfileincipit{Test file
-        to accompany \string\texttt{mathastext}^^J%
-        version \string\texttt{\MSTpkgversion} of \string\texttt{\MSTpkgdate}}}
-\generate{\nopreamble\nopostamble
-  \file{README.md}{\from{mathastext.dtx}{readme}}
-\usepostamble\defaultpostamble
-  \file{mathastext.tex}{\from{mathastext.dtx}{drv}}
-\usepreamble\testfilepreamble
-  \file{mathastexttestmathversions.tex}{\from{mathastext.dtx}{mathversions}}
-  \file{mathastexttestunicodemacos.tex}{\from{mathastext.dtx}{macos}}
-  \file{mathastexttestunicodelinux.tex}{\from{mathastext.dtx}{linux}}
-  \file{mathastexttestalphabets.tex}{\from{mathastext.dtx}{alphabets}}
-\usepreamble\defaultpreamble
-  \file{mathastext.sty}{\from{mathastext.dtx}{package}}%
-}
-\catcode32=13\relax% active space
-\let =\space%
-\Msg{************************************************************************}
-\Msg{*}
-\Msg{* To finish the installation you have to move the following}
-\Msg{* file into a directory searched by TeX:}
-\Msg{*}
-\Msg{*     mathastext.sty}
-\Msg{*}
-\Msg{* To produce the documentation run latex thrice on file mathastext.tex}
-\Msg{* and then run dvipdfmx on file mathastext.dvi}
-\Msg{*}
-\Msg{* Happy TeXing!}
-\Msg{*}
-\Msg{************************************************************************}
-\endbatchfile
-\endinput
-%%
-%% End of file `mathastext.ins'.

Modified: trunk/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mathastext/mathastext.sty	2019-08-19 23:53:25 UTC (rev 51913)
+++ trunk/Master/texmf-dist/tex/latex/mathastext/mathastext.sty	2019-08-20 20:44:27 UTC (rev 51914)
@@ -23,9 +23,9 @@
 %%----------------------------------------------------------------
 %% Package: mathastext
 %% Info:    Use the text font in math mode (JFB)
-%% Version: 1.3t 2018/08/22
+%% Version: 1.3u 2019/08/20
 %% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
-%% Copyright (C) 2011-2018 Jean-Francois Burnol <jfbu at free dot fr>
+%% Copyright (C) 2011-2019 Jean-Francois Burnol <jfbu at free dot fr>
 %% Examples of use of mathastext:
 %%        http://jf.burnol.free.fr/mathastext.html
 %%        http://jf.burnol.free.fr/showcase.html
@@ -32,11 +32,12 @@
 %%----------------------------------------------------------------
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage {mathastext}
-  [2018/08/22 v1.3t Use the text font in math mode (JFB)]
+  [2019/08/20 v1.3u Use the text font in math mode (JFB)]
   \let\mst at Umathcharnumdef\Umathcharnumdef
   \let\mst at Umathcodenum   \Umathcodenum
   \let\mst at Umathcode      \Umathcode
   \let\mst at Umathchardef   \Umathchardef
+  \let\mst at Umathaccent    \Umathaccent
 \newif\ifmst at XeTeX
 \ifx\XeTeXinterchartoks\@undefined
   \mst at XeTeXfalse
@@ -47,6 +48,7 @@
     \let\mst at Umathcodenum   \XeTeXmathcodenum
     \let\mst at Umathcode      \XeTeXmathcode
     \let\mst at Umathchardef   \XeTeXmathchardef
+    \let\mst at Umathaccent    \XeTeXmathaccent
   \fi
 \fi
 \newif\ifmst at LuaTeX
@@ -59,12 +61,13 @@
     \let\mst at Umathcodenum   \luatexUmathcodenum
     \let\mst at Umathcode      \luatexUmathcode
     \let\mst at Umathchardef   \luatexUmathchardef
+    \let\mst at Umathaccent    \luatexUmathaccent
   \fi
 \fi
 \newif\ifmst at XeOrLua
 \ifmst at LuaTeX\mst at XeOrLuatrue\fi
 \ifmst at XeTeX \mst at XeOrLuatrue\fi
-\def\mst at oti{OT1}\def\mst at ti{T1}\def\mst at lyi{LY1}
+\def\mst at oti{OT1}
 \def\mst at eui{EU1}\def\mst at euii{EU2}\def\mst at tu{TU}
 \def\mst at OneifUniEnc {%
     \ifx \mst at tmp@enc\mst at tu   1\else
@@ -85,27 +88,22 @@
         \def\mst at ltsh{\itdefault}}
     \DeclareOption{frenchmath}{\mst at frenchmathtrue\mst at italictrue
       \def\mst at ltsh{\itdefault}}
-%%
 \newif\ifmst at endash\mst at endashtrue
     \DeclareOption{endash}{\mst at endashtrue}
     \DeclareOption{noendash}{\mst at endashfalse}
 \newif\ifmst at emdash
     \DeclareOption{emdash}{\mst at emdashtrue\mst at endashfalse}
-%%
 \newif\ifmst at alldelims
 \edef\mst at tmp{\encodingdefault}\ifx\mst at oti\mst at tmp\else\mst at alldelimstrue\fi
     \DeclareOption{alldelims}{\mst at alldelimstrue}
     \DeclareOption{nolessnomore}{\mst at alldelimsfalse}
-%% new with 1.2
 \newif\ifmst at nosmalldelims
     \DeclareOption{nosmalldelims}{\mst at nosmalldelimstrue}
-%%
 \newif\ifmst at noplus
     \DeclareOption{noplus}{\mst at noplustrue}
 \newif\ifmst at nominus
     \DeclareOption{nominus}{\mst at nominustrue}
 \DeclareOption{noplusnominus}{\ExecuteOptions{noplus,nominus}}
-%%
 \newif\ifmst at noparen
     \DeclareOption{noparenthesis}{\mst at noparentrue}
 \newif\ifmst at nopunct
@@ -122,10 +120,9 @@
 \newif\ifmst at nospecials
     \DeclareOption{nospecials}{\mst at nospecialstrue}
 \newif\ifmst at basic % 1.3 to avoid unnecessary patch of amsmath \newmcodes@
-\DeclareOption{basic}{\mst at basictrue
+    \DeclareOption{basic}{\mst at basictrue
     \ExecuteOptions{noparenthesis,nopunctuation,%
                     noplusnominus,noequal,noexclam,nospecials,nolessnomore}}
-%%
 \newif\ifmst at nohbar
     \DeclareOption{nohbar}{\mst at nohbartrue}
 \newif\ifmst at nodigits
@@ -134,7 +131,8 @@
     \DeclareOption{defaultimath}{\mst at defaultimathtrue}
 \newif\ifmst at mathaccents
     \DeclareOption{mathaccents}{\mst at mathaccentstrue}
-%%
+\newif\ifmst at unimathaccents % 1.3u
+    \DeclareOption{unimathaccents}{\mst at mathaccentstrue\mst at unimathaccentstrue}
 \newif\ifmst at needsymbol
 \newif\ifmst at symboldelimiters
     \DeclareOption{symboldelimiters}{\mst at needsymboltrue\mst at symboldelimiterstrue}
@@ -148,9 +146,8 @@
     \DeclareOption{symbolre}{\mst at needsymboltrue\mst at symbolretrue}
 \newif\ifmst at symbolmisc
     \DeclareOption{symbolmisc}{\mst at needsymboltrue\mst at symbolmisctrue}
-\DeclareOption{symbol}{\ExecuteOptions{symbolgreek,symbolmisc,symbolre}}
-\DeclareOption{symbolmax}{\ExecuteOptions{symbol,symboldelimiters}}
-%%
+    \DeclareOption{symbol}{\ExecuteOptions{symbolgreek,symbolmisc,symbolre}}
+    \DeclareOption{symbolmax}{\ExecuteOptions{symbol,symboldelimiters}}
 \newif\ifmst at needeuler
 \newif\ifmst at eulerdigits
     \DeclareOption{eulerdigits}{\mst at needeulertrue\mst at eulerdigitstrue}
@@ -157,7 +154,6 @@
 \newif\ifmst at eulergreek
     \DeclareOption{eulergreek}{\mst at needeulertrue\mst at eulergreektrue
                                \mst at customgreektrue }
-%%
 \newif\ifmst at selfGreek
     \DeclareOption{selfGreek}{\mst at selfGreektrue\mst at customgreektrue}
 \newif\ifmst at selfGreeks
@@ -168,7 +164,6 @@
 \newif\ifmst at LGRgreeks
     \DeclareOption{LGRgreeks}{\mst at LGRgreekstrue\mst at LGRgreektrue
                               \mst at customgreektrue}
-%%
 \def\mst at greek@select{0}
 \newif\ifmst at itgreek
 \newif\ifmst at upgreek
@@ -176,7 +171,6 @@
     \DeclareOption{upgreek}{\mst at upgreektrue}
     \DeclareOption{itGreek}{\def\mst at greek@select{1}}
     \DeclareOption{upGreek}{\def\mst at greek@select{2}}
-%%
 \newif\ifmst at defaultnormal
     \DeclareOption{defaultnormal}{\mst at defaultnormaltrue}
 \newif\ifmst at defaultrm
@@ -293,8 +287,23 @@
       \let\resetMathstrut@\mst at savedresetMathstrut@}%
     \fi
     \let\mst at the\@gobble
-}
-\newcommand*\MTnonlettersobeymathxx{%
+}%
+\def\mst at OnlyIfNotSubdued#1{%
+    \ifmst at subdued
+      \def\mst at tmpa{normal}%
+      \ifx\math at version\mst at tmpa
+      \else
+        \def\mst at tmpa{bold}%
+        \ifx\math at version\mst at tmpa
+        \else
+          #1%
+        \fi
+      \fi
+    \else
+      #1%
+    \fi
+}%
+\def\mst at nonlettersobeymathxx{%
     \ifx\mst at the\the
     \else
       \@ifundefined{mst at savedresetMathstrut@}{}{%
@@ -314,14 +323,22 @@
       from amsmath replaced (for this group or environment)}}%
     \fi
     \let\mst at the\the
-}
-\newcommand*\MTeasynonlettersdonotobeymathxx{\let\mst at theeasy\@gobble}
-\newcommand*\MTeasynonlettersobeymathxx{\let\mst at theeasy\the}
-\MTeasynonlettersobeymathxx
-\newcommand*\MTmathactiveletters{\let\mst at thef\the \let\mst at theF\the}
-\ifmst at subdued\else\MTmathactiveletters\fi
-\newcommand*\MTmathactiveLetters{\let\mst at theF\the}
-\newcommand*\MTmathstandardletters{\let\mst at thef\@gobble \let\mst at theF\@gobble}
+}%
+\newcommand*\MTnonlettersobeymathxx
+   {\mst at OnlyIfNotSubdued\mst at nonlettersobeymathxx}%
+\newcommand*\MTeasynonlettersdonotobeymathxx{\let\mst at theeasy\@gobble}%
+\def\mst at easynonlettersobeymathxx{\let\mst at theeasy\the}%
+\newcommand*\MTeasynonlettersobeymathxx
+   {\mst at OnlyIfNotSubdued\mst at easynonlettersobeymathxx}%
+\MTeasynonlettersobeymathxx % no-op here if subdued mode
+\def\mst at mathactiveletters{\let\mst at thef\the \let\mst at theF\the}%
+\newcommand*\MTmathactiveletters
+   {\mst at OnlyIfNotSubdued\mst at mathactiveletters}%
+\MTmathactiveletters % no-op here if subdued mode
+\def\mst at mathactiveLetters{\let\mst at theF\the}%
+\newcommand*\MTmathactiveLetters
+   {\mst at OnlyIfNotSubdued\mst at mathactiveLetters}%
+\newcommand*\MTmathstandardletters{\let\mst at thef\@gobble \let\mst at theF\@gobble}%
 \newcommand*\MTicinmath{%
     \MTmathactiveletters
     \def\mst at itcorr{\ifnum\fam=\m at ne\/\fi}%
@@ -334,45 +351,6 @@
 \newcommand*\MTicalsoinmathxx{%
     \ifx\mst at itcorr\@empty\else\def\mst at itcorr{\/}\fi
     \ifx\mst at ITcorr\@empty\else\def\mst at ITcorr{\/}\fi}
-\AtEndOfPackage{\AtBeginDocument{%
-  \everymath\expandafter{\the\everymath
-    \mst at the\mst at do@nonletters \let\mst at the\@gobble
-    \mst at theeasy\mst at do@easynonletters  \let\mst at theeasy\@gobble
-    \mst at thef\mst at do@az \let\mst at thef\@gobble
-    \mst at theF\mst at do@AZ \let\mst at theF\@gobble}%
-  \everydisplay\expandafter{\the\everydisplay
-    \mst at the\mst at do@nonletters \let\mst at the\@gobble
-    \mst at theeasy\mst at do@easynonletters  \let\mst at theeasy\@gobble
-    \mst at thef\mst at do@az \let\mst at thef\@gobble
-    \mst at theF\mst at do@AZ \let\mst at theF\@gobble}%
-  \MTcustomizenewmcodes
-  \let\mst at imath\imath
-  \let\mst at jmath\jmath
-  \ifmst at subdued
-    \MTeverymathoff
-    \MTresetnewmcodes
-    \MTnoicinmath
-    \MTmathoperatorsdonotobeymathxx
-    \let\inodot\mst at imath
-    \let\jnodot\mst at jmath
-    \mst at subduedminus
-  \else
-     \mst at nonsubduedminus
-     \ifx\mst at itcorr\@undefined
-         \def\mst at itcorr{\ifnum\fam=\m at ne\/\fi}%
-         \@for\mst at tmp:=it,sl\do
-           {\ifx\mst at tmp\mst at ltshape@normal\let\mst at itcorr\@empty\fi }%
-     \fi
-     \ifx\mst at ITcorr\@undefined
-         \let\mst at ITcorr\mst at itcorr
-         \ifmst at frenchmath
-           \def\mst at ITcorr{\ifnum\fam=\m at ne\/\fi}%
-           \@for\mst at tmp:=it,sl\do
-                {\ifx\mst at tmp\mst at shape@normal\let\mst at ITcorr\@empty\fi }%
-         \fi
-     \fi
-  \fi
-}}
 \newcommand*\MTsetmathskips[3]{%
     \@namedef{mst at before#1}{\ifnum\fam=\m at ne\mskip#2\relax\fi }%
     \@namedef{mst at after#1}{\ifnum\fam=\m at ne\mskip#3\relax\fi }%
@@ -507,54 +485,6 @@
                                \let\newmcodes@\mst at originalnewmcodes@\fi}
 \newcommand*\MTcustomizenewmcodes{\ifx\mst at originalnewmcodes@\undefined\else
                                \let\newmcodes@\mst at newmcodes@\fi}
-\ifmst at subdued
-  \def\mst at reserved#1\getanddefine at fonts\symletters#2#3\@nil{%
-        \def\mst at normalmv@letter{#2}}
-  \expandafter\mst at reserved\mv at normal\@nil
-  \def\mst at reserved#1\getanddefine at fonts\symletters#2#3\@nil{%
-        \def\mst at boldmv@letter{#2}}
-  \expandafter\mst at reserved\mv at bold\@nil
-  \def\mst at reserved#1\getanddefine at fonts\symoperators#2#3\@nil{%
-        \def\mst at normalmv@operator{#2}}
-  \expandafter\mst at reserved\mv at normal\@nil
-  \def\mst at reserved#1\getanddefine at fonts\symoperators#2#3\@nil{%
-        \def\mst at boldmv@operator{#2}}
-  \expandafter\mst at reserved\mv at bold\@nil
-%%
-  \edef\mst at tmp@enc{\encodingdefault}
-  \def\mst at reserved#1/#2/#3/#4/{\gdef\mst at debut{#1}\gdef\mst at reste{#2/#3/#4}}
-  \begingroup\escapechar\m at ne
-      \xdef\mst at funnyoti{\expandafter\string\csname OT1\endcsname}
-      \expandafter\expandafter\expandafter
-          \mst at reserved\expandafter\string\mst at normalmv@operator/
-  \endgroup
-  \ifx\mst at debut\mst at funnyoti\ifx\mst at tmp@enc\mst at oti\def\mst at tmp@enc{T1}\fi\fi
-  \edef\mst at normalmv@operator{\expandafter\noexpand\csname
-       \if1\mst at OneifUniEnc
-         \ifx\mst at debut\mst at funnyoti T1\else\mst at debut\fi
-       \else
-         \mst at tmp@enc
-       \fi/\mst at reste\endcsname}
-  \begingroup\escapechar\m at ne
-      \expandafter\expandafter\expandafter
-          \mst at reserved\expandafter\string\mst at boldmv@operator/
-  \endgroup
-  \ifx\mst at debut\mst at funnyoti\ifx\mst at tmp@enc\mst at oti\def\mst at tmp@enc{T1}\fi\fi
-  \edef\mst at boldmv@operator{\expandafter\noexpand\csname
-       \if1\mst at OneifUniEnc
-         \ifx\mst at debut\mst at funnyoti T1\else\mst at debut\fi
-       \else
-         \mst at tmp@enc
-       \fi/\mst at reste\endcsname}
-  \AtEndOfPackage{
-  \typeout{** ...entering subdued mode...}
-  \expandafter\SetSymbolFont@ \expandafter\mv at normal\mst at normalmv@letter\symmtletterfont
-  \expandafter\SetSymbolFont@ \expandafter\mv at bold\mst at boldmv@letter\symmtletterfont
-  \expandafter\SetSymbolFont@ \expandafter\mv at normal\mst at normalmv@operator\symmtoperatorfont
-  \expandafter\SetSymbolFont@ \expandafter\mv at bold\mst at boldmv@operator\symmtoperatorfont
-  \typeout{** ...done.}
-  }
-\fi % fin de ce \ifmst at subdued
 \DeclareSymbolFont{mtoperatorfont}{\mst at enc}{\mst at fam}{\mst at ser}{\mst at opsh}
 \newcommand*{\MTmathoperatorsobeymathxx}
 {\def\operator at font{\mathgroup\ifnum\fam=\m at ne\symmtoperatorfont\else\fam\fi}}
@@ -715,425 +645,8 @@
 \let\Mathastextupgreek\MTupgreek
 \let\MathastextitGreek\MTitGreek
 \let\MathastextupGreek\MTupGreek
-\@onlypreamble\MTitgreek
-\@onlypreamble\MTupgreek
-\@onlypreamble\MTitGreek
-\@onlypreamble\MTitGreek
-\@onlypreamble\Mathastextitgreek
-\@onlypreamble\Mathastextupgreek
-\@onlypreamble\MathastextitGreek
-\@onlypreamble\MathastextitGreek
     \newcommand*\MTgreekfont[1]{\def\mst at greekfont{#1}}
 \let\Mathastextgreekfont\MTgreekfont
-\@onlypreamble\MTgreekfont
-\@onlypreamble\Mathastextgreekfont
-\newcommand*\MTWillUse[5][]{
-  \MTencoding{#2}
-  \MTfamily{#3}
-  \MTseries{#4}
-  \MTshape{#5}
-    \ifmst at italic\MTlettershape{\itdefault}\fi % was missing in v 1.14 and prior
-  \edef\mst at tmp{#1}
-  \ifx\mst at tmp\empty\else\MTlettershape{#1}\fi
-  \Mathastext}
-\let\MathastextWillUse\MTWillUse
-\let\Mathastextwilluse\MTWillUse
-\@onlypreamble\MTWillUse
-\@onlypreamble\MathastextWillUse
-\@onlypreamble\Mathastextwilluse
-\def\Mathastext {\@ifnextchar [\Mathastext at declare\Mathastext@ }
-\def\Mathastext at declare [#1]{%
-  \edef\mst at tmp{#1}%
-  \ifx\mst at tmp\empty
-       \expandafter\@firstoftwo
-  \else\expandafter\@secondoftwo
-  \fi
-  \Mathastext@
-  {\MTDeclareVersion[\mst at ltsh]{#1}{\mst at enc}{\mst at fam}{\mst at ser}{\mst at opsh}}%
-}
-\def\Mathastext@ {%
-  \mst at update@greeksh
-  \edef\mst at encoding@normal{\mst at enc}%
-  \edef\mst at family@normal{\mst at fam}%
-  \edef\mst at series@normal{\mst at ser}%
-  \edef\mst at shape@normal{\mst at opsh}%
-  \edef\mst at ltshape@normal{\mst at ltsh}%
-  \edef\mst at itdefault@normal{\itdefault}%
-  \edef\mst at rmdefault@normal{\rmdefault}%
-  \edef\mst at sfdefault@normal{\sfdefault}%
-  \edef\mst at ttdefault@normal{\ttdefault}%
-  \edef\mst at boldvariant@normal{\mst at bold}%
-  \edef\mst at exists@skip at normal{\mst at exists@skip}%
-  \edef\mst at forall@skip at normal{\mst at forall@skip}%
-  \edef\mst at prime@skip at normal{\mst at prime@skip}%
-  \edef\mst at encoding@bold{\mst at enc}%
-  \edef\mst at family@bold{\mst at fam}%
-  \edef\mst at series@bold{\mst at bold}%
-  \edef\mst at shape@bold{\mst at opsh}%
-  \edef\mst at ltshape@bold{\mst at ltsh}%
-  \edef\mst at boldvariant@bold{\mst at bold}%
-  \edef\mst at itdefault@bold{\itdefault}%
-  \edef\mst at rmdefault@bold{\rmdefault}%
-  \edef\mst at sfdefault@bold{\sfdefault}%
-  \edef\mst at ttdefault@bold{\ttdefault}%
-  \edef\mst at exists@skip at bold{\mst at exists@skip}%
-  \edef\mst at forall@skip at bold{\mst at forall@skip}%
-  \edef\mst at prime@skip at bold{\mst at prime@skip}%
-  \ifmst at subdued
-    \def\mst at exists@skip at normal{0mu}%
-    \def\mst at forall@skip at normal{0mu}%
-    \def\mst at prime@skip at normal{0mu}%
-    \def\mst at exists@skip at bold{0mu}%
-    \def\mst at forall@skip at bold{0mu}%
-    \def\mst at prime@skip at bold{0mu}%
-  \else % not subdued
-    \ifmst at italic
-      \ifmst at frenchmath
-        \mst at exists@muskip\mst at exists@skip\relax
-        \mst at forall@muskip\mst at forall@skip\relax
-        \mst at prime@muskip\mst at prime@skip\relax
-      \else
-       \def\mst at exists@skip at normal{0mu}%
-       \def\mst at forall@skip at normal{0mu}%
-       \def\mst at prime@skip at normal{0mu}%
-       \def\mst at exists@skip at bold{0mu}%
-       \def\mst at forall@skip at bold{0mu}%
-       \def\mst at prime@skip at bold{0mu}%
-      \fi
-    \else
-        \mst at exists@muskip\mst at exists@skip\relax
-        \mst at forall@muskip\mst at forall@skip\relax
-        \mst at prime@muskip\mst at prime@skip\relax
-    \fi
-  \fi
-%% v1.15f
-  \ifmst at nonormalbold\else
-   \SetMathAlphabet{\mathnormalbold}{normal}{\mst at encoding@normal}%
-                                 {\mst at family@normal}%
-                                 {\mst at boldvariant@normal}%
-                                 {\mst at ltshape@normal}%
-   \SetMathAlphabet{\mathnormalbold}{bold}{\mst at encoding@bold}%
-                                 {\mst at family@bold}%
-                                 {\mst at boldvariant@bold}%
-                                 {\mst at ltshape@bold}%
-  \fi
-%% v1.15f adds \ifmst at default.. checks
-  \ifmst at subdued\else
-   \SetSymbolFont{mtletterfont}{normal}{\mst at encoding@normal}%
-                                       {\mst at family@normal}%
-                                       {\mst at series@normal}%
-                                       {\mst at ltshape@normal}%
-   \SetSymbolFont{mtletterfont}{bold}  {\mst at encoding@bold}%
-                                       {\mst at family@bold}%
-                                       {\mst at series@bold}%
-                                       {\mst at ltshape@bold}%
-   \SetSymbolFont{mtoperatorfont}{normal}{\mst at encoding@normal}%
-                                       {\mst at family@normal}%
-                                       {\mst at series@normal}%
-                                       {\mst at shape@normal}%
-   \SetSymbolFont{mtoperatorfont}{bold} {\mst at encoding@bold}%
-                                       {\mst at family@bold}%
-                                       {\mst at series@bold}%
-                                       {\mst at shape@bold}%
-   \ifmst at defaultbf\else
-    \SetMathAlphabet{\Mathbf}{normal}{\mst at encoding@normal}%
-                                 {\mst at family@normal}%
-                                 {\mst at series@bold}%
-                                 {\mst at shape@normal}%
-    \SetMathAlphabet{\Mathbf}{bold}{\mst at encoding@bold}%
-                                 {\mst at family@bold}%
-                                 {\mst at series@bold}%
-                                 {\mst at shape@bold}%
-   \fi
-   \ifmst at defaultit\else
-    \SetMathAlphabet{\Mathit}{normal}{\mst at encoding@normal}%
-                                 {\mst at family@normal}%
-                                 {\mst at series@normal}%
-                                 {\mst at itdefault@normal}%
-    \SetMathAlphabet{\Mathit}{bold}{\mst at encoding@bold}%
-                                 {\mst at family@bold}%
-                                 {\mst at series@bold}%
-                                 {\mst at itdefault@bold}%
-   \fi
-   \ifmst at defaultsf\else
-    \SetMathAlphabet{\Mathsf}{normal}{\mst at encoding@normal}%
-                                 {\mst at sfdefault@normal}%
-                                 {\mst at series@normal}%
-                                 {\mst at shape@normal}%
-    \SetMathAlphabet{\Mathsf}{bold}{\mst at encoding@bold}%
-                                 {\mst at sfdefault@bold}%
-                                 {\mst at series@bold}%
-                                 {\mst at shape@bold}%
-   \fi
-   \ifmst at defaulttt\else
-    \SetMathAlphabet{\Mathtt}{normal}{\mst at encoding@normal}%
-                                 {\mst at ttdefault@normal}%
-                                 {\mst at series@normal}%
-                                 {\mst at shape@normal}%
-    \SetMathAlphabet{\Mathtt}{bold}{\mst at encoding@bold}%
-                                 {\mst at ttdefault@bold}%
-                                 {\mst at series@bold}%
-                                 {\mst at shape@bold}%
-   \fi
-  \fi % de \ifmst at subdued
-  \ifmst at needeuler
-    \SetSymbolFont{mteulervm}{bold}{U}{zeur}{\mst at boldvariant@normal}{n}%
-    \SetMathAlphabet{\MathEulerBold}{normal}%
-               {U}{zeur}{\mst at boldvariant@normal}{n}%
-    \SetMathAlphabet{\MathEulerBold}{bold}%
-               {U}{zeur}{\mst at boldvariant@normal}{n}%
-  \fi
-  \ifmst at needsymbol\SetSymbolFont{mtpsymbol}{bold}%
-                     {U}{psy}{\mst at boldvariant@normal}{n}%
-  \fi
-  \ifmst at subdued\else
-   \ifmst at LGRgreek
-    \SetSymbolFont{mtlgrfontlower}{normal}{LGR}%
-            {\mst at greekfont}{\mst at series@normal}{\mst at greek@lsh}%
-    \SetSymbolFont{mtlgrfontlower}{bold}{LGR}%
-            {\mst at greekfont}{\mst at boldvariant@normal}{\mst at greek@lsh}%
-    \SetSymbolFont{mtlgrfontupper}{normal}{LGR}%
-            {\mst at greekfont}{\mst at series@normal}{\mst at greek@ush}%
-    \SetSymbolFont{mtlgrfontupper}{bold}{LGR}%
-            {\mst at greekfont}{\mst at boldvariant@bold}{\mst at greek@ush}%
-   \else
-    \ifmst at selfGreek
-     \SetSymbolFont{mtselfGreekfont}{normal}{OT1}%
-            {\mst at greekfont}{\mst at series@normal}{\mst at greek@ush}%
-     \SetSymbolFont{mtselfGreekfont}{bold}{OT1}%
-            {\mst at greekfont}{\mst at boldvariant@bold}{\mst at greek@ush}%
-    \fi
-   \fi
-  \fi
-  \ifmst at subdued
-   \typeout{** subdued mode will be activated for the normal and bold math versions}%
-  \else
-   \typeout{** Latin letters in the normal (resp. bold) math versions are now^^J%
-            ** set up to use the fonts
-   \mst at encoding@normal/\mst at family@normal/\mst at series@normal%
-               (\mst at boldvariant@normal)/\mst at ltshape@normal}%
-   \ifmst at LGRgreek\typeout{** Greek letters (\mst at greek@lsh/\mst at greek@ush)
-                              will use LGR/\mst at greekfont}%
-   \fi
-   \ifmst at nodigits\else
-     \typeout{** Other characters (digits, ...) and \protect\log-like names will be^^J%
-              ** typeset with the \mst at shape@normal\space shape.}%
-   \fi
-  \fi
-}
-\let\mathastext\Mathastext
-\@onlypreamble\Mathastext
-\@onlypreamble\mathastext
-\newcommand*\MTDeclareVersion[6][]{%
-  \def\mst at declareversionargs{{#1}{#2}{#3}{#4}{#5}{#6}}%
-  \edef\mst at version{#2}%
-  \DeclareMathVersion{\mst at version}%
-  \MTDeclareVersion@
-}
-\newcommand*\MTDeclareVersion@[1][]{%
-    \edef\mst at tmp{#1}%
-    \ifx\mst at tmp\empty\else
-      \global\expandafter\let\csname mv@\mst at version\expandafter\endcsname
-                             \csname mv@#1\endcsname
-      \typeout{** Math version `\mst at version\string' inherits from `#1\string'.}%
-    \fi
-    \expandafter\MTDeclareVersion@@\mst at declareversionargs
-}
-\newcommand*\MTDeclareVersion@@[6]{%
-  \edef\mst at tmp{#1}%
-  \expandafter\edef\csname mst at encoding@\mst at version\endcsname{#3}%
-  \expandafter\edef\csname mst at family@\mst at version\endcsname{#4}%
-  \expandafter\edef\csname mst at series@\mst at version\endcsname{#5}%
-  \expandafter\edef\csname mst at shape@\mst at version\endcsname{#6}%
-  \expandafter\edef\csname mst at boldvariant@\mst at version\endcsname{\mst at bold}%
-  \expandafter\edef\csname mst at itdefault@\mst at version\endcsname{\itdefault}%
-  \expandafter\edef\csname mst at rmdefault@\mst at version\endcsname{\rmdefault}%
-  \expandafter\edef\csname mst at sfdefault@\mst at version\endcsname{\sfdefault}%
-  \expandafter\edef\csname mst at ttdefault@\mst at version\endcsname{\ttdefault}%
-  \expandafter\edef\csname mst at exists@skip@\mst at version\endcsname
-        {\mst at exists@skip}%
-  \expandafter\edef\csname mst at forall@skip@\mst at version\endcsname
-        {\mst at forall@skip}%
-  \expandafter\edef\csname mst at prime@skip@\mst at version\endcsname
-        {\mst at prime@skip}%
-  \ifx\mst at tmp\empty
-    \ifmst at italic
-      \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{\mst at ltsh}%
-      \typeout{** Latin letters in math version `#2\string' will use the font
-                  #3/#4/#5/\mst at ltsh^^J%
-               ** Other characters (digits, ...) and \protect\log-like names
-                    will be in #6 shape.}%
-      \expandafter\edef\csname mst at ltshape@\mst at version\endcsname{\mst at ltsh}%
-    \else
-      \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#6}%
-       \typeout{** Latin letters in math version `#2\string' will use the fonts
-                   #3/#4/#5(\mst at bold)/#6}%
-      \expandafter\edef\csname mst at ltshape@\mst at version\endcsname{#6}%
-    \fi
-  \else
-    \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#1}%
-    \typeout{** Latin letters in math version `#2\string' will use the font
-                #3/#4/#5/#1^^J%
-             ** Other characters (digits, ...) and \protect\log-like
-                names will be in #6 shape.}%
-      \expandafter\edef\csname mst at ltshape@\mst at version\endcsname{#1}%
-  \fi
-  \ifmst at nonormalbold\else
-       \SetMathAlphabet{\mathnormalbold}{#2}{#3}{#4}{\mst at bold}%
-                   {\csname mst at ltshape@\mst at version\endcsname}%
-  \fi
-  \SetSymbolFont{mtoperatorfont}{#2}{#3}{#4}{#5}{#6}%
-  \ifmst at defaultbf\else\SetMathAlphabet{\Mathbf}{#2}{#3}{#4}{\mst at bold}{#6}\fi
-  \ifmst at defaultit\else\SetMathAlphabet{\Mathit}{#2}{#3}{#4}{#5}{\itdefault}\fi
-  \ifmst at defaultsf\else\SetMathAlphabet{\Mathsf}{#2}{#3}{\sfdefault}{#5}{#6}\fi
-  \ifmst at defaulttt\else\SetMathAlphabet{\Mathtt}{#2}{#3}{\ttdefault}{#5}{#6}\fi
-  \ifmst at needeuler
-      \SetMathAlphabet{\MathEulerBold}{#2}{U}{zeur}{\mst at bold}{n}%
-  \fi
-  \def\mst at greek@lsh at loc{\csname mst at ltshape@\mst at version\endcsname}%
-  \def\mst at greek@ush at loc{\csname mst at shape@\mst at version\endcsname}%
-  \ifmst at itgreek\def\mst at greek@lsh at loc{\itdefault}%
-                     \def\mst at greek@ush at loc{\itdefault}\fi
-  \ifmst at upgreek\def\mst at greek@lsh at loc{\updefault}%
-                     \def\mst at greek@ush at loc{\updefault}\fi
-  \ifmst at frenchmath
-      \ifmst at itgreek\else
-      \ifmst at upgreek\else
-        \def\mst at greek@lsh at loc{\csname mst at shape@\mst at version\endcsname}%
-        \def\mst at greek@ush at loc{\csname mst at shape@\mst at version\endcsname}%
-      \fi\fi
-  \fi
-  \ifcase\mst at greek@select
-        \or\def\mst at greek@ush at loc{\itdefault}%
-        \or\def\mst at greek@ush at loc{\updefault}%
-  \fi
-  \ifmst at LGRgreeks
-      \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{#4}{#5}{\mst at greek@lsh at loc}%
-      \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{#4}{#5}{\mst at greek@ush at loc}%
-    \typeout{** Greek letters (\mst at greek@lsh at loc/\mst at greek@ush at loc) will use
-                LGR font #4\ifmst at subdued ^^J** (in non subdued versions)\fi}%
-  \else
-   \ifmst at selfGreeks
-      \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{#4}{#5}{\mst at greek@ush at loc}%
-     \typeout{** Capital Greek letters (\mst at greek@lsh at loc/\mst at greek@ush at loc)
-                 will use OT1 font #4\ifmst at subdued ^^J** (in non subdued versions)\fi}%
-   \else
-    \ifmst at LGRgreek
-      \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{\mst at greekfont}{#5}{\mst at greek@lsh at loc}%
-      \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{\mst at greekfont}{#5}{\mst at greek@ush at loc}%
-    \typeout{** Greek letters (\mst at greek@lsh at loc/\mst at greek@ush at loc) will use
-                LGR font \mst at greekfont\ifmst at subdued ^^J** (in non subdued versions)\fi}%
-    \else
-     \ifmst at selfGreek
-       \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{\mst at greekfont}{#5}{\mst at greek@ush at loc}%
-       \typeout{** Capital Greek letters (\mst at greek@lsh at loc/\mst at greek@ush at loc)
-                   will use OT1 font \mst at greekfont\ifmst at subdued ^^J** (in non subdued versions)\fi}%
-     \fi
-    \fi
-   \fi
-  \fi
-}
-\let\MathastextDeclareVersion\MTDeclareVersion
-\@onlypreamble\MTDeclareVersion
-\@onlypreamble\MathastextDeclareVersion
-\newcommand*\MTversion {\@ifstar\MTversion at s\MTversion@ }
-\newcommand*\MTversion at s [1]{\mathversion{#1}\MTversion@@ {#1}}
-\newcommand*\MTversion@ [2][]{%
-    \mathversion{#2}%
-    \edef\mst at tmpa{#1}%
-    \ifx\mst at tmpa\empty
-        \edef\mst at tmp{#2}%
-    \else
-        \let\mst at tmp\mst at tmpa
-    \fi
-    \edef\encodingdefault {\csname mst at encoding@\mst at tmp\endcsname}%
-    \edef\familydefault   {\csname mst at family@\mst at tmp\endcsname}%
-    \edef\seriesdefault   {\csname mst at series@\mst at tmp\endcsname}%
-    \edef\shapedefault    {\csname mst at shape@\mst at tmp\endcsname}%
-    \edef\bfdefault {\csname mst at boldvariant@\mst at tmp\endcsname}%
-    \edef\itdefault {\csname mst at itdefault@\mst at tmp\endcsname}%
-    \edef\rmdefault {\csname mst at rmdefault@\mst at tmp\endcsname}%
-    \edef\sfdefault {\csname mst at sfdefault@\mst at tmp\endcsname}%
-    \edef\ttdefault {\csname mst at ttdefault@\mst at tmp\endcsname}%
-    \usefont{\encodingdefault}{\familydefault}{\seriesdefault}{\shapedefault}%
-    \MTversion@@ {#2}%
-}
-\newcommand*\MTversion@@ [1]{%
-    \MTexistsdoesskip
-    \MTforalldoesskip
-    \MTprimedoesskip
-    \edef\mst at tmp{#1}%
-    \expandafter
-     \mst at exists@muskip\csname mst at exists@skip@\mst at tmp\endcsname\relax
-    \expandafter
-     \mst at forall@muskip\csname mst at forall@skip@\mst at tmp\endcsname\relax
-    \expandafter
-     \mst at prime@muskip\csname mst at prime@skip@\mst at tmp\endcsname\relax
-    \edef\mst at tmpa{\csname mst at ltshape@\mst at tmp\endcsname}%
-    \edef\mst at tmpb{\csname mst at shape@\mst at tmp\endcsname}%
-    \MTmathoperatorsobeymathxx
-    \MTeverymathdefault
-    \MTcustomizenewmcodes
-    \@for\mst at tmpc:=it,sl\do{\ifx\mst at tmpc\mst at tmpa\MTnoicinmath\fi}%
-    \ifmst at frenchmath
-      \def\mst at ITcorr{\ifnum\fam=\m at ne\/\fi}%
-      \@for\mst at tmpc:=it,sl\do{\ifx\mst at tmpc\mst at tmpb\MTnoICinmath\fi}%
-    \fi
-    \ifmst at subdued
-      \def\mst at tmpa{normal}%
-      \ifx\mst at tmp\mst at tmpa
-        \mst at restorealphabets
-        \MTstandardgreek
-        \MTmathoperatorsdonotobeymathxx
-        \MTnormalexists
-        \MTnormalforall
-        \MTeverymathoff
-        \MTresetnewmcodes
-        \let\inodot\mst at imath
-        \let\jnodot\mst at jmath
-        \mst at subduedminus
-      \else
-        \def\mst at tmpa{bold}%
-        \ifx\mst at tmp\mst at tmpa
-          \mst at restorealphabets
-          \MTstandardgreek
-          \MTmathoperatorsdonotobeymathxx
-          \MTnormalexists
-          \MTnormalforall
-          \MTeverymathoff
-          \MTresetnewmcodes
-          \let\inodot\mst at imath
-          \let\jnodot\mst at jmath
-          \mst at subduedminus
-        \else
-          \mst at setalphabets
-          \MTcustomgreek
-          \let\inodot\mst at inodot
-          \let\jnodot\mst at jnodot
-          \mst at nonsubduedminus
-        \fi
-      \fi
-    \else
-      \MTcustomgreek % new with 1.3d
-    \fi
-}
-\let\MathastextVersion\MTversion
-\let\Mathastextversion\MTversion
-\let\MTVersion\MTversion
-\let\mathastextversion\MTversion
-\Mathastext
-\ifmst at eulergreek
-      \typeout{** Greek letters will use the Euler font. Use \protect\MathastextEulerScale{<factor>} to scale the
-               font.}%
-      \ifmst at subdued{\typeout{** (subdued mode: normal and bold math
-          version with default Greek letters.)}}\fi
-\else
-\ifmst at symbolgreek
-       \typeout{** Greek letters will use the PostScript Symbol font. Use^^J%
-                ** \protect\MathastextSymbolScale{<factor>} to scale the font.}%
-      \ifmst at subdued{\typeout{** (subdued mode: normal and bold math
-          version with default Greek letters.)}}\fi
-\fi\fi
 \def\mst at DeclareMathLetter #1{%
     \DeclareMathSymbol {#1}{\mathalpha}{mtletterfont}{`#1}%
     \expandafter
@@ -1154,7 +667,6 @@
 \@tfor\mst at tmp:=ABCDEFGHIJKLMNOPQRSTUVWXYZ\do
      {\expandafter\mst at DeclareMathLetter\mst at tmp}%
 \let\mst at DeclareMathLetter\relax
-%%
 \ifmst at nodigits\else
 \def\mst at font@tbu{mtoperatorfont}%
 \ifmst at symboldigits \def\mst at font@tbu{mtpsymbol} \fi
@@ -1276,113 +788,81 @@
   \cleaders\hbox{$\mkern-2mu\relbar\mkern-2mu$}\hfill
   \mkern-7mu\mathord{\relbar}$}
 \fi
-\def\mst at dothe@endashstuff{\edef\mst at tmp@enc{\encodingdefault}
-\if1\mst at OneifUniEnc
-  \AtBeginDocument{% Unicode engines and font
-    \mst at Umathcode`\-=2 \symmtoperatorfont "\mst at unicodeminus\relax
-    \mst at Umathchardef\mst at varfam@minus=7 \symmtoperatorfont "\mst at unicodeminus\relax
-  }
-\else
-\ifx\mst at tmp@enc\mst at ti % T1
-   \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{21}
-   \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}{21}
-\else
-\ifx\mst at tmp@enc\mst at oti % OT1
-   \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{123}
-   \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}{123}
-\else
-\ifx\mst at tmp@enc\mst at lyi % LY1
-   \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{150}
-   \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}{150}
-\else % make sure we have neither xetex nor luatex
- \ifmst at XeOrLua\mst at aborttrue
- \else
-   \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
-{\expandafter\the\expandafter\csname\mst at tmp@enc\string\textendash\endcsname}
-   \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}
-{\expandafter\the\expandafter\csname\mst at tmp@enc\string\textendash\endcsname}
- \fi
-\fi\fi\fi\fi}
-\def\mst at dothe@emdashstuff{\edef\mst at tmp@enc{\encodingdefault}
-\if1\mst at OneifUniEnc
-  \AtBeginDocument{% Unicode engine and font
-    \mst at Umathcode`\-=2 \symmtoperatorfont "2014\relax
-    \mst at Umathchardef\mst at varfam@minus=7 \symmtoperatorfont "2014\relax
-  }
-\else
-\ifx\mst at tmp@enc\mst at ti % T1
-   \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{22}
-   \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}{22}
-\else
-\ifx\mst at tmp@enc\mst at oti % OT1
-   \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{124}
-   \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}{124}
-\else
-\ifx\mst at tmp@enc\mst at lyi % LY1
-   \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{151}
-   \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}{151}
-\else % make sure we have neither xetex nor luatex
- \ifmst at XeOrLua\mst at aborttrue
- \else
-   \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
-{\expandafter\the\expandafter\csname\mst at tmp@enc\string\textemdash\endcsname}
-   \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}
-{\expandafter\the\expandafter\csname\mst at tmp@enc\string\textemdash\endcsname}
- \fi
-\fi\fi\fi\fi}
 \let\mst at subduedminus\empty
 \let\mst at nonsubduedminus\empty
-\ifmst at nominus\else\typeout{** minus as endash}
-  \edef\mst at tmp@enc{\encodingdefault}
-  \ifmst at XeOrLua
-    \if1\mst at OneifUniEnc\expandafter\AtBeginDocument
-          \else\expandafter\@firstofone
-    \fi
-    {\edef\mst at subduedminus
-       {\mst at Umathcodenum`\noexpand\-=\the\mst at Umathcodenum`\-\relax}}%
+\def\mst at dothe@endashstuff#1#2#3{%
+  \edef\mst at tmp@enc{#3}%
+  \if1\mst at OneifUniEnc
+    \mst at Umathchardef#1=2 \symmtoperatorfont "\mst at unicodeminus\relax
+    \mst at Umathchardef#2=7 \symmtoperatorfont "\mst at unicodeminus\relax
   \else
-    \edef\mst at subduedminus{\mathcode`\noexpand\-=\the\mathcode`\-\relax}%
-  \fi
-  \mst at abortfalse
-  \ifmst at endash\mst at dothe@endashstuff\else
-  \ifmst at emdash\mst at dothe@emdashstuff\else
-     \if1\mst at OneifUniEnc\expandafter\AtBeginDocument
-         \else\expandafter\@firstofone
-     \fi
-     {\DeclareMathSymbol{-}{\mathbin}{\mst at font@tbu}{"2D}%
-      \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{\mst at font@tbu}{"2D}}%
-  \fi\fi
-  \ifmst at abort
-    \DeclareMathSymbol{-}{\mathbin}{\mst at font@tbu}{"2D}
-    \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{\mst at font@tbu}{"2D}
-  \fi
+    \DeclareMathSymbol{#1}{\mathbin}{mtoperatorfont}
+                      {\csname\mst at tmp@enc\string\textendash\endcsname}
+    \DeclareMathSymbol{#2}{\mathalpha}{mtoperatorfont}
+                      {\csname\mst at tmp@enc\string\textendash\endcsname}
+  \fi}% mst at dothe@endashstuff
+\def\mst at dothe@emdashstuff#1#2#3{%
+  \edef\mst at tmp@enc{#3}%
+  \if1\mst at OneifUniEnc
+    \mst at Umathchardef#1=2 \symmtoperatorfont "2014\relax
+    \mst at Umathchardef#2=7 \symmtoperatorfont "2014\relax
+  \else
+    \DeclareMathSymbol{#1}{\mathbin}{mtoperatorfont}
+                      {\csname\mst at tmp@enc\string\textemdash\endcsname}
+    \DeclareMathSymbol{#2}{\mathalpha}{mtoperatorfont}
+                      {\csname\mst at tmp@enc\string\textemdash\endcsname}
+  \fi}% mst at dothe@emdashstuff
+\def\mst at dothe@hyphenstuff#1#2{%
+  \DeclareMathSymbol{#1}{\mathbin}{\mst at font@tbu}{"2D}%
+  \DeclareMathSymbol{#2}{\mathalpha}{\mst at font@tbu}{"2D}%
+}%
+\def\mst at varfam@minus{\@nameuse{mst at varfam@minus at mv\math at version}}%
+\ifmst at nominus\else
   \expandafter\mst at addtodo@nonletters\string-\mathbin\mst at varfam@minus
-  \ifmst at XeOrLua
-     \if1\mst at OneifUniEnc\expandafter\AtBeginDocument
-         \else\expandafter\@firstofone
-     \fi
-     {\edef\mst at nonsubduedminus
-        {\mst at Umathcodenum`\noexpand\-=\the\mst at Umathcodenum`\-\relax}}%
-  \else
-    \edef\mst at nonsubduedminus{\mathcode`\noexpand\-=\the\mathcode`\-\relax}%
-  \fi
+  \def\mst at nonsubduedminus{%
+    \edef\mst at tmp@enc{\csname mst at encoding@\math at version\endcsname}%
+    \if1\mst at OneifUniEnc
+     \mst at Umathcode`\-=\expandafter
+     % Working around a bug (or feature...) of XeTeX/LuaTeX: afaict it is
+     % impossible to use straightforwardly in extended mathcode assignments
+     % a control sequence as created by \Umathchardef.
+     % This is counter-intuitive and breaks expectations.
+                       \mst at UmathchardefWorkAround@i
+                       \csname mst at minus@mv\math at version\endcsname
+                       \relax
+    \else
+     \mathcode`\-=\@nameuse{mst at minus@mv\math at version}% self-delimiting
+    \fi
+   }% \mst at nonsubduedminus
 \fi
-%%\def\hbar{{\mathchar'26\mkern-9muh}} % (original definition from latex.ltx)
+\def\mst at UmathchardefWorkAround@i
+    {\expandafter\mst at UmathchardefWorkAround@ii\meaning}%
+\def\mst at UmathchardefWorkAround@ii#1"{"}%
+\let\mst at subduedhbar\@empty
+\let\mst at nonsubduedhbar\@empty
+\ifmst at nohbar\else
+  \def\mst at subduedhbar{\let\hbar\mst at original@hbar}%
+  \def\mst at nonsubduedhbar{%
+      \expandafter\let\expandafter\hbar
+                  \csname mst at hbar@mv\math at version\endcsname
+  }%
+\fi
 \def\mst at mathrlap{\mathpalette\mst at mathrlapinternal}
 \def\mst at mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}}
-\def\mst at dothe@hbarstuff{\edef\mst at tmp@enc{\encodingdefault}
-\if1\mst at OneifUniEnc
-   % Unicode engine and font
-   \mst at Umathchardef\hbar="7 \symmtletterfont "0127 \relax %% or 210F?
-\else % I must leave open the T1, OT1 possibility also for XeTeX or LuaTeX
-    \ifx\mst at ti\mst at tmp@enc
-    \DeclareMathAccent{\mst at ltbar}{\mathalpha}{mtletterfont}{9}
-       \else  %% assume OT1. Bad idea? Should not provoke an error anyhow
-    \DeclareMathAccent{\mst at ltbar}{\mathalpha}{mtletterfont}{22}
-    \fi
-    \def\hbar{\mst at mathrlap{\mst at ltbar{\ }}h}
-\fi }
-\ifmst at nohbar\else\typeout{** \string\hbar}\mst at dothe@hbarstuff\fi
+\def\mst at dothe@hbarstuff#1#2#3{%
+  \edef\mst at tmp@enc{#3}%
+  \if1\mst at OneifUniEnc % Unicode engine and font
+    \mst at Umathchardef#1="7 \symmtletterfont "0127 \relax %% or 210F?
+  \else
+    \begingroup
+    \def\@text at composite##1\@text at composite##2{##2}%
+    \let\add at accent\@firstoftwo
+    \DeclareMathAccent{#2}{\mathalpha}{mtletterfont}%
+                      {\csname\mst at tmp@enc\string\=\endcsname{}}%
+    \endgroup
+    \def#1{\mst at mathrlap{#2{\ }}\mst at h}%
+  \fi
+}% end of \mst at dothe@hbarstuff
 \ifmst at noplus\else\typeout{** \string+ and \string=}
 \DeclareMathSymbol{+}{\mathbin}{\mst at font@tbu}{"2B}
 \DeclareMathSymbol{\mst at varfam@plus}{\mathalpha}{\mst at font@tbu}{"2B}
@@ -1871,7 +1351,7 @@
     \let\mst at origdigamma\digamma
     \let\mst at origpartial\partial
     \let\mst at origwp\wp
-    \let\mst at origell\ell }
+    \let\mst at origell\ell }% \MTrecordstandardgreek
 \MTrecordstandardgreek
 \renewcommand*{\MTstandardgreek}{%
     \let\Alpha\mst at origAlpha
@@ -1933,7 +1413,7 @@
     \let\partial\mst at origpartial
     \let\wp\mst at origwp
     \let\ell\mst at origell
-}
+}% \MTstandardgreek
 \renewcommand*{\MTcustomgreek}{%
     \let\Alpha\mst at Alpha
     \let\Beta\mst at Beta
@@ -1998,79 +1478,635 @@
       \ifmst at symbolgreek\else\let\ell\mst at ell\fi
     \fi
  \fi
-}
+}% \MTcustomgreek
 \fi
 \let\Mathastextstandardgreek\MTstandardgreek
 \let\Mathastextcustomgreek\MTcustomgreek
 \ifmst at subdued\else\MTcustomgreek\fi
-\edef\mst at tmp@enc{\encodingdefault}
-\mst at goaheadtrue
-\if1\mst at OneifUniEnc
-  % Unicode engine and font
-  \mst at Umathchardef\inodot="7 \symmtletterfont "0131 \relax
-  \mst at Umathchardef\jnodot="7 \symmtletterfont "0237 \relax
-\else
-\ifx\mst at tmp@enc\mst at ti % T1
-   \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}{25}
-   \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}{26}
-\else
-\ifx\mst at tmp@enc\mst at oti % OT1
-   \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}{16}
-   \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}{17}
-\else
-\ifx\mst at tmp@enc\mst at lyi % LY1
-   \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}{16}
-   \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}{17}
-\else
-   \ifmst at XeOrLua\mst at goaheadfalse\else
-   \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}
-{\expandafter\the\expandafter\csname\mst at tmp@enc\string\i\endcsname}
-   \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}
-{\expandafter\the\expandafter\csname\mst at tmp@enc\string\j\endcsname}
-   \fi
-\fi\fi\fi\fi
-\let\mst at inodot\inodot
-\let\mst at jnodot\jnodot
+\def\mst at subduedinodot{%
+   \let\inodot\mst at original@imath
+   \let\jnodot\mst at original@jmath
+}%
+\def\mst at nonsubduedinodot{%
+   \expandafter\let\expandafter\inodot
+               \csname mst at inodot@mv\math at version\endcsname
+   \expandafter\let\expandafter\jnodot
+               \csname mst at jnodot@mv\math at version\endcsname
+}%
+\def\mst at dothe@inodotstuff#1#2#3{%
+  \edef\mst at tmp@enc{#3}%
+  \if1\mst at OneifUniEnc
+    % Unicode engine and font
+    \mst at Umathchardef#1="7 \symmtletterfont "0131 \relax
+    \mst at Umathchardef#2="7 \symmtletterfont "0237 \relax
+  \else
+   \DeclareMathSymbol{#1}{\mathalpha}{mtletterfont}
+                     {\csname\mst at tmp@enc\string\i\endcsname}
+   \DeclareMathSymbol{#2}{\mathalpha}{mtletterfont}
+                     {\csname\mst at tmp@enc\string\j\endcsname}
+  \fi}% \mst at dothe@inodotstuff
 \ifmst at defaultimath\else\typeout{** \string\imath\space and \string\jmath\space}
-  \ifmst at goahead
     \AtEndOfPackage{\AtBeginDocument{%
         \renewcommand*{\imath}{\inodot}%
         \renewcommand*{\jmath}{\jnodot}%
     }}%
-  \fi
 \fi
-\edef\mst at tmp@enc{\encodingdefault} %% rather one too many than sorry
-\ifmst at mathaccents\typeout{** math accents}
-\ifx\mst at ti\mst at tmp@enc
-\DeclareMathAccent{\acute}{\mathalpha}{mtoperatorfont}{1}
-\DeclareMathAccent{\grave}{\mathalpha}{mtoperatorfont}{0}
-\DeclareMathAccent{\ddot}{\mathalpha}{mtoperatorfont}{4}
-\DeclareMathAccent{\tilde}{\mathalpha}{mtoperatorfont}{3}
-\DeclareMathAccent{\bar}{\mathalpha}{mtoperatorfont}{9}
-\DeclareMathAccent{\breve}{\mathalpha}{mtoperatorfont}{8}
-\DeclareMathAccent{\check}{\mathalpha}{mtoperatorfont}{7}
-\DeclareMathAccent{\hat}{\mathalpha}{mtoperatorfont}{2}
-\DeclareMathAccent{\dot}{\mathalpha}{mtoperatorfont}{10}
-\DeclareMathAccent{\mathring}{\mathalpha}{mtoperatorfont}{6}
-\else
-\DeclareMathAccent{\acute}{\mathalpha}{mtoperatorfont}{19}
-\DeclareMathAccent{\grave}{\mathalpha}{mtoperatorfont}{18}
-\DeclareMathAccent{\ddot}{\mathalpha}{mtoperatorfont}{127}
-\DeclareMathAccent{\tilde}{\mathalpha}{mtoperatorfont}{126}
-\DeclareMathAccent{\bar}{\mathalpha}{mtoperatorfont}{22}
-\DeclareMathAccent{\breve}{\mathalpha}{mtoperatorfont}{21}
-\DeclareMathAccent{\check}{\mathalpha}{mtoperatorfont}{20}
-\DeclareMathAccent{\hat}{\mathalpha}{mtoperatorfont}{94}
-\DeclareMathAccent{\dot}{\mathalpha}{mtoperatorfont}{95}
-\DeclareMathAccent{\mathring}{\mathalpha}{mtoperatorfont}{23}
-  \ifx\mst at lyi\mst at tmp@enc   % LY1 encoding
-    \DeclareMathAccent{\dot}{\mathalpha}{mtoperatorfont}{5}
+\let\mst at subduedmathaccents\@empty
+\let\mst at nonsubduedmathaccents\@empty
+\ifmst at mathaccents
+\def\mst at subduedmathaccents{%
+  \@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
+                 {dot}{ddot}{mathring}{hat}{tilde}%
+  \do
+  {\expandafter\let\csname\@tempa\expandafter\endcsname
+                   \csname mst at original@\@tempa\endcsname}%
+}%
+\def\mst at nonsubduedmathaccents{%
+  \@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
+                 {dot}{ddot}{mathring}{hat}{tilde}%
+  \do
+  {\expandafter\let\csname\@tempa\expandafter\endcsname
+                   \csname mst@\@tempa @mv\math at version\endcsname}%
+}%
+\def\mst at dothe@mathaccentsstuff#1#2{%
+  \begingroup
+  \edef\mst at tmp@enc{#2}%
+  \def\@text at composite##1\@text at composite##2{##2}%
+  \let\add at accent\@firstoftwo
+  \let\add at unicode@accent\@firstoftwo
+  \if1\mst at OneifUniEnc
+    \ifmst at unimathaccents
+      % \` -> \grave
+      \expandafter\xdef\csname mst at grave@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\`\endcsname{}\relax}%
+      % \' -> \acute
+      \expandafter\xdef\csname mst at acute@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\'\endcsname{}\relax}%
+      % \v -> \check
+      \expandafter\xdef\csname mst at check@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\v\endcsname{}\relax}%
+      % \u -> \breve
+      \expandafter\xdef\csname mst at breve@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\u\endcsname{}\relax}%
+      % \= -> \bar
+      \expandafter\xdef\csname mst at bar@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\=\endcsname{}\relax}%
+      % \. -> \dot
+      \expandafter\xdef\csname mst at dot@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\.\endcsname{}\relax}%
+      % \" -> \ddot
+      \expandafter\xdef\csname mst at ddot@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\"\endcsname{}\relax}%
+      % \r -> \mathring
+      \expandafter\xdef\csname mst at mathring@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\r\endcsname{}\relax}%
+      % \^ -> \hat
+      \expandafter\xdef\csname mst at hat@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\^\endcsname{}\relax}%
+      % \~ -> \tilde
+      \expandafter\xdef\csname mst at tilde@mv#1\endcsname
+       {\mst at Umathaccent
+        7
+        \number\symmtoperatorfont\space
+        \csname#2\string\~\endcsname{}\relax}%
+    \else
+      \@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
+                     {dot}{ddot}{mathring}{hat}{tilde}%
+      \do
+      {\expandafter\gdef\csname mst@\@tempa @mv#1\expandafter\endcsname
+                   \expandafter{\csname mst at original@\@tempa\endcsname}}%
+    \fi
   \else
-     \ifx\mst at oti\mst at tmp@enc\else
-      \typeout{** mathastext: math accents have been assumed to be^^J%
-        ** as in OT1 encoding.}
+    % \` -> \grave
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at grave@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\`\endcsname{}}
+    % \' -> \acute
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at acute@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\'\endcsname{}}
+    % \v -> \check
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at check@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\v\endcsname{}}
+    % \u -> \breve
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at breve@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\u\endcsname{}}
+    % \= -> \bar
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at bar@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\=\endcsname{}}
+    % \. -> \dot
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at dot@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\.\endcsname{}}
+    % \" -> \ddot
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at ddot@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\"\endcsname{}}
+    % \r -> \mathring
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at mathring@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\r\endcsname{}}
+    % \^ -> \hat
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at hat@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\^\endcsname{}}
+    % \~ -> \tilde
+    \expandafter\DeclareMathAccent\expandafter
+               {\csname mst at tilde@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+               {\csname#2\string\~\endcsname{}}
+  \fi
+  \endgroup
+}%
+\fi % \ifmst at mathaccents
+\newcommand*\MTDeclareVersion[6][]{%
+  \edef\mst at declareversionargs{{#1}{#2}{#3}{#4}{#5}{#6}}%
+  \edef\mst at version{#2}%
+  \DeclareMathVersion{\mst at version}%
+  \MTDeclareVersion@
+}% \MTDeclareVersion
+\newcommand*\MTDeclareVersion@[1][]{%
+    \edef\mst at tmp{#1}%
+    \ifx\mst at tmp\empty\else
+      \global\expandafter\let\csname mv@\mst at version\expandafter\endcsname
+                             \csname mv@#1\endcsname
+      \typeout{** Math version `\mst at version\string' inherits from `#1\string'.}%
+    \fi
+    \expandafter\MTDeclareVersion@@\mst at declareversionargs
+}% \MTDeclareVersion@
+\newcommand*\MTDeclareVersion@@[6]{%
+  \expandafter\edef\csname mst at encoding@\mst at version\endcsname{#3}%
+  \expandafter\edef\csname mst at family@\mst at version\endcsname{#4}%
+  \expandafter\edef\csname mst at series@\mst at version\endcsname{#5}%
+  \expandafter\edef\csname mst at shape@\mst at version\endcsname{#6}%
+  \expandafter\edef\csname mst at boldvariant@\mst at version\endcsname{\mst at bold}%
+  \expandafter\edef\csname mst at itdefault@\mst at version\endcsname{\itdefault}%
+  \expandafter\edef\csname mst at rmdefault@\mst at version\endcsname{\rmdefault}%
+  \expandafter\edef\csname mst at sfdefault@\mst at version\endcsname{\sfdefault}%
+  \expandafter\edef\csname mst at ttdefault@\mst at version\endcsname{\ttdefault}%
+  \expandafter\edef\csname mst at exists@skip@\mst at version\endcsname
+        {\mst at exists@skip}%
+  \expandafter\edef\csname mst at forall@skip@\mst at version\endcsname
+        {\mst at forall@skip}%
+  \expandafter\edef\csname mst at prime@skip@\mst at version\endcsname
+        {\mst at prime@skip}%
+  \def\mst at tmp{#1}%
+  \ifx\mst at tmp\empty
+    \ifmst at italic
+      \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{\mst at ltsh}%
+      \typeout{** Latin letters in math version `#2\string' will use the font
+                  #3/#4/#5/\mst at ltsh^^J%
+               ** Other characters (digits, ...) and \protect\log-like names
+                    will be in #6 shape.}%
+      \expandafter\edef\csname mst at ltshape@\mst at version\endcsname{\mst at ltsh}%
+    \else
+      \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#6}%
+       \typeout{** Latin letters in math version `#2\string' will use the fonts
+                   #3/#4/#5(\mst at bold)/#6}%
+      \expandafter\edef\csname mst at ltshape@\mst at version\endcsname{#6}%
+    \fi
+  \else
+    \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#1}%
+    \typeout{** Latin letters in math version `#2\string' will use the font
+                #3/#4/#5/#1^^J%
+             ** Other characters (digits, ...) and \protect\log-like
+                names will be in #6 shape.}%
+      \expandafter\edef\csname mst at ltshape@\mst at version\endcsname{#1}%
+  \fi
+  \ifmst at nonormalbold\else
+       \SetMathAlphabet{\mathnormalbold}{#2}{#3}{#4}{\mst at bold}%
+                   {\csname mst at ltshape@\mst at version\endcsname}%
+  \fi
+  \SetSymbolFont{mtoperatorfont}{#2}{#3}{#4}{#5}{#6}%
+  \ifmst at defaultbf\else\SetMathAlphabet{\Mathbf}{#2}{#3}{#4}{\mst at bold}{#6}\fi
+  \ifmst at defaultit\else\SetMathAlphabet{\Mathit}{#2}{#3}{#4}{#5}{\itdefault}\fi
+  \ifmst at defaultsf\else\SetMathAlphabet{\Mathsf}{#2}{#3}{\sfdefault}{#5}{#6}\fi
+  \ifmst at defaulttt\else\SetMathAlphabet{\Mathtt}{#2}{#3}{\ttdefault}{#5}{#6}\fi
+  \ifmst at needeuler
+      \SetMathAlphabet{\MathEulerBold}{#2}{U}{zeur}{\mst at bold}{n}%
+  \fi
+  \def\mst at greek@lsh at loc{\csname mst at ltshape@\mst at version\endcsname}%
+  \def\mst at greek@ush at loc{\csname mst at shape@\mst at version\endcsname}%
+  \ifmst at itgreek\def\mst at greek@lsh at loc{\itdefault}%
+                     \def\mst at greek@ush at loc{\itdefault}%
+  \fi
+  \ifmst at upgreek\def\mst at greek@lsh at loc{\updefault}%
+                     \def\mst at greek@ush at loc{\updefault}%
+  \fi
+  \ifmst at frenchmath
+      \ifmst at itgreek\else
+      \ifmst at upgreek\else
+        \def\mst at greek@lsh at loc{\csname mst at shape@\mst at version\endcsname}%
+        \def\mst at greek@ush at loc{\csname mst at shape@\mst at version\endcsname}%
+      \fi\fi
+  \fi
+  \ifcase\mst at greek@select
+        \or\def\mst at greek@ush at loc{\itdefault}%
+        \or\def\mst at greek@ush at loc{\updefault}%
+  \fi
+  \ifmst at LGRgreeks
+      \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{#4}{#5}{\mst at greek@lsh at loc}%
+      \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{#4}{#5}{\mst at greek@ush at loc}%
+    \typeout{** Greek letters (\mst at greek@lsh at loc/\mst at greek@ush at loc) will use
+                LGR font #4\ifmst at subdued ^^J** (in non subdued versions)\fi}%
+  \else
+   \ifmst at selfGreeks
+      \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{#4}{#5}{\mst at greek@ush at loc}%
+     \typeout{** Capital Greek letters (\mst at greek@lsh at loc/\mst at greek@ush at loc)
+                 will use OT1 font #4\ifmst at subdued ^^J** (in non subdued versions)\fi}%
+   \else
+    \ifmst at LGRgreek
+      \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{\mst at greekfont}{#5}{\mst at greek@lsh at loc}%
+      \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{\mst at greekfont}{#5}{\mst at greek@ush at loc}%
+    \typeout{** Greek letters (\mst at greek@lsh at loc/\mst at greek@ush at loc) will use
+                LGR font \mst at greekfont\ifmst at subdued ^^J** (in non subdued versions)\fi}%
+    \else
+     \ifmst at selfGreek
+       \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{\mst at greekfont}{#5}{\mst at greek@ush at loc}%
+       \typeout{** Capital Greek letters (\mst at greek@lsh at loc/\mst at greek@ush at loc)
+                   will use OT1 font \mst at greekfont\ifmst at subdued ^^J** (in non subdued versions)\fi}%
+     \fi
+    \fi
+   \fi
+  \fi
+  \edef\mst at tmp{\expandafter\noexpand\csname mst at hbar@mv#2\endcsname
+                \expandafter\noexpand\csname mst at ltbar@mv#2\endcsname}%
+  \expandafter\mst at dothe@hbarstuff\mst at tmp{#3}%
+  \edef\mst at tmp{\expandafter\noexpand\csname mst at inodot@mv#2\endcsname
+                \expandafter\noexpand\csname mst at jnodot@mv#2\endcsname}%
+  \expandafter\mst at dothe@inodotstuff\mst at tmp{#3}%
+  \ifmst at mathaccents
+    \mst at dothe@mathaccentsstuff{#2}{#3}%
+  \fi
+  \edef\mst at tmp{\expandafter\noexpand\csname mst at minus@mv#2\endcsname
+                \expandafter\noexpand\csname mst at varfam@minus at mv#2\endcsname}%
+  \ifmst at endash
+    \expandafter\mst at dothe@endashstuff\mst at tmp{#3}%
+  \else
+    \ifmst at emdash
+      \expandafter\mst at dothe@emdashstuff\mst at tmp{#3}%
+    \else
+      \expandafter\mst at dothe@hyphenstuff\mst at tmp
+    \fi
+  \fi
+}% \MTDeclareVersion@@
+\let\MathastextDeclareVersion\MTDeclareVersion
+\newcommand*\MTversion {\@ifstar\MTversion at s\MTversion@ }
+\newcommand*\MTversion at s [1]{\mathversion{#1}\MTversion@@ }
+\newcommand*\MTversion@ [2][]{%
+    \mathversion{#2}% defines \math at version as expanded #2
+    \edef\mst at tmpa{#1}%
+    \ifx\mst at tmpa\empty
+        \let\mst at tmp\math at version
+    \else
+        \let\mst at tmp\mst at tmpa
+    \fi
+    \edef\encodingdefault {\csname mst at encoding@\mst at tmp\endcsname}%
+    \edef\familydefault   {\csname mst at family@\mst at tmp\endcsname}%
+    \edef\seriesdefault   {\csname mst at series@\mst at tmp\endcsname}%
+    \edef\shapedefault    {\csname mst at shape@\mst at tmp\endcsname}%
+    \edef\bfdefault {\csname mst at boldvariant@\mst at tmp\endcsname}%
+    \edef\itdefault {\csname mst at itdefault@\mst at tmp\endcsname}%
+    \edef\rmdefault {\csname mst at rmdefault@\mst at tmp\endcsname}%
+    \edef\sfdefault {\csname mst at sfdefault@\mst at tmp\endcsname}%
+    \edef\ttdefault {\csname mst at ttdefault@\mst at tmp\endcsname}%
+    \usefont{\encodingdefault}{\familydefault}{\seriesdefault}{\shapedefault}%
+    \MTversion@@
+}% \MTversion@
+\newcommand*\MTversion@@ {%
+    \MTexistsdoesskip
+    \MTforalldoesskip
+    \MTprimedoesskip
+     \mst at exists@muskip\csname mst at exists@skip@\math at version\endcsname\relax
+     \mst at forall@muskip\csname mst at forall@skip@\math at version\endcsname\relax
+     \mst at prime@muskip\csname mst at prime@skip@\math at version\endcsname\relax
+    \edef\mst at tmpa{\csname mst at ltshape@\math at version\endcsname}%
+    \edef\mst at tmpb{\csname mst at shape@\math at version\endcsname}%
+    \MTmathoperatorsobeymathxx
+    \MTeverymathdefault
+    \MTcustomizenewmcodes
+    \@for\mst at tmpc:=it,sl\do{\ifx\mst at tmpc\mst at tmpa\MTnoicinmath\fi}%
+    \ifmst at frenchmath
+      \def\mst at ITcorr{\ifnum\fam=\m at ne\/\fi}%
+      \@for\mst at tmpc:=it,sl\do{\ifx\mst at tmpc\mst at tmpb\MTnoICinmath\fi}%
+    \fi
+    \ifmst at subdued
+      \def\mst at tmpa{normal}%
+      \ifx\math at version\mst at tmpa
+        \mst at restorealphabets
+        \MTstandardgreek
+        \MTmathoperatorsdonotobeymathxx
+        \MTnormalexists
+        \MTnormalforall
+        \MTeverymathoff
+        \MTresetnewmcodes
+        \mst at subduedhbar
+        \mst at subduedinodot
+        \mst at subduedmathaccents
+        \mst at subduedminus
+      \else
+        \def\mst at tmpa{bold}%
+        \ifx\math at version\mst at tmpa
+          \mst at restorealphabets
+          \MTstandardgreek
+          \MTmathoperatorsdonotobeymathxx
+          \MTnormalexists
+          \MTnormalforall
+          \MTeverymathoff
+          \MTresetnewmcodes
+          \mst at subduedhbar
+          \mst at subduedinodot
+          \mst at subduedmathaccents
+          \mst at subduedminus
+        \else
+          \mst at setalphabets
+          \MTcustomgreek
+          \mst at nonsubduedhbar
+          \mst at nonsubduedinodot
+          \mst at nonsubduedmathaccents
+          \mst at nonsubduedminus
+        \fi
       \fi
+    \else
+      \MTcustomgreek % new with 1.3d
+      \mst at nonsubduedhbar
+      \mst at nonsubduedinodot
+      \mst at nonsubduedmathaccents
+      \mst at nonsubduedminus
+    \fi
+}% \MTversion@@
+\let\MathastextVersion\MTversion
+\let\Mathastextversion\MTversion
+\let\MTVersion\MTversion
+\let\mathastextversion\MTversion
+\newcommand*\MTWillUse[5][]{
+  \MTencoding{#2}
+  \MTfamily{#3}
+  \MTseries{#4}
+  \MTshape{#5}
+    \ifmst at italic\MTlettershape{\itdefault}\fi % was missing in v 1.14 and prior
+  \edef\mst at tmp{#1}
+  \ifx\mst at tmp\empty\else\MTlettershape{#1}\fi
+  \Mathastext}
+\let\MathastextWillUse\MTWillUse
+\let\Mathastextwilluse\MTWillUse
+\def\Mathastext {\@ifnextchar [\Mathastext at declare\Mathastext@ }
+\def\Mathastext at declare [#1]{%
+  \edef\mst at tmp{#1}%
+  \ifx\mst at tmp\empty
+       \expandafter\@firstoftwo
+  \else\expandafter\@secondoftwo
+  \fi
+  \Mathastext@
+  {\MTDeclareVersion[\mst at ltsh]{#1}{\mst at enc}{\mst at fam}{\mst at ser}{\mst at opsh}}%
+}% \Mathastext at declare
+\def\Mathastext@ {%
+  \mst at update@greeksh
+  \edef\mst at encoding@normal{\mst at enc}%
+  \edef\mst at family@normal{\mst at fam}%
+  \edef\mst at series@normal{\mst at ser}%
+  \edef\mst at shape@normal{\mst at opsh}%
+  \edef\mst at ltshape@normal{\mst at ltsh}%
+  \edef\mst at itdefault@normal{\itdefault}%
+  \edef\mst at rmdefault@normal{\rmdefault}%
+  \edef\mst at sfdefault@normal{\sfdefault}%
+  \edef\mst at ttdefault@normal{\ttdefault}%
+  \edef\mst at boldvariant@normal{\mst at bold}%
+  \edef\mst at exists@skip at normal{\mst at exists@skip}%
+  \edef\mst at forall@skip at normal{\mst at forall@skip}%
+  \edef\mst at prime@skip at normal{\mst at prime@skip}%
+  \edef\mst at encoding@bold{\mst at enc}%
+  \edef\mst at family@bold{\mst at fam}%
+  \edef\mst at series@bold{\mst at bold}%
+  \edef\mst at shape@bold{\mst at opsh}%
+  \edef\mst at ltshape@bold{\mst at ltsh}%
+  \edef\mst at boldvariant@bold{\mst at bold}%
+  \edef\mst at itdefault@bold{\itdefault}%
+  \edef\mst at rmdefault@bold{\rmdefault}%
+  \edef\mst at sfdefault@bold{\sfdefault}%
+  \edef\mst at ttdefault@bold{\ttdefault}%
+  \edef\mst at exists@skip at bold{\mst at exists@skip}%
+  \edef\mst at forall@skip at bold{\mst at forall@skip}%
+  \edef\mst at prime@skip at bold{\mst at prime@skip}%
+  \ifmst at subdued
+    \def\mst at exists@skip at normal{0mu}%
+    \def\mst at forall@skip at normal{0mu}%
+    \def\mst at prime@skip at normal{0mu}%
+    \def\mst at exists@skip at bold{0mu}%
+    \def\mst at forall@skip at bold{0mu}%
+    \def\mst at prime@skip at bold{0mu}%
+  \else % not subdued
+    \ifmst at italic
+      \ifmst at frenchmath
+        \mst at exists@muskip\mst at exists@skip\relax
+        \mst at forall@muskip\mst at forall@skip\relax
+        \mst at prime@muskip\mst at prime@skip\relax
+      \else
+       \def\mst at exists@skip at normal{0mu}%
+       \def\mst at forall@skip at normal{0mu}%
+       \def\mst at prime@skip at normal{0mu}%
+       \def\mst at exists@skip at bold{0mu}%
+       \def\mst at forall@skip at bold{0mu}%
+       \def\mst at prime@skip at bold{0mu}%
+      \fi
+    \else
+        \mst at exists@muskip\mst at exists@skip\relax
+        \mst at forall@muskip\mst at forall@skip\relax
+        \mst at prime@muskip\mst at prime@skip\relax
+    \fi
+  \fi
+%% v1.15f
+  \ifmst at nonormalbold\else
+   \SetMathAlphabet{\mathnormalbold}{normal}{\mst at encoding@normal}%
+                                 {\mst at family@normal}%
+                                 {\mst at boldvariant@normal}%
+                                 {\mst at ltshape@normal}%
+   \SetMathAlphabet{\mathnormalbold}{bold}{\mst at encoding@bold}%
+                                 {\mst at family@bold}%
+                                 {\mst at boldvariant@bold}%
+                                 {\mst at ltshape@bold}%
+  \fi
+%% v1.15f adds \ifmst at default.. checks
+  \ifmst at subdued\else
+   \SetSymbolFont{mtletterfont}{normal}{\mst at encoding@normal}%
+                                       {\mst at family@normal}%
+                                       {\mst at series@normal}%
+                                       {\mst at ltshape@normal}%
+   \SetSymbolFont{mtletterfont}{bold}  {\mst at encoding@bold}%
+                                       {\mst at family@bold}%
+                                       {\mst at series@bold}%
+                                       {\mst at ltshape@bold}%
+   \SetSymbolFont{mtoperatorfont}{normal}{\mst at encoding@normal}%
+                                       {\mst at family@normal}%
+                                       {\mst at series@normal}%
+                                       {\mst at shape@normal}%
+   \SetSymbolFont{mtoperatorfont}{bold} {\mst at encoding@bold}%
+                                       {\mst at family@bold}%
+                                       {\mst at series@bold}%
+                                       {\mst at shape@bold}%
+   \ifmst at defaultbf\else
+    \SetMathAlphabet{\Mathbf}{normal}{\mst at encoding@normal}%
+                                 {\mst at family@normal}%
+                                 {\mst at series@bold}%
+                                 {\mst at shape@normal}%
+    \SetMathAlphabet{\Mathbf}{bold}{\mst at encoding@bold}%
+                                 {\mst at family@bold}%
+                                 {\mst at series@bold}%
+                                 {\mst at shape@bold}%
    \fi
+   \ifmst at defaultit\else
+    \SetMathAlphabet{\Mathit}{normal}{\mst at encoding@normal}%
+                                 {\mst at family@normal}%
+                                 {\mst at series@normal}%
+                                 {\mst at itdefault@normal}%
+    \SetMathAlphabet{\Mathit}{bold}{\mst at encoding@bold}%
+                                 {\mst at family@bold}%
+                                 {\mst at series@bold}%
+                                 {\mst at itdefault@bold}%
+   \fi
+   \ifmst at defaultsf\else
+    \SetMathAlphabet{\Mathsf}{normal}{\mst at encoding@normal}%
+                                 {\mst at sfdefault@normal}%
+                                 {\mst at series@normal}%
+                                 {\mst at shape@normal}%
+    \SetMathAlphabet{\Mathsf}{bold}{\mst at encoding@bold}%
+                                 {\mst at sfdefault@bold}%
+                                 {\mst at series@bold}%
+                                 {\mst at shape@bold}%
+   \fi
+   \ifmst at defaulttt\else
+    \SetMathAlphabet{\Mathtt}{normal}{\mst at encoding@normal}%
+                                 {\mst at ttdefault@normal}%
+                                 {\mst at series@normal}%
+                                 {\mst at shape@normal}%
+    \SetMathAlphabet{\Mathtt}{bold}{\mst at encoding@bold}%
+                                 {\mst at ttdefault@bold}%
+                                 {\mst at series@bold}%
+                                 {\mst at shape@bold}%
+   \fi
+  \fi % de \ifmst at subdued
+  \ifmst at needeuler
+    \SetSymbolFont{mteulervm}{bold}{U}{zeur}{\mst at boldvariant@normal}{n}%
+    \SetMathAlphabet{\MathEulerBold}{normal}%
+               {U}{zeur}{\mst at boldvariant@normal}{n}%
+    \SetMathAlphabet{\MathEulerBold}{bold}%
+               {U}{zeur}{\mst at boldvariant@normal}{n}%
+  \fi
+  \ifmst at needsymbol\SetSymbolFont{mtpsymbol}{bold}%
+                     {U}{psy}{\mst at boldvariant@normal}{n}%
+  \fi
+  \ifmst at subdued\else
+   \ifmst at LGRgreek
+    \SetSymbolFont{mtlgrfontlower}{normal}{LGR}%
+            {\mst at greekfont}{\mst at series@normal}{\mst at greek@lsh}%
+    \SetSymbolFont{mtlgrfontlower}{bold}{LGR}%
+            {\mst at greekfont}{\mst at boldvariant@normal}{\mst at greek@lsh}%
+    \SetSymbolFont{mtlgrfontupper}{normal}{LGR}%
+            {\mst at greekfont}{\mst at series@normal}{\mst at greek@ush}%
+    \SetSymbolFont{mtlgrfontupper}{bold}{LGR}%
+            {\mst at greekfont}{\mst at boldvariant@bold}{\mst at greek@ush}%
+   \else
+    \ifmst at selfGreek
+     \SetSymbolFont{mtselfGreekfont}{normal}{OT1}%
+            {\mst at greekfont}{\mst at series@normal}{\mst at greek@ush}%
+     \SetSymbolFont{mtselfGreekfont}{bold}{OT1}%
+            {\mst at greekfont}{\mst at boldvariant@bold}{\mst at greek@ush}%
+    \fi
+   \fi
+  \fi
+  \ifmst at subdued
+   \typeout{** subdued mode will be activated for the normal and bold math versions}%
+  \else
+   \typeout{** Latin letters in the normal (resp. bold) math versions are now^^J%
+            ** set up to use the fonts
+   \mst at encoding@normal/\mst at family@normal/\mst at series@normal%
+               (\mst at boldvariant@normal)/\mst at ltshape@normal}%
+   \ifmst at LGRgreek\typeout{** Greek letters (\mst at greek@lsh/\mst at greek@ush)
+                              will use LGR/\mst at greekfont}%
+   \fi
+   \ifmst at nodigits\else
+     \typeout{** Other characters (digits, ...) and \protect\log-like names will be^^J%
+              ** typeset with the \mst at shape@normal\space shape.}%
+   \fi
+  \fi
+  \ifmst at nohbar\else
+     \typeout{** \string\hbar}%
+     \mst at dothe@hbarstuff
+         \mst at hbar@mvnormal\mst at ltbar@mvnormal\mst at encoding@normal
+     \let\mst at hbar@mvbold\mst at hbar@mvnormal
+  \fi
+  \mst at dothe@inodotstuff\inodot\jnodot\mst at encoding@normal
+  \let\mst at inodot@mvnormal\inodot
+  \let\mst at inodot@mvbold\inodot
+  \let\mst at jnodot@mvnormal\jnodot
+  \let\mst at jnodot@mvbold\jnodot
+  \ifmst at mathaccents
+    \typeout{** math accents}%
+    \mst at dothe@mathaccentsstuff{normal}\mst at encoding@normal
+  \fi
+  \ifmst at nominus\else
+   \typeout{** minus as endash}%
+   \ifmst at endash
+    \mst at dothe@endashstuff\mst at minus@mvnormal\mst at varfam@minus at mvnormal
+                          \mst at encoding@normal
+    \mst at dothe@endashstuff\mst at minus@mvbold\mst at varfam@minus at mvbold
+                          \mst at encoding@normal
+   \else
+    \ifmst at emdash
+      \mst at dothe@emdashstuff\mst at minus@mvnormal\mst at varfam@minus at mvnormal
+                            \mst at encoding@normal
+      \mst at dothe@emdashstuff\mst at minus@mvbold\mst at varfam@minus at mvbold
+                            \mst at encoding@normal
+    \else
+      \mst at dothe@hyphenstuff\mst at minus@mvnormal\mst at varfam@minus at mvnormal
+      \let\mst at minus@mvbold\mst at minus@mvnormal
+      \let\mst at varfam@minus at mvbold\mst at varfam@minus at mvnormal
+    \fi
+   \fi
+  \fi
+}% \Mathastext@
+\let\mathastext\Mathastext
+\Mathastext
+\ifmst at eulergreek
+      \typeout{** Greek letters will use the Euler font. Use \protect\MathastextEulerScale{<factor>} to scale the
+               font.}%
+      \ifmst at subdued{\typeout{** (subdued mode: normal and bold math
+          version with default Greek letters.)}}\fi
+\else
+\ifmst at symbolgreek
+       \typeout{** Greek letters will use the PostScript Symbol font. Use^^J%
+                ** \protect\MathastextSymbolScale{<factor>} to scale the font.}%
+      \ifmst at subdued{\typeout{** (subdued mode: normal and bold math
+          version with default Greek letters.)}}\fi
 \fi\fi
 \ifmst at defaultsizes\else
 \providecommand\@xxxpt{29.86}
@@ -2118,6 +2154,128 @@
     \MTicinmath
     \MTfixfonts
 }%
+\AtBeginDocument{%
+  \everymath\expandafter{\the\everymath
+    \mst at the\mst at do@nonletters \let\mst at the\@gobble
+    \mst at theeasy\mst at do@easynonletters  \let\mst at theeasy\@gobble
+    \mst at thef\mst at do@az \let\mst at thef\@gobble
+    \mst at theF\mst at do@AZ \let\mst at theF\@gobble}%
+  \everydisplay\expandafter{\the\everydisplay
+    \mst at the\mst at do@nonletters \let\mst at the\@gobble
+    \mst at theeasy\mst at do@easynonletters  \let\mst at theeasy\@gobble
+    \mst at thef\mst at do@az \let\mst at thef\@gobble
+    \mst at theF\mst at do@AZ \let\mst at theF\@gobble}%
+  \MTcustomizenewmcodes
+  \let\mst at original@hbar\hbar
+  \let\mst at original@imath\imath
+  \let\mst at original@jmath\jmath
+  \@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
+                 {dot}{ddot}{mathring}{hat}{tilde}%
+  \do
+  {\expandafter\let\csname mst at original@\@tempa\expandafter\endcsname
+                   \csname \@tempa\endcsname}%
+  \ifmst at XeOrLua
+     \edef\mst at subduedminus
+         {\mst at Umathcodenum`\noexpand\-=\the\mst at Umathcodenum`\-\relax}%
+  \else
+     \edef\mst at subduedminus{\mathcode`\noexpand\-=\the\mathcode`\-\relax}%
+  \fi
+  \ifmst at subdued
+    \MTeverymathoff
+    \MTresetnewmcodes
+    \MTnoicinmath
+    \MTmathoperatorsdonotobeymathxx
+    %\mst at subduedhbar
+    \let\inodot\imath
+    \let\jnodot\jmath
+    %\mst at subduedmathaccents
+    \mst at subduedminus
+  \else
+     \mst at nonsubduedhbar
+     \mst at nonsubduedmathaccents
+     \mst at nonsubduedminus
+     \ifx\mst at itcorr\@undefined
+         \def\mst at itcorr{\ifnum\fam=\m at ne\/\fi}%
+         \@for\mst at tmp:=it,sl\do
+           {\ifx\mst at tmp\mst at ltshape@normal\let\mst at itcorr\@empty\fi }%
+     \fi
+     \ifx\mst at ITcorr\@undefined
+         \let\mst at ITcorr\mst at itcorr
+         \ifmst at frenchmath
+           \def\mst at ITcorr{\ifnum\fam=\m at ne\/\fi}%
+           \@for\mst at tmp:=it,sl\do
+                {\ifx\mst at tmp\mst at shape@normal\let\mst at ITcorr\@empty\fi }%
+         \fi
+     \fi
+  \fi
+}% \AtBeginDocument
+\ifmst at subdued
+\AtBeginDocument{%
+  \def\mst at reserved#1\getanddefine at fonts\symletters#2#3\@nil{%
+        \def\mst at normalmv@letter{#2}}%
+  \expandafter\mst at reserved\mv at normal\@nil
+  \def\mst at reserved#1\getanddefine at fonts\symletters#2#3\@nil{%
+        \def\mst at boldmv@letter{#2}}%
+  \expandafter\mst at reserved\mv at bold\@nil
+  \def\mst at reserved#1\getanddefine at fonts\symoperators#2#3\@nil{%
+        \def\mst at normalmv@operator{#2}}%
+  \expandafter\mst at reserved\mv at normal\@nil
+  \def\mst at reserved#1\getanddefine at fonts\symoperators#2#3\@nil{%
+        \def\mst at boldmv@operator{#2}}%
+  \expandafter\mst at reserved\mv at bold\@nil
+  \edef\mst at tmp@enc{\mst at encoding@normal}%
+  \def\mst at reserved#1/#2/#3/#4/{\gdef\mst at debut{#1}\gdef\mst at reste{#2/#3/#4}}%
+  \begingroup\escapechar\m at ne
+      \xdef\mst at funnyoti{\expandafter\string\csname OT1\endcsname}%
+      \expandafter\expandafter\expandafter
+          \mst at reserved\expandafter\string\mst at normalmv@operator/%
+  \endgroup
+  \ifx\mst at debut\mst at funnyoti\ifx\mst at tmp@enc\mst at oti\def\mst at tmp@enc{T1}\fi\fi
+  \edef\mst at normalmv@operator{\expandafter\noexpand\csname
+       \if1\mst at OneifUniEnc
+         \ifx\mst at debut\mst at funnyoti T1\else\mst at debut\fi
+       \else
+         \mst at tmp@enc
+       \fi/\mst at reste\endcsname}%
+  \edef\mst at tmp@enc{\mst at encoding@bold}%
+  \begingroup\escapechar\m at ne
+      \expandafter\expandafter\expandafter
+          \mst at reserved\expandafter\string\mst at boldmv@operator/%
+  \endgroup
+  \ifx\mst at debut\mst at funnyoti\ifx\mst at tmp@enc\mst at oti\def\mst at tmp@enc{T1}\fi\fi
+  \edef\mst at boldmv@operator{\expandafter\noexpand\csname
+       \if1\mst at OneifUniEnc
+         \ifx\mst at debut\mst at funnyoti T1\else\mst at debut\fi
+       \else
+         \mst at tmp@enc
+       \fi/\mst at reste\endcsname}%
+  \typeout{** ...entering subdued mode...}%
+  \expandafter\SetSymbolFont@ \expandafter\mv at normal\mst at normalmv@letter\symmtletterfont
+  \expandafter\SetSymbolFont@ \expandafter\mv at bold\mst at boldmv@letter\symmtletterfont
+  \expandafter\SetSymbolFont@ \expandafter\mv at normal\mst at normalmv@operator\symmtoperatorfont
+  \expandafter\SetSymbolFont@ \expandafter\mv at bold\mst at boldmv@operator\symmtoperatorfont
+  \typeout{** ...done.}%
+}% \AtBeginDocument
+\fi % \ifmst at subdued
+\expandafter \gdef \expandafter \@preamblecmds \expandafter {\@preamblecmds
+\do\MTitgreek
+\do\MTupgreek
+\do\MTitGreek
+\do\MTitGreek
+\do\Mathastextitgreek
+\do\Mathastextupgreek
+\do\MathastextitGreek
+\do\MathastextitGreek
+\do\MTgreekfont
+\do\Mathastextgreekfont
+\do\MTDeclareVersion
+\do\MathastextDeclareVersion
+\do\MTWillUse
+\do\MathastextWillUse
+\do\Mathastextwilluse
+\do\Mathastext
+\do\mathastext
+}
 \endinput
 %%
 %% End of file `mathastext.sty'.



More information about the tex-live-commits mailing list