summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-11-17 22:33:58 +0000
committerKarl Berry <karl@freefriends.org>2019-11-17 22:33:58 +0000
commit59dc3a32912329f9a44b04a5bd4df8bde04e383e (patch)
treec18192e8da18a05248ddce1ae23d64b4908ddee3 /Master
parent3a29da9222c9516099c75309557dbb2904b7cb79 (diff)
mathastext (17nov19)
git-svn-id: svn://tug.org/texlive/trunk@52840 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/mathastext/ChangeLog.md26
-rw-r--r--Master/texmf-dist/doc/latex/mathastext/INSTALL.txt (renamed from Master/texmf-dist/source/latex/mathastext/INSTALL.txt)6
-rw-r--r--Master/texmf-dist/doc/latex/mathastext/README.md28
-rw-r--r--Master/texmf-dist/doc/latex/mathastext/mathastext.pdfbin475056 -> 480591 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mathastext/mathastext.tex35
-rw-r--r--Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.pdfbin43064 -> 43198 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.tex264
-rw-r--r--Master/texmf-dist/doc/latex/mathastext/mathastexttestmathversions.tex42
-rw-r--r--Master/texmf-dist/doc/latex/mathastext/mathastexttestunicodelinux.tex119
-rw-r--r--Master/texmf-dist/doc/latex/mathastext/mathastexttestunicodemacos.tex118
-rw-r--r--Master/texmf-dist/source/latex/mathastext/mathastext.dtx277
-rw-r--r--Master/texmf-dist/tex/latex/mathastext/mathastext.sty113
12 files changed, 913 insertions, 115 deletions
diff --git a/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md b/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md
index f1668078e9f..428e9c2fadd 100644
--- a/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md
+++ b/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md
@@ -1,6 +1,32 @@
MATHASTEXT CHANGE LOG
=====================
+1.3w \[2019/11/16\]
+----
+
+* 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).
+
+* 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
+ made undefined and `mathastext` definition of it
+ remained without effect. The `\mathastext` own `\hbar`
+ is now defined `\protected`.
+
+* Fix: option `noendash` (or `symboldelimiters` which implies
+ it) caused (since `1.3u`) a bug under Unicode engines when
+ setting up the minus sign.
+
+* Version names declared via the optional argument of
+ `\Mathastext` or as first argument of `\MTDeclareVersion`
+ must not be `normal` or `bold`. Enforce that! (this was
+ marked as a bug to fix since `2012/10/24`...)
+
1.3v \[2019/09/19\]
----
diff --git a/Master/texmf-dist/source/latex/mathastext/INSTALL.txt b/Master/texmf-dist/doc/latex/mathastext/INSTALL.txt
index 721c3009fbf..3efdaf8bbf6 100644
--- a/Master/texmf-dist/source/latex/mathastext/INSTALL.txt
+++ b/Master/texmf-dist/doc/latex/mathastext/INSTALL.txt
@@ -2,12 +2,6 @@ The simplest for most users is to use the manager script of the TeX
installation to either install or upgrade mathastext to its current
version.
-Else, for manual install, grab mathastext.tds.zip from CTAN then run
-
- unzip -d <destfolder> mathastext.tds.zip
-
-where <destfolder> could be ~/texmf or, on mac os x, ~/Library/texmf.
-
Else, download mathastext.dtx and follow these instructions:
- Run tex or etex on mathastext.dtx to generate the package style
diff --git a/Master/texmf-dist/doc/latex/mathastext/README.md b/Master/texmf-dist/doc/latex/mathastext/README.md
index 7d92a4018b4..fd15e838426 100644
--- a/Master/texmf-dist/doc/latex/mathastext/README.md
+++ b/Master/texmf-dist/doc/latex/mathastext/README.md
@@ -14,7 +14,7 @@ The Author of this Work is Jean-Francois Burnol
Copyright (C) 2011-2019 Jean-Francois Burnol (`jfbu at free dot fr`)
- Source: mathastext.dtx 1.3v 2019/09/19
+ Source: mathastext.dtx 1.3w 2019/11/16
DESCRIPTION
@@ -82,6 +82,32 @@ Main options: `italic`, `subdued`, `LGRgreek`.
RECENT CHANGES
==============
+1.3w \[2019/11/16\]
+----
+
+* 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
+ [issue](https://github.com/latex3/latex2e/issues/216)
+ (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
+ made undefined and `mathastext` definition of it
+ remained without effect. The `\mathastext` own `\hbar`
+ is now defined `\protected`.
+
+* Fix: option `noendash` (or `symboldelimiters` which implies
+ it) caused (since `1.3u`) a bug under Unicode engines when
+ setting up the minus sign.
+
+* Version names declared via the optional argument of
+ `\Mathastext` or as first argument of `\MTDeclareVersion`
+ must not be `normal` or `bold`. Enforce that! (this was
+ marked as a bug to fix since `2012/10/24`...)
+
1.3v \[2019/09/19\]
----
diff --git a/Master/texmf-dist/doc/latex/mathastext/mathastext.pdf b/Master/texmf-dist/doc/latex/mathastext/mathastext.pdf
index 21fdfef4993..dc8c864908d 100644
--- a/Master/texmf-dist/doc/latex/mathastext/mathastext.pdf
+++ b/Master/texmf-dist/doc/latex/mathastext/mathastext.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mathastext/mathastext.tex b/Master/texmf-dist/doc/latex/mathastext/mathastext.tex
new file mode 100644
index 00000000000..81672ed4240
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mathastext/mathastext.tex
@@ -0,0 +1,35 @@
+\def\MSTpkgdate {2019/11/16}
+\def\MSTpkgversion {1.3w}
+%%----------------------------------------------------------------
+%% Package: mathastext
+%% Info: Use the text font in math mode (JFB)
+%% Version: 1.3w 2019/11/16
+%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
+%% Copyright (C) 2011-2019 Jean-Francois Burnol <jfbu at free dot fr>
+%% Examples of use of mathastext:
+%% http://jf.burnol.free.fr/mathastext.html
+%% http://jf.burnol.free.fr/showcase.html
+%%----------------------------------------------------------------
+%% This is a generated file. Run latex thrice on this file mathastext.tex then
+%% run dvipdfmx on mathastext.dvi to produce the documentation mathastext.pdf,
+%% with the package source code included.
+%%
+%% Customize as desired the class options and the two toggles below.
+%%
+%% See mathastext.dtx for the copyright and the conditions for distribution
+%% and/or modification of this work.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{mathastext.tex}%
+[\MSTpkgdate\space v\MSTpkgversion\space
+ driver file for mathastext documentation (JFB)]%
+\PassOptionsToClass{a4paper,fontsize=11pt}{scrdoc}
+\chardef\Withdvipdfmx 1 % replace 1<space> by 0<space> for using latex/pdflatex
+\chardef\NoSourceCode 0 % replace 0<space> by 1<space> for no source code
+\input mathastext.dtx
+%%% Local Variables:
+%%% mode: latex
+%%% End:
+\endinput
+%%
+%% End of file `mathastext.tex'.
diff --git a/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.pdf b/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.pdf
index 0163ff573e9..ff43ebc0d05 100644
--- a/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.pdf
+++ b/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.tex b/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.tex
new file mode 100644
index 00000000000..4472f388101
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.tex
@@ -0,0 +1,264 @@
+\def\testfileincipit{Test file to accompany \texttt{mathastext}
+version \texttt{1.3w} of \texttt{2019/11/16}}
+%%----------------------------------------------------------------
+%% Package: mathastext
+%% Info: Use the text font in math mode (JFB)
+%% Version: 1.3w 2019/11/16
+%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
+%% Copyright (C) 2011-2019 Jean-Francois Burnol <jfbu at free dot fr>
+%% Examples of use of mathastext:
+%% http://jf.burnol.free.fr/mathastext.html
+%% http://jf.burnol.free.fr/showcase.html
+%%----------------------------------------------------------------
+%% This file `mathastexttestalphabets.tex' is for testing the extended
+%% scope of the math alphabet commands with package `mathastext', via
+%% the package command \MTnonlettersobeymathxx.
+%%
+%% Compile either with latex, pdflatex, lualatex (pdf output) or xelatex.
+%%
+%% See `mathastext.dtx' for the copyright and conditions of distribution or
+%% modification.
+%%
+\documentclass{article}
+\usepackage[hscale=0.66, vscale=0.72]{geometry}
+\usepackage{amsmath}
+\usepackage{mathtools}\mathtoolsset{centercolon}
+%% WARNING THIS IS INCOMPATIBLE WITH BABEL+FRENCHB
+%% BUT WITH MATHASTEXT LOADED THIS IS CORRECTED
+%% *IF* \MTnonlettersobeymathxx IS MADE USE OF.
+\usepackage{iftex}
+\ifXeTeX
+\expandafter\def\expandafter\testfileincipit\expandafter
+ {\testfileincipit\ (compiled with \XeLaTeX)}
+\usepackage[no-math]{fontspec}
+\setmainfont[ExternalLocation,
+ Mapping=tex-text,
+ BoldFont=texgyretermes-bold,
+ ItalicFont=texgyretermes-italic,
+ BoldItalicFont=texgyretermes-bolditalic]{texgyretermes-regular}
+\setmonofont[ExternalLocation,
+ Mapping=tex-text]{texgyrecursor-regular}
+\setsansfont[ExternalLocation,
+ Mapping=tex-text]{texgyreheros-regular}
+\else
+\ifLuaTeX % for pdf output
+\expandafter\def\expandafter\testfileincipit\expandafter
+ {\testfileincipit\ (compiled with \LuaLaTeX)}
+\usepackage[no-math]{fontspec}
+\setmainfont[Ligatures=TeX]{TeX Gyre Termes}
+\setmonofont[Ligatures=TeX]{TeX Gyre Cursor}
+\setsansfont[Ligatures=TeX]{TeX Gyre Heros}
+\else
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{tgtermes}
+\usepackage{tgcursor}
+\usepackage{tgheros}
+\fi\fi
+\usepackage{metalogo} % must be loaded /after/ [no-math]fontspec
+\usepackage[french]{babel}
+\usepackage[italic,asterisk]{mathastext}
+\MTlettershape{n}\Mathastext[upright]
+\MTnonlettersobeymathxx
+\MTexplicitbracesobeymathxx
+\delimitershortfall-1pt
+\usepackage{color}
+\begin{document}
+\testfileincipit
+
+\begin{center}
+ \bfseries Two features of \texttt{mathastext}:\\
+extended scope of the math alphabets and added italic corrections\par
+\end{center}
+
+The package makes
+${!}\,{?}\,{,}\,{:}\,{;}\,{+}\,{-}\,{=}\,{(}\,{)}\,{[}\,{]}\,{<}\,{>}\,{\{}\,{\}}$,
+the asterisk $*$, and $.\,/\,\vert\,\backslash\,{\#}\,{\$}\,{\%}\,{\&}$ obey the
+math alphabet commands (this is the maximal list, some characters may have been
+excluded by the corresponding package options). For the characters listed first
+the mechanism involves a `mathematical activation'.
+
+As this process may create incompatibilities, it will be put into action
+for
+${!}\,{?}\,{,}\,{:}\,{;}\,{+}\,{-}\,{=}\,{(}\,{)}\,{[}\,{]}\,{<}\,{>}$
+only if the user makes use of the package command
+\verb|\MTnonlettersobeymathxx| (and the braces necessitate
+\verb|\MTexplicitbracesobeymathxx|).
+
+It could be that one such character has been made `active' in the entire
+document by some other package, typically a language definition file for the
+\verb|babel| system. Here for example we have used \verb|babel| with the
+\verb|french| option, which makes the high punctuation characters !?:; active
+throughout the document (extra spacing is put in front of the character when
+used in text; no change in math but perhaps for other languages and characters
+this could happen, it is up to the language definition file to decide).
+
+When \verb|mathastext| detects that a character it wants to `mathematically
+activate' is already `active', it does not go further except if it seems that
+the activation was done by Babel. If the activation was done by Babel, then
+\verb|mathastext| replaces the expansion of the active character in math mode by
+what is necessary to achieve its goal. It does not additionally mathematically
+activate the character; rather it makes sure that the character is \emph{not}
+mathematically active. In the present document the colon was made mathematically
+active by \verb|mathtools| but this was already canceled in the preamble by
+\verb|mathastext| as it was loaded later. And it is better so, because the
+combination \verb|babel| (with option \verb|frenchb|) +\verb|mathtools| (with
+\verb|centercolon|) makes \verb|$:$| create an infinite loop!
+
+But even if someone had mathematically activated the colon after the preamble,
+or after the loading of \verb|mathastext|, this would be canceled again
+automatically for each inline or displayed mathematical formula (if the user
+does \verb|\MTnonlettersobeymathxx|).
+
+The conclusion with \verb|\MTnonlettersobeymathxx| is: if some package has tried
+to make the character mathematically active, this will be overruled by
+\verb|mathastext|; if some package has made the character globally active, then
+the package wins except if it is Babel, as \verb|mathastext| may in the latter
+case safely modify the action in math mode (paying attention to the fact that
+the character should be usable in \verb|\label| and \verb|\ref| in and outside
+of math mode).
+
+The displayed equations next illustrate the extended scope of the math alphabets
+which now apply to $=$, $-$, $($, $)$, $[$, $]$ (but not to the large delimiters
+of course). Furthermore, for testing purposes the equations were labeled using
+such characters, for example the last one has label \verb|eq=7|, to check that
+the mathematical activation of $=$ does not cause problems with
+\verb|\label/\ref|.
+
+\def\testformula{\quad\Biggl\lbrace\biggl(\left(\left[[\sin(a) + \cos(b) - \log(c) =
+\sec(d)]\right]\right)\biggr)\Biggr\rbrace}
+\begin{equation}\testformula\label{eq:1}\end{equation}
+\begin{equation}\mathnormalbold{mathnormalbold:\testformula}\label{eq;2}\end{equation}
+\begin{equation}\mathrm{mathrm:\testformula}\label{eq?3}\end{equation}
+\begin{equation}\mathbf{mathbf:\testformula}\label{eq!4}\end{equation}
+\begin{equation}\mathit{mathit:\testformula}\label{eq(5}\end{equation}
+\begin{equation}\mathtt{mathtt:\testformula}\label{eq)6}\end{equation}
+\begin{equation}\mathsf{mathsf:\testformula}\label{eq=7}\end{equation}
+
+Equations above are numbered \ref{eq:1}, \ref{eq;2}, \ref{eq?3}, \ref{eq!4}, and
+$\ref{eq(5}$, $\ref{eq)6}$, and $\ref{eq=7}$.
+
+\def\testline#1{$#1$&$\mathnormalbold{#1}$&$\mathrm{#1}$&$\mathbf{#1}$&$\mathit{#1}$&$\mathtt{#1}$&$\mathsf{#1}$}
+
+\centerline{\begin{tabular}{ccccccc}
+\testline{a!b}\\
+\testline{a?b}\\
+\testline{a,b}\\
+\testline{a;b}\\
+\testline{a:b}\\
+\testline{a:=b}\\
+\testline{a\vcentcolon= b}\\
+\testline{a\colon b}\\
+\testline{a.b}\\
+\testline{a-b}\\
+\testline{a+b}\\
+\testline{a=b}\\
+\testline{a<b}\\
+\testline{a>b}\\
+\testline{<x,y>}\\
+\testline{\mathopen{<} x,y\mathclose{>}}\\
+\testline{\left< x,y\right>}\\
+\testline{a/b}\\
+\testline{a\backslash b}\\
+\testline{a\setminus b}\\
+\testline{a|b}\\
+\testline{a\mid b}\\
+\testline{(a,b)}\\
+\testline{[a,b]}\\
+\testline{\{a,b\}}
+\end{tabular}}
+
+The question mark has been made active by \verb|babel+frenchb|.
+\verb|mathastext| has imposed in math mode its ways (now \verb|$\mathbf{???}$|
+gives $\mathbf{???}$). As the extra spacing is added by \verb|frenchb| only in
+text, we had to use the math alphabet to check that indeed \verb|mathastext|
+overruled Babel.
+
+To double-check we will now make \string? mathematically active:
+\verb|\mathcode`?="8000|\mathcode`?="8000. This is a sure cause for disaster
+normally with Babel (don't do this at home without \verb|mathastext|!). But here
+with \verb|$?$| no bad surprise (infinite loop!) awaits us: just $?$.
+
+Let's take some other character, for example the opening parenthesis, and make
+it catcode active:
+\verb|\catcode`(=\active \def ({X}|.
+Let's try the input
+\verb|( and $($|.
+\begingroup
+\catcode`(=\active \gdef ({X}
+This gives ( and $($. We see that \verb|mathastext| does not attempt to modify
+the definition of the active character, as this activation was not done via the
+\verb|babel| services. \catcode`\(=12 \mathcode`(="8000 We now revert the
+parenthesis to catcode other (but maintain \verb|\def ({X}| as definition of its
+active version), and then make it mathematically active using the command
+\verb|\mathcode`(="8000|. If we try \verb|$((($| we see that the parenthesis is
+not converted into an $X$: $((($. The mathematically active character was
+overruled by \verb|mathastext|.
+
+Issuing \verb|\MTnonlettersdonotobeymathxx|\MTnonlettersdonotobeymathxx\ we do
+get the $X$'s from the input \verb|$((($|: $((($
+\endgroup
+This shows that \verb|mathastext| now does not modify in math mode the
+non-letter \verb|(|.
+
+\MTversion{upright}\MTnonlettersobeymathxx
+We defined in the preamble of the document a \verb|mathastext|-enhanced
+math version (named \verb|upright|) having the Latin letters upright in
+math mode. Let's switch to
+it: \newline
+\hbox to\linewidth{\hss\verb|\MTversion{upright}|\hss}
+
+With a font which is neither italic nor slanted, \verb|mathastext| automatically
+inserts italic corrections for better positioning of the subscript:
+\verb|$f_i^i$| gives
+$f_i^i$.
+After \verb|\MTnoicinmath| which turns off this feature\MTnoicinmath{}, the same
+input gives $f_i^i$, which is different.
+\footnote{last time I tried, this only worked with PDF\LaTeX{}, not with
+ \LuaLaTeX{} or \XeTeX{}.}
+
+Again with italic corrections on (\verb|\MTicinmath|)\MTicinmath{}
+\verb|$f_{abc}^{def}$| gives $f_{abc}^{def}$, and here is another one:
+$f^{f_{abc}^{def}}_u$. Without italic corrections\MTnoicinmath: $f_{abc}^{def}$,
+and respectively $f^{f_{abc}^{def}}_u$.
+
+\MTicinmath
+
+\verb|mathastext| does not add these italic corrections inside arguments of
+math alphabets, as this would prevent the formation of ligatures:
+$\mathnormal{ff}$, $\mathrm{ff}$, $\mathit{ff}$, $\mathbf{ff}$, $\mathtt{ff}$
+(no ligature in teletype) and $\mathsf{ff}$.\footnote{\llap{\textcolor{magenta}{\bfseries Changed!\kern3em}}Prior to 1.3i,
+ italic corrections were added to the \string\mathnormal\ arguments.}
+
+\centerline{\begin{tabular}{ccccccc}
+\testline{a!b}\\
+\testline{a?b}\\
+\testline{a,b}\\
+\testline{a;b}\\
+\testline{a:b}\\
+\testline{a:=b}\\
+\testline{a\vcentcolon= b}\\
+\testline{a\colon b}\\
+\testline{a.b}\\
+\testline{a-b}\\
+\testline{a+b}\\
+\testline{a=b}\\
+\testline{a<b}\\
+\testline{a>b}\\
+\testline{<x,y>}\\
+\testline{\mathopen{<} x,y\mathclose{>}}\\
+\testline{\left< x,y\right>}\\
+\testline{a/b}\\
+\testline{a\backslash b}\\
+\testline{a\setminus b}\\
+\testline{a|b}\\
+\testline{a\mid b}\\
+\testline{(a,b)}\\
+\testline{[a,b]}\\
+\testline{\{a,b\}}
+\end{tabular}}
+
+\end{document}
+\endinput
+%%
+%% End of file `mathastexttestalphabets.tex'.
diff --git a/Master/texmf-dist/doc/latex/mathastext/mathastexttestmathversions.tex b/Master/texmf-dist/doc/latex/mathastext/mathastexttestmathversions.tex
new file mode 100644
index 00000000000..a5e256dfa3d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mathastext/mathastexttestmathversions.tex
@@ -0,0 +1,42 @@
+\def\testfileincipit{Test file to accompany \texttt{mathastext}
+version \texttt{1.3w} of \texttt{2019/11/16}}
+%%----------------------------------------------------------------
+%% Package: mathastext
+%% Info: Use the text font in math mode (JFB)
+%% Version: 1.3w 2019/11/16
+%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
+%% Copyright (C) 2011-2019 Jean-Francois Burnol <jfbu at free dot fr>
+%% Examples of use of mathastext:
+%% http://jf.burnol.free.fr/mathastext.html
+%% http://jf.burnol.free.fr/showcase.html
+%%----------------------------------------------------------------
+%% This file `mathastexttestversions.tex' is for testing the enhanced
+%% concept of math versions provided by the package `mathastext'.
+%%
+%% See `mathastext.dtx' for the copyright and conditions of distribution or
+%% modification.
+%%
+\documentclass{article}
+\usepackage[T1]{fontenc}
+\usepackage{newcent}
+\usepackage[subdued]{mathastext}
+\Mathastext[newcent]
+\renewcommand\familydefault\ttdefault
+\Mathastext[courier]
+\renewcommand\familydefault\sfdefault
+\Mathastext[avantgarde]
+\renewcommand\familydefault\rmdefault
+\begin{document}
+\testfileincipit
+
+text in NewCentury and $math\ as\ in\ default$,%
+\MTversion{courier} text in Courier and $math\ in\ Courier$,%
+\MTversion{avantgarde} text in AvantGarde and $math\ in\ AvantGarde$,%
+\MTversion[newcent]{courier} text in NewCentury and $math\ in\
+Courier$,\MTversion{bold} text in bold NewCentury and $math\ as\ in\
+bold\ default$,\MTversion[courier]{avantgarde} text in Courier and
+$math\ in\ AvantGarde$.
+\end{document}
+\endinput
+%%
+%% End of file `mathastexttestmathversions.tex'.
diff --git a/Master/texmf-dist/doc/latex/mathastext/mathastexttestunicodelinux.tex b/Master/texmf-dist/doc/latex/mathastext/mathastexttestunicodelinux.tex
new file mode 100644
index 00000000000..d4e3e8d652f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mathastext/mathastexttestunicodelinux.tex
@@ -0,0 +1,119 @@
+\def\testfileincipit{Test file to accompany \texttt{mathastext}
+version \texttt{1.3w} of \texttt{2019/11/16}}
+%%----------------------------------------------------------------
+%% Package: mathastext
+%% Info: Use the text font in math mode (JFB)
+%% Version: 1.3w 2019/11/16
+%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
+%% Copyright (C) 2011-2019 Jean-Francois Burnol <jfbu at free dot fr>
+%% Examples of use of mathastext:
+%% http://jf.burnol.free.fr/mathastext.html
+%% http://jf.burnol.free.fr/showcase.html
+%%----------------------------------------------------------------
+%% This file `mathastexttestunicodelinux.tex' is for testing the use
+%% of the package `mathastext' with the unicode engines XeTeX or LuaLaTeX.
+%%
+%% Fonts which were available on a Linux machine are used. Beware that
+%% compilation with LuaLaTeX will abort with errors if specified fonts do not
+%% exist on your system.
+%%
+%% See `mathastext.dtx' for the copyright and conditions of distribution or
+%% modification.
+%%
+\documentclass{article}
+\usepackage[hscale=0.8]{geometry}
+\usepackage{multicol}
+\usepackage[no-math]{fontspec}
+\usepackage{lmodern}
+\usepackage{metalogo}
+\usepackage{iftex}
+\ifXeTeX
+\expandafter\def\expandafter\testfileincipit\expandafter
+ {\testfileincipit\ (compiled with \XeLaTeX)}
+\else
+\ifLuaTeX
+\expandafter\def\expandafter\testfileincipit\expandafter
+ {\testfileincipit\ (compiled with \LuaLaTeX)}
+\fi\fi
+\usepackage[subdued,italic,asterisk]{mathastext}
+\setmainfont[Color=999999]{Verdana} \Mathastext[Verdana]
+\setmainfont[Color=0000FF]{Arial} \Mathastext[Arial]
+\setmainfont[Color=00C000]{DejaVu Serif} \Mathastext[DejaVu]
+\setmainfont[Color=FF0000]{Andale Mono} \Mathastext[Andale]
+%% commented out as these fonts do not exist anymore on the Linux box
+%% I have access to (test last done 2016/01/15)
+%%\setmainfont[Color=C000C0]{URW Chancery L} \Mathastext[Chancery]
+%%\setmainfont[Color=800080]{URW Palladio L} \Mathastext[Palladio]
+\setmainfont[Color=808000]{Liberation Serif} \Mathastext[Liberation]
+\MTDeclareVersion{Times}{T1}{ptm}{m}{n}
+\begin{document}
+\MTversion{normal}
+\testfileincipit
+
+This test uses \verb|mathastext| with its \emph{italic}, \emph{asterisk}, and
+\emph{subdued} options. The base document fonts are the Latin Modern ones (in
+OpenType format). The other OpenType fonts were chosen from those available on
+a Linux machine. We also used the Times font in traditional \TeX\ font T1
+encoding, to demonstrate the removal since release \texttt{1.3u} of a former
+limitation that all math versions had to share the same font encoding, else
+some characters such as the dotless \texttt{i} ($\imath$), or the minus sign
+could well vanish from the output in the non-normal math versions.
+
+Furthermore we test (last line of each block, on the left) if the non-letter
+characters obey the math alphabet \verb|\mathbf|. In the normal and bold math
+versions, this feature is de-activated, as option \emph{subdued} was used; and
+if activated we should then use in these math versions the package
+\verb|\Mathbf| rather than \verb|\mathbf| which is there still the original
+one, which will use encoding \verb|OT1| in the normal and bold versions, as we
+loaded \verb|fontspec| with its option \emph{no-math}.
+
+Some among the fonts tested have no bold variant or no italic variant.
+
+Note: the two unicode engines \XeLaTeX\ and \LuaLaTeX\ give likely not fully
+identical results particularly for the math mode. At least this is what I
+observed regularly over the years with the variant of this file prepared for
+fonts available on Mac OS, which is my main system where I develop
+|\mathastext|. Lastly for example (TL2019, august 2019), \LuaLaTeX\ could not
+find the bold variant of some system font, but \XeLaTeX\ did. And the spacing
+for the letters of the Didot font was vastly different between the two
+engines.
+
+\newcommand\TEST[1]{\MTversion{#1}\def\tmpa{#1}%
+ \def\tmpb{normal}\def\tmpc{bold}%
+ \ifx\tmpa\tmpb\else\ifx\tmpa\tmpc\else \MTnonlettersobeymathxx
+ \MTexplicitbracesobeymathxx\fi\fi
+\begin{multicols}{2}
+\hbox to\columnwidth{\hbox to\columnwidth{\hfil
+ $abcdefghijklmnopqrstuvwxyz$\hfil}\kern-2.5em{#1}}
+ \centerline{ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$ }
+ \centerline{ $0123456789$ }
+ \centerline{ $!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
+ \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash$ }
+ \centerline{ $\mathbf{!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
+ \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash}$ }
+\columnbreak
+ \centerline{ abcdefghijklmnopqrstuvwxyz }
+ \centerline{ ABCDEFGHIJKLMNOPQRSTUVWXYZ }
+ \centerline{ 0123456789}
+ \centerline{ !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
+ \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 }
+ \centerline{\bfseries !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
+ \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 }
+\end{multicols}}
+\begin{multicols}{2}
+ \centerline{\textbf{math mode}}
+\columnbreak
+ \centerline{ \textbf{text} }
+\end{multicols}
+\TEST{DejaVu}
+\TEST{Verdana}
+\TEST{Andale}
+%%\TEST{Palladio}
+\TEST{Arial}
+%%\TEST{Chancery}
+\TEST{Liberation}
+\TEST{bold}\TEST{normal}\TEST{Times}
+\end{document}
+\endinput
+%%
+%% End of file `mathastexttestunicodelinux.tex'.
diff --git a/Master/texmf-dist/doc/latex/mathastext/mathastexttestunicodemacos.tex b/Master/texmf-dist/doc/latex/mathastext/mathastexttestunicodemacos.tex
new file mode 100644
index 00000000000..ff7e3ca2a02
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mathastext/mathastexttestunicodemacos.tex
@@ -0,0 +1,118 @@
+\def\testfileincipit{Test file to accompany \texttt{mathastext}
+version \texttt{1.3w} of \texttt{2019/11/16}}
+%%----------------------------------------------------------------
+%% Package: mathastext
+%% Info: Use the text font in math mode (JFB)
+%% Version: 1.3w 2019/11/16
+%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
+%% Copyright (C) 2011-2019 Jean-Francois Burnol <jfbu at free dot fr>
+%% Examples of use of mathastext:
+%% http://jf.burnol.free.fr/mathastext.html
+%% http://jf.burnol.free.fr/showcase.html
+%%----------------------------------------------------------------
+%% This file `mathastexttestunicodemacos.tex' is for testing the use
+%% of the package `mathastext' with the unicode engines XeTeX or LuaLaTeX.
+%%
+%% Mac OS X specific fonts are used (initially tested on 10.8.2).
+%%
+%% See `mathastext.dtx' for the copyright and conditions of distribution or
+%% modification.
+%%
+\documentclass{article}
+\usepackage[hscale=0.85]{geometry}
+\usepackage{multicol}
+\usepackage[no-math]{fontspec}
+\usepackage{lmodern}
+\usepackage{metalogo}
+\usepackage{iftex}
+\ifXeTeX
+\expandafter\def\expandafter\testfileincipit\expandafter
+ {\testfileincipit\ (compiled with \XeLaTeX)}
+\else
+\ifLuaTeX
+\expandafter\def\expandafter\testfileincipit\expandafter
+ {\testfileincipit\ (compiled with \LuaLaTeX)}
+\fi\fi
+\usepackage[subdued,italic,asterisk]{mathastext}
+\setmainfont[Color=FF0000]{Hoefler Text} \Mathastext[Hoefler]
+\setmainfont[Color=336633]{American Typewriter}\Mathastext[Typewriter]
+\setmainfont[Color=0000FF]{Herculanum} \Mathastext[Herculanum]
+\setmainfont[Color=FF00FF]{Didot} \Mathastext[Didot]
+\setmainfont[Color=999999]{Comic Sans MS} \Mathastext[Comic]
+\MTDeclareVersion{Times}{T1}{ptm}{m}{n}
+\begin{document}
+\MTversion{normal}
+\testfileincipit
+
+This test uses \verb|mathastext| with its \emph{italic}, \emph{asterisk}, and
+\emph{subdued} options. The base document fonts are the Latin Modern ones (in
+OpenType format). The other OpenType fonts were chosen from those available on
+a Mac OS machine. We also used the Times font in traditional \TeX\ font T1
+encoding, to demonstrate the removal since release \texttt{1.3u} of a former
+limitation that all math versions had to share the same font encoding, else
+some characters such as the dotless \texttt{i} ($\imath$), or the minus sign
+could well vanish from the output in the non-normal math versions.
+
+Furthermore we test (last line of each block, on the left) if the non-letter
+characters obey the math alphabet \verb|\mathbf|. In the normal and bold math
+versions, this feature is de-activated, as option \emph{subdued} was used; and
+if activated we should then use in these math versions the package
+\verb|\Mathbf| rather than \verb|\mathbf| which is there still the original
+one, which will use encoding \verb|OT1| in the normal and bold versions, as we
+loaded \verb|fontspec| with its option \emph{no-math}.
+
+Some among the fonts tested have no bold variant or no italic variant.
+
+Note (tested 2013/09/03): for some reason the \verb|Color| specifications in the
+\verb|\setmainfont| commands work only
+with \XeLaTeX{}, not with \LuaLaTeX{}; a few months back I had not noticed
+such a difference between the two engines.
+
+Update (tested 2016/01/15 with reasonably up-to-date TL2015): \verb|Color|
+spec in use of \verb|\setmainfont| command now functional again with
+\LuaLaTeX.
+
+Note (tested 2019/08/11, reasonably up-to-date TL2019): spacing with the Didot
+font differs widely between \XeLaTeX\ and \LuaLaTeX{} (perhaps related to
+italic corrections, see the package documentation), and also it seems
+\LuaLaTeX{} will not find (from our generic usage of the \verb|fontspec|
+interface, at least) bold variants of the Hoefler Text and American Typewriter
+fonts, contrarily to \XeLaTeX. Also, the \emph{italic} option remains
+seemingly without effect with \LuaLaTeX{} in the case of the Hoefler Text font
+(see the package source code comments on some problems with the two ``modes''
+for text fonts under \LuaLaTeX, which may be related with this specific issue
+here).
+
+\newcommand\TEST[1]{\MTversion{#1}\def\tmpa{#1}%
+ \def\tmpb{normal}\def\tmpc{bold}%
+ \ifx\tmpa\tmpb\else\ifx\tmpa\tmpc\else \MTnonlettersobeymathxx
+ \MTexplicitbracesobeymathxx\fi\fi
+\begin{multicols}{2}
+\hbox to\columnwidth{\hbox to\columnwidth{\hfil
+ $abcdefghijklmnopqrstuvwxyz$\hfil}\kern-2.5em{#1}}
+ \centerline{ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$ }
+ \centerline{ $0123456789$ }
+ \centerline{ $!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
+ \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash$ }
+ \centerline{ $\mathbf{!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
+ \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash}$ }
+\columnbreak
+ \centerline{ abcdefghijklmnopqrstuvwxyz }
+ \centerline{ ABCDEFGHIJKLMNOPQRSTUVWXYZ }
+ \centerline{ 0123456789 }
+ \centerline{ !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
+ \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 }
+ \centerline{\bfseries !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
+ \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 }
+\end{multicols}}
+\begin{multicols}{2}
+ \centerline{\textbf{math mode}}
+\columnbreak
+ \centerline{ \textbf{text} }
+\end{multicols}
+\TEST{Didot}\TEST{Comic}\TEST{normal}\TEST{Herculanum}
+\TEST{Hoefler}\TEST{Typewriter}\TEST{bold}\TEST{Times}
+\end{document}
+\endinput
+%%
+%% End of file `mathastexttestunicodemacos.tex'.
diff --git a/Master/texmf-dist/source/latex/mathastext/mathastext.dtx b/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
index 09aef6d6cb3..30f0d90af61 100644
--- a/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
+++ b/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
@@ -2,12 +2,12 @@
% N.B.: this dtx file does NOT use \DocInput, it only uses docstrip.
% The LaTeX source of the documentation is NOT prefixed with percent characters.
%<*dtx>
-\def\dtxtimestamp {Time-stamp: <19-09-2019 at 22:52:52 CEST>}%
-\def\docdate{2019/09/19}
+\def\dtxtimestamp {Time-stamp: <16-11-2019 at 21:27:02 CET>}%
+\def\docdate{2019/11/16}
%</dtx>
%<*drv>
-\def\MSTpkgdate {2019/09/19}
-\def\MSTpkgversion {1.3v}
+\def\MSTpkgdate {2019/11/16}
+\def\MSTpkgversion {1.3w}
%</drv>
%<*dtx>
\iffalse % meta-comment
@@ -29,7 +29,7 @@ The Author of this Work is Jean-Francois Burnol
Copyright (C) 2011-2019 Jean-Francois Burnol (`jfbu at free dot fr`)
- Source: mathastext.dtx 1.3v 2019/09/19
+ Source: mathastext.dtx 1.3w 2019/11/16
%</readme>
%<*dtx>
@@ -45,7 +45,7 @@ not include the documented source code then, in contrast to 1a)+1b) method
%%----------------------------------------------------------------
%% Package: mathastext
%% Info: Use the text font in math mode (JFB)
-%% Version: 1.3v 2019/09/19
+%% Version: 1.3w 2019/11/16
%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
%% Copyright (C) 2011-2019 Jean-Francois Burnol <jfbu at free dot fr>
%% Examples of use of mathastext:
@@ -193,6 +193,33 @@ Main options: `italic`, `subdued`, `LGRgreek`.
RECENT CHANGES
==============
+1.3w \[2019/11/16\]
+----
+
+* 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
+ [issue](https://github.com/latex3/latex2e/issues/216)
+ (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
+ made undefined and `mathastext` definition of it
+ remained without effect. The `\mathastext` own `\hbar`
+ is now defined `\protected`.
+
+* Fix: option `noendash` (or `symboldelimiters` which implies
+ it) caused (since `1.3u`) a bug under Unicode engines when
+ setting up the minus sign.
+
+* Version names declared via the optional argument of
+ `\Mathastext` or as first argument of `\MTDeclareVersion`
+ must not be `normal` or `bold`. Enforce that! (this was
+ marked as a bug to fix since `2012/10/24`...)
+
+
1.3v \[2019/09/19\]
----
@@ -289,6 +316,33 @@ RECENT CHANGES
MATHASTEXT CHANGE LOG
=====================
+1.3w \[2019/11/16\]
+----
+
+* 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).
+
+* 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
+ made undefined and `mathastext` definition of it
+ remained without effect. The `\mathastext` own `\hbar`
+ is now defined `\protected`.
+
+* Fix: option `noendash` (or `symboldelimiters` which implies
+ it) caused (since `1.3u`) a bug under Unicode engines when
+ setting up the minus sign.
+
+* Version names declared via the optional argument of
+ `\Mathastext` or as first argument of `\MTDeclareVersion`
+ must not be `normal` or `bold`. Enforce that! (this was
+ marked as a bug to fix since `2012/10/24`...)
+
+
1.3v \[2019/09/19\]
----
@@ -4388,7 +4442,7 @@ Numerous examples will be found there:\\
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage {mathastext}
- [2019/09/19 v1.3v Use the text font in math mode (JFB)]
+ [2019/11/16 v1.3w Use the text font in math mode (JFB)]
% \end{macrocode}
% \LaTeX{} |2019-10-01| release has made robust math macros such as the math
% accents and \cs{hbar}.
@@ -4650,6 +4704,31 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
% \begin{macrocode}
\ProcessOptions\relax
% \end{macrocode}
+% \begin{macro}{\mst@DeclareMathAccent}
+%
+% I somehow missed realizing \LaTeX{} |2019-10-01| if used together
+% with |amsmath| made repeated usage of \cs{DeclareMathAccent} trigger
+% an error: \url{https://github.com/latex3/latex2e/issues/216}.
+%
+% This broke usage of \cs{Mathastext} macro in preamble.
+%
+% |1.3w| works around this via \cs{mst@DeclareMathAccent}. And other
+% changes were made in \mst code to cope with these complications around
+% robustness.
+% \begin{macrocode}
+\def\mst@DeclareMathAccent#1{\let#1\mst@undefined
+ \expandafter
+ \let\csname\expandafter\@gobble\string#1\space\endcsname\mst@undefined
+ \DeclareMathAccent{#1}}
+% \end{macrocode}
+% \end{macro}
+% Helper macros to test math version names. User is not allowed to redefine
+% via \cs{Mathastext} with optional argument or via \cs{MTDeclareVersion} the
+% |normal| and |bold| math versions! Added at |1.3w|, about 7 years late.
+% \begin{macrocode}
+\def\mst@normalversionname{normal}%
+\def\mst@boldversionname{bold}%
+% \end{macrocode}
% \begin{macro}{\exists} \begin{macro}{\mst@exists@skip}
% \begin{macro}{\forall} \begin{macro}{\mst@forall@skip}
% \begin{macro}{\MTnormalexists}
@@ -5101,11 +5180,9 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
% \begin{macrocode}
\def\mst@OnlyIfNotSubdued#1{%
\ifmst@subdued
- \def\mst@tmpa{normal}%
- \ifx\math@version\mst@tmpa
+ \ifx\math@version\mst@normalversionname
\else
- \def\mst@tmpa{bold}%
- \ifx\math@version\mst@tmpa
+ \ifx\math@version\mst@boldversionname
\else
#1%
\fi
@@ -5843,7 +5920,7 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\DeclareFontSubstitution{FML}{futm}{m}{it}
\DeclareSymbolFont{mathastextfourier}{FML}{futm}{m}{it}
\SetSymbolFont{mathastextfourier}{bold}{FML}{futm}{b}{it}
- \DeclareMathAccent{\fouriervec}{\mathord}{mathastextfourier}{"7E}
+ \mst@DeclareMathAccent{\fouriervec}{\mathord}{mathastextfourier}{"7E}
\fi
% \end{macrocode}
% \end{macro}
@@ -6120,6 +6197,9 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
% I need to put amsmath under surveillance to check if it decides to
% robustify \cs{relbar} at some point, now that the \LaTeX\ team has
% taken over maintenance.
+%
+% |2019/09/16| Use \cs{protected} for \cs{right\textbar{}leftarrowfill} in the non
+% \cs{DeclareRobustCommand} branch?
% \begin{macrocode}
\ifmst@nominus
\else
@@ -6177,6 +6257,23 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
% this is by actually modifying the assigned mathcode at each version
% change. This means also that |\MTversion| and not |\mathversion|
% must be used for good functioning.
+%
+% |1.3u| improves the handling of the minus sign by letting it be compatible
+% with math versions (and not only with the with subdued mechanism but all
+% math versions) having varying font encodings, even possibly classic 8bit
+% font encoding mixed with TU encoding for Unicode engines. For this it is
+% needed to work around a feature of XeTeX/LuaLaTeX, here is original comment:
+%
+% \begin{quotation}
+% afaict it is
+% impossible to use straightforwardly in extended mathcode assignments
+% a control sequence as created by \cs{Umathchardef}.
+% This is counter-intuitive and breaks expectations.
+% \end{quotation}
+%
+% But the |1.3u| mechanism with \cs{mst@UmathchardefWorkAround@i} introduced a
+% bug which showed under option |noendash| (hence also |symboldelimiters|) with
+% Unicode engines. Fixed at |1.3w|.
% \begin{macrocode}
\let\mst@subduedminus\empty
\let\mst@nonsubduedminus\empty
@@ -6213,10 +6310,6 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\edef\mst@tmp@enc{\csname mst@encoding@\math@version\endcsname}%
\if1\mst@OneifUniEnc
\mst@Umathcode`\-=\expandafter
- % Working around a bug (or feature...) of XeTeX/LuaTeX: afaict it is
- % impossible to use straightforwardly in extended mathcode assignments
- % a control sequence as created by \Umathchardef.
- % This is counter-intuitive and breaks expectations.
\mst@UmathchardefWorkAround@i
\csname mst@minus@mv\math@version\endcsname
\relax
@@ -6224,6 +6317,17 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\mathcode`\-=\@nameuse{mst@minus@mv\math@version}% self-delimiting
\fi
}% \mst@nonsubduedminus
+% \end{macrocode}
+% The above works only if the \cs{mst@minus@mv<name>} was really
+% defined via \cs{Umathchardef}. If it was defined via \cs{DeclareMathSymbol}
+% then it is a \cs{mathchar}, not a \cs{Umathchar}. At least currently (2019).
+% So we need to correct the definition of \cs{mst@nonsubduedminus}.
+% \begin{macrocode}
+ \ifmst@endash\else\ifmst@emdash\else
+ \def\mst@nonsubduedminus{%
+ \mathcode`\-=\@nameuse{mst@minus@mv\math@version}% self-delimiting
+ }% non Umathchardef \mst@minus@mv<mathversion> macros
+ \fi\fi
\fi
\def\mst@UmathchardefWorkAround@i
{\expandafter\mst@UmathchardefWorkAround@ii\meaning}%
@@ -6255,24 +6359,27 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
% before and after skips does not interact well with the rlap construct.
%
% |1.3v 2019/09/19| adapts to maintain the robustness of \cs{hbar} which now
-% applies with \LaTeX{} |2019-10-01|. The \cs{mst@original@hbar} is a
-% meaning holder and there is no need for this macro to be robust in
-% \LaTeX{} sense. Same for the hbar-macros whose names get indexed by math
-% version names. We use them as meaning-holders and suitably access them via
-% \cs{let}. The \cs{mst@ltbar@mv<version>} macros will be robust as they get
-% declared via \cs{DeclareMathAccent}, but this is other matter.
+% applies with \LaTeX{} |2019-10-01|.
+%
+% |1.3w| works around \url{https://github.com/latex3/latex2e/issues/216} via
+% \cs{mst@DeclareMathAccent}. The upstream bug affected the definition of
+% \cs{mst@ltbar@mvnormal} and broke usage of \cs{Mathastext} in preamble.
+%
+% |1.3w| also fixes oversight that \cs{hbar} may have been redefined via
+% \cs{DeclareMathSymbol} by some package (e.g. |amsfonts|) and with \LaTeX{}
+% |2019-10-01| this means \cs{hbar<space>} is now undefined. Modifying it
+% changed nothing to \cs{hbar} behaviour in such circumstances. Finally we
+% opt for a \cs{protected} \cs{hbar} and choose to ignore completely if
+% there is a \cs{hbar<space>} or not. To avoid extra steps we do not
+% undefine it if it exists, because we would need to restore it in
+% subdued math versions.
% \begin{macrocode}
\let\mst@subduedhbar\@empty
\let\mst@nonsubduedhbar\@empty
\ifmst@nohbar\else
- \def\mst@subduedhbar{%
- \expandafter\let\csname hbar\mst@robustifyingspace\endcsname
- \mst@original@hbar
- }%
- \def\mst@nonsubduedhbar{%
- \expandafter\let\csname hbar\mst@robustifyingspace\expandafter\endcsname
- \csname mst@hbar@mv\math@version\endcsname
- }%
+ \def\mst@subduedhbar{\let\hbar\mst@original@hbar}%
+ \def\mst@nonsubduedhbar{\expandafter
+ \let\expandafter\hbar\csname mst@hbar@mv\math@version\endcsname}%
\fi
\def\mst@mathrlap{\mathpalette\mst@mathrlapinternal}
\def\mst@mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}}
@@ -6284,10 +6391,10 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\begingroup
\def\@text@composite##1\@text@composite##2{##2}%
\let\add@accent\@firstoftwo
- \DeclareMathAccent{#2}{\mathalpha}{mtletterfont}%
+ \mst@DeclareMathAccent{#2}{\mathalpha}{mtletterfont}%
{\csname\mst@tmp@enc\string\=\endcsname{}}%
\endgroup
- \def#1{\mst@mathrlap{#2{\ }}\mst@h}%
+ \protected\def#1{\mst@mathrlap{#2{\ }}\mst@h}%
\fi
}% end of \mst@dothe@hbarstuff
% \end{macrocode}
@@ -7278,11 +7385,30 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
%
% |1.3v| adapts to \LaTeX{} |2019-10-01| which now comes with robust math
% accent macros. The «original»-named macros are without the robustifying
-% space, as they only serve as meaning holders. On the other hand the macros
+% space (NOT true anymore, see |1.3w| next), as they only serve as meaning
+% holders.
+%
+% On the other hand the macros
% indexed by math version names are (in the pdflatex branch) always defined
% via \cs{DeclareMathAccent} hence they will be robust with |2019-10-01| or
% later and we must use the \cs{mst@robustifyingspace} with them to access
% their real meaning (this thus differs from the situation with \cs{hbar}).
+%
+% |1.3w| The above was a bit optimistic as |amsmath| for example modifies
+% \LaTeX{} internals and handles math accents differently.
+%
+% We thus needed to double our
+% |\let|'s as, if |amsmath| is loaded, the cs with space will exist but not
+% be paired in expected way with the original cs. This breaks things by the
+% way if some math accent is written to an external file under a certain
+% context and executed in another context. The new context will be probably
+% ignored if |amsmath| is loaded, as the external file will have an already
+% expanded-once meaning.
+%
+% Some macros with space in name might thus be created as |\relax|. Should I
+% rather create \cs{protected} macros for the math accents with Unicode
+% engines? Anyway, the construct does give good result with the few OpenType
+% text fonts I tested.
% \begin{macrocode}
\let\mst@subduedmathaccents\@empty
\let\mst@nonsubduedmathaccents\@empty
@@ -7291,15 +7417,21 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
{dot}{ddot}{mathring}{hat}{tilde}%
\do
- {\expandafter\let\csname\@tempa\mst@robustifyingspace\expandafter\endcsname
- \csname mst@original@\@tempa\endcsname}%
+ {\expandafter\let\csname\@tempa\expandafter\endcsname
+ \csname mst@original@\@tempa\endcsname
+ \expandafter\let\csname\@tempa\space\expandafter\endcsname
+ \csname mst@original@\@tempa\space\endcsname
+ }%
}%
\def\mst@nonsubduedmathaccents{%
\@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
{dot}{ddot}{mathring}{hat}{tilde}%
\do
- {\expandafter\let\csname\@tempa\mst@robustifyingspace\expandafter\endcsname
- \csname mst@\@tempa @mv\math@version\mst@robustifyingspace\endcsname}%
+ {\expandafter\let\csname\@tempa\expandafter\endcsname
+ \csname mst@\@tempa @mv\math@version\endcsname
+ \expandafter\let\csname\@tempa\space\expandafter\endcsname
+ \csname mst@\@tempa @mv\math@version\space\endcsname
+}%
}%
\def\mst@dothe@mathaccentsstuff#1#2{%
\begingroup
@@ -7398,8 +7530,11 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
{dot}{ddot}{mathring}{hat}{tilde}%
\do
{\expandafter\let
- \csname mst@\@tempa @mv#1\mst@robustifyingspace\expandafter\endcsname
- \csname mst@original@\@tempa\endcsname}%
+ \csname mst@\@tempa @mv#1\expandafter\endcsname
+ \csname mst@original@\@tempa\endcsname
+ \expandafter\let
+ \csname mst@\@tempa @mv#1\space\expandafter\endcsname
+ \csname mst@original@\@tempa\space\endcsname}%
}}%
\fi
% \end{macrocode}
@@ -7408,6 +7543,8 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
% |2019-10-01| or later. As we want elsewhere in the package code not to have
% to check if under Unicode engine or not, we need to handle here also some
% definition of robust macros.
+%
+% But wouldn't it be simpler to manage \cs{protected} macros?
% \begin{macrocode}
\ifmst@robust@obsessed@LaTeX@era
\@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
@@ -7422,45 +7559,47 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
% \end{macrocode}
% \cs{DeclareMathAccent} works \cs{global}ly. And with \LaTeX{} |2019-10-01|
% or later it creates robust macros.
+%
+% \cs{mst@DeclareMathAccent} to work around \url{https://github.com/latex3/latex2e/issues/216}
% \begin{macrocode}
% \` -> \grave
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@grave@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\`\endcsname{}}
% \' -> \acute
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@acute@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\'\endcsname{}}
% \v -> \check
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@check@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\v\endcsname{}}
% \u -> \breve
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@breve@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\u\endcsname{}}
% \= -> \bar
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@bar@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\=\endcsname{}}
% \. -> \dot
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@dot@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\.\endcsname{}}
% \" -> \ddot
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@ddot@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\"\endcsname{}}
% \r -> \mathring
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@mathring@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\r\endcsname{}}
% \^ -> \hat
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@hat@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\^\endcsname{}}
% \~ -> \tilde
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@tilde@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\~\endcsname{}}
\fi
@@ -7485,7 +7624,7 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
%
% Note: (|2012/10/24|) I really should check whether the user attempts to
% redefine the `normal' and `bold' versions and issue a warning in
-% that case!
+% that case! Finally done at |1.3w| |2019/11/16|! Better late than never...
%
% |1.3c| (|2013/12/14|) adds an extra optional parameter after all
% previous ones, to inherit the settings from another version. Typically
@@ -7499,13 +7638,27 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
% |1.3u| adds storage of macros holding the needed meanings for
% \cs{imath}, \cs{hbar}, math accents, and the minus symbol,
% version wise.
+%
+% |1.3w| adds the check to forbid |normal| and |bold| as version names.
% \begin{macrocode}
\newcommand*\MTDeclareVersion[6][]{%
\edef\mst@declareversionargs{{#1}{#2}{#3}{#4}{#5}{#6}}%
\edef\mst@version{#2}%
- \DeclareMathVersion{\mst@version}%
- \MTDeclareVersion@
+ \if0\ifx\mst@version\mst@normalversionname0\else
+ \ifx\mst@version\mst@boldversionname0\else
+ 1\fi\fi
+ \expandafter\expandafter\expandafter
+ \MTDoNotDeclareVersion@\expandafter\@gobblefour
+ \fi
+ \relax\DeclareMathVersion{\mst@version}\MTDeclareVersion@
}% \MTDeclareVersion
+\newcommand*\MTDoNotDeclareVersion@[1][]{%
+ \PackageWarningNoLine{mathastext}{You asked to declare a version with name
+ `\mst@version'.^^J%
+ \@spaces Sorry but you are not allowed to do that.^^J%
+ \@spaces \ifmst@subdued Anyway the `subdued' option is in force\else
+ Use rather \string\Mathastext\space macro (with no optional argument)\fi
+}}%\MTDoNotDeclareVersion@
\newcommand*\MTDeclareVersion@[1][]{%
\edef\mst@tmp{#1}%
\ifx\mst@tmp\empty\else
@@ -7777,8 +7930,7 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
% \cs{MTeverymathoff}.
% \begin{macrocode}
\ifmst@subdued
- \def\mst@tmpa{normal}%
- \ifx\math@version\mst@tmpa
+ \ifx\math@version\mst@normalversionname
\mst@restorealphabets
\MTstandardgreek
\MTmathoperatorsdonotobeymathxx
@@ -7798,8 +7950,7 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\mst@subduedmathaccents
\mst@subduedminus
\else
- \def\mst@tmpa{bold}%
- \ifx\math@version\mst@tmpa
+ \ifx\math@version\mst@boldversionname
\mst@restorealphabets
\MTstandardgreek
\MTmathoperatorsdonotobeymathxx
@@ -8286,18 +8437,22 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
%
% |1.3v| adapts to \cs{hbar} and math accents now being robust with \LaTeX{}
% |2019-10-01| or later.
+%
+% |1.3w| pays attention to the fact that \cs{hbar} may well be
+% a |\mathchar| and not a robust macro! And no need to worry about
+% \cs{hbar<space>} finally in revised code.
% \begin{macrocode}
\MTcustomizenewmcodes
- \expandafter\let\expandafter
- \mst@original@hbar
- \csname hbar\mst@robustifyingspace\endcsname
+ \let\mst@original@hbar\hbar
\let\mst@original@imath\imath
\let\mst@original@jmath\jmath
\@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
{dot}{ddot}{mathring}{hat}{tilde}%
\do
{\expandafter\let\csname mst@original@\@tempa\expandafter\endcsname
- \csname \@tempa\mst@robustifyingspace\endcsname
+ \csname \@tempa\endcsname
+ \expandafter\let\csname mst@original@\@tempa\space\expandafter\endcsname
+ \csname \@tempa\space\endcsname
}%
\ifmst@XeOrLua
\edef\mst@subduedminus
@@ -8530,7 +8685,7 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
Grave accent \` Left brace \{ Vertical bar \|
Right brace \} Tilde \~}
-\CheckSum{6101}
+\CheckSum{6187}
\makeatletter\check@checksum\makeatother
\Finale
%%
diff --git a/Master/texmf-dist/tex/latex/mathastext/mathastext.sty b/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
index 6081e68f550..3692e856bc8 100644
--- a/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
+++ b/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
@@ -23,7 +23,7 @@
%%----------------------------------------------------------------
%% Package: mathastext
%% Info: Use the text font in math mode (JFB)
-%% Version: 1.3v 2019/09/19
+%% Version: 1.3w 2019/11/16
%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
%% Copyright (C) 2011-2019 Jean-Francois Burnol <jfbu at free dot fr>
%% Examples of use of mathastext:
@@ -32,7 +32,7 @@
%%----------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage {mathastext}
- [2019/09/19 v1.3v Use the text font in math mode (JFB)]
+ [2019/11/16 v1.3w Use the text font in math mode (JFB)]
\newif\ifmst@robust@obsessed@LaTeX@era
\@ifl@t@r\fmtversion{2019/10/01}{\mst@robust@obsessed@LaTeX@eratrue}{}
\edef\mst@robustifyingspace{\ifmst@robust@obsessed@LaTeX@era\space\fi}
@@ -207,6 +207,12 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\DeclareOption*%
{\expandafter\mst@checkoption\CurrentOption\mst@ unicodeminus\mst@\mst@@}
\ProcessOptions\relax
+\def\mst@DeclareMathAccent#1{\let#1\mst@undefined
+ \expandafter
+ \let\csname\expandafter\@gobble\string#1\space\endcsname\mst@undefined
+ \DeclareMathAccent{#1}}
+\def\mst@normalversionname{normal}%
+\def\mst@boldversionname{bold}%
\newmuskip\mst@exists@muskip %% v 1.15e
\newmuskip\mst@forall@muskip
\def\mst@exists@skip{1mu}
@@ -293,11 +299,9 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
}%
\def\mst@OnlyIfNotSubdued#1{%
\ifmst@subdued
- \def\mst@tmpa{normal}%
- \ifx\math@version\mst@tmpa
+ \ifx\math@version\mst@normalversionname
\else
- \def\mst@tmpa{bold}%
- \ifx\math@version\mst@tmpa
+ \ifx\math@version\mst@boldversionname
\else
#1%
\fi
@@ -622,7 +626,7 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\DeclareFontSubstitution{FML}{futm}{m}{it}
\DeclareSymbolFont{mathastextfourier}{FML}{futm}{m}{it}
\SetSymbolFont{mathastextfourier}{bold}{FML}{futm}{b}{it}
- \DeclareMathAccent{\fouriervec}{\mathord}{mathastextfourier}{"7E}
+ \mst@DeclareMathAccent{\fouriervec}{\mathord}{mathastextfourier}{"7E}
\fi
\newcommand*\MTencoding[1]{\def\mst@enc{#1}}
\newcommand*\MTfamily[1]{\def\mst@fam{#1}}
@@ -827,10 +831,6 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\edef\mst@tmp@enc{\csname mst@encoding@\math@version\endcsname}%
\if1\mst@OneifUniEnc
\mst@Umathcode`\-=\expandafter
- % Working around a bug (or feature...) of XeTeX/LuaTeX: afaict it is
- % impossible to use straightforwardly in extended mathcode assignments
- % a control sequence as created by \Umathchardef.
- % This is counter-intuitive and breaks expectations.
\mst@UmathchardefWorkAround@i
\csname mst@minus@mv\math@version\endcsname
\relax
@@ -838,6 +838,11 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\mathcode`\-=\@nameuse{mst@minus@mv\math@version}% self-delimiting
\fi
}% \mst@nonsubduedminus
+ \ifmst@endash\else\ifmst@emdash\else
+ \def\mst@nonsubduedminus{%
+ \mathcode`\-=\@nameuse{mst@minus@mv\math@version}% self-delimiting
+ }% non Umathchardef \mst@minus@mv<mathversion> macros
+ \fi\fi
\fi
\def\mst@UmathchardefWorkAround@i
{\expandafter\mst@UmathchardefWorkAround@ii\meaning}%
@@ -845,14 +850,9 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\let\mst@subduedhbar\@empty
\let\mst@nonsubduedhbar\@empty
\ifmst@nohbar\else
- \def\mst@subduedhbar{%
- \expandafter\let\csname hbar\mst@robustifyingspace\endcsname
- \mst@original@hbar
- }%
- \def\mst@nonsubduedhbar{%
- \expandafter\let\csname hbar\mst@robustifyingspace\expandafter\endcsname
- \csname mst@hbar@mv\math@version\endcsname
- }%
+ \def\mst@subduedhbar{\let\hbar\mst@original@hbar}%
+ \def\mst@nonsubduedhbar{\expandafter
+ \let\expandafter\hbar\csname mst@hbar@mv\math@version\endcsname}%
\fi
\def\mst@mathrlap{\mathpalette\mst@mathrlapinternal}
\def\mst@mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}}
@@ -864,10 +864,10 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\begingroup
\def\@text@composite##1\@text@composite##2{##2}%
\let\add@accent\@firstoftwo
- \DeclareMathAccent{#2}{\mathalpha}{mtletterfont}%
+ \mst@DeclareMathAccent{#2}{\mathalpha}{mtletterfont}%
{\csname\mst@tmp@enc\string\=\endcsname{}}%
\endgroup
- \def#1{\mst@mathrlap{#2{\ }}\mst@h}%
+ \protected\def#1{\mst@mathrlap{#2{\ }}\mst@h}%
\fi
}% end of \mst@dothe@hbarstuff
\ifmst@noplus\else\typeout{** \string+ and \string=}
@@ -1528,15 +1528,21 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
{dot}{ddot}{mathring}{hat}{tilde}%
\do
- {\expandafter\let\csname\@tempa\mst@robustifyingspace\expandafter\endcsname
- \csname mst@original@\@tempa\endcsname}%
+ {\expandafter\let\csname\@tempa\expandafter\endcsname
+ \csname mst@original@\@tempa\endcsname
+ \expandafter\let\csname\@tempa\space\expandafter\endcsname
+ \csname mst@original@\@tempa\space\endcsname
+ }%
}%
\def\mst@nonsubduedmathaccents{%
\@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
{dot}{ddot}{mathring}{hat}{tilde}%
\do
- {\expandafter\let\csname\@tempa\mst@robustifyingspace\expandafter\endcsname
- \csname mst@\@tempa @mv\math@version\mst@robustifyingspace\endcsname}%
+ {\expandafter\let\csname\@tempa\expandafter\endcsname
+ \csname mst@\@tempa @mv\math@version\endcsname
+ \expandafter\let\csname\@tempa\space\expandafter\endcsname
+ \csname mst@\@tempa @mv\math@version\space\endcsname
+}%
}%
\def\mst@dothe@mathaccentsstuff#1#2{%
\begingroup
@@ -1612,8 +1618,11 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
{dot}{ddot}{mathring}{hat}{tilde}%
\do
{\expandafter\let
- \csname mst@\@tempa @mv#1\mst@robustifyingspace\expandafter\endcsname
- \csname mst@original@\@tempa\endcsname}%
+ \csname mst@\@tempa @mv#1\expandafter\endcsname
+ \csname mst@original@\@tempa\endcsname
+ \expandafter\let
+ \csname mst@\@tempa @mv#1\space\expandafter\endcsname
+ \csname mst@original@\@tempa\space\endcsname}%
}}%
\fi
\ifmst@robust@obsessed@LaTeX@era
@@ -1627,43 +1636,43 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\fi
\else % false branch of ifUniEnc
% \` -> \grave
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@grave@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\`\endcsname{}}
% \' -> \acute
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@acute@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\'\endcsname{}}
% \v -> \check
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@check@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\v\endcsname{}}
% \u -> \breve
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@breve@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\u\endcsname{}}
% \= -> \bar
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@bar@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\=\endcsname{}}
% \. -> \dot
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@dot@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\.\endcsname{}}
% \" -> \ddot
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@ddot@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\"\endcsname{}}
% \r -> \mathring
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@mathring@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\r\endcsname{}}
% \^ -> \hat
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@hat@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\^\endcsname{}}
% \~ -> \tilde
- \expandafter\DeclareMathAccent\expandafter
+ \expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@tilde@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\~\endcsname{}}
\fi
@@ -1673,9 +1682,21 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\newcommand*\MTDeclareVersion[6][]{%
\edef\mst@declareversionargs{{#1}{#2}{#3}{#4}{#5}{#6}}%
\edef\mst@version{#2}%
- \DeclareMathVersion{\mst@version}%
- \MTDeclareVersion@
+ \if0\ifx\mst@version\mst@normalversionname0\else
+ \ifx\mst@version\mst@boldversionname0\else
+ 1\fi\fi
+ \expandafter\expandafter\expandafter
+ \MTDoNotDeclareVersion@\expandafter\@gobblefour
+ \fi
+ \relax\DeclareMathVersion{\mst@version}\MTDeclareVersion@
}% \MTDeclareVersion
+\newcommand*\MTDoNotDeclareVersion@[1][]{%
+ \PackageWarningNoLine{mathastext}{You asked to declare a version with name
+ `\mst@version'.^^J%
+ \@spaces Sorry but you are not allowed to do that.^^J%
+ \@spaces \ifmst@subdued Anyway the `subdued' option is in force\else
+ Use rather \string\Mathastext\space macro (with no optional argument)\fi
+}}%\MTDoNotDeclareVersion@
\newcommand*\MTDeclareVersion@[1][]{%
\edef\mst@tmp{#1}%
\ifx\mst@tmp\empty\else
@@ -1842,8 +1863,7 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\@for\mst@tmpc:=it,sl\do{\ifx\mst@tmpc\mst@tmpb\MTnoICinmath\fi}%
\fi
\ifmst@subdued
- \def\mst@tmpa{normal}%
- \ifx\math@version\mst@tmpa
+ \ifx\math@version\mst@normalversionname
\mst@restorealphabets
\MTstandardgreek
\MTmathoperatorsdonotobeymathxx
@@ -1856,8 +1876,7 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\mst@subduedmathaccents
\mst@subduedminus
\else
- \def\mst@tmpa{bold}%
- \ifx\math@version\mst@tmpa
+ \ifx\math@version\mst@boldversionname
\mst@restorealphabets
\MTstandardgreek
\MTmathoperatorsdonotobeymathxx
@@ -2188,16 +2207,16 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\mst@thef\mst@do@az \let\mst@thef\@gobble
\mst@theF\mst@do@AZ \let\mst@theF\@gobble}%
\MTcustomizenewmcodes
- \expandafter\let\expandafter
- \mst@original@hbar
- \csname hbar\mst@robustifyingspace\endcsname
+ \let\mst@original@hbar\hbar
\let\mst@original@imath\imath
\let\mst@original@jmath\jmath
\@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
{dot}{ddot}{mathring}{hat}{tilde}%
\do
{\expandafter\let\csname mst@original@\@tempa\expandafter\endcsname
- \csname \@tempa\mst@robustifyingspace\endcsname
+ \csname \@tempa\endcsname
+ \expandafter\let\csname mst@original@\@tempa\space\expandafter\endcsname
+ \csname \@tempa\space\endcsname
}%
\ifmst@XeOrLua
\edef\mst@subduedminus