<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% \iffalse
%%% ====================================================================
%%%  @LaTeX-file{
%%%     filename        = "mt.dtx",
%%%     version         = "1 alpha",
%%%     date            = "21 September 1995",
%%%     time            = "23:29:01 EDT",
%%%     author          = "David M. Jones",
%%%     address         = "MIT Laboratory for Computer Science
%%%                        Room NE43-316
%%%                        545 Technology Square
%%%                        Cambridge, MA 02139
%%%                        USA",
%%%     telephone       = "(617) 253-5936",
%%%     FAX             = "(617) 253-3480",
%%%     checksum        = "37448 436 1050 13158",
%%%     email           = "dmjones@theory.lcs.mit.edu",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "",
%%%     supported       = "yes",
%%%     abstract        = "",
%%%     docstring       = "The checksum field above contains a CRC-16
%%%                        checksum as the first value, followed by the
%%%                        equivalent of the standard UNIX wc (word
%%%                        count) utility output of lines, words, and
%%%                        characters.  This is produced by Robert
%%%                        Solovay's checksum utility.",
%%%  }
%%% ====================================================================
% \fi
\def\fileversion{1 $\alpha$}
\def\filedate{95/09/21}
\def\docdate {95/09/21}
%
% \iffalse
%
%&lt;*driver&gt;
\documentclass{ltxdoc}
\begin{document}
 \title{The \textsf{mt} package\thanks{This file
        has version number \fileversion, last
        revised \filedate.}}
 \author{David M. Jones\thanks{This is based loosely upon the
\textsf{mtmacs} macros by Michael Spivak and the \textsf{mathtime}
package by Aloysius G. Helminck}}
 \date{\filedate}
 \maketitle
 \DocInput{mt.dtx}
\end{document}
%&lt;/driver&gt;
% \fi
% \CheckSum{608}
%
% \section{Introduction}
%
%  This file provides support for the MathTime fonts from the
%  \TeX plorators corporation for use with \LaTeXe.
%
%  Warning: Thinking about fonts and encodings makes my head hurt.
%  Caveat emptor.
%
% \StopEventually{}
%    \begin{macrocode}
%&lt;*mathtime&gt;
\ProvidesPackage{mt}[\filedate\space\fileversion\space
 PSNFSS2e LaTeX2e package]

\renewcommand{\sfdefault}{phv}
\renewcommand{\rmdefault}{ptm}
\renewcommand{\ttdefault}{pcr}

\def\bfdefault{b}

\def\encodingdefault{OT1}

\fontencoding{OT1}

\DeclareSymbolFont{operators}{\encodingdefault}{\rmdefault}{m}{n}

%%  But these aren't in OML, OMS and OMX encodings!!!!!  This is
%%  almost entirely the wrong approach to take.  The mathtimes fonts
%%  should be assigned a separate encoding, and given proper *enc.def
%%  files.  Then the bookkeeping could be passed of to LaTeX, and the
%%  \boldmath and \unboldmath commands could be vastly simplified.
%%  Alternatively, perhaps the mathtimes fonts should just be
%%  reencoded using virtual fonts to put things back where TeX expects
%%  to find them.  If this is feasible, it would certainly be more
%%  efficient in terms of TeX resources.

%%  On the other hand, I'm feeling lazy right now, so I'll put off
%%  making that decision until later.  For now, let's see if I can get
%%  things sorted out here.

\DeclareSymbolFont{letters}{OML}{mtt}{m}{it}
\DeclareSymbolFont{symbols}{OMS}{mtt}{m}{n}
\DeclareSymbolFont{largesymbols}{OMX}{mtt}{m}{n}

\DeclareSymbolFont{italics}{\encodingdefault}{\rmdefault}{m}{it}

\SetSymbolFont{operators}{normal}{\encodingdefault}{\rmdefault}{m}{n}
\SetSymbolFont{letters}{normal}{OML}{mtt}{m}{it}
\SetSymbolFont{symbols}{normal}{OMS}{mtt}{m}{n}
\SetSymbolFont{largesymbols}{normal}{OMX}{mtt}{m}{n}

%%  There aren't any bold variants of the mathtimes fonts, but we'll
%%  pretend there are and then declare substitutions for them later,
%%  so users will at least get warning messages.  Probably something
%%  similar should be done for the operators font

\SetSymbolFont{operators}{bold}{\encodingdefault}{cmr}{bx}{n}
\SetSymbolFont{letters}{bold}{OML}{mtt}{b}{it}
\SetSymbolFont{symbols}{bold}{OMS}{mtt}{b}{n}
\SetSymbolFont{largesymbols}{bold}{OMX}{mtt}{m}{n}

%%  \SetMathAlphabet{\mathbf}{normal}{\encodingdefault}{\rmdefault}{b}{n}
%%  \SetMathAlphabet{\mathsf}{normal}{\encodingdefault}{\sfdefault}{m}{n}
%%  \SetMathAlphabet{\mathrm}{normal}{\encodingdefault}{\rmdefault}{m}{n}

%%  Surely one doesn't really want \mathbf to produce medium type when
%%  the mathversion is 'bold'

% \SetMathAlphabet{\mathbf}{bold}{\encodingdefault}{\rmdefault}{m}{n}
\SetMathAlphabet{\mathsf}{bold}{\encodingdefault}{\sfdefault}{b}{n}
\SetMathAlphabet{\mathrm}{bold}{\encodingdefault}{\rmdefault}{b}{n}

%%  Eventually we should decide on the appropriate sizes for other
%%  font sizes.  Personally, I'm not completely convinced it's
%%  necessary to change these sizes.

\DeclareMathSizes{10}{10}{7.6}{6}

%%  Have to redeclare \mathcal to point directly to cmsy

\DeclareMathAlphabet\mathcal{OMS}{cmsy}{m}{n}
\SetMathAlphabet\mathcal{bold}{OMS}{cmsy}{b}{n}

%%  I really, really, don't like this.

\DeclareMathSymbol\varGamma     {\mathord}{letters}{"00}
\DeclareMathSymbol\varDelta     {\mathord}{letters}{"01}
\DeclareMathSymbol\varTheta     {\mathord}{letters}{"02}
\DeclareMathSymbol\varLambda    {\mathord}{letters}{"03}
\DeclareMathSymbol\varXi        {\mathord}{letters}{"04}
\DeclareMathSymbol\varPi        {\mathord}{letters}{"05}
\DeclareMathSymbol\varSigma     {\mathord}{letters}{"06}
\DeclareMathSymbol\varUpsilon   {\mathord}{letters}{"07}
\DeclareMathSymbol\varPhi       {\mathord}{letters}{"08}
\DeclareMathSymbol\varPsi       {\mathord}{letters}{"09}
\DeclareMathSymbol\varOmega     {\mathord}{letters}{"0A}

%%  Must explore how this interacts with AMS-LaTeX.  Should also play
%%  with \root command.  See comments in mtmacs.doc.

\def\space@.{\futurelet\space@\relax}

\space@. %

\expandafter\let\csname subscript character \string_\endcsname_

\catcode`\_=\active

\def_{\protect\pUS}

\def\pUS{%
    \ifmmode
        \expandafter\sb@
    \else
        \expandafter\csname subscript character \string_\endcsname
    \fi
}

\let\sb_

%  \ifnum\catcode`\^^A=8 \catcode`\^^A\active\let^^A_\fi

\def\sb@#1{%
    \csname subscript character \string_\endcsname
    {\futurelet\next\sb@@#1}%
}

\def\sb@@{%
    \ifx\next\space@
        \def\next@. {\futurelet\next\sb@@}%
    \else
        \def\next@.{%
            \ifx\next j\mkern-\tw@ mu\else
                \ifx\next f\mkern-\tw@ mu\else
                    \ifx\next p\mkern-\@ne mu\fi
                \fi
            \fi
        }%
    \fi
    \next@.%
}

%%  Is there any reason this wouldn't be much easier to do using
%%  virtual fonts?  Should examine kerning and ligature tables of
%%  mathtimes.

%%  For now, let's try to do this by saving the default values and
%%  then doing something clever.

\let\@@vdots\vdots

\let\@@ddots\ddots

\let\@@angle\angle

\let\@@t\t
\let\@@vec\vec
\let\@@acute\acute
\let\@@grave\grave
\let\@@ddot\ddot
\let\@@tilde\tilde
\let\@@bar\bar
\let\@@breve\breve
\let\@@check\check
\let\@@hat\hat
\let\@@dot\dot
\let\@@hbar\hbar
\let\@@S\S
\let\@@P\P
\let\@@Relbar\Relbar

\def\mt@vdots{%
    \vbox{%
        \baselineskip4\p@
        \lineskiplimit\z@
        \kern6\p@
        \hbox{$\m@th.$}\hbox{$\m@th.$}\hbox{$\m@th.$}%
    }%
}

\def\mt@ddots{%
    \mathinner{%
        \mkern1mu
        \raise7\p@\vbox{%
            \kern7\p@
            \hbox{$\m@th.$}%
        }%
        \mkern2mu
        \raise4\p@\hbox{$\m@th.$}%
        \mkern2mu
        \raise\p@\hbox{$\m@th.$}%
        \mkern1mu
    }%
}

\def\mt@angle{%
    {\vbox{\ialign{$\m@th\scriptstyle##$\crcr
        \not\mathrel{\mkern14mu}\crcr
        \noalign{\nointerlineskip}%
        \mkern2.5mu\leaders\hrule height.48pt\hfill\mkern2.5mu\crcr
     }}%
    }%
}

\def\mt@t#1{{\edef\next{\the\font}\the\textfont2\accent"41\next#1}}

\newcommand{\@@mtaccent}{%
    \ifnum\fam=\m@ne
        \expandafter\@firstoftwo
    \else
        \expandafter\@secondoftwo
    \fi
}

\let\@mtaccent\@@mtaccent

\def\mt@dot{\mathaccent"0250 }

\def\mt@grave{\mathaccent"024A }

\def\mt@acute{\mathaccent"024B }

\def\mt@check{\mathaccent"024C }

\def\mt@breve{\mathaccent"024D }

\def\mt@bar{\mathaccent"024E }

\def\mt@hat{\mathaccent"024F }

\def\mt@dot{\mathaccent"0250 }

\def\mt@tilde{\mathaccent"0251 }

\def\mt@ddot{\mathaccent"0252 }

\def\mt@vec{\mathaccent"0245 }

\def\vdots{\@mtaccent\mt@vdots\@@vdots}

\def\ddots{\@mtaccent\mt@ddots\@@ddots}

\def\angle{\@mtaccent\mt@angle\@@angle}

%%  See comments in mtmacs.doc for how this needs to be frobbed further

\def\mt@hbar{{\mathchoice
 {\hbox{\lower.07em\hbox{$\mathchar'26$}}}
 {\hbox{\lower.07em\hbox{$\mathchar'26$}}}
 {\hbox{\lower.049em\hbox{$\scriptstyle\mathchar'26$}}}
 {\hbox{\lower.035em\hbox{$\scriptscriptstyle\mathchar'26$}}}%
  \mkern-6.3muh}}

%%  I'm not entirely sure \Relbar should be handled this way.  (That
%%  is, none of this should be handled this way, but this especially
%%  is questionable.)

\def\mt@Relbar{\mathchar"3248 }

\DeclareRobustCommand*{\t}{\@mtaccent\mt@t\@@t}
\DeclareRobustCommand*{\vec}{\@mtaccent\mt@vec\@@vec}
\DeclareRobustCommand*{\acute}{\@mtaccent\mt@acute\@@acute}
\DeclareRobustCommand*{\grave}{\@mtaccent\mt@grave\@@grave}
\DeclareRobustCommand*{\ddot}{\@mtaccent\mt@ddot\@@ddot}
\DeclareRobustCommand*{\tilde}{\@mtaccent\mt@tilde\@@tilde}
\DeclareRobustCommand*{\bar}{\@mtaccent\mt@bar\@@bar}
\DeclareRobustCommand*{\breve}{\@mtaccent\mt@breve\@@breve}
\DeclareRobustCommand*{\check}{\@mtaccent\mt@check\@@check}
\DeclareRobustCommand*{\hat}{\@mtaccent\mt@hat\@@hat}
\DeclareRobustCommand*{\dot}{\@mtaccent\mt@dot\@@dot}
\DeclareRobustCommand*{\Relbar}{\@mtaccent\mt@Relbar\@@Relbar}
\DeclareRobustCommand*{\hbar}{\@mtaccent\mt@hbar\@@hbar}
\DeclareRobustCommand*{\S}{\@mtaccent\mt@S\@@S}
\DeclareRobustCommand*{\P}{\@mtaccent\mt@P\@@P}

\def\jadjust{\mkern-\tw@ mu}

%%  If this were done properly with encodings, then none of this
%%  should be necessary.  I think.

%%  These need to be robust so they don't do something unpleasant when
%%  put in section commands, for example.

\DeclareRobustCommand{\unboldmath}{%
    \@nomath\unboldmath
    \let\@mtaccent\@@mtaccent
    \mathchardef\Gamma"0130
    \mathchardef\Delta"0131
    \mathchardef\Theta"0132
    \mathchardef\Lambda"0133
    \mathchardef\Xi"0134
    \mathchardef\Pi"0135
    \mathchardef\Sigma"0136
    \mathchardef\Upsilon"0137
    \mathchardef\Phi"0138
    \mathchardef\Psi"0139
    \mathchardef\Omega"017F
    \mathchardef\comp="2242
    \def\widebar{\mathaccent"0253 }%
    \mathchardef\varkappa"017E
    \mathchardef\triangleleft"2247
    \mathchardef\triangleright"2246
    \mathchardef\dagger"20B2
    \mathchardef\ddagger"20B3
    \mathcode`\="3244
    \mathcode`\("412E
    \mathcode`\)"512F
    \delcode`\("12E300
    \delcode`\)"12F301
    \mathcode`\;"6249
    \mathcode`\+"2243
    \mathversion{normal}%
}

\DeclareRobustCommand{\boldmath}{%
    \@nomath\boldmath
    \let\@mtaccent\@secondoftwo
    \mathchardef\Gamma"7000
    \mathchardef\Delta"7001
    \mathchardef\Theta"7002
    \mathchardef\Lambda"7003
    \mathchardef\Xi"7004
    \mathchardef\Pi"7005
    \mathchardef\Sigma"7006
    \mathchardef\Upsilon"7007
    \mathchardef\Phi"7008
    \mathchardef\Psi"7009
    \mathchardef\Omega"700A
    \let\comp\circ
    \let\widebar\bar
    \let\varkappa\kappa
    \mathchardef\triangleleft"212F
    \mathchardef\triangleright"212E
    \mathchardef\dagger"2279
    \mathchardef\ddagger"227A
    \mathcode`\="303D
    \mathcode`\("4028
    \mathcode`\)"5029
    \delcode`\("028300
    \delcode`\)"029301
    \mathcode`\;"603B
    \mathcode`\+"202B
% When using AmsLaTeX styles the following two need to be commented out.
% \let\S\@@S
% \let\P\@@P
%    \begin{macrocode}
    \mathversion{bold}
}
\unboldmath
%&lt;/mathtime&gt;
%&lt;*OMLmtt&gt;
\DeclareFontFamily{OML}{mtt}{\skewchar\font'055}
\DeclareFontShape{OML}{mtt}{m}{it}{ &lt;-&gt; mtmi }{}
\DeclareFontShape{OML}{mtt}{b}{it}{ &lt;-&gt; sub * cmm/b/it }{}
%&lt;/OMLmtt&gt;
%&lt;*OMSmtt&gt;
\DeclareFontFamily{OMS}{mtt}{\skewchar\font'060}
\DeclareFontShape{OMS}{mtt}{m}{n}{ &lt;-&gt; mtsy }{}
\DeclareFontShape{OMS}{mtt}{b}{n}{ &lt;-&gt; sub * cmsy/b/n }{}
%&lt;/OMSmtt&gt;
%&lt;*OMXmtt&gt;
\DeclareFontFamily{OMX}{mtt}{}
\DeclareFontShape{OMX}{mtt}{m}{n}{&lt;-&gt;mtex}{}
%&lt;/OMXmtt&gt;
%    \end{macrocode}
% \Finale
%
\endinput
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits       \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!    Double quote  \"    Hash (number) \#
%   Dollar       \$    Percent      \%     Ampersand    \&amp;
%   Acute accent  \'    Left paren    \(    Right paren   \)
%   Asterisk     \*    Plus        \+    Comma        \,
%   Minus        \-    Point        \.    Solidus      \/
%   Colon        \:    Semicolon    \;    Less than    \&lt;
%   Equals       \=    Greater than  \&gt;    Question mark \?
%   Commercial at \@    Left bracket  \[    Backslash    \\
%   Right bracket \]    Circumflex    \^    Underscore    \_
%   Grave accent  \`    Left brace    \{    Vertical bar  \|
%   Right brace   \}    Tilde        \~}
</pre></body></html>