texlive[72671] Master/texmf-dist: mathastext (26oct24)

commits+karl at tug.org commits+karl at tug.org
Sat Oct 26 22:17:31 CEST 2024


Revision: 72671
          https://tug.org/svn/texlive?view=revision&revision=72671
Author:   karl
Date:     2024-10-26 22:17:31 +0200 (Sat, 26 Oct 2024)
Log Message:
-----------
mathastext (26oct24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md
    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/mathastext.tex
    trunk/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
    trunk/Master/texmf-dist/tex/latex/mathastext/mathastext.sty

Modified: trunk/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md	2024-10-26 20:17:16 UTC (rev 72670)
+++ trunk/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md	2024-10-26 20:17:31 UTC (rev 72671)
@@ -1,17 +1,62 @@
 MATHASTEXT CHANGE LOG
 =====================
 
+1.4e \[2024/10/26\]
+----
+
+* Fix a bug dating back to `1.3y` which caused under `LGRgreek` or
+  `LGRgreeks` options an `\MTversion{normal}` to raise an `Extra
+  \else` error (not if `subdued`).  The unit test which could have
+  shown this had been left aside at `1.4d` because it was so old
+  that some matters unrelated to the package prevented its
+  immediate use... alas...
+
+* Fix one more `1.4` regression: the (not really recommended)
+  option `unimathaccents` was broken.  Again a test file existed
+  but it had been left apart from those automatically built, for
+  some unknown reason...
+
+1.4d \[2024/10/26\]
+----
+
+* Fix one more `1.4` regression (the worst one by far): `$f''$`
+  caused a crash.  Fortunately, the `everymath` option which
+  re-enacts legacy code could be used as a *temporary emergency
+  work-around*.  Thanks to Enrico Gregorio for report.
+
+* The `1.4b` option `noletters` did not prevent the package from
+  defining math mode symbols `\inodot` and `\jnodot`.  It now does.
+
+* Fix a longstanding legacy bug which would have caused a crash if
+  `\MTnonlettersobeymathxx` had been used with `XeLaTeX` in a
+  document with the character `-` being a Babel shorthand.
+
+* Usage of `\Mathastext` or `\MTDeclareVersion` to declare a
+  math version associated with an exotic non-text font encoding
+  such as `OML` is theoretically possible (although of dubious
+  practical use except for stress tests) but was broken
+  since `1.3u` due to internals
+  relying on `LaTeX` commands associated with text font encodings
+  (for example to define `\inodot`
+  using `\i`,
+  or the `\hbar` with the help of the accent command `\=`)
+  and which are not available in such context.  This release
+  handles such situation gracefully via warnings, rather than
+  causing low level errors.
+
+* Improve looks in the PDF of this Change log.
+
 1.4c \[2024/10/21\]
 ----
 
-* Fix a regression at `1.4`: under `XeLaTeX`: loading `mathastext`
+* Fix a regression at `1.4`: under `XeLaTeX`, loading `mathastext`
   caused an error if `unicode-math` and its `\setmathfont` had been
-  used prior ("Extended mathchar used as mathchar" in relation to the
+  used prior ("*Extended mathchar used as mathchar*" in relation to the
   minus sign character). Thanks to Michael Roland for report.
 
   Keep in mind though that the documentation (see 1.4.15 Unicode engines) has
-  always said that the package "is expected to be most definitely
-  incompatible with unicode-math".
+  always said that the package "*is expected to be most definitely
+  incompatible with unicode-math*".
 
 * Fix another regression at `1.4`, related to the same code and also avoided
   with `everymath` option, but showing with
@@ -33,8 +78,8 @@
 
 * Fix a regression at `1.4` regarding option `nodigits`.
 
-* New option: `noletters`.  I am in old age now so I can provide an option
-  completely antithetical to my life work.
+* New option: `noletters`.  *I am in old age now so I can provide an option
+  completely antithetical to my life work*.
 
 * Option `everymath` which is destined to be removed at next major
   release warns user about it.  As major releases tend to happen once
@@ -52,20 +97,20 @@
 1.4 \[2024/07/20\]
 ---
 
-* Since 1.2 of 2012/12/20, mathastext has used mathematically active
+* Since 1.2 of 2012/12/20, mathastext has used *mathematically active*
   characters to propose certain advanced functionalities.  For reasons half
   lost in the mists of time but whose main one was surely to keep the
   meaning of the active shape of characters unchanged outside of math mode,
   this mathematical activation, and (in most cases) the definitions of what
   active characters do, were done again at *each* entrance into math mode.
-  At this 1.4 release, mathastext does not inject *any* code whatsoever into
-  the `\everymath` and `\everydisplay` toks registers anymore (except for
-  one font-related hack needed under LuaLaTeX, see below).  Your documents
+  At this 1.4 release, mathastext does *not inject any code whatsoever* into
+  the `\everymath` and `\everydisplay` toks registers anymore (*except* for
+  one font-related hack needed under `LuaLaTeX`, see below).  Your documents
   will compile a tiny bit faster.
 
-* In (unsual) documents where users play with catcodes and mathcodes it is
-  impossible to keep exact backward compatibility, because documented user
-  commands which acted formerly a toggles with delayed action now will enact
+* In (*unsual*) documents where users play with catcodes and mathcodes it is
+  *impossible* to keep exact backward compatibility, because documented user
+  commands which acted formerly as toggles with delayed action now will enact
   changes immediately if in the document body.  In practice consequences are
   expected to be few, because catcode active characters are (as was already
   the case with earlier releases) hacked only when they are Babel shorthands
@@ -79,9 +124,9 @@
 * New option: `everymath`. It instructs mathastext to revert (partially)
   to its legacy code which uses `\everymath/\everydisplay`.  This reversal
   is partial, the handling of ascii letters not being included into it.  The
-  `everymath` option is there only to try as a quick fix in case transition
+  `everymath` option is there *only to try as a quick fix* in case transition
   to this release causes a major problem in a user document and time is
-  lacking to investigate.  Please report to the author such issues.  Option
+  lacking to investigate.  *Please report to the author such issues*.  Option
   `everymath` is destined to be removed at next major release.
 
 * New option: `activedigits`.  Enjoy.
@@ -93,7 +138,7 @@
 * Bugfix: do not override special behavior of the math mode dot in
   babel-spanish.
 
-* Bugfix: A desperate hack related to LuaLaTeX font matters and dating
+* Bugfix: A *desperate* hack related to `LuaLaTeX` font matters and dating
   back to 1.3o 2016/05/03 had been for some years in dire need of an update
   regarding fonts using `Renderer=HarfBuzz`.  This is done now.  Thanks to
   tex.sx `user691586` for report.  This is currently the sole remaining
@@ -100,12 +145,12 @@
   usage of `\everymath/\everydisplay`.
 
 * Bugfix: `\MTexplicitbracesobeymathxx` (which is related to `\{` and `\}`)
-  was without effect since an upstream LaTeX change at its 2020-02-02 release.
+  was without effect since an upstream `LaTeX` change at its 2020-02-02 release.
 
 * With option symbolmisc, those math symbol macros formerly defined via
   `\DeclareRobustCommand` are now declared via `\protected\def`.
 
-* Removal of legacy branches previously kept to support LaTeX earlier than
+* Removal of legacy branches previously kept to support `LaTeX` earlier than
   2020-02-02.
 
 * Removal of support for EU1 and EU2 font encodings.
@@ -135,7 +180,7 @@
 
 * No more messages sent to the console output during loading,
   only info messages going into the log, and using (more or less)
-  the official LaTeX interface: after close to 13 years of development
+  the official `LaTeX` interface: after close to 13 years of development
   of this package it was perhaps finally the time to do it.
 
 * Documentation improvements.  Close to 13 years after the
@@ -212,7 +257,7 @@
 
   - add `\MTgreekupdefault` and `\MTgreekitdefault`.  The former
     replaces `\updefault` which was used in some places and since
-    LaTeX 2020-02-02 caused systematic Font Warnings about the
+    `LaTeX` `2020-02-02` caused systematic Font Warnings about the
     substitution of `up` by `n`.
 
   These new features required an extensive internal refactoring
@@ -234,16 +279,16 @@
 1.3w \[2019/11/16\]
 ----
 
-* LaTeX 2019-10-01 release (up to patch level 3 inclusive)
+* `LaTeX` `2019-10-01` release (up to patch level 3 inclusive)
   together with `amsmath` conspired `:-)` to break `mathastext`,
   in connexion with math accents. This has been fixed upstream,
   but I am releasing nevertheless a hot fix to this
   https://github.com/latex3/latex2e/issues/216 issue
-  (this is compatible with future LaTeX releases).
+  (this is compatible with future `LaTeX` releases).
 
 * Fix: the `\hbar` is originally a robust command but
   becomes a `\mathchardef` token if (e.g.) `amsfonts` is
-  loaded and then with recent LaTeX `\hbar<space>` is
+  loaded and then with recent `LaTeX` `\hbar<space>` is
   made undefined and `mathastext` definition of it
   remained without effect. The `\mathastext` own `\hbar`
   is now defined `\protected`.
@@ -260,15 +305,15 @@
 1.3v \[2019/09/19\]
 ----
 
-* LaTeX 2019-10-01 release has made more math macros robust.
+* `LaTeX` 2019-10-01 release has made more math macros robust.
   This applies in particular to the math accents and to the
   `\hbar`. This required for mathastext to adapt. Also
   `\leftarrowfill` and `\rightarrowfill` are now defined
   robust by the kernel, hence mathastext does the same. These
-  changes are dropped if mathastext detects an older LaTeX
+  changes are dropped if mathastext detects an older `LaTeX`
   format.
 
-* These LaTeX kernel changes motivated an examination of some
+* These `LaTeX` kernel changes motivated an examination of some
   redefinitions done (optionally) by mathastext:
 
   - The user math alphabet macros got redefined as expanding
@@ -279,7 +324,7 @@
   alphabet commands (they redefine themselves and other macros
   on first use) makes is somewhat problematic for mathastext
   to keep them updated across math versions and at the same
-  time strictly LaTeX2e robust. Thus mathastext now requires
+  time strictly `LaTeX2e` robust. Thus mathastext now requires
   the e-TeX primitive `\protected` and uses it for the
   definitions of the user level math alphabet macros.
 
@@ -293,18 +338,18 @@
   `\mid`, `\prod`, `\sum`, `\imath`, `\jmath`.
 
   - The macro `\vert` (which expands to a `\delimiter`) is now
-  defined robust by LaTeX. Its mathastext redefinition is a
+  defined robust by `LaTeX`. Its mathastext redefinition is a
   `\protected` one rather.
 
   - The `\{` and `\}` (which get redefined only under
   `\MTexplicitbracesobeymathxx` regime) are now strictly
-  robust in the LaTeX2e sense (formerly they were `\let` to
+  robust in the `LaTeX2e` sense (formerly they were `\let` to
   some robust macros, and this did not make them strictly
-  LaTeX2e-robust entities).
+  `LaTeX2e`-robust entities).
 
 * The various changes in mathastext described in the previous item
-  apply independently of the LaTeX release version. The
-  LaTeX format itself requires the e-TeX extensions since 2015.
+  apply independently of the `LaTeX` release version. The
+  `LaTeX` format itself requires the e-TeX extensions since 2015.
 
 1.3u \[2019/08/20\]
 ----
@@ -319,7 +364,7 @@
   using fonts with varying encodings.
 
   This reinforces importance of using `\MTversion` and not the
-  LaTeX `\mathversion` when switching to a new math version (which
+  `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
@@ -331,8 +376,8 @@
 * 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,
+  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
@@ -440,7 +485,7 @@
 * 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;
+  `mathsastext.html`! (but the pdf documentation had the correct link;
   as well as the CTAN catalogue).
 
 1.3j \[2016/01/15\]
@@ -499,9 +544,9 @@
 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.
+* 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\]
 ----
@@ -588,8 +633,8 @@
   `\MTnoicinmath` correspondingly modified).
 
 * the new `\luatexUmathcodenum` as available since TL2013 allows
-  identical treatment by mathastext of = and - under both LuaTeX
-  and XeTeX.
+  identical treatment by mathastext of = and - under both `LuaTeX`
+  and `XeTeX`.
 
 * `\newmcodes@` of amsmath is left untouched in case of option basic.
 
@@ -833,7 +878,7 @@
 
 *  the `\Mathastext` command has been improved to
       facilitate the mechanism of math versions also when
-      using XeTeX or LuaTeX (with package fontspec.)
+      using `XeTeX` or `LuaTeX` (with package fontspec.)
 
 *  the en-dash and dotless i and j now work with all
       encodings, Unicode inclusive.

Modified: trunk/Master/texmf-dist/doc/latex/mathastext/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mathastext/README.md	2024-10-26 20:17:16 UTC (rev 72670)
+++ trunk/Master/texmf-dist/doc/latex/mathastext/README.md	2024-10-26 20:17:31 UTC (rev 72671)
@@ -14,7 +14,7 @@
 
 Copyright (C) 2011-2019, 2022-2024 Jean-Francois Burnol
 
-      Source: mathastext.dtx 1.4c 2024/10/21
+      Source: mathastext.dtx 1.4e 2024/10/26
 
 
 DESCRIPTION
@@ -82,17 +82,62 @@
 RECENT CHANGES
 ==============
 
+1.4e \[2024/10/26\]
+----
+
+* Fix a bug dating back to `1.3y` which caused under `LGRgreek` or
+  `LGRgreeks` options an `\MTversion{normal}` to raise an `Extra
+  \else` error (not if `subdued`).  The unit test which could have
+  shown this had been left aside at `1.4d` because it was so old
+  that some matters unrelated to the package prevented its
+  immediate use... alas...
+
+* Fix one more `1.4` regression: the (not really recommended)
+  option `unimathaccents` was broken.  Again a test file existed
+  but it had been left apart from those automatically built, for
+  some unknown reason...
+
+1.4d \[2024/10/26\]
+----
+
+* Fix one more `1.4` regression (the worst one by far): `$f''$`
+  caused a crash.  Fortunately, the `everymath` option which
+  re-enacts legacy code could be used as a *temporary emergency
+  work-around*.  Thanks to Enrico Gregorio for report.
+
+* The `1.4b` option `noletters` did not prevent the package from
+  defining math mode symbols `\inodot` and `\jnodot`.  It now does.
+
+* Fix a longstanding legacy bug which would have caused a crash if
+  `\MTnonlettersobeymathxx` had been used with `XeLaTeX` in a
+  document with the character `-` being a Babel shorthand.
+
+* Usage of `\Mathastext` or `\MTDeclareVersion` to declare a
+  math version associated with an exotic non-text font encoding
+  such as `OML` is theoretically possible (although of dubious
+  practical use except for stress tests) but was broken
+  since `1.3u` due to internals
+  relying on `LaTeX` commands associated with text font encodings
+  (for example to define `\inodot`
+  using `\i`,
+  or the `\hbar` with the help of the accent command `\=`)
+  and which are not available in such context.  This release
+  handles such situation gracefully via warnings, rather than
+  causing low level errors.
+
+* Improve looks in the PDF of this Change log.
+
 1.4c \[2024/10/21\]
 ----
 
-* Fix a regression at `1.4`: under `XeLaTeX`: loading `mathastext`
+* Fix a regression at `1.4`: under `XeLaTeX`, loading `mathastext`
   caused an error if `unicode-math` and its `\setmathfont` had been
-  used prior ("Extended mathchar used as mathchar" in relation to the
+  used prior ("*Extended mathchar used as mathchar*" in relation to the
   minus sign character). Thanks to Michael Roland for report.
 
   Keep in mind though that the documentation (see 1.4.15 Unicode engines) has
-  always said that the package "is expected to be most definitely
-  incompatible with unicode-math".
+  always said that the package "*is expected to be most definitely
+  incompatible with unicode-math*".
 
 * Fix another regression at `1.4`, related to the same code and also avoided
   with `everymath` option, but showing with
@@ -114,8 +159,8 @@
 
 * Fix a regression at `1.4` regarding option `nodigits`.
 
-* New option: `noletters`.  I am in old age now so I can provide an option
-  completely antithetical to my life work.
+* New option: `noletters`.  *I am in old age now so I can provide an option
+  completely antithetical to my life work*.
 
 * Option `everymath` which is destined to be removed at next major
   release warns user about it.  As major releases tend to happen once
@@ -133,20 +178,20 @@
 1.4 \[2024/07/20\]
 ---
 
-* Since 1.2 of 2012/12/20, mathastext has used mathematically active
+* Since 1.2 of 2012/12/20, mathastext has used *mathematically active*
   characters to propose certain advanced functionalities.  For reasons half
   lost in the mists of time but whose main one was surely to keep the
   meaning of the active shape of characters unchanged outside of math mode,
   this mathematical activation, and (in most cases) the definitions of what
   active characters do, were done again at *each* entrance into math mode.
-  At this 1.4 release, mathastext does not inject *any* code whatsoever into
-  the `\everymath` and `\everydisplay` toks registers anymore (except for
-  one font-related hack needed under LuaLaTeX, see below).  Your documents
+  At this 1.4 release, mathastext does *not inject any code whatsoever* into
+  the `\everymath` and `\everydisplay` toks registers anymore (*except* for
+  one font-related hack needed under `LuaLaTeX`, see below).  Your documents
   will compile a tiny bit faster.
 
-* In (unsual) documents where users play with catcodes and mathcodes it is
-  impossible to keep exact backward compatibility, because documented user
-  commands which acted formerly a toggles with delayed action now will enact
+* In (*unsual*) documents where users play with catcodes and mathcodes it is
+  *impossible* to keep exact backward compatibility, because documented user
+  commands which acted formerly as toggles with delayed action now will enact
   changes immediately if in the document body.  In practice consequences are
   expected to be few, because catcode active characters are (as was already
   the case with earlier releases) hacked only when they are Babel shorthands
@@ -160,9 +205,9 @@
 * New option: `everymath`. It instructs mathastext to revert (partially)
   to its legacy code which uses `\everymath/\everydisplay`.  This reversal
   is partial, the handling of ascii letters not being included into it.  The
-  `everymath` option is there only to try as a quick fix in case transition
+  `everymath` option is there *only to try as a quick fix* in case transition
   to this release causes a major problem in a user document and time is
-  lacking to investigate.  Please report to the author such issues.  Option
+  lacking to investigate.  *Please report to the author such issues*.  Option
   `everymath` is destined to be removed at next major release.
 
 * New option: `activedigits`.  Enjoy.
@@ -174,7 +219,7 @@
 * Bugfix: do not override special behavior of the math mode dot in
   babel-spanish.
 
-* Bugfix: A desperate hack related to LuaLaTeX font matters and dating
+* Bugfix: A *desperate* hack related to `LuaLaTeX` font matters and dating
   back to 1.3o 2016/05/03 had been for some years in dire need of an update
   regarding fonts using `Renderer=HarfBuzz`.  This is done now.  Thanks to
   tex.sx `user691586` for report.  This is currently the sole remaining
@@ -181,12 +226,12 @@
   usage of `\everymath/\everydisplay`.
 
 * Bugfix: `\MTexplicitbracesobeymathxx` (which is related to `\{` and `\}`)
-  was without effect since an upstream LaTeX change at its 2020-02-02 release.
+  was without effect since an upstream `LaTeX` change at its 2020-02-02 release.
 
 * With option symbolmisc, those math symbol macros formerly defined via
   `\DeclareRobustCommand` are now declared via `\protected\def`.
 
-* Removal of legacy branches previously kept to support LaTeX earlier than
+* Removal of legacy branches previously kept to support `LaTeX` earlier than
   2020-02-02.
 
 * Removal of support for EU1 and EU2 font encodings.

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

Modified: trunk/Master/texmf-dist/doc/latex/mathastext/mathastext.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mathastext/mathastext.tex	2024-10-26 20:17:16 UTC (rev 72670)
+++ trunk/Master/texmf-dist/doc/latex/mathastext/mathastext.tex	2024-10-26 20:17:31 UTC (rev 72671)
@@ -1,9 +1,9 @@
-\def\MSTpkgdate    {2024/10/21}
-\def\MSTpkgversion {1.4c}
+\def\MSTpkgdate    {2024/10/26}
+\def\MSTpkgversion {1.4e}
 %%----------------------------------------------------------------
 %% Package: mathastext
 %% Info:    Use the text font in math mode (JFB)
-%% Version: 1.4c 2024/10/21
+%% Version: 1.4e 2024/10/26
 %% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
 %% Copyright (C) 2011-2019, 2022-2024 Jean-Francois Burnol
 %%                                   <jfbu at free dot fr>

Modified: trunk/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathastext/mathastext.dtx	2024-10-26 20:17:16 UTC (rev 72670)
+++ trunk/Master/texmf-dist/source/latex/mathastext/mathastext.dtx	2024-10-26 20:17:31 UTC (rev 72671)
@@ -2,8 +2,8 @@
 % N.B.: this dtx file does NOT use \DocInput, it only uses docstrip.
 % The LaTeX source of the documentation is NOT prefixed with %'s.
 %<*dtx>
-\def\dtxtimestamp {Time-stamp: <21-10-2024 at 14:03:00 CEST>}
-\def\docdate{2024/10/21}
+\def\dtxtimestamp {Time-stamp: <26-10-2024 at 17:38:46 CEST>}
+\def\docdate{2024/10/26}
 % To extract run etex on this file, then to build documentation run
 % latexmk on mathastext.tex then dvipdfmx on the dvi.
 % For more information see http://jf.burnol.free.fr/v13/INSTALL.txt
@@ -11,8 +11,8 @@
 % due to usage of \xA7 (<A7>) as an active character.
 %</dtx>
 %<*drv>
-\def\MSTpkgdate    {2024/10/21}
-\def\MSTpkgversion {1.4c}
+\def\MSTpkgdate    {2024/10/26}
+\def\MSTpkgversion {1.4e}
 %</drv>
 %<*dtx>
 \iffalse % meta-comment
@@ -34,7 +34,7 @@
 
 Copyright (C) 2011-2019, 2022-2024 Jean-Francois Burnol
 
-      Source: mathastext.dtx 1.4c 2024/10/21
+      Source: mathastext.dtx 1.4e 2024/10/26
 
 %</readme>
 %<*dtx>
@@ -44,7 +44,7 @@
 %%----------------------------------------------------------------
 %% Package: mathastext
 %% Info:    Use the text font in math mode (JFB)
-%% Version: 1.4c 2024/10/21
+%% Version: 1.4e 2024/10/26
 %% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
 %% Copyright (C) 2011-2019, 2022-2024 Jean-Francois Burnol
 %%                                   <jfbu at free dot fr>
@@ -193,17 +193,62 @@
 
 %</changelog>
 %<*readme|changelog>
+1.4e \[2024/10/26\]
+----
+
+* Fix a bug dating back to `1.3y` which caused under `LGRgreek` or
+  `LGRgreeks` options an `\MTversion{normal}` to raise an `Extra
+  \else` error (not if `subdued`).  The unit test which could have
+  shown this had been left aside at `1.4d` because it was so old
+  that some matters unrelated to the package prevented its
+  immediate use... alas...
+
+* Fix one more `1.4` regression: the (not really recommended)
+  option `unimathaccents` was broken.  Again a test file existed
+  but it had been left apart from those automatically built, for
+  some unknown reason...
+
+1.4d \[2024/10/26\]
+----
+
+* Fix one more `1.4` regression (the worst one by far): `$f''$`
+  caused a crash.  Fortunately, the `everymath` option which
+  re-enacts legacy code could be used as a *temporary emergency
+  work-around*.  Thanks to Enrico Gregorio for report.
+
+* The `1.4b` option `noletters` did not prevent the package from
+  defining math mode symbols `\inodot` and `\jnodot`.  It now does.
+
+* Fix a longstanding legacy bug which would have caused a crash if
+  `\MTnonlettersobeymathxx` had been used with `XeLaTeX` in a
+  document with the character `-` being a Babel shorthand.
+
+* Usage of `\Mathastext` or `\MTDeclareVersion` to declare a
+  math version associated with an exotic non-text font encoding
+  such as `OML` is theoretically possible (although of dubious
+  practical use except for stress tests) but was broken
+  since `1.3u` due to internals 
+  relying on `LaTeX` commands associated with text font encodings
+  (for example to define `\inodot`
+  using `\i`,
+  or the `\hbar` with the help of the accent command `\=`)
+  and which are not available in such context.  This release
+  handles such situation gracefully via warnings, rather than
+  causing low level errors.
+
+* Improve looks in the PDF of this Change log.
+
 1.4c \[2024/10/21\]
 ----
 
-* Fix a regression at `1.4`: under `XeLaTeX`: loading `mathastext`
+* Fix a regression at `1.4`: under `XeLaTeX`, loading `mathastext`
   caused an error if `unicode-math` and its `\setmathfont` had been
-  used prior ("Extended mathchar used as mathchar" in relation to the
+  used prior ("*Extended mathchar used as mathchar*" in relation to the
   minus sign character). Thanks to Michael Roland for report.
 
   Keep in mind though that the documentation (see 1.4.15 Unicode engines) has
-  always said that the package "is expected to be most definitely
-  incompatible with unicode-math".
+  always said that the package "*is expected to be most definitely
+  incompatible with unicode-math*".
 
 * Fix another regression at `1.4`, related to the same code and also avoided
   with `everymath` option, but showing with
@@ -225,8 +270,8 @@
 
 * Fix a regression at `1.4` regarding option `nodigits`.
 
-* New option: `noletters`.  I am in old age now so I can provide an option
-  completely antithetical to my life work.
+* New option: `noletters`.  *I am in old age now so I can provide an option
+  completely antithetical to my life work*.
 
 * Option `everymath` which is destined to be removed at next major
   release warns user about it.  As major releases tend to happen once
@@ -244,20 +289,20 @@
 1.4 \[2024/07/20\]
 ---
 
-* Since 1.2 of 2012/12/20, mathastext has used mathematically active
+* Since 1.2 of 2012/12/20, mathastext has used *mathematically active*
   characters to propose certain advanced functionalities.  For reasons half
   lost in the mists of time but whose main one was surely to keep the
   meaning of the active shape of characters unchanged outside of math mode,
   this mathematical activation, and (in most cases) the definitions of what
   active characters do, were done again at *each* entrance into math mode.
-  At this 1.4 release, mathastext does not inject *any* code whatsoever into
-  the `\everymath` and `\everydisplay` toks registers anymore (except for
-  one font-related hack needed under LuaLaTeX, see below).  Your documents
+  At this 1.4 release, mathastext does *not inject any code whatsoever* into
+  the `\everymath` and `\everydisplay` toks registers anymore (*except* for
+  one font-related hack needed under `LuaLaTeX`, see below).  Your documents
   will compile a tiny bit faster.
 
-* In (unsual) documents where users play with catcodes and mathcodes it is
-  impossible to keep exact backward compatibility, because documented user
-  commands which acted formerly a toggles with delayed action now will enact
+* In (*unsual*) documents where users play with catcodes and mathcodes it is
+  *impossible* to keep exact backward compatibility, because documented user
+  commands which acted formerly as toggles with delayed action now will enact
   changes immediately if in the document body.  In practice consequences are
   expected to be few, because catcode active characters are (as was already
   the case with earlier releases) hacked only when they are Babel shorthands
@@ -271,9 +316,9 @@
 * New option: `everymath`. It instructs mathastext to revert (partially)
   to its legacy code which uses `\everymath/\everydisplay`.  This reversal
   is partial, the handling of ascii letters not being included into it.  The
-  `everymath` option is there only to try as a quick fix in case transition
+  `everymath` option is there *only to try as a quick fix* in case transition
   to this release causes a major problem in a user document and time is
-  lacking to investigate.  Please report to the author such issues.  Option
+  lacking to investigate.  *Please report to the author such issues*.  Option
   `everymath` is destined to be removed at next major release.
 
 * New option: `activedigits`.  Enjoy.
@@ -285,7 +330,7 @@
 * Bugfix: do not override special behavior of the math mode dot in
   babel-spanish.
 
-* Bugfix: A desperate hack related to LuaLaTeX font matters and dating
+* Bugfix: A *desperate* hack related to `LuaLaTeX` font matters and dating
   back to 1.3o 2016/05/03 had been for some years in dire need of an update
   regarding fonts using `Renderer=HarfBuzz`.  This is done now.  Thanks to
   tex.sx `user691586` for report.  This is currently the sole remaining
@@ -292,12 +337,12 @@
   usage of `\everymath/\everydisplay`.
 
 * Bugfix: `\MTexplicitbracesobeymathxx` (which is related to `\{` and `\}`)
-  was without effect since an upstream LaTeX change at its 2020-02-02 release.
+  was without effect since an upstream `LaTeX` change at its 2020-02-02 release.
 
 * With option symbolmisc, those math symbol macros formerly defined via
   `\DeclareRobustCommand` are now declared via `\protected\def`.
 
-* Removal of legacy branches previously kept to support LaTeX earlier than
+* Removal of legacy branches previously kept to support `LaTeX` earlier than
   2020-02-02.
 
 * Removal of support for EU1 and EU2 font encodings.
@@ -329,7 +374,7 @@
 
 * No more messages sent to the console output during loading,
   only info messages going into the log, and using (more or less)
-  the official LaTeX interface: after close to 13 years of development
+  the official `LaTeX` interface: after close to 13 years of development
   of this package it was perhaps finally the time to do it.
 
 * Documentation improvements.  Close to 13 years after the
@@ -406,7 +451,7 @@
 
   - add `\MTgreekupdefault` and `\MTgreekitdefault`.  The former
     replaces `\updefault` which was used in some places and since
-    LaTeX 2020-02-02 caused systematic Font Warnings about the
+    `LaTeX` `2020-02-02` caused systematic Font Warnings about the
     substitution of `up` by `n`.
 
   These new features required an extensive internal refactoring
@@ -428,16 +473,16 @@
 1.3w \[2019/11/16\]
 ----
 
-* LaTeX 2019-10-01 release (up to patch level 3 inclusive)
+* `LaTeX` `2019-10-01` release (up to patch level 3 inclusive)
   together with `amsmath` conspired `:-)` to break `mathastext`,
   in connexion with math accents. This has been fixed upstream,
   but I am releasing nevertheless a hot fix to this
   https://github.com/latex3/latex2e/issues/216 issue
-  (this is compatible with future LaTeX releases).
+  (this is compatible with future `LaTeX` releases).
 
 * Fix: the `\hbar` is originally a robust command but
   becomes a `\mathchardef` token if (e.g.) `amsfonts` is
-  loaded and then with recent LaTeX `\hbar<space>` is
+  loaded and then with recent `LaTeX` `\hbar<space>` is
   made undefined and `mathastext` definition of it
   remained without effect. The `\mathastext` own `\hbar`
   is now defined `\protected`.
@@ -455,15 +500,15 @@
 1.3v \[2019/09/19\]
 ----
 
-* LaTeX 2019-10-01 release has made more math macros robust.
+* `LaTeX` 2019-10-01 release has made more math macros robust.
   This applies in particular to the math accents and to the
   `\hbar`. This required for mathastext to adapt. Also
   `\leftarrowfill` and `\rightarrowfill` are now defined
   robust by the kernel, hence mathastext does the same. These
-  changes are dropped if mathastext detects an older LaTeX
+  changes are dropped if mathastext detects an older `LaTeX`
   format.
 
-* These LaTeX kernel changes motivated an examination of some
+* These `LaTeX` kernel changes motivated an examination of some
   redefinitions done (optionally) by mathastext:
 
   - The user math alphabet macros got redefined as expanding
@@ -474,7 +519,7 @@
   alphabet commands (they redefine themselves and other macros
   on first use) makes is somewhat problematic for mathastext
   to keep them updated across math versions and at the same
-  time strictly LaTeX2e robust. Thus mathastext now requires
+  time strictly `LaTeX2e` robust. Thus mathastext now requires
   the e-TeX primitive `\protected` and uses it for the
   definitions of the user level math alphabet macros.
 
@@ -488,18 +533,18 @@
   `\mid`, `\prod`, `\sum`, `\imath`, `\jmath`.
 
   - The macro `\vert` (which expands to a `\delimiter`) is now
-  defined robust by LaTeX. Its mathastext redefinition is a
+  defined robust by `LaTeX`. Its mathastext redefinition is a
   `\protected` one rather.
 
   - The `\{` and `\}` (which get redefined only under
   `\MTexplicitbracesobeymathxx` regime) are now strictly
-  robust in the LaTeX2e sense (formerly they were `\let` to
+  robust in the `LaTeX2e` sense (formerly they were `\let` to
   some robust macros, and this did not make them strictly
-  LaTeX2e-robust entities).
+  `LaTeX2e`-robust entities).
 
 * The various changes in mathastext described in the previous item
-  apply independently of the LaTeX release version. The
-  LaTeX format itself requires the e-TeX extensions since 2015.
+  apply independently of the `LaTeX` release version. The
+  `LaTeX` format itself requires the e-TeX extensions since 2015.
 
 
 1.3u \[2019/08/20\]
@@ -515,7 +560,7 @@
   using fonts with varying encodings.
 
   This reinforces importance of using `\MTversion` and not the
-  LaTeX `\mathversion` when switching to a new math version (which
+  `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
@@ -527,8 +572,8 @@
 * 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,
+  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
@@ -646,7 +691,7 @@
 * 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;
+  `mathsastext.html`! (but the pdf documentation had the correct link;
   as well as the CTAN catalogue).
  
  
@@ -709,9 +754,9 @@
 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.
+* 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\]
@@ -801,8 +846,8 @@
   `\MTnoicinmath` correspondingly modified).
 
 * the new `\luatexUmathcodenum` as available since TL2013 allows
-  identical treatment by mathastext of = and - under both LuaTeX
-  and XeTeX.
+  identical treatment by mathastext of = and - under both `LuaTeX`
+  and `XeTeX`.
 
 * `\newmcodes@` of amsmath is left untouched in case of option basic.
 
@@ -1046,7 +1091,7 @@
 
 *  the `\Mathastext` command has been improved to
       facilitate the mechanism of math versions also when
-      using XeTeX or LuaTeX (with package fontspec.)
+      using `XeTeX` or `LuaTeX` (with package fontspec.)
 
 *  the en-dash and dotless i and j now work with all
       encodings, Unicode inclusive.
@@ -4515,10 +4560,13 @@
     information on what happens with \xA7subdued\xA7 option 
     in the ``normal'' (or ``bold'') math version.\par
   \end{footnotesize}
-\item \mstcmd{inodot}, \mstcmd{jnodot}: the corresponding glyphs in the \mst-ified
-  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.
+\item \mstcmd{inodot}, \mstcmd{jnodot}: the corresponding glyphs
+  in the \mst-ified font for use in math mode. By default,
+  |\imath| and |\jmath| are redefined to use them.  The
+  \xA7defaultimath\xA7 option prevents that, but |\inodot| and
+  |\jnodot| are always defined (although they may not render correctly if
+  the used text font is missing the glyphs).  Since \texttt{1.3t},
+  these macros obey the \texttt{subdued} regime.
 \item \mstcmd{MathEuler}, \mstcmd{MathEulerBold}: math alphabets to access
 all the glyphs of the Euler font, if option |eulergreek| (or
 |eulerdigits| was passed to the package.
@@ -5625,7 +5673,7 @@
  \item \mstopt{unimathaccents}:\RightNote{\mstrelease{1.3u}} extends |mathaccents| to
 OpenType fonts. Gave bad results in my brief testing.
  \item \mstopt{defaultimath}: do not overwrite \cs{imath} and
- \cs{jmath} to use \cs{inodot} and \cs{jnodot}.
+ \cs{jmath} to use \xA7\inodot\xA7 and \xA7\jnodot\xA7.
  \item \mstopt{defaultmathsizes}: do not change the \LaTeX{} defaults for the sizes
  of exponents and subscripts.
  \item \mstopt{fouriervec}: provides a \cs{fouriervec} command. The user can then
@@ -5707,10 +5755,20 @@
 % Il faut aussi g\xE9rer les `.
 
 \catcode`*=\active
+
+% 1.4d utilise \texttt pour les `foo...bar` et s'il y a un * l\xE0-dedans il ne
+% faut pas le baisser car il est d\xE9j\xE0 \xE0 hauteur. Et par ailleurs il n'y a pas
+% de raison pour un * en dehors de ce contexte sauf pour faire les
+% mock-itemize.  Cependant je n'ai pas tout v\xE9rifi\xE9.  Oups, si il
+% y en a quelques un utilis\xE9s dans le style *foo*.
 \def*{\ifvmode\smallskip
   \leavevmode\kern.5em\smash{\raisebox{-.3\height}{\char42}}\kern1em
-  \else\smash{\raisebox{-.3\height}{\char42}}\fi }%
+  \else\ifdim\fontcharwd\font`i=\fontcharwd\font`m \char42\relax
+       \else\mstdochackstar\fi
+  \fi }%
 
+\def\mstdochackstar#1#2#3*{#1#2\emph{#3}}
+
 \begingroup
     \lccode`\~`1
 \lowercase{\endgroup\def~}{\ifvmode\medskip\expandafter\@DTXLOGhelper\fi 1}
@@ -5743,10 +5801,23 @@
   \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.
+  \catcode`\`\active
+  \begingroup
+  \lccode`\~`\`
+  \lowercase{\endgroup\def~##1~}{\mstdochacklogo##1TeX-\empty\relax}%
+  \catcode`'=\active
+  \begingroup
+  \lccode`\~`'
+  \lowercase{\endgroup\let~}\textquotesingle
   \nonfrenchspacing
   \input ChangeLog.md
 }
+\def\mstdochacklogo#1TeX#2#3#4\relax{\ifx#2-\texttt{\hyphenchar\font45\relax#1}%
+                                     \else\ifx#22\ifx#3e\msthologo{#1TeX2e}\else
+                                                        \@nameuse{#1TeX}\fi
+                                     \else
+                                     \@nameuse{#1TeX}\fi
+                                     \fi}
 
 \makeatother
 
@@ -5828,7 +5899,7 @@
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[2020/02/02]
 \ProvidesPackage {mathastext}
-  [2024/10/21 v1.4c Use the text font in math mode (JFB)]
+  [2024/10/26 v1.4e Use the text font in math mode (JFB)]
 %    \end{macrocode}
 % \mstrelease{1.3zb} avoids writing \mst info messages also to console output, only log file.
 % Make prefix occupy 20 not 25 characters for alignment with \texttt{LaTeX Font Info},
@@ -5885,13 +5956,12 @@
 \newif\ifmst at XeOrLua
 \ifmst at LuaTeX\mst at XeOrLuatrue\fi
 \ifmst at XeTeX \mst at XeOrLuatrue\fi
-%    \begin{macrocode}
 %    \end{macrocode}
 % \mstrelease{1.4}.  I only checked this is correct with TL2024.
 % The macro will be used with |#1| a catcode 11 or 12 token or a one character
 % control sequence such as |\#|.
 %
-% \mstrelease{1.4c} add some definitions to avoid separate branches for
+% \mstrelease{1.4c} adds some definitions to avoid separate branches for
 % non-Unicode vs Unicode.
 %    \begin{macrocode}
 \ifmst at XeTeX
@@ -6349,6 +6419,10 @@
 % The \cs{MTprimedoesskip} is not a |no-op| in |subdued| math version.
 % This is legacy situation, not changed at \mstrelease{1.4}.
 %
+% \mstrelease{1.4d} fixes a (very) bad bug introduced at \mstrelease{1.4}
+% which caused |$f''$| to error.  The fix is to be found in the definition of
+% \cs{mst@@mathactivate} (done later in the package) used for the
+% non-\texttt{everymath} branch.
 %    \begin{macrocode}
 \newmuskip\mst at prime@muskip
 \def\mst at prime@skip{.5mu}
@@ -6387,7 +6461,7 @@
 }%
 %    \end{macrocode}
 % The ``undo'' is needed at \mstrelease{1.4} (but not if |everymath|).
-% The \mstrelease{1.4c} uses with Unicode \cs{Umathcodenum} in
+% The \mstrelease{1.4c} (with Unicode engines) uses \cs{Umathcodenum} in
 % \cs{mst at mathdeactivate} and not \cs{mathcode} hence no |"8000| here.
 %    \begin{macrocode}
 \def\mst at undo@mathactivateprime{\mst at mathdeactivate#1{\mst at activemathcodenum@space}}%
@@ -6660,19 +6734,26 @@
 %    \mstrelease{1.4} has significantly refactored the coding, there were
 %    simplication from a changed way to use \cs{mst at mathactivate} for letters
 %    and added branches to accomodate the renouncement to \cs{everymath}.
+%
+%    Some auxiliaries. The last two (which use the first two) are injected
+%    inside the redefinitions of active Babel shorthands done by
+%    \cs{mst at do@activecase}.
+%    \begin{macrocode}
+\def\mst at magic@v #1#2#3#4#5{#1#3#4}
+\def\mst at magic@vi #1#2#3#4#5#6{#1#2#4#5}
+\def\mst at fork{\ifmmode\mst at magic@v\fi\@thirdofthree}
+\def\mst at safefork{\ifmmode\if at safe@actives\else\mst at magic@vi\fi\fi\@thirdofthree}
+%    \end{macrocode}
 % \begin{macro}{\mst at do@activecase}
-% Called by \cs{mst at mathactivate} if |#1| is catcode active.
+% Called by \cs{mst at mathactivate} if |#1| is catcode active. At
+% \mstrelease{1.4} it is also required that the token activation originated
+% from\ctanpkg{babel}.  Else this \cs{mst at do@activecase} is not executed.  If
+% executed, it hooks into \ctanpkg{babel} associated macros so that in math
+% mode the catcode active token does what \mst expects it to do. Its
+% \cs{mathcode} is set to the one of the associated \cs{mathalpha} symbol as
+% declared by \mst, except for asterisk and right tick which simply use their
+% ascii number as mathcode.
 %
-% Check if token activation originates apparently into \ctanpkg{babel}:
-% \begin{itemize}[nosep]
-% \item if NO, nothing is done. The active meaning of |#1| is not modified.
-% \item if YES, we hook into \ctanpkg{babel} associated macros so
-%   that in math mode the catcode active token does what \mst expects it to
-%   do. Its \cs{mathcode} is set to the
-%   one of the associated \cs{mathalpha} symbol as declared by \mst, except
-%   for asterisk and right tick which simply use their ascii number as mathcode.
-% \end{itemize}
-%
 % In the case of \ctanpkg{babel}-spanish which has a catcode active right
 % tick, resetting its mathcode has the advantage to reveal in output the case
 % of a faulty input using the curly right tick U+8217 which one can get easily
@@ -6680,18 +6761,10 @@
 %
 % And in general it is dangerous to have a character both catcode active and
 % mathcode active. 
-%
-% Some auxiliaries.
-%    \begin{macrocode}
-\def\mst at magic@v #1#2#3#4#5{#1#3#4}
-\def\mst at magic@vi #1#2#3#4#5#6{#1#2#4#5}
-\def\mst at fork{\ifmmode\mst at magic@v\fi\@thirdofthree}
-\def\mst at safefork{\ifmmode\if at safe@actives\else\mst at magic@vi\fi\fi\@thirdofthree}
-%    \end{macrocode}
 % Some refactoring (and streamlining) at \mstrelease{1.4} here.
 % \begin{footnotesize}
 %   There was at some point in the case of a Babel-active token a special
-%   hanlding for |#1| to use \cs{MTmathcharletter}|#1| (and event for
+%   hanlding for |#1| to use \cs{MTmathcharletter}|#1| (and also for
 %   digits!).  But this is almost impossible to arise in practice:
 % \begin{itemize}[nosep]
 % \item Babel commands to set up a shorthand are preamble only (they use
@@ -6729,7 +6802,8 @@
 %    \end{macrocode}
 % As letters and digits are impossible here, |#2| is either empty (which
 % happens only now for asterisk and right tick) or a single token (\cs{mathclose},
-% \cs{mathopen},... ).  When |#2| is not empty, |#3| is always a mathchar
+% \cs{mathopen},... ).  When |#2| is not empty, |#3| is always (not quite see
+% below) a mathchar
 % token.  For safety we make sure then the mathcode is not active.
 %
 % The rationale is
@@ -6741,11 +6815,26 @@
 % Arguably I probably mainly wanted to do this if the character was found
 % catcode active but not a Babel shorthand.  But it ended into the Babel
 % branch and the non-Babel branch for active catcode is to do nothing.
+% As it is now to time-intensive to re-check the whole logic I am keeping
+% this.
 %
-% |#2| is empty exactly for the case of the right tick and the asterisk.
-% In all other cases, then |#3| is a mathchar token.
+% |#2| is empty exactly for the case of the right tick and the asterisk.  In
+% all other cases, then |#3| is a mathchar token, except in the exceptional
+% case of |#1| being |-| (necessarily of catcode 12 here), |#3| with Unicode
+% engines is \cs{mst at varfam@minus} which is a macro expanding to a
+% math-version dependent \cs{Umathchardef} token.  Then the \cs{mathcode}
+% assignment breaks under \XeLaTeX.  It appears unlikely for |-| to be a Babel
+% shorthand. But to be extra safe, and at same time avoid undue complications
+% of needed separate branches for non-Unicode and Unicode engines, we simply
+% drop the assignment in that case (done at \mstrelease{1.4c}).
+%
+% The matter with the |\string-| is inherited stupid paranoia from early times
+% regarding catcodes at package loading, as I do it elsewhere in the package
+% code, also here.
 %    \begin{macrocode}
-    \ifx\relax #2\relax\mathcode`#1=`#1\relax\else\mathcode`#1=#3\relax\fi
+    \expandafter\if\string-#1\else
+      \ifx\relax #2\relax\mathcode`#1=`#1\relax\else\mathcode`#1=#3\relax\fi
+    \fi
 %    \end{macrocode}
 % Less \cs{expandafter}'s at \mstrelease{1.4}.  Also, it is now required
 % to make sure:
@@ -6843,7 +6932,13 @@
                      {\expandafter\let
                       \csname mst at prioractivemeaning@##1\endcsname ~}
                      {}%
-        \def~{\ifmmode##2##3\else##1\fi}%
+%    \end{macrocode}
+% The \mstrelease{1.4} added this \cs{ifmmode} test but overlooked
+% the case of the right tick \texttt{'} which requires to be moved to
+% after the conditional.  Let's do this in a safer way.
+%    \begin{macrocode}
+        \def~{\ifmmode\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
+              {##2##3}{##1}}%
       }%
     }%
 \fi
@@ -6853,7 +6948,7 @@
 %   character which is encountered is currently with active catcode.
 %
 %   At \mstrelease{1.4}  the non-catcode active branch is entered only if the
-%   character isn't mathematically active at time of use..
+%   character isn't mathematically active at time of use.
 %
 %   Careful that |#2| and |#3| may each be empty.  The test for being a Babel
 %   shorthand is done here and not as prior to \mst at release{1.4} inside
@@ -6883,7 +6978,9 @@
 % of finishing the \mstrelease{1.4c} updates).  The \cs{string} thing with
 % \texttt{-} is due to some old paranoia for which I see no underlying reason
 % (why on earth would \texttt{-} be catcode active here?), but maintaining it.
-% For |#1=-| the |#2| is empty and unused.
+% For |#1=-| the |#2| is empty and unused as the mathcode reassignment is then
+% skipped (because \cs{mst at subduedminus} and \cs{mst at nonsubduedminus} take
+% care of such things in an engine dependent manner; see them).
 %    \begin{macrocode}
 \ifmst at everymath
 \else
@@ -7675,28 +7772,32 @@
 %   |@lgr@| in macro names in place of |@greek@|) which were not everywhere
 %   followed up, and this broke the |selfGreek| option.  Fixed at \mstrelease{1.3z}.
 %
+%   Prior to \mstrelease{1.4e}, the code of \cs{mst at update@greeksh}, which
+%   starts with a definition
+%   \cs{mst at greek@lsh} also updated it, depending on branches.  But,
+%   contrarily to \cs{mst at greek@ush} it is used nowhere else.  Also the code
+%   now has two parameters |#1#2| for it to be sharable with
+%   \cs{MTDeclareVersion@@} needs.
 %    \begin{macrocode}
 \providecommand*\MTgreekupdefault{n}
 \providecommand*\MTgreekitdefault{it}
 \newif\ifmst at greek@lower at up
 \newif\ifmst at greek@upper at up
-\def\mst at update@greeksh{
-    \def\mst at greek@lsh{\mst at ltsh}
-    \def\mst at greek@ush{\mst at opsh}
-      \mst at greek@lower at uptrue
-      \expandafter\in@\expanded{{\mst at ltsh.}}{it.,sl.}%
+\def\mst at update@greeksh#1#2{
+    \def\mst at greek@lsh{#1}
+    \def\mst at greek@ush{#2}
+    \mst at greek@lower at uptrue
+      \expandafter\in@\expanded{{\mst at greek@lsh.}}{it.,sl.}%
       \ifin@\mst at greek@lower at upfalse\fi
-      \mst at greek@upper at uptrue
-      \expandafter\in@\expanded{{\mst at opsh.}}{it.,sl.}%
+    \mst at greek@upper at uptrue
+      \expandafter\in@\expanded{{\mst at greek@ush.}}{it.,sl.}%
       \ifin@\mst at greek@upper at upfalse\fi
     \ifmst at itgreek
-      \def\mst at greek@lsh{\MTgreekitdefault}
       \def\mst at greek@ush{\MTgreekitdefault}
         \mst at greek@lower at upfalse
         \mst at greek@upper at upfalse
     \fi
     \ifmst at upgreek
-      \def\mst at greek@lsh{\MTgreekupdefault}
       \def\mst at greek@ush{\MTgreekupdefault}
         \mst at greek@lower at uptrue
         \mst at greek@upper at uptrue
@@ -7704,8 +7805,7 @@
     \ifmst at frenchmath
       \ifmst at itgreek\else
       \ifmst at upgreek\else
-        \def\mst at greek@lsh{\mst at opsh}
-        \def\mst at greek@ush{\mst at opsh}
+        \def\mst at greek@ush{#2}
           \mst at greek@lower at uptrue
           \mst at greek@upper at uptrue
       \fi\fi
@@ -7719,7 +7819,7 @@
             \mst at greek@upper at uptrue
     \fi
 }
-\mst at update@greeksh
+\mst at update@greeksh{\mst at ltsh}{\mst at opsh}
 %    \end{macrocode}
 % \begin{macro}{mtgreekup}
 % \begin{macro}{mtgreekit}
@@ -8772,31 +8872,58 @@
 %
 % The \cs{mst at subduedminus} is defined only at begin document and fetches
 % there what will be the subdued mathcode of \texttt{-}.
+%
+% \mstrelease{1.4d} avoids here low-level \TeX\ error when
+% attempting to use the en-dash slot in a \TeX-legacy non-text
+% encoding such as \texttt{OML} (\LaTeX\ has defines no
+% \cs{textendash} in such encodings).  The error was present since
+% changes at \mstrelease{1.3u} which used code adapting to the required
+% font encoding rather than test for it being  \texttt{T1} or \texttt{LY1} etc...
 %    \begin{macrocode}
 \let\mst at subduedminus\empty
 \let\mst at nonsubduedminus\empty
-\def\mst at dothe@endashstuff#1#2#3{%
+\def\mst at dothe@endashstuff#1#2#3#4{%
   \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
-    \DeclareMathSymbol{#1}{\mathbin}{mtoperatorfont}
-                      {\csname\mst at tmp@enc\string\textendash\endcsname}
-    \DeclareMathSymbol{#2}{\mathalpha}{mtoperatorfont}
-                      {\csname\mst at tmp@enc\string\textendash\endcsname}
+    \@ifundefined{\mst at tmp@enc\string\textendash}%
+        {%
+          \PackageWarningNoLine{mathastext}
+          {Impossible to let the \string- use an EN-DASH in a math\MessageBreak
+           version with \mst at tmp@enc\space encoding, as there is none there.\MessageBreak
+           Reverting to default in math version #4}%
+          \let#1\relax\let#2\relax
+        }%
+        {%
+          \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
 }%
-\def\mst at dothe@emdashstuff#1#2#3{%
+\def\mst at dothe@emdashstuff#1#2#3#4{%
   \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}
+    \@ifundefined{\mst at tmp@enc\string\textendash}%
+        {%
+          \PackageWarningNoLine{mathastext}
+          {Impossible to let the \string- use an EM-DASH in a math\MessageBreak
+           version with \mst at tmp@enc\space encoding, as there is none there.\MessageBreak
+           Reverting to default in math version #4}%
+          \let#1\relax\let#2\relax
+        }%
+        {%
+          \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
 }%
 \def\mst at dothe@hyphenstuff#1#2{%
@@ -8832,10 +8959,16 @@
 % I have absolutely no idea why I was paranoid about \texttt{-} catcode (as for
 % other characters) but I feel even at \mstrelease{1.4c} I have to maintain
 % the tradition.
+%
+% \mstrelease{1.4d} takes extra precautions relative to \mst math versions
+% associated with a font encoding not having an EN-DASH slot.
 %    \begin{macrocode}
     \def\mst at tmp#1{%
       \mst at do@nonletters\expandafter{\the\mst at do@nonletters
-        \mst at mathactivate#1\mathbin\mst at varfam@minus}%
+        \@ifundefined{mst at minus@mv\math at version}
+            {\mst at nonmathmathactiveminus}
+            {\mst at mathactivate#1\mathbin\mst at varfam@minus}%
+        }%
 %    \end{macrocode}
 % At \mstrelease{1.4c}, \cs{mst at mathdeactivate} adds a check to whether
 % its first argument is \texttt{-} and then does not do itself the
@@ -8884,7 +9017,9 @@
                        \csname mst at minus@mv\math at version\endcsname
                        \relax
     \else
-     \mathcode`\-=\mst at minus
+     \@ifundefined{mst at minus@mv\mst at tmp@enc}
+        {\mst at subduedminus}
+        {\mathcode`\-=\mst at minus}%
     \fi
   }%
   \def\mst at ParseUmathchardef{\expandafter\mst at ParseUmathchardef@i\meaning}%
@@ -8940,7 +9075,8 @@
 \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}%
+       \let\expandafter\hbar\csname mst at hbar@mv\math at version\endcsname
+       \ifx\hbar\relax\let\hbar\mst at original@hbar\fi}%
 \fi
 \def\mst at mathrlap{\mathpalette\mst at mathrlapinternal}
 \def\mst at mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}}
@@ -8947,19 +9083,35 @@
 %    \end{macrocode}
 % ATTENTION! The definition of \cs{mst at tmp@enc} is mandatory for
 % \cs{mst at OneifUniEnc} to work correctly...
+%
+% The \mstrelease{1.3u} method which was backported from the one for math
+% accents causes a build crash when attempting to create a \mst math
+% version with \texttt{OML} encoding, as there is no |\OML\=| control
+% sequence. Fixed at \mstrelease{1.4d}, see also tne definition of
+% \cs{mst at nonsubduedhbar}.
 %    \begin{macrocode}
-\def\mst at dothe@hbarstuff#1#2#3{%
+\def\mst at dothe@hbarstuff#1#2#3#4{%
   \edef\mst at tmp@enc{#3}%
   \if1\mst at OneifUniEnc
     \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
-    \mst at DeclareMathAccent{#2}{\mathalpha}{mtletterfont}%
-                      {\csname\mst at tmp@enc\string\=\endcsname{}}%
-    \endgroup
-    \protected\def#1{\mst at mathrlap{#2{\ }}\MTmathcharletterh}%
+    \@ifundefined{\mst at tmp@enc\string\=}%
+        {%
+          \PackageWarningNoLine{mathastext}
+          {Impossible to define the \string\hbar\space using a font with\MessageBreak
+           \mst at tmp@enc\space encoding, as there is no \string\= accent.\MessageBreak
+           Reverting to default \string\hbar\space in math version #4}%
+          \let#1\relax
+        }%
+        {%
+         \begingroup
+         \def\@text at composite##1\@text at composite##2{##2}%
+         \let\add at accent\@firstoftwo
+         \mst at DeclareMathAccent{#2}{\mathalpha}{mtletterfont}%
+                   {\csname\mst at tmp@enc\string\=\endcsname{}}%
+         \endgroup
+         \protected\def#1{\mst at mathrlap{#2{\ }}\MTmathcharletterh}%
+        }%
   \fi
 }%
 %    \end{macrocode}
@@ -10254,7 +10406,18 @@
 % math version.
 %
 % \mstrelease{1.3v} lets the redefined \cs{imath} and \cs{jmath} be \cs{protected}.
+%
+% The \mstrelease{1.3u} change is the cause a crash when attempting to define
+% math version in some encodings such as \texttt{OML}.  This is same problem
+% as with \cs{hbar} and minus as endash.  Fixed at \mstrelease{1.4d}.
+%
+% \mstrelease{1.4d} lets the option \texttt{noletters} prevent definition of
+% \cs{inodot} and \cs{jnodot}.
 %    \begin{macrocode}
+\let\mst at subduedinodot\@empty
+\let\mst at nonsubduedinodot\@empty
+\ifmst at noletters
+\else
 \def\mst at subduedinodot{%
    \let\inodot\mst at original@imath
    \let\jnodot\mst at original@jmath
@@ -10264,18 +10427,42 @@
                \csname mst at inodot@mv\math at version\endcsname
    \expandafter\let\expandafter\jnodot
                \csname mst at jnodot@mv\math at version\endcsname
+   \ifx\inodot\relax\let\inodot\mst at original@imath\fi
+   \ifx\jnodot\relax\let\jnodot\mst at original@jmath\fi
 }%
-\def\mst at dothe@inodotstuff#1#2#3{%
+\fi
+\def\mst at dothe@inodotstuff#1#2#3#4{%
   \edef\mst at tmp@enc{#3}%
   \if1\mst at OneifUniEnc
     \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}%
+    \@ifundefined{\mst at tmp@enc\string\i}%
+        {%
+          \PackageWarningNoLine{mathastext}
+          {Impossible to define the \string\inodot\space using a font with\MessageBreak
+           \mst at tmp@enc\space encoding, as there is no \string\i.\MessageBreak
+           Reverting to default \string\imath\space in math version #4}%
+          \let#1\relax
+        }%
+        {%
+          \DeclareMathSymbol{#1}{\mathalpha}{mtletterfont}
+                            {\csname\mst at tmp@enc\string\i\endcsname}%
+        }%
+    \@ifundefined{\mst at tmp@enc\string\j}%
+        {%
+          \PackageWarningNoLine{mathastext}
+          {Impossible to define the \string\jnodot\space using a font with\MessageBreak
+           \mst at tmp@enc\space encoding, as there is no \string\j.\MessageBreak
+           Reverting to default \string\jmath\space in math version #4}%
+          \let#2\relax
+        }%
+        {%
+          \DeclareMathSymbol{#2}{\mathalpha}{mtletterfont}
+                            {\csname\mst at tmp@enc\string\j\endcsname}%
+        }%
+  \fi
+}%
 \ifmst at defaultimath\else\mst at infoline{\string\imath\space and \string\jmath\space}
     \AtEndOfPackage{\AtBeginDocument{%
         \protected\def\imath{\inodot}%
@@ -10307,6 +10494,18 @@
 %   this whole thing is conditional on the |mathaccents| option anyway, which
 %   per default is not executed.
 %
+%   Added note at \mstrelease{1.4d} |2024/10/26|: the above
+%   mentioned breakage definitely occurs with non-text encoding
+%   such as \texttt{OML}, if an attempt is made via
+%   \cs{Mathastext} or \cs{MTDeclareVersion} to set it up for use
+%   in a \mst math version.  This happens only with
+%   \texttt{mathaccents} option, and was shadowed by a
+%   similar breakage occurring without any option due to similar
+%   code added at \mstrelease{1.3u} for the \cs{hbar}, \cs{imath},
+%   \cs{jmath} and even the \texttt{-} which tries to use the
+%   EN-DASH slot in an 8bit \TeX\ font encoding. Fixed at \mstrelease{1.4}
+%   which emits warnings in such exotic contexts.
+%
 %   The |\vec| accent is not considered here because it has no suitable
 %   available glyph in a standard 8bits text font encodings.
 %
@@ -10352,9 +10551,16 @@
                    \csname mst at original@\@tempa\endcsname
    \expandafter\let\csname\@tempa\space\expandafter\endcsname
                    \csname mst at original@\@tempa\space\endcsname
-   }%
+  }%
 }%
+%    \end{macrocode}
+%   Modified at \mstrelease{1.4d} to catch math versions trying to use a
+%   non-text encoding such as \texttt{OML}.
+%    \begin{macrocode}
 \def\mst at nonsubduedmathaccents{%
+ \@ifundefined{mst at grave@mv\math at version}
+ {\mst at subduedmathaccents}
+ {%
   \@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
                  {dot}{ddot}{mathring}{hat}{tilde}%
   \do
@@ -10362,8 +10568,9 @@
                    \csname mst@\@tempa @mv\math at version\endcsname
    \expandafter\let\csname\@tempa\space\expandafter\endcsname
                    \csname mst@\@tempa @mv\math at version\space\endcsname
+  }%
+ }%
 }%
-}%
 \def\mst at dothe@mathaccentsstuff#1#2{%
   \begingroup
   \edef\mst at tmp@enc{#2}%
@@ -10371,53 +10578,60 @@
   \let\add at accent\@firstoftwo
   \let\add at unicode@accent\@firstoftwo
   \if1\mst at OneifUniEnc
+%    \end{macrocode}
+% Incredibly \mstrelease{1.4} removed the definition of a certain
+% \cs{mst at robustifyingspace} but kept on using it here.  The author
+% add probably searched for a related conditional, but not for the
+% macro itself... and there was a test file which would have shown
+% the regression but it was not compiled.
+%    \begin{macrocode}
     \ifmst at unimathaccents
-      \expandafter\xdef\csname mst at grave@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at grave@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\`\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at acute@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at acute@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\'\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at check@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at check@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\v\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at breve@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at breve@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\u\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at bar@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at bar@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\=\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at dot@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at dot@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\.\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at ddot@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at ddot@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\"\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at mathring@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at mathring@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\r\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at hat@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at hat@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\^\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at tilde@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at tilde@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
@@ -10480,7 +10694,19 @@
 % or later it creates robust macros.
 %
 % \cs{mst at DeclareMathAccent} to work around \url{https://github.com/latex3/latex2e/issues/216}
+%
+% \mstrelease{1.4d} adds steps to avoid a crash if user is trying
+% to set up a \mst math version with an encoding such as
+% \texttt{OML}.
 %    \begin{macrocode}
+   \@ifundefined{#2\string\`}
+      {\PackageWarningNoLine{mathastext}
+         {Impossible to pick up text accents from an #2\MessageBreak
+          encoded font.  The mathaccent option will be\MessageBreak
+          ignored for the math version #1}%
+       \let\mst at tempa0}
+      {\let\mst at tempa1}%
+   \if\mst at tempa1%
     \expandafter\mst at DeclareMathAccent\expandafter
                {\csname mst at grave@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
                {\csname#2\string\`\endcsname{}}
@@ -10511,6 +10737,13 @@
     \expandafter\mst at DeclareMathAccent\expandafter
                {\csname mst at tilde@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
                {\csname#2\string\~\endcsname{}}
+   \else
+%    \end{macrocode}
+% The math version can be declared multiple times we can not simply
+% do some \cs{@nameuse} here.
+%    \begin{macrocode}
+    \global\expandafter\let\csname mst at grave@mv#1\endcsname\relax
+   \fi
   \fi
   \endgroup
 }%
@@ -10691,44 +10924,17 @@
 %   thus things are done here under |selfGreek| or other Greek options
 %   which ultimately serve nothing and conversely things are done here
 %   for |LGRgreek| which are superfluous.
+%
+%   At \mstrelease{1.4e}, the code previously used here was replaced with a
+%   call to a slightly modified \cs{mst at update@greeksh} to share code.
+%   Formerly some \cs{mst at greek@ush at loc} and \cs{mst at greek@lsh at loc} were
+%   defined here but this appears to have been due only to extra cautious
+%   coding to avoid overwriting something else.  On closer
+%   examination (after a great many years) this swas not needed at all.
 %    \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}%
-  \mst at greek@lower at uptrue
-      \expandafter\in@\expanded{{\mst at greek@lsh at loc.}}{it.,sl.}%
-      \ifin@\mst at greek@lower at upfalse\fi
-  \mst at greek@upper at uptrue
-      \expandafter\in@\expanded{{\mst at greek@ush at loc.}}{it.,sl.}%
-      \ifin@\mst at greek@upper at upfalse\fi
-  \ifmst at itgreek
-    \def\mst at greek@lsh at loc{\MTgreekitdefault}%
-    \def\mst at greek@ush at loc{\MTgreekitdefault}%
-      \mst at greek@lower at upfalse
-      \mst at greek@upper at upfalse
-  \fi
-  \ifmst at upgreek
-    \def\mst at greek@lsh at loc{\MTgreekupdefault}%
-    \def\mst at greek@ush at loc{\MTgreekupdefault}%
-      \mst at greek@lower at uptrue
-      \mst at greek@upper at uptrue
-  \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}%
-        \mst at greek@lower at uptrue
-        \mst at greek@upper at uptrue
-      \fi\fi
-  \fi
-  \ifcase\mst at greek@select
-        \or
-          \def\mst at greek@ush at loc{\MTgreekitdefault}%
-          \mst at greek@upper at upfalse
-        \or
-          \def\mst at greek@ush at loc{\MTgreekupdefault}%
-          \mst at greek@upper at uptrue
-  \fi
+  \mst at update@greeksh
+     {\csname mst at ltshape@\mst at version\endcsname}%
+     {\csname mst at shape@\mst at version\endcsname}%
 %    \end{macrocode}
 % \mstrelease{1.3za} refactoring to reduce code duplication; I briefly considered
 % trying to enhance \cs{MTgreekfont} to work also with |LGRgreeks| and
@@ -10763,9 +10969,9 @@
 \immediate\write\m at ne{}%
     \else
      \ifmst at selfGreek
-       \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{\mst at greekfont}{#5}{\mst at greek@ush at loc}%
+       \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{\mst at greekfont}{#5}{\mst at greek@ush}%
 \immediate\write\m at ne{}%
-\PackageInfo{mathastext}{Capital Greek letters (shape `\mst at greek@ush at loc\string'
+\PackageInfo{mathastext}{Capital Greek letters (shape `\mst at greek@ush\string'
                            will use the font\MessageBreak
                          family `\mst at greekfont\string' (OT1) in mathastext\MessageBreak
                          math version `\mst at version\string' declared}%
@@ -10772,12 +10978,27 @@
 \immediate\write\m at ne{}%
      \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}%
+%    \end{macrocode}
+% \mstrelease{1.4d} adds here a check for the \texttt{nohbar} option.
+% Presumably this was not done before because anyhow the package does
+% \centeredline{|\let\mst at subduedhbar\@empty\let\mst at nonsubduedhbar\@empty|}
+% But it is done in \cs{Mathastext@}. And besides,
+% for the \texttt{-} the code does check the \texttt{endash} et al.\@ options.
+%    \begin{macrocode}
+  \ifmst at nohbar\else
+    \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}{#3}%
+  \fi
   \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}%
+%    \end{macrocode}
+% \mstrelease{1.4d} lets the option \texttt{noletters} prevent definition of
+% \cs{inodot} and \cs{jnodot}.
+%    \begin{macrocode}
+  \ifmst at noletters\else
+    \expandafter\mst at dothe@inodotstuff\mst at tmp{#3}{#2}%
+  \fi
   \ifmst at mathaccents
     \mst at dothe@mathaccentsstuff{#2}{#3}%
   \fi
@@ -10784,10 +11005,10 @@
   \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}%
+    \expandafter\mst at dothe@endashstuff\mst at tmp{#3}{#2}%
   \else
     \ifmst at emdash
-      \expandafter\mst at dothe@emdashstuff\mst at tmp{#3}%
+      \expandafter\mst at dothe@emdashstuff\mst at tmp{#3}{#2}%
     \else
       \expandafter\mst at dothe@hyphenstuff\mst at tmp
     \fi
@@ -11018,6 +11239,12 @@
 %
 % MEMO: the mathematical activation of letters happened above from
 % \cs{MTeverymathdefault}.  Idem if |activedigits| for digits.
+%
+% Sadly the \mstrelease{1.3y} addition broke usage of (non-\texttt{subdued}
+% |\MTversion{normal}| under option |LGRgreek|, as the
+% \cs{ifmst at greek@normal at upper@up} used here never got any definition, hence
+% \cs{ifmst at greek@upper at up} got set to \cs{relax} which caused down the road
+% an |Extra \else| error in \cs{MTcustomgreek}.
 %    \begin{macrocode}
     \expandafter\let\csname ifmst at greek@upper at up\expandafter\endcsname
                     \csname ifmst at greek@\math at version @upper at up\endcsname
@@ -11103,8 +11330,31 @@
   \Mathastext@
   {\MTDeclareVersion[\mst at ltsh]{#1}{\mst at enc}{\mst at fam}{\mst at ser}{\mst at opsh}}%
 }%
+%    \end{macrocode}
+% This is thus the macro which is triggered by usage of \cs{Mathastext} in the
+% preamble without optional argument.  The package will execute it once after
+% its definition.
+%    \begin{macrocode}
 \def\Mathastext@ {%
-  \mst at update@greeksh 
+%    \end{macrocode}
+% This \cs{mst at update@greeksh} redefines \cs{mst at greek@ush} (used below in a
+% \cs{SetSymbolFont} executed if option \texttt{selfGreek}) and sets the
+% \cs{ifmst at greek@upper at up} and \cs{ifmst at greek@lower at up} conditionals.
+%    \begin{macrocode}
+  \mst at update@greeksh {\mst at ltsh}{\mst at opsh}%
+%    \end{macrocode}
+% \mstrelease{1.4e} fixes belatedly a bug introduced at \mstrelease{1.3y},
+% which had broken usage of |\MTversion{normal}| in documents using
+% \texttt{LGRgreek} or \texttt{LGRgreeks} (but not if \texttt{subdued}).
+%    \begin{macrocode}
+      \expandafter\let\csname ifmst at greek@normal at upper@up\expandafter\endcsname
+                      \csname ifmst at greek@upper at up\endcsname
+      \expandafter\let\csname ifmst at greek@normal at lower@up\expandafter\endcsname
+                      \csname ifmst at greek@lower at up\endcsname
+      \expandafter\let\csname ifmst at greek@bold at upper@up\expandafter\endcsname
+                      \csname ifmst at greek@upper at up\endcsname
+      \expandafter\let\csname ifmst at greek@bold at lower@up\expandafter\endcsname
+                      \csname ifmst at greek@lower at up\endcsname
   \edef\mst at encoding@normal{\mst at enc}%
   \edef\mst at family@normal{\mst at fam}%
   \edef\mst at series@normal{\mst at ser}%
@@ -11330,14 +11580,20 @@
   \ifmst at nohbar\else
      \mst at infoline{\string\hbar}%
      \mst at dothe@hbarstuff
-         \mst at hbar@mvnormal\mst at ltbar@mvnormal\mst at encoding@normal
+         \mst at hbar@mvnormal\mst at ltbar@mvnormal\mst at encoding@normal{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
+%    \end{macrocode}
+% \mstrelease{1.4d} lets the option \texttt{noletters} prevent definition of
+% \cs{inodot} and \cs{jnodot}.
+%    \begin{macrocode}
+  \ifmst at noletters\else
+    \mst at dothe@inodotstuff\inodot\jnodot\mst at encoding@normal{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
+  \fi
   \ifmst at mathaccents
     \mst at infoline{math accents}%
     \mst at dothe@mathaccentsstuff{normal}\mst at encoding@normal
@@ -11369,15 +11625,15 @@
 %    \begin{macrocode}
    \ifmst at endash
     \mst at dothe@endashstuff\mst at minus@mvnormal\mst at varfam@minus at mvnormal
-                          \mst at encoding@normal
+                          \mst at encoding@normal {normal}%
     \mst at dothe@endashstuff\mst at minus@mvbold\mst at varfam@minus at mvbold
-                          \mst at encoding@normal
+                          \mst at encoding@normal {bold}%
    \else
     \ifmst at emdash
       \mst at dothe@emdashstuff\mst at minus@mvnormal\mst at varfam@minus at mvnormal
-                            \mst at encoding@normal
+                            \mst at encoding@normal {normal}%
       \mst at dothe@emdashstuff\mst at minus@mvbold\mst at varfam@minus at mvbold
-                            \mst at encoding@normal
+                            \mst at encoding@normal {bold}%
     \else
       \mst at dothe@hyphenstuff\mst at minus@mvnormal\mst at varfam@minus at mvnormal
       \let\mst at minus@mvbold\mst at minus@mvnormal

Modified: trunk/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mathastext/mathastext.sty	2024-10-26 20:17:16 UTC (rev 72670)
+++ trunk/Master/texmf-dist/tex/latex/mathastext/mathastext.sty	2024-10-26 20:17:31 UTC (rev 72671)
@@ -23,7 +23,7 @@
 %%----------------------------------------------------------------
 %% Package: mathastext
 %% Info:    Use the text font in math mode (JFB)
-%% Version: 1.4c 2024/10/21
+%% Version: 1.4e 2024/10/26
 %% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
 %% Copyright (C) 2011-2019, 2022-2024 Jean-Francois Burnol
 %%                                   <jfbu at free dot fr>
@@ -33,7 +33,7 @@
 %%----------------------------------------------------------------
 \NeedsTeXFormat{LaTeX2e}[2020/02/02]
 \ProvidesPackage {mathastext}
-  [2024/10/21 v1.4c Use the text font in math mode (JFB)]
+  [2024/10/26 v1.4e Use the text font in math mode (JFB)]
 \def\mst at infoline#1{\immediate\write\m at ne
                     {(\space\space\space mathastext:\space\space\space) #1}}
 \immediate\write\m at ne{}
@@ -353,7 +353,9 @@
 \def\mst at fork{\ifmmode\mst at magic@v\fi\@thirdofthree}
 \def\mst at safefork{\ifmmode\if at safe@actives\else\mst at magic@vi\fi\fi\@thirdofthree}
 \def\mst at do@activecase#1#2#3{%
-    \ifx\relax #2\relax\mathcode`#1=`#1\relax\else\mathcode`#1=#3\relax\fi
+    \expandafter\if\string-#1\else
+      \ifx\relax #2\relax\mathcode`#1=`#1\relax\else\mathcode`#1=#3\relax\fi
+    \fi
     \ifmst at everymath\else\@ifundefined{mst at hackedshorthand@#1}{\fi
     \expandafter\let\csname mst at orig@user at active#1\expandafter\endcsname
                     \csname user at active#1\endcsname
@@ -396,7 +398,8 @@
                      {\expandafter\let
                       \csname mst at prioractivemeaning@##1\endcsname ~}
                      {}%
-        \def~{\ifmmode##2##3\else##1\fi}%
+        \def~{\ifmmode\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
+              {##2##3}{##1}}%
       }%
     }%
 \fi
@@ -750,23 +753,21 @@
 \providecommand*\MTgreekitdefault{it}
 \newif\ifmst at greek@lower at up
 \newif\ifmst at greek@upper at up
-\def\mst at update@greeksh{
-    \def\mst at greek@lsh{\mst at ltsh}
-    \def\mst at greek@ush{\mst at opsh}
-      \mst at greek@lower at uptrue
-      \expandafter\in@\expanded{{\mst at ltsh.}}{it.,sl.}%
+\def\mst at update@greeksh#1#2{
+    \def\mst at greek@lsh{#1}
+    \def\mst at greek@ush{#2}
+    \mst at greek@lower at uptrue
+      \expandafter\in@\expanded{{\mst at greek@lsh.}}{it.,sl.}%
       \ifin@\mst at greek@lower at upfalse\fi
-      \mst at greek@upper at uptrue
-      \expandafter\in@\expanded{{\mst at opsh.}}{it.,sl.}%
+    \mst at greek@upper at uptrue
+      \expandafter\in@\expanded{{\mst at greek@ush.}}{it.,sl.}%
       \ifin@\mst at greek@upper at upfalse\fi
     \ifmst at itgreek
-      \def\mst at greek@lsh{\MTgreekitdefault}
       \def\mst at greek@ush{\MTgreekitdefault}
         \mst at greek@lower at upfalse
         \mst at greek@upper at upfalse
     \fi
     \ifmst at upgreek
-      \def\mst at greek@lsh{\MTgreekupdefault}
       \def\mst at greek@ush{\MTgreekupdefault}
         \mst at greek@lower at uptrue
         \mst at greek@upper at uptrue
@@ -774,8 +775,7 @@
     \ifmst at frenchmath
       \ifmst at itgreek\else
       \ifmst at upgreek\else
-        \def\mst at greek@lsh{\mst at opsh}
-        \def\mst at greek@ush{\mst at opsh}
+        \def\mst at greek@ush{#2}
           \mst at greek@lower at uptrue
           \mst at greek@upper at uptrue
       \fi\fi
@@ -789,7 +789,7 @@
             \mst at greek@upper at uptrue
     \fi
 }
-\mst at update@greeksh
+\mst at update@greeksh{\mst at ltsh}{\mst at opsh}
 \ifmst at LGRgreek
     \DeclareFontEncoding{LGR}{}{}
     \DeclareSymbolFont{mtgreekup}{LGR}{\mst at fam}{\mst at ser}{\MTgreekupdefault}
@@ -1204,28 +1204,48 @@
 \fi
 \let\mst at subduedminus\empty
 \let\mst at nonsubduedminus\empty
-\def\mst at dothe@endashstuff#1#2#3{%
+\def\mst at dothe@endashstuff#1#2#3#4{%
   \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
-    \DeclareMathSymbol{#1}{\mathbin}{mtoperatorfont}
-                      {\csname\mst at tmp@enc\string\textendash\endcsname}
-    \DeclareMathSymbol{#2}{\mathalpha}{mtoperatorfont}
-                      {\csname\mst at tmp@enc\string\textendash\endcsname}
+    \@ifundefined{\mst at tmp@enc\string\textendash}%
+        {%
+          \PackageWarningNoLine{mathastext}
+          {Impossible to let the \string- use an EN-DASH in a math\MessageBreak
+           version with \mst at tmp@enc\space encoding, as there is none there.\MessageBreak
+           Reverting to default in math version #4}%
+          \let#1\relax\let#2\relax
+        }%
+        {%
+          \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
 }%
-\def\mst at dothe@emdashstuff#1#2#3{%
+\def\mst at dothe@emdashstuff#1#2#3#4{%
   \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}
+    \@ifundefined{\mst at tmp@enc\string\textendash}%
+        {%
+          \PackageWarningNoLine{mathastext}
+          {Impossible to let the \string- use an EM-DASH in a math\MessageBreak
+           version with \mst at tmp@enc\space encoding, as there is none there.\MessageBreak
+           Reverting to default in math version #4}%
+          \let#1\relax\let#2\relax
+        }%
+        {%
+          \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
 }%
 \def\mst at dothe@hyphenstuff#1#2{%
@@ -1240,7 +1260,10 @@
   \else
     \def\mst at tmp#1{%
       \mst at do@nonletters\expandafter{\the\mst at do@nonletters
-        \mst at mathactivate#1\mathbin\mst at varfam@minus}%
+        \@ifundefined{mst at minus@mv\math at version}
+            {\mst at nonmathmathactiveminus}
+            {\mst at mathactivate#1\mathbin\mst at varfam@minus}%
+        }%
       \mst at undo@nonletters\expandafter{\the\mst at undo@nonletters
          \mst at mathdeactivate#1{}%
          \mst at nonmathactiveminus}%
@@ -1262,7 +1285,9 @@
                        \csname mst at minus@mv\math at version\endcsname
                        \relax
     \else
-     \mathcode`\-=\mst at minus
+     \@ifundefined{mst at minus@mv\mst at tmp@enc}
+        {\mst at subduedminus}
+        {\mathcode`\-=\mst at minus}%
     \fi
   }%
   \def\mst at ParseUmathchardef{\expandafter\mst at ParseUmathchardef@i\meaning}%
@@ -1276,22 +1301,33 @@
 \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}%
+       \let\expandafter\hbar\csname mst at hbar@mv\math at version\endcsname
+       \ifx\hbar\relax\let\hbar\mst at original@hbar\fi}%
 \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#1#2#3{%
+\def\mst at dothe@hbarstuff#1#2#3#4{%
   \edef\mst at tmp@enc{#3}%
   \if1\mst at OneifUniEnc
     \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
-    \mst at DeclareMathAccent{#2}{\mathalpha}{mtletterfont}%
-                      {\csname\mst at tmp@enc\string\=\endcsname{}}%
-    \endgroup
-    \protected\def#1{\mst at mathrlap{#2{\ }}\MTmathcharletterh}%
+    \@ifundefined{\mst at tmp@enc\string\=}%
+        {%
+          \PackageWarningNoLine{mathastext}
+          {Impossible to define the \string\hbar\space using a font with\MessageBreak
+           \mst at tmp@enc\space encoding, as there is no \string\= accent.\MessageBreak
+           Reverting to default \string\hbar\space in math version #4}%
+          \let#1\relax
+        }%
+        {%
+         \begingroup
+         \def\@text at composite##1\@text at composite##2{##2}%
+         \let\add at accent\@firstoftwo
+         \mst at DeclareMathAccent{#2}{\mathalpha}{mtletterfont}%
+                   {\csname\mst at tmp@enc\string\=\endcsname{}}%
+         \endgroup
+         \protected\def#1{\mst at mathrlap{#2{\ }}\MTmathcharletterh}%
+        }%
   \fi
 }%
 \ifmst at noplus\else\mst at infoline{\string+ and \string=}
@@ -2166,6 +2202,10 @@
 \let\Mathastextstandardgreek\MTstandardgreek
 \let\Mathastextcustomgreek\MTcustomgreek
 \ifmst at subdued\else\MTcustomgreek\fi
+\let\mst at subduedinodot\@empty
+\let\mst at nonsubduedinodot\@empty
+\ifmst at noletters
+\else
 \def\mst at subduedinodot{%
    \let\inodot\mst at original@imath
    \let\jnodot\mst at original@jmath
@@ -2175,18 +2215,42 @@
                \csname mst at inodot@mv\math at version\endcsname
    \expandafter\let\expandafter\jnodot
                \csname mst at jnodot@mv\math at version\endcsname
+   \ifx\inodot\relax\let\inodot\mst at original@imath\fi
+   \ifx\jnodot\relax\let\jnodot\mst at original@jmath\fi
 }%
-\def\mst at dothe@inodotstuff#1#2#3{%
+\fi
+\def\mst at dothe@inodotstuff#1#2#3#4{%
   \edef\mst at tmp@enc{#3}%
   \if1\mst at OneifUniEnc
     \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}%
+    \@ifundefined{\mst at tmp@enc\string\i}%
+        {%
+          \PackageWarningNoLine{mathastext}
+          {Impossible to define the \string\inodot\space using a font with\MessageBreak
+           \mst at tmp@enc\space encoding, as there is no \string\i.\MessageBreak
+           Reverting to default \string\imath\space in math version #4}%
+          \let#1\relax
+        }%
+        {%
+          \DeclareMathSymbol{#1}{\mathalpha}{mtletterfont}
+                            {\csname\mst at tmp@enc\string\i\endcsname}%
+        }%
+    \@ifundefined{\mst at tmp@enc\string\j}%
+        {%
+          \PackageWarningNoLine{mathastext}
+          {Impossible to define the \string\jnodot\space using a font with\MessageBreak
+           \mst at tmp@enc\space encoding, as there is no \string\j.\MessageBreak
+           Reverting to default \string\jmath\space in math version #4}%
+          \let#2\relax
+        }%
+        {%
+          \DeclareMathSymbol{#2}{\mathalpha}{mtletterfont}
+                            {\csname\mst at tmp@enc\string\j\endcsname}%
+        }%
+  \fi
+}%
 \ifmst at defaultimath\else\mst at infoline{\string\imath\space and \string\jmath\space}
     \AtEndOfPackage{\AtBeginDocument{%
         \protected\def\imath{\inodot}%
@@ -2204,9 +2268,12 @@
                    \csname mst at original@\@tempa\endcsname
    \expandafter\let\csname\@tempa\space\expandafter\endcsname
                    \csname mst at original@\@tempa\space\endcsname
-   }%
+  }%
 }%
 \def\mst at nonsubduedmathaccents{%
+ \@ifundefined{mst at grave@mv\math at version}
+ {\mst at subduedmathaccents}
+ {%
   \@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
                  {dot}{ddot}{mathring}{hat}{tilde}%
   \do
@@ -2214,8 +2281,9 @@
                    \csname mst@\@tempa @mv\math at version\endcsname
    \expandafter\let\csname\@tempa\space\expandafter\endcsname
                    \csname mst@\@tempa @mv\math at version\space\endcsname
+  }%
+ }%
 }%
-}%
 \def\mst at dothe@mathaccentsstuff#1#2{%
   \begingroup
   \edef\mst at tmp@enc{#2}%
@@ -2224,52 +2292,52 @@
   \let\add at unicode@accent\@firstoftwo
   \if1\mst at OneifUniEnc
     \ifmst at unimathaccents
-      \expandafter\xdef\csname mst at grave@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at grave@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\`\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at acute@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at acute@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\'\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at check@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at check@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\v\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at breve@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at breve@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\u\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at bar@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at bar@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\=\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at dot@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at dot@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\.\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at ddot@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at ddot@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\"\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at mathring@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at mathring@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\r\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at hat@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at hat@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
         \csname#2\string\^\endcsname{}\relax}%
-      \expandafter\xdef\csname mst at tilde@mv#1\mst at robustifyingspace\endcsname
+      \expandafter\xdef\csname mst at tilde@mv#1 \endcsname
        {\mst at Umathaccent
         7
         \number\symmtoperatorfont\space
@@ -2295,6 +2363,14 @@
           \expandafter\noexpand\csname mst@\@tempa @mv#1 \endcsname}%
       }%
   \else
+   \@ifundefined{#2\string\`}
+      {\PackageWarningNoLine{mathastext}
+         {Impossible to pick up text accents from an #2\MessageBreak
+          encoded font.  The mathaccent option will be\MessageBreak
+          ignored for the math version #1}%
+       \let\mst at tempa0}
+      {\let\mst at tempa1}%
+   \if\mst at tempa1%
     \expandafter\mst at DeclareMathAccent\expandafter
                {\csname mst at grave@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
                {\csname#2\string\`\endcsname{}}
@@ -2325,6 +2401,9 @@
     \expandafter\mst at DeclareMathAccent\expandafter
                {\csname mst at tilde@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
                {\csname#2\string\~\endcsname{}}
+   \else
+    \global\expandafter\let\csname mst at grave@mv#1\endcsname\relax
+   \fi
   \fi
   \endgroup
 }%
@@ -2440,43 +2519,9 @@
   \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}%
-  \mst at greek@lower at uptrue
-      \expandafter\in@\expanded{{\mst at greek@lsh at loc.}}{it.,sl.}%
-      \ifin@\mst at greek@lower at upfalse\fi
-  \mst at greek@upper at uptrue
-      \expandafter\in@\expanded{{\mst at greek@ush at loc.}}{it.,sl.}%
-      \ifin@\mst at greek@upper at upfalse\fi
-  \ifmst at itgreek
-    \def\mst at greek@lsh at loc{\MTgreekitdefault}%
-    \def\mst at greek@ush at loc{\MTgreekitdefault}%
-      \mst at greek@lower at upfalse
-      \mst at greek@upper at upfalse
-  \fi
-  \ifmst at upgreek
-    \def\mst at greek@lsh at loc{\MTgreekupdefault}%
-    \def\mst at greek@ush at loc{\MTgreekupdefault}%
-      \mst at greek@lower at uptrue
-      \mst at greek@upper at uptrue
-  \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}%
-        \mst at greek@lower at uptrue
-        \mst at greek@upper at uptrue
-      \fi\fi
-  \fi
-  \ifcase\mst at greek@select
-        \or
-          \def\mst at greek@ush at loc{\MTgreekitdefault}%
-          \mst at greek@upper at upfalse
-        \or
-          \def\mst at greek@ush at loc{\MTgreekupdefault}%
-          \mst at greek@upper at uptrue
-  \fi
+  \mst at update@greeksh
+     {\csname mst at ltshape@\mst at version\endcsname}%
+     {\csname mst at shape@\mst at version\endcsname}%
     \ifmst at LGRgreeks \def\mst at greekfont{#4}\fi
     \ifmst at selfGreeks\def\mst at greekfont{#4}\fi
     \ifmst at LGRgreek
@@ -2502,9 +2547,9 @@
 \immediate\write\m at ne{}%
     \else
      \ifmst at selfGreek
-       \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{\mst at greekfont}{#5}{\mst at greek@ush at loc}%
+       \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{\mst at greekfont}{#5}{\mst at greek@ush}%
 \immediate\write\m at ne{}%
-\PackageInfo{mathastext}{Capital Greek letters (shape `\mst at greek@ush at loc\string'
+\PackageInfo{mathastext}{Capital Greek letters (shape `\mst at greek@ush\string'
                            will use the font\MessageBreak
                          family `\mst at greekfont\string' (OT1) in mathastext\MessageBreak
                          math version `\mst at version\string' declared}%
@@ -2511,12 +2556,16 @@
 \immediate\write\m at ne{}%
      \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}%
+  \ifmst at nohbar\else
+    \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}{#3}%
+  \fi
   \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 noletters\else
+    \expandafter\mst at dothe@inodotstuff\mst at tmp{#3}{#2}%
+  \fi
   \ifmst at mathaccents
     \mst at dothe@mathaccentsstuff{#2}{#3}%
   \fi
@@ -2523,10 +2572,10 @@
   \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}%
+    \expandafter\mst at dothe@endashstuff\mst at tmp{#3}{#2}%
   \else
     \ifmst at emdash
-      \expandafter\mst at dothe@emdashstuff\mst at tmp{#3}%
+      \expandafter\mst at dothe@emdashstuff\mst at tmp{#3}{#2}%
     \else
       \expandafter\mst at dothe@hyphenstuff\mst at tmp
     \fi
@@ -2647,7 +2696,15 @@
   {\MTDeclareVersion[\mst at ltsh]{#1}{\mst at enc}{\mst at fam}{\mst at ser}{\mst at opsh}}%
 }%
 \def\Mathastext@ {%
-  \mst at update@greeksh
+  \mst at update@greeksh {\mst at ltsh}{\mst at opsh}%
+      \expandafter\let\csname ifmst at greek@normal at upper@up\expandafter\endcsname
+                      \csname ifmst at greek@upper at up\endcsname
+      \expandafter\let\csname ifmst at greek@normal at lower@up\expandafter\endcsname
+                      \csname ifmst at greek@lower at up\endcsname
+      \expandafter\let\csname ifmst at greek@bold at upper@up\expandafter\endcsname
+                      \csname ifmst at greek@upper at up\endcsname
+      \expandafter\let\csname ifmst at greek@bold at lower@up\expandafter\endcsname
+                      \csname ifmst at greek@lower at up\endcsname
   \edef\mst at encoding@normal{\mst at enc}%
   \edef\mst at family@normal{\mst at fam}%
   \edef\mst at series@normal{\mst at ser}%
@@ -2826,14 +2883,16 @@
   \ifmst at nohbar\else
      \mst at infoline{\string\hbar}%
      \mst at dothe@hbarstuff
-         \mst at hbar@mvnormal\mst at ltbar@mvnormal\mst at encoding@normal
+         \mst at hbar@mvnormal\mst at ltbar@mvnormal\mst at encoding@normal{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 noletters\else
+    \mst at dothe@inodotstuff\inodot\jnodot\mst at encoding@normal{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
+  \fi
   \ifmst at mathaccents
     \mst at infoline{math accents}%
     \mst at dothe@mathaccentsstuff{normal}\mst at encoding@normal
@@ -2845,15 +2904,15 @@
    \mst at infoline{minus either as endash, Unicode minus, emdash or hyphen}%
    \ifmst at endash
     \mst at dothe@endashstuff\mst at minus@mvnormal\mst at varfam@minus at mvnormal
-                          \mst at encoding@normal
+                          \mst at encoding@normal {normal}%
     \mst at dothe@endashstuff\mst at minus@mvbold\mst at varfam@minus at mvbold
-                          \mst at encoding@normal
+                          \mst at encoding@normal {bold}%
    \else
     \ifmst at emdash
       \mst at dothe@emdashstuff\mst at minus@mvnormal\mst at varfam@minus at mvnormal
-                            \mst at encoding@normal
+                            \mst at encoding@normal {normal}%
       \mst at dothe@emdashstuff\mst at minus@mvbold\mst at varfam@minus at mvbold
-                            \mst at encoding@normal
+                            \mst at encoding@normal {bold}%
     \else
       \mst at dothe@hyphenstuff\mst at minus@mvnormal\mst at varfam@minus at mvnormal
       \let\mst at minus@mvbold\mst at minus@mvnormal



More information about the tex-live-commits mailing list.