Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!bionet!ames!vsi1!zorch!xanthian From: xanthian@zorch.SF-Bay.ORG (Kent Paul Dolan) Newsgroups: comp.sys.amiga.applications Subject: Re: TeX Printing Message-ID: <1991Apr4.114338.29846@zorch.SF-Bay.ORG> Date: 4 Apr 91 11:43:38 GMT References: <1991Mar25.151206.16800@bronze.ucs.indiana.edu> <1991Mar26.192553.1761@ucsvc.ucs.unimelb.edu.au> Organization: SF-Bay Public-Access Unix Lines: 151 u3364521@ucsvc.ucs.unimelb.edu.au (Lou Cavallo) writes: > G'day, > In comp.sys.amiga.applications > Steven D. Litvinchouk (sdl@lyra.mitre.org ) writes: >> In comp.sys.amiga.applications >> Jon Paul Baker (sl242003@silver.ucs.indiana.edu ) writes: >>> How does one print out a TeX file once it has been converted to dvi >>> format? I have commontex, tex3.1, and a couple of others. I am using >>> [...] Depends on what you have on the other end to receive the print commands; for one example, if it is a postscript printer, then you need some version of dvi2ps. The general thing to remember is that when you make a .dvi file, it still doesn't contain the locations of the raster bits that will be set, just the origins of the characters, and what font and character in the font goes there, paging commands, and so on. The program you call next takes this info, looks up the characters in the font tables, sucks their bits out, arranges them for the device, and passes them along. The .dvi file is device independent, though, so in the case of a postscript device, it cleverly lets postscript draw the characters, if the fonts on both end match. At this point I'm getting in over my head, so I'll shut up on that issue. > Sorry Jon, I need help here too. >> I have PasTeX myself. If your version of TeX is similar, then you >> [...] >> in various magnifications.) You can try ftp'ing the bitmapped fonts >> from labrea.stanford.edu; or making your own with MetaFont. > I'm looking into the ftp'ing the fonts I'll need but I'm hoping some > reader out there can give some tips on "using" PasTeX's CALLMF > feature. If you have Arexx and set the CALLMF environment variable > then a script gets called to tell you what parameters you should call > the MetaFont program with to build the required fonts. > Well...I've RTFM'ed (I think EnglishDoc.dvi was the appropriate doc) > but I guess I'm just that extra little bit thick in that I don't see > what command (in detail) I should give to MetaFont to build what I'd > need. > The nicest solution would be to modify the callmf.rexx Arexx script, > so that it would call MetaFont to make the font ... Last things first; creating a whole rasterized metafont in a nice selection of sizes can take literal days; I ran mine overnight to get just a few sets of fonts built. You _really_, _really_ don't won't this overhead in your printing loop, which is why TeX/Metafont users have megabytes of already rasterized fonts online and ready to use. Metafont makes lovely fonts, but it makes a snail look turbocharged. Since I luckily don't have your implementation, I get to wave my hands and be unspecific a lot in answering. I had to relearn this stuff all in the past six days, with a little help from a nice guy in comp.fonts, so let's see how much I can remember. To make a Metafont accessible for printing, you must 1) create an object called plain.base, using initmf; this is a file that adds a lot of higher level commands to raw metafont, which is a pretty primitive interpreter. The command I used to make this looked something like initmf ** plain * dump (Different systems look a little different; I pulled mine out of page 279 of The METAFONTbook, except omitting "local", which was not needed for what I did.) and was run where plain.mf was visible; the output was plain.base, and got stuck in a directory where metafont expected to see base files; on the Sun where I was working ../bases from mf/lib/inputs. 2) Have available a metafont source file of mode definitions that includes one for your printer. If it doesn't come with your metafont implementation, the university of washington (state) has an FTPable file that seems to be the stand set of mode definitions for lots of printer types. These define things like resolution, write white or write black corrections, and so on. My choice of modes was the mode_def for CanonCX, a common laser printer engine, from a file we'll call CorpModeDefs.mf. 3) Have available a metafont source header file that defines the point size, extra blackening, and so forth used to parameterize your font definition for this point size. In my case call this CorpLogo6.mf, CorpLogo8.mf, etc. This set of metafont commands finishes by invoking the next file. 4) Have available the source file of metafont commands that describe the character shapes. In my case, call this CorpLogo.mf. The commands to make a six point corporate logo were then: mf ** CorpModeDefs; \mode:=CanonCX; \mag:=magstep(0); input CorpLogo6 (the "**" is a prompt from mf) and after a certain amount of blathering, metafont produced CorpLogo6.300gf and CorpLogo6.tfm. The first is a file of the rasters for the characters in a format comfortable for mf to produce, the second is a file of the character dimensions for each character, used by TeX to size and space characters, without having to deal with their raster representations. CorpLogo6.tfm is ready to use, so I moved it to the .../tex/lib/tfm directory where all the font character shape tables were stored. The printer driver (dvi2ps or whatever) doesn't want to deal with the ...gf files though, it wants to use a faster, smaller form. A program called gftopk makes this new format: gftopk CorpLogo6.300gf creates CorpLogo6.300pk, which should then be moved to a directory where TeX expects to find fonts at 300 dpi, on the system I was using, this was .../tex/lib/pk/pk300. You can then throw away CorpLogo6.300gf; it serves no further purpose. That should make the fonts accessible, as long as the right environment variables are set for your TeX implementation to point to their directories. To use this example in TeX, I then made a file that contained lines like \font\Corpsizesix=CorpLogo6 at 6truept \def\Corpsixpointlogo{\hbox{\Corpsizesix\char1}} as a header file and pulled it into TeX, then used it in text like exampling we will go\Corpsixpointlogo , exampling we will go! Pretty obviously, my "font" contained only character number 1, but this is the general process for a non-alphabetic font; an alphabetic one is simpler, you need merely define that "\Corpsizesix" is a font, then turn on the font like the embedded "\Corpsizesix" command, and it is modal until overridden or the current context ("{","}" pair) is exited. Enough. Hope any of that makes sense, it's almost 4AM. Kent, the man from xanth.