A package for using the MathTıme and MathTımeplus fonts^{∗}

Drahoslav Lím

                  DrahoslavL@seznam.cz

2002/04/05

Abstract

mt11p is a package to relatively painlessly get access to everything available in the MathTıme and MathTımeplus commercial math fonts in L^{A}TEX 2ε. It is compatible with the AMS packages. This package is selfcontained and only the Type 1 font programs need to be copied off of the distribution media.

Contents

1 Introduction 1

2 Installation 2 2.1 Previewing . . . . . . . . 3

3 Usage & Package Options 3 3.1 List of options . . . . . . 3 3.2 Interaction with

AMS macros and other

math packages . . . . . . 6 3.3 Math Accents . . . . . . . 6 3.4 Script and calligraphy

math fonts . . . . . . . . . 7 3.5 The symbols †, ‡, §, and ¶ 7 3.6 “New” symbols . . . . . . 8 3.7 Avoiding the use of

bitmap fonts . . . . . . . 8 3.8 Subscript spacing . . . . . 8 3.9 Upright Greek lower case

letters . . . . . . . . . . . 9 3.10 Oldstyle Digits . . . . . . 9 3.11 Mixing math versions . . 10 3.12 Local Configuration … 10

4 Bugs 10

5 Acknowledgment & Misc. 10

1 Introduction

The use of Computer Modern fonts for equations has been one of the tell-tale signs indicating a document was typeset by TEX. The reasons for this are that there are no good freely available substitute fonts, and that even if there were, changing TEX’s math fonts is a tedious and somewhat cryptic exercise. The first problem can be overcome by purchasing math fonts such as MathTıme or Lucida. This package is one of the ways overcoming the second, though not the only one. It provides everything except the fonts themselves. (You have shell out money and buy those, sorry).

∗This file has version number 0.4a, last revised 1997/01/27. This file has no connection with the mathtime package commisioned by Y&Y.

It is assumed you are running TEX 3.x and a recent release of L^{A}TEX, and that you have the standard ‘resident’ PostScript fonts installed for use as text fonts in TEX (“PSNFSS”).

2 Installation

This package is useless unless you buy the fonts called MathTıme and MathTımePLUS from Y&Y; the address is listed in Sec. 5.

Prerequisites The “8r-based” version of PSNFSS must be installed on your system to use this package, because the VFs refer to the 8r “raw” fonts. Search on CTAN for the string “psnfss”, consult the L^{A}TEX Companion, and/or the L^{A}TEX 2ε distribution on how to do this. You can check if your system already has the relevant files by searching for the TEX metric file “ptmr8r.tfm” in the tfm file area, and for the file “T1ptm.fd” (or maybe “t1ptm.fd”) in the TEX input file area; if both are present you are probably ok and everything will work.

This dtx file should have come with several sets of accompanying files, whose installation should be routine:

Run TEX on mt11p.ins; that will generate the package “style” file, mt11p.sty. Copy that file to the TEX input file area. Run L^{A}TEX on mt11p.drv to get commented source code (that’s what you’re reading now).

The .tfm metric files should be copied to the area where TEX and the dvi driver program search for font metrics. The .vf definition files should be copied to the area where the dvi driver program searches for virtual font definitions. Note that the metric files supplied are not identical to the ones distributed with the MathTıme fonts.

The file mt11p.map should be “passed” to the dvi driver program to tell it that the MathTıme fonts are downloadable PostScript fonts and what the relevant invocation commands are, or perhaps the file should be passed to a Post-Script rasterizer (“PS–to–PK”) program if the dvi driver must use PK bitmaps. For Rokicki’s dvips driver, the contents of mt11p.map can be appended to the

“psfonts.map” file.

Copy the Type 1 font “programs”—files with extension pfa or pfb—from Y&Y’s distribution media to the area where your dvi driver or rasterizer searches for downloadable fonts. Some fonts may be provided in both pfa and pfb formats; just pick one, most systems can deal with either. (The pfb format is more compact, albeit binary. The dvi driver can probably convert .pfb to .pfa “on the fly”.) There are two versions of the normal weight symbol font, mtsy and mtsyn. The difference is minor, but you might as well use the newer mtsyn. See the paragraph called “Symbols” in the documented source code.^{1}

The names and types (pfa/pfb) of the downloadable files in mt11p.map should be made consistent with the actual names and types under which the Type 1 font programs are stored on your system. Either rename and/or convert the Type 1 fonts, or simply edit the contents of mt11p.map; beware of case sensitivity.

The dvi driver program will probably not need the afm files from the distribution medea, but a “PS–to–PK” rasterizer might; consult the rasterizer documentation. Note that afm files are ascii files, convert line endings as appropriate.

1Run L^{A}TEX on the file mt11p.drv to get the commented source code; it follows after Sec. 5.

At least for this package, no other files from the distribution medea are required.

2.1 Previewing

Whether or not you can preview dvi files which use MathTıme fonts depends on your setup. If you can preview dvi files containing other PostScript fonts, chances are you can preview with MathTıme as well, perhaps after running some utility to generate bitmaps, resolve VF references, etc. Otherwise, it is possible to view the final PostScript output of the dvi driver on practically all platforms using viewers based on the GhostScript rasterizer, or perhaps using DisplayPostScript.

3 Usage & Package Options

To switch to Times text and math, it should suffice to say \usepackage{mt11p} in the preamble. The oder of packages should not matter, with one exception: mt11p should be loaded after AMS math packages. Any reasonably cleanly written L^{A}TEX input file will then be typeset with MathTıme being used for all standard mathematical symbols that would have otherwise been typeset in Computer Modern. There are two notable exceptions, see Sec. 3.2.

Expect a few dozen lines of warnings as this package is being read, and a notice about substituted fonts at the end of the run. I think it is better to live with these NFSS warnings rather than do some hacks to turn them off.

At the end of the run expect a warning about size substitutions if the resize option was in effect (it is by default). They are are due to the Computer Modern fonts usually having a set of sizes available rather than being declared scalable in the .fd file, i.e., a \DeclareFontShape argument of something like <10><10.95><12><14.4> rather than <->. Whether or not something should be done about this depends on what Computer Modern glyphs were used. It may be the case that, in fact, none were—the warnings come from NFSS having loaded fonts for. e.g., \oldstylenums for math, eventhough you never actually used them. You can change the .fd files if you system is capable of generating bitmaps on-the-fly or if you’re using PostScript versions of the Computer Modern fonts. Consult the L^{A}TEX Companion or the standard documentation file fntguide.tex.

3.1 List of options

This packages has lots of options controlling some detailed aspects of font and math character handling. In general, use the defaults, unless you have some idea of what the implications of a particular option are.

Options in effect by default are indicated by a double dagger (‡).

‡T1 reset the \encodingdefault (applicable to text fonts and some math operators, symbols and accents) to T1.

OT1 reset the \encodingdefault to the archaic OT1 encoding; upper case Greek letters are never taken from the text font, so the only reasons to do this are human inertia and legacy code. noenc assume the current \encodingdefault is the desired one; see the commented

source code if you use something other than T1 or OT1.

‡opsafe use symbols and accents from the operators math family only when it is safe to do so.

opnone do not use the operators math family for accents or symbols, except when this can’t be helped; if \encodingdefault is not recognized, this option is auto-invoked.

opmax take as much from the operators math family as possible. Doing so can produce problematic output in some circumstances, but it will make the maximum use of printer resident fonts; don’t use this option unless you know why you are doing so. See the paragraph “Symbols from either operators or from elsewhere” in the documented source code.

‡opaccents take math accents from the operators math family, and make them follow math alphabet changes where possible; see Sec. 3.3.

symaccents take math accents from the a fixed (within a math version) font; if \encodingdefault is not recognized, this option is auto-invoked; see Sec. 3.3.

‡mtcal make the MathTıme script font the math alphabet \mathcal and make \mathscr and synonym of \mathcal; see Sec. 3.4.

cmcal make the MathTıme script font the math alphabet \mathscr and the Computer Modern symbol font the \mathcal alphabet; see Sec. 3.4.

nomtms use the Computer Modern symbol font as the \mathcal alphabet and do not load the MathTıme script font at all; see Sec. 3.4.

‡dohbar overwrite any existing definition of the \hbar (h̄) symbol with one synthesized from an “h” and a bar accent. The definition here is actually rather decent, unlike the simple one usually used. (At least try it before resorting to the glyph in the AMS fonts…)

nohbar do nothing with the \hbar definition, retain the existing one (if any); e.g., the AMS fonts have \hbar as a single Computer Modern-like glyph.

‡subs the bold and heavy math versions in principle need some ‘ultra’ and ‘poster’ weight fonts; usually no such fonts are available, so define substitutes.

nosubs assume suitable fonts are available and will be loaded, e.g., using a configuration file mt11p.cfg; do not declare any font substitutions. If should be apparent from the commented source code or from mt11p.sty what family/series/shape NFSS declaration the extra fonts should get. Search for the string “SUBS” in the .dtx or .sty file.

‡do8r use the raw 8r fonts for the four symbols §, ¶, †, ‡. The math italic fonts use the italic 8r raw fonts, so it’s not unreasonable to assume the upright ones are also available; no support for using the 8r encoding need be installed on the system, though we make use of it if it is. 8r is not used for anything other than these four symbols; see Sec. 3.5.

no8r do not use the raw fonts, and take the four symbols §, ¶, †, ‡ from a Computer Modern font; see Sec. 3.5.

nodag don’t touch the definitions of §, ¶, †, ‡ at all; assume suitable definitions have been or will be supplied, e.g., as part of a TS1 setup. See Sec. 3.5.

‡bsy load the AMS packages needed to define the \boldsymbol macro, and define

analogous \heavysymbol and \normalsymbols macros.

nobsy don’t load the AMS packages for \boldsymbol and define \boldsymbol and \heavysymbol to produce messages and behave as no-ops.

‡mathgr get upright Greek letters as the math alphabet \mathgr; see Sec. 3.9.

nomathgr do not load the math alphabet \mathgr; this is only useful if you are running out of math families, in which case you can use \greekshape in an \hbox with the obvious limitations. See ec. 3.9.

‡mathOS get oldstyle digits as a math alphabet; Computer Modern oldstyle digits are always available in text.

nomathOS do not load Computer Modern oldstyle digits as a math alphabet. See the

nomathgr option.

‡resize change the subscript and text font sizing to better account for the fact that we are using linearly (not optically) scaled fonts.

noresize don’t touch the math subscript and text font sizing.

‡activesb to improve the spacing in certain subscript situations, the subscript character “_” (an underscore) is made active; this might break some macros; see Sec. 3.8

noactivesb don’t do anything with the underscore.

‡times assume the package (style file) which changes the roman, sans and typewriter text families to “Times & Helvetica & Courier” is called “times.sty”; this package is loaded via \RequirePackage.

* any other option will be interpreted as the name of the style file to use instead of times; e.g., the option “btdutch” will attempt to ‘require’ the btdutch package instead of the times package.

3.2 Interaction with AMS macros and other math packages

This package does nothing terribly anti-social and can co-exist with AMS packages, e.g., amsmath, amsfonts, etc., provided those packages are read before (i.e., prior to) reading this package. Some types of macros are hardwired to Computer Modern fonts, e.g., the “AMS” logo and would have to be redefined. The fonts msam and msbm will, or course, still be used for the more uncommon math symbols. See below about math accents.

The default TEX math setup treats upper case Greek letters as mathematical “letters” and lower case Greek letters as mathematical “symbols”. Hence \mathbf{\Gamma\gamma} produces a bold upper case Γ, but does not affect the lower case γ; similarly for \mathit. This package uses the same conventions as the AMS macros: names like “\varGamma” are used for italic upper case Greek (Γ ), and math version switching is needed (\boldsymbol) to get bold Greek. The ‘legacy’ input code \mathbf{\Delta}\mathit{\Gamma} (“ΔΓ ”) does not work with the AMS L^{A}TEX macros nor with this package. See Sec. 3.3 about accents in math.

It is likely that other math font related packages can co-exist with mt11p, particularly if they merely add a math alphabet or symbol font, e.g., mathbbol, stmaryrd or wasysym. The chances of running out of math symbol font families are slim unless you also load the oldlfont package. Note that the AMS symbol packages need two math families. Of course it makes no sense to use mt11p together with another complete math setup package like euler.

One package that will clash with mt11p is yhmath. If you load that package after mt11p, all largesymbols in all math versions will be taken from the fixed size font yhcmex10; loading yhmath before mt11p will break yhmath’s wide math accents. If you only need the extra-wide accents, change all instances of the word “largesymbols” in the file yhmath.sty to something else, e.g., YHlargesymbols, and input that altered file. If you want the extra delimiter sizes, you’re on your own, but see the paragraph “Declaring additional math delimiters” towards the end of the commented source code.

3.3 Math Accents

MathTıme provides an additional accent called \widebar or \overbar. It’s about 1em long. If the AMS macros \Hat, etc., are defined, we also define the

similar \Overbar and \Widebar.

The Computer Modern layout causes some encoding-related problems with math accents and math alphabets. NFSS has hooks to fix the problems, but does not actually do it; the AMS package amsmath does fix them by redefining most math accents.

mt11p incorporates fixes similar to the AMS ones, and overwrites any existing math accent definitions (it pretty much has to), so that any combination of math alphabets and accents (and accents options: opaccents or symaccents) will output the expected glyphs. Some curious combinations will, however, lead to odd-looking accent positioning. In a construct such as \mathit{\hat{x}} the accent positioning will always be “wrong”, because the accent is a text accent— the (text) italic font implied by \mathit doesn’t have the appropriate font metrics because it’s assumed that \mathit will be used when a group of letters (a ‘word’) is to be treated as a math symbol, e.g., x_{initial} or ˆfinal. However, “x” is a mathematical symbol by itself. If you want an italic hat on the symbol x you have to say \mathit{\hat{\mathnormal{x}} (assuming it’s a big deal to have an italic \hat…). Even then the spacing will not be optimal and will usually require some fiddling with the \skew macro.

3.4 Script and calligraphy math fonts

This package makes the distinction between two “calligraphy” math alphabets: calligraphy and script. This is necessitated by the fact that the Computer Modern fonts only have upper case “calligraphy” letters, and that you perhaps may not like the MathTıme mtms* fonts or that you may want to use letters from both fonts.

Irrespective of the options in use, the two math alphabet commands \mathcal and \mathscr will be defined. (The old “\mit” is not defined.)

The default (mtcal) is to make both alphabets refer to a mtms* font. The variant forms of some letters are available with the commands \varA, \varE, \varG,

\varvarG, \varI, \varL, \varQ, \varS, \varr, \varz, \iscript and \jscript.

(\i and \j are invalid in math mode and \imath and \jmath cannot be redefined.) Both upper and lower case letters will work in \mathcal.

Another possibility, cmcal, is to have both Computer Modern and MathTıme fonts available; \mathscr will be the latter, and \mathcal the former. \mathcal will then not have lower case letters.

A third setting, nomtms, avoids using the MathTıme mtms* fonts entirely. \mathcal is then the Computer Modern symbols font, and \mathscr gives a warning before calling \mathcal.

A certain amount of “reasonableness” is assumed with respect to the usage of “calligraphic” alphabets. The mtcal option does not give any warning about the fact that \mathcal and \mathscr are identical. With the cmcal or nomtms options in effect you will get warnings if you try to use a \varX letter in \mathcal, but \mathcal will never try to check its argument to verify that it consists of upper case letters only, even when no font with “calligraphy” lower case letters is available. Consider using \mathcal when the argument is known to contain nothing but upper case letters and use \mathscr when using lower case letters as well; that way you will at least get a warning pertaining to script math alphabets if the options are set to avoid the use of mtms* or if the document is reset without MathTıme fonts.

The MathTıme manuals describe a \script macro; mt11p defines an equivalent macro. Note that \script should only be followed by white space, an optional “*”, and then a single letter, with no space between the asterisk and the

letter, e.g., \script␣*AB is equivalent to \mathscr{\varA}B, not \mathscr{AB},

and \script*␣AB is an error.

3.5 The symbols †, ‡, §, and ¶

The standard L^{A}TEX setup takes these symbols, in both text and math from the Computer Modern symbols font. The MathTıme symbols font does not have these glyphs, so something must be done to have them available for footnote markers, etc.

There is a fairly standard PostScript text symbol font setup, which uses the TS1 encoding, but it seems to not (yet) be in general use.

This package offers three relevant options. The option nodag does absolutly nothing with the four symbols, but this can only be used if they’ve already been or are about to be redefined (perhaps in the mt11p.cfg file), because the default definitions assume the use of Computer Modern fonts and will produce incorrect glyphs after switching to MathTıme.

The default option do8r takes these four symbols (and only these four symbols) from the “raw” 8r encoded fonts, upon which the virtual T1 and OT1 PostScript fonts are built. If .fd files or an 8r.sty are available, we use them; if they’re not, we supply just enough code to be able to use the symbols in NFSS. It is not unreasonable to do so, because the 8r metric file ptmri8r.tfm must be on the system (the mtmi.vf virtual font uses it), so the upright font ptmr8r.tfm is probably available too. Note that 8r is an “unsupported” encoding.

The option no8r overwrites any existing definition and forces the use of Computer Modern for these four symbols (without affecting anything else) and avoids the direct use of 8r raw fonts.

3.6 “New” symbols

MathTıme has a few mathematical symbols that aren’t available in Computer Modern. Here is the list, with alternate names in parentheses: \overbar (\widebar),

\openclubsuit, \shadedclubsuit, \openspadesuit, \shadedspadesuit, \triangleleft,
\triangleright, \cupprod, \capprod, \varcirc (\comp).

3.7 Avoiding the use of bitmap fonts

Often the point of buying the MathTıme fonts is not just to get something other than Computer Modern math, but also to avoid the use of bitmap (Type 3) fonts and use scalable (Type 1) fonts nstead. The default option are set so that this condition is satisfied, as long as you don’t use glyphs that are not available in either the resident fonts nor in MathTıme, i.e., oldstyle digits, or you force the use of Computer Modern or other MetaFont fonts in some situations (the cmcal, nomtms, or no8r options, AMS packages, etc.) and you do not have substitute outline fonts. See the MathTıme licence agreement about “exporting” files containing outline fonts.

3.8 Subscript spacing

The sidebearings of math italic letters with descenders are such that a spacing adjustment is required in certain contexts, in particular in the very common case of j subscripts. The MathTıme distribution suggests using an active subscript character, which checks if the first thing in a subscript is one of the letters f, j or p, and inserts a small negative kern if is it. The macro \jadjust can be used if the correction needs to be done by hand; see Appendix B.2 of the MathTıme Reference Manual.

Changing category codes is akin to Russian roulette: we can try to make the magazine larger, but it will still hold a bullet somewhere. It is unreasonable to assume that other people’s packages will take steps to work even when the underscore is a macro. underscores can crop up in font names or reference labels, for example.

The macro we use is slightly different from the original one in the MathTıme distribution. The \catcode of the underscore ends up being 12, i.e., “other” rather than 13 (“active”), which is much more forgiving. We rely on the fact that the underscore’s \mathcode is "8000 to get subscripts in math mode. This seems to be ok when used in most contexts. In text mode this will produce whatever the current font has in slot `\_, but you shouldn’t be using a ‘naked’ underscore in text anyway…

Nothing is done with the underscore unless its \catcode is “subscript” (8), and its \mathcode is "8000; if both conditions are not fulfilled, someone has presumably already fiddled with the underscore, so we don’t touch it.

The option noactivesb keeps the underscore as it was, in order to quickly ascertain whether the active underscore is braking some macros. Reports of such cases are welcome.

3.9 Upright Greek lower case letters

MathTıme contains an upright Greek letters (text) which are used in some disciplines to designate units or particles. Such letters are normally not used as math symbols. We provide three relevant commands: \greekshape, which is a font switch like \itshape), \textgr, which takes an argument similarly to \textit, and the math alphabet command \mathgr.

Alternate forms of some letters can be obtained as ligatures—see Section 8 of the MathTımeplus reference manual. However, in math (\mathgr) it is not possible to use the ligatures with the asterisk character (*) suggested in the manual, because the asterisk will not be interpreted as a character from the same font as the Greek letters. The TFM metric files accompanying this package contain extra ligatures which produce the variants: in lieu of O* or o*, write vO or vo, respectively; in place of e* write vev.

This package does not define any \gr font switch. \greekshape performs the same function in text; use the \mathgr form in math.

MathTımeplus comes with two “hybrid” fonts, mtmub and mtmuh, which are math letters fonts with upright (instead of sloping) lower case Greek letters. The two fonts contain both upright and italic upper case Greek letter. For reasons listed in the reference manual, there is no font mtmu. This package comes with a mtmu font, created as a VF using mtmi and mtgu, in case you decide to use such a font after all.

See the commented source about declaring upright Greek letters as math symbols and about using mtgu.

3.10 Oldstyle Digits

None of the “standard 35” PostScript fonts has oldstyle digits (1234567890) and neither do any of the MathTıme fonts. The standard TEX math letters font has such digits, and some packages make use of the glyphs. mt11p defines an \oldstylenums macro which is essentially equivalent to the one provided in L^{A}TEX, but note that the Computer Modern oldstyle digits don’t go well with Times text fonts. A mt11p.cfg file or a subsequent package could redefine the macro to use a more suitable font.

3.11 Mixing math versions

Like both the standard TEX math setup and the AMS math setup, we assume that it will be relatively rare to require bold (unbold) symbols^{2} in a formula set in the unbold (bold) math version. We load the AMS amsbsy package which defines a \boldsymbol macro, that sets its argument using the bold math version, and define corresponding corresponding \heavysymbol and \normalsymbol macros.

However, it’s awkward to use the \boldsymbol, etc., macros in situations where alignment is critical (accents) or for large delimiters. For those cases one could declare additional symbol fonts and define things like \boldalpha, \boldhat or \Lheavybrace, and then an input text like

\[\left\Lheavybrace 2\boldalpha ⟨some big formula⟩ \right\Rheavybrace\]

would do what would otherwise take unreadable input code (\vphantom constructs) to produce. This requires some knowledge of the details of TEX’s math workings, but nothing too esoteric. For a simple example the commented source code. Such a setup could be placed in mt11p.cfg. Consult also the standard L^{A}TEX documentation file fntguide.tex. Note that the AMS macros do not provide such a setup, because it’s somewhat rare to actually need it, but it can be done.

3.12 Local Configuration

After setting everything up but before ‘undefining’ internal auxiliary macros and flags, and before changing the subscript sizing this package inputs the file mt11p.cfg, if it can find one. Further definitions (bold or upright Greek letters as symbols, etc.) could be placed in such a file.

4 Bugs

Any reports about bugs, suspected bugs or package clashes are welcome provided you also send just enough TEX code to reproduce the bug and your TEX .log file— use the e-mail address given on the title page of this document and at various places in the files. Report of usage are also welcome;-).

5 Acknowledgment & Misc.

This section has been put here, in case you don’t print out the commented source code.

Thanks to the authors and maintainers of L^{A}TEX, and particularly to the authors of NFSS.

Portions of this package were stolen from the mathtimy package by Aloysius Helminck, and from the TEX files provided with the MathTıme distribution.

The “operative” part of this package was written before the release of the mathtime package by Y&Y.

2The arguments of \mathbf are not considered ‘symbols’. The input text \mathbf{a} produces a bold upright “a” not the bold math symbol “a”.

MathTıme is a trademark of Publish or Perish, Inc.

A bunch of other names are trademarks or registered trademarks, as everybody knows…

The contact address for Y&Y is

Y&Y, Inc. 106 Indian Hill Carlisle, MA 01741 USA

     http://www.yandy.com

This software is provided “as-is”, with no warranty of any kind; the user assumes all responsibility for its use.

The author has no association with Y&Y, Inc., other than having purchased the MathTıme fonts.