summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/mathastext
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-12-12 22:55:50 +0000
committerKarl Berry <karl@freefriends.org>2013-12-12 22:55:50 +0000
commit58e9dc36a6522eda2493956fc1afa754ad91ed75 (patch)
tree5408b6e26e90705c672f1992ebabbf50e04a4ef1 /Master/texmf-dist/source/latex/mathastext
parent56e6621537fc012c8c61abde2fe8f1ec880f0a8d (diff)
mathastext (12dec13)
git-svn-id: svn://tug.org/texlive/trunk@32394 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/mathastext')
-rw-r--r--Master/texmf-dist/source/latex/mathastext/mathastext.dtx1421
-rw-r--r--Master/texmf-dist/source/latex/mathastext/mathastext.ins77
2 files changed, 869 insertions, 629 deletions
diff --git a/Master/texmf-dist/source/latex/mathastext/mathastext.dtx b/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
index a8f508e9e99..bd1a5e510b6 100644
--- a/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
+++ b/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
@@ -1,23 +1,28 @@
-% -*- coding: iso-latin-1; -*-
+% -*- coding: iso-latin-1; time-stamp-format: "%02d-%02m-%:y %02H:%02M:%02S %Z" -*-
+% File: mathastext.dtx, package: 1.3b (2013/12/11), documentation: 2013/12/11
+% License: LaTeX Project Public License 1.3c or later.
+% Copyright (C) 2011, 2012, 2013 by Jean-Francois Burnol <jfbu at free dot fr>
+%<*dtx>
+\def\lasttimestamp{Time-stamp: <11-12-2013 23:43:37 CET>}
+%</dtx>
+%<*drv|ins>
+\def\MSTpkgdate {2013/12/11}
+\def\MSTpkgversion {1.3b}
+%</drv|ins>
% This file (mathastext.dtx) is to be processed with the pdfetex engine,
-% it does not compile under the Unicode engines lualatex or xetex.
-%<*none>
-\newif\ifUsingdvipdfmx
-%\Usingdvipdfmxtrue % uncomment this line for latex+dvipdfmx
-%</none>
-%%
-%% Package `mathastext', for LaTeX2e.
-%% Author: Jean-Francois Burnol
-%% Copyright (C) 2011, 2012, 2013 by Jean-Francois Burnol
-%%
-% Contact: jfbu (at) free.fr
+% it does not compile under the Unicode engines lualatex or xelatex.
%
-% Examples of use of mathastext:
-% http://jf.burnol.free.fr/mathastext.html
-% http://jf.burnol.free.fr/showcase.html
+%%----------------------------------------------------------------
+%% The mathastext package (version 1.3b of December 10, 2013)
+%<package>%% Use the text font in math mode (jfB)
+%% Copyright (C) 2011, 2012, 2013 by Jean-Francois Burnol
+%% Examples of use of mathastext:
+%% http://jf.burnol.free.fr/mathastext.html
+%% http://jf.burnol.free.fr/showcase.html
+%%----------------------------------------------------------------
%
-% License:
-% ========
+% License:
+% ========
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License,
@@ -28,95 +33,172 @@
% and version 1.3 or later is part of all distributions of
% LaTeX version 2003/12/01 or later.
%
-% Installation:
-% =============
+% Installation:
+% =============
%
-% Create a temporary repertory and copy `mathastext.dtx' to it.
+% * with mathastext.ins: run tex on mathastext.ins to generate the package
+% style file mathastext.sty as well as mathastext.tex and some test files.
%
-% do `latex mathastext.dtx' or `pdflatex mathastext.dtx'
+% * without mathastext.ins: run tex on mathastext.dtx to generate the package
+% style file mathastext.sty as well as mathastext.tex and some test files.
+% (and also mathastext.ins)
+%
+% Move the style file mathastext.sty to a location where TeX can find it.
+% In a TDS compliant hierarchy this will be
+% <TDS>:tex/latex/mathastext/mathastext.sty
%
-% Run thrice to get the table of contents, labels and bookmarks right.
-% Successful compilation requires package `etoc'.
+% *documentation*: run latex thrice on mathastext.tex then dvipdfmx. Or, run
+% pdflatex thrice on mathastext.dtx. In the former case the documentation is
+% with source code included, in the latter without. The file mathastext.tex
+% can be customized to change the font size or set other options therein.
%
-% The first latex run (even in the absence of `etoc') has generated
-% `mathastext.sty', `mathastext.ins' and some test files which serve to
-% illustrate various features.
+% (Note: one cannot use lualatex/xelatex to compile the documentation.)
%
-% Move `mathastext.sty' to a suitable location within the TeX installation:
-% mathastext.sty -> <TDS>/tex/latex/mathastext/
+% *test files*: mathastexttestmathversions.tex
+% mathastexttestunicodemacos.tex
+% mathastexttestunicodelinux.tex
+% mathastexttestalphabets.tex
%
-%<*none>
-\def\lasttimestamp{Time-stamp: <05-09-2013 11:03:03 CEST *>}
-%</none>
-%<*ins>
-\def\pkgname{mathastext}
-\def\pkgdate{2013/09/04}
-\def\pkgversion{1.3a}
-\def\pkgdescription{Use the text font in math mode (jfB)}
-%</ins>
-%<*none>
-\ProvidesFile{\pkgname.dtx}[source of `\pkgname' (\pkgdate, v\pkgversion)]
-%------------------------------------ EXTRACTING THE STYLE FILE AND OTHERS
+%<*dtx>
+\def\striptimestamp #1 <#2 #3 #4>{#2 at #3 #4}
+\def\getdocdate #1 <#2-#3-#4 #5>{#4/#3/#2}
+\edef\docdate{\expandafter\getdocdate\lasttimestamp}
+\edef\dtxtimestamp{\expandafter\striptimestamp\lasttimestamp}
+\chardef\noetex 0
+\expandafter\ifx\csname numexpr\endcsname\relax \chardef\noetex 1 \fi
+\ifnum\noetex=1 \chardef\extractfiles 0 % extract files, then stop
+\else
+ \expandafter\ifx\csname ProvidesFile\endcsname\relax
+ \chardef\extractfiles 0 % etex etc.. on mathastext.dtx
+ \else % latex/pdflatex on mathastext.tex or on mathastext.dtx
+ \expandafter\ifx\csname Withdvipdfmx\endcsname\relax
+ % latex run is on etoc.dtx, we will extract all files
+ \chardef\extractfiles 1 % 1 = extract all and typeset doc
+ \chardef\Withdvipdfmx 0 % 0 = pdflatex or latex+dvips
+ \chardef\NoSourceCode 1 %
+ \NeedsTeXFormat{LaTeX2e}%
+ \PassOptionsToClass{a4paper,fontsize=11pt}{scrdoc}%
+ \else % latex run is on etoc.tex,
+ \chardef\extractfiles 2 % no extractions
+ \fi
+ \ProvidesFile{mathastext.dtx}%
+ [bundle source (\MSTpkgversion, \MSTpkgdate) and documentation (\docdate)]%
+ \fi
+\fi
+\ifnum\extractfiles<2 % extract files
+\def\MessageDeFin{\newlinechar10 \let\Msg\message
+\Msg{^^J}%
+\Msg{********************************************************************^^J}%
+\Msg{*^^J}%
+\Msg{* To finish the installation you have to move the following^^J}%
+\Msg{* file into a directory searched by TeX:^^J}%
+\Msg{*^^J}%
+\Msg{*\space\space\space\space mathastext.sty^^J}%
+\Msg{*^^J}%
+\Msg{* To produce the documentation with source code included run latex^^J}%
+\Msg{* thrice on file mathastext.tex and then dvipdfmx on mathastext.dvi^^J}%
+\Msg{*^^J}%
+\Msg{* Happy TeXing!^^J}%
+\Msg{*^^J}%
+\Msg{********************************************************************^^J}%
+}%
\begingroup
\input docstrip.tex
\askforoverwritefalse
-\def\pkgpreamble{\defaultpreamble^^J\MetaPrefix^^J%
-\string\ProvidesPackage{\pkgname}^^J%
-\space[\pkgdate\space v\pkgversion\space\pkgdescription]}
\def\testfilepreamble{\string\def\string\testfileincipit{Test file
-to accompany \string\texttt{\pkgname}^^J%
-version \string\texttt{\pkgversion} of \string\texttt{\pkgdate}}}
+ to accompany \string\texttt{mathastext}^^J%
+ version \string\texttt{\MSTpkgversion} of \string\texttt{\MSTpkgdate}}}
\generate{\nopreamble
-\file{\pkgname.ins}{\from{\pkgname.dtx}{ins}}
-\usepreamble\testfilepreamble
-\file{\pkgname testmathversions.tex}{\from{\pkgname.dtx}{mathversions}}
-\file{\pkgname testmacos.tex}{\from{\pkgname.dtx}{macos}}
-\file{\pkgname testlinux.tex}{\from{\pkgname.dtx}{linux}}
-\file{\pkgname testalphabets.tex}{\from{\pkgname.dtx}{alphabets}}
-\usepreamble\pkgpreamble
-\file{\pkgname.sty}{\from{\pkgname.dtx}{package}}}
+ \file{mathastext.ins}{\from{mathastext.dtx}{ins}}
+ \file{mathastext.tex}{\from{mathastext.dtx}{drv}}
+ \usepreamble\testfilepreamble
+ \file{mathastexttestmathversions.tex}{\from{mathastext.dtx}{mathversions}}
+ \file{mathastexttestunicodemacos.tex}{\from{mathastext.dtx}{macos}}
+ \file{mathastexttestunicodelinux.tex}{\from{mathastext.dtx}{linux}}
+ \file{mathastexttestalphabets.tex}{\from{mathastext.dtx}{alphabets}}
+ \usepreamble\defaultpreamble
+ \file{mathastext.sty}{\from{mathastext.dtx}{package}}%
+}
\endgroup
-%-------------------------------------------------------------------------------
-\iffalse
-%</none>
-%<*ins>
-%------------------------------------- FILE `mathastext.ins'
+\fi % end of file extraction
+\ifnum\extractfiles=0
+% direct tex/etex/xetex/etc on mathastext.dtx, files now extracted, stop
+ \MessageDeFin\expandafter\end
+\fi
+% no use of docstrip to extract files if latex compilation was on etoc.tex
+\ifdefined\MessageDeFin\AtEndDocument{\MessageDeFin}\fi
+\catcode`\~0\catcode`\\12 % this is to fool TeX's recognition of \if...
+~iffalse % conditionals, which are used in the test files
+%</dtx>
+%<*drv>
+%---------------------------------------------------------------- mathastext.tex
+%% 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.
%%
-%% `mathastext.ins' is provided for compatibility with TeX distributions
-%% expecting to find it for installation of `mathastext.sty'.
+%% Customize as desired the class options and the two toggles below.
%%
-%% `latex mathastext.ins' produces `mathastext.sty' from the source
-%% `mathastext.dtx'; an already existing `mathastext.sty' in the same repertory
-%% will be overwritten.
-%%
-%% Move `mathastext.sty' to a suitable location within the TeX installation:
-%% mathastext.sty -> <TDS>/tex/latex/mathastext/
+%% See mathastext.dtx for the copyright and the conditions for distribution
+%% and/or modification of this work.
%%
-%% Some test files are also generated, to be processed through latex, pdflatex,
-%% lualatex or xetex.
+\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:
+%</drv>
+%-------------------------------------------------------------EOF mathastext.tex
+%<*ins>
+%---------------------------------------------------------------- mathastext.ins
+%% This is a generated file. "tex mathastext.ins" extracts mathastext.sty from
+%% mathastext.dtx as well as mathastext.tex (for typesetting the documentation),
+%% and some test files to check the package commands.
%%
-%% See the source file for the copyright and license informations.
+%% See mathastext.dtx for the copyright and the conditions for distribution
+%% and/or modification of this work.
%%
\input docstrip.tex
\askforoverwritefalse
-\def\pkgpreamble{\defaultpreamble^^J\MetaPrefix^^J%
-\string\ProvidesPackage{\pkgname}^^J%
-\space[\pkgdate\space v\pkgversion\space\pkgdescription]}
-\def\testfilepreamble{\string\def\string\testfileincipit{Test file
-to accompany \string\texttt{\pkgname}^^J%
-version \string\texttt{\pkgversion} of \string\texttt{\pkgdate.}}}
-\generate{\usepreamble\testfilepreamble
-\file{\pkgname testmathversions.tex}{\from{\pkgname.dtx}{mathversions}}
-\file{\pkgname testmacos.tex}{\from{\pkgname.dtx}{macos}}
-\file{\pkgname testlinux.tex}{\from{\pkgname.dtx}{linux}}
-\file{\pkgname testalphabets.tex}{\from{\pkgname.dtx}{alphabets}}
-\usepreamble\pkgpreamble
-\file{\pkgname.sty}{\from{\pkgname.dtx}{package}}}
+\def\testfilepreamble{%
+ \string\def\string\testfileincipit{Test file
+ to accompany \string\texttt{mathastext}^^J%
+ version \string\texttt{\MSTpkgversion} of \string\texttt{\MSTpkgdate}}}
+\generate{\nopreamble
+ \file{mathastext.tex}{\from{mathastext.dtx}{drv}}
+\usepreamble\testfilepreamble
+ \file{mathastexttestmathversions.tex}{\from{mathastext.dtx}{mathversions}}
+ \file{mathastexttestunicodemacos.tex}{\from{mathastext.dtx}{macos}}
+ \file{mathastexttestunicodelinux.tex}{\from{mathastext.dtx}{linux}}
+ \file{mathastexttestalphabets.tex}{\from{mathastext.dtx}{alphabets}}
+\usepreamble\defaultpreamble
+ \file{mathastext.sty}{\from{mathastext.dtx}{package}}%
+}
+\catcode32=13\relax% active space
+\let =\space%
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* mathastext.sty}
+\Msg{*}
+\Msg{* To produce the documentation run latex thrice on file mathastext.tex}
+\Msg{* and then run dvipdfmx on file mathastext.dvi}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
\endbatchfile
-%------------------------------------- END OF FILE `mathastext.ins'
%</ins>
+%------------------------------------------------------------ EOF mathastext.ins
%<*mathversions>
-%------------------------------------- FILE `mathastexttestversions.tex'
+%---------------------------------------------------- mathastexttestversions.tex
%% This file `mathastexttestversions.tex' is for testing the enhanced
%% concept of math versions provided by the package `mathastext'.
%%
@@ -144,12 +226,12 @@ 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}
-%------------------------------------- END OF FILE `mathastexttestversions.tex'
+%-------------------------------------------------EOF mathastexttestversions.tex
%</mathversions>
%<*macos>
-%------------------------------------- FILE `mathastexttestmacos.tex'
-%% This file `mathastexttestmacos.tex' is for testing the use of the package
-%% `mathastext' with the unicode engines XeTeX or LuaLaTeX.
+%------------------------------------------------ mathastexttestunicodemacos.tex
+%% 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 (10.8.2).
%%
@@ -162,6 +244,15 @@ $math\ in\ AvantGarde$.
\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]
@@ -226,12 +317,12 @@ such a difference between the two engines.
\TEST{Didot}\TEST{Comic}\TEST{normal}\TEST{Herculanum}
\TEST{Hoefler}\TEST{Typewriter}\TEST{bold}\TEST{Times}
\end{document}
-%------------------------------------- END OF FILE `mathastexttestmacos.tex'
+%---------------------------------------------EOF mathastexttestunicodemacos.tex
%</macos>
%<*linux>
-%------------------------------------- FILE `mathastexttestlinux.tex'
-%% This file `mathastexttestlinux.tex' is for testing the use of the package
-%% `mathastext' with the unicode engines XeTeX or LuaLaTeX.
+%------------------------------------------------ mathastexttestunicodelinux.tex
+%% This file `mathastexttestunicodelinux.tex' is for testing the use
+%% of the package `mathastext' with the unicode engines XeTeX or LuaLaTeX.
%%
%% Fonts available on a Linux machine are used.
%%
@@ -243,6 +334,16 @@ such a difference between the two engines.
\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]
@@ -305,15 +406,10 @@ Some among the fonts tested have no bold variant or no italic variant.
\TEST{Arial}\TEST{Chancery}\TEST{Liberation}
\TEST{bold}\TEST{normal}\TEST{Times}
\end{document}
-%------------------------------------- END OF FILE `mathastextlinux.tex'
+%---------------------------------------------EOF mathastexttestunicodelinux.tex
%</linux>
-%<*none>
-\fi
-\catcode`\~0\catcode`\\12 % this is to fool TeX's recognition of \if...
-~iffalse % conditionals, which are used in the next sub-file
-%</none>
%<*alphabets>
-%------------------------------------- FILE `mathastexttestalphabets.tex'
+%--------------------------------------------------- mathastexttestalphabets.tex
%% This file `mathastexttestalphabets.tex' is for testing the extended
%% scope of the math alphabet commands with package `mathastext', via
%% the package command \MTnonlettersobeymathxx.
@@ -332,6 +428,8 @@ Some among the fonts tested have no bold variant or no italic variant.
%% *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,
@@ -344,6 +442,8 @@ Some among the fonts tested have no bold variant or no italic variant.
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}
@@ -370,7 +470,6 @@ Some among the fonts tested have no bold variant or no italic variant.
extended scope of the math alphabets and added italic corrections\par
\end{center}
-
The package makes
${!}\,{?}\,{,}\,{:}\,{;}\,{+}\,{-}\,{=}\,{(}\,{)}\,{[}\,{]}\,{<}\,{>}\,{\{}\,{\}}$,
the asterisk $*$, and $.\,/\,\vert\,\backslash\,{\#}\,{\$}\,{\%}\,{\&}$ obey the
@@ -418,7 +517,6 @@ 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
@@ -469,7 +567,6 @@ $\ref{eq(5}$, $\ref{eq)6}$, and $\ref{eq=7}$.
\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
@@ -488,18 +585,14 @@ 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|.
+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|$((($|: $((($
@@ -508,22 +601,20 @@ 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{}.}
+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:
@@ -563,29 +654,44 @@ $\mathnormal{ff}$, $\mathrm{ff}$, $\mathit{ff}$, $\mathbf{ff}$, $\mathtt{ff}$
\end{tabular}}
\end{document}
-%------------------------------------- END OF FILE `mathastexttestalphabets.tex'
+%------------------------------------------------EOF mathastexttestalphabets.tex
%</alphabets>
-%<*none>
-~fi
+%<*dtx>
+~fi % end of \iffalse block
~catcode`~\0
\catcode`\~\active
-\documentclass[a4paper,fontsize=11pt,abstract]{scrdoc}
-%\OnlyDescription
-
+%-------------------------------------------------------------------------------
+% customization should be done in mathastext.tex, not here.
+\documentclass[abstract]{scrdoc}
+\ifnum\NoSourceCode=1 \OnlyDescription\fi
\makeatletter
-\ifUsingdvipdfmx
- \@for\@tempa:=graphicx,color,hyperref\do{%
- \PassOptionsToPackage{dvipdfmx}\@tempa}
- \PassOptionsToPackage{dvipdfm}{geometry}
+\ifnum\Withdvipdfmx=1
+ \@for\@tempa:=hyperref,bookmark,graphicx,color\do
+ {\PassOptionsToPackage{dvipdfmx}\@tempa}
+ %
+ \PassOptionsToPackage{dvipdfm}{geometry}
+ \PassOptionsToPackage{bookmarks=true}{hyperref}
+ \PassOptionsToPackage{dvipdfmx-outline-open}{hyperref}
+ \PassOptionsToPackage{dvipdfmx-outline-open}{bookmark}
+ %
+ \def\pgfsysdriver{pgfsys-dvipdfm.def}
+\else
+ \PassOptionsToPackage{bookmarks=true}{hyperref}
\fi
\makeatother
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
+\usepackage{amsmath}\allowdisplaybreaks
\usepackage{lmodern}
\usepackage{enumitem}
-% in order to cancel the stripping done by ltxdoc
+\DeclareSymbolFont{largesymbols}{OMX}{txex}{m}{n}
+\SetSymbolFont{largesymbols}{bold}{OMX}{txex}{bx}{n}
+\DeclareFontSubstitution{OMX}{txex}{m}{n}
+
+
+% in order to cancel the removal done by ltxdoc
% of comment characters inside verbatim blocks.
\makeatletter\let\check@percent\relax\makeatother
@@ -596,15 +702,9 @@ $\mathnormal{ff}$, $\mathrm{ff}$, $\mathit{ff}$, $\mathbf{ff}$, $\mathtt{ff}$
\usepackage{metalogo}
\usepackage{framed}
-\usepackage{amsmath}\allowdisplaybreaks
-
\usepackage[hscale=0.66]{geometry}
-\usepackage[%
-pdfencoding=pdfdoc,%
-bookmarks=true,%
-%bookmarksopen=true,%dvipdfmx-outline-open,%
-]{hyperref}
+\usepackage[pdfencoding=pdfdoc]{hyperref}
\hypersetup{linktoc=all,%
%hidelinks,%
@@ -620,6 +720,8 @@ pdfstartview=FitH,%
pdfpagemode=UseOutlines,%
}
+\usepackage{bookmark}
+
% ---- \centeredeline: OUR OWN LITTLE MACRO FOR CENTERING LINES (fait
% initialement pour la documentation de mes autres paquetages etoc et xint)
@@ -648,22 +750,12 @@ pdfpagemode=UseOutlines,%
\DeclareRobustCommand\cs[1]%
{{\ttfamily\hyphenchar\font45\char`\\#1}}
-% \DeclareRobustCommand\csb[1]%
-% {{\color{blue}\ttfamily\hyphenchar\font45\char`\\#1}}
\DeclareRobustCommand\csb[1]%
{\hyperref[#1]{\ttfamily\char`\\#1}}
\newcommand*\blueit[1]{\texorpdfstring{\blueitaux #1\relax}{#1}}
\def\blueitaux #1#2\relax{\hyperref[#2]{\ttfamily #1#2}}
-
-% ancien:
-%\catcode`\§=13
-% \newif\iftoggled
-% \def§{\iftoggled\endgroup\toggledfalse\xspace\else
-% \toggledtrue\begingroup\color{blue}\ttfamily\expandafter\string\fi}
-
-
% 2 septembre 2013, 22:25
% je réussis avec un minimum de modifs dans la source à convertir tous mes
% mots-clés bleux en hyperliens; les labels sont créés simplement en modifiant
@@ -694,10 +786,15 @@ LGRgreek]{mathastext}
\MTDeclareVersion[n]{lmvtt}{T1}{lmvtt}{m}{n}
\MTlettershape{\itdefault}
+
\usepackage{newcent}
\Mathastext[newcent]
+\MTseries{b}
+\Mathastext[boldnewcent][bold]
-\MTitgreek\MTupGreek\MTgreekfont{txr}
+\MTseries{m}
+\MTitgreek\MTupGreek
+\MTgreekfont{txr}
\usepackage{times}
\Mathastext[times]
@@ -711,20 +808,21 @@ LGRgreek]{mathastext}
\begin{document}
\MTversion{normal}
\renewcommand\familydefault\sfdefault
+\pdfbookmark[1]{Title page}{TOP}
\frenchspacing
\begin{center}
-\def\striptimestamp#1 <#2 #3 #4 #5>{#2 at #3 #4}
-\edef\dtxtimestamp{\expandafter\striptimestamp\lasttimestamp}
{\normalfont\LARGE The \mst package}\\
\textsc{\small Jean-François Burnol}\par
\footnotesize \ttfamily
- jfbu (at) free (dot) fr\\
- Version \pkgversion{} of \pkgdate\footnote{Documentation
- generated \ifUsingdvipdfmx(via |latex+dvipdfmx|) \fi from the
- source file with timestamp ``\dtxtimestamp''.}
+ jfbu (at) free (dot) fr\par
+ \let\thefootnote\empty
+ Package version: \MSTpkgversion\ (\MSTpkgdate)%
+ \footnote{Documentation generated from the
+ source file with timestamp ``\dtxtimestamp''.}\par
\end{center}
+\setcounter{footnote}{0}
\begin{small}
@@ -773,12 +871,17 @@ LGRgreek]{mathastext}
\clearpage
\etoctoclines
-\renewcommand\etocaftertitlehook{\hypersetup{hidelinks}% added 1.3
+\renewcommand\etocaftertitlehook
+ {\hypersetup{hidelinks}% added 1.3
\setlength{\columnseprule}{.4pt}%
- \renewcommand{\columnseprulecolor}{\color{DarkMagenta}}}
+ \renewcommand{\columnseprulecolor}{\color{DarkMagenta}}%
+ }
\renewcommand\etocbelowtocskip{1ex}
-\etocruledstyle{\color{DarkMagenta}\normalfont\large\bfseries\contentsname}
-
+\etocruledstyle{\color{DarkMagenta}\normalfont\large\bfseries\contentsname }
+% pdfbookmark added 2013/12/11. Attention si je le mets dans ruled style
+% il est exécuté deux fois et ça cause un problème.
+% et le aftertitlehook est trop bas.
+\pdfbookmark[1]{Table of contents}{MAINTOC}
\tableofcontents
{\color{DarkMagenta}\hrule}%
\vskip 5ex plus 2ex minus 1ex
@@ -788,8 +891,22 @@ LGRgreek]{mathastext}
\subsection{Recent changes}
-This is the documentation for version \texttt{\pkgversion} of \pkgdate.
+This is the documentation for version \texttt{\MSTpkgversion} of
+\texttt{\MSTpkgdate}.
+
+Changes for this release:
+\begin{enumerate}[noitemsep]
+\item §\Mathastext§ and §\MTDeclareVersion§ both accept a final optional
+ argument, a math version name whose settings regarding things not otherwise
+ changed by \mst (like most symbols and large symbols) will be inherited by
+ the declared math version (first optional argument of §\Mathastext§ or
+ first mandatory argument of §\MTDeclareVersion§).
+ Typical use will be with this final optional argument set to be |[bold]|.
+\item in case of option §symbolmisc§: |\defaultprod| and |\defaultsum| have
+ been renamed to, respectively, |\MToriginalprod| and |\MToriginalsum|.
+\end{enumerate}
+Changes for release |1.3a| of |2013/09/04|:
\begin{enumerate}[noitemsep]
\item (see \autoref{sec:mathskips}) new command §\MTsetmathskips§ allows to
specify, on a letter by letter
@@ -844,29 +961,35 @@ Earlier, version |1.15| introduced the concept of the
}
\subsection{Installation}
+\begin{verbatim}
+Obtain mathastext.dtx, the README and optionally mathastext.ins and
+mathastext.tex from CTAN: http://ctan.org/pkg/mathastext
+
+* with mathastext.ins: run tex on mathastext.ins to generate the package
+style file mathastext.sty as well as mathastext.tex and some test files.
+
+* without mathastext.ins: run tex on mathastext.dtx to generate the package
+style file mathastext.sty as well as mathastext.tex and some test files.
+(and also mathastext.ins)
+
+ Move the style file mathastext.sty to a location where TeX can find it.
+ In a TDS compliant hierarchy this will be
+ <TDS>:tex/latex/mathastext/mathastext.sty
-If you did not download this file from the internet chances are that
-\mst is already in your \TeX{} installation and that you are reading
-this documentation after having done something like |texdoc mathastext|.
-Still, read the following which explains how to produce some test files
-illustrating package features.
-
-Download from the internet (from CTAN or from the package home page)
-|mathastext.dtx| (or copy the file already installed on your system,
-assuming it is up-to-date), put it in a temporary repertory and do
-|latex| (or |pdflatex|) on it. The compilation will not succeed if your
-installation is missing package |etoc| but even then it will have
-generated the package file |mathastext.sty|. You may then (if installing
-manually the package) move this
-up-to-date |mathastext.sty| to the appropriate location within your
-\TeX{} installation (\emph{i.e} to a repertory with name |mathastext|
-inside a repertory |latex| inside a repertory |tex| inside ...).
-
-This |latex| run generated also a number of test files. They are
-provided to illustrate some features of the package. You can then run
-|latex|, |pdflatex|, |lualatex| or |xelatex| on them. Some test files
-are to be used only with \XeTeX{} and \LuaTeX{}, as they use Unicode
-fonts.
+*documentation*: run latex thrice on mathastext.tex then dvipdfmx. Or, run
+pdflatex thrice on mathastext.dtx. In the former case the documentation is
+with source code included, in the latter without. The file mathastext.tex
+can be customized to change the font size or set other options therein.
+
+ (Note: one cannot use lualatex/xelatex to compile the documentation.)
+
+*test files*: mathastexttestmathversions.tex
+ mathastexttestunicodemacos.tex
+ mathastexttestunicodelinux.tex
+ mathastexttestalphabets.tex
+\end{verbatim}
+
+% \clearpage
\section{What \mst does}
@@ -1075,7 +1198,7 @@ done optionally:
\end{itemize}
Nothing is changed to the ``large'' math symbols, except for
-$\defaultprod$ and $\defaultsum$ in inline math which, like here:
+$\MToriginalprod$ and $\MToriginalsum$ in inline math which, like here:
$\prod\sum$, will be taken from the Symbol Font if option §symbolmisc§
was used.
@@ -1157,7 +1280,7 @@ Nevertheless, soon after I posted the initial version
of the package to CTAN, I was overwhelmed by
numerous\footnote{this means ``more then one.''}
questions\footnote{I thank in particular
-Tariq~\textsc{Perwez} and Kevin~\textsc{Klement} for
+\textsc{Tariq~Perwez} and \textsc{Kevin~Klement} for
their kind remarks (chronological order).} on how to
have the letters be in italic shape.
@@ -2392,27 +2515,69 @@ correctly.
\subsection{Commands}
+\newsavebox\boite
+
\subsubsection{Preamble-only commands}
These commands mainly facilitate the definition of math versions, in a \mst
-extended sense. It is thus not necessary to use them to activate the package
-basic functionalities, loading \mst is enough.
+extended sense. It is not necessary to use them to activate the package
+basic functionalities, as loading \mst is enough (except with the |subdued|
+option).
\begin{enumerate}[label=$\bullet$]
-\item §\Mathastext§ (or §\mathastext§): reinitializes \mst according to the
- current defaults of encoding, family, series and shape.\footnote{updates also
- the font and shapes for the Greek letters (|LGRgreek| option), and the skips
- to be inserted after the symbols $\oldforall$ and $\oldexists$, see
- \emph{infra.}}
+\item §\Mathastext§ (or §\mathastext§) reinitializes \mst: it sets the
+ fonts used in math mode (in versions |normal| and |bold|) for letters,
+ digits and a few ascii symbols to the \emph{current} defaults of encoding,
+ family, series and shape.\footnote{\texttt{\char92Mathastext} updates also
+ the font and shapes for the Greek letters (|LGRgreek| option), and the
+ skips to be inserted after the symbols $\oldforall$ and $\oldexists$,
+ see \emph{infra.}} Both the normal and bold math version are modified by
+ this action of §\Mathastext§.
\begin{enumerate}[label=$\bullet$]
- \item It can also be preceded optionally by one or
+ \item \textbf{math versions:}
+ \csb{Mathastext} accepts an optional argument \oarg{name}. With
+ this (within square brackets) argument, rather than redefining the
+ fonts for math mode, §\Mathastext§ declares a new \emph{math version}, and
+ it is this
+ math version which will use the then current text font in math
+ mode.\footnote{The allowed version names are as for
+ the \LaTeX{} \cs{DeclareMathVersion} macro. \textbf{Do not use
+ ``normal'' or ``bold'';} this is already taken care of by the
+ initial loading of the package or a later command \cs{Mathastext}
+ without any optional argument.}
+ \item \textbf{inheritance:} starting with version |1.3b| a second optional
+ argument \oarg{other\_version} will transfer its set-up for things not
+ affected by \mst action, like large symbols, to the declared math
+ version whose name was given as first optional argument. The main use
+ will be with |[bold]| in order for the symbols and large symbols to be
+ typeset as in the |bold| math version. For example, this document has in
+ its preamble:\hfill\break\begingroup\small
+ \begin{lrbox}{\boite}|\usepackage{newcent}% this package makes New Century the roman font|\end{lrbox}\rlap{\usebox{\boite}}\hfill\break
+ |\Mathastext[newcent]% this math version will use New Century|\hfill\break
+ |\MTseries{b} % next \Mathastext will use a bold font|\hfill\break
+ \begin{lrbox}{\boite}|\Mathastext[boldnewcent][bold]% large symbols, etc, will be bold too|\end{lrbox}\rlap{\usebox{\boite}}\hfill\break\endgroup
+ We can check that it does work:
+ \centeredline{|\MTversion{newcent}:|\MTversion{newcent}
+ $abcde\displaystyle\ointop\bigvee\biguplus\bigotimes\bigoplus$}
+ \centeredline{|\MTversion{boldnewcent}:|\MTversion{boldnewcent}
+ $abcde\displaystyle\ointop\bigvee\biguplus\bigotimes\bigoplus$}
+ Naturally, for this one needs an initial math font setup with some nice
+ bold fonts also for large symbols. This is the case with the excellent
+ |txfonts| package of \textsc{Young~Ryu}. As the present document must
+ use many fonts and declares many math alphabets, we did not load the full
+ package and fonts but only the |largesymbols|:\hfill\break
+ |\DeclareSymbolFont{largesymbols}{OMX}{txex}{m}{n}|\hfill\break
+ |\SetSymbolFont{largesymbols}{bold}{OMX}{txex}{bx}{n}|\hfill\break
+ |\DeclareFontSubstitution{OMX}{txex}{m}{n}|
+ \end{enumerate}
+
+ \item §\Mathastext§ may be preceded optionally by one or
more of\footnote{these commands exist also with
long names: \texttt{\char92Mathastextencoding},
etc\dots{} The same applies to the other commands
mentioned in this section.}
- §\MTencoding§\marg{enc},
+ §\MTencoding§\marg{enc},
§\MTfamily§\marg{fam},
§\MTseries§\marg{ser},
- §\MTshape§\marg{sh}, and, new with version
- |1.1|, §\MTlettershape§\marg{sh}. For
+ §\MTshape§\marg{sh}, and §\MTlettershape§\marg{sh}. For
example valid values are, respectively, \meta{T1},
\meta{phv}, \meta{m}, \meta{n}, and \meta{it}: this
is the Helvetica font in T1-encoding, regular
@@ -2420,39 +2585,27 @@ basic functionalities, loading \mst is enough.
will be in italic shape. Once used their effect applies to all
succeeding calls to \cs{Mathastext}, and can only be undone by using
them again.
- \item \textbf{math versions:} starting with version |1.12| \csb{Mathastext}
- accepts an optional argument \oarg{version\_name}, which will serve as a
- name to designate the corresponding math version (without optional argument
- \cs{Mathastext} redefines the default normal and bold versions.) This
- argument, being optional, must be enclosed within square
- brackets.\footnote{The allowed version names are as for the \LaTeX{}
- \cs{DeclareMathVersion} macro. Do not use ``normal'' or ``bold''; this is
- already taken care of by the initial loading of the package or a later
- command \cs{Mathastext} without any optional argument.}
- \end{enumerate}
\item
- §\MTWillUse§\oarg{ltsh}\marg{enc}\marg{fam}\marg{ser}\marg{sh}:
+ §\MTWillUse§\oarg{ltsh}\marg{enc}\marg{fam}\marg{ser}\marg{sh}
tells \mst to use the font with the
specified encoding, family, series, and shape for
the letters and digits (and all other afflicted
characters) in math mode. The optional argument
\meta{ltsh} specifies a shape for the letters, for
example \cs{itdefault}, or directly \meta{it} or
- \meta{sc}.
+ \meta{sc}.
-\item
- §\MTDeclareVersion§\oarg{ltsh}\marg{name}\marg{enc}\marg{fam}\marg{ser}\marg{sh}:
+\item §\MTDeclareVersion§\oarg{ltsh}\marg{name}\marg{enc}\marg{fam}\marg{ser}\marg{sh}\oarg{other\_version}:
declares that the document will have access to the font
with the specified characteristics, under the math version name
- \meta{name}. For
- example:
+ \meta{name}. For example:
\centeredline{|\MTDeclareVersion[sc]{palatino}{T1}{ppl}{b}{sl}|}
declares under the name |palatino| a version where
mathematics will be typeset using the Palatino font in
T1-encoding, bold, slanted, and the letters will in fact be
in caps and small caps (and bold).\footnote{I do not
- especially recommend to use this in real life!} When the
+ especially recommend to use this in real life!} When the initial
optional argument is absent, and \mst was loaded
with the \blueit{italic} option, then the default letter shape
will be |it|,\footnote{more precisely, the shape is the
@@ -2460,8 +2613,15 @@ basic functionalities, loading \mst is enough.
commands to specify the shape of letters, or the \cs{itdefault}
of the time of loading the package.} else letters will
have the same shape as used for digits and operator-names.
+
+ Another optional argument may be used as last argument. Similarly as its
+ use with §\Mathastext§ this makes the declared math version inherit, for
+ things not modified by \mst like large symbols the font set up of the math
+ version whose name was passed as optional argument (typical use will be
+ with |[bold]|).
+
\item §\MTboldvariant§\marg{var}: when used before §\Mathastext§,
-specifies which bold
+ specifies which bold
(|b|, |sb|, |bx|, \dots) to be used by \cs{mathbf} (and
\cs{boldmath}). Default is the \cs{bfdefault} at the time of
loading \mst. When used before the declaration
@@ -2753,18 +2913,15 @@ all the glyphs of the Euler font, if option |eulergreek| (or
(or no) the original (larger) \cs{infty} $\infty$ and \cs{propto} $\propto$.
Regarding the \cs{prod} and \cs{sum} commands: they will use the Symbol
- glyphs $\prod\sum$ in inline math, and in display
- math
- the Computer Modern ones (or whatever is set up by other
- packages) : \[\prod\sum\] The package provides \cs{prodpsy} and
- \cs{sumpsy}: if one really wants in all situations the Symbol glyphs,
- one can do \cs{let}\cs{prod}\cs{prodpsy} and
- \cs{let}\cs{sum}\cs{sumpsy}. Also \cs{defaultprod} and \cs{defaultsum}
+ glyphs $\prod\sum$ in inline math, and in display math the Computer Modern
+ ones (or whatever is set up by other packages) : \[\prod\sum\] The package
+ provides \cs{prodpsy} and \cs{sumpsy}: if one really wants in all
+ situations the Symbol glyphs, one can do \cs{let}\cs{prod}\cs{prodpsy} and
+ \cs{let}\cs{sum}\cs{sumpsy}. Also \cs{MToriginalprod} and \cs{MToriginalsum}
will refer to the \cs{prod} and \cs{sum} before redefinition by the
- package: this is to allow constructs such as
- |$\displaystyle\defaultprod$| or
- |\[\textstyle\defaultprod\]|, because they would not work
- with the \cs{prod} and \cs{sum} as re-defined by the package.
+ package: this is to allow constructs such as |$\displaystyle\MToriginalprod$|
+ or |\[\textstyle\MToriginalprod\]|, because they would not work with the
+ \cs{prod} and \cs{sum} as re-defined by the package.
\end{enumerate}
\subsection{Complete list of options}
@@ -2886,7 +3043,7 @@ Numerous examples will be found there:\\
\catcode`\§=12
-% \clearpage
+\clearpage
\section{Change log}
\begingroup
@@ -2917,6 +3074,24 @@ Numerous examples will be found there:\\
\begin{multicols}{2}
\begin{verbatim}
+1.3b [2013/12/11]
+
+ * 1.2d code for \#, \$, \%, and \& modified erroneously the earlier correct
+1.2c code and created a bug showing up with more than 16 math families (a
+possibility only with lualatex or xelatex).
+
+ * added second optional version name argument to \Mathastext and to
+\MTDeclareVersion, to transfer settings for things not otherwise changed by
+mathastext from a math version to the one declared. This is mainly for
+symbols and large symbols to be boldened also when a bold text font is a
+mathastextified in a mathastext-declared version.
+
+ * renamed \defaultprod to \MToriginalprod, \defaultsum to \MToriginalsum,
+(this is in case of option symbolmisc).
+
+ * changes to the dtx organization; options for generating the documentation
+can be customized in generated mathastext.tex file.
+
1.3a [2013/09/04]
* the somewhat silly \string's are removed from the \MTsetmathskips command
@@ -3197,46 +3372,41 @@ encodings, Unicode inclusive.
\endgroup
+\ifnum\NoSourceCode=1
+\bigskip
+\begin{framed}
+\def\givesomestretch{%
+\fontdimen2\font=0.33333\fontdimen6\font
+\fontdimen3\font=0.16666\fontdimen6\font
+\fontdimen4\font=0.11111\fontdimen6\font
+}%
+ \ttfamily\small\givesomestretch\hyphenchar\font45 This documentation
+ has been compiled without the source code. To produce the
+ documentation with the source code included, run "tex mathastext.dtx" to
+ generate mathastext.tex (if not already available), then thrice latex on
+ mathastext.tex and finally dvipdfmx on mathastext.dvi.
+\end{framed}
+\fi
\makeatletter
-\StopEventually{\check@checksum\end{document}}
+\StopEventually{\end{document}\endinput}
\makeatother
\newgeometry{hmarginratio=3:2}
\small
\section{Implementation}
-
-\makeatletter
-\begingroup
-\topsep\MacrocodeTopsep
-\trivlist\parskip\z@\item[]
-\macro@font
-\leftskip\@totalleftmargin \advance\leftskip\MacroIndent
-\rightskip\z@ \parindent\z@ \parfillskip\@flushglue
-\global\@newlistfalse \global\@minipagefalse
-\ifcodeline@index
- \everypar{\global\advance\c@CodelineNo\@ne
- \llap{\theCodelineNo\ \hskip\@totalleftmargin}}%
-\fi
-\string\ProvidesPackage\string{\pkgname\string}\par
-\noindent\space [\pkgdate\space v\pkgversion\space\pkgdescription]\par
-\nointerlineskip
-\global\@inlabelfalse
-\endtrivlist
-\endgroup
-\makeatother
% The catcode hackery next is to avoid to have <*package> to be listed
% in the commented source code...
% (c) 2012/11/19 jf burnol ;-)
\MakePercentIgnore
%
% \catcode`\<=0 \catcode`\>=11 \catcode`\*=11 \catcode`\/=11
-% \let</none>\relax
+% \let</dtx>\relax
% \def<*package>{\catcode`\<=12 \catcode`\>=12 \catcode`\*=12 \catcode`\/=12}
%
-%</none>
+%</dtx>
%<*package>
% The usual catcode regime for letters and digits is assumed and some characters
% such as *, `, ", = are supposed to be of catcode other at the time of loading
@@ -3253,6 +3423,8 @@ encodings, Unicode inclusive.
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage {mathastext}
+ [2013/12/11 v1.3b Use the text font in math mode (jfB)]
% \end{macrocode}
% Testing for XeTeX and LuaLaTeX. I should load some package for this code which
% I copied somewhere (perhaps from the |iftex| package? or some post on
@@ -3281,7 +3453,6 @@ encodings, Unicode inclusive.
\def\mst@eui{EU1}\def\mst@euii{EU2}
\newif\ifmst@goahead
\newif\ifmst@abort
-\newif\ifmst@optionalparam
% \end{macrocode}
% \begin{macro}{\mst@enc}
% \begin{macro}{\mst@fam}
@@ -4426,12 +4597,6 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\ifmst@italic\else\def\mst@ltsh{#1}\fi}
\newcommand*\MTboldvariant[1]{\def\mst@bold{#1}}
\newcommand*\MTlettershape[1]{\def\mst@ltsh{#1}}
-\@onlypreamble\MTencoding
-\@onlypreamble\MTfamily
-\@onlypreamble\MTseries
-\@onlypreamble\MTshape
-\@onlypreamble\MTboldvariant
-\@onlypreamble\MTlettershape
\let\Mathastextencoding\MTencoding
\let\Mathastextfamily\MTfamily
\let\Mathastextseries\MTseries
@@ -4462,17 +4627,22 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\mst@upgreektrue\mst@itgreekfalse\def\mst@greek@select{0}}
\newcommand*\MTitGreek{\def\mst@greek@select{1}}
\newcommand*\MTupGreek{\def\mst@greek@select{2}}
-\@onlypreamble\MTitgreek
-\@onlypreamble\MTupgreek
-\@onlypreamble\MTitGreek
-\@onlypreamble\MTitGreek
\let\Mathastextitgreek\MTitgreek
\let\Mathastextupgreek\MTupgreek
\let\MathastextitGreek\MTitGreek
\let\MathastextupGreek\MTupGreek
+\@onlypreamble\MTitgreek
+\@onlypreamble\MTupgreek
+\@onlypreamble\MTitGreek
+\@onlypreamble\MTitGreek
+\@onlypreamble\Mathastextitgreek
+\@onlypreamble\Mathastextupgreek
+\@onlypreamble\MathastextitGreek
+\@onlypreamble\MathastextitGreek
\newcommand*\MTgreekfont[1]{\def\mst@greekfont{#1}}
-\@onlypreamble\MTgreekfont
\let\Mathastextgreekfont\MTgreekfont
+\@onlypreamble\MTgreekfont
+\@onlypreamble\Mathastextgreekfont
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -4484,22 +4654,20 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
% latest one counts. Sets up the math fonts in the normal and bold
% versions, as does \cs{Mathastext}.
% \begin{macrocode}
-\newcommand*\MTWillUse[5][\empty]{
+\newcommand*\MTWillUse[5][]{
\MTencoding{#2}
\MTfamily{#3}
\MTseries{#4}
\MTshape{#5}
\ifmst@italic\MTlettershape{\itdefault}\fi % was missing in v 1.14 and prior
- \ifx\empty#1
- \else
-%% we check if optional argument was [], this does not detect [ ]
- \def\mst@tmp{#1}
- \ifx\empty\mst@tmp\else\MTlettershape{#1}\fi
- \fi
+ \edef\mst@tmp{#1}
+ \ifx\mst@tmp\empty\else\MTlettershape{#1}\fi
\Mathastext}
-\@onlypreamble\MTWillUse
\let\MathastextWillUse\MTWillUse
\let\Mathastextwilluse\MTWillUse
+\@onlypreamble\MTWillUse
+\@onlypreamble\MathastextWillUse
+\@onlypreamble\Mathastextwilluse
% \end{macrocode}
% \end{macro}
% \begin{macro}{\Mathastext}
@@ -4516,37 +4684,51 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
% \cs{Mathastext} act as the declaration of a math
% version, to be later used in the document.
%
-% Versions |1.15x| brought some adaptations related to the subdued option.
+% Versions |1.15x| brought some adaptations related to the subdued
+% option.
+%
+% |1.3b| adds a second optional parameter to inherit previous settings
+% from another version; mostly done to inherit the bold version fonts for
+% symbols and large symbols. This is done in |\MTDeclareVersion|.
% \begin{macrocode}
-\newcommand*\Mathastext[1][\empty]{
-\ifx\empty#1 % no optional argument
+\def\Mathastext {\@ifnextchar [\Mathastext@declare\Mathastext@ }
+\def\Mathastext@declare [#1]{%
+ \edef\mst@tmp{#1}%
+ \ifx\mst@tmp\empty
+ \expandafter\@firstoftwo
+ \else\expandafter\@secondoftwo
+ \fi
+ \Mathastext@
+ {\MTDeclareVersion[\mst@ltsh]{#1}{\mst@enc}{\mst@fam}{\mst@ser}{\mst@opsh}}%
+}
+\def\Mathastext@ {%
\mst@update@greeksh
- \edef\mst@encoding@normal{\mst@enc}
- \edef\mst@family@normal{\mst@fam}
- \edef\mst@series@normal{\mst@ser}
- \edef\mst@shape@normal{\mst@opsh}
- \edef\mst@ltshape@normal{\mst@ltsh}
- \edef\mst@itdefault@normal{\itdefault}
- \edef\mst@rmdefault@normal{\rmdefault}
- \edef\mst@sfdefault@normal{\sfdefault}
- \edef\mst@ttdefault@normal{\ttdefault}
- \edef\mst@boldvariant@normal{\mst@bold}
- \edef\mst@exists@skip@normal{\mst@exists@skip}
- \edef\mst@forall@skip@normal{\mst@forall@skip}
- \edef\mst@prime@skip@normal{\mst@prime@skip}
- \edef\mst@encoding@bold{\mst@enc}
- \edef\mst@family@bold{\mst@fam}
- \edef\mst@series@bold{\mst@bold}
- \edef\mst@shape@bold{\mst@opsh}
- \edef\mst@ltshape@bold{\mst@ltsh}
- \edef\mst@boldvariant@bold{\mst@bold}
- \edef\mst@itdefault@bold{\itdefault}
- \edef\mst@rmdefault@bold{\rmdefault}
- \edef\mst@sfdefault@bold{\sfdefault}
- \edef\mst@ttdefault@bold{\ttdefault}
- \edef\mst@exists@skip@bold{\mst@exists@skip}
- \edef\mst@forall@skip@bold{\mst@forall@skip}
- \edef\mst@prime@skip@bold{\mst@prime@skip}
+ \edef\mst@encoding@normal{\mst@enc}%
+ \edef\mst@family@normal{\mst@fam}%
+ \edef\mst@series@normal{\mst@ser}%
+ \edef\mst@shape@normal{\mst@opsh}%
+ \edef\mst@ltshape@normal{\mst@ltsh}%
+ \edef\mst@itdefault@normal{\itdefault}%
+ \edef\mst@rmdefault@normal{\rmdefault}%
+ \edef\mst@sfdefault@normal{\sfdefault}%
+ \edef\mst@ttdefault@normal{\ttdefault}%
+ \edef\mst@boldvariant@normal{\mst@bold}%
+ \edef\mst@exists@skip@normal{\mst@exists@skip}%
+ \edef\mst@forall@skip@normal{\mst@forall@skip}%
+ \edef\mst@prime@skip@normal{\mst@prime@skip}%
+ \edef\mst@encoding@bold{\mst@enc}%
+ \edef\mst@family@bold{\mst@fam}%
+ \edef\mst@series@bold{\mst@bold}%
+ \edef\mst@shape@bold{\mst@opsh}%
+ \edef\mst@ltshape@bold{\mst@ltsh}%
+ \edef\mst@boldvariant@bold{\mst@bold}%
+ \edef\mst@itdefault@bold{\itdefault}%
+ \edef\mst@rmdefault@bold{\rmdefault}%
+ \edef\mst@sfdefault@bold{\sfdefault}%
+ \edef\mst@ttdefault@bold{\ttdefault}%
+ \edef\mst@exists@skip@bold{\mst@exists@skip}%
+ \edef\mst@forall@skip@bold{\mst@forall@skip}%
+ \edef\mst@prime@skip@bold{\mst@prime@skip}%
\MTicinmath % does \MTmathactiveletters, \MTnoicinmath only cancels ics
\@for\mst@tmp:=it,sl\do{\ifx\mst@tmp\mst@ltshape@normal\MTnoicinmath\fi}%
\ifmst@frenchmath
@@ -4559,12 +4741,12 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\MTmathoperatorsdonotobeymathxx
\MTmathstandardletters % prior to 1.3, was \MTnoicinmath
\ifmst@asterisk\let\mst@doasterisk\relax\fi
- \def\mst@exists@skip@normal{0mu}
- \def\mst@forall@skip@normal{0mu}
- \def\mst@prime@skip@normal{0mu}
- \def\mst@exists@skip@bold{0mu}
- \def\mst@forall@skip@bold{0mu}
- \def\mst@prime@skip@bold{0mu}
+ \def\mst@exists@skip@normal{0mu}%
+ \def\mst@forall@skip@normal{0mu}%
+ \def\mst@prime@skip@normal{0mu}%
+ \def\mst@exists@skip@bold{0mu}%
+ \def\mst@forall@skip@bold{0mu}%
+ \def\mst@prime@skip@bold{0mu}%
\else % not subdued
\ifmst@italic
\ifmst@frenchmath
@@ -4572,12 +4754,12 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\mst@forall@muskip\mst@forall@skip\relax
\mst@prime@muskip\mst@prime@skip\relax
\else
- \def\mst@exists@skip@normal{0mu}
- \def\mst@forall@skip@normal{0mu}
- \def\mst@prime@skip@normal{0mu}
- \def\mst@exists@skip@bold{0mu}
- \def\mst@forall@skip@bold{0mu}
- \def\mst@prime@skip@bold{0mu}
+ \def\mst@exists@skip@normal{0mu}%
+ \def\mst@forall@skip@normal{0mu}%
+ \def\mst@prime@skip@normal{0mu}%
+ \def\mst@exists@skip@bold{0mu}%
+ \def\mst@forall@skip@bold{0mu}%
+ \def\mst@prime@skip@bold{0mu}%
\fi
\else
\mst@exists@muskip\mst@exists@skip\relax
@@ -4586,71 +4768,75 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\fi
\fi
%% v1.15f
-\ifmst@nonormalbold\else
- \SetMathAlphabet{\mathnormalbold}{normal}{\mst@encoding@normal}
- {\mst@family@normal}
- {\mst@boldvariant@normal}
- {\mst@ltshape@normal}
- \SetMathAlphabet{\mathnormalbold}{bold}{\mst@encoding@bold}
- {\mst@family@bold}
- {\mst@boldvariant@bold}
- {\mst@ltshape@bold}
-\fi
+ \ifmst@nonormalbold\else
+ \SetMathAlphabet{\mathnormalbold}{normal}{\mst@encoding@normal}%
+ {\mst@family@normal}%
+ {\mst@boldvariant@normal}%
+ {\mst@ltshape@normal}%
+ \SetMathAlphabet{\mathnormalbold}{bold}{\mst@encoding@bold}%
+ {\mst@family@bold}%
+ {\mst@boldvariant@bold}%
+ {\mst@ltshape@bold}%
+ \fi
%% v1.15f adds \ifmst@default.. checks
-\ifmst@subdued\else
- \SetSymbolFont{mtletterfont}{normal}{\mst@encoding@normal}
- {\mst@family@normal}
- {\mst@series@normal}
- {\mst@ltshape@normal}
- \SetSymbolFont{mtletterfont}{bold} {\mst@encoding@bold}
- {\mst@family@bold}
- {\mst@series@bold}
- {\mst@ltshape@bold}
- \SetSymbolFont{mtoperatorfont}{normal}{\mst@encoding@normal}
- {\mst@family@normal}
- {\mst@series@normal}
- {\mst@shape@normal}
- \SetSymbolFont{mtoperatorfont}{bold} {\mst@encoding@bold}
- {\mst@family@bold}
- {\mst@series@bold}
- {\mst@shape@bold}
-\ifmst@defaultbf\else
- \SetMathAlphabet{\Mathbf}{normal}{\mst@encoding@normal}
- {\mst@family@normal}
- {\mst@series@bold}
- {\mst@shape@normal}
- \SetMathAlphabet{\Mathbf}{bold}{\mst@encoding@bold}
- {\mst@family@bold}
- {\mst@series@bold}
- {\mst@shape@bold}
-\fi\ifmst@defaultit\else
- \SetMathAlphabet{\Mathit}{normal}{\mst@encoding@normal}
- {\mst@family@normal}
- {\mst@series@normal}
- {\mst@itdefault@normal}
- \SetMathAlphabet{\Mathit}{bold}{\mst@encoding@bold}
- {\mst@family@bold}
- {\mst@series@bold}
- {\mst@itdefault@bold}
-\fi\ifmst@defaultsf\else
- \SetMathAlphabet{\Mathsf}{normal}{\mst@encoding@normal}
- {\mst@sfdefault@normal}
- {\mst@series@normal}
- {\mst@shape@normal}
- \SetMathAlphabet{\Mathsf}{bold}{\mst@encoding@bold}
- {\mst@sfdefault@bold}
- {\mst@series@bold}
- {\mst@shape@bold}
-\fi\ifmst@defaulttt\else
- \SetMathAlphabet{\Mathtt}{normal}{\mst@encoding@normal}
- {\mst@ttdefault@normal}
- {\mst@series@normal}
- {\mst@shape@normal}
- \SetMathAlphabet{\Mathtt}{bold}{\mst@encoding@bold}
- {\mst@ttdefault@bold}
- {\mst@series@bold}
- {\mst@shape@bold}
-\fi\fi % de \ifmst@subdued
+ \ifmst@subdued\else
+ \SetSymbolFont{mtletterfont}{normal}{\mst@encoding@normal}%
+ {\mst@family@normal}%
+ {\mst@series@normal}%
+ {\mst@ltshape@normal}%
+ \SetSymbolFont{mtletterfont}{bold} {\mst@encoding@bold}%
+ {\mst@family@bold}%
+ {\mst@series@bold}%
+ {\mst@ltshape@bold}%
+ \SetSymbolFont{mtoperatorfont}{normal}{\mst@encoding@normal}%
+ {\mst@family@normal}%
+ {\mst@series@normal}%
+ {\mst@shape@normal}%
+ \SetSymbolFont{mtoperatorfont}{bold} {\mst@encoding@bold}%
+ {\mst@family@bold}%
+ {\mst@series@bold}%
+ {\mst@shape@bold}%
+ \ifmst@defaultbf\else
+ \SetMathAlphabet{\Mathbf}{normal}{\mst@encoding@normal}%
+ {\mst@family@normal}%
+ {\mst@series@bold}%
+ {\mst@shape@normal}%
+ \SetMathAlphabet{\Mathbf}{bold}{\mst@encoding@bold}%
+ {\mst@family@bold}%
+ {\mst@series@bold}%
+ {\mst@shape@bold}%
+ \fi
+ \ifmst@defaultit\else
+ \SetMathAlphabet{\Mathit}{normal}{\mst@encoding@normal}%
+ {\mst@family@normal}%
+ {\mst@series@normal}%
+ {\mst@itdefault@normal}%
+ \SetMathAlphabet{\Mathit}{bold}{\mst@encoding@bold}%
+ {\mst@family@bold}%
+ {\mst@series@bold}%
+ {\mst@itdefault@bold}%
+ \fi
+ \ifmst@defaultsf\else
+ \SetMathAlphabet{\Mathsf}{normal}{\mst@encoding@normal}%
+ {\mst@sfdefault@normal}%
+ {\mst@series@normal}%
+ {\mst@shape@normal}%
+ \SetMathAlphabet{\Mathsf}{bold}{\mst@encoding@bold}%
+ {\mst@sfdefault@bold}%
+ {\mst@series@bold}%
+ {\mst@shape@bold}%
+ \fi
+ \ifmst@defaulttt\else
+ \SetMathAlphabet{\Mathtt}{normal}{\mst@encoding@normal}%
+ {\mst@ttdefault@normal}%
+ {\mst@series@normal}%
+ {\mst@shape@normal}%
+ \SetMathAlphabet{\Mathtt}{bold}{\mst@encoding@bold}%
+ {\mst@ttdefault@bold}%
+ {\mst@series@bold}%
+ {\mst@shape@bold}%
+ \fi
+ \fi % de \ifmst@subdued
% \end{macrocode}
% \begin{macro}{\MathEulerBold}
% |1.14c|: We reset |mteulervm| and \cs{MathEulerBold} here as the
@@ -4658,72 +4844,66 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
% \cs{Mathastextboldvariant}|{m}|; and we should keep this local to
% math versions.
% \begin{macrocode}
- \ifmst@needeuler
- \SetSymbolFont{mteulervm}{bold}{U}{zeur}{\mst@boldvariant@normal}{n}
- \SetMathAlphabet{\MathEulerBold}{normal}
- {U}{zeur}{\mst@boldvariant@normal}{n}
- \SetMathAlphabet{\MathEulerBold}{bold}
- {U}{zeur}{\mst@boldvariant@normal}{n}
- \fi
+ \ifmst@needeuler
+ \SetSymbolFont{mteulervm}{bold}{U}{zeur}{\mst@boldvariant@normal}{n}%
+ \SetMathAlphabet{\MathEulerBold}{normal}%
+ {U}{zeur}{\mst@boldvariant@normal}{n}%
+ \SetMathAlphabet{\MathEulerBold}{bold}%
+ {U}{zeur}{\mst@boldvariant@normal}{n}%
+ \fi
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
- \ifmst@needsymbol\SetSymbolFont{mtpsymbol}{bold}
- {U}{psy}{\mst@boldvariant@normal}{n}
- \fi
+ \ifmst@needsymbol\SetSymbolFont{mtpsymbol}{bold}%
+ {U}{psy}{\mst@boldvariant@normal}{n}%
+ \fi
% \end{macrocode}
% \begin{macro}{LGRgreek*}
% \begin{macro}{selfGreek*}
% LGRgreek, LGRgreeks, selfGreek, and selfGreeks options.
% \begin{macrocode}
-\ifmst@subdued\else
-\ifmst@LGRgreek
- \SetSymbolFont{mtlgrfontlower}{normal}{LGR}
- {\mst@greekfont}{\mst@series@normal}{\mst@greek@lsh}
- \SetSymbolFont{mtlgrfontlower}{bold}{LGR}
- {\mst@greekfont}{\mst@boldvariant@normal}{\mst@greek@lsh}
- \SetSymbolFont{mtlgrfontupper}{normal}{LGR}
- {\mst@greekfont}{\mst@series@normal}{\mst@greek@ush}
- \SetSymbolFont{mtlgrfontupper}{bold}{LGR}
- {\mst@greekfont}{\mst@boldvariant@bold}{\mst@greek@ush}
- \else
-\ifmst@selfGreek
- \SetSymbolFont{mtselfGreekfont}{normal}{OT1}
- {\mst@greekfont}{\mst@series@normal}{\mst@greek@ush}
- \SetSymbolFont{mtselfGreekfont}{bold}{OT1}
- {\mst@greekfont}{\mst@boldvariant@bold}{\mst@greek@ush}
-\fi\fi\fi
+ \ifmst@subdued\else
+ \ifmst@LGRgreek
+ \SetSymbolFont{mtlgrfontlower}{normal}{LGR}%
+ {\mst@greekfont}{\mst@series@normal}{\mst@greek@lsh}%
+ \SetSymbolFont{mtlgrfontlower}{bold}{LGR}%
+ {\mst@greekfont}{\mst@boldvariant@normal}{\mst@greek@lsh}%
+ \SetSymbolFont{mtlgrfontupper}{normal}{LGR}%
+ {\mst@greekfont}{\mst@series@normal}{\mst@greek@ush}%
+ \SetSymbolFont{mtlgrfontupper}{bold}{LGR}%
+ {\mst@greekfont}{\mst@boldvariant@bold}{\mst@greek@ush}%
+ \else
+ \ifmst@selfGreek
+ \SetSymbolFont{mtselfGreekfont}{normal}{OT1}%
+ {\mst@greekfont}{\mst@series@normal}{\mst@greek@ush}%
+ \SetSymbolFont{mtselfGreekfont}{bold}{OT1}%
+ {\mst@greekfont}{\mst@boldvariant@bold}{\mst@greek@ush}%
+ \fi
+ \fi
+ \fi
% \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macrocode}
-\ifmst@subdued
-\typeout{** subdued mode will be activated for the normal and bold math versions}
-\else
-\typeout{** Latin letters in the normal (resp. bold) math versions are now^^J%
- ** set up to use the fonts
-\mst@encoding@normal/\mst@family@normal/\mst@series@normal%
-(\mst@boldvariant@normal)/\mst@ltshape@normal}
-\ifmst@LGRgreek\typeout{** Greek letters (\mst@greek@lsh/\mst@greek@ush)
-will use LGR/\mst@greekfont}
-\fi
-\ifmst@nodigits\else\typeout{** Other characters (digits, ...)
-and \protect\log-like names will be^^J%
-** typeset with the \mst@shape@normal\space shape.}
-\fi
-\fi
-\else % optional argument, then we rather do DeclareVersion
- \edef\mst@tmp{#1}
- \ifx\mst@tmp\empty
- \Mathastext % no infinite loop!
- \else
- \MTDeclareVersion[\mst@ltsh]{#1}
- {\mst@enc}{\mst@fam}{\mst@ser}{\mst@opsh}
- \fi
-\fi
+ \ifmst@subdued
+ \typeout{** subdued mode will be activated for the normal and bold math versions}%
+ \else
+ \typeout{** Latin letters in the normal (resp. bold) math versions are now^^J%
+ ** set up to use the fonts
+ \mst@encoding@normal/\mst@family@normal/\mst@series@normal%
+ (\mst@boldvariant@normal)/\mst@ltshape@normal}%
+ \ifmst@LGRgreek\typeout{** Greek letters (\mst@greek@lsh/\mst@greek@ush)
+ will use LGR/\mst@greekfont}%
+ \fi
+ \ifmst@nodigits\else
+ \typeout{** Other characters (digits, ...) and \protect\log-like names will be^^J%
+ ** typeset with the \mst@shape@normal\space shape.}%
+ \fi
+ \fi
}
-\@onlypreamble\Mathastext
\let\mathastext\Mathastext
+\@onlypreamble\Mathastext
+\@onlypreamble\mathastext
% \end{macrocode}
% \end{macro}
% \begin{macro}{\MTDeclareVersion}
@@ -4740,68 +4920,82 @@ and \protect\log-like names will be^^J%
% For version |1.1| we add an optional parameter specifying the shape
% to be used for letters.
%
-% Note: [2012/10/24] I really should check whether the user attempts to
+% Note: (|2012/10/24|) I really should check whether the user attempts to
% redefine the `normal' and `bold' versions and issue a warning in
% that case!
+%
+% |1.3b| (|2013/12/11|) adds an extra optional parameter after all
+% previous ones, to inherit the settings from another version. Typically
+% to be used with [bold]. I take this opportunity to sanitize a bit some
+% line endings to avoid generating (in the preamble, document macros were
+% already careful of course) too many space
+% tokens, at least inside macros. And I modifiy (correct? perhaps it was on
+% purpose) the strange way I used |\@onlypreamble| in earlier version.
% \begin{macrocode}
-\newcommand*\MTDeclareVersion[6][\empty]{
- \edef\mst@version{#2}
- \DeclareMathVersion{\mst@version}
- \expandafter\edef\csname mst@encoding@\mst@version\endcsname{#3}
- \expandafter\edef\csname mst@family@\mst@version\endcsname{#4}
- \expandafter\edef\csname mst@series@\mst@version\endcsname{#5}
- \expandafter\edef\csname mst@shape@\mst@version\endcsname{#6}
- \expandafter\edef\csname mst@boldvariant@\mst@version\endcsname{\mst@bold}
- \expandafter\edef\csname mst@itdefault@\mst@version\endcsname{\itdefault}
- \expandafter\edef\csname mst@rmdefault@\mst@version\endcsname{\rmdefault}
- \expandafter\edef\csname mst@sfdefault@\mst@version\endcsname{\sfdefault}
- \expandafter\edef\csname mst@ttdefault@\mst@version\endcsname{\ttdefault}
+\newcommand*\MTDeclareVersion[6][]{%
+ \def\mst@declareversionargs{{#1}{#2}{#3}{#4}{#5}{#6}}%
+ \edef\mst@version{#2}%
+ \DeclareMathVersion{\mst@version}%
+ \MTDeclareVersion@
+}
+\newcommand*\MTDeclareVersion@[1][]{%
+ \edef\mst@tmp{#1}%
+ \ifx\mst@tmp\empty\else
+ \global\expandafter\let\csname mv@\mst@version\expandafter\endcsname
+ \csname mv@#1\endcsname
+ \typeout{** Math version \mst@version\space inherits from `#1\string'.}%
+ \fi
+ \expandafter\MTDeclareVersion@@\mst@declareversionargs
+}
+\newcommand*\MTDeclareVersion@@[6]{%
+ \expandafter\edef\csname mst@encoding@\mst@version\endcsname{#3}%
+ \expandafter\edef\csname mst@family@\mst@version\endcsname{#4}%
+ \expandafter\edef\csname mst@series@\mst@version\endcsname{#5}%
+ \expandafter\edef\csname mst@shape@\mst@version\endcsname{#6}%
+ \expandafter\edef\csname mst@boldvariant@\mst@version\endcsname{\mst@bold}%
+ \expandafter\edef\csname mst@itdefault@\mst@version\endcsname{\itdefault}%
+ \expandafter\edef\csname mst@rmdefault@\mst@version\endcsname{\rmdefault}%
+ \expandafter\edef\csname mst@sfdefault@\mst@version\endcsname{\sfdefault}%
+ \expandafter\edef\csname mst@ttdefault@\mst@version\endcsname{\ttdefault}%
\expandafter\edef\csname mst@exists@skip@\mst@version\endcsname
- {\mst@exists@skip}
+ {\mst@exists@skip}%
\expandafter\edef\csname mst@forall@skip@\mst@version\endcsname
- {\mst@forall@skip}
+ {\mst@forall@skip}%
\expandafter\edef\csname mst@prime@skip@\mst@version\endcsname
- {\mst@prime@skip}
- \mst@optionalparamfalse
- \ifx\empty#1
- \else % we check nevertheless for [] situation, will not work with [ ]
- \def\mst@tmp{#1}
- \ifx\mst@tmp\empty\else\mst@optionalparamtrue\fi
- \fi
- \ifmst@optionalparam
- \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#1}
- \typeout{** Latin letters in math version `#2\string' will use the font
- #3/#4/#5/#1^^J%
- ** Other characters (digits, ...) and \protect\log-like
- names will be in #6 shape.}
- \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{#1}
- \else
+ {\mst@prime@skip}%
+ \ifx\mst@tmp\empty
\ifmst@italic
- \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{\mst@ltsh}
+ \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{\mst@ltsh}%
\typeout{** Latin letters in math version `#2\string' will use the font
#3/#4/#5/\mst@ltsh^^J%
** Other characters (digits, ...) and \protect\log-like names
- will be in #6 shape.}
- \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{\mst@ltsh}
+ will be in #6 shape.}%
+ \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{\mst@ltsh}%
\else
- \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#6}
+ \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#6}%
\typeout{** Latin letters in math version `#2\string' will use the fonts
- #3/#4/#5(\mst@bold)/#6}
- \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{#6}
+ #3/#4/#5(\mst@bold)/#6}%
+ \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{#6}%
\fi
+ \else
+ \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#1}%
+ \typeout{** Latin letters in math version `#2\string' will use the font
+ #3/#4/#5/#1^^J%
+ ** Other characters (digits, ...) and \protect\log-like
+ names will be in #6 shape.}%
+ \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{#1}%
\fi
\ifmst@nonormalbold\else
- \SetMathAlphabet{\mathnormalbold}{#2}{#3}{#4}{\mst@bold}
- {\csname
- mst@ltshape@\mst@version\endcsname}
+ \SetMathAlphabet{\mathnormalbold}{#2}{#3}{#4}{\mst@bold}%
+ {\csname mst@ltshape@\mst@version\endcsname}%
\fi
- \SetSymbolFont{mtoperatorfont}{#2}{#3}{#4}{#5}{#6}
+ \SetSymbolFont{mtoperatorfont}{#2}{#3}{#4}{#5}{#6}%
\ifmst@defaultbf\else\SetMathAlphabet{\Mathbf}{#2}{#3}{#4}{\mst@bold}{#6}\fi
\ifmst@defaultit\else\SetMathAlphabet{\Mathit}{#2}{#3}{#4}{#5}{\itdefault}\fi
\ifmst@defaultsf\else\SetMathAlphabet{\Mathsf}{#2}{#3}{\sfdefault}{#5}{#6}\fi
\ifmst@defaulttt\else\SetMathAlphabet{\Mathtt}{#2}{#3}{\ttdefault}{#5}{#6}\fi
\ifmst@needeuler
- \SetMathAlphabet{\MathEulerBold}{#2}{U}{zeur}{\mst@bold}{n}
+ \SetMathAlphabet{\MathEulerBold}{#2}{U}{zeur}{\mst@bold}{n}%
\fi
% \end{macrocode}
% \begin{macro}{LGRgreeks}
@@ -4813,52 +5007,56 @@ and \protect\log-like names will be^^J%
% options as well as on the (local to this version) shapes for letters
% and digits.
% \begin{macrocode}
- \def\mst@greek@lsh@loc{\csname mst@ltshape@\mst@version\endcsname}
- \def\mst@greek@ush@loc{\csname mst@shape@\mst@version\endcsname}
- \ifmst@itgreek\def\mst@greek@lsh@loc{\itdefault}
+ \def\mst@greek@lsh@loc{\csname mst@ltshape@\mst@version\endcsname}%
+ \def\mst@greek@ush@loc{\csname mst@shape@\mst@version\endcsname}%
+ \ifmst@itgreek\def\mst@greek@lsh@loc{\itdefault}%
\def\mst@greek@ush@loc{\itdefault}\fi
- \ifmst@upgreek\def\mst@greek@lsh@loc{\updefault}
+ \ifmst@upgreek\def\mst@greek@lsh@loc{\updefault}%
\def\mst@greek@ush@loc{\updefault}\fi
- \ifmst@frenchmath
+ \ifmst@frenchmath
\ifmst@itgreek\else
\ifmst@upgreek\else
- \def\mst@greek@lsh@loc{\csname mst@shape@\mst@version\endcsname}
- \def\mst@greek@ush@loc{\csname mst@shape@\mst@version\endcsname}
+ \def\mst@greek@lsh@loc{\csname mst@shape@\mst@version\endcsname}%
+ \def\mst@greek@ush@loc{\csname mst@shape@\mst@version\endcsname}%
\fi\fi
+ \fi
+ \ifcase\mst@greek@select
+ \or\def\mst@greek@ush@loc{\itdefault}%
+ \or\def\mst@greek@ush@loc{\updefault}%
+ \fi
+ \ifmst@LGRgreeks
+ \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{#4}{#5}{\mst@greek@lsh@loc}%
+ \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{#4}{#5}{\mst@greek@ush@loc}%
+ \typeout{** Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc) will use
+ LGR font #4}%
+ \else
+ \ifmst@selfGreeks
+ \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{#4}{#5}{\mst@greek@ush@loc}%
+ \typeout{** Capital Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc)
+ will use OT1 font #4}%
+ \else
+ \ifmst@LGRgreek
+ \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{\mst@greekfont}{#5}{\mst@greek@lsh@loc}%
+ \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{\mst@greekfont}{#5}{\mst@greek@ush@loc}%
+ \typeout{** Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc) will use
+ LGR font \mst@greekfont}%
+ \else
+ \ifmst@selfGreek
+ \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{\mst@greekfont}{#5}{\mst@greek@ush@loc}%
+ \typeout{** Capital Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc)
+ will use OT1 font \mst@greekfont}%
+ \fi
\fi
- \ifcase\mst@greek@select
- \or\def\mst@greek@ush@loc{\itdefault}
- \or\def\mst@greek@ush@loc{\updefault}
- \fi
- \ifmst@LGRgreeks
- \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{#4}{#5}{\mst@greek@lsh@loc}
- \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{#4}{#5}{\mst@greek@ush@loc}
- \typeout{** Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc) will use
- LGR font #4}
- \else
- \ifmst@selfGreeks
- \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{#4}{#5}{\mst@greek@ush@loc}
- \typeout{** Capital Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc)
- will use OT1 font #4}
- \else
- \ifmst@LGRgreek
- \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{\mst@greekfont}{#5}{\mst@greek@lsh@loc}
- \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{\mst@greekfont}{#5}{\mst@greek@ush@loc}
- \typeout{** Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc) will use
- LGR font \mst@greekfont}
- \else
- \ifmst@selfGreek
- \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{\mst@greekfont}{#5}{\mst@greek@ush@loc}
- \typeout{** Capital Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc)
- will use OT1 font \mst@greekfont}
- \fi\fi\fi\fi
+ \fi
+ \fi
}
-\@onlypreamble\MTDeclareVersion
% \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macrocode}
\let\MathastextDeclareVersion\MTDeclareVersion
+\@onlypreamble\MTDeclareVersion
+\@onlypreamble\MathastextDeclareVersion
% \end{macrocode}
% \end{macro}
% \begin{macro}{\MTVersion}
@@ -4884,16 +5082,14 @@ and \protect\log-like names will be^^J%
% |1.3|: activation of italic corrections is now separated from actual math
% activation of letters.
% \begin{macrocode}
-\newcommand*\MTVersion[2][\empty]{%
+\newcommand*\MTVersion[2][]{%
\mathversion{#2}%
- \ifx\empty#1% no optional argument
+ \edef\mst@tmpa{#1}%
+ \ifx\mst@tmpa\empty
\def\mst@tmp{#2}%
- \else% we check nevertheless for [] situation, will not work with [ ]
- \def\mst@tmpa{#1}%
- \ifx\mst@tmpa\empty\def\mst@tmp{#2}%
- \else\def\mst@tmp{#1}%
- \fi%
- \fi%
+ \else
+ \def\mst@tmp{#1}%
+ \fi
\usefont{\csname mst@encoding@\mst@tmp\endcsname}%
{\csname mst@family@\mst@tmp\endcsname}%
{\csname mst@series@\mst@tmp\endcsname}%
@@ -4957,8 +5153,8 @@ and \protect\log-like names will be^^J%
\ifmst@asterisk\let\mst@doasterisk\relax\fi
\ifmst@LGRgreek\mst@restoregreek\fi
\else
- \def\mst@tmpa{bold}%
- \ifx\mst@tmp\mst@tmpa
+ \def\mst@tmpa{bold}%
+ \ifx\mst@tmp\mst@tmpa
\mst@restorealphabets
\MTmathoperatorsdonotobeymathxx
\MTnonlettersdonotobeymathxx
@@ -4966,10 +5162,12 @@ and \protect\log-like names will be^^J%
\MTmathstandardletters
\ifmst@asterisk\let\mst@doasterisk\relax\fi
\ifmst@LGRgreek\mst@restoregreek\fi
- \else
- \mst@setalphabets
- \ifmst@LGRgreek\mst@setuplgrgreek\fi
- \fi\fi\fi
+ \else
+ \mst@setalphabets
+ \ifmst@LGRgreek\mst@setuplgrgreek\fi
+ \fi
+ \fi
+ \fi
}
\let\MathastextVersion\MTVersion
\let\Mathastextversion\MTVersion
@@ -4987,11 +5185,11 @@ and \protect\log-like names will be^^J%
% \begin{macrocode}
\ifmst@eulergreek
\typeout{** Greek letters will use the Euler font. Use^^J%
-** \protect\MathastextEulerScale{<factor>} to scale the font.}
+ ** \protect\MathastextEulerScale{<factor>} to scale the font.}%
\else
\ifmst@symbolgreek
\typeout{** Greek letters will use the PostScript Symbol font. Use^^J%
-** \protect\MathastextSymbolScale{<factor>} to scale the font.}
+ ** \protect\MathastextSymbolScale{<factor>} to scale the font.}%
\fi\fi
% \end{macrocode}
% At (long...) last we now change the font for the letters of the
@@ -5008,40 +5206,41 @@ and \protect\log-like names will be^^J%
\expandafter
\DeclareMathSymbol \csname mst@#1\endcsname{\mathalpha}{mtletterfont}{`#1}%
\expandafter\mst@addtodo@az
- \expandafter #1\csname mst@#1\endcsname\mst@itcorr}
+ \expandafter #1\csname mst@#1\endcsname\mst@itcorr
+}%
\@for\mst@tmp:=a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z\do
- {\expandafter\mst@DeclareMathLetter\mst@tmp}
-\ifmst@frenchmath \def\mst@font@tbu{mtoperatorfont}
- \else \def\mst@font@tbu{mtletterfont}
+ {\expandafter\mst@DeclareMathLetter\mst@tmp}%
+\ifmst@frenchmath \def\mst@font@tbu{mtoperatorfont}%
+ \else \def\mst@font@tbu{mtletterfont}%
\fi
\def\mst@DeclareMathLetter #1{%
\DeclareMathSymbol {#1}{\mathalpha}{\mst@font@tbu}{`#1}%
\expandafter
\DeclareMathSymbol \csname mst@#1\endcsname{\mathalpha}{\mst@font@tbu}{`#1}%
\expandafter\mst@addtodo@AZ
- \expandafter #1\csname mst@#1\endcsname\mst@ITcorr}
+ \expandafter #1\csname mst@#1\endcsname\mst@ITcorr}%
\@for\mst@tmp:=A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z\do
- {\expandafter\mst@DeclareMathLetter\mst@tmp}
+ {\expandafter\mst@DeclareMathLetter\mst@tmp}%
\let\mst@DeclareMathLetter\relax
%%
\ifmst@nodigits\else
-\def\mst@font@tbu{mtoperatorfont}
+\def\mst@font@tbu{mtoperatorfont}%
% \end{macrocode}
% In version |1.1|, we have now separated digits from letters, so paradoxically
% it is less problematic to give them the |mathalpha| type.
% \begin{macrocode}
\ifmst@symboldigits \def\mst@font@tbu{mtpsymbol} \fi
\ifmst@eulerdigits \def\mst@font@tbu{mteulervm} \fi
-\DeclareMathSymbol{0}{\mathalpha}{\mst@font@tbu}{`0}
-\DeclareMathSymbol{1}{\mathalpha}{\mst@font@tbu}{`1}
-\DeclareMathSymbol{2}{\mathalpha}{\mst@font@tbu}{`2}
-\DeclareMathSymbol{3}{\mathalpha}{\mst@font@tbu}{`3}
-\DeclareMathSymbol{4}{\mathalpha}{\mst@font@tbu}{`4}
-\DeclareMathSymbol{5}{\mathalpha}{\mst@font@tbu}{`5}
-\DeclareMathSymbol{6}{\mathalpha}{\mst@font@tbu}{`6}
-\DeclareMathSymbol{7}{\mathalpha}{\mst@font@tbu}{`7}
-\DeclareMathSymbol{8}{\mathalpha}{\mst@font@tbu}{`8}
-\DeclareMathSymbol{9}{\mathalpha}{\mst@font@tbu}{`9}
+\DeclareMathSymbol{0}{\mathalpha}{\mst@font@tbu}{`0}%
+\DeclareMathSymbol{1}{\mathalpha}{\mst@font@tbu}{`1}%
+\DeclareMathSymbol{2}{\mathalpha}{\mst@font@tbu}{`2}%
+\DeclareMathSymbol{3}{\mathalpha}{\mst@font@tbu}{`3}%
+\DeclareMathSymbol{4}{\mathalpha}{\mst@font@tbu}{`4}%
+\DeclareMathSymbol{5}{\mathalpha}{\mst@font@tbu}{`5}%
+\DeclareMathSymbol{6}{\mathalpha}{\mst@font@tbu}{`6}%
+\DeclareMathSymbol{7}{\mathalpha}{\mst@font@tbu}{`7}%
+\DeclareMathSymbol{8}{\mathalpha}{\mst@font@tbu}{`8}%
+\DeclareMathSymbol{9}{\mathalpha}{\mst@font@tbu}{`9}%
\fi
% \end{macrocode}
% When |symboldelimiters| is passed as an option, we use the
@@ -5049,23 +5248,23 @@ and \protect\log-like names will be^^J%
% letters and digits.
% \begin{macrocode}
\ifmst@symboldelimiters
-\def\mst@font@tbu{mtpsymbol}
+\def\mst@font@tbu{mtpsymbol}%
\mst@endashfalse
\mst@emdashfalse
\else
-\def\mst@font@tbu{mtoperatorfont}
+\def\mst@font@tbu{mtoperatorfont}%
\fi
% \end{macrocode}
% |1.2| adds the tricks to let non letters/digits obey math alphabets. We have
% to double the definitions for easy switch on-off of the mechanism, via a token
% list which is put into \cs{everymath} and \cs{everydisplay}.
% \begin{macrocode}
-\ifmst@noexclam\else\typeout{** \string! and \string?}
-\DeclareMathSymbol{!}{\mathclose}{\mst@font@tbu}{"21}
-\DeclareMathSymbol{\mst@varfam@exclam}{\mathalpha}{\mst@font@tbu}{"21}
+\ifmst@noexclam\else\typeout{** \string! and \string?}%
+\DeclareMathSymbol{!}{\mathclose}{\mst@font@tbu}{"21}%
+\DeclareMathSymbol{\mst@varfam@exclam}{\mathalpha}{\mst@font@tbu}{"21}%
\expandafter\mst@addtodo@nonletters\string!\mathclose\mst@varfam@exclam
-\DeclareMathSymbol{?}{\mathclose}{\mst@font@tbu}{"3F}
-\DeclareMathSymbol{\mst@varfam@question}{\mathalpha}{\mst@font@tbu}{"3F}
+\DeclareMathSymbol{?}{\mathclose}{\mst@font@tbu}{"3F}%
+\DeclareMathSymbol{\mst@varfam@question}{\mathalpha}{\mst@font@tbu}{"3F}%
\expandafter\mst@addtodo@nonletters\string?\mathclose\mst@varfam@question
\fi
% \end{macrocode}
@@ -5091,38 +5290,38 @@ and \protect\log-like names will be^^J%
% nota bene: it is assumed that |*| is of type |other| when \mst
% is loaded... it should neither be active, nor of type |letter|!
% \begin{macrocode}
-\def\mst@@doasterisk{\let\ast\mst@ast\mst@mathactivate*{}\mst@ast}
+\def\mst@@doasterisk{\let\ast\mst@ast\mst@mathactivate*{}\mst@ast}%
\ifmst@asterisk\typeout{** asterisk: \string\ast\space and *}
\ifmst@symbolmisc
\def\mst@bin@ast{%
- \mathbin{\mathchoice{\raisebox{-.1\height}
- {\the\textfont\symmtpsymbol\char42}}
- {\raisebox{-.1\height}
- {\the\textfont\symmtpsymbol\char42}}
- {\raisebox{-.1\height}
- {\the\scriptfont\symmtpsymbol\char42}}
- {\raisebox{-.1\height}
- {\the\scriptscriptfont\symmtpsymbol\char42}}}}
+ \mathbin{\mathchoice{\raisebox{-.1\height}%
+ {\the\textfont\symmtpsymbol\char42}}%
+ {\raisebox{-.1\height}%
+ {\the\textfont\symmtpsymbol\char42}}%
+ {\raisebox{-.1\height}%
+ {\the\scriptfont\symmtpsymbol\char42}}%
+ {\raisebox{-.1\height}%
+ {\the\scriptscriptfont\symmtpsymbol\char42}}}}%
\else
\def\mst@bin@ast{%
- \mathbin{\mathchoice{\raisebox{-\mst@lowerast}
- {\the\textfont\symmtoperatorfont\char42}}
- {\raisebox{-\mst@lowerast}
- {\the\textfont\symmtoperatorfont\char42}}
- {\raisebox{-\mst@lowerast}
- {\the\scriptfont\symmtoperatorfont\char42}}
- {\raisebox{-\mst@lowerast}
- {\the\scriptscriptfont\symmtoperatorfont\char42}}}}
+ \mathbin{\mathchoice{\raisebox{-\mst@lowerast}%
+ {\the\textfont\symmtoperatorfont\char42}}%
+ {\raisebox{-\mst@lowerast}%
+ {\the\textfont\symmtoperatorfont\char42}}%
+ {\raisebox{-\mst@lowerast}%
+ {\the\scriptfont\symmtoperatorfont\char42}}%
+ {\raisebox{-\mst@lowerast}%
+ {\the\scriptscriptfont\symmtoperatorfont\char42}}}}%
\fi
\def\mst@varfam@ast{\ifnum\fam=\m@ne\mst@bin@ast\else
- \mathbin{\mathchoice{\raisebox{-\mst@lowerast}
- {\the\textfont\fam\char42}}
- {\raisebox{-\mst@lowerast}
- {\the\textfont\fam\char42}}
- {\raisebox{-\mst@lowerast}
- {\the\scriptfont\fam\char42}}
- {\raisebox{-\mst@lowerast}
- {\the\scriptscriptfont\fam\char42}}}\fi}
+ \mathbin{\mathchoice{\raisebox{-\mst@lowerast}%
+ {\the\textfont\fam\char42}}%
+ {\raisebox{-\mst@lowerast}%
+ {\the\textfont\fam\char42}}%
+ {\raisebox{-\mst@lowerast}%
+ {\the\scriptfont\fam\char42}}%
+ {\raisebox{-\mst@lowerast}%
+ {\the\scriptscriptfont\fam\char42}}}\fi}%
\let\mst@doasterisk\mst@@doasterisk
\DeclareRobustCommand*{\mst@ast}{\mst@bin@ast}
\newcommand*\MTlowerast[1]{\def\mst@lowerast{#1}}
@@ -5577,34 +5776,65 @@ and \protect\log-like names will be^^J%
% \cs{MTeasynonlettersdonotobeymathxx}. Besides, I have absolutely no idea
% why I had different looking code depending on the engine XeTeX, LuaTeX or
% default. Removed.
+%
+% |1.3b| [2013/12/11]: I have absolutely no idea why I removed the XeTeX and
+% LuaTeX code at the time of |1.2d|! the code for tex/pdftex engine could not
+% accomodate more than 16 math families. Code for XeTeX and LuaTeX again added.
+% (and since TL2013 no more problems with |\luatexUmathcode|.)
% \begin{macrocode}
-\ifmst@nospecials\else\typeout{** \string\#\space\string\mathdollar\space\string\%\space\string\&\space}
-\count255=\symmtoperatorfont
-\multiply\count255 by 256
-\advance\count255 by 35
- \mathcode`\#\count255
-\advance\count255 by 1
- \mathchardef\mathdollar\count255
-\advance\count255 by 1
- \mathcode`\%\count255
-\advance\count255 by 1
- \mathcode`\&\count255
-\count255=\symmtoperatorfont
-\multiply\count255 by 256
-\advance\count255 by 28707 % = "7023
- \mathchardef\mst@varfam@mathhash\count255
-\advance\count255 by 1
- \mathchardef\mst@varfam@mathdollar\count255
-\advance\count255 by 1
- \mathchardef\mst@varfam@mathpercent\count255
-\advance\count255 by 1
- \mathchardef\mst@varfam@mathampersand\count255
-\mst@do@easynonletters\expandafter{\the\mst@do@easynonletters
+\ifmst@nospecials\else
+ \typeout{** \string\#\space\string\mathdollar\space
+ \string\%\space\string\&\space}
+\ifmst@XeTeX
+ \XeTeXmathcode`\#="0 \symmtoperatorfont "0023 \relax
+ \XeTeXmathchardef\mathdollar="0 \symmtoperatorfont "0024 \relax
+ \XeTeXmathcode`\%="0 \symmtoperatorfont "0025 \relax
+ \XeTeXmathcode`\&="0 \symmtoperatorfont "0026 \relax
+ \mst@do@easynonletters\expandafter{\the\mst@do@easynonletters
+ \XeTeXmathcode`\#="7 \symmtoperatorfont "0023 \relax
+ \XeTeXmathchardef\mathdollar="7 \symmtoperatorfont "0024 \relax
+ \XeTeXmathcode`\%="7 \symmtoperatorfont "0025 \relax
+ \XeTeXmathcode`\&="7 \symmtoperatorfont "0026 \relax
+ }
+\else
+\ifmst@LuaTeX
+ \luatexUmathcode`\#="0 \symmtoperatorfont "0023 \relax
+ \luatexUmathchardef\mathdollar="0 \symmtoperatorfont "0024 \relax
+ \luatexUmathcode`\%="0 \symmtoperatorfont "0025 \relax
+ \luatexUmathcode`\&="0 \symmtoperatorfont "0026 \relax
+ \mst@do@easynonletters\expandafter{\the\mst@do@easynonletters
+ \luatexUmathcode`\#="7 \symmtoperatorfont "0023 \relax
+ \luatexUmathchardef\mathdollar="7 \symmtoperatorfont "0024 \relax
+ \luatexUmathcode`\%="7 \symmtoperatorfont "0025 \relax
+ \luatexUmathcode`\&="7 \symmtoperatorfont "0026 \relax
+ }
+\else
+ \count255=\symmtoperatorfont
+ \multiply\count255 by 256
+ \advance\count255 by 35
+ \mathcode`\#\count255
+ \advance\count255 by 1
+ \mathchardef\mathdollar\count255
+ \advance\count255 by 1
+ \mathcode`\%\count255
+ \advance\count255 by 1
+ \mathcode`\&\count255
+ \count255=\symmtoperatorfont
+ \multiply\count255 by 256
+ \advance\count255 by 28707 % = "7023
+ \mathchardef\mst@varfam@mathhash\count255
+ \advance\count255 by 1
+ \mathchardef\mst@varfam@mathdollar\count255
+ \advance\count255 by 1
+ \mathchardef\mst@varfam@mathpercent\count255
+ \advance\count255 by 1
+ \mathchardef\mst@varfam@mathampersand\count255
+ \mst@do@easynonletters\expandafter{\the\mst@do@easynonletters
\mathcode`\#=\mst@varfam@mathhash
\let\mathdollar\mst@varfam@mathdollar
\mathcode`\%=\mst@varfam@mathpercent
\mathcode`\&=\mst@varfam@mathampersand}
-\fi
+\fi\fi\fi
% \end{macrocode}
% \end{macro}
% \begin{macro}{symbolmisc}
@@ -5628,14 +5858,17 @@ and \protect\log-like names will be^^J%
% but this did not go well with subscripts and exponents.
%
% Note oct 2012: maybe I should re-examine what I did?
+% |1.3b| ([2013/12/11]) renames |\defaultprod| to |\MToriginalprod| and
+% |\defaultsum| to
+% |\MToriginalsum|.
% \begin{macrocode}
\ifmst@symbolmisc\typeout{** symbolmisc: miscellaneous math symbols from Symbol font}
\let\mst@prod\prod
-\let\defaultprod\prod
+\let\MToriginalprod\prod
\DeclareMathSymbol{\prodpsy}{\mathop}{mtpsymbol}{213}
\renewcommand*{\prod}{\ifinner\prodpsy\else\mst@prod\fi}
\let\mst@sum\sum
-\let\defaultsum\sum
+\let\MToriginalsum\sum
\DeclareMathSymbol{\sumpsy}{\mathop}{mtpsymbol}{229}
\renewcommand*{\sum}{\ifinner\sumpsy\else\mst@sum\fi}
% \end{macrocode}
@@ -6260,10 +6493,10 @@ and \protect\log-like names will be^^J%
\fi
% \end{macrocode}
% \end{macro}
-% \begin{macrocode}
-\endinput
-% \end{macrocode}
+% \DeleteShortVerb{\|}
% \MakePercentComment
+%</package>
+%<*dtx>
\CharacterTable
{Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -6280,8 +6513,8 @@ and \protect\log-like names will be^^J%
Grave accent \` Left brace \{ Vertical bar \|
Right brace \} Tilde \~}
-\CheckSum{5009}
-
+\CheckSum{5103}
+\makeatletter\check@checksum\makeatother
\Finale
%%
%% End of file `mathastext.dtx'.
diff --git a/Master/texmf-dist/source/latex/mathastext/mathastext.ins b/Master/texmf-dist/source/latex/mathastext/mathastext.ins
index aaa6d10a894..e54f5c45deb 100644
--- a/Master/texmf-dist/source/latex/mathastext/mathastext.ins
+++ b/Master/texmf-dist/source/latex/mathastext/mathastext.ins
@@ -1,43 +1,50 @@
-%%
-%% Package `mathastext', for LaTeX2e.
-%% Author: Jean-Francois Burnol
+\def\MSTpkgdate {2013/12/11}
+\def\MSTpkgversion {1.3b}
+%%----------------------------------------------------------------
+%% The mathastext package (version 1.3b of December 10, 2013)
%% Copyright (C) 2011, 2012, 2013 by Jean-Francois Burnol
+%% Examples of use of mathastext:
+%% http://jf.burnol.free.fr/mathastext.html
+%% http://jf.burnol.free.fr/showcase.html
+%%----------------------------------------------------------------
+%% This is a generated file. "tex mathastext.ins" extracts mathastext.sty from
+%% mathastext.dtx as well as mathastext.tex (for typesetting the documentation),
+%% and some test files to check the package commands.
%%
-\def\pkgname{mathastext}
-\def\pkgdate{2013/09/04}
-\def\pkgversion{1.3a}
-\def\pkgdescription{Use the text font in math mode (jfB)}
-%%
-%% `mathastext.ins' is provided for compatibility with TeX distributions
-%% expecting to find it for installation of `mathastext.sty'.
-%%
-%% `latex mathastext.ins' produces `mathastext.sty' from the source
-%% `mathastext.dtx'; an already existing `mathastext.sty' in the same repertory
-%% will be overwritten.
-%%
-%% Move `mathastext.sty' to a suitable location within the TeX installation:
-%% mathastext.sty -> <TDS>/tex/latex/mathastext/
-%%
-%% Some test files are also generated, to be processed through latex, pdflatex,
-%% lualatex or xetex.
-%%
-%% See the source file for the copyright and license informations.
+%% See mathastext.dtx for the copyright and the conditions for distribution
+%% and/or modification of this work.
%%
\input docstrip.tex
\askforoverwritefalse
-\def\pkgpreamble{\defaultpreamble^^J\MetaPrefix^^J%
-\string\ProvidesPackage{\pkgname}^^J%
-\space[\pkgdate\space v\pkgversion\space\pkgdescription]}
-\def\testfilepreamble{\string\def\string\testfileincipit{Test file
-to accompany \string\texttt{\pkgname}^^J%
-version \string\texttt{\pkgversion} of \string\texttt{\pkgdate.}}}
-\generate{\usepreamble\testfilepreamble
-\file{\pkgname testmathversions.tex}{\from{\pkgname.dtx}{mathversions}}
-\file{\pkgname testmacos.tex}{\from{\pkgname.dtx}{macos}}
-\file{\pkgname testlinux.tex}{\from{\pkgname.dtx}{linux}}
-\file{\pkgname testalphabets.tex}{\from{\pkgname.dtx}{alphabets}}
-\usepreamble\pkgpreamble
-\file{\pkgname.sty}{\from{\pkgname.dtx}{package}}}
+\def\testfilepreamble{%
+ \string\def\string\testfileincipit{Test file
+ to accompany \string\texttt{mathastext}^^J%
+ version \string\texttt{\MSTpkgversion} of \string\texttt{\MSTpkgdate}}}
+\generate{\nopreamble
+ \file{mathastext.tex}{\from{mathastext.dtx}{drv}}
+\usepreamble\testfilepreamble
+ \file{mathastexttestmathversions.tex}{\from{mathastext.dtx}{mathversions}}
+ \file{mathastexttestunicodemacos.tex}{\from{mathastext.dtx}{macos}}
+ \file{mathastexttestunicodelinux.tex}{\from{mathastext.dtx}{linux}}
+ \file{mathastexttestalphabets.tex}{\from{mathastext.dtx}{alphabets}}
+\usepreamble\defaultpreamble
+ \file{mathastext.sty}{\from{mathastext.dtx}{package}}%
+}
+\catcode32=13\relax% active space
+\let =\space%
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* mathastext.sty}
+\Msg{*}
+\Msg{* To produce the documentation run latex thrice on file mathastext.tex}
+\Msg{* and then run dvipdfmx on file mathastext.dvi}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
\endbatchfile
\endinput
%%