summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r--Master/texmf-dist/source/latex/mathastext/mathastext.dtx1378
-rw-r--r--Master/texmf-dist/source/latex/mathastext/mathastext.ins4
2 files changed, 933 insertions, 449 deletions
diff --git a/Master/texmf-dist/source/latex/mathastext/mathastext.dtx b/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
index 4f6d390e903..bd4647edf18 100644
--- a/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
+++ b/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
@@ -1,4 +1,5 @@
% \iffalse meta-comment
+% Time-stamp: <01-02-2011 10:35:07 CET JF>
% File `mathastext.dtx'
%
% Copyright (C) 2011 by Jean-Francois Burnol
@@ -20,9 +21,8 @@
% \iffalse
%<*dtx>
\ProvidesFile{mathastext.dtx}
- [2011/01/25 1.0 use text font also in math]
+ [2011/02/01 1.1 Use the text font in simple mathematics]
%</dtx>
-% \changes{1.0}{2011/01/25}{Initial version.}
%
%<*driver>
\documentclass[a4paper]{ltxdoc}
@@ -34,12 +34,58 @@
\setlength{\textwidth}{360pt}
\setlength{\oddsidemargin}{46pt}
\setlength{\marginparwidth}{100pt}
+%\RecordChanges
+%\OnlyDescription
\begin{document}
\DocInput{mathastext.dtx}
\end{document}
%</driver>
% \fi
%
+% \changes{1.0}{2011/01/25}{Initial version.}
+%
+% \changes{1.1}{2011/02/01}{
+% * option |italic|: this is the main change for the user. Internally we now
+% have two distinct fonts, however they differ only in shape.
+% * the mechanism of math versions is extended to accomodate this: the
+% macros \cs{MathastextWillUse} and \cs{MathastextDeclareVersion} now
+% accept an optional argument for specifying the letters' shape
+% * |frenchmath| sets the uppercase Latin letters nevertheless in the
+% digits font
+% * \cs{mathnormal}, \cs{mathrm}, \cs{mathbf} work in the same way as in
+% standard \LaTeX{}, but with the |mathastext| font. But I do nothing
+% with the other default alphabet changing commands.
+% * the minus sign can be represented as an en-dash. This seems to be clever
+% enough to accomodate all 8bit encodings, not limited to OT1 or T1.
+% * the |noplusnominus| option is split into two
+% * I change the way the encoding is chosen for the math accents: I use the
+% default encoding at the time of loading. So there is nothing more in the
+% code at AtBeginDocument for this. I do not know an automatic way to go
+% from the encoding to the accent slots, and I did not want to manually
+% incorporate here all possible or at least many encodings, so basically
+% only OT1 and T1 are ok. Default to OT1. Of course in case on more than one
+% math versions, they should have the same encoding for everything to work
+% everywhere.
+% * same change for \cs{imath}: but defaults to T1.
+% * some attention devoted to |hbar|. Works ok, or at least reasonably with
+% the fonts I tested. Adjusts to whether or not the |italic| option was used.
+% * |defaultvec| deprecated, rather we now have \cs{fouriervec} command to
+% access the vec accent from the Fourier font.
+% * new alphabet commands \cs{mathnormalbold}, \cs{MathEulerBold}, and
+% \cs{MathEuler} and \cs{MathPSymbol} have new names.
+% * names for the capital Greek letters which look like their Latin versions.
+% * bug fixed: the character slot for \cs{Xi} in the Symbol font was wrong.
+% **** limitations:
+% * the \cs{pmvec} accent will not change its size when
+% used in subscripts or exponents
+% * now that internally we have two fonts for letters and
+% digits they could be entirely unrelated, it is just a
+% question of providing the user macros to pass the info to
+% the package, and to duplicate some variables. As this
+% goes really against the initial design goals, and adds
+% complications, I did not do it.}
+%
+%
% \GetFileInfo{mathastext.dtx}
%
% \begin{center}
@@ -49,32 +95,29 @@
% \end{center}
%
% \begin{abstract}
-% The |mathastext| package\footnote{The file {\filename}
-% has version number \fileversion\ and was last revised on
-% \filedate.} propagates the document {\em text} font to
-% {\em mathematical} mode, for the letters of the Latin
-% alphabet and, optionally, some further ASCII-127
-% characters. The idea is to produce handouts or research
-% papers with a less book-like typography than what is
-% typical of standard \TeX\ with the Computer Modern
-% fonts. Hopefully, this will force the reader to
-% concentrate more on the contents ;-). It also makes it
-% possible (for a document with simple mathematics) to use
-% a quite arbitrary font without worrying too much that it
-% does not have specially designed accompanying math
-% fonts. Also, |mathastext| provides a simple mechanism in
-% order to use many different choices of (text hence, now,
-% math) fonts in the same document (not that we recommend
-% it!). A final aspect is that |mathastext| helps produce
-% smaller PDF files.
+% The |mathastext| package\footnote{This document describes |mathastext|
+% version \fileversion\ (\filedate).} propagates the document {\em text}
+% font to {\em mathematical} mode, for the letters and digits of the Latin
+% alphabet and, optionally, some further characters. The idea is to produce
+% handouts or research papers with a less book-like typography than what is
+% typical of standard \TeX\ with the Computer Modern fonts. Hopefully, this
+% will force the reader to concentrate more on the contents ;-). It also
+% makes it possible (for a document with simple mathematics) to use a quite
+% arbitrary font without worrying too much that it does not have specially
+% designed accompanying math fonts. Also, |mathastext| provides a simple
+% mechanism in order to use many different choices of (text hence, now,
+% math) fonts in the same document (not that we recommend it!). A final
+% aspect is that |mathastext| helps sometimes produce smaller PDF files.
%
% \begin{center}
-% Further documentation is available here:\\
+% Further documentation, and examples, are available here:\\
% |http://jf.burnol.free.fr/mathastext.html|
% \end{center}
% \end{abstract}
%
-% \section{Introduction}
+% \section{Description of what the package does}
+%
+% \subsection{Motivation}
%
% |mathastext| was conceived as a result of frustration of
% distributing to students \TeX-crafted mathematical handouts with
@@ -85,84 +128,198 @@
% days. Don't ask me if this helped, I have long since opted for a
% positive attitude in life.
%
-% The package |mathastext| is less extreme, but retains the idea of
-% using inside mathematics the same font as is used for text for
-% the letters of the Latin alphabet and the digits. By default
-% the text font will also be used for:\\
+% The package |mathastext| is less extreme, but retains the
+% idea of using inside mathematics the same font as is used for
+% text for the letters of the Latin alphabet and the digits. By
+% default the text font will also be used for:\\
% \centerline{!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
% \$\,\%\,\&}
-% and with option |alldelims| also for:\\
+% and with the option |alldelims| also for:\\
% \DeleteShortVerb{\|}
-% \centerline{$\mathord{<}\,\mathord{>}\,\mathord{|}$\,\{\,\} and
-% $\backslash$}
-% \MakeShortVerb{\|} Introducing this option was made
-% necessary by the absence in OT1-encoded fonts of these characters
-% (except for mono-width fonts). It is suitable for most other text
-% font encodings, such as T1.
+% \centerline{$\mathord{<}\,\mathord{>}\,\mathord{|}$\,\{\,\}
+% and $\backslash$} \MakeShortVerb{\|} Introducing this option
+% was made necessary by the absence of these characters in
+% OT1-encoded fonts (except for mono-width fonts). It is
+% suitable for most other text font encodings, such as T1.
+%
+% \subsection{Letters and digits}
+%
+% In the initial version |1.0|, we had the same shape both for
+% letters and digits, either the one given by \cs{shapedefault}
+% at the time of loading the package, or another one specified
+% by the user, and this was deliberate. This gives a very
+% uniform look to the document, so that one has to make an
+% effort and read it with attention, I explained above why I
+% did this on purpose.
+%
+% Nevertheless, soon after I posted 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
+% their kind remarks (chronological order).} on how to have
+% the letters be in italic shape.
+%
+% The new version |1.1| provides precisely this feature. The
+% default is still, as in version |1.0|, for everything to be
+% in upright shape, but it suffices to pass to the package the
+% option |italic|. There is now also an option |frenchmath| to
+% make the uppercase letters nevertheless upright, because this
+% is the way of traditional French mathematical typography.
+%
+% \subsection{Greek letters}
+%
+% Regarding the Greek letters: the default (lowercase) ones from
+% Computer Modern are slanted, hence, if the |italic| option
+% just mentioned was not made use of, they will not mix well
+% with upright letters (also the Computer Modern typefaces are
+% very light in comparison to many text fonts). So there are
+% options to take these glyphs either from the Euler font or
+% from the Postscript Symbol font. Both are included in all
+% \LaTeX{} distributions. Although no package loading is
+% necessary for the user, nor done internally by |mathastext|,
+% the file |uzeur.fd| from the |eulervm| package must be
+% accessible to \LaTeX{} as it provides a mechanism to scale by
+% an arbitrary factor the Euler font. For the Postscript Symbol
+% font (which is included in the basic \LaTeX{} distribution),
+% |mathastext| does internally what is necessary, so that in
+% both cases commands are provided so that the user can scale
+% the font with respect to nominal size.
%
-% If one wants to use Greek letters, then the default ones from
-% Computer Modern are slanted, and do not mix well with the
-% (typically) upright shape of the main document font (also they
-% will generally look much lighter, in comparison). So there are
-% options to take these glyphs either from the Euler font
-% (|mathastext| does not load the package |eulervm| but uses the
-% font definition file |uzeur.fd| from this package) or from the
-% Postscript Symbol font (included in the basic \LaTeXe{}
-% distribution). A command is provided to scale the chosen font by
-% an arbitrary factor. Of course, it is also possible to access
-% upright Greek letters via loading first specific packages
-% providing math fonts, for example the |fourier| package (with
-% option `upright'). One just has to make sure to load |mathastext|
-% as the last of the font-related packages.
+% Of course, it is also possible to access upright Greek
+% letters via loading first specific packages providing math
+% fonts, for example the |fourier| package (with option
+% `upright'). One just has to make sure to load |mathastext| as
+% the last one of the font-related packages.
%
-% As a convenience, |mathastext| provides an easy mechanism to use
-% further `math versions' than the default `normal' and `bold' from
-% the standard \LaTeX. A command is provided to declare arbitrarily
-% many fonts in the preamble, to be used later in the
-% document. Switching the `math version' in the document is now
-% done with a command which allows an optional argument in order to
-% also specify the new font to be used for the text.
+% \subsection{Math versions}
%
-% A poor man \cs{pmvec} command is provided as the default \cs{vec}
-% looks ugly on upright letters. Further, by default, this \cs{vec}
-% accent from Computer Modern is overwritten with the one coming
-% from the mathematics font of the |fourier| package.
+% \LaTeX{} has two math versions (|normal| and |bold|):
+% |mathastext| provides a straightforward mechanism to define
+% many more. Once declared in the preamble, these versions can
+% now be activated by a package provided command which adds to
+% the default \cs{mathversion} an optional argument which will
+% result in changing the text font. In the spirit of the
+% package the mandatory and optional arguments should be
+% identical, but the user can make an arbitrary
+% specification. For example this allows to use some font in
+% medium series for the text and at the same time the same font
+% in semi-bold series for the mathematics. Also the encoding
+% can be arbitrary; but as |mathastext| decides at the time
+% when it is loaded where to look for things like the en-dash,
+% or the dotless i and j, or the math accents, which are
+% encoding-dependent, there are obviously some limitations to
+% the use of these things in more than one math version.
+%
+% For basic use one does not need to worry about the purely
+% optional mechanism of math versions: to use the package, one
+% only needs loading it (the default font at the time of
+% loading the package will become the font used in
+% mathematics), with some options. We describe a few here, the
+% complete list is given in a later section.
+%
+% \subsection{Main options}
+% \begin{description}
+% \item[{\tt italic, frenchmath:}] was described above (new in |1.1|).
+% \item[{\tt endash:}] the minus sign is represented in mathematics mode by
+% the en-dash glyph from the text font (new in |1.1|).
+% \item[{\tt symbolgreek:}] the Greek letters will be taken from the
+% Postscript Symbol font.
+% \item[{\tt eulergreek:}] the Greek letters will be taken from the Euler
+% font.
+% \item[{\tt symbolmax:}] all characters other than letters and digits will
+% be taken from the Symbol font. This option also makes a number of
+% further glyphs available, including some basic mathematical arrows, as
+% well as the sum and product signs. For documents with very simple needs
+% in mathematical symbols, the options |symbolmax| (and another one
+% called |alldelims|) may give in the end a quite smaller PDF file, as
+% the Computer Modern fonts, or whatever mathematical fonts initially
+% loaded by packages for use in the document, may well be avoided
+% altogether.
+% \item[{\tt defaultmathsizes:}] the package |mathastext| opts for quite big
+% subscripts (and, copied from the |moresize| package, redefines
+% \cs{Huge} and defines \cs{HUGE}). Use this option to prevent it from
+% doing so.
+% \end{description}
+%
+% \subsection{Miscellaneous}
%
-% With the option |symbolmax|, besides the Greek letters, also the
-% characters which have been contaminated by |mathastext| (others
-% than letters and digits) will be taken from the Symbol font, and
-% use will be made of quite a number of further glyphs available
-% from this font, including some basic mathematical arrows, as well
-% as the sum and product signs. For documents with very simple
-% needs in mathematical symbols, the options |symbolmax| and
-% |alldelims| may give in the end a quite smaller PDF file, as the
-% Computer Modern fonts, or whatever mathematical fonts initially
-% loaded by packages for use in the document, may well be avoided
-% altogether.
+% The definition of \cs{hbar} inherited from default \LaTeX{}
+% will in our context make use of the |h| of the current math
+% font (so for us, it is also the text font, perhaps in italic
+% shape), but the bar accross the |h| will come from the
+% original default math font for letters (usually |cmmi|), and
+% furthermore its placement on the |h| can be odd-looking. So
+% we redefine \cs{hbar} to use only the text font (and this
+% will be aware of the |italic| option). Our construction does
+% not always give an optimal result, so an option |nohbar|
+% deactivates it (many font-related packages like |amsfonts|
+% have their own \cs{hbar}, but in the spirit of minimizing
+% font requirements, I felt compelled to try to do
+% something). There is no \cs{hslash} provided by the package,
+% though.
%
-% \section{Commands}
+% The default \cs{vec} accent is not appropriate for upright
+% letters, so the |mathastext| provides a \cs{fouriervec} which
+% takes its glyph in a Fourier font, and an Ersatz \cs{pmvec}
+% is provided which is reasonably good looking on upright
+% letters and works with the \cs{rightarrow} glyph. Contrarily
+% to version |1.0|, the default \cs{vec} is not overwritten
+% with \cs{fouriervec}.
+%
+% The \cs{mathnormal}, \cs{mathrm}, and \cs{mathbf} are
+% modified to use the text font (or the arbitrarily specified
+% font for a math version), and behave as in standard
+% \LaTeX{}. But we provide a new \cs{mathnormalbold}, to access
+% the bold letters while maintaining their italic shape (or
+% whatever shape has been specified for them) in case of the
+% |italic| option. Other math alphabet changing commands are
+% \cs{MathEulerBold}, \cs{MathEuler} and \cs{MathPSymbol}. Note
+% though that it is not possible to use too many of such
+% commands in the same document, due to some limitations of
+% \LaTeX{}. Declaring them does not seem to be a problem, and I
+% will welcome any information by knowledgeable people.
+%
+% \section{Commands provided by the package}
%
% \subsection{Preamble-only commands}
-% Nothing is necessary besides loading |mathastext|, possibly with
-% some customizing options (described next). The following commands
-% provide enhancements to the basic use of the package.
+% Nothing is necessary besides loading |mathastext|, possibly
+% with some customizing options. The following commands provide
+% enhancements to the basic use of the package.
% \begin{itemize}
% \item |\Mathastext|: reinitializes |mathastext| according to the current
% defaults of encoding, family, series and shape. It can also be preceded
% optionally by one or more of |\Mathastextencoding|\marg{enc},
% |\Mathastextfamily|\marg{fam}, |\Mathastextseries|\marg{ser},
-% |\Mathastextshape|\marg{sh}.
-% \item |\MathastextWillUse|\marg{enc}\marg{fam}\marg{ser}\marg{sh}: tells
+% |\Mathastextshape|\marg{sh}, and, new with version |1.1|,
+% |\Mathastextlettershape|\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 (medium)
+% series, upright shape, and the letters will be in italic shape.
+% \item |\MathastextWillUse|\oarg{ltsh}\marg{enc}\marg{fam}\marg{ser}\marg{sh}: tells
% |mathastext| 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.
+% 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}.
% \item
-% |\MathastextDeclareVersion|\marg{name}\marg{enc}\marg{fam}\marg{ser}\marg{sh}:
-% declares that the document will have access to the font with the
-% specified characteristics, under the version name
-% \meta{name}. To be used in
-% combination with the body command
-% |\MathastextVersion|\oarg{nametext}\marg{namemath}.
+% |\MathastextDeclareVersion|\oarg{ltsh}\marg{name}\marg{enc}\marg{fam}\marg{ser}\marg{sh}:
+% declares that the document will have access to the font
+% with the specified characteristics, under the version name
+% \meta{name}. For
+% example:\\
+% \hbox
+% to\hsize{\hss|\MathastextDeclareVersion[sc]{palatino}{T1}{ppl}{b}{sl}|\hss}
+% declares under the name |palatino| a version where
+% mathematics will be typset 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
+% optional argument is absent, and |mathastext| was loaded
+% with the |italic| option, then the default letter shape
+% will be |it|,\footnote{more precisely, the shape is the
+% latest value passed in one of the previously used package
+% 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.
% \item |\Mathastextboldvariant|\marg{var}: when used before |\Mathastext|,
% specifies which bold
% (|b|,|sb|,|bx|,\dots) to be used by \cs{mathbf} (and
@@ -175,42 +332,82 @@
% \meta{factor}.
% \end{itemize}
%
-% \subsection{Body commands}
+% \subsection{Body Text and Math commands}
%
% \begin{itemize}
% \item |\MathastextVersion|\oarg{nametext}\marg{namemath}: changes the
-% math font, and optionally also the text font. To be used like the
-% \LaTeXe{} command \cs{mathversion}, outside of mathematics mode. All
-% further commands described here are math-only.
-% \item |\pmvec|: this provides a poor man \cs{vec} accent command,
-% suitable for upright characters. By default the original \cs{vec} is
-% also replaced by a version using the arrow from the Fourier font.
+% math font, and optionally also the text font. This is to be used like
+% the \LaTeXe{} command \cs{mathversion}, outside of mathematics mode. If
+% no optional argument is given then is equivalent to
+% \cs{mathversion}\marg{nameversion}.
+% \end{itemize}
+% All further commands are for math mode only.
+% \begin{itemize}
+% \item \cs{hbar}: this is constructed (in a way compatible
+% with the |italic| option) from the |h| letter and the
+% \={ } accent from the |mathastext| font (as the
+% package only really knows about OT1 and T1 encodings,
+% \cs{hbar} might not be correct in other encodings). Note
+% that \cs{mathrm}|{\hbar}| and \cs{mathbf}|{\hbar}| should
+% work and that \cs{hbar} does scale in subscripts and exponents.
+% \item |\fouriervec|: this is a |\vec| accent taken from the Fourier font;
+% the |fourier| package need not be loaded.
+% \item |\pmvec|: this provides a poor man \cs{vec} accent command, for
+% upright letters. It uses the right arrow. Does not change
+% size in subscripts and exponents.
% \item |\Mathnormal|, |\Mathrm|, |\Mathbf|: suitable modifications of the
% original \cs{mathnormal}, \cs{mathrm}, \cs{mathbf}. By default, the
% originals are also overwritten by the new commands.
+% \item |\mathnormalbold|: a bold version of \cs{mathnormal}.
% \item |\inodot|, |\jnodot|: the corresponding glyphs in the
% chosen font. By default, will overwrite |\imath| and |\jmath|.
-% \item |\omicron|: provides access to the omicron glyph.
-% \item |\MathastextEuler|\marg{}: math alphabet to access all the glyphs
-% of the Euler font, if option |eulergreek| (or |eulerdigits|) was passed
-% to the package.
-% \item |\MathastextSymbol|\marg{}: math alphabet to access all the glyphs
-% of the Symbol font, if loaded by one of the related options.
-% \item see the documentation file mathastext-doc.pdf for the character
-% commands made available when the Symbol font has been requested by one
-% of the related options.
+% \item |\MathEuler|, |\MathEulerBold|: math alphabets to access
+% all the glyphs of the Euler font, if option |eulergreek| (or
+% |eulerdigits|) was passed to the package.
+% \item |\MathPSymbol|: math alphabet to access the Symbol font.
+% \item Capital Greek letters: macro names \cs{Digamma}, \cs{Alpha},
+% \cs{Beta}, \cs{Epsilon}, \cs{Zeta}, \cs{Eta}, \cs{Iota}, \cs{Kappa},
+% \cs{Mu}, \cs{Nu}, \cs{Omicron}, \cs{Rho}, \cs{Tau}, \cs{Chi} are
+% provided for the capital Greek letters which look like their Latin
+% counterparts. This is not done if the package detects that |\digamma|
+% is a defined macro, as then it is assumed that a suitable package has
+% been loaded for Greek letters. Also an \cs{omicron} control sequence is
+% provided.
+% \item Miscelleneous mathematical symbols are made available (or replaced)
+% when option |symbolmisc| is passed. They are
+% \cs{prod}, \cs{sum}, \cs{implies}, \cs{impliedby}, \cs{iff},
+% \cs{shortiff}, \cs{to}, \cs{longto}, \cs{mapsto}, \cs{longmapsto},
+% \cs{aleph}, \cs{inftypsy}, \cs{emptyset}, \cs{surd}, \cs{nabla},
+% \cs{angle}, \cs{forall}, \cs{exists}, \cs{neg}, \cs{clubsuit},
+% \cs{diamondsuit}, \cs{heartsuit}, \cs{spadesuit}, \cs{smallint},
+% \cs{wedge}, \cs{vee}, \cs{cap}, \cs{cup}, \cs{bullet}, \cs{div},
+% \cs{otimes}, \cs{oplus}, \cs{pm}, \cs{ast}, \cs{times}, \cs{proptopsy},
+% \cs{mid}, \cs{leq}, \cs{geq}, \cs{approx}, \cs{supset}, \cs{subset},
+% \cs{supseteq}, \cs{subseteq}, \cs{in}, \cs{sim}, \cs{cong}, \cs{perp},
+% \cs{equiv}, \cs{notin}, \cs{langle}, \cs{rangle}. And a \cs{DotTriangle}
+% is made available by option |symbolre| (which also overwrites \cs{Re} and
+% \cs{Im}.)
% \end{itemize}
%
-% \section{Options}
+% \section{Complete list of options}
%
% \begin{itemize}
% \item |basic|: only mathastextify letters and digits.
+% \item |italic|: the letters will default to italic shape in
+% math mode.
+% \item |frenchmath|: uppercase Latin letters in the same font as for digits
+% and operator names. In general this means that they will be upright.
+% \item |endash|, |emdash|: use the text font en-dash \textendash\ or even
+% the em-dash \textemdash\ (but this seems crazy) for the minus sign
+% rather than {}-{}.
+% \item |nohbar|: prevents |mathastext| from defining its own
+% \cs{hbar}.
% \item |alldelims|: \DeleteShortVerb{\|} besides the default
% !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,\$\,\%\,\& treat also
% $\mathord{<}\,\mathord{>}\,\mathord{|}$\, \{\,\} and $\backslash$.\MakeShortVerb{\|} Not suitable for
% OT1-encoding.
% \item excluding options: |noexclam|\ !\,?\ |noasterisk|\ *\ |nopunct|\
-% ,\,.\,:\,;\ |noplusnominus|\ +\,- |noequal|\ =\ |noparenthesis|\,
+% ,\,.\,:\,;\ |noplus|, |nominus|, |noplusnominus|\ +\,- |noequal|\ =\ |noparenthesis|\,
% (\,)\,[\,]\,/ \ |nospecials|\ \#\,\$\,\%\,\& and |nodigits|.
% \item |symbolgreek|, |symboldigits|: to let Greek letters (digits) use the
% Symbol font.
@@ -218,28 +415,33 @@
% Euler font.
% \item |selfGreek|: this is for a font which has the capital Greek
% letters at the OT1 slot positions.
-% \item |mathaccents|: use the text font also for the math accents.
+% \item |mathaccents|: use the text font also for the math
+% accents. As in vanilla \LaTeX{}, they are taken from the font
+% for the digits and \cs{log}-like names. Obey the alphabet
+% changing commands. Will work only for T1 or OT1-compatible encodings.
% \item |symbolre|: replaces \cs{Re} and \cs{Im} by Symbol glyphs and defines a
% \cs{DotTriangle} command.
% \item |symbolmisc|: takes quite a few glyphs, including logical arrows,
-% product and sum signs from Symbol. You may consider
-% \cs{renewcommand}|{\int}{\smallint}| to maximize still more the
-% use of the Symbol font.
+% product and sum signs from Symbol. They are listed \emph{supra}.. You may
+% also consider \cs{renewcommand}|{\int}{\smallint}| to maximize still more
+% the use of the Symbol font.
% \item |symbol|: combines |symbolgreek|, |symbolre|, and |symbolmisc|.
% \item |symbolmax|: same as |symbol| and furthermore the characters listed
% above are also taken from the Symbol font.
% \item |defaultrm|, |defaultbf|, |defaulnormal|, |defaultimath|:
% self-explanatory.
-% \item |defaultmathsizes|: |mathastext| opts for quite big subscripts (and,
-% copied from the |moresize| package, redefines \cs{Huge} and defines
-% \cs{HUGE}). Use this option to prevent it from doing so.
+% \item |defaultmathsizes|: has been described \emph{supra}.
% \end{itemize}
%
% \StopEventually{}
%
+% \section{Commented source code}
+%
+%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{mathastext.sty}[2011/01/25 1.0 use text font also in math]
+\ProvidesFile{mathastext.sty}
+ [2011/02/01 1.1 Use the text font in simple mathematics]
% \end{macrocode}
% We turn off the official loggings as we intend to write our owns
% \begin{macrocode}
@@ -257,27 +459,34 @@
% \begin{macrocode}
\newif\ifmt@need@euler\mt@need@eulerfalse
\newif\ifmt@need@symbol\mt@need@symbolfalse
-\newif\ifmt@defaultvec\mt@defaultvecfalse
\newif\ifmt@defaultnormal\mt@defaultnormalfalse
\newif\ifmt@defaultrm\mt@defaultrmfalse
\newif\ifmt@defaultbf\mt@defaultbffalse
\newif\ifmt@defaultsizes\mt@defaultsizesfalse
\newif\ifmt@twelve\mt@twelvefalse
-\newif\ifall@OTone
-\newif\ifall@Tone
+\newif\ifmt@endash\mt@endashfalse
+\newif\ifmt@emdash\mt@emdashfalse
+\def\mt@oti{OT1}\def\mt@ti{T1}
% \end{macrocode}
% The options:
% \begin{macrocode}
-\DeclareOption{noparenthesis}{\let\mt@noparen\@empty}
-\DeclareOption{nopunctuation}{\let\mt@nopunct\@empty}
-\DeclareOption{noplusnominus}{\let\mt@noplusnominus\@empty}
-\DeclareOption{noequal}{\let\mt@noequal\@empty}
-\DeclareOption{noexclam}{\let\mt@noexclam\@empty}
-\DeclareOption{noasterisk}{\let\mt@noast\@empty}
-\DeclareOption{nospecials}{\let\mt@nospecials\@empty}
+\DeclareOption{noparenthesis}{\let\mtno@paren\@empty}
+\DeclareOption{nopunctuation}{\let\mtno@punct\@empty}
+%% new in v1.1:
+\DeclareOption{endash}{\mt@endashtrue}
+\DeclareOption{emdash}{\mt@emdashtrue}
+\DeclareOption{noplus}{\let\mtno@plus\@empty}
+\DeclareOption{nominus}{\let\mtno@minus\@empty}
+\DeclareOption{nohbar}{\let\mtno@hbar\@empty}
+%%
+\DeclareOption{noplusnominus}{\ExecuteOptions{noplus,nominus}}
+\DeclareOption{noequal}{\let\mtno@equal\@empty}
+\DeclareOption{noexclam}{\let\mtno@exclam\@empty}
+\DeclareOption{noasterisk}{\let\mtno@ast\@empty}
+\DeclareOption{nospecials}{\let\mtno@specials\@empty}
\DeclareOption{basic}{\ExecuteOptions{noparenthesis,%
nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
-\DeclareOption{nodigits}{\let\mt@nodigits\@empty}
+\DeclareOption{nodigits}{\let\mtno@digits\@empty}
\DeclareOption{defaultimath}{\let\mt@defaultimath\@empty}
\DeclareOption{alldelims}{\let\mt@alldelims\@empty}
\DeclareOption{mathaccents}{\let\mt@mathaccents\@empty}
@@ -300,16 +509,21 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareOption{defaultrm}{\mt@defaultrmtrue}
\DeclareOption{defaultbf}{\mt@defaultbftrue}
% \end{macrocode}
-% We will change the default script and scriptscript sizes, and also we will
+% We intend to change the default script and scriptscript sizes, and also to
% declare a \cs{HUGE} size and modify the \cs{Huge} one at 12pt (taken from
-% the |moresize| package.)
+% the |moresize| package). So we have an option to maintain default situation.
% \begin{macrocode}
\DeclareOption{defaultmathsizes}{\mt@defaultsizestrue}
\DeclareOption{12pt}{\mt@twelvetrue}
-\DeclareOption{defaultvec}{\mt@defaultvectrue}
+%% deprecated in v1.1, rather a command \fouriervec is provided
+%% \DeclareOption{defaultvec}{\mt@defaultvectrue}
+%% new in v1.1
+\DeclareOption{italic}{\let\mt@italic\@empty}
+\DeclareOption{frenchmath}{\let\mt@frenchmath\@empty}
\DeclareOption*{\PackageWarning{mathastext}{Unknown option `\CurrentOption'}}
\ProcessOptions\relax
% \end{macrocode}
+%%
% \begin{macro}{\pmvec}
% Definition of a poor man version of the \cs{vec} accent
% \begin{macrocode}
@@ -317,54 +531,111 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
{\tiny\boldmath$\mathord{\rightarrow}$}}{{}#1}}}
% \end{macrocode}
% \end{macro}
-% By default we pick a up the replacement for \cs{vec} from the Fourier font
-% of Michel~\textsc{Bovani}.
+% \begin{macro}{\fouriervec}
+% The glyph is taken from the Fourier font of Michel~\textsc{Bovani}.
% \begin{macrocode}
-\ifmt@defaultvec\else
\DeclareFontEncoding{FML}{}{}
\DeclareFontSubstitution{FML}{futm}{m}{it}
- \DeclareSymbolFont{justepourvec}{FML}{futm}{m}{it}
- \SetSymbolFont{justepourvec}{bold}{FML}{futm}{b}{it}
- \DeclareMathAccent{\vec}{\mathord}{justepourvec}{"7E}
-\fi
+ \DeclareSymbolFont{mtjustepourvec}{FML}{futm}{m}{it}
+ \SetSymbolFont{mtjustepourvec}{bold}{FML}{futm}{b}{it}
+ \DeclareMathAccent{\fouriervec}{\mathord}{mtjustepourvec}{"7E}
% \end{macrocode}
-% Internal variables and associated public macros.
+% \end{macro}
+% \begin{macro}{\m@stextenc}
+% \begin{macro}{\m@stextfam}
+% \begin{macro}{\m@stextser}
+% \begin{macro}{\m@stextsh}
+% \begin{macro}{\m@stextbold}
+% \begin{macro}{\m@stextshletter}
+% Internal variables.
% \begin{macrocode}
\edef\m@stextenc{\encodingdefault}
\edef\m@stextfam{\familydefault}
\edef\m@stextser{\seriesdefault}
\edef\m@stextsh{\shapedefault}
\edef\m@stextbold{\bfdefault}
-\DeclareRobustCommand\Mathastextencoding[1]{\edef\m@stextenc{#1}}
-\DeclareRobustCommand\Mathastextfamily[1]{\edef\m@stextfam{#1}}
-\DeclareRobustCommand\Mathastextseries[1]{\edef\m@stextser{#1}}
-\DeclareRobustCommand\Mathastextshape[1]{\edef\m@stextsh{#1}}
-\DeclareRobustCommand\Mathastextboldvariant[1]{\edef\m@stextbold{#1}}
+ \edef\m@stextshletter{\shapedefault}
+ \ifx\mt@italic\@empty\edef\m@stextshletter{\itdefault}\fi
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{mtoperatorfont}
+% Declaration of the current default font as our math font.
+% \begin{macrocode}
+\DeclareSymbolFont{mtoperatorfont}
+ {\m@stextenc}{\m@stextfam}{\m@stextser}{\m@stextsh}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{mtletterfont}
+% In version 1.1, we add the possibility to mimick the standard
+% behavior, that is to have italic letters and upright
+% digits. Thanks to Tariq~\textsc{Perwez} and
+% Kevin~\textsc{Klement} who asked for such a feature.
+% \begin{macrocode}
+\DeclareSymbolFont{mtletterfont}
+ {\m@stextenc}{\m@stextfam}{\m@stextser}{\m@stextshletter}
+\DeclareSymbolFontAlphabet{\Mathnormal}{mtletterfont}
+\DeclareSymbolFontAlphabet{\Mathrm}{mtoperatorfont}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{mteulervm}
+% \begin{macro}{\MathEuler}
+% In v1.0 this was called \cs{MathastextEuler}
+%
% In case we need the Euler font, we declare it here. It will use
% |uzeur.fd| from the |eulervm| package of Walter~\textsc{Schmidt}
% \begin{macrocode}
\ifmt@need@euler
\DeclareSymbolFont{mteulervm}{U}{zeur}{m}{n}
+\DeclareSymbolFontAlphabet{\MathEuler}{mteulervm}
%% \SetSymbolFont{mteulervm}{bold}{U}{zeur}{\m@stextbold}{n}
+\fi
+\newcommand\MathastextEulerScale[1]{\edef\zeu@Scale{#1}}
% \end{macrocode}
-% In the end, I moved the above line to \cs{Mathastext} as the user may want
+% \end{macro}
+% \end{macro}
+% In the end, I moved the bold stuff to \cs{Mathastext} as the user may want
% his choice of |boldvariant| to have effect on the Euler font, but anyhow
% |b=bx| for |uzeur.fd|, so this is pour la beaut\'e de l'Art (well it is
% also possible to use \cs{Mathastextboldvariant} to specify |m| for
-% example). Also I do not see an easy way to have \cs{mathbf} act correctly
-% simultaneously on the now two distinct fonts for a-Z and for
-% \cs{alpha}-\cs{omega}. I know of a way (which would be to change mathcodes
-% on the fly see my post
-% |http://tug.org/pipermail/texhax/2011-January/016605.html|) but this is a
-% lot of work for a minuscule interest. If we had followed that route we
-% would have had to also keep track of the choice of bold variant in the
-% mechanism of \cs{MathastextVersion}, defined later in this code.
-% \begin{macrocode}
-\DeclareSymbolFontAlphabet{\MathastextEuler}{mteulervm}
-\fi
-\newcommand\MathastextEulerScale[1]{\edef\zeu@Scale{#1}}
-% \end{macrocode}
+% example).
+%
+% \LaTeXe{} has a strange initial configuration where the capital Greek
+% letters are of type |mathalpha|, but the lower Greek letters of type
+% |mathord|, so that \cs{mathbf} does not act on them, although lowercase Greek
+% letters and latin letters are from the same font. This is because \cs{mathbf}
+% is set up to be like a bold version of \cs{mathrm}, and \cs{mathrm} uses the
+% `operators' font, by default |cmr|, where there are no lowercase greek
+% letters. This set-up is ok for the Capital Greek letters which are together
+% with the latin letters in both |cmmi| and |cmr|.
+%
+% The package eulervm sets also the lowercase Greek letters to be of type
+% |mathalpha|, the default \cs{mathbf} and \cs{mathrm} will act wierdly on
+% them, but a new \cs{mathbold} is defined which will use the bold series of
+% the Euler roman font, it gives something coherent for Latin and Greek
+% \emph{lowercase} letters, and this is possible because the same font contains
+% upright forms for them all.
+%
+% Here in |mathastext|, Latin letters and Greek letters (lower and
+% upper case) must be assumed to come from two different fonts, as
+% a result the standard \cs{mathbf} (and \cs{mathrm}) will give
+% weird results when used for Greek letters. It would be tricky
+% but not impossible to coerce \cs{mathbf} to do something
+% reasonable. I posted the method I have in mind to the texhax
+% mailing list
+% (|http://tug.org/pipermail/texhax/2011-January/016605.html|) but
+% at this time |30-01-2011 09:42:27 CET| I decided I would not try
+% to implement it here. I prefer to respect the default things.
+%
+% Here I followed the simpler idea of the |eulervm| package and
+% defined \cs{MathEuler} and \cs{MathEulerBold} alphabet commands
+% (the |eulervm| package does this only for the bold font).
+% \begin{macro}{mtpsymbol}
+% \begin{macro}{\MathPSymbol}
% In case we need the Symbol font, we declare it here. The macro
% \cs{psy@scale} will be used to scale the font (see at the
% very end of this file).
@@ -373,105 +644,174 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\def\psy@scale{1}
\DeclareSymbolFont{mtpsymbol}{U}{psy}{m}{n}
%% \SetSymbolFont{mtpsymbol}{bold}{U}{psy}{\m@stextbold}{n}
-% \end{macrocode}
-% We move the above line to \cs{Mathastext} in case the user has used
-% \cs{Mathastextboldvariant}, but in fact there is no bold for the
-% postscript Symbol font distributed with the \LaTeXe{} package
-% |psnffs|. So, this is again pour la beaut\'e de l'Art.
-% \begin{macrocode}
- \DeclareSymbolFontAlphabet{\MathastextSymbol}{mtpsymbol}
+ \DeclareSymbolFontAlphabet{\MathPSymbol}{mtpsymbol}
\fi
\newcommand\MathastextSymbolScale[1]{\edef\psy@scale{#1}}
% \end{macrocode}
-% Declaration of the current default font as our math font.
+% In v1.0 this was called \cs{MathastextSymbol}. I did not choose
+% \cs{MathSymbol} as this name may be defined somewhere for another thing.
+% \end{macro}
+% There is no bold for the postscript Symbol font distributed with the
+% \LaTeXe{} |psnffs|. In v1.0 I included some code ready for an
+% eventual bold, one never knows which might come in an update to the |psnfss|
+% package, but, if this day arrives, I or someone else shall simply upgrade
+% the package.
+% \end{macro}
+% \begin{macro}{\Mathastextencoding}
+% \begin{macro}{\Mathastextfamily}
+% \begin{macro}{\Mathastextseries}
+% \begin{macro}{\Mathastextshape}
+% \begin{macro}{\Mathastextboldvariant}
+% \begin{macro}{\Mathastextlettershape}
+% We declare some public macros to modify our private internals, and we will
+% use them also ourself.
+%
+% In version 1.1 we add the possibility to have two distinct font shapes for
+% letters and digits. So in fact we could as well have two really unrelated
+% fonts but this is really not the spirit of the package, already making
+% italic letters easy for the user was only made possible by a moment of
+% weakness of the package author.
% \begin{macrocode}
-\DeclareSymbolFont{mtcurrentfont}
- {\m@stextenc}{\m@stextfam}{\m@stextser}{\m@stextsh}
-\DeclareSymbolFontAlphabet{\Mathnormal}{mtcurrentfont}
+\DeclareRobustCommand\Mathastextencoding[1]{\edef\m@stextenc{#1}}
+\DeclareRobustCommand\Mathastextfamily[1]{\edef\m@stextfam{#1}}
+\DeclareRobustCommand\Mathastextseries[1]{\edef\m@stextser{#1}}
+\DeclareRobustCommand\Mathastextshape[1]{\edef\m@stextsh{#1}}
+\DeclareRobustCommand\Mathastextboldvariant[1]{\edef\m@stextbold{#1}}
+\DeclareRobustCommand\Mathastextlettershape[1]{\edef\m@stextshletter{#1}}
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\MathastextWillUse}
+% This is a preamble-only command, it can be called more than once, only the
+% latest call counts.
% \begin{macrocode}
-\DeclareRobustCommand\MathastextWillUse[4]{
- \Mathastextencoding{#1}
- \Mathastextfamily{#2}
- \Mathastextseries{#3}
- \Mathastextshape{#4}
+\DeclareRobustCommand\MathastextWillUse[5][\@empty]{
+ \ifx\@empty#1\else\Mathastextlettershape{#1}\fi
+ \Mathastextencoding{#2}
+ \Mathastextfamily{#3}
+ \Mathastextseries{#4}
+ \Mathastextshape{#5}
\Mathastext}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\Mathastext}
-% The command \cs{Mathastext} can be called by the user anywhere in the
-% preamble and any number of time, the last one is the one that counts.
+% The command \cs{Mathastext} can be used anywhere in the preamble and any
+% number of time, the last one is the one that counts.
+%
+% In version 1.1 we have two fonts: they only differ in shape. The
+% |mtletterfont| is for letters, and the |mtoperatorfont| for digits and
+% log-like operator names. The default is that both are upright.
% \begin{macrocode}
\DeclareRobustCommand\Mathastext{
\mt@font@info@off
- \def\tmp@a{OT1}
- \def\tmp@b{T1}
- \ifx\tmp@a\m@stextenc
- \all@OTonetrue\else\all@OTonefalse\fi
- \ifx\tmp@b\m@stextenc
- \all@Tonetrue\else\all@Tonefalse\fi
\edef\mt@encoding@normal{\m@stextenc}
\edef\mt@family@normal{\m@stextfam}
\edef\mt@series@normal{\m@stextser}
\edef\mt@shape@normal{\m@stextsh}
+ \edef\mt@ltshape@normal{\m@stextshletter}
\edef\mt@boldvariant@normal{\m@stextbold}
\edef\mt@encoding@bold{\m@stextenc}
\edef\mt@family@bold{\m@stextfam}
\edef\mt@series@bold{\m@stextbold}
\edef\mt@shape@bold{\m@stextsh}
+ \edef\mt@ltshape@bold{\m@stextshletter}
\edef\mt@boldvariant@bold{\m@stextbold}
- \SetSymbolFont{mtcurrentfont}{normal}{\mt@encoding@normal}
+%%
+ \SetSymbolFont{mtletterfont}{normal}{\mt@encoding@normal}
+ {\mt@family@normal}
+ {\mt@series@normal}
+ {\mt@ltshape@normal}
+ \SetSymbolFont{mtletterfont}{bold} {\mt@encoding@bold}
+ {\mt@family@bold}
+ {\mt@series@bold}
+ {\mt@ltshape@bold}
+ \SetSymbolFont{mtoperatorfont}{normal}{\mt@encoding@normal}
{\mt@family@normal}
{\mt@series@normal}
{\mt@shape@normal}
- \SetSymbolFont{mtcurrentfont}{bold} {\mt@encoding@bold}
+ \SetSymbolFont{mtoperatorfont}{bold} {\mt@encoding@bold}
{\mt@family@bold}
{\mt@series@bold}
{\mt@shape@bold}
- \DeclareMathAlphabet{\Mathbf} {\mt@encoding@bold}
+% \end{macrocode}
+% \begin{macro}{\Mathbf}
+% We follow the standard \LaTeX{} behavior for \cs{mathbf}, which is to pick up
+% the bold series of the roman font (digits and operator names).
+% \begin{macrocode}
+ \DeclareMathAlphabet{\Mathbf} {\mt@encoding@bold}
{\mt@family@bold}
{\mt@series@bold}
{\mt@shape@bold}
- \ifmt@need@euler\SetSymbolFont{mteulervm}{bold}{U}{zeur}{\m@stextbold}{n}\fi
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\mathnormalbold}
+% We add a new Alphabet changing macro to standard \LaTeX{}
+% \begin{macrocode}
+ \DeclareMathAlphabet{\mathnormalbold} {\mt@encoding@bold}
+ {\mt@family@bold}
+ {\mt@series@bold}
+ {\mt@ltshape@bold}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\MathEulerBold}
+% We define it here as we leave open the possibility to deactivate it via
+% using \cs{Mathastextboldvariant}|{m}|.
+% \begin{macrocode}
+ \ifmt@need@euler
+ \SetSymbolFont{mteulervm}{bold}{U}{zeur}{\m@stextbold}{n}
+ \DeclareMathAlphabet{\MathEulerBold}{U}{zeur}{\m@stextbold}{n}
+ \fi
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
\ifmt@need@symbol\SetSymbolFont{mtpsymbol}{bold}{U}{psy}{\m@stextbold}{n}\fi
\typeout{** Latin letters in math versions normal (resp. bold) are now^^J%
- ** set up to use fonts
-\mt@encoding@normal/\mt@family@normal/\mt@series@normal(\m@stextbold)/\mt@shape@normal}
- \mt@font@info@on
+ ** set up to use the fonts
+\mt@encoding@normal/\mt@family@normal/\mt@series@normal(\m@stextbold)/\mt@ltshape@normal}
+\ifx\mtno@digits\@empty\else
+ \typeout{** Other characters (digits, ...) and
+ \protect\log-like names will be^^J%
+** typeset with the \expandafter`\mt@shape@normal' shape.}
+\fi
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\operator@font}
-% We modify this \LaTeX{} internal variable in order for the predefined
-% \cs{cos}, \cs{sin}, etc\dots to be typeset with the |mathastext| font.
-% This will also work for things declared through the |amsmath| package
-% command \cs{DeclareMathOperator}. The alternative would have been to
-% redefine the `operators' Math Symbol Font. Obviously people who expect
-% that \cs{operator@font} will always refer to the `operators' font might
-% be in for a surprise\dots{} well, we'll see.
+% We modify this \LaTeX{} internal variable in order for the
+% predefined \cs{cos}, \cs{sin}, etc\dots to be typeset with the
+% |mathastext| font. This will also work for things declared
+% through the |amsmath| package command
+% \cs{DeclareMathOperator}. The alternative would have been to
+% redefine the `operators' Math Symbol Font. Obviously people
+% who expect that \cs{operator@font} will always refer to the
+% `operators' math font might be in for a surprise\dots{} well,
+% we'll see.
% \begin{macrocode}
-\def\operator@font{\mathgroup\symmtcurrentfont}
+\def\operator@font{\mathgroup\symmtoperatorfont}
% \end{macrocode}
% \end{macro}
% Initialization call:
% \begin{macrocode}
\Mathastext
-\newcommand{\Mathrm}{\Mathnormal}
% \end{macrocode}
-% We will access by default the \cs{omicron} via \cs{mathnormal}. So we save
-% it for future use
+% We redefine the normal, rm and bf alphabets. In version 1.1 we
+% follow the standard: normal gives the font for letters, rm gives
+% the font for digits and log-like names, bf for the bold series
+% of the font for digits and log-like names.
+%
+% We will access by default the \cs{omicron} via
+% \cs{mathnormal}. So we save it for future use. But
+% unfortunately the Fourier package with the upright option does
+% not have an upright omicron obtainable by simply typing
+% \cs{mathnormal}|{o}|. So in this case we shall use \cs{mathrm}
+% and not \cs{mathnormal}.
% \begin{macrocode}
\let\mt@saved@mathnormal\mathnormal
-% \end{macrocode}
-% But unfortunately the Fourier package with the upright option does not have
-% an upright omicron obtainable by simply typing \cs{mathnormal}|{o}|. So in
-% this case we shall use \cs{mathrm} and not \cs{mathnormal}.
-% \begin{macrocode}
\@ifpackageloaded{fourier}{\ifsloped\else\let\mt@saved@mathnormal\mathrm\fi}{}
-% \end{macrocode}
-% By default we redefine the normal, rm and bf alphabets.
-% \begin{macrocode}
\ifmt@defaultnormal\else\renewcommand{\mathnormal}{\Mathnormal}\fi
\ifmt@defaultrm\else\renewcommand{\mathrm}{\Mathrm}\fi
\ifmt@defaultbf\else\renewcommand{\mathbf}{\Mathbf}\fi
@@ -491,32 +831,61 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
** only for OT1 or compatible encodings; glyphs may be unavailable.}
\fi
% \end{macrocode}
+% \begin{macro}{\MathastextDeclareVersion}
% The \cs{MathastextDeclareVersion} command is to be used in the preamble to
% declare a math version. I refrained from providing a more complicated one
% which would also specify a choice of series for the Euler and Symbol font:
% anyhow Symbol only has the medium series, and Euler has medium and bold, so
% what is lacking is the possibility to create a version with a bold
% Euler. There is already one such version: the default |bold| one. And there
-% is always the possibility to add to the preamble a suitable
-% \cs{SetSymbolFont}|{mteulervm}||{name_of_version}||{U}{zeur}{bx}{n}|
+% is always the possibility to add to the preamble
+% \cs{SetSymbolFont}|{mteulervm}||{version}||{U}{zeur}{bx}{n}| if one
+% wants to have a math version with bold Euler characters.
+%
+% For version 1.1 we add an optional parameter specifying the shape to be used
+% for letters: most users will want `it' (thus going contrary to the
+% philosophy which motivated me writing this package!). If the package option
+% `italic' was passed, `it' is the default.
% \begin{macrocode}
-\DeclareRobustCommand\MathastextDeclareVersion[5]{
+\DeclareRobustCommand\MathastextDeclareVersion[6][\@empty]{
\mt@font@info@off
- \update@the@ifs{#2}
- \DeclareMathVersion{#1}
- \SetSymbolFont{mtcurrentfont}{#1}{#2}{#3}{#4}{#5}
- \SetMathAlphabet{\Mathbf}{#1}{#2}{#3}{\m@stextbold}{#5}
- \edef\mt@tmp{@#1}
- \expandafter\edef\csname mt@encoding\mt@tmp\endcsname{#2}
- \expandafter\edef\csname mt@family\mt@tmp\endcsname{#3}
- \expandafter\edef\csname mt@series\mt@tmp\endcsname{#4}
- \expandafter\edef\csname mt@shape\mt@tmp\endcsname{#5}
+ \DeclareMathVersion{#2}
+ \edef\mt@tmp{@#2}
+ \expandafter\edef\csname mt@encoding\mt@tmp\endcsname{#3}
+ \expandafter\edef\csname mt@family\mt@tmp\endcsname{#4}
+ \expandafter\edef\csname mt@series\mt@tmp\endcsname{#5}
+ \expandafter\edef\csname mt@shape\mt@tmp\endcsname{#6}
\expandafter\edef\csname mt@boldvariant\mt@tmp\endcsname{\m@stextbold}
- \typeout{** Latin letters in math version `#1' will use fonts
- #2/#3/#4(\m@stextbold)/#5}
+ \ifx\@empty#1
+ \ifx\mt@italic\@empty
+ \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{\m@stextshletter}
+ \typeout{** Latin letters in math version `#2' will use the font
+ #3/#4/#5/\m@stextshletter^^J%
+ ** Other characters (digits, ...) and \protect\log-like names
+ will be in `#6' shape.}
+ \expandafter\def\csname mt@ltshape\mt@tmp\endcsname{\m@stextshletter}
+ \else
+ \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#6}
+ \typeout{** Latin letters in math version `#2' will use the fonts
+ #3/#4/#5(\m@stextbold)/#6}
+ \expandafter\edef\csname mt@ltshape\mt@tmp\endcsname{#6}
+ \fi
+ \else
+ \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#1}
+ \typeout{** Latin letters in math version `#2' 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 mt@ltshape\mt@tmp\endcsname{#1}
+ \fi
+ \SetMathAlphabet{\Mathbf}{#2}{#3}{#4}{\m@stextbold}{#6}
+ \SetSymbolFont{mtoperatorfont}{#2}{#3}{#4}{#5}{#6}
+ \ifmt@need@euler
+ \SetMathAlphabet{\MathEulerBold}{#2}{U}{zeur}{\m@stextbold}{n}
+ \fi
\mt@font@info@on
}
% \end{macrocode}
+% \end{macro}
% \begin{macro}{\MathastextVersion}
% This is a wrapper around \LaTeX{}'s \cs{mathversion}: here we have an
% optional argument allowing a quick and easy change of the text font.
@@ -539,83 +908,72 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\renewcommand{\updefault}{\mt@@shape}%
\edef\mt@@boldvariant{\csname mt@boldvariant\mt@tmp\endcsname}%
\renewcommand{\bfdefault}{\mt@@boldvariant}%
-% \end{macrocode}
-% \begin{macrocode}
\fi}
% \end{macrocode}
% \end{macro}
-% We try to keep tracks of the font encodings, as it affects choices of
-% character slots for the math accents, \cs{imath}, and the capital Greek
-% letters (in case the option selfGreek was passed)
-% \begin{macrocode}
-\newcommand\update@the@ifs[1]{
- \edef\tmp@enc{#1}
- \def\tmp@a{OT1}\ifall@OTone\ifx\tmp@a\tmp@enc\else\all@OTonefalse\fi\fi
- \def\tmp@b{T1}\ifall@Tone\ifx\tmp@b\tmp@enc\else\all@Tonefalse\fi\fi
-}
-% \end{macrocode}
-% At last we now switch font for the letters of the latin alphabet. The font
-% mtcurrentfont will be reaffected by any \cs{MathastextVersion} call after
-% \cs{begin{document}}
+% At last we now change the font for the letters of the latin alphabet.
+% In version 1.1, Latin letters have their own font (shape).
% \begin{macrocode}
-\DeclareMathSymbol{a}{\mathalpha}{mtcurrentfont}{`a}
-\DeclareMathSymbol{b}{\mathalpha}{mtcurrentfont}{`b}
-\DeclareMathSymbol{c}{\mathalpha}{mtcurrentfont}{`c}
-\DeclareMathSymbol{d}{\mathalpha}{mtcurrentfont}{`d}
-\DeclareMathSymbol{e}{\mathalpha}{mtcurrentfont}{`e}
-\DeclareMathSymbol{f}{\mathalpha}{mtcurrentfont}{`f}
-\DeclareMathSymbol{g}{\mathalpha}{mtcurrentfont}{`g}
-\DeclareMathSymbol{h}{\mathalpha}{mtcurrentfont}{`h}
-\DeclareMathSymbol{i}{\mathalpha}{mtcurrentfont}{`i}
-\DeclareMathSymbol{j}{\mathalpha}{mtcurrentfont}{`j}
-\DeclareMathSymbol{k}{\mathalpha}{mtcurrentfont}{`k}
-\DeclareMathSymbol{l}{\mathalpha}{mtcurrentfont}{`l}
-\DeclareMathSymbol{m}{\mathalpha}{mtcurrentfont}{`m}
-\DeclareMathSymbol{n}{\mathalpha}{mtcurrentfont}{`n}
-\DeclareMathSymbol{o}{\mathalpha}{mtcurrentfont}{`o}
-\DeclareMathSymbol{p}{\mathalpha}{mtcurrentfont}{`p}
-\DeclareMathSymbol{q}{\mathalpha}{mtcurrentfont}{`q}
-\DeclareMathSymbol{r}{\mathalpha}{mtcurrentfont}{`r}
-\DeclareMathSymbol{s}{\mathalpha}{mtcurrentfont}{`s}
-\DeclareMathSymbol{t}{\mathalpha}{mtcurrentfont}{`t}
-\DeclareMathSymbol{u}{\mathalpha}{mtcurrentfont}{`u}
-\DeclareMathSymbol{v}{\mathalpha}{mtcurrentfont}{`v}
-\DeclareMathSymbol{w}{\mathalpha}{mtcurrentfont}{`w}
-\DeclareMathSymbol{x}{\mathalpha}{mtcurrentfont}{`x}
-\DeclareMathSymbol{y}{\mathalpha}{mtcurrentfont}{`y}
-\DeclareMathSymbol{z}{\mathalpha}{mtcurrentfont}{`z}
-\DeclareMathSymbol{A}{\mathalpha}{mtcurrentfont}{`A}
-\DeclareMathSymbol{B}{\mathalpha}{mtcurrentfont}{`B}
-\DeclareMathSymbol{C}{\mathalpha}{mtcurrentfont}{`C}
-\DeclareMathSymbol{D}{\mathalpha}{mtcurrentfont}{`D}
-\DeclareMathSymbol{E}{\mathalpha}{mtcurrentfont}{`E}
-\DeclareMathSymbol{F}{\mathalpha}{mtcurrentfont}{`F}
-\DeclareMathSymbol{G}{\mathalpha}{mtcurrentfont}{`G}
-\DeclareMathSymbol{H}{\mathalpha}{mtcurrentfont}{`H}
-\DeclareMathSymbol{I}{\mathalpha}{mtcurrentfont}{`I}
-\DeclareMathSymbol{J}{\mathalpha}{mtcurrentfont}{`J}
-\DeclareMathSymbol{K}{\mathalpha}{mtcurrentfont}{`K}
-\DeclareMathSymbol{L}{\mathalpha}{mtcurrentfont}{`L}
-\DeclareMathSymbol{M}{\mathalpha}{mtcurrentfont}{`M}
-\DeclareMathSymbol{N}{\mathalpha}{mtcurrentfont}{`N}
-\DeclareMathSymbol{O}{\mathalpha}{mtcurrentfont}{`O}
-\DeclareMathSymbol{P}{\mathalpha}{mtcurrentfont}{`P}
-\DeclareMathSymbol{Q}{\mathalpha}{mtcurrentfont}{`Q}
-\DeclareMathSymbol{R}{\mathalpha}{mtcurrentfont}{`R}
-\DeclareMathSymbol{S}{\mathalpha}{mtcurrentfont}{`S}
-\DeclareMathSymbol{T}{\mathalpha}{mtcurrentfont}{`T}
-\DeclareMathSymbol{U}{\mathalpha}{mtcurrentfont}{`U}
-\DeclareMathSymbol{V}{\mathalpha}{mtcurrentfont}{`V}
-\DeclareMathSymbol{W}{\mathalpha}{mtcurrentfont}{`W}
-\DeclareMathSymbol{X}{\mathalpha}{mtcurrentfont}{`X}
-\DeclareMathSymbol{Y}{\mathalpha}{mtcurrentfont}{`Y}
-\DeclareMathSymbol{Z}{\mathalpha}{mtcurrentfont}{`Z}
-\ifx\mt@nodigits\@empty\else
-\def\mt@font@tbu{mtcurrentfont}
+\DeclareMathSymbol{a}{\mathalpha}{mtletterfont}{`a}
+\DeclareMathSymbol{b}{\mathalpha}{mtletterfont}{`b}
+\DeclareMathSymbol{c}{\mathalpha}{mtletterfont}{`c}
+\DeclareMathSymbol{d}{\mathalpha}{mtletterfont}{`d}
+\DeclareMathSymbol{e}{\mathalpha}{mtletterfont}{`e}
+\DeclareMathSymbol{f}{\mathalpha}{mtletterfont}{`f}
+\DeclareMathSymbol{g}{\mathalpha}{mtletterfont}{`g}
+\DeclareMathSymbol{h}{\mathalpha}{mtletterfont}{`h}
+\DeclareMathSymbol{i}{\mathalpha}{mtletterfont}{`i}
+\DeclareMathSymbol{j}{\mathalpha}{mtletterfont}{`j}
+\DeclareMathSymbol{k}{\mathalpha}{mtletterfont}{`k}
+\DeclareMathSymbol{l}{\mathalpha}{mtletterfont}{`l}
+\DeclareMathSymbol{m}{\mathalpha}{mtletterfont}{`m}
+\DeclareMathSymbol{n}{\mathalpha}{mtletterfont}{`n}
+\DeclareMathSymbol{o}{\mathalpha}{mtletterfont}{`o}
+\DeclareMathSymbol{p}{\mathalpha}{mtletterfont}{`p}
+\DeclareMathSymbol{q}{\mathalpha}{mtletterfont}{`q}
+\DeclareMathSymbol{r}{\mathalpha}{mtletterfont}{`r}
+\DeclareMathSymbol{s}{\mathalpha}{mtletterfont}{`s}
+\DeclareMathSymbol{t}{\mathalpha}{mtletterfont}{`t}
+\DeclareMathSymbol{u}{\mathalpha}{mtletterfont}{`u}
+\DeclareMathSymbol{v}{\mathalpha}{mtletterfont}{`v}
+\DeclareMathSymbol{w}{\mathalpha}{mtletterfont}{`w}
+\DeclareMathSymbol{x}{\mathalpha}{mtletterfont}{`x}
+\DeclareMathSymbol{y}{\mathalpha}{mtletterfont}{`y}
+\DeclareMathSymbol{z}{\mathalpha}{mtletterfont}{`z}
+\ifx\mt@frenchmath\@empty\def\mt@font@tbu{mtoperatorfont}
+ \else\def\mt@font@tbu{mtletterfont}\fi
+\DeclareMathSymbol{A}{\mathalpha}{\mt@font@tbu}{`A}
+\DeclareMathSymbol{B}{\mathalpha}{\mt@font@tbu}{`B}
+\DeclareMathSymbol{C}{\mathalpha}{\mt@font@tbu}{`C}
+\DeclareMathSymbol{D}{\mathalpha}{\mt@font@tbu}{`D}
+\DeclareMathSymbol{E}{\mathalpha}{\mt@font@tbu}{`E}
+\DeclareMathSymbol{F}{\mathalpha}{\mt@font@tbu}{`F}
+\DeclareMathSymbol{G}{\mathalpha}{\mt@font@tbu}{`G}
+\DeclareMathSymbol{H}{\mathalpha}{\mt@font@tbu}{`H}
+\DeclareMathSymbol{I}{\mathalpha}{\mt@font@tbu}{`I}
+\DeclareMathSymbol{J}{\mathalpha}{\mt@font@tbu}{`J}
+\DeclareMathSymbol{K}{\mathalpha}{\mt@font@tbu}{`K}
+\DeclareMathSymbol{L}{\mathalpha}{\mt@font@tbu}{`L}
+\DeclareMathSymbol{M}{\mathalpha}{\mt@font@tbu}{`M}
+\DeclareMathSymbol{N}{\mathalpha}{\mt@font@tbu}{`N}
+\DeclareMathSymbol{O}{\mathalpha}{\mt@font@tbu}{`O}
+\DeclareMathSymbol{P}{\mathalpha}{\mt@font@tbu}{`P}
+\DeclareMathSymbol{Q}{\mathalpha}{\mt@font@tbu}{`Q}
+\DeclareMathSymbol{R}{\mathalpha}{\mt@font@tbu}{`R}
+\DeclareMathSymbol{S}{\mathalpha}{\mt@font@tbu}{`S}
+\DeclareMathSymbol{T}{\mathalpha}{\mt@font@tbu}{`T}
+\DeclareMathSymbol{U}{\mathalpha}{\mt@font@tbu}{`U}
+\DeclareMathSymbol{V}{\mathalpha}{\mt@font@tbu}{`V}
+\DeclareMathSymbol{W}{\mathalpha}{\mt@font@tbu}{`W}
+\DeclareMathSymbol{X}{\mathalpha}{\mt@font@tbu}{`X}
+\DeclareMathSymbol{Y}{\mathalpha}{\mt@font@tbu}{`Y}
+\DeclareMathSymbol{Z}{\mathalpha}{\mt@font@tbu}{`Z}
+%%
+\ifx\mtno@digits\@empty\else
+\def\mt@font@tbu{mtoperatorfont}
% \end{macrocode}
-% In fact, I think I should have changed the types of the digits to
-% |mathord| when they are not picked from |mtcurrentfont|. Well let's leave
-% it this way for today.
+% 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}
\ifx\mt@symboldigits\@empty \def\mt@font@tbu{mtpsymbol} \fi
\ifx\mt@eulerdigits\@empty \def\mt@font@tbu{mteulervm} \fi
@@ -631,28 +989,31 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareMathSymbol{9}{\mathalpha}{\mt@font@tbu}{`9}
\fi
% \end{macrocode}
-% When |symbolmax| is passed as an option, we use the Symbol font also for the
-% typographical characters
+% When |symbolmax| is passed as an option, we use the Symbol font
+% also for the printable characters other than letters and
+% digits. The character @ has been left out.
% \begin{macrocode}
\ifx\mt@symbolmax\@empty
\def\mt@font@tbu{mtpsymbol}
\else
-\def\mt@font@tbu{mtcurrentfont}
+\def\mt@font@tbu{mtoperatorfont}
\fi
-\ifx\mt@noexclam\@empty\else
+\ifx\mtno@exclam\@empty\else
\DeclareMathSymbol{!}{\mathclose}{\mt@font@tbu}{"21}
\DeclareMathSymbol{?}{\mathclose}{\mt@font@tbu}{"3F}
\fi
-\ifx\mt@noast\@empty\else
+\ifx\mtno@ast\@empty\else
\DeclareMathSymbol{*}{\mathalpha}{\mt@font@tbu}{"2A}
\fi
% \end{macrocode}
% We completely renounced to try to do things with all the various dots, they
-% are defined in too many different ways, and there is the amsmath also. Better
-% to leave the user use the |mathdots| package and accept that we can not
-% avoid the default fonts in that case. So here I just treat |.|
+% are defined in many different ways, and there is the amsmath also. Dealing
+% with this issue would mean a lot a time for a minuscule result. Better to
+% leave the user use the |mathdots| package and accept that we can not avoid
+% the default fonts in that case. So here I just treat |.| (in the hope to
+% really lessen by 1 the number of fonts embedded at the end in the PDF).
% \begin{macrocode}
-\ifx\mt@nopunct\@empty\else
+\ifx\mtno@punct\@empty\else
\DeclareMathSymbol{,}{\mathpunct}{\mt@font@tbu}{"2C}
\DeclareMathSymbol{.}{\mathord}{\mt@font@tbu}{"2E}
\DeclareMathSymbol{:}{\mathrel}{\mt@font@tbu}{"3A}
@@ -663,23 +1024,12 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareMathSymbol{;}{\mathpunct}{\mt@font@tbu}{"3B}
\fi
% \end{macrocode}
-% The slot assignments here are for OT1. They will perhaps be changed to T1
-% when we reach AtBeginDocument.
-% \begin{macrocode}
-\DeclareMathSymbol{\inodot}{\mathord}{mtcurrentfont}{"10}
-\DeclareMathSymbol{\jnodot}{\mathord}{mtcurrentfont}{"11}
-\ifx\mt@defaultimath\@empty\else
- \renewcommand{\imath}{\inodot}
- \renewcommand{\jmath}{\jnodot}
-\fi
-% \end{macrocode}
% \begin{macro}{\relbar}
-% \begin{macro}{\Relbar}
-% Due to the way = and - are used by \LaTeX{} in arrows, we
+% Due to the way = and - are used by \LaTeX{} in arrows, we will
% have to redefine \cs{Relbar} and \cs{relbar} in order for
% them to preserve their original meanings.
% \begin{macrocode}
-\ifx\mt@noplusnominus\@empty\else
+\ifx\mtno@minus\@empty\else
\edef\mt@minus@sign{\mathord{\expandafter\mathchar\number\mathcode`\-}}
\def\relbar{\mathrel{\smash\mt@minus@sign}}
\def\rightarrowfill{$\m@th\mt@minus@sign\mkern-7mu%
@@ -688,19 +1038,89 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\def\leftarrowfill{$\m@th\mathord\leftarrow\mkern-7mu%
\cleaders\hbox{$\mkern-2mu\mt@minus@sign\mkern-2mu$}\hfill
\mkern-7mu\smash\mt@minus@sign$}
-\DeclareMathSymbol{+}{\mathbin}{\mt@font@tbu}{"2B}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\endash}
+% 2011/01/29, v1.1 Producing this next piece of code was not a
+% piece of cake for a novice like myself! I got some LaTeX
+% internal info from ltoutenc.dtx. However this will only work
+% in the math versions with the same encoding as defined by
+% default.
+% \begin{macrocode}
+\ifmt@endash
+\edef\@tmpa{\m@stextenc}
+\DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
+{\expandafter\the\expandafter\csname\@tmpa\string\textendash\endcsname}
+\else
+% \end{macrocode}
+% \end{macro}
+% 2011/01/29, v1.1 This |emdash| has possibly almost no interest.
+% \begin{macrocode}
+\ifmt@emdash
+\edef\@tmpa{\m@stextenc}
+\DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
+{\expandafter\the\expandafter\csname\@tmpa\string\textemdash\endcsname}
+\else
\DeclareMathSymbol{-}{\mathbin}{\mt@font@tbu}{"2D}
+\fi\fi\fi
+% \end{macrocode}
+% \begin{macro}{\hbar}
+% \begin{macro}{\mt@ltbar}
+% 2011/01/31, v1.1 I decide to settle the question of the |\hbar|. First, I
+% should repeat the \LaTeX{} definition
+% \begin{macrocode}
+%%\def\hbar{{\mathchar'26\mkern-9muh}}
+%% (original definition from latex.ltx)
+% \end{macrocode}
+% Well, the fact is that there is a DeclareMathSymbol in |amsfonts.sty|, so I
+% can not always rely on the original which had the advantage that at least
+% |h| would be in the correct font. But of course not the macron character
+% (|\=|, |\bar|). And there is also the issue of the kern whose length is
+% given in a way which depends on |cmsy| (18mu=1em and em taken from info in
+% |cmsy|). The first problem is that I don't know how to get the slot position
+% of the macron, given the encoding. So I found another way. I will need an
+% |rlap| adapted to math mode, and this is provided by code from
+% Alexander~R.~\textsc{Perlis} in his TugBoat article 22 (2001), 350--352,
+% which I found by googling |rlap|.
+% \begin{macrocode}
+\def\mathrlap{\mathpalette\mathrlapinternal}
+\def\mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}}
+\ifx\mt@ti\m@stextenc
+ \DeclareMathAccent{\mt@ltbar}{\mathalpha}{mtletterfont}{9}
+ \else
+ \DeclareMathAccent{\mt@ltbar}{\mathalpha}{mtletterfont}{22}
+\fi
+\ifx\mtno@hbar\@empty\else
+ \def\hbar{\mathrlap{\mt@ltbar{\ }}h}
\fi
-\ifx\mt@noequal\@empty\else
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% As |h| is from |mtletterfont|, the accent \cs{mt@ltbar} is the
+% \cs{bar} accent from that same font. Of course, if the user
+% defines math versions with other encodings than the default one
+% when loading the package this will probably not work there (if I
+% knew how to do for accents what I did for the endash I could do
+% it for all encodings. Surely easy for a \TeX{}pert.) Not to
+% mention if he/she changes the letter shape... one never should
+% give so much freedom to users ;-) Well this construction gives
+% an acceptable result for some of the fonts I have tested,
+% whether upright or in italics.
+% \begin{macro}{+,=,\Relbar}
+% \begin{macrocode}
+\ifx\mtno@plus\@empty\else
+\DeclareMathSymbol{+}{\mathbin}{\mt@font@tbu}{"2B}
+\fi
+\ifx\mtno@equal\@empty\else
\edef\mt@equal@sign{{\expandafter\mathchar\number\mathcode`\=}}
\DeclareRobustCommand\Relbar{\mathrel{\mt@equal@sign}}
\DeclareMathSymbol{=}{\mathrel}{\mt@font@tbu}{"3D}
\fi
% \end{macrocode}
% \end{macro}
-% \end{macro}
+% \begin{macro}{(,),[,],/}
% \begin{macrocode}
-\ifx\mt@noparen\@empty\else
+\ifx\mtno@paren\@empty\else
\DeclareMathDelimiter{(}{\mathopen} {\mt@font@tbu}{"28}{largesymbols}{"00}
\DeclareMathDelimiter{)}{\mathclose}{\mt@font@tbu}{"29}{largesymbols}{"01}
\DeclareMathDelimiter{[}{\mathopen} {\mt@font@tbu}{"5B}{largesymbols}{"02}
@@ -708,7 +1128,17 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareMathDelimiter{/}{\mathord}{\mt@font@tbu}{"2F}{largesymbols}{"0E}
\DeclareMathSymbol{/}{\mathord}{\mt@font@tbu}{"2F}
\fi
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{alldelims}
+% \begin{macrocode}
\ifx\mt@alldelims\@empty
+ \ifx\mt@symbolmax\@empty\else
+ \ifx\mt@ti\m@stextenc\else
+ \typeout{** mathastext: `alldelims'. Characters <,>,{,},| will be assumed
+ to^^J%
+ ** be located as in ascii. True for T1 fonts or OT1 fixed-width fonts.}
+ \fi\fi
\DeclareMathDelimiter{<}{\mathopen}{\mt@font@tbu}{"3C}{largesymbols}{"0A}
\DeclareMathDelimiter{>}{\mathclose}{\mt@font@tbu}{"3E}{largesymbols}{"0B}
\DeclareMathSymbol{<}{\mathrel}{\mt@font@tbu}{"3C}
@@ -717,10 +1147,10 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
% There is no backslash in the Symbol font
% \begin{macrocode}
\expandafter\DeclareMathDelimiter\@backslashchar
- {\mathord}{mtcurrentfont}{"5C}{largesymbols}{"0F}
+ {\mathord}{mtoperatorfont}{"5C}{largesymbols}{"0F}
\DeclareMathDelimiter{\backslash}
- {\mathord}{mtcurrentfont}{"5C}{largesymbols}{"0F}
-\DeclareMathSymbol\setminus\mathbin{mtcurrentfont}{"5C}
+ {\mathord}{mtoperatorfont}{"5C}{largesymbols}{"0F}
+\DeclareMathSymbol\setminus\mathbin{mtoperatorfont}{"5C}
\DeclareMathSymbol{|}\mathord{\mt@font@tbu}{"7C}
\DeclareMathDelimiter{|}{\mt@font@tbu}{"7C}{largesymbols}{"0C}
% \end{macrocode}
@@ -735,21 +1165,25 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
{\mathclose}{\mt@font@tbu}{"7D}{largesymbols}{"09}
\fi
% \end{macrocode}
+% \end{macro}
+% \begin{macro}{specials}
% We never take the specials from the Symbol (Adobe) font, as they are not all
% available there.
% \begin{macrocode}
-\ifx\mt@nospecials\@empty\else
-\renewcommand{\#}{\ifmmode\edef\ms@tmp{7\the\symmtcurrentfont23}%
+\ifx\mtno@specials\@empty\else
+\renewcommand{\#}{\ifmmode\edef\ms@tmp{7\the\symmtoperatorfont23}%
\mathchar\expandafter"\ms@tmp\relax\else\char"23\relax\fi}
-\renewcommand{\$}{\ifmmode\edef\ms@tmp{7\the\symmtcurrentfont24}%
+\renewcommand{\$}{\ifmmode\edef\ms@tmp{7\the\symmtoperatorfont24}%
\mathchar\expandafter"\ms@tmp\relax\else\char"24\relax\fi}
-\renewcommand{\%}{\ifmmode\edef\ms@tmp{7\the\symmtcurrentfont25}%
+\renewcommand{\%}{\ifmmode\edef\ms@tmp{7\the\symmtoperatorfont25}%
\mathchar\expandafter"\ms@tmp\relax\else\char"25\relax\fi}
-\renewcommand{\&}{\ifmmode\edef\ms@tmp{7\the\symmtcurrentfont26}%
+\renewcommand{\&}{\ifmmode\edef\ms@tmp{7\the\symmtoperatorfont26}%
\mathchar\expandafter"\ms@tmp\relax\else\char"26\relax\fi}
\fi
% \end{macrocode}
-% We construct (with some effort) some longarrows from the Symbol glyphs, of
+% \end{macro}
+% \begin{macro}{symbolmisc}
+% We construct (with some effort) some long arrows from the Symbol glyphs, of
% almost the same lengths as the standard ones. By the way, I always found the
% \cs{iff} to be too wide, but I follow here the default. Also, although
% there is a \cs{longmapsto} in standard \LaTeX{}, if I am not mistaken, there
@@ -828,6 +1262,8 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
{\mathopen}{mtpsymbol}{225}{largesymbols}{"0A}
\fi
% \end{macrocode}
+% \end{macro}
+% \begin{macro}{symbolre}
% I like the \cs{Re} and \cs{Im} from Symbol, so I overwrite the CM ones.
% \begin{macrocode}
\ifx\mt@symbolre\@empty
@@ -836,98 +1272,137 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareMathSymbol{\DotTriangle}{\mathord}{mtpsymbol}{92}
\fi
% \end{macrocode}
-% selfGreek $>$ eulergreek $>$ symbolgreek
+% \end{macro}
+% \begin{macro}{Greek letters}
+% selfGreek $>$ eulergreek $>$ symbolgreek
+%
+% v1.1 We declare control sequences for the capital Greek letters
+% which look like their latin counterparts. If \cs{digamma} is
+% defined, presumably some package has been loaded for greek
+% letters and we do not change anything (except if option
+% symbolgreek or eulergreek or selfgreek was passed). I took
+% motivation for this from the Xe\LaTeX{} package |mathspec|,
+% which I didn't know about when writing up the version |1.0| of
+% the present package. The goals of |mathastext| are much more
+% restricted than those achieved by |mathspec|.
% \begin{macrocode}
-\ifx\mt@selfGreek\@empty
-\DeclareMathSymbol{\Gamma}{\mathalpha}{mtcurrentfont}{"00}
-\DeclareMathSymbol{\Delta}{\mathalpha}{mtcurrentfont}{"01}
-\DeclareMathSymbol{\Theta}{\mathalpha}{mtcurrentfont}{"02}
-\DeclareMathSymbol{\Lambda}{\mathalpha}{mtcurrentfont}{"03}
-\DeclareMathSymbol{\Xi}{\mathalpha}{mtcurrentfont}{"04}
-\DeclareMathSymbol{\Pi}{\mathalpha}{mtcurrentfont}{"05}
-\DeclareMathSymbol{\Sigma}{\mathalpha}{mtcurrentfont}{"06}
-\DeclareMathSymbol{\Upsilon}{\mathalpha}{mtcurrentfont}{"07}
-\DeclareMathSymbol{\Phi}{\mathalpha}{mtcurrentfont}{"08}
-\DeclareMathSymbol{\Psi}{\mathalpha}{mtcurrentfont}{"09}
-\DeclareMathSymbol{\Omega}{\mathalpha}{mtcurrentfont}{"0A}
-\else
-\ifx\mt@eulergreek\@empty
-\DeclareMathSymbol\Gamma {\mathord}{mteulervm}{"00}
-\DeclareMathSymbol\Delta {\mathord}{mteulervm}{"01}
-\DeclareMathSymbol\Theta {\mathord}{mteulervm}{"02}
-\DeclareMathSymbol\Lambda {\mathord}{mteulervm}{"03}
-\DeclareMathSymbol\Xi {\mathord}{mteulervm}{"04}
-\DeclareMathSymbol\Pi {\mathord}{mteulervm}{"05}
-\DeclareMathSymbol\Sigma {\mathord}{mteulervm}{"06}
-\DeclareMathSymbol\Upsilon {\mathord}{mteulervm}{"07}
-\DeclareMathSymbol\Phi {\mathord}{mteulervm}{"08}
-\DeclareMathSymbol\Psi {\mathord}{mteulervm}{"09}
-\DeclareMathSymbol\Omega {\mathord}{mteulervm}{"0A}
-\else
+\def\mt@font@tbu{operators}
+\let\mt@mathord\mathord
+\ifx\digamma\undefined\else\def\mt@font@tbu{1}\fi
+\ifx\mt@selfGreek\@empty \def\mt@font@tbu{mtoperatorfont}
+ \let\mt@mathord\mathalpha
+ \else
+\ifx\mt@eulergreek\@empty \def\mt@font@tbu{mteulervm}
+ \let\mt@mathord\mathalpha
+ \else
+\ifx\mt@symbolgreek\@empty \def\mt@font@tbu{mtpsymbol}
+\fi\fi\fi
+\def\mt@tmp{1}
+\ifx\mt@font@tbu\mt@tmp\else
+% \end{macrocode}
+% \cs{digamma} either undefined or defined and *greek option
+% \begin{macrocode}
+\DeclareMathSymbol{\Digamma}{\mt@mathord}{\mt@font@tbu}{"46}
+\DeclareMathSymbol{\Alpha}{\mt@mathord}{\mt@font@tbu}{"41}
+\DeclareMathSymbol{\Beta}{\mt@mathord}{\mt@font@tbu}{"42}
+\DeclareMathSymbol{\Epsilon}{\mt@mathord}{\mt@font@tbu}{"45}
+\DeclareMathSymbol{\Zeta}{\mt@mathord}{\mt@font@tbu}{"5A}
+\DeclareMathSymbol{\Eta}{\mt@mathord}{\mt@font@tbu}{"48}
+\DeclareMathSymbol{\Iota}{\mt@mathord}{\mt@font@tbu}{"49}
+\DeclareMathSymbol{\Kappa}{\mt@mathord}{\mt@font@tbu}{"4B}
+\DeclareMathSymbol{\Mu}{\mt@mathord}{\mt@font@tbu}{"4D}
+\DeclareMathSymbol{\Nu}{\mt@mathord}{\mt@font@tbu}{"4E}
+\DeclareMathSymbol{\Omicron}{\mt@mathord}{\mt@font@tbu}{"4F}
+\DeclareMathSymbol{\Rho}{\mt@mathord}{\mt@font@tbu}{"50}
+\DeclareMathSymbol{\Tau}{\mt@mathord}{\mt@font@tbu}{"54}
+\DeclareMathSymbol{\Chi}{\mt@mathord}{\mt@font@tbu}{"58}
+%% we now treat the other capital Greek letters
\ifx\mt@symbolgreek\@empty
+%% attention le P de Symbol est un \Pi pas un \Rho
+\DeclareMathSymbol{\Rho}{\mt@mathord}{\mt@font@tbu}{"52}
+%% attention le X de Symbol est un \Xi pas un \Chi
+\DeclareMathSymbol{\Chi}{\mt@mathord}{\mt@font@tbu}{"43}
+%% attention le F de Symbol est un \Phi. Il n'y a pas de \Digamma
+\let\Digamma\undefined
\DeclareMathSymbol{\Gamma}{\mathord}{mtpsymbol}{"47}
\DeclareMathSymbol{\Delta}{\mathord}{mtpsymbol}{"44}
\DeclareMathSymbol{\Theta}{\mathord}{mtpsymbol}{"51}
\DeclareMathSymbol{\Lambda}{\mathord}{mtpsymbol}{"4C}
-\DeclareMathSymbol{\Xi}{\mathord}{mtpsymbol}{"59}
+\DeclareMathSymbol{\Xi}{\mathord}{mtpsymbol}{"58} %% was "59 in v10
\DeclareMathSymbol{\Pi}{\mathord}{mtpsymbol}{"50}
\DeclareMathSymbol{\Sigma}{\mathord}{mtpsymbol}{"53}
\DeclareMathSymbol{\Upsilon}{\mathord}{mtpsymbol}{"A1}
\DeclareMathSymbol{\Phi}{\mathord}{mtpsymbol}{"46}
\DeclareMathSymbol{\Psi}{\mathord}{mtpsymbol}{"59}
\DeclareMathSymbol{\Omega}{\mathord}{mtpsymbol}{"57}
-\fi\fi\fi
-% \end{macrocode}
-% The omicron requires special treatment. By default we pick it from the
-% (unmodified) normal alphabet, with the special adjustment if |fourier| was
-% loaded in |upright| variant.
+\else
+% \end{macrocode}
+% \cs{digamma} not defined, or defined and either eulergreek or selfgreek. We
+% assume the capital Greek letters to be as in OT1.
+% \begin{macrocode}
+\DeclareMathSymbol\Gamma {\mathalpha}{\mt@font@tbu}{"00}
+\DeclareMathSymbol\Delta {\mathalpha}{\mt@font@tbu}{"01}
+\DeclareMathSymbol\Theta {\mathalpha}{\mt@font@tbu}{"02}
+\DeclareMathSymbol\Lambda {\mathalpha}{\mt@font@tbu}{"03}
+\DeclareMathSymbol\Xi {\mathalpha}{\mt@font@tbu}{"04}
+\DeclareMathSymbol\Pi {\mathalpha}{\mt@font@tbu}{"05}
+\DeclareMathSymbol\Sigma {\mathalpha}{\mt@font@tbu}{"06}
+\DeclareMathSymbol\Upsilon {\mathalpha}{\mt@font@tbu}{"07}
+\DeclareMathSymbol\Phi {\mathalpha}{\mt@font@tbu}{"08}
+\DeclareMathSymbol\Psi {\mathalpha}{\mt@font@tbu}{"09}
+\DeclareMathSymbol\Omega {\mathalpha}{\mt@font@tbu}{"0A}
+\fi
+\fi
+% \end{macrocode}
+% The \cs{omicron} requires special treatment. By default we use the o from the
+% (original) normal alphabet, if eulergreek or symbolgreek we adapt. There is
+% also a special adjustment needed if the package |fourier| was loaded in its
+% |upright| variant: we then take \cs{omicron} from the (original) rm alphabet.
%
-% There is a slight difference regarding Euler and Symbol with respect to the
+% There are differences regarding Euler and Symbol with respect to the
% available var-letters. We include one or two things like the |wp| and the
-% |partial|.
+% |partial|.
%
-% It would not make sense to declare the Greek letters to be |mathalpha| as
-% the alphabet changing commands like \cs{mathbf} can not at the same time
-% use the bold variant of |mtcurrentfont| and the bold variant of the font
-% for these letters. So, I think it is better to let them be of type
-% |mathord|.
+% The lower case Greek letters in default \LaTeX{} are of type |mathord|. If
+% we use the Euler font it is perhaps better to have them be of type
+% |mathalpha|
% \begin{macrocode}
\let\omicron\undefined
\newcommand\omicron{\mt@saved@mathnormal{o}}
\ifx\mt@eulergreek\@empty
-\DeclareMathSymbol{\alpha} {\mathord}{mteulervm}{"0B}
-\DeclareMathSymbol{\beta} {\mathord}{mteulervm}{"0C}
-\DeclareMathSymbol{\gamma} {\mathord}{mteulervm}{"0D}
-\DeclareMathSymbol{\delta} {\mathord}{mteulervm}{"0E}
-\DeclareMathSymbol{\epsilon}{\mathord}{mteulervm}{"0F}
-\DeclareMathSymbol{\zeta} {\mathord}{mteulervm}{"10}
-\DeclareMathSymbol{\eta} {\mathord}{mteulervm}{"11}
-\DeclareMathSymbol{\theta} {\mathord}{mteulervm}{"12}
-\DeclareMathSymbol{\iota} {\mathord}{mteulervm}{"13}
-\DeclareMathSymbol{\kappa} {\mathord}{mteulervm}{"14}
-\DeclareMathSymbol{\lambda} {\mathord}{mteulervm}{"15}
-\DeclareMathSymbol{\mu} {\mathord}{mteulervm}{"16}
-\DeclareMathSymbol{\nu} {\mathord}{mteulervm}{"17}
-\DeclareMathSymbol{\xi} {\mathord}{mteulervm}{"18}
-\renewcommand\omicron{\mathord{\MathastextEuler{o}}}
-\DeclareMathSymbol{\pi} {\mathord}{mteulervm}{"19}
-\DeclareMathSymbol{\rho} {\mathord}{mteulervm}{"1A}
-\DeclareMathSymbol{\sigma} {\mathord}{mteulervm}{"1B}
-\DeclareMathSymbol{\tau} {\mathord}{mteulervm}{"1C}
-\DeclareMathSymbol{\upsilon}{\mathord}{mteulervm}{"1D}
-\DeclareMathSymbol{\phi} {\mathord}{mteulervm}{"1E}
-\DeclareMathSymbol{\chi} {\mathord}{mteulervm}{"1F}
-\DeclareMathSymbol{\psi} {\mathord}{mteulervm}{"20}
-\DeclareMathSymbol{\omega} {\mathord}{mteulervm}{"21}
-\DeclareMathSymbol{\varepsilon}{\mathord}{mteulervm}{"22}
-\DeclareMathSymbol{\vartheta}{\mathord}{mteulervm}{"23}
-\DeclareMathSymbol{\varpi} {\mathord}{mteulervm}{"24}
+\DeclareMathSymbol{\alpha} {\mathalpha}{mteulervm}{"0B}
+\DeclareMathSymbol{\beta} {\mathalpha}{mteulervm}{"0C}
+\DeclareMathSymbol{\gamma} {\mathalpha}{mteulervm}{"0D}
+\DeclareMathSymbol{\delta} {\mathalpha}{mteulervm}{"0E}
+\DeclareMathSymbol{\epsilon}{\mathalpha}{mteulervm}{"0F}
+\DeclareMathSymbol{\zeta} {\mathalpha}{mteulervm}{"10}
+\DeclareMathSymbol{\eta} {\mathalpha}{mteulervm}{"11}
+\DeclareMathSymbol{\theta} {\mathalpha}{mteulervm}{"12}
+\DeclareMathSymbol{\iota} {\mathalpha}{mteulervm}{"13}
+\DeclareMathSymbol{\kappa} {\mathalpha}{mteulervm}{"14}
+\DeclareMathSymbol{\lambda} {\mathalpha}{mteulervm}{"15}
+\DeclareMathSymbol{\mu} {\mathalpha}{mteulervm}{"16}
+\DeclareMathSymbol{\nu} {\mathalpha}{mteulervm}{"17}
+\DeclareMathSymbol{\xi} {\mathalpha}{mteulervm}{"18}
+\renewcommand\omicron{\MathEuler{o}}
+\DeclareMathSymbol{\pi} {\mathalpha}{mteulervm}{"19}
+\DeclareMathSymbol{\rho} {\mathalpha}{mteulervm}{"1A}
+\DeclareMathSymbol{\sigma} {\mathalpha}{mteulervm}{"1B}
+\DeclareMathSymbol{\tau} {\mathalpha}{mteulervm}{"1C}
+\DeclareMathSymbol{\upsilon}{\mathalpha}{mteulervm}{"1D}
+\DeclareMathSymbol{\phi} {\mathalpha}{mteulervm}{"1E}
+\DeclareMathSymbol{\chi} {\mathalpha}{mteulervm}{"1F}
+\DeclareMathSymbol{\psi} {\mathalpha}{mteulervm}{"20}
+\DeclareMathSymbol{\omega} {\mathalpha}{mteulervm}{"21}
+\DeclareMathSymbol{\varepsilon}{\mathalpha}{mteulervm}{"22}
+\DeclareMathSymbol{\vartheta}{\mathalpha}{mteulervm}{"23}
+\DeclareMathSymbol{\varpi} {\mathalpha}{mteulervm}{"24}
\let\varrho=\rho
\let\varsigma=\sigma
-\DeclareMathSymbol{\varphi} {\mathord}{mteulervm}{"27}
-\DeclareMathSymbol{\partial}{\mathord}{mteulervm}{"40}
-\DeclareMathSymbol{\wp}{\mathord}{mteulervm}{"7D}
-\DeclareMathSymbol{\ell}{\mathord}{mteulervm}{"60}
+\DeclareMathSymbol{\varphi} {\mathalpha}{mteulervm}{"27}
+\DeclareMathSymbol{\partial}{\mathalpha}{mteulervm}{"40}
+\DeclareMathSymbol{\wp}{\mathalpha}{mteulervm}{"7D}
+\DeclareMathSymbol{\ell}{\mathalpha}{mteulervm}{"60}
\else
\ifx\mt@symbolgreek\@empty
\DeclareMathSymbol{\alpha}{\mathord}{mtpsymbol}{"61}
@@ -944,7 +1419,7 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareMathSymbol{\mu}{\mathord}{mtpsymbol}{"6D}
\DeclareMathSymbol{\nu}{\mathord}{mtpsymbol}{"6E}
\DeclareMathSymbol{\xi}{\mathord}{mtpsymbol}{"78}
-\renewcommand\omicron{\mathord{\MathastextSymbol{o}}}
+\renewcommand\omicron{\mathord{\MathPSymbol{o}}}
\DeclareMathSymbol{\pi}{\mathord}{mtpsymbol}{"70}
\DeclareMathSymbol{\rho}{\mathord}{mtpsymbol}{"72}
\DeclareMathSymbol{\sigma}{\mathord}{mtpsymbol}{"73}
@@ -964,6 +1439,67 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareMathSymbol{\wp}{\mathord}{mtpsymbol}{"C3}
\fi\fi
% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\inodot}
+% \begin{macro}{\jnodot}
+% In v1.0, I had them of type |mathord|, here I choose |mathalpha|. If I
+% used \cs{i} and \cs{j} from the text font the problem would be with the
+% fontsize, if in scriptstyle. The amsmath \cs{text} would do the trick.
+% \begin{macrocode}
+\ifx\m@stextenc\mt@oti
+\DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}{16}
+\DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}{17}
+\else
+%% assumed to be as in T1
+\DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}{25}
+\DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}{26}
+\fi
+\ifx\mt@defaultimath\@empty\else
+ \renewcommand{\imath}{\inodot}
+ \renewcommand{\jmath}{\jnodot}
+\fi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{math accents}
+% I don't know how to get from the encoding to the slot positions of the
+% accents (apart from going to look at all possible encodings .{}def files
+% and putting this info here). In standard \LaTeX{}, the mathaccents are
+% taken from the `operators' font. So we do the same here. Of course there
+% is the problem that the user can define math versions with different
+% encodings. Here I take T1 if it was the default at the time of
+% loading the package, else OT1.
+% \begin{macrocode}
+\ifx\mt@mathaccents\@empty
+\ifx\mt@ti\m@stextenc
+\DeclareMathAccent{\acute}{\mathalpha}{mtoperatorfont}{1}
+\DeclareMathAccent{\grave}{\mathalpha}{mtoperatorfont}{0}
+\DeclareMathAccent{\ddot}{\mathalpha}{mtoperatorfont}{4}
+\DeclareMathAccent{\tilde}{\mathalpha}{mtoperatorfont}{3}
+\DeclareMathAccent{\bar}{\mathalpha}{mtoperatorfont}{9}
+\DeclareMathAccent{\breve}{\mathalpha}{mtoperatorfont}{8}
+\DeclareMathAccent{\check}{\mathalpha}{mtoperatorfont}{7}
+\DeclareMathAccent{\hat}{\mathalpha}{mtoperatorfont}{2}
+\DeclareMathAccent{\dot}{\mathalpha}{mtoperatorfont}{10}
+\DeclareMathAccent{\mathring}{\mathalpha}{mtoperatorfont}{6}
+\else
+\DeclareMathAccent{\acute}{\mathalpha}{mtoperatorfont}{19}
+\DeclareMathAccent{\grave}{\mathalpha}{mtoperatorfont}{18}
+\DeclareMathAccent{\ddot}{\mathalpha}{mtoperatorfont}{127}
+\DeclareMathAccent{\tilde}{\mathalpha}{mtoperatorfont}{126}
+\DeclareMathAccent{\bar}{\mathalpha}{mtoperatorfont}{22}
+\DeclareMathAccent{\breve}{\mathalpha}{mtoperatorfont}{21}
+\DeclareMathAccent{\check}{\mathalpha}{mtoperatorfont}{20}
+\DeclareMathAccent{\hat}{\mathalpha}{mtoperatorfont}{94}
+\DeclareMathAccent{\dot}{\mathalpha}{mtoperatorfont}{95}
+\DeclareMathAccent{\mathring}{\mathalpha}{mtoperatorfont}{23}
+\ifx\mt@oti\m@stextenc\else
+ \typeout{** mathastext: `mathaccents'; accents have been assumed to be^^J%
+ ** as in OT1 encoding.}
+\fi\fi\fi
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{Math sizes}
% I took the code for \cs{Huge} and \cs{HUGE} from the |moresize| package of
% Christian~\textsc{Cornelssen}
% \begin{macrocode}
@@ -997,61 +1533,7 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
** To keep LaTeX defaults, use option `defaultmathsizes'.}
\fi
% \end{macrocode}
-% At begin document, we make a few announcements depending on whether
-% everything was in OT1 or T1 or otherwise, and we make a choice of the slot
-% locations of mathaccents and of \cs{imath} and \cs{jmath}.
-% \begin{macrocode}
-\AtBeginDocument{
-\ifx\mt@alldelims\@empty
-\ifx\mt@symbolmax\@empty\else
-\ifall@OTone
-\typeout{** mathastext: option `alldelims', and OT1 encodings; characters
- <,>,{,},| ^^J%
-** will display correctly only for the fixed-width fonts.}
-\else
-\ifall@Tone\else
-\typeout{** mathastext: option `alldelims'; <,>,{,},| have been assumed
- to be located^^J%
-** as in T1 (or OT1 fixed-width) fonts.)}
-\fi\fi\fi\fi
-\ifall@OTone\else
-\DeclareMathSymbol{\inodot}{\mathord}{mtcurrentfont}{"19}
-\DeclareMathSymbol{\jnodot}{\mathord}{mtcurrentfont}{"1A}
-\fi
-}
-\AtBeginDocument{
-\ifx\mt@mathaccents\@empty
-\ifall@OTone
-\DeclareMathAccent{\acute}{\mathalpha}{mtcurrentfont}{"13}
-\DeclareMathAccent{\grave}{\mathalpha}{mtcurrentfont}{"12}
-\DeclareMathAccent{\ddot}{\mathalpha}{mtcurrentfont}{"7F}
-\DeclareMathAccent{\tilde}{\mathalpha}{mtcurrentfont}{"7E}
-\DeclareMathAccent{\bar}{\mathalpha}{mtcurrentfont}{"16}
-\DeclareMathAccent{\breve}{\mathalpha}{mtcurrentfont}{"15}
-\DeclareMathAccent{\check}{\mathalpha}{mtcurrentfont}{"14}
-\DeclareMathAccent{\hat}{\mathalpha}{mtcurrentfont}{"5E}
-\DeclareMathAccent{\dot}{\mathalpha}{mtcurrentfont}{"5F}
-\DeclareMathAccent{\mathring}{\mathalpha}{mtcurrentfont}{"17}
-\else
-\DeclareMathAccent{\acute}{\mathalpha}{mtcurrentfont}{"01}
-\DeclareMathAccent{\grave}{\mathalpha}{mtcurrentfont}{"00}
-\DeclareMathAccent{\ddot}{\mathalpha}{mtcurrentfont}{"04}
-\DeclareMathAccent{\tilde}{\mathalpha}{mtcurrentfont}{"03}
-\DeclareMathAccent{\bar}{\mathalpha}{mtcurrentfont}{"09}
-\DeclareMathAccent{\breve}{\mathalpha}{mtcurrentfont}{"08}
-\DeclareMathAccent{\check}{\mathalpha}{mtcurrentfont}{"07}
-\DeclareMathAccent{\hat}{\mathalpha}{mtcurrentfont}{"02}
-\DeclareMathAccent{\dot}{\mathalpha}{mtcurrentfont}{"0A}
-\DeclareMathAccent{\mathring}{\mathalpha}{mtcurrentfont}{"06}
-\ifall@Tone
-\else\typeout{** mathastext: option `mathaccents'; accents have been assumed
- to be^^J%
- ** as in T1 encoding but one of the math versions has a non-T1 encoding.}
-\fi
-\fi
-\fi
-}
-% \end{macrocode}
+% \end{macro}
% Scaling mechanism for the Symbol font.
% \begin{macrocode}
\AtBeginDocument{
@@ -1091,6 +1573,6 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
%</dtx>
% \fi
%
-% \CheckSum{1691}
+% \CheckSum{1960}
% \Finale
\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/mathastext/mathastext.ins b/Master/texmf-dist/source/latex/mathastext/mathastext.ins
index 979c522ca33..84b7a540e9d 100644
--- a/Master/texmf-dist/source/latex/mathastext/mathastext.ins
+++ b/Master/texmf-dist/source/latex/mathastext/mathastext.ins
@@ -19,7 +19,7 @@
%%
%% --------------- start of docstrip commands ------------------
%%
-\def\filedate{2011/01/25}
+\def\filedate{2011/02/01}
\def\batchfile{mathastext.ins}
\input docstrip.tex
@@ -71,6 +71,8 @@ This is a generated file.
\usepreamble\mainpreamble
+\askforoverwritefalse
+
\generate{\file{mathastext.sty}{\from{mathastext.dtx}{code}}
}