summaryrefslogtreecommitdiff
path: root/texmf-dist/source/latex/mathtime-ltx/mathtime.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'texmf-dist/source/latex/mathtime-ltx/mathtime.dtx')
-rw-r--r--texmf-dist/source/latex/mathtime-ltx/mathtime.dtx1187
1 files changed, 1187 insertions, 0 deletions
diff --git a/texmf-dist/source/latex/mathtime-ltx/mathtime.dtx b/texmf-dist/source/latex/mathtime-ltx/mathtime.dtx
new file mode 100644
index 00000000..53adb580
--- /dev/null
+++ b/texmf-dist/source/latex/mathtime-ltx/mathtime.dtx
@@ -0,0 +1,1187 @@
+%
+% \iffalse
+%% Copyright 1996 1997 Frank Mittelbach and David Carlisle.
+%%
+%% Development of this package was commissioned by Y&Y Inc.
+%% http://www.yandy.com
+%% This package may be distributed under the terms of the LaTeX Project Public
+%% License, as described in lppl.txt in the base LaTeX distribution.
+%% Either version 1.0 or, at your option, any later version.
+%%
+%
+%
+%<*dtx>
+ \ProvidesFile{mathtime.dtx}
+%</dtx>
+%<package>\NeedsTeXFormat{LaTeX2e}[1995/01/01]
+%<mathtime>\ProvidesPackage{mathtime}
+%<mathpi>\ProvidesPackage{mathpi}
+%<driver>\ProvidesFile{mathtime.drv}
+% \fi
+% \ProvidesFile{mathtime.dtx}
+ [1999/03/29 v1.1%
+%<mathtime> mathtime
+%<mathpi> mathpi
+ font support (FMi/DPC)]
+%
+% \iffalse
+%<*driver>
+\documentclass{ltxdoc}
+%\usepackage{mathtime}
+\DocInput{mathtime.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{853}
+%
+% \GetFileInfo{mathtime.dtx}
+% \begin{document}
+% \title{The \textsf{mathtime} and \textsf{mathpi} packages\thanks
+% {This file has version number \fileversion,
+% last revised \filedate.}\ \thanks{Development of
+% this package was commissioned by Y\&Y.}}
+%
+% \date{\filedate}
+% \author{Frank Mittelbach with support by David Carlisle}
+% \maketitle
+%
+% \section{The mathtime package}
+%
+% The mathtime package contains the code to support the Math Time fonts.
+%
+% \subsection{Usage and options}
+%
+% To load support for the Math Time fonts add the following
+% declaration to the preamble of your \LaTeX{} document:
+% \begin{quote}
+% \verb=\usepackage[=\meta{options}\verb=]{mathtime}=
+% \end{quote}
+% This package supports several options:
+% \begin{description}
+% \item[nobold] default.
+%
+% \item[cmbold] use cm bold fonts (not recommended, the bold fonts
+% will then be encoded differently to the normal weight ones, and
+% no account of this will be taken).
+%
+% \item[mtbold] This provides bold and heavy math versions coming
+% with the Math Time Plus fonts.
+%
+% \item[heavybold] Also requires the Math Time Plus font set, just
+% define bold math version (not heavy) but use the heavy fonts where
+% available.
+%
+% In all cases the user level command |\heavymath| is defined to be
+% |\boldmath| if the heavy math version is not defined.
+%
+% \item[slantedgreek] Make the lowercase greek letters slanted
+% (by default).
+% Note that the uppercase greek letters are always upright.
+%
+% \item[uprightgreek] Make the lowercase greek letters upright.
+%
+% \item[subscriptcorrection]
+% Redefine |_| so that it automatically adds negative kerns in
+% subscripts if they start with either
+% \texttt{j}, \texttt{p}, or \texttt{f}.
+% This option might generate problems if other packages are
+% loaded as well.
+%
+% The subscript correction also be be turned on and off within the
+% document using the commands:\\
+% |\enablesubscriptcorrection| and
+% |\disablesubscriptcorrection|.
+%
+% \item[nosubscriptcorrection]
+% Disable the the subscript correction (default).
+%
+% \item[cmcal]
+% This option uses the Computer Modern calligraphic alphabet
+% for |\mathcal| --- a bad choice, but what do you do if nothing else
+% is at your disposal. We make this the default as we know that it is
+% always around.
+%
+% \item[lucidacal] This options sets up |\mathcal| to load the Lucida
+% calligraphic font as a math alphabet. It also defines |\mathbcal| to
+% always refer to the bold series of this alphabet.
+%
+% \item[lucidascr] Like \texttt{lucidacal} but puts the font into
+% |\mathscr|. This might be useful if for some reason |\mathcal|
+% already contains some special calligraphic alphabet.
+%
+% \item[mtplusscr] This options sets up |\mathscr| to load the Math Time
+% Plus script font as a math alphabet. It also defines |\mathbscr| to
+% always refer to the bold series of this alphabet.
+%
+% \item[mtpluscal] Like \texttt{mtplusscr} but puts the font into the
+% |\mathcal| alphabet.
+%
+% \item[noTS1]
+% The use of the mathtime fonts with text fonts encoded in the
+% standard OT1 or T1 encodings leaves a few symbols (section and
+% paragraph marks, and dagger symbols) undefined.
+% By default the TS1 `text companion encoding' will be used to access
+% these symbols, but this option suppresses that.
+% If the LY1 option (below) is used this option
+% will be implied and dagger etc will be drawn from the operators font.
+%
+% \item[OT1] Use OT1 encoing for the operators font. This is the
+% normal behaviour, but in this package the default behaviour is to
+% use the default text encoding for the operators font.
+%
+% \item[T1] Use T1 encoding for the operators font.
+%
+% \item[LY1] Use LY1 (Y\&Y's `locally' defined texnansi encoding)
+% In the operators font. This option implies the noTS1 option.
+% Dagger etc will be drawn from the operators font in this case.
+%
+% \end{description}
+%
+% Not all options can be used together, e.g., one can at most select one
+% of the options setting up |\mathcal|, if both options are given
+% \texttt{mtpluscal} will win over \texttt{luciadcal} and in case of
+% |\mathscr|,
+% \texttt{lucidascr} will be the winner over \texttt{mtplusscr}.
+%
+% This package makes a lot of font re-assignments. Normally these
+% generate warning messages on the terminal, however getting so many
+% messages would be distracting, so a further three options control the
+% font tracing. Even more control may be obtained by loading the
+% \textsf{tracefnt} package.
+%
+% \begin{description}
+% \item[errorshow] Only show font \emph{errors} on the terminal.
+% Warnings are just sent to the log file. This is the default
+% for this package.
+%
+% \item[warningshow] Show font warnings on the terminal. This
+% corresponds to the usual \LaTeX\ behaviour.
+%
+% \item[nofontinfo] Suppress all font warnings, even from the log file.
+% \end{description}
+%
+%
+%
+% \subsection{Text fonts}
+% The package sets up Times, Helvetica, and Courier as the default
+% text fonts (selected through |\textrm|, |\textsf|, and |\texttt|)
+% unless the text fonts have been explicitly set, e.g., by loading a
+% package like \texttt{newcent} before loading the \texttt{mathtime}
+% package.
+% More exactly the package checks if |\rmdefault| refers to \texttt{cmr}
+% and in that case changes all three defaults.
+%
+% To support a few symbols not available in the Math Time fonts (but
+% normally available with \LaTeX) the \texttt{mathtime} package has to
+% load the the symbol companion font for Times (i.e., the TS1 encoded
+% font).
+% To preserve space we do not load the corresponding package
+% (\texttt{texcomp}) but only declare those characters we do need.
+% If you do want all symbols from this font available in your text load
+% the \texttt{textcomp} package in the preamble. Conversely you
+% may suppress the declaration of these symbols from the TS1 encoded
+% fonts by use of the \texttt{nots1} package option, in which case
+% the default definitions refering to the standard \TeX\ encodings
+% and hence possibly the Computer Modern fonts will be used.
+%
+% \subsection{Provided math alphabets}
+%
+% The package provides be default the five standard math alphabets
+% |\mathrm|, |\mathbf|, |\mathit|, |\mathsf| and |\mathtt| pointing
+% to the document text fonts, the first three to the roman font
+% in normal, bold, and italic, the others to the sans serif and the
+% typewriter font.
+%
+% The |\mathcal| and |\mathbcal| defaults to the Computer Modern
+% calligraphic alphabet but can be modified with options as decribed
+% above.
+%
+% Script alphabets with |\mathscr| and |\mathbscr| are only available
+% if explicitly selected by an option.
+%
+% Alternatively one can select other fonts for |\mathscr| and
+% |\mathcal|, for example, by loading the \texttt{mathpi} package
+% described below.
+% An alternative (although not blending very well) would be the
+% the Euler Script fonts from the AMS font collection which can be
+% loaded as either |\mathcal| or |\mathscr| using the \texttt{eucal}
+% package.
+%
+% A Fraktur alphabet (|\mathfrak|) can be loaded with the
+% \texttt{mathpi} fonts (a good match) or by loading the \texttt{eufrak}
+% package from the AMS font collection.
+%
+%
+% \subsection{Additional or changed symbols}
+%
+% The Math Time fonts contain a small number of additional symbols which
+% are made available by the \texttt{mathtime} package.
+% See the general documentation of the Math Time fonts.
+%
+% \subsection{Font sizes}
+%
+% \LaTeX{} is set up in a way that the user normally uses commands
+% that hide font sizes rather than specifying font sizes explicitly,
+% e.g., instead of |\fontsize{17pt}{19pt}|\allowbreak|\selectfont|
+% a command like |\LARGE| is used (which does in fact a bit more than
+% just setting the font size).
+%
+% It is the task of a document class and not that task of a support
+% package like this one to decide about the absolute sizes used in a
+% document.
+% The task of a package like \texttt{mathtime} is to provide sensible
+% values for math sizes given some text size.
+%
+% The default ratio for script fonts is 0.76
+% and for scriptscript fonts 0.6.
+%
+%
+% \section{The mathpi package}
+%
+% The mathpi package provides support for the Adobe math pi fonts by
+% declaring a number of math alphabets. It can be used independly of the
+% mathtime package. At least one option has to be given, otherwise
+% loading this package will have no effect.
+% \begin{description}
+% \item[mathfrak] Defines |\mathfrak| to refer to the fraktur alphabet
+% from the Math Pi Two font.
+% \item[mathscr] Defines |\mathscr| to refer to the script alphabet
+% from the Math Pi Two font. This needs the font especially encoded,
+% see \texttt{mtfonts.fdd} for details.
+% \item[mathcal] Defines the script alphabet under the math alphabet
+% command usually used for a calligraphic font, otherwise like
+% \texttt{mathscr}.
+% \item[mathbb] Defines |\mathbb| to refer to the blackboard bold math
+% alphabet from Math Pi Six.
+% \end{description}
+%
+%
+% \StopEventually{}
+%
+%
+%
+% \section{The implementation of mathtime}
+%
+% \changes{v0.2}{1996/12/12}
+% {nobold cmbold mtbold and heavybold options}
+% \changes{v0.3}{1996/12/17}
+% {nobold cmbold mtbold and heavybold options}
+% \changes{v0.7}{1997/01/10}
+% {Add font tracing control options}
+% \changes{v0.9}{1997/01/16}
+% {First public release}
+% \changes{v1.0a}{1997/02/14}
+% {First ctan release}
+% \changes{v1.0d}{1997/09/01}
+% {Remove use of double quote hex convention}
+%
+% \subsection{Options}
+%
+% We start with declaring the options. For the (un)slanted greek we need
+% store the shape information in a macro. For the various bold options
+% we use |\boldmath| as a marker since this needs redefinition anyway.
+% \begin{macrocode}
+%<*mathtime>
+\newcommand\greekshape{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{slantedgreek}{\renewcommand\greekshape{it}}
+\DeclareOption{uprightgreek}{\renewcommand\greekshape{n}}
+\DeclareOption{nobold}{\let\boldmath=u}
+\DeclareOption{cmbold}{\let\boldmath=c}
+\DeclareOption{mtbold}{\let\boldmath=m}
+\DeclareOption{heavybold}{\let\boldmath=h}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\enablesubscriptcorrection {\catcode`\_=12\relax}
+\newcommand\disablesubscriptcorrection{\catcode`\_=8\relax}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{nosubscriptcorrection}{\disablesubscriptcorrection}
+\DeclareOption{subscriptcorrection} {\enablesubscriptcorrection}
+% \end{macrocode}
+%
+% We signal that we want Lucida calligraphic by defining |\mathcal|
+% to be the letter |l|. In a similar fashion we handle |\mathscr|.
+% \begin{macrocode}
+\DeclareOption{cmcal} {\let\mathcal=c}
+\DeclareOption{lucidacal}{\let\mathcal=l}
+\DeclareOption{mtplusscr}{\let\mathscr=s}
+\DeclareOption{mtpluscal}{\let\mathcal=s}
+\DeclareOption{lucidascr}{\let\mathscr=l}
+% \end{macrocode}
+%
+%
+% The use of the mathtime fonts with text fonts encoded in the standard
+% OT1 or T1 encodings leaves a few symbols (section and paragraph marks,
+% and dagger symbols) undefined. By default the TS1 `text companion
+% encoding' will be used to access these symbols, but this option
+% suppresses that. (Leaving you to define these symbols yourself
+% some other way, or to accept the default definitions, from
+% Computer Modern.)
+% \changes{v0.9b}{1997/01/31}
+% {option name change nots1 noTS1}
+% \begin{macrocode}
+\DeclareOption{noTS1} {\let\symtextcomp\relax}
+% \end{macrocode}
+%
+% The next few options control the encoding used for the `operators'
+% font. When using Computer Modern Math fonts an OT1 font must be used
+% even if an alternative encoding, such as T1, is used for the text
+% fonts. This is due to the fact that the default math setup assumes
+% that certain symbols (such as uppercase Greek) are available from the
+% text font used for the operators symbol font. With this package
+% this restriction is not needed as all symbols are accessed from the
+% mathtime fonts.
+% \changes{v0.9b}{1997/01/31}
+% {New options for operator font encoding}
+% By default use the current text encoding.
+% \begin{macrocode}
+\let\operator@encoding\encodingdefault
+% \end{macrocode}
+%
+% Use OT1 encoded `operators' fonts.
+% \begin{macrocode}
+\DeclareOption{OT1}{\def\operator@encoding{OT1}}
+% \end{macrocode}
+%
+% Use T1 encoded `operators' fonts.
+% \begin{macrocode}
+\DeclareOption{T1}{\def\operator@encoding{T1}}
+% \end{macrocode}
+%
+% Use LY1 (The local `texnansi' encoding used by the Y\&Y \TeX\ system)
+% encoded `operators' fonts. This option implies the `noTS1' option
+% as the LY1 encoding includes the dagger and other symbols.
+% \begin{macrocode}
+\DeclareOption{LY1}{\def\operator@encoding{LY1}\ExecuteOptions{noTS1}}
+% \end{macrocode}
+%
+% This package makes a lot of redefinitions. The warnings can be rather
+% annoying so some package options control whether the information
+% is printed to the terminal or log file. More control can be obtained
+% by loading the \textsf{tracefnt} package.
+%
+% Just show font errors; Warning and info to the log file.
+% The default for this package.
+% \begin{macrocode}
+\DeclareOption{errorshow}{%
+ \def\@font@info#1{%
+ \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
+ {LaTeX Font Info: \space\space\space#1}}%
+ \def\@font@warning#1{%
+ \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
+ {LaTeX Font Warning: #1}}}
+% \end{macrocode}
+%
+% The normal \LaTeX\ default, Font Info to the log file and Font
+% Warning to the terminal.
+% \begin{macrocode}
+\DeclareOption{warningshow}{%
+ \def\@font@info#1{%
+ \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
+ {LaTeX Font Info: \space\space\space#1}}%
+ \def\@font@warning#1{%
+ \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
+ {LaTeX Font Warning: #1}}}
+% \end{macrocode}
+%
+% On some machines writing all the log info may slow things down
+% so extra option not to log font changes at all.
+% \begin{macrocode}
+\DeclareOption{nofontinfo}{%
+ \let\@font@info\@gobble
+ \let\@font@warning\@gobble}
+% \end{macrocode}
+%
+% The defaults:
+% \begin{macrocode}
+\ExecuteOptions{%
+ slantedgreek,nobold,nosubscriptcorrection,cmcal,errorshow}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ProcessOptions
+% \end{macrocode}
+%
+% If the text font default for roman is CMR we switch to Times,
+% otherwise we assume that the user has already added a package
+% selecting the text font faces.
+% \begin{macrocode}
+\edef\@tempa{\rmdefault}
+\def\@tempb {cmr}
+\ifx\@tempa\@tempb
+ \renewcommand*\sfdefault{phv}
+ \renewcommand*\rmdefault{ptm}
+ \renewcommand*\ttdefault{pcr}
+ \renewcommand*\bfdefault{b}
+\fi
+% \end{macrocode}
+%
+% \subsection{Math Font Declarations}
+%
+% As the Math Time fonts unfortunately do come with their private
+% encoding we need to make those encodings known to \LaTeX.
+% \begin{macrocode}
+\DeclareFontEncoding{MY1}{}{}
+\DeclareFontEncoding{MY2}{}{}
+\DeclareFontEncoding{MY3}{}{}
+\DeclareFontSubstitution{MY1}{mtt}{m}{it}
+\DeclareFontSubstitution{MY2}{mtt}{m}{n}
+\DeclareFontSubstitution{MY3}{mtt}{m}{n}
+% \end{macrocode}
+%
+% Not clear if we should use |\rmdefault| or fix the operator symbol
+% font to Times --- probably the latter.
+%
+% The main four symbol fonts are already declared in the \LaTeX{}
+% format. Thus we don't need to declare them but simply change he
+% relevant slots in the normal and bold math version.
+%
+% \changes{v0.9b}{1997/01/31}
+% {Dont force OT1 encoding for operators}
+% \begin{macrocode}
+%\DeclareSymbolFont{operators} {\operator@encoding}{\rmdefault}{m}{n}
+%\DeclareSymbolFont{letters} {MY1}{mtt}{m}{it}
+%\DeclareSymbolFont{symbols} {MY2}{mtt}{m}{n}
+%\DeclareSymbolFont{largesymbols}{MY3}{mtt}{m}{n}
+% \end{macrocode}
+%
+% The normal weight fonts are availble by default.
+% \begin{macrocode}
+\SetSymbolFont{operators} {normal}{\operator@encoding}{ptm}{m}{n}
+\SetSymbolFont{letters} {normal}{MY1}{mtt}{m}{it}
+\SetSymbolFont{symbols} {normal}{MY2}{mtt}{m}{n}
+\SetSymbolFont{largesymbols}{normal}{MY3}{mtt}{m}{n}
+% \end{macrocode}
+%
+% If the |cmbold| package option is specified then the
+% Computer Modern Bold math fonts will be used (as is the
+% normal \LaTeX\ default). The mathtime fonts are \emph{differently}
+% encoded, and so the use of this option may produce some incorrect
+% characters (with no warning). However it may be useful if the
+% `mathtime plus' bold fonts are not available, and a few bold
+% symbols are needed for special circumstances. (However CM bold
+% is not much bolder than mathtime normal weight, and is not really
+% visually compatible).
+% \begin{macrocode}
+\ifx\boldmath c
+ \SetSymbolFont{operators} {bold}{\operator@encoding}{cmr}{bx}{n}
+ \SetSymbolFont{letters} {bold}{OML}{cmm}{b}{it}
+ \SetSymbolFont{symbols} {bold}{OMS}{cmsy}{b}{n}
+ \SetSymbolFont{largesymbols}{bold}{MY3}{mtt}{m}{n}
+\PackageWarningNoLine{mathtime}
+ {The use of the `cmbold' option will result\MessageBreak
+ in incorrect characters in some circumstances\MessageBreak
+ without any warning as the Math Time fonts and the\MessageBreak
+ Computer Modern fonts have incompatible encodings.\MessageBreak
+ Please use this option with care!\@gobble}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \renewcommand\boldmath{\@nomath\boldmath\mathversion{bold}}
+ \let\heavymath\boldmath
+\fi
+% \end{macrocode}
+%
+% This is the default behaviour for this package, |\boldmath| is
+% not available. As it is no longer available save some space
+% by removing it from the internal list of math versions.
+% (Then waste most of the saving on the text of an error message.)
+% \begin{macrocode}
+\ifx\boldmath u
+ \let\@tempa\version@elt
+ \def\version@elt#1{%
+ \ifx\mv@bold#1\else\noexpand\version@elt\noexpand#1\fi}
+ \edef\version@list{\version@list}
+ \let\version@elt\@tempa
+ \let\mv@bold\@undefined
+ \renewcommand\boldmath{\PackageError{mathtime}%
+ {Bold math is not supported}%
+ {Use cmbold or mtbold options}}
+ \let\heavymath\boldmath
+\fi
+% \end{macrocode}
+%
+% If the bold (and heavy) mathtime fonts are available then they
+% can be assigned to the appropriate math versions by specifying the
+% |mtbold| package option.
+% \begin{macrocode}
+\ifx\boldmath m
+ \SetSymbolFont{operators}{bold}{\operator@encoding}{\rmdefault}{b}{n}
+ \SetSymbolFont{letters} {bold}{MY1}{mtt}{b}{\greekshape}
+ \SetSymbolFont{symbols} {bold}{MY2}{mtt}{b}{n}
+ \SetSymbolFont{largesymbols}{bold}{MY3}{mtt}{b}{n}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \DeclareMathVersion{heavy}
+ \SetSymbolFont{operators}{heavy}{\operator@encoding}{\rmdefault}{b}{n}
+ \SetSymbolFont{letters} {heavy}{MY1}{mtt}{ub}{\greekshape}
+ \SetSymbolFont{symbols} {heavy}{MY2}{mtt}{ub}{n}
+ \SetSymbolFont{largesymbols}{heavy}{MY3}{mtt}{ub}{n}
+% \end{macrocode}
+%
+% \changes{v0.9a}{1997/01/17}
+% {Redeclare colon etc to the symbols font}
+% As the bold font is available, use these symbols from
+% the symbols font rather than operators, so they are made
+% bold by |\boldmath|.
+% \begin{macrocode}
+ \DeclareMathSymbol{:}{\mathrel}{symbols}{86}
+ \DeclareMathSymbol{!}{\mathclose}{symbols}{87}
+ \DeclareMathSymbol{[}{\mathopen}{symbols}{84}
+ \DeclareMathSymbol{]}{\mathclose}{symbols}{85}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \renewcommand\boldmath{\@nomath\boldmath\mathversion{bold}}
+ \newcommand\heavymath{\@nomath\heavymath\mathversion{heavy}}
+\fi
+% \end{macrocode}
+%
+% Alternatively, you may specify the |heavybold| option, which
+% instead of having a `heavy' math version, places the heavy
+% fonts in the `bold' math version, to get greater visual
+% contrast.
+% \begin{macrocode}
+\ifx\boldmath h
+ \SetSymbolFont{operators}{bold}{\operator@encoding}{\rmdefault}{b}{n}
+ \SetSymbolFont{letters} {bold}{MY1}{mtt}{ub}{\greekshape}
+ \SetSymbolFont{symbols} {bold}{MY2}{mtt}{ub}{n}
+ \SetSymbolFont{largesymbols}{bold}{MY3}{mtt}{ub}{n}
+% \end{macrocode}
+%
+% As above, use these symbols from
+% the symbols font rather than operators, so they are made
+% bold by |\boldmath|.
+% \begin{macrocode}
+ \DeclareMathSymbol{:}{\mathrel}{symbols}{86}
+ \DeclareMathSymbol{!}{\mathclose}{symbols}{87}
+ \DeclareMathSymbol{[}{\mathopen}{symbols}{84}
+ \DeclareMathSymbol{]}{\mathclose}{symbols}{85}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \renewcommand\boldmath{\@nomath\boldmath\mathversion{bold}}
+ \let\heavymath\boldmath
+\fi
+% \end{macrocode}
+%
+%
+% \subsection{Math alphabet declarations}
+%
+% The standard alphabets first.
+%
+% We don't have to declare |\mathrm| as \LaTeX{} declares it as
+% a math symbol alphabet pointing to ``operators'' symbol font.
+% But if we redeclare it it will then use the text fonts which might
+% not be Times.
+%
+% As standard \LaTeX{} provides a couple of alphabets we better change
+% them all \ldots
+% \begin{macrocode}
+\SetMathAlphabet{\mathrm}{normal}{\encodingdefault}{\rmdefault}{m}{n}
+\SetMathAlphabet{\mathbf}{normal}{\encodingdefault}{\rmdefault}{b}{n}
+\SetMathAlphabet{\mathit}{normal}{\encodingdefault}{\rmdefault}{m}{it}
+\SetMathAlphabet{\mathsf}{normal}{\encodingdefault}{\sfdefault}{m}{n}
+\SetMathAlphabet{\mathtt}{normal}{\encodingdefault}{\ttdefault}{m}{n}
+% \end{macrocode}
+%
+% If a bold or heavy version exists add appropriate values.
+% Right now |\mathbf| is the same in all versions.
+% \begin{macrocode}
+\ifx\mv@bold\@undefined
+\else
+ \SetMathAlphabet{\mathrm}{bold} {\encodingdefault}{\rmdefault}{b}{n}
+ \SetMathAlphabet{\mathbf}{bold} {\encodingdefault}{\rmdefault}{b}{n}
+ \SetMathAlphabet{\mathit}{bold} {\encodingdefault}{\rmdefault}{b}{it}
+ \SetMathAlphabet{\mathsf}{bold} {\encodingdefault}{\sfdefault}{b}{n}
+% \end{macrocode}
+% If the typewriter is Computer Modern the next declaration will revert
+% to normal (with a warning) but such is life.
+% \begin{macrocode}
+ \SetMathAlphabet{\mathtt}{bold} {\encodingdefault}{\ttdefault}{b}{n}
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ifx\mv@heavy\@undefined
+\else
+ \SetMathAlphabet{\mathrm}{heavy}{\encodingdefault}{\rmdefault}{b}{n}
+ \SetMathAlphabet{\mathbf}{heavy}{\encodingdefault}{\rmdefault}{b}{n}
+ \SetMathAlphabet{\mathit}{heavy}{\encodingdefault}{\rmdefault}{b}{it}
+ \SetMathAlphabet{\mathsf}{heavy}{\encodingdefault}{\sfdefault}{b}{n}
+ \SetMathAlphabet{\mathtt}{heavy}{\encodingdefault}{\ttdefault}{b}{n}
+\fi
+% \end{macrocode}
+%
+% \subsubsection{Script alphabets}
+%
+% If the \texttt{mtplusscr} option was selected
+% we make |\mathscr| point to Spivak's script font.
+%
+% Declaring the bold version first takes care of bold and heavy
+% version.
+% So far this doesn't allow for alternatives but I think the best
+% solution here would be to provide input ligatures \texttt{*A}
+% etc.\ in the font itself. However as \TeX{} doesn't handle math
+% accents correctly in that case that idea might not be so good after
+% all.
+% Perhaps defining a |\variant| command might be better, e.g.,
+% |\mathscr{\variant A}| --- we'll see.
+% \changes{v1.0b}{1997/02/24}
+% {clear existing definitions of \cs{mathscr} and \cs{mathcal}}
+% \begin{macrocode}
+\ifx\mathscr s
+ \let\mathscr\relax
+ \DeclareMathAlphabet\mathscr{U} {mtms}{b}{n}
+ \SetMathAlphabet \mathscr{normal}{U}{mtms}{m}{n}
+% \end{macrocode}
+%
+% The |\mathbscr| is bold in all versions.
+% \begin{macrocode}
+ \DeclareMathAlphabet\mathbscr{U}{mtms}{b}{n}
+\fi
+% \end{macrocode}
+%
+% If \texttt{lucidascr} was selected we put the Lucida calligraphic
+% font in |\mathscr|:
+% \begin{macrocode}
+\ifx\mathscr l
+ \let\mathscr\relax
+ \DeclareMathAlphabet{\mathscr} {OMS}{lby}{b}{n}
+ \SetMathAlphabet {\mathscr}{normal} {OMS}{lby}{m}{n}
+% \end{macrocode}
+% |\mathbscr| will be bold in all math versions.
+% \begin{macrocode}
+ \DeclareMathAlphabet{\mathbscr} {OMS}{lby}{b}{n}
+\fi
+% \end{macrocode}
+%
+% \subsubsection{Calligraphic alphabets}
+%
+% If the \texttt{lucidacal} option was selected we set up |\mathcal|.
+% \begin{macrocode}
+\ifx\mathcal l
+ \let\mathcal\relax
+ \DeclareMathAlphabet{\mathcal} {OMS}{lby}{b}{n}
+ \SetMathAlphabet {\mathcal}{normal} {OMS}{lby}{m}{n}
+% \end{macrocode}
+% |\mathbcal| will be bold in all math versions.
+% \begin{macrocode}
+ \DeclareMathAlphabet{\mathbcal} {OMS}{lby}{b}{n}
+\fi
+% \end{macrocode}
+%
+% The code below refers to the \texttt{mtpluscal} option:
+% \begin{macrocode}
+\ifx\mathcal s
+ \let\mathcal\relax
+ \DeclareMathAlphabet\mathcal{U} {mtms}{b}{n}
+ \SetMathAlphabet \mathcal{normal}{U}{mtms}{m}{n}
+% \end{macrocode}
+%
+% The |\mathbcal| is bold in all versions.
+% \begin{macrocode}
+ \DeclareMathAlphabet\mathbcal{U}{mtms}{b}{n}
+\fi
+% \end{macrocode}
+% The code below will be used if no calligraphic option has been
+% selected. We need to redeclare that alphabet as by default it points
+% to the symbols alphabet that in case of the Math Time fonts simply
+% doesn't contain a math alphabet any longer.
+% \begin{macrocode}
+\ifx\mathcal c
+ \let\mathcal\relax
+ \DeclareMathAlphabet\mathcal{OMS} {cmsy}{b}{n}
+ \SetMathAlphabet \mathcal{normal}{OMS}{cmsy}{m}{n}
+% \end{macrocode}
+%
+% The |\mathbcal| is bold in all versions.
+% \begin{macrocode}
+ \DeclareMathAlphabet\mathbcal{OMS} {cmsy}{b}{n}
+
+\fi
+% \end{macrocode}
+%
+% \subsection{Math Symbol Declarations}
+%
+% In MathT\i me, italic upper case Greek found in math italic font
+% and we don't make them changable with the font.
+% \begin{macrocode}
+\DeclareMathSymbol\Gamma {\mathord}{letters}{48}
+\DeclareMathSymbol\Delta {\mathord}{letters}{49}
+\DeclareMathSymbol\Theta {\mathord}{letters}{50}
+\DeclareMathSymbol\Lambda {\mathord}{letters}{51}
+\DeclareMathSymbol\Xi {\mathord}{letters}{52}
+\DeclareMathSymbol\Pi {\mathord}{letters}{53}
+\DeclareMathSymbol\Sigma {\mathord}{letters}{54}
+\DeclareMathSymbol\Upsilon{\mathord}{letters}{55}
+\DeclareMathSymbol\Phi {\mathord}{letters}{56}
+\DeclareMathSymbol\Psi {\mathord}{letters}{57}
+\DeclareMathSymbol\Omega {\mathord}{letters}{127}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareMathSymbol\varGamma {\mathord}{letters}{0}
+\DeclareMathSymbol\varDelta {\mathord}{letters}{1}
+\DeclareMathSymbol\varTheta {\mathord}{letters}{2}
+\DeclareMathSymbol\varLambda {\mathord}{letters}{3}
+\DeclareMathSymbol\varXi {\mathord}{letters}{4}
+\DeclareMathSymbol\varPi {\mathord}{letters}{5}
+\DeclareMathSymbol\varSigma {\mathord}{letters}{6}
+\DeclareMathSymbol\varUpsilon {\mathord}{letters}{7}
+\DeclareMathSymbol\varPhi {\mathord}{letters}{8}
+\DeclareMathSymbol\varPsi {\mathord}{letters}{9}
+\DeclareMathSymbol\varOmega {\mathord}{letters}{10}
+% \end{macrocode}
+% The next setting all need to be checked for correctness
+% (with a test file).
+% Those settings where I think the \LaTeX{} defaults are the same, are
+% commented out.
+%
+% \begin{macrocode}
+\DeclareMathSymbol{(}{\mathopen}{letters}{46} % was 028
+\DeclareMathSymbol{)}{\mathclose}{letters}{47} % was 029
+% \end{macrocode}
+%
+% Not sure this version of |\DeclareMathDelimiter| is documented or
+% used anywhere, but like |\DeclareMathSymbol| it can take
+% a character token (and one less argument).
+% \changes{v0.2}{1996/12/12}{use \cs{DeclareMathDelimiter}}
+% \begin{macrocode}
+\DeclareMathDelimiter{(}{letters}{46}{largesymbols}{0}
+\DeclareMathDelimiter{)}{letters}{47}{largesymbols}{1}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%\DeclareMathSymbol{.}{\mathord}{letters}{58}
+%\DeclareMathSymbol{,}{\mathpunct}{letters}{59}
+%\DeclareMathSymbol{\ldotp}{\mathpunct}{letters}{58}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareMathSymbol{\triangleleft}{\mathbin}{symbols}{71} % was 12F
+\DeclareMathSymbol{\triangleright}{\mathbin}{symbols}{70} % was 12E
+% \end{macrocode}
+%
+% \changes{v0.9c}{1997/02/07}
+% {Add \cs{varkappa}}
+% \begin{macrocode}
+\DeclareMathSymbol{\comp}{\mathbin}{symbols}{66} % new?
+\DeclareMathSymbol{\setdif}{\mathbin}{symbols}{88} % new
+\DeclareMathSymbol{\cupprod}{\mathbin}{symbols}{89} % new
+\DeclareMathSymbol{\capprod}{\mathbin}{symbols}{90} % new
+\DeclareMathSymbol{+}{\mathbin}{symbols}{67} % was 02B
+\DeclareMathSymbol{=}{\mathrel}{symbols}{68} % was 03D
+\let\Relbar\@undefined
+\DeclareMathSymbol{\Relbar}{\mathrel}{symbols}{72} % was a macro
+\DeclareMathSymbol{;}{\mathpunct}{symbols}{73} % was 13B
+\DeclareMathSymbol{\varkappa}{\mathord}{letters}{126} % new (AMS)
+% \end{macrocode}
+%
+% We make all accents |\mathord|; as they are placed in strange
+% positions it is really not feasible to support changing them.
+% \begin{macrocode}
+\DeclareMathAccent{\vec}{\mathord}{symbols}{69}
+\DeclareMathAccent{\grave}{\mathord}{symbols}{74}
+\DeclareMathAccent{\acute}{\mathord}{symbols}{75}
+\DeclareMathAccent{\check}{\mathord}{symbols}{76}
+\DeclareMathAccent{\breve}{\mathord}{symbols}{77}
+\DeclareMathAccent{\bar}{\mathord}{symbols}{78}
+\DeclareMathAccent{\hat}{\mathord}{symbols}{79}
+\DeclareMathAccent{\dot}{\mathord}{symbols}{80}
+\DeclareMathAccent{\tilde}{\mathord}{symbols}{81}
+\DeclareMathAccent{\ddot}{\mathord}{symbols}{82}
+\DeclareMathAccent{\widebar}{\mathord}{symbols}{83} % new
+% \end{macrocode}
+%
+% Next two are the same as in standard \LaTeX{}.
+% \begin{macrocode}
+%\DeclareMathAccent{\widetilde}{\mathord}{largesymbols}{101}
+%\DeclareMathAccent{\widehat}{\mathord}{largesymbols}{98}
+% \end{macrocode}
+%
+% \subsection{AMS double accent commands}
+%
+% Unfortunately the AMS double accent commands such as |\Hat|
+% assume that the math accents come from an `OT1' encoded
+% font in the `operators' math symbol font. To use
+% these commands with mathtime you may need to place code
+% such as the following into a package file and load that after
+% loading the \textsf{amsmath} package. This section is commented out
+% here as it would not work without several other sections of
+% \textsf{amsmath}, and a future release of the AMS package may anyway
+% remove some of these encoding assumptions.
+%
+%\begin{verbatim}
+% \def\@math@ccent#1#2#3{%
+% \RIfM@
+% \xdef\thefam@{\ifnum\mathgroup=\m@ne1\else\the\mathgroup\fi}%
+% \accentdimen@\z@
+% \setboxz@h{\unbracefonts@$\m@th\mathgroup\thefam@\relax#3$}%
+% \ifdim\accentdimen@=\z@\DN@{#2{#3}}%
+% \setbox\@ne\hbox{\unbracefonts@
+% $\m@th\mathgroup\thefam@\relax#3\theskewchar@$}
+% \setbox\tw@\hbox{$\m@th\ifnum\skewcharcount@=\m@ne\else
+% \mathchar\skewcharcount@\fi$}%
+% \global\accentdimen@\wd\@ne\global\advance\accentdimen@-\wdz@
+% \global\advance\accentdimen@-\wd\tw@
+% \global\multiply\accentdimen@\tw@
+% \dimentomu@\global\advance\accentmu@\@ne
+% \else\DN@{{#2{#3\mkern\accentmu@ mu}%
+% \mkern-\accentmu@ mu}{}}\fi
+% \next@
+% \else
+% \nonmatherr@#1%
+% \fi}
+%
+%
+% \def\Hat{\@math@ccent\Hat\hat}
+% \def\Dot{\@math@ccent\Dot\dot}
+% \def\Check{\@math@ccent\Check\check}
+% \def\Tilde{\@math@ccent\Tilde\tilde}
+% \def\Acute{\@math@ccent\Acute\acute}
+% \def\Grave{\@math@ccent\Grave\grave}
+% \def\Dot{\@math@ccent\Dot\dot}
+% \def\Ddot{\@math@ccent\Ddot\ddot}
+% \def\Breve{\@math@ccent\Breve\breve}
+% \def\Bar{\@math@ccent\Bar\bar}
+% \def\Vec{\@math@ccent\Vec\vec}
+%\end{verbatim}
+%
+% \subsection{Math font sizes}
+%
+% Math Time, like most other type 1 fonts uses the same font at all
+% sizes. For such fonts the default ratios (.7 and .5) produce
+% unreadably small superscripts.
+% \begin{macrocode}
+\def\defaultscriptratio{.76}
+\def\defaultscriptscriptratio{.6}
+% \end{macrocode}
+%
+% These default ratios are not used for any sizes that have been
+% explicitly declared, so redeclare the sizes used by the standard
+% classes. At least for the lower sizes this is important as we don't
+% want to end up with a 5pt font being reduced even further.
+%
+% The table below might need some further tweaking. I selected the
+% numbers partly on a few visual tests (but not many) and partly on the
+% idea that resusing sizes is better than introducing many new
+% ones. Even with Type~1 fonts many people will produce pk versions of
+% the fonts in their document (using gftopk, for example).
+%
+% \begin{macrocode}
+\DeclareMathSizes{5} {6} {6} {6}
+\DeclareMathSizes{6} {6} {6} {6}
+\DeclareMathSizes{7} {6.8} {6} {6}
+\DeclareMathSizes{8} {8} {6.8}{6}
+\DeclareMathSizes{9} {9} {7.6}{6}
+\DeclareMathSizes{10} {10} {7.6}{6}
+\DeclareMathSizes{10.95}{10.95}{7.6}{6}
+\DeclareMathSizes{12} {12} {9} {7}
+\DeclareMathSizes{14.4} {14.4} {10} {8}
+\DeclareMathSizes{17.28}{17.28}{12} {9}
+\DeclareMathSizes{20.74}{20.74}{14.4}{10}
+\DeclareMathSizes{24.88}{24.88}{17.28}{12}
+% \end{macrocode}
+%
+%
+% \subsection{Strange Commands}
+% |\vdots| and |\ddots| take their ``dots'' from the math fonts.
+% In fact this is something that should be corrected in base format
+% of \LaTeX{} as well.
+%
+% \begin{macrocode}
+\newcommand\hb@xmdot{\hbox{$\m@th.$}}
+\def\vdots{\vbox{\baselineskip4\p@ \lineskiplimit\z@
+ \kern6\p@\hb@xmdot\hb@xmdot\hb@xmdot}}
+\def\ddots{\mathinner{\mkern1mu\raise7\p@\vbox{\kern7\p@
+ \hb@xmdot}\mkern2mu
+ \raise4\p@\hb@xmdot\mkern2mu\raise\p@\hb@xmdot\mkern1mu}}
+% \end{macrocode}
+%
+% |\angle| needs a thicker horizontal rule (what a mess).
+%
+% \begin{macrocode}
+\def\angle{{\vbox{\ialign{$\m@th\scriptstyle##$\crcr
+ \not\mathrel{\mkern14mu}\crcr
+ \noalign{\nointerlineskip}%
+ \mkern2.5mu%
+ \leaders\hrule\@height.48\p@\hfill\mkern2.5mu\crcr}}}}
+% \end{macrocode}
+%
+% Awful many tokens are wasted to define to lower horizontal bar in
+% |\hbar|. The definition below uses \={} from the symbol font to
+% avoid problems with different text encodings in the operators
+% font.
+% \changes{v0.2}{1996/12/12}{save a few tokens here}
+% \changes{v0.9b}{1997/01/31}
+% {New \cs{hbar} getting bar from symbol font not operators}
+% \changes{v1.0e}{1997/10/10}{Make \cs{hbar} robust}
+% \begin{macrocode}
+\DeclareRobustCommand\hbar{{%
+ \dimen@.12em%
+ \dimen@ii.1em%
+ \def\@tempa##1##2{{%
+ \lower##1\dimen@\rlap{\kern##1\dimen@ii\the##2\tw@\char78}}}%
+ \mathchoice\@tempa\@ne\textfont
+ \@tempa\@ne\textfont
+ \@tempa\defaultscriptratio\scriptfont
+ \@tempa\defaultscriptscriptratio\scriptscriptfont
+ h}}
+% \end{macrocode}
+%
+% Redefine |\@fnsymbol| to use |\mathsection| and |\mathparagraph|
+% (Should be done in base \LaTeX\ as well).
+% \changes{v1.0c}{1997/03/14}
+% {Make footnote symbols work with other encodings}
+% \begin{macrocode}
+\def\@fnsymbol#1{\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or
+ \mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger
+ \or \ddagger\ddagger \else\@ctrerr\fi}}
+% \end{macrocode}
+%
+% Wasting a full symbol font just to have |\dagger| and friends. Here
+% we pay part of the price for fact that the math time fonts have their
+% own encoding incompatible with the CM fonts.
+%
+% If the |noTS1| option is used, this whole section is skipped unless
+% LY1 or T1 encodings are being used, in which case the symbols can be
+% accessed from the operators font.
+% \begin{macrocode}
+\ifx\symtextcomp\relax
+ \def\@tempa{LY1}
+ \ifx\operator@encoding\@tempa
+ \DeclareMathSymbol\dagger {\mathbin}{operators}{134}
+ \DeclareMathSymbol\ddagger{\mathbin}{operators}{135}
+ \DeclareMathSymbol\mathsection{\mathord}{operators}{'247}
+ \DeclareMathSymbol\mathparagraph{\mathord}{operators}{'266}
+ \DeclareMathSymbol\mathsterling{\mathord}{operators}{163}
+ \let\mathunderscore\@undefined
+ \DeclareMathSymbol\mathunderscore{\mathord}{operators}{95}
+ \fi
+% \end{macrocode}
+% If we have T1 encoded operators but are nt using TS1 can at least
+% get pounds sign and underscore, but not dagger etc.
+% \begin{macrocode}
+ \def\@tempa{T1}
+ \ifx\operator@encoding\@tempa
+ \DeclareMathSymbol\mathsterling{\mathord}{operators}{191}
+ \let\mathunderscore\@undefined
+ \DeclareMathSymbol\mathunderscore{\mathord}{operators}{95}
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\else
+ \DeclareFontEncoding{TS1}{}{}
+ \DeclareSymbolFont{textcomp}{TS1}{ptm}{m}{n}
+ \ifx\mv@bold\@undefined
+ \else
+ \SetSymbolFont {textcomp}{bold}{TS1}{ptm}{b}{n}
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \ifx\mv@heavy\@undefined
+ \else
+ \SetSymbolFont {textcomp}{heavy}{TS1}{ptm}{b}{n}
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \DeclareMathSymbol\dagger {\mathbin}{textcomp}{'204}
+ \DeclareMathSymbol\ddagger{\mathbin}{textcomp}{'205}
+% \end{macrocode}
+%
+% The math versions for \textsection{} and \textparagraph{}
+% are also not in the symbol fonts so we pick them up as well.
+% \begin{macrocode}
+ \DeclareMathSymbol\mathsection{\mathord}{textcomp}{'247}
+ \DeclareMathSymbol\mathparagraph{\mathord}{textcomp}{'266}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+%
+% \subsection{Encoding Specific Text Commands}
+%
+% Some encoding specific commands default to the OML or OMS encoding.
+% As these encodings are not used with this package, we need to change
+% the defaults.
+%
+% These ones used to default to OML
+% \begin{macrocode}
+\DeclareTextSymbolDefault{\textless}{MY1}
+\DeclareTextSymbolDefault{\textgreater}{MY1}
+\DeclareTextAccentDefault{\t}{MY2}
+% \end{macrocode}
+%
+% Important is to not only set the default the default but also declare
+% the symbols itself. If this is forgotten calling the command will
+% generate a loop. Or to quote David:
+% \begin{quote}
+% [hmm, otherwise you waste an hour or two staring at |\tracingall|
+% output trying to work out what the heck is happening:-]
+% \end{quote}
+%
+% \begin{macrocode}
+\DeclareTextSymbol{\textless}{MY1}{`\<}
+\DeclareTextSymbol{\textgreater}{MY1}{`\>}
+\DeclareTextAccent{\t}{MY2}{65}
+% \end{macrocode}
+%
+% These ones used to default to OMS
+% \begin{macrocode}
+\DeclareTextSymbolDefault{\textasteriskcentered}{MY2}
+\DeclareTextSymbolDefault{\textbackslash}{MY2}
+\DeclareTextSymbolDefault{\textbar}{MY2}
+\DeclareTextSymbolDefault{\textbraceleft}{MY2}
+\DeclareTextSymbolDefault{\textbraceright}{MY2}
+\DeclareTextSymbolDefault{\textbullet}{MY2}
+\DeclareTextSymbolDefault{\textperiodcentered}{MY2}
+\DeclareTextAccentDefault{\textcircled}{MY2}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareTextSymbol{\textasteriskcentered}{MY2}{3}
+\DeclareTextSymbol{\textbackslash}{MY2}{110}
+\DeclareTextSymbol{\textbar}{MY2}{106}
+\DeclareTextSymbol{\textbraceleft}{MY2}{102}
+\DeclareTextSymbol{\textbraceright}{MY2}{103}
+\DeclareTextSymbol{\textbullet}{MY2}{15}
+\DeclareTextSymbol{\textperiodcentered}{MY2}{1}
+\DeclareTextCommand{\textcircled}{MY2}[1]{{%
+ \ooalign{%
+ \hfil \raise .07ex\hbox {\upshape#1}\hfil \crcr
+ \char13}}}
+% \end{macrocode}
+%
+% These also normally default to OMS, but are not available
+% in MY1 or MY2, so get them from the TS1 encoded font.
+% \begin{macrocode}
+\ifx\symtextcomp\relax
+\else
+ \DeclareTextSymbolDefault{\textsection}{TS1}
+ \DeclareTextSymbolDefault{\textparagraph}{TS1}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \DeclareTextSymbol{\textsection}{TS1}{'247}
+ \DeclareTextSymbol{\textparagraph}{TS1}{'266}
+\fi
+% \end{macrocode}
+%
+%
+% \subsection{Subscript correction}
+%
+% We provide a definition for |_| as active character. This definition
+% in itself is not changing \LaTeX's behaviour as by default |_| has
+% catcode 8, i.e., subscript character. Only if we change this catcode
+% or if we change the |\mathcode| of |_| \TeX{} is going to look at it.
+% \begin{macrocode}
+\begingroup
+ \catcode`\_=13
+ \gdef_#1{\sb{\test@sb#1}}
+\endgroup
+% \end{macrocode}
+%
+% The |\test@sb| gets passed the argument of a subscript and tests with
+% |\@ifnextchar| if the first non-space token is a \texttt{p}.
+% If not it will look at |\@let@token| (set by |\@ifnextchar|) to see
+% if it is perhaps \texttt{j} or \texttt{f}. In each case it will add
+% a negative kern.
+%
+% Note that this test will fail if an old \LaTeX{} is used as the old
+% definition of |\@ifnextchar| does not use |\@let@token| but
+% |\@tempa|.
+% However, the worst that would happen is that the kern is not
+% inserted. I tried to trap this by requesting a \LaTeX{} not older
+% than 1995/01/01.
+% \begin{macrocode}
+\def\test@sb{%
+ \@ifnextchar p%
+ {\mkern\m@ne mu}%
+ {\ifx\@let@token j%
+ \mkern-\tw@ mu%
+ \else
+ \ifx\@let@token f%
+ \mkern-\tw@ mu%
+ \fi
+ \fi}}
+% \end{macrocode}
+%
+% Finally we set the |\mathcode| of |_| to ``active''. However, as long
+% as its |\catcode| is not changed this |\mathcode| is never looked at,
+% in other words we can now turn the feature on and off by changing the
+% |\catcode| to |12| (that is done in the option section above).
+% \begin{macrocode}
+\mathcode`\_=\string"8000
+% \end{macrocode}
+%
+%
+%
+% \begin{macrocode}
+%</mathtime>
+% \end{macrocode}
+%
+%
+%
+%
+% \section{Math Pi}
+%
+% This package consist only of options declaring math alphabets:
+% \begin{macrocode}
+%<*mathpi>
+\DeclareOption{mathfrak}{%
+ \DeclareMathAlphabet\mathfrak{U}{mh2}{m}{n}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{mathcal}{%
+ \DeclareMathAlphabet\mathcal{U}{mh2scr}{m}{n}}
+\DeclareOption{mathscr}{%
+ \DeclareMathAlphabet\mathscr{U}{mh2scr}{m}{n}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{mathbb}{%
+ \DeclareMathAlphabet\mathbb{U}{mh6}{m}{n}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ProcessOptions
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</mathpi>
+% \end{macrocode}
+%
+% \subsection{Unused Declarations}
+% The following declarations may be extracted from this source
+% file, but they are not used in the \textsf{mathpi} package
+% as equivalent code is called in the options section.
+% \begin{macrocode}
+%<*mpifrak>
+\DeclareMathAlphabet\mathfrak{U}{mh2}{m}{n}
+%</mpifrak>
+%
+%<*mpiscr>
+\DeclareMathAlphabet\mathscr{U}{mh2scr}{m}{n}
+%</mpiscr>
+%
+%<*mpibb>
+\DeclareMathAlphabet\mathbb{U}{mh6}{m}{n}
+%</mpibb>
+% \end{macrocode}
+%
+% \Finale
+%
+