summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mathastext
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-08-22 21:31:08 +0000
committerKarl Berry <karl@freefriends.org>2018-08-22 21:31:08 +0000
commitc38b723bbea147a4601f0c6cb1f8fb00269cec5f (patch)
treed13db4918d84aa822702b3c03a29a842435c6999 /Master/texmf-dist/tex/latex/mathastext
parentf1359914a595cef83bc1a4ddffa238fcd4cded08 (diff)
mathastext (22aug18)
git-svn-id: svn://tug.org/texlive/trunk@48458 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/mathastext')
-rw-r--r--Master/texmf-dist/tex/latex/mathastext/mathastext.sty96
1 files changed, 73 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/latex/mathastext/mathastext.sty b/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
index e956e48efd7..db69294645c 100644
--- a/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
+++ b/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
@@ -23,16 +23,16 @@
%%----------------------------------------------------------------
%% 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
%%----------------------------------------------------------------
\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@Umathcharnumdef\Umathcharnumdef
\let\mst@Umathcodenum \Umathcodenum
\let\mst@Umathcode \Umathcode
@@ -346,12 +346,18 @@ 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
+ \let\mst@imath\imath
+ \let\mst@jmath\jmath
\ifmst@subdued
\MTeverymathoff
\MTresetnewmcodes
\MTnoicinmath
\MTmathoperatorsdonotobeymathxx
+ \let\inodot\mst@imath
+ \let\jnodot\mst@jmath
+ \mst@subduedminus
\else
+ \mst@nonsubduedminus
\ifx\mst@itcorr\@undefined
\def\mst@itcorr{\ifnum\fam=\m@ne\/\fi}%
\@for\mst@tmp:=it,sl\do
@@ -515,23 +521,31 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\def\mst@boldmv@operator{#2}}
\expandafter\mst@reserved\mv@bold\@nil
%%
- \edef\mst@tmp{\encodingdefault}
+ \edef\mst@tmp@enc{\encodingdefault}
\def\mst@reserved#1/#2/#3/#4/{\gdef\mst@debut{#1}\gdef\mst@reste{#2/#3/#4}}
\begingroup\escapechar\m@ne
\xdef\mst@funnyoti{\expandafter\string\csname OT1\endcsname}
\expandafter\expandafter\expandafter
\mst@reserved\expandafter\string\mst@normalmv@operator/
\endgroup
- \ifx\mst@debut\mst@funnyoti\ifx\mst@tmp\mst@oti\def\mst@tmp{T1}\fi\fi
+ \ifx\mst@debut\mst@funnyoti\ifx\mst@tmp@enc\mst@oti\def\mst@tmp@enc{T1}\fi\fi
\edef\mst@normalmv@operator{\expandafter\noexpand\csname
- \mst@tmp/\mst@reste\endcsname}
+ \if1\mst@OneifUniEnc
+ \ifx\mst@debut\mst@funnyoti T1\else\mst@debut\fi
+ \else
+ \mst@tmp@enc
+ \fi/\mst@reste\endcsname}
\begingroup\escapechar\m@ne
\expandafter\expandafter\expandafter
\mst@reserved\expandafter\string\mst@boldmv@operator/
\endgroup
- \ifx\mst@debut\mst@funnyoti\ifx\mst@tmp\mst@oti\def\mst@tmp{T1}\fi\fi
+ \ifx\mst@debut\mst@funnyoti\ifx\mst@tmp@enc\mst@oti\def\mst@tmp@enc{T1}\fi\fi
\edef\mst@boldmv@operator{\expandafter\noexpand\csname
- \mst@tmp/\mst@reste\endcsname}
+ \if1\mst@OneifUniEnc
+ \ifx\mst@debut\mst@funnyoti T1\else\mst@debut\fi
+ \else
+ \mst@tmp@enc
+ \fi/\mst@reste\endcsname}
\AtEndOfPackage{
\typeout{** ...entering subdued mode...}
\expandafter\SetSymbolFont@ \expandafter\mv@normal\mst@normalmv@letter\symmtletterfont
@@ -1075,6 +1089,9 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\MTnormalforall
\MTeverymathoff
\MTresetnewmcodes
+ \let\inodot\mst@imath
+ \let\jnodot\mst@jmath
+ \mst@subduedminus
\else
\def\mst@tmpa{bold}%
\ifx\mst@tmp\mst@tmpa
@@ -1085,9 +1102,15 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\MTnormalforall
\MTeverymathoff
\MTresetnewmcodes
+ \let\inodot\mst@imath
+ \let\jnodot\mst@jmath
+ \mst@subduedminus
\else
\mst@setalphabets
\MTcustomgreek
+ \let\inodot\mst@inodot
+ \let\jnodot\mst@jnodot
+ \mst@nonsubduedminus
\fi
\fi
\else
@@ -1275,6 +1298,7 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\ifmst@XeOrLua\mst@aborttrue
\else
\DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
+{\expandafter\the\expandafter\csname\mst@tmp@enc\string\textendash\endcsname}
\DeclareMathSymbol{\mst@varfam@minus}{\mathalpha}{mtoperatorfont}
{\expandafter\the\expandafter\csname\mst@tmp@enc\string\textendash\endcsname}
\fi
@@ -1301,22 +1325,47 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\ifmst@XeOrLua\mst@aborttrue
\else
\DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
+{\expandafter\the\expandafter\csname\mst@tmp@enc\string\textemdash\endcsname}
\DeclareMathSymbol{\mst@varfam@minus}{\mathalpha}{mtoperatorfont}
{\expandafter\the\expandafter\csname\mst@tmp@enc\string\textemdash\endcsname}
\fi
\fi\fi\fi\fi}
+\let\mst@subduedminus\empty
+\let\mst@nonsubduedminus\empty
\ifmst@nominus\else\typeout{** minus as endash}
-\mst@abortfalse
-\ifmst@endash\mst@dothe@endashstuff\else
-\ifmst@emdash\mst@dothe@emdashstuff\else
- \DeclareMathSymbol{-}{\mathbin}{\mst@font@tbu}{"2D}
- \DeclareMathSymbol{\mst@varfam@minus}{\mathalpha}{\mst@font@tbu}{"2D}
-\fi\fi
-\ifmst@abort
+ \edef\mst@tmp@enc{\encodingdefault}
+ \ifmst@XeOrLua
+ \if1\mst@OneifUniEnc\expandafter\AtBeginDocument
+ \else\expandafter\@firstofone
+ \fi
+ {\edef\mst@subduedminus
+ {\mst@Umathcodenum`\noexpand\-=\the\mst@Umathcodenum`\-\relax}}%
+ \else
+ \edef\mst@subduedminus{\mathcode`\noexpand\-=\the\mathcode`\-\relax}%
+ \fi
+ \mst@abortfalse
+ \ifmst@endash\mst@dothe@endashstuff\else
+ \ifmst@emdash\mst@dothe@emdashstuff\else
+ \if1\mst@OneifUniEnc\expandafter\AtBeginDocument
+ \else\expandafter\@firstofone
+ \fi
+ {\DeclareMathSymbol{-}{\mathbin}{\mst@font@tbu}{"2D}%
+ \DeclareMathSymbol{\mst@varfam@minus}{\mathalpha}{\mst@font@tbu}{"2D}}%
+ \fi\fi
+ \ifmst@abort
\DeclareMathSymbol{-}{\mathbin}{\mst@font@tbu}{"2D}
\DeclareMathSymbol{\mst@varfam@minus}{\mathalpha}{\mst@font@tbu}{"2D}
-\fi
-\expandafter\mst@addtodo@nonletters\string-\mathbin\mst@varfam@minus
+ \fi
+ \expandafter\mst@addtodo@nonletters\string-\mathbin\mst@varfam@minus
+ \ifmst@XeOrLua
+ \if1\mst@OneifUniEnc\expandafter\AtBeginDocument
+ \else\expandafter\@firstofone
+ \fi
+ {\edef\mst@nonsubduedminus
+ {\mst@Umathcodenum`\noexpand\-=\the\mst@Umathcodenum`\-\relax}}%
+ \else
+ \edef\mst@nonsubduedminus{\mathcode`\noexpand\-=\the\mathcode`\-\relax}%
+ \fi
\fi
%%\def\hbar{{\mathchar'26\mkern-9muh}} % (original definition from latex.ltx)
\def\mst@mathrlap{\mathpalette\mst@mathrlapinternal}
@@ -1980,13 +2029,14 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
{\expandafter\the\expandafter\csname\mst@tmp@enc\string\j\endcsname}
\fi
\fi\fi\fi\fi
-\ifmst@defaultimath\else\typeout{** \string\i\space and \string\j\space}
+\let\mst@inodot\inodot
+\let\mst@jnodot\jnodot
+\ifmst@defaultimath\else\typeout{** \string\imath\space and \string\jmath\space}
\ifmst@goahead
- \renewcommand*{\imath}{\inodot}
- \renewcommand*{\jmath}{\jnodot}
- \let\mst@oldi\i \let\mst@oldj\j
- \DeclareRobustCommand*{\i}{\ifmmode\inodot\else\mst@oldi\fi}
- \DeclareRobustCommand*{\j}{\ifmmode\jnodot\else\mst@oldj\fi}
+ \AtEndOfPackage{\AtBeginDocument{%
+ \renewcommand*{\imath}{\inodot}%
+ \renewcommand*{\jmath}{\jnodot}%
+ }}%
\fi
\fi
\edef\mst@tmp@enc{\encodingdefault} %% rather one too many than sorry