# Direc­tory tex-archive/macros/latex/contrib/mathastext

Copyright (C) 2011, 2012 by Jean-Francois Burnol.
[see bottom of this file for the LPPL statement]

+-------------------------------------------+
+                 mathastext                +
+                                           +
+      Use the text font in math mode'     +
+             v1.2f  2013/01/21             +
+             jfbu (at) free.fr             +
+-------------------------------------------+

INTRODUCTION

Optimal typographical results for documents containing
mathematical symbols can only be hoped for with math fonts
specifically designed to match a given text typeface.
Although the list of freely available math fonts (alongside
the Computer Modern and AMS extension fonts) is slowly
expanding (fourier, kpfonts, mathdesign, pxfonts, txfonts,
and others...) it remains limited, and the situation is even
worse with Unicode fonts (XeTeX/LuaTeX). So if you can't
find a math font which fits well with your favorite text
font, and wish to still be able to typeset mathematical
documents, perhaps not of the highest typographical quality,
but at least not subjected to obvious visual incompatibi-
-lities between your text font and the math fonts,
try out mathastext: it will simply use the text font also
for the math!

USAGE

main options: italic, subdued, defaultmathsizes, LGRgreek.

\usepackage[options]{mathastext}
after other font related packages.

The document will then use the text
font also in math mode (letters,
digits, punctuation and a a few other
ascii characters).

and then make use of the
\Mathastext[version_name] command to
define math versions in the preamble
and use them in the document body with
the \MTversion{version_name} command.

With the subdued option, mathastext is
only active inside such a defined math
version.

Use the italic' option to get the Latin letters in math
mode be in italics. Digits and log-like operator names
(pre-defined as well as user-defined) will be in the same
shape as the text font (usually this means upright).

For documents needing Greek letters the following is
possible:
+ no option: Greek letters defined by other packages,
+ eulergreek: use the Euler font for the Greek letters,
+ symbolgreek: use the Postscript Symbol font for the
Greek letters.
+ LGRgreek: use the document text font in LGR encoding
Further options specify the shape of the lowercase
and uppercase Greek glyphs; starting with v1.15c it is
possible to use multiple distinct LGR fonts in the
same document.

Commands are provided to scale the Euler and Symbol fonts by
an arbitrary factor to let them fit better with the document
text font.

Read the PDF documentation for more.

Examples available there:
http://jf.burnol.free.fr/mathsastext.html
http://jf.burnol.free.fr/showcase.html

INSTALLATION

Run latex or pdflatex on mathastext.dtx to create the mathastext.sty
file. Move the .sty file to a suitable location within the TeX
installation. Run latex twice more on mathastext.dtx to finish
producing the documentation.

During this process test files have been generated which serve to
illustrate some features of the package.

CHANGE LOG

1.2f [2013/01/21]

* minor code improvements. Change log added to the user manual.

1.2e [2013/01/10]

This version should be the last one in the 1.2 series as it seems to
correct most of the main problems which were introduced with the massive
use of mathematically active characters in versions 1.2 and 1.2b.

* It is indeed a thorny point when one wants to modify only in math mode
how an active character acts, without breaking things. The package now
does that /only/ if the activation appears to originate in the Babel
system, as it is then possible to modify appropriately the Babel macros
\user@active<char> and \normal@char<char>. The relevant issues are
discussed in section 2.10 of the user manual, in the test file
testmathastextalphabets.tex, and in the source code comments to the
macro \mst@mathactivate. The inherent incompatibility of Babel with
packages having made mathematically active the characters itself makes
document active is circumvented by this interference of mathastext. A
generally applicable Babel patch could be derived from the method used
by mathastext.

* The technique of mathematical activation is maintained only for the
characters which are not catcode active (at the entrance in math mode,
as mathastext does all its activation job at everymath and everydisplay).

1.2b did not behave as described in the user manual, due to forgotten
group braces. Fixed.

* The command \MTlowerast from the user manual of v1.2d was not the one
implemented in the source code. Fixed.

* The test files automatically extracted from a latex run on the dtx file
have been revised and extended.

* The code is better documented.

1.2d [2013/01/02]

*  an incompatibility with amsmath (its macro \resetMathstrut@),
exists since version 1.2 of the package. This is fixed
here.

*  various improvements in dealing with the asterisk and in the
mechanism of letting non-letter symbols obey the math alphabet
commands.

*  documentation extended and improved.

1.2c [2012/12/31]

*  mathastext now inserts automatically after all (latin)
letters in math mode their italic corrections, if the font
used is upright (sic). This improves the spacings for the
positioning of subscripts. The feature is de-activated
inside the math alphabets commands (apart from \mathnormal),
so as to not prohibit the formation of ligatures,

*  the documentation has been extended to explain in detail the
issues which are relevant to the new feature of added italic
corrections,

characters. This is corrected and additionally \MTnonletters-
-donotobeymathxx is made the default, as the user input is too
much constrained in its absence.

*  a less fatal, but still annoying, typo had made the dot in 1.2
of type \mathpunct rather than \mathord

*  the inner namespace has been rationalized a bit.

1.2 [2012/12/20]

*  a new command sets up the amount of space to be automatically
inserted before the derivative glyph (useful when using an
upright font).

*  the scope of the math alphabets has been extended to apply
to the non-alphabetical characters, and also to operator
names.

*  the format of the dtx file has changed. The package file
is self-extracting from the dtx, and four additional test
files are also produced during latex mathastext.dtx'.

1.15f and 1.15g [2012/10/25]

*  \$, \#, \&, and \% had been re-defined by mathastext since its inception in a rather strange (but working) way, which could cause surprises to other packages. Fixed. * the subdued mechanism for the math alphabets is implemented in a simpler and more efficient manner than in 1.15e. * the defaultxx' options act a bit differently, and are more useful in case of a too many math alphabets' situation. * various improvements in the documentation. * general clean up and better commenting of the source code. 1.15e [2012/10/22] * new user commands to specify skip or glue to be inserted after the math symbols \exists and \forall * complete (user transparent) rewrite of the code implementing the subdued option; and its action has been extended to apply also to the \mathbf, \mathit, \mathsf, \mathtt alphabets and not only to \mathrm and \mathnormal as in the previous versions. * improvements in the documentation. 1.15d [2012/10/13] * the Unicode situation is now correctly treated, throughout the code (this had been left in a half-done way from version 1.14 of April 2011). - this includes an issue related to amsmath and its DeclareMathOperator macro which has been fixed, - and the code related to \relbar and \Relbar (and \models) has been revised. 1.15c [2012/10/05] * it is now possible to use distinct fonts in LGR encoding for the Greek letters according to the current math version. * improvements to the documentation. 1.15b * corrected a feature' of 1.15 which was backward- incompatible * improvements to the pdf documentation 1.15 [2012/09/26] * the subdued option allows the mathastextification to act only locally. * some measures taken to deal with amsmath related issues when using xetex or luatex. 1.14c * a bug is fixed: the \Mathastext macro reinitializes the fonts in the normal and bold math versions, but it also erroneously redeclared the math alphabet changing commands which could have been set up in previously defined math versions (via earlier calls to \Mathastext[version_name]). 1.14b [2011/04/03] * there was a bug with \$, \#, \&, \% in math mode which
showed up when ten or more math families had been
declared. This bug affected also the minus sign under
the same circumstances, when Unicode engines were
used. Fixed.

*  the options LGRgreek and selfGreek act now a bit
differently, and new options LGRgreeks and selfGreeks
have been defined.

+  I also cleaned up a bit the code, for a more
structured namespace.

1.14

*  mathastext now modifies also the math alphabets \mathit,
\mathsf and \mathtt, thus making it a quite generic
complete manner to adapt the math configuration to fonts
provided with no math support.

1.13b

*  when the Symbol font is used for \prod and \sum this
will be only for inline math; display math will use the
default glyphs

1.13 [2011/03/11]

*  the LGRgreek option is added.

*  internal changes for better readability of the code.

1.12

*  various bugs have been corrected.

*  the endash and alldelims options are active by default.

*  the package is more Unicode aware.

*  the \Mathastext command has been improved to
facilitate the mechanism of math versions also when
using XeTeX or LuaTeX (with package fontspec.)

*  the en-dash and dotless i and j now work with all
encodings, Unicode inclusive.

1.11 [2011/02/06] optional argument to \Mathastext macro.

1.1  [2011/02/01] options italic and frenchmath.

1.0  [2011/01/25] Initial version.

Copyright (C) 2011, 2012 by Jean-Francois Burnol.

The files of this package may be distributed and/or modified
under the conditions of the LaTeX Project Public License,
later version.

http://www.latex-project.org/lppl.txt
and version 1.3 or later is part of all distributions of
LaTeX version 2003/12/01 or later.



## Files

Name Size Date Notes