[comp.text.tex] MFT

RAYBRO%HOLON@utrcgw.utc.com ("William R Brohinsky", ay) (05/16/91)

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.
 
I am setting out to try to modify the MusicTeX font files (to add some
of the needed signs that haven't been included). I should like
(since there is a fairly long road ahead for me: I don't have a good
grasp of German OR French OR METAFONT, so it should be a real experience!)
to be able to reformat the source .mf files and use MFT to document the
whole project, especially since Tom Rokicki has included MFT as a
working executable in AmigaTeX3.1.
 
I will state for the record that I've read the METAFONTbook from cover-to-
cover once, and I've also made up and read the MFT Web document. If there's
something obvious that I'm missing in one or the other of these, please
direct me. Otherwise, we don't have any of the journals or transactions
usually associated with DK here (at least not the ones he lists in the
source document section of the CMR font sources book, is it volume F from
Computers and type setting?). If anyone has a copy of any of these
articles that are still valid (I can't run sail!) and would send me a
xerox, I'd be much obliged.
 
raybro
raybro%holon@utrcgw.utc.com
 
William R. Brohinsky
UTRC
MS 120-23
400 Silver Lane
E. Hartford, CT 06108
 
I will summarize and post any replies e-mailed directly to me.
 
raybro

dahosek@biivax.dp.beckman.com (05/17/91)

In article <7509D91FAEFF000FF1@utrcgw.utc.com>, RAYBRO%HOLON@utrcgw.utc.com ("William R Brohinsky", ay) 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