texlive[48458] Master/texmf-dist: mathastext (22aug18)
commits+karl at tug.org
commits+karl at tug.org
Wed Aug 22 23:31:08 CEST 2018
Revision: 48458
http://tug.org/svn/texlive?view=revision&revision=48458
Author: karl
Date: 2018-08-22 23:31:08 +0200 (Wed, 22 Aug 2018)
Log Message:
-----------
mathastext (22aug18)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/mathastext/README.md
trunk/Master/texmf-dist/doc/latex/mathastext/mathastext.pdf
trunk/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.pdf
trunk/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
trunk/Master/texmf-dist/source/latex/mathastext/mathastext.ins
trunk/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
Modified: trunk/Master/texmf-dist/doc/latex/mathastext/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mathastext/README.md 2018-08-22 21:30:53 UTC (rev 48457)
+++ trunk/Master/texmf-dist/doc/latex/mathastext/README.md 2018-08-22 21:31:08 UTC (rev 48458)
@@ -12,9 +12,9 @@
The Author of this Work is Jean-Francois Burnol
-Copyright (C) 2011-2016 Jean-Francois Burnol (`jfbu at free dot fr`)
+Copyright (C) 2011-2018 Jean-Francois Burnol (`jfbu at free dot fr`)
- Source: mathastext.dtx 1.3r 2016/11/06
+ Source: mathastext.dtx 1.3t 2018/08/22
> cumulative Change Log at bottom of this file.
@@ -129,6 +129,32 @@
CHANGE LOG
==========
+1.3t \[2018/08/22\]
+----
+
+* bugfix: the 1.3s bugfix about `subdued` compatibility with
+ `fontspec` was deficient.
+
+* bugfix: very old (v1.2, 2012/12/20) bug causing low-level TeX error
+ during package loading (with pdflatex) when setting up the math minus
+ sign to be the text font endash character, in cases with
+ `\encodingdefault` other than OT1, T1 or LY1, e.g. something like
+ T2A.
+
+* `\imath` and `\jmath` obey the `subdued` regime. And the minus sign
+ is now handled especially to ensure perfect compatibility with the
+ `subdued` option.
+
+* breaking change: `mathastext` does not redefine anymore
+ `\i` and `\j` to let them be usable both in text and math mode.
+
+1.3s \[2018/08/21\]
+----
+
+* fix to an issue with `subdued` option in a `fontspec` context.
+
+ https://tex.stackexchange.com/q/444565/4686
+
1.3r \[2016/11/06\]
----
Modified: trunk/Master/texmf-dist/doc/latex/mathastext/mathastext.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathastext/mathastext.dtx 2018-08-22 21:30:53 UTC (rev 48457)
+++ trunk/Master/texmf-dist/source/latex/mathastext/mathastext.dtx 2018-08-22 21:31:08 UTC (rev 48458)
@@ -2,12 +2,12 @@
% N.B.: this dtx file does NOT use \DocInput (only docstrip), the
% LaTeX source of the documentation is NOT prefixed with % signs.
%<*dtx>
-\def\dtxtimestamp {Time-stamp: <06-11-2016 at 19:22:30 CET>}%
-\def\docdate{2016/11/06}
+\def\dtxtimestamp {Time-stamp: <22-08-2018 at 19:31:52 CEST>}%
+\def\docdate{2018/08/22}
%</dtx>
%<*drv|ins>
-\def\MSTpkgdate {2016/11/06}
-\def\MSTpkgversion {1.3r}
+\def\MSTpkgdate {2018/08/22}
+\def\MSTpkgversion {1.3t}
%</drv|ins>
%<*dtx>
\iffalse % meta-comment
@@ -27,9 +27,9 @@
The Author of this Work is Jean-Francois Burnol
-Copyright (C) 2011-2016 Jean-Francois Burnol (`jfbu at free dot fr`)
+Copyright (C) 2011-2018 Jean-Francois Burnol (`jfbu at free dot fr`)
- Source: mathastext.dtx 1.3r 2016/11/06
+ Source: mathastext.dtx 1.3t 2018/08/22
%</readme>
%<*dtx>
@@ -45,9 +45,9 @@
%%----------------------------------------------------------------
%% Package: mathastext
%% Info: Use the text font in math mode (JFB)
-%% Version: 1.3r 2016/11/06
+%% Version: 1.3t 2018/08/22
%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
-%% Copyright (C) 2011-2016 Jean-Francois Burnol <jfbu at free dot fr>
+%% Copyright (C) 2011-2018 Jean-Francois Burnol <jfbu at free dot fr>
%% Examples of use of mathastext:
%% http://jf.burnol.free.fr/mathastext.html
%% http://jf.burnol.free.fr/showcase.html
@@ -240,6 +240,33 @@
CHANGE LOG
==========
+1.3t \[2018/08/22\]
+----
+
+* bugfix: the 1.3s bugfix about `subdued` compatibility with
+ `fontspec` was deficient.
+
+* bugfix: very old (v1.2, 2012/12/20) bug causing low-level TeX error
+ during package loading (with pdflatex) when setting up the math minus
+ sign to be the text font endash character, in cases with
+ `\encodingdefault` other than OT1, T1 or LY1, e.g. something like
+ T2A.
+
+* `\imath` and `\jmath` obey the `subdued` regime. And the minus sign
+ is now handled especially to ensure perfect compatibility with the
+ `subdued` option.
+
+* breaking change: `mathastext` does not redefine anymore
+ `\i` and `\j` to let them be usable both in text and math mode.
+
+1.3s \[2018/08/21\]
+----
+
+* fix to an issue with `subdued` option in a `fontspec` context.
+
+ https://tex.stackexchange.com/q/444565/4686
+
+
1.3r \[2016/11/06\]
----
@@ -1912,7 +1939,12 @@
The previous description is in fact a bit optimistic: \mst was not
written initially in order to allow its action to be completely
canceled, and achieving this would require a complete rewrite of
-large portions of the code.
+large portions of the code.%
+%
+\footnote{\mst does not store mathcodes nor does it set them when
+changing math versions; only that would allow a perfect subdued
+mode. The sole exception, since \texttt{1.3t}, is for the handling of
+the minus sign.}
To get the displayed math
(almost) as if \mst had not been loaded, one must also
@@ -1920,18 +1952,28 @@
as, for example, the colon, the dot, and the minus sign belong
in the default \LaTeX{} math mode set-up to three distinct fonts
whereas \mst will pick (even subdued) the three of them in the same
-font, and although it will make a reasonable choice of this font,
+font,%
+\footnote{\CHANGED{1.3t}The minus sign is now perfectly subdued,
+because its original mathcode is stored and restored; this was only
+way to handle the case with Unicode engines
+where the math operator font is in a classic
+\TeX\ encoding, but the minus sign is configured by \mst to use a Unicode
+en-dash or minus character in non-subdued math versions.}
+%
+and although it will make a reasonable choice of this font,
this is not a return to the previously prevailing situation. And
then arbitrary packages could have done arbitrary things... so to
be on the safe side one needs the \xA7basic\xA7 option which limits the
-mathastextification to letters and digits (and should also be
-accompanied by \xA7defaultimath\xA7 which prevents redefinition of the
-\cs{imath} macro, and \xA7nohbar\xA7 which prevents redefinition of the
-\cs{hbar} macro\dots). And even then, in some circumstances, this
-will still not suffice; for example the \emph{euler} package puts
+mathastextification to letters and digits; and also the \xA7nohbar\xA7 to
+avoid the redefinition of the \cs{hbar} macro.%
+\footnote{\CHANGED{1.3t}The \texttt{\string\imath} and
+\texttt{\string\jmath} now obey automatically the subdued regime.}
+
+And even then, in some circumstances, this
+may not suffice; for example the \emph{euler} package puts
the digits in the same font as the Latin letters in math mode, but
-the subdued \mst will pick them up in the same font as used in
-operator names, and in the case of the \emph{euler} package, this
+the subdued \mst will pick them up in the same font as used for
+operator names, which for example in the case of the \emph{euler} package, is
is the main document font. So, even subdued, \mst still kicks. But,
as I think is illustrated by the examples given at the start of
this document, the \xA7subdued\xA7 option has its utility, and works
@@ -3011,7 +3053,7 @@
deactivate it. Starting with version |1.12| of the
package this `en-dash as minus' should work in all
encodings, including Unicode (if |fontspec| has been
- loaded).
+ loaded); see also |unicodeminus| for OpenType fonts.
\item[amsmath:] \strut the behaviour of the
\cs{DeclareMathOperator}\RLNote{changed:}{1.3n} command
@@ -3051,14 +3093,13 @@
the \cs{hbar} directly as a glyph from the font.
-\item[dotless i and j:] by default the package redefines
- \cs{i} and \cs{j} to give the dotless i and j (if it
- exists at all), \emph{also in math mode,} in the text
- font. Will overwrite the default commands \cs{imath}
- and \cs{jmath}. In version |1.12| of the package this
- should work in all encodings, including Unicode (it
- is then assumed that |fontspec| has been loaded, and
- of course that the glyphs are indeed in the font).
+\item[dotless i and j:] by default the package redefines \cs{imath} and
+ \cs{jmath} to give (in math mode) the dotless i and j (if it exists at
+ all) from the text font.%
+%
+\footnote{\CHANGED{1.3t}Since \texttt{1.12} it also redefined \cs{i} and
+ \cs{j} for usability both in text and math modes, but this has been
+ dropped at \texttt{1.13t}. Breaking change!}
\item[asterisk:] versions of \mst earlier than |1.2d [2013/01/02]|
did not do anything
@@ -3218,8 +3259,8 @@
installed into the list of things done by \TeX\ systematically each time
it enters math mode. For some legacy reason the package also puts into
this list a few other things which could arguably be done elsewhere once and
-for all. The command \csb{MTeverymathoff} cancels all such actions done by
-\mst each time math mode is entered.
+for all. The command \csb{MTeverymathoff} cancels all actions done by
+\mst.
\newsavebox\boite
@@ -3754,8 +3795,8 @@
All further commands are usable only inside math mode.
\begin{enumerate}[label=$\bullet$]
-\item \xA7\hbar\xA7: this is constructed
- (in a way compatible with the |italic| option) from
+\item \xA7\hbar\xA7: this macro is by default redefined
+ (in a way compatible with the |italic| option) combining
the |h| letter and the \={ } accent from the
\mst font. Note that \cs{mathrm}|{\hbar}| and
\cs{mathbf}|{\hbar}| should work and that \cs{hbar}
@@ -3781,13 +3822,20 @@
distinct from the one for digits and operator names, or similarly
when the math version has been declared via \xA7\MTDeclareVersion\xA7 with
its optional parameter for shape of letters.
-\item \xA7\inodot\xA7, \xA7\jnodot\xA7: the corresponding glyphs in
- the chosen font for math mode. By default, will
- overwrite |\imath| and |\jmath|. With version |1.12|
- by default \xA7\i\xA7 and \xA7\j\xA7 work also in math mode and
- give then \xA7\inodot\xA7, resp. \xA7\jnodot\xA7. This should work for
- all 8bit-encodings having these glyphs, and
- also in Unicode.
+\item \xA7\inodot\xA7, \xA7\jnodot\xA7: the corresponding glyphs in the \mst-ified
+ font for use in math mode. This should work for all 8bit-encodings
+ having these glyphs, and also with Unicode engines (except for the
+ latter if the font encoding is an 8-bit one distinct from |OT1|, |T1|
+ or |LY1|). By default, |\imath| and |\jmath| are redefined to use
+ them. Since \texttt{1.3t}, these macros obey the \texttt{subdued}
+ regime.
+%
+\footnote{\CHANGED{1.3t}Formerly (i.e. since \texttt{1.12}) \mst
+ redefined the \texttt{\string\i} and \texttt{\string\j} as robust
+ commands usable both in text and math mode and using the above macros
+ in the latter. I have decided it wasn't such a good idea and there is
+ from now on \texttt{1.3t} no such redefinition of \texttt{\string\i}
+ and \texttt{\string\j}!}
\item \xA7\MathEuler\xA7, \xA7\MathEulerBold\xA7: math alphabets to access
all the glyphs of the Euler font, if option |eulergreek| (or
|eulerdigits| was passed to the package.
@@ -3877,8 +3925,8 @@
|fontspec|.) Or, in the form |unicodeminus=HHHH| with four \emph{uppercased}
hexadecimal digits: use the |U+HHHH| code point. As \xA7noendash\xA7 really means
``use the hyphen from the text font'', \xA7unicodeminus\xA7 remains without effect
- under it, or, naturally, under \xA7nominus\xA7. Note: without this option,
- \mst uses the |EN DASH U+2013| by default.
+ under it, or, naturally, under \xA7nominus\xA7. Without this option,
+ \mst uses the |EN DASH U+2013| by default for OpenType fonts.
\item \xA7asterisk\xA7: use the text font (or the Symbol font) asterisk in math mode.
\item \xA7nohbar\xA7: prevents \mst from defining its own
\cs{hbar}.
@@ -3961,7 +4009,7 @@
\item \xA7defaultalphabets\xA7: all the \xA7defaultxx\xA7 options together, and
additionally tells \mst not to create the \cs{mathnormalbold} alphabet either.
\item \xA7defaultimath\xA7: do not overwrite \cs{imath} and
- \cs{jmath}, do not extend \cs{i} and \cs{j} to math mode use.
+ \cs{jmath} to use \cs{inodot} and \cs{jnodot}.
\item \xA7defaultmathsizes\xA7: do not change the \LaTeX{} defaults for the sizes
of exponents and subscripts.
\item \xA7fouriervec\xA7: provides a \cs{fouriervec} command. The user can then
@@ -4158,7 +4206,7 @@
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage {mathastext}
- [2016/11/06 v1.3r Use the text font in math mode (JFB)]
+ [2018/08/22 v1.3t Use the text font in math mode (JFB)]
% \end{macrocode}
% Testing for \XeTeX\ and \LuaLaTeX.
%
@@ -4944,14 +4992,23 @@
%
% And |1.3p| adds here \cs{MTcustomizenewmcodes} which had been regrettably
% forgotten by |1.3n|.
+%
+% |1.3t| adds some extras to handle correctly the minus sign and
+% dotless i and j in subdued mode, even in case of usage with fontspec.
% \begin{macrocode}
\MTcustomizenewmcodes
+ \let\mst at imath\imath
+ \let\mst at jmath\jmath
\ifmst at subdued
\MTeverymathoff
\MTresetnewmcodes
\MTnoicinmath
\MTmathoperatorsdonotobeymathxx
+ \let\inodot\mst at imath
+ \let\jnodot\mst at jmath
+ \mst at subduedminus
\else
+ \mst at nonsubduedminus
% \end{macrocode}
% |1.3j|: an earlier version of this code was earlier part of \cs{Mathastext@}.
% As we are now in \cs{AtBeginDocument} we try to be careful not to overwrite
@@ -5301,6 +5358,18 @@
%
% |1.15f|: and also I take this opportunity to do the subdued math
% alphabets things in a much much easier way, see below.
+%
+% |1.3s 2018/08/21|: I have half-forgotten the reasons for modifiying the
+% font encoding to current |\encodingdefault|, but at any rate this should
+% not be done in a |fontspec| context, encoding default being (now) |TU| it
+% is very unlikely modifying from |TU| or to |TU| from something else will
+% do any good. See
+% \centeredline{\url{https://tex.stackexchange.com/questions/444565/mathastext-wrong-digits-in-math-mode/}}
+% for original report. I add workaround here for case of |fontspec| being
+% detected via the |\encodingdefault| setting.
+%
+% |1.3t 2018/08/22|: the |1.3s| fix erroneously removed the
+% |OT1->T1| replacement in |TU| context.
% \begin{macrocode}
\ifmst at subdued
\def\mst at reserved#1\getanddefine at fonts\symletters#2#3\@nil{%
@@ -5316,7 +5385,7 @@
\def\mst at boldmv@operator{#2}}
\expandafter\mst at reserved\mv at bold\@nil
%%
- \edef\mst at tmp{\encodingdefault}
+ \edef\mst at tmp@enc{\encodingdefault}
\def\mst at reserved#1/#2/#3/#4/{\gdef\mst at debut{#1}\gdef\mst at reste{#2/#3/#4}}
\begingroup\escapechar\m at ne
\xdef\mst at funnyoti{\expandafter\string\csname OT1\endcsname}
@@ -5323,16 +5392,24 @@
\expandafter\expandafter\expandafter
\mst at reserved\expandafter\string\mst at normalmv@operator/
\endgroup
- \ifx\mst at debut\mst at funnyoti\ifx\mst at tmp\mst at oti\def\mst at tmp{T1}\fi\fi
+ \ifx\mst at debut\mst at funnyoti\ifx\mst at tmp@enc\mst at oti\def\mst at tmp@enc{T1}\fi\fi
\edef\mst at normalmv@operator{\expandafter\noexpand\csname
- \mst at tmp/\mst at reste\endcsname}
+ \if1\mst at OneifUniEnc
+ \ifx\mst at debut\mst at funnyoti T1\else\mst at debut\fi
+ \else
+ \mst at tmp@enc
+ \fi/\mst at reste\endcsname}
\begingroup\escapechar\m at ne
\expandafter\expandafter\expandafter
\mst at reserved\expandafter\string\mst at boldmv@operator/
\endgroup
- \ifx\mst at debut\mst at funnyoti\ifx\mst at tmp\mst at oti\def\mst at tmp{T1}\fi\fi
+ \ifx\mst at debut\mst at funnyoti\ifx\mst at tmp@enc\mst at oti\def\mst at tmp@enc{T1}\fi\fi
\edef\mst at boldmv@operator{\expandafter\noexpand\csname
- \mst at tmp/\mst at reste\endcsname}
+ \if1\mst at OneifUniEnc
+ \ifx\mst at debut\mst at funnyoti T1\else\mst at debut\fi
+ \else
+ \mst at tmp@enc
+ \fi/\mst at reste\endcsname}
\AtEndOfPackage{
\typeout{** ...entering subdued mode...}
\expandafter\SetSymbolFont@ \expandafter\mv at normal\mst at normalmv@letter\symmtletterfont
@@ -6338,7 +6415,14 @@
\MTnormalexists
\MTnormalforall
\MTeverymathoff
- \MTresetnewmcodes
+ \MTresetnewmcodes
+% \end{macrocode}
+% |1.3t| adds better compatibility with |subdued| mode for
+% |\imath/\jmath| and perfect compatibility for the minus sign.
+% \begin{macrocode}
+ \let\inodot\mst at imath
+ \let\jnodot\mst at jmath
+ \mst at subduedminus
\else
\def\mst at tmpa{bold}%
\ifx\mst at tmp\mst at tmpa
@@ -6348,10 +6432,16 @@
\MTnormalexists
\MTnormalforall
\MTeverymathoff
- \MTresetnewmcodes
+ \MTresetnewmcodes
+ \let\inodot\mst at imath
+ \let\jnodot\mst at jmath
+ \mst at subduedminus
\else
\mst at setalphabets
\MTcustomgreek
+ \let\inodot\mst at inodot
+ \let\jnodot\mst at jnodot
+ \mst at nonsubduedminus
\fi
\fi
\else
@@ -6616,6 +6706,24 @@
% problem with unicode engines.
%
% |1.3l| |2016/01/29|: anticipating TL2016 fontspec's switch to |TU|.
+%
+% |1.3t| |2018/08/22|: fix to very ancient (|2012/12/20|) bug with
+% |\DeclareMathSymbol| lacking last argument if encoding not T1, OT1 or
+% LY1 when setting up math mode to use the en-dash character as minus
+% sign (PDF\TeX\ engine).
+%
+% \begin{macro}{\mst at subduedminus}
+% \begin{macro}{\mst at nonsubduedminus}
+% |1.3t| Further, new macros |\mst at subduedminus| and |\mst at nonsubduedminus|,
+% for the good functioning of the subdued option also in case of
+% presence of fontspec. This is the only character for which subdued
+% option works (now) by setting the mathcode on each math version
+% change. Indeed, a typical issue is when the Unicode EN DASH or MINUS
+% is used, but the actual font in subdued normal math version is
+% originally in OT1 or T1 encoding. The only reasonable way to address
+% 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.
% \begin{macrocode}
\def\mst at dothe@endashstuff{\edef\mst at tmp@enc{\encodingdefault}
\if1\mst at OneifUniEnc
@@ -6639,6 +6747,7 @@
\ifmst at XeOrLua\mst at aborttrue
\else
\DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
+{\expandafter\the\expandafter\csname\mst at tmp@enc\string\textendash\endcsname}
\DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}
{\expandafter\the\expandafter\csname\mst at tmp@enc\string\textendash\endcsname}
\fi
@@ -6665,25 +6774,50 @@
\ifmst at XeOrLua\mst at aborttrue
\else
\DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
+{\expandafter\the\expandafter\csname\mst at tmp@enc\string\textemdash\endcsname}
\DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}
{\expandafter\the\expandafter\csname\mst at tmp@enc\string\textemdash\endcsname}
\fi
\fi\fi\fi\fi}
+\let\mst at subduedminus\empty
+\let\mst at nonsubduedminus\empty
\ifmst at nominus\else\typeout{** minus as endash}
-\mst at abortfalse
-\ifmst at endash\mst at dothe@endashstuff\else
-\ifmst at emdash\mst at dothe@emdashstuff\else
- \DeclareMathSymbol{-}{\mathbin}{\mst at font@tbu}{"2D}
- \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{\mst at font@tbu}{"2D}
-\fi\fi
-\ifmst at abort
+ \edef\mst at tmp@enc{\encodingdefault}
+ \ifmst at XeOrLua
+ \if1\mst at OneifUniEnc\expandafter\AtBeginDocument
+ \else\expandafter\@firstofone
+ \fi
+ {\edef\mst at subduedminus
+ {\mst at Umathcodenum`\noexpand\-=\the\mst at Umathcodenum`\-\relax}}%
+ \else
+ \edef\mst at subduedminus{\mathcode`\noexpand\-=\the\mathcode`\-\relax}%
+ \fi
+ \mst at abortfalse
+ \ifmst at endash\mst at dothe@endashstuff\else
+ \ifmst at emdash\mst at dothe@emdashstuff\else
+ \if1\mst at OneifUniEnc\expandafter\AtBeginDocument
+ \else\expandafter\@firstofone
+ \fi
+ {\DeclareMathSymbol{-}{\mathbin}{\mst at font@tbu}{"2D}%
+ \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{\mst at font@tbu}{"2D}}%
+ \fi\fi
+ \ifmst at abort
\DeclareMathSymbol{-}{\mathbin}{\mst at font@tbu}{"2D}
\DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{\mst at font@tbu}{"2D}
+ \fi
+ \expandafter\mst at addtodo@nonletters\string-\mathbin\mst at varfam@minus
+ \ifmst at XeOrLua
+ \if1\mst at OneifUniEnc\expandafter\AtBeginDocument
+ \else\expandafter\@firstofone
+ \fi
+ {\edef\mst at nonsubduedminus
+ {\mst at Umathcodenum`\noexpand\-=\the\mst at Umathcodenum`\-\relax}}%
+ \else
+ \edef\mst at nonsubduedminus{\mathcode`\noexpand\-=\the\mathcode`\-\relax}%
+ \fi
\fi
-\expandafter\mst at addtodo@nonletters\string-\mathbin\mst at varfam@minus
-\fi
% \end{macrocode}
-% \end{macro}
+% \end{macro}\end{macro}\end{macro}
% \begin{macro}{\hbar}
% \begin{macro}{\mst at ltbar}
% |2011/01/31|, |1.1| I decide to settle the question of the |\hbar|. First, the
@@ -7620,6 +7754,9 @@
% code redefining \$ etc in math mode (see above). Fixed.
%
% |1.3l| |2016/01/29|: anticipating TL2016 fontspec's switch to |TU|.
+%
+% |1.3t| |2018/08/22| removes the definitions done of |\i| and |\j|
+% since |1.12| (as robust commands usable both in text and math mode).
% \begin{macrocode}
\edef\mst at tmp@enc{\encodingdefault}
\mst at goaheadtrue
@@ -7647,13 +7784,14 @@
{\expandafter\the\expandafter\csname\mst at tmp@enc\string\j\endcsname}
\fi
\fi\fi\fi\fi
-\ifmst at defaultimath\else\typeout{** \string\i\space and \string\j\space}
+\let\mst at inodot\inodot
+\let\mst at jnodot\jnodot
+\ifmst at defaultimath\else\typeout{** \string\imath\space and \string\jmath\space}
\ifmst at goahead
- \renewcommand*{\imath}{\inodot}
- \renewcommand*{\jmath}{\jnodot}
- \let\mst at oldi\i \let\mst at oldj\j
- \DeclareRobustCommand*{\i}{\ifmmode\inodot\else\mst at oldi\fi}
- \DeclareRobustCommand*{\j}{\ifmmode\jnodot\else\mst at oldj\fi}
+ \AtEndOfPackage{\AtBeginDocument{%
+ \renewcommand*{\imath}{\inodot}%
+ \renewcommand*{\jmath}{\jnodot}%
+ }}%
\fi
\fi
% \end{macrocode}
@@ -7823,7 +7961,7 @@
Grave accent \` Left brace \{ Vertical bar \|
Right brace \} Tilde \~}
-\CheckSum{5558}
+\CheckSum{5692}
\makeatletter\check at checksum\makeatother
\Finale
%%
Modified: trunk/Master/texmf-dist/source/latex/mathastext/mathastext.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathastext/mathastext.ins 2018-08-22 21:30:53 UTC (rev 48457)
+++ trunk/Master/texmf-dist/source/latex/mathastext/mathastext.ins 2018-08-22 21:31:08 UTC (rev 48458)
@@ -1,11 +1,11 @@
-\def\MSTpkgdate {2016/11/06}
-\def\MSTpkgversion {1.3r}
+\def\MSTpkgdate {2018/08/22}
+\def\MSTpkgversion {1.3t}
%%----------------------------------------------------------------
%% Package: mathastext
%% Info: Use the text font in math mode (JFB)
-%% Version: 1.3r 2016/11/06
+%% Version: 1.3t 2018/08/22
%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
-%% Copyright (C) 2011-2016 Jean-Francois Burnol <jfbu at free dot fr>
+%% Copyright (C) 2011-2018 Jean-Francois Burnol <jfbu at free dot fr>
%% Examples of use of mathastext:
%% http://jf.burnol.free.fr/mathastext.html
%% http://jf.burnol.free.fr/showcase.html
Modified: trunk/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mathastext/mathastext.sty 2018-08-22 21:30:53 UTC (rev 48457)
+++ trunk/Master/texmf-dist/tex/latex/mathastext/mathastext.sty 2018-08-22 21:31:08 UTC (rev 48458)
@@ -23,9 +23,9 @@
%%----------------------------------------------------------------
%% Package: mathastext
%% Info: Use the text font in math mode (JFB)
-%% Version: 1.3r 2016/11/06
+%% Version: 1.3t 2018/08/22
%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
-%% Copyright (C) 2011-2016 Jean-Francois Burnol <jfbu at free dot fr>
+%% Copyright (C) 2011-2018 Jean-Francois Burnol <jfbu at free dot fr>
%% Examples of use of mathastext:
%% http://jf.burnol.free.fr/mathastext.html
%% http://jf.burnol.free.fr/showcase.html
@@ -32,7 +32,7 @@
%%----------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage {mathastext}
- [2016/11/06 v1.3r Use the text font in math mode (JFB)]
+ [2018/08/22 v1.3t Use the text font in math mode (JFB)]
\let\mst at Umathcharnumdef\Umathcharnumdef
\let\mst at Umathcodenum \Umathcodenum
\let\mst at Umathcode \Umathcode
@@ -346,12 +346,18 @@
\mst at thef\mst at do@az \let\mst at thef\@gobble
\mst at theF\mst at do@AZ \let\mst at theF\@gobble}%
\MTcustomizenewmcodes
+ \let\mst at imath\imath
+ \let\mst at jmath\jmath
\ifmst at subdued
\MTeverymathoff
\MTresetnewmcodes
\MTnoicinmath
\MTmathoperatorsdonotobeymathxx
+ \let\inodot\mst at imath
+ \let\jnodot\mst at jmath
+ \mst at subduedminus
\else
+ \mst at nonsubduedminus
\ifx\mst at itcorr\@undefined
\def\mst at itcorr{\ifnum\fam=\m at ne\/\fi}%
\@for\mst at tmp:=it,sl\do
@@ -515,7 +521,7 @@
\def\mst at boldmv@operator{#2}}
\expandafter\mst at reserved\mv at bold\@nil
%%
- \edef\mst at tmp{\encodingdefault}
+ \edef\mst at tmp@enc{\encodingdefault}
\def\mst at reserved#1/#2/#3/#4/{\gdef\mst at debut{#1}\gdef\mst at reste{#2/#3/#4}}
\begingroup\escapechar\m at ne
\xdef\mst at funnyoti{\expandafter\string\csname OT1\endcsname}
@@ -522,16 +528,24 @@
\expandafter\expandafter\expandafter
\mst at reserved\expandafter\string\mst at normalmv@operator/
\endgroup
- \ifx\mst at debut\mst at funnyoti\ifx\mst at tmp\mst at oti\def\mst at tmp{T1}\fi\fi
+ \ifx\mst at debut\mst at funnyoti\ifx\mst at tmp@enc\mst at oti\def\mst at tmp@enc{T1}\fi\fi
\edef\mst at normalmv@operator{\expandafter\noexpand\csname
- \mst at tmp/\mst at reste\endcsname}
+ \if1\mst at OneifUniEnc
+ \ifx\mst at debut\mst at funnyoti T1\else\mst at debut\fi
+ \else
+ \mst at tmp@enc
+ \fi/\mst at reste\endcsname}
\begingroup\escapechar\m at ne
\expandafter\expandafter\expandafter
\mst at reserved\expandafter\string\mst at boldmv@operator/
\endgroup
- \ifx\mst at debut\mst at funnyoti\ifx\mst at tmp\mst at oti\def\mst at tmp{T1}\fi\fi
+ \ifx\mst at debut\mst at funnyoti\ifx\mst at tmp@enc\mst at oti\def\mst at tmp@enc{T1}\fi\fi
\edef\mst at boldmv@operator{\expandafter\noexpand\csname
- \mst at tmp/\mst at reste\endcsname}
+ \if1\mst at OneifUniEnc
+ \ifx\mst at debut\mst at funnyoti T1\else\mst at debut\fi
+ \else
+ \mst at tmp@enc
+ \fi/\mst at reste\endcsname}
\AtEndOfPackage{
\typeout{** ...entering subdued mode...}
\expandafter\SetSymbolFont@ \expandafter\mv at normal\mst at normalmv@letter\symmtletterfont
@@ -1075,6 +1089,9 @@
\MTnormalforall
\MTeverymathoff
\MTresetnewmcodes
+ \let\inodot\mst at imath
+ \let\jnodot\mst at jmath
+ \mst at subduedminus
\else
\def\mst at tmpa{bold}%
\ifx\mst at tmp\mst at tmpa
@@ -1085,9 +1102,15 @@
\MTnormalforall
\MTeverymathoff
\MTresetnewmcodes
+ \let\inodot\mst at imath
+ \let\jnodot\mst at jmath
+ \mst at subduedminus
\else
\mst at setalphabets
\MTcustomgreek
+ \let\inodot\mst at inodot
+ \let\jnodot\mst at jnodot
+ \mst at nonsubduedminus
\fi
\fi
\else
@@ -1275,6 +1298,7 @@
\ifmst at XeOrLua\mst at aborttrue
\else
\DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
+{\expandafter\the\expandafter\csname\mst at tmp@enc\string\textendash\endcsname}
\DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}
{\expandafter\the\expandafter\csname\mst at tmp@enc\string\textendash\endcsname}
\fi
@@ -1301,23 +1325,48 @@
\ifmst at XeOrLua\mst at aborttrue
\else
\DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
+{\expandafter\the\expandafter\csname\mst at tmp@enc\string\textemdash\endcsname}
\DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{mtoperatorfont}
{\expandafter\the\expandafter\csname\mst at tmp@enc\string\textemdash\endcsname}
\fi
\fi\fi\fi\fi}
+\let\mst at subduedminus\empty
+\let\mst at nonsubduedminus\empty
\ifmst at nominus\else\typeout{** minus as endash}
-\mst at abortfalse
-\ifmst at endash\mst at dothe@endashstuff\else
-\ifmst at emdash\mst at dothe@emdashstuff\else
- \DeclareMathSymbol{-}{\mathbin}{\mst at font@tbu}{"2D}
- \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{\mst at font@tbu}{"2D}
-\fi\fi
-\ifmst at abort
+ \edef\mst at tmp@enc{\encodingdefault}
+ \ifmst at XeOrLua
+ \if1\mst at OneifUniEnc\expandafter\AtBeginDocument
+ \else\expandafter\@firstofone
+ \fi
+ {\edef\mst at subduedminus
+ {\mst at Umathcodenum`\noexpand\-=\the\mst at Umathcodenum`\-\relax}}%
+ \else
+ \edef\mst at subduedminus{\mathcode`\noexpand\-=\the\mathcode`\-\relax}%
+ \fi
+ \mst at abortfalse
+ \ifmst at endash\mst at dothe@endashstuff\else
+ \ifmst at emdash\mst at dothe@emdashstuff\else
+ \if1\mst at OneifUniEnc\expandafter\AtBeginDocument
+ \else\expandafter\@firstofone
+ \fi
+ {\DeclareMathSymbol{-}{\mathbin}{\mst at font@tbu}{"2D}%
+ \DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{\mst at font@tbu}{"2D}}%
+ \fi\fi
+ \ifmst at abort
\DeclareMathSymbol{-}{\mathbin}{\mst at font@tbu}{"2D}
\DeclareMathSymbol{\mst at varfam@minus}{\mathalpha}{\mst at font@tbu}{"2D}
+ \fi
+ \expandafter\mst at addtodo@nonletters\string-\mathbin\mst at varfam@minus
+ \ifmst at XeOrLua
+ \if1\mst at OneifUniEnc\expandafter\AtBeginDocument
+ \else\expandafter\@firstofone
+ \fi
+ {\edef\mst at nonsubduedminus
+ {\mst at Umathcodenum`\noexpand\-=\the\mst at Umathcodenum`\-\relax}}%
+ \else
+ \edef\mst at nonsubduedminus{\mathcode`\noexpand\-=\the\mathcode`\-\relax}%
+ \fi
\fi
-\expandafter\mst at addtodo@nonletters\string-\mathbin\mst at varfam@minus
-\fi
%%\def\hbar{{\mathchar'26\mkern-9muh}} % (original definition from latex.ltx)
\def\mst at mathrlap{\mathpalette\mst at mathrlapinternal}
\def\mst at mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}}
@@ -1980,13 +2029,14 @@
{\expandafter\the\expandafter\csname\mst at tmp@enc\string\j\endcsname}
\fi
\fi\fi\fi\fi
-\ifmst at defaultimath\else\typeout{** \string\i\space and \string\j\space}
+\let\mst at inodot\inodot
+\let\mst at jnodot\jnodot
+\ifmst at defaultimath\else\typeout{** \string\imath\space and \string\jmath\space}
\ifmst at goahead
- \renewcommand*{\imath}{\inodot}
- \renewcommand*{\jmath}{\jnodot}
- \let\mst at oldi\i \let\mst at oldj\j
- \DeclareRobustCommand*{\i}{\ifmmode\inodot\else\mst at oldi\fi}
- \DeclareRobustCommand*{\j}{\ifmmode\jnodot\else\mst at oldj\fi}
+ \AtEndOfPackage{\AtBeginDocument{%
+ \renewcommand*{\imath}{\inodot}%
+ \renewcommand*{\jmath}{\jnodot}%
+ }}%
\fi
\fi
\edef\mst at tmp@enc{\encodingdefault} %% rather one too many than sorry
More information about the tex-live-commits
mailing list