From: dahosek@biivax.dp.beckman.com
Newsgroups: comp.text.tex
Subject: Re: MFT
Date: 16 May 91 19:14:55 GMT
Lines: 88

In article <7509D91FAEFF000FF1@utrcgw.utc.com>, RAYBRO%HOLON@utrcgw.utc.com
("William R Brohinsky") writes:
>
> I don't remember if I asked this here, but if I did, the response must have
> not been memorable, so I'll ask again.
>  
> Does anyone know how to actually USE MFT? I know that it will take
> my metafont input and make a tex file, and I even know how to
> call it on the command line. However, there is no MFTbook, nor
> is the woven WEB source much use in figuring out how to actually
> utilize it to make MF source comprehensible.
>

Yep, there is _no_ documentation on MFT which made it especially hard for me
when I wrote the VM/CMS change file. Anyway, as it turns out, MFT is fairly
straightforward. The MFT program reads three input files. The first is the MF
source which we'll look at later, the second is the MFT style file (carries an
extension of MFT) and the third is the change file (I've never used it and
Knuth _thinks_ he might have used it for some fine tuning of Volume E of C&T,
but he's not sure).

MFT works through special interpretation of comments. In fact, the MFT style
file consists solely of comments. A comment which begins with two percent
signs represents TeX code which will be inserted directly into the TeX file
created by MFT. For example, cmbase.mft contains the following:

%% % nine-point type:
%% \catcode`@=11 % borrow the private macros of PLAIN (with care)
%% \def\ninebig#1{{\hbox{$\textfont0=\tenrm\textfont2=\tensy
%%   \left#1\vbox to7.25pt{}\right.\n@space$}}}
%% \catcode`@=12 % now @ is a nonletter again

(note the handling of a TeX comment at the beginning of the example).

This mechanism is used largely to define extra macros, as above, but could
also be used for inserting pagebreaks, section titles etc.

Three percent signs indicates the beginning of a formatting rule. Again from
cmbase.mft:

%%% } ( ) ]] {{ }} ! ^ %%%% tokens that need no special formatting
%%% step upto downto %%%% boldface binary operators
%%% addto fill unfill draw undraw %%%% boldface unary operators

The first "word" on the formatting rule gives the token which the others are
to be "formatted like" so, for example, "upto" and "downto" will receive the
same formatting as "step" does (this is similar to WEB's @f directive). Note
that MFT automatically handles things like braces and other special characters
in the output.

Finally, four percent signs indicates a comment to MFT; it will have no effect
on the processing or output:

%%%% MFT commands for the Computer Modern base

In the MF file itself, the following conventions are observed:

(1) every space of indentation in the source turns into one quad of
    indentation in the output
(2) comments are printed as TeX text flush right.
(3) to refer to MF code in a comment, enclose it in vertical bars:
    "print |z| values on proof sheets"
(4) to join to lines of MF code together on output, use %% \join
(5) to force a comment flush left (e.g., at the top of the file when things
    are being identified), use \] at the end of the comment.

I believe this covers all the various features of MFT, albeit in somewhat
encapsulated form.

At present, I believe the following is the complete list of TeX/MF
distributions which include MFT:

-emTeX (MS-DOS, OS/2)
-U Washington (Unix)
-Northlake Software (VMS)
-Stanford (VM/CMS)

-dh

-- 
Don Hosek // Quixote Digital Typography   714-625-0147
     dhosek@ymir.claremont.edu
On contract to Beckman Instruments        714-961-4562
     dahosek@beckman.com
