L^{A}TEX on the Amiga - Old-School

Torsten Finnberg

10/28/2020 v1.0

Abstract

This is a guide to the installation of the L^{A}TEX distribution AmiWeb2c in the version 2.1 on an emulated Amiga 4000 computer running Workbench 3.1. Furthermore the installation of a L^{A}TEX server for calling L^{A}TEX from an editor is given and some tips on the installation of new fonts are detailed. Also regard is given (code for: I have no idea what I’m talking about) for the handling of PostScript fonts.

1 Preface

This guide is the result of many a night’s tinkering, driven by both nostalgia and stubbornness to get this damn thing to work, no matter how many more cryptic error messages appeared^{1}. So as a way of exorcism and as a guide to fellow nostalgians^{2} this guide was written. It could however never be written without standing on the shoulders of those giants and gurus who ported L^{A}TEX to the Amiga and the many people who keep Amiga related websites alive. This guide is a small way of giving back.

Although this guide is based on an emulated Amiga running Workbench 3.1, there is no reason why it should not work on a physical Amiga. An attempt to install TeX on a AmigaOs3.9 failed in the regard that L^{A}TEX could not find the .aux-file generated by it. As L^{A}TEX would only run on an a .tex-file if the full path was specified on the command line, I suspect some changes in the command line parsing.

Note however that TEX and are resource hungry. The full installation takes as near as makes no difference 50 MB of disk space, not accounting for additional PostScript fonts. For to run, I needed to set Motherboard RAM to at least 16 MB. For an Amiga 4000 emulation the compilation of a L^{A}TEX document can be said to be reasonably fast but generation of fonts is something that calls for a cup of coffee. Several ones. Likewise, rendering of a .ps-file by Ghostscript can only be called...well, remember those old SF movies in which computers spell out messages one letter at a time? Well, the title of the guide has the word Old-School included, so don’t expect the speed or functionality of modern TEX systems.

1I am still convinced one of these was “Out of Cheese Error.”

2Is that a word?

It must also be said what this guide is not about: The programming of a L^{A}TEX document itself and the setup and running of the emulator^{3}. It is also assumed that the reader has - like the author - a rudimentary acquaintance with the command line (CLI) on an Amiga. I found the website

        https://wiki.amigaos.net/AmigaOS_Manual:_AmigaDOS

very helpful in that aspect.

1.1 Legalese

There are a lot of trademarks mentioned in this guide and a lot of programs which have authorship different from this author. All rights to these trademarks and programs lie with their respective owners. No infringement or financial gain is intended. On the same note, you are free to copy this guide any way you wish, although if you publish it in a modified form, please change the author. Oh, and a reference to the original author would be nice.

1.2 Disclaimer

If using any of the instructions in this guide breaks your system or leads to loss of data or gives you a headache...you are on your own.

2 Installation of the L^{A}TEX system

We now turn to the installation of the AmiWeb2c distribution in the version 2.1 on an emulated Amiga 4000 with Workbench 3.1 installed. For this distribution the TEX version is 3.14159 and L^{A}TEX in the form of L^{A}TEX 2ε dates from 2001/06/01. But first we need some

2.1 Preliminaries

For the installation to proceed you need, besides a working emulated Amiga,

the archives amiweb2c.tar.gz, amiweb2c-patch.tar.gz which can be found

on the CTAN website

        www.ctan.org/tex-archive/systems/amiga/amiweb2c

The meat on the bones (for reasons I cannot fathom) is the archive

        texmflib-7.10.tar.gz

which can be found on

3I used FS-UAE

        http://ftp.math.utah.edu/pub/tex/historic/systems/
        web2c/texmflib

We now set up the machinery to deal with compressed tar archives. If you have this machinery already set up (and the lha program installed) you can skip most of this and only do the final step of the preliminaries. To uncompress the .tar.gz-files into .tar-files you need gzip:

        http://aminet.net/dev/gg/gzip-bin.lha

To extract this .lha-file you need the lha program contained in the file:

        http://aminet.net/util/arc/lha.run

The file lha.run is a self-extracting archive you extract simply by executing it. Afterwards rename the extracted file lha_xxxxx to lha where xxxxx corresponds to your CPU. Then move the file lha to S:. Now you can extract the file

gzip-bin.lha by
        lha x gzip-bin.lha

which creates the file gzip-1.2.4-bin.tar. To extract .tar-files you need the tar program:

        http://aminet.net/dev/gg/tar-bin.lha

Extract this file and copy the resultant file tar to S:. Then issue the command

        tar xvf gzip-1.2.4-bin.tar

The option ”x” tells tar to extract the archive, the option “v” to be verbose about it (list the files extracted) and “f” that tar should use the file given instead of the default tape device. After this you’ll find the new subdirectory bin/ in which various files reside. Copy the one file named gzip to S:. The program gzip needs a library file

        http://aminet.net/util/libs/ixemul-48.0.lha

After extracting this with lha, rename the resultant file ixemul-xxx.library, where xxx corresponds to your 68xxx CPU-type, to ixemul.library and copy it to LIBS:. After all this uncompress the three archive files given at the start of this section by issuing

        gzip -d amiweb2c.tar.gz

producing the file amiweb2c.tar. The other archives are uncompressed similarly.

Finally the previewer ShowDVI needs the file req.library contained in the file

        http://aminet.net/util/libs/ReqLib28.lha

Extract Reqlib28.lha and move the file req.library to LIBS:. After all these preliminaries we can now turn to the actual

2.2 Installation

First find or generate via makedir a directory in which you want to install Amiweb2c and cd into that directory. Then issue the command

        tar xvf PATHTO:amiweb2c-patch.tar

where PATHTO: is the path to the .tar-file. A message that pdftex.pool could not be extracted as there is no such file appears. Ignore it. Then cd into the new subdirectory Amiweb2c-2.1 and issue the command

        tar xvf PATHTO:texmflib-7.10.tar

extracting the files in this archive to the subdirectory texmf. Now go one level up in the directory tree by cd / and issue

        tar xvf PATHTO:amiweb2c.tar

The reason for this strange sequence of commands is that both amiweb2c.tar and texmflib-7.10.tar come with their own .pool files, but the initex process (see below) fails with the texmflib ones. So extracting amiweb2c after texmflib overwrites the non-working .pool-files. The extraction of amiweb2c-patch.tar first is just a convenient way to create the Amiweb2c-2.1 directory. In the following there will be given a lot of paths beginning with ../texmf where .. stands for the full path of the Amiweb2c-2.1 directory.

In the Amiweb2c-2.1 directory there is a subdirectory

        bin/m68000-amigaos2.1/local

which holds a file DosPrefs. Copy this file to the folder System:wbstartup. Not sure what this program does, but apparently there are different conventions on directory naming which make TEX find files only if the full path is given if DosPrefs has not been started beforehand.

The next step is to make the file

        ..texmf/amiweb2c/s/user-startup.entry

writable by issuing in its directory the command

        protect user-startup.entry +w

and then edit the file according to the comments in that file. After that, insert a line

        execute ..texmf/amiweb2c/s/user-startup.entry

in the file S:user-startup where you must replace the .. with the omitted part of the absolute path. The rxset... lines in user-startup are used to set necessary preferences for the TEX-server (see below). To process these lines correctly you need to preface the execute line given above with the line rexxmast, starting the Rexx server during startup. Also the lines containing PSFONTS: can be commented out, if you do not use PostScript fonts. It is not necessary, but I found it helpful to add the line

        assign TEXMF: ..texmf

where again the .. must be replaced by the full path. This gives a quick way to cd into the central ../texmf directory.

Finally, in ..texmf/amiweb2c there are two subdirectories, namely s and rexx. Copy all files in s to S: (except user-startup.-entry) and all files in rexx to REXX: (By default S: and REXX: point to the same directory.). After these steps reboot your Amiga.

After rebooting, cd into ..texmf and start the script mktexlsr. This creates the file ls-R which acts as a lookup table for the TEX system. Without it TEX complains a lot about files it can’t find. There is a zoo of environment variables to take care of that, found here

        http://kirste.userpage.fu-berlin.de/chemnet/use/info/
        kpathsea/kpathsea_5.html

If you want to set these manually, be my guest. This script must always be started in ../texmf. Then issue cd web2c and make the file texsys.aux writable by

        protect texsys.aux +w

Now to install TEX, issue

        tex --ini --fmt=tex plain

TEX will start and the CLI prompt will change to the TEX prompt. (Without having run the script mktexlsr before this step TEX will complain that it cannot find the file plain.) At this prompt enter the optional lines

        \input hyphen.cfg

or else just

        \dump

This runs the initex process for the plain TEX format and will return to the CLI prompt. Afterwards issue

        mf --ini --base=mf plain

so the initiation process for  will start. At the  prompt,

enter the lines

        input modes
        dump

and will run its initiation process and return to the CLI prompt. The last initiation process is that for started with the command

        mpost --ini --mem=mpost plain

At the prompt enter the line

        dump

Afterwards issue cd / and run the script mktexlsr. You now have a working TEX-system.

To install L^{A}TEX, issue in ../web2c the command

        tex --ini --fmt=latex latex.ltx

running the initex process for the L^{A}TEX system. Finally execute mktexlsr again in ..texmf. You can check the success of the initex process for L^{A}TEX by

        latex ltxcheck

You can now compile a L^{A}TEX document filename.tex in your current directory by

        latex filename

Note that if L^{A}TEX finds the .mf-file of a font but not the corresponding .tfm-file, it will call automatically via CallMF2. However this needs memory to keep both L^{A}TEX and running at the same time. For me worked 2 MB Chip RAM and 8 MB Fast RAM. Lower values may work, but I did not test this. The previewer ShowDVI does not seem to have this problem. This concludes the installation of the L^{A}TEX system.

2.2.1 A note on other TEX systems

The file README.amiweb2c in ../texmf/doc/amiga, which informs much (but

not all) of the preceding section, details the initex processes for further TEX systems. These are the ε-TEX, pdfTEX and omega systems. To install these, additional files are needed.

ε-TEX The installation of ε-TeX is not really necessary since ε-TEX is of version 3-14159-2.0 from 2001/06/01 same as the L^{A}TEX 2ε system which incorporates all feature of ε-TEX so ε-TEX muyo!^{4} To install the ε-TEX system you need the file

        http://ftp.math.utah.edu/pub/tex/historic/systems/web2c/
        etex/etexlib-2.1.tar.gz

which gets untar-ed in ...Amiweb2c-2.1. After a run of mktexlsr cd to ...web2c and issue the commands

        etex --ini --efmt=etex *etex.src
        \input hyphen.cfg (optional)
        dump
        etex --ini --efmt=tex plain
        \input hyphen.cfg (optional)
        dump

4Wait! Where did that giant hammer come from?

I issued a mktexlsr at this point. Not sure if it makes any difference but it surely can’t hurt. To run the initiation process for ε-L^{A}TEX issue the commands

        etex --ini --efmt=elatex *latex.ltx
        etex --ini --progname=elatex latex.ltx

so the initiation processes for ε-TEX and its L^{A}TEX variant run without problems. Calling these programs is done by etex or elatex on the appropriate .tex-file.

pdfTEX In order to install pdfTEX get the file

        http://ftp.math.utah.edu/pub/tex/historic/systems/web2c/
        web2c-7.2/pdftexlib-0.12h.tar.gz

and extract it in ../amiweb2c-2.1/. Then from ../texmf/web2c issue the commands

        pdftex --ini --fmt=pdftex plain.tex
        \input hyphen.cfg (optional)
        dump

and to initiate the pdfL^{A}TEX system

        pdftex --ini --fmt=pdflatex latex.ltx

Calling these programs is done by pdftex or pdflatex on the appropriate .texfile. For a manual see

        https://tex.loria.fr/moteurs/pdftex0.12-manual.pdf

There is also a file pdftexlib-0.14h.tar.gz but I chose the file above as it corresponds to the version of the pdfTEX binary. Note that installing the 0.14h library does not update the pdfTEX binary. If you want to do that you need to install from web2c source. I have no idea how to do that.

omega For the omega system, a 16 bit, Unicode based TEX-system there is the file

        http://ftp.math.utah.edu/pub/tex/historic/systems/web2c/
        omega/omega-lib-1.5.tar.gz

which gets untar-ed in ../Amiweb2c-2.1. After the customary mktexlsr the ini process is started in ../web2c by

        omega --ini --progname=lambda lambda.tex

after which a further 8 MB of disk space are taken up. This gets run on a

test.tex file as
        lambda test.tex

I do not use the omega system which has been abandoned anyway so this is just for completeness sake.

2.3 Configuration of ShowDVI

To view the .dvi-file filename.dvi, produced by the compilation of your TEX document, you need the command

        showdvi filename

For standard resolution of 100 dpi this should produce results. For full functionality, however, some tweaks need to be made in the configuration of ShowDVI:

   The configuration file ShowDVI.config located in ..texmf/pastex/config

is set to run ShowDVI on its own screen in the NTSC format. If, like me, you are running a PAL monitor the line

        screen-mode ntsc

must be changed to

        screen-mode pal

ShowDVI in the installed configuration starts on its own screen. If you want the program to run on the Workbench screen, the line

        use-own-screen no

must be changed to

        use-own-screen yes

The disadvantage of this is, you loose the automatic switching to the previewer when calling the L^{A}TEX server.

The fonts for LATEX are defined via .mf-files which uses to produce the .tfm-files for typesetting and the .pk-files which ShowDVI uses for graphical representation. The .mf-files are found in directories of the form

..texmf/fonts/source/supplier where mode is a printer specific mode used

by detailed in modes.mf. The supplier part refers to subdirectories

in ..texmf/fonts/source as for example public/cm or jknappen/ec.

The way ShowDVI finds the .pk-files is defined in ShowDVI.fnt located in ..texmf/pastex/config. The main part consists of lines of the form

        basepkdir res res /mode
        basepkdir res res TEX:..fonts/pk/mode/supplier1
        basepkdir res res TEX:..fonts/pk/mode/supplier2
        ...

For example one of the “suppliers “ is “misc” so to use the fonts in that subdirectory you need for the mode amiga below the line

        basepkdir 100 100 /amiga

to add the line

        basepkdir 100 100 TEX:..fonts/pk/amiga/misc

and likewise for all other modes.

An edit is necessary for the existing resolution 120 dpi which uses the mode OneTwoZero. The lines below the line

        basepkdir 120 120 /OneTwoZero

are of the form

        basepkdir 120 120 TEX:..fonts/pk/amiga/supplier

but need to be changed for each supplier to

        basepkdir 120 120 TEX:..fonts/pk/OneTwoZero/supplier

as CallMF2 for this resolution is called with the mode OneTwoZero and thus stores the .pk-files in the subdirectory ../texmf/fonts/pk/OneTwoZero, so in the original version of ShowDVI.fnt ShowDVI would search in the subdirectory

../texmf/fonts/pk/amiga and not find the files.

2.3.1 AMS fonts

The AMS fonts also contain Cyrillic fonts which are stored in the subdirectory

..ams/cyrillic in ..texmf/fonts/source. So if you need these fonts, add

the lines

        basepkdir res res TEX:../fonts/pk/mode/ams/cyrillic

for the respective resolutions/modes in ShowDVI.fnt.

If you want to use AMS fonts, there is a file

        ..texmf/doc/fonts/amsfonts/amsfndoc.tex

which can be TEX-ed in that directory with the CLI command tex amsfndoc.tex. where the .tfm-files are part of the distribution. However as ShowDVI generates the .pk-files for all AMS fonts, viewing the .dvi-file can take a bit of time.

3 Installation of the TEX server

The Amiweb2c distribution comes with a set of scripts located in TEX:rexx which enables you to call L^{A}TEX from a text editor with the push of a key. There are scripts for Cygnus Editor (CED) with the ending .ced and for MicroEmacs (memacs) ending on .mg. This guide only details the use of these scripts for CED.

Independent of what editor you use, InitTex, copied during the installation to S:, needs a bit of editing: comment out the lines

        run >NIL: SpecialHost
        WaitForPort special_dvi

by putting a semicolon at the beginning of the lines. The reason is that SpecialHost needs the file muimaster.library to work. But even with MUI installed I could not get SpecialHost to work. Furthermore the L^{A}TEX server calls the Rexx script namestruc located in TEX:rexx. But the server script expects this routine in REXX: so issue the command

        copy TEX:rexx/namestruc REXX:

The TEX-server scripts for CED need not be copied to REXX:, but are called from where they reside. To install the TEX-server scripts in CED, use the menu entry “Install DOS/ARexx command” in the “Special” menu, enter the number of the function key where you want to install the command and then enter the command. You need to use the menu entry “Save DOS/ARexx commands” to make this permanent.

The scripts thus to install in CED are

        TEX:rexx/InitTex
        TEX:rexx/Start_TEX.ced
        TEX:rexx/Quit_Tex

I installed the above three scripts on F1,F3 and F10 in that order. This choice of function keys is of course just one possibility.

The script InitTex starts the TEX-server and ShowDVI on a different screen, but does not call TEX to compile your document. To compile your active document, run Start_TEX.ced. If you use Start_TEX.ced and the server is not running yet, Start_TEX.ced will automatically start the server.

You can install Start_TEX.ced with the option “?”, so that Start_TEX.ced? will always ask for the format to use. Standard would be plain or latex. If you set the environment variable ASKFORMAT to 1 then you will always be asked which format to use. You can call Start_TEX.ced with a definite format by installing the command Start_TEX.ced &format where format is the format in question. Regardless of the method, the format will be stored in the environment variable TEXFORMAT which is updated whenever you use a different format. If you add the line

        setenv TEXFORMAT format

to your user-startup file, the TEX-server and do not use an argument for Start_TEX.ced the TEX-server will be always be called with the format format.

Calling Quit_TeX then stops the server and closes ShowDVI. You need to stop the server in order to stop ShowDVI manually.

As a final tweak: ShowDVI is configured to switch to CED by pressing the F5 key. There is a counterpart showdvitofront in TEX:rexx which similarly switches to the ShowDVI screen. Installing showdvitofront on the F5 key in CED in the same way as detailed above gives a nice way of toggling between the editor and the previewer.

3.1 Wishlist

The TEX-server so far accepts only the commands compile for starting L^{A}TEX and quit for, well, you’ve guessed it. It does not automatically call L^{A}TEX again to correct for unresolved references nor does it support programs like bibtex, makeindex or dvips. It would be possible to take the subbranch of the script executing the compile order as a template to expand the capabilities of the TEX-server, but as these scripts are themselves derived from web2c programs it would be less messy if the original web2c program CallMF2 is extended. So if any TEX-guru out there fancies some nights of tinkering...

4 Fonts and all that

Actually this section is not about “and all that”. It is not about what fonts actually are, but what is most memorable about them^{5}... What is most memorable about fonts is that there two kinds: Bitmap fonts using to generate .pk-files giving the pixelated representation of the font and outline fonts defined so that they can be rendered in terms of curves “on the fly” to give a graphical representation using the programming language PostScript. We start with the former and then turn to the latter.

4.1 Installation of new fonts

To install new fonts based on , you need the defining .mf-files. Store these in a subdirectory to ..texmf/fonts/source, say newfontsdir and run mktexlsr from ..texmf/ to make these files findable to . If you compile your document with L^{A}TEX, CallMF2 will automatically generate the .tfm-files L^{A}TEX needs to typeset the new fonts. For PostScript fonts this process is more involved, and will only be briefly (read: to the extent of my meager knowledge) be touched upon below.

Like L^{A}TEX, ShowDVI will automatically use CallMF2 to generate the .pk files, but first you need to tell ShowDVI where to find the .pk-files. To do this, you need to add for each resolution or mode in ShowDVI.fnt the line

        basepkdir TEX:../fonts/pk/mode/newfontsdir

where mode is the respective mode in question found in modes.mf. To use the new font in L^{A}TEX, include the line

        \newfont{\fontcommand}{mffilename at xxxpt}

where xxx is the size of the font in pt (1/72.27 inch) before the part in your document where you actually use the font. Alternatively you can use

        \newfont{\fontcommand}{mffilename scaled 1000}

5“1066 and all that” by Sellar and Yeatman. When working out the test questions for each chapter do not attempt to write on both sides of the paper at the same time.

The factor 1000 means a scaling factor of 1. So if mffilename encodes a font of 10 pt size ..scaled 1200 would tell TEX to use it magnified at 12 pt size.

Replace fontcommand with any label you want. To switch to the new font, use the command \fontcommand. If you don’t want to use the font for the remainder of your document, enclose \fontcommand and the text it applies to in curly brackets. If you want to switch back to the standard computer modem font, use

        \fontfamily{cmr}\selectfont

Alternatively you can enclose the \fontcommand in curly brackets

        {\fontcommand text...}

If you want to save a bit of time by calling only once, forgo the calling of mktexlsr and generate the .tfm-files and the .pk-files in one go by

cd’ing into ..texmf/fonts/source/newfontsdir and issuing the commands
        mf “\mode:=amiga;” “mag:=1;” input mffilename
        gftopk mffilename.100gf mffilename.pk

where mffilename is the name of the .mf-file in question. Then move the generated .tfm-file to

        ..texmf/fonts/tfm/newfontsdir

and the .pk-file to

        ..texmf/fonts/pk/amiga/newfontsdir/dpi100

It is advisable to run mktexlsr from ..texmf/ at this point. Furthermore, you need still need to edit ShowDVI.fnt as outlined above. This gives you the fonts for the standard resolution of 100 dpi in one go. For other resolutions ShowDVI needs to call again, though. This method is only workable for small sets of fonts. For whole font families it is advisable to use the automatic generation process.

For other printers/resolutions the corresponding definition can be found in modes.mf (in ..texmf/metafonts). If you run in another mode with resolution xxx dpi or with another magnification, you get a file ending on .xxxgf, the .pk-file of which needs to be stored in

        ..texmf/fonts/pk/mode/newfontsdir/dpixxx

If  cannot find the .mf-file in question and you want  to

stop asking, enter “null”, and will use the default file null.mf.

4.2 A note on ec fonts

The Amiweb2c distribution includes the .mf-files of the ec font family in the T1 encoding. You can set your document in this font family by using

        \usepackage[T1]{fontenc}

in the preamble. You need to configure ShowDVI.fnt for the ec fonts, as shown in section 2.3 where the subpath to the .mf-files is

        ..texmf/fonts/source/jknappen/ec

The run on an ec-font takes about 4 minutes while a run on a cm font takes 1 minute 30 seconds, so it is advisable to download the .tfm-files of the ec fonts from CTAN and copy them to ..fonts/tfm/jknappen/ec so that only the generation of the -pk-files is necessary.

A hitch exists for the small ec fonts like ecrm0500 as CallMF2, called by L^{A}TEX, runs in nullmode with a 101 dpi resolution. For small fonts this mode throws up the error message “strange path (turning number zero)“, seemingly due to rounding errors. A list, not claiming to be complete, of problematic .mf-files for the ec fonts is:

eccc0500-0800,ecoc0500,ecsc0500-0800,ecsi0500-0800,
ecsl0500-0900,ecso0500-0700, ectc0500-0700, ecs1200,
ecss0500-2488, ectt0500, ectt0900, ecti 0500, ecti0700, ecbx0500

The trick is to generate the .tfm- and .pkfiles for such offending fonts by the manual method described in the previous subsection with the mode ljfour corresponding to 600 dpi and store the .tfm-files in

        ..texmf/fonts/tfm/jknappen/ec/

and the the .pk-files in

        ..texmf/fonts/pk/ljfour/jknappen/ec/dpi600/

If you are using the small ec fonts for the first time, it is advisable to run ShowDVI from the command line and not from the server as in the former case you get detailed error messages about which font is causing such problem. ShowDVI is not configured “out of the box” for the use of ec fonts, so need to modify its config file as outlined in the previous section.

4.3 PostScript fonts

The following is a few notes based on gleanings from the wild world of PostScript fonts for L^{A}TEX. It does not claim to be authoritative or in any way complete. Nor should the same functionality as of a modern TEX system be expected. After all, pdfTEX for Amiweb2c is in version 0.12h. I will not even begin to discuss OpenType or TrueType fonts.

4.3.1 Crating PostScript files with dvips

To convert a .dvi-file test.dvi produced by TeX into a PostScript documents is done by the program dvips by calling

        dvips test

producing the PostScript file test.ps. Dvips can be made to tailor its output to a specific printer by calling it with the option -Pxxx, where xxx is part of the name in files of the type config.xxx, usually located in ..texmf/dvips/config. The xxx also correspond to modes found in modes.mf (in ..texmf/metafonts/misc) which also gives the physical printer model these modes refer to. For Amiweb2c the following config files are available:

           xxx    resolution / dpi     printer model
         canonex         600         LaserWriter Pro 630
           cx           300              Canon CX
         deskjet         300           HP DeskJet 500
          epson        240x216        Epson MX/FX 9-pin
         ibmvga         110           IBM VGA monitor
         ljfour         600            HP LaserJet 4
           qms           300         QMS (Xerox engine)
         toshiba         180            Toshiba 13XX

The mode config.deskjet is the default one.

4.3.2 Dvips with PostScript fonts

Dvips works with CallMF2 to produce .pk-files on the fly. However dvips also works^{6} with native PostScript fonts. In the TEX world a font is defined via two files: the .tfm-file encoding the way a font is typeset and a .mf-file encoding in lines and curves how a font actually looks. Their counterparts the PostScript world are the .afm-file (Adobe Font Metric) and the .pfa-file (PostScript Font Adobe) in human readable format or in packed, binary form as .pfb-files.

For the standard Computer Modern (cm) fonts there is a PostScript version known as bakoma fonts which can be found in the bakoma package on CTAN. To install the bakoma fonts, copy the .pfb-files to the sub-directories cm/ and ams/

in ..fonts/type1/bakoma/. Then copy the files cmfonts.map, amsfonts.map
to ..texmf/dvips/config and edit the file config.ps in ..texmf/dvips to

include the lines

        p +cmfonts.map
        p +amsfonts.map

A run of mktexlsr is to follow. Then using dvips <filename> on a .dvifile <filename.dvi> containing cm fonts will produce a .ps-file <filename.ps> containing the PostScript outline versions of cm fonts. Dvips “downloads” that is incorporates the .pfb files into the PostScript file. If you don’t want that for reason of file size you need to edit the corresponding map files and remove the “<” in front of the token xxx.pfb where xxx is the name of the -pfb-file in question. A test is given by cd-ing into ..texmf/doc/fonts/amsfonts and

6And I use the word works in a very fuzzy sense.

running dvips on amsfndoc.dvi.

Running dvips on a .dvi-file in OT1 encoding with the bakoma .pfb-files present but not with the map files of the bakoma package installed, it throws up the error message that it cannot find the file f7b6d320.enc. This file is referred to in the default map file psfonts.map. You can download this .encfile (and other .enc files also referred to in psfonts.map for cm fonts) from

     http://chocolatshalba.ch/files/texlive/texmf/fonts/
     enc/dvips/tetex/

all of which which gets copied into .../dvips/base. Then dvips runs cleanly.

If you want to use the ec fonts in their Postscript version, get the file cm-super.zip from CTAN. Note that they eat up about 60MB of disk space.

Copy the .pfb-files to .../texmf/fonts/type1/public/cm-super and the .enc-

files to ../dvips/base. Dvips comes with the default map psfonts.map which already contains the necessary mappings for the cm-super fonts. A run of mktexlsr is to follow.

For pdfTEX copy the .enc-files and .map-files from cm-super.zip to ..texmf/pdftex/base and add to pdftex.cfg in the same directory the line

        m +cm-super-t1.map

and similar for all the other .map-files.

4.3.3 Ghostscript

ShowDVI in its Amiweb2c incarnation can only preview .dvi-files containing bitmap-based fonts but not .dvi-files containing PostScript fonts which are based on outlines. In the same vain ShowDVI does not know how to handle .ps-files or .pdf-files created by dvips or pdflatex. However there is a previewer for .ps- and .pdf-files called Ghostscript. To install Ghostscript, download from aminet.net the files

        GS510-fonts-st.lha
        GS510-fonts-ot.lha
        GS510-data.lha
        GS510-040fpu.lha
        GS510Fontmap.lha

To automatize the install process also download GS510-Install.lha. Extract this file and copy the above .lha-files into the created directory Ghost_Install. Then get Installer_43.3.lha from aminet.net, extract it and copy the file Installer to C:. Then run one of the install-scripts in Install_Ghost. To in-

stall Ghostscript in ../Amiweb2c-2.1/ghostscript as in user-startup.entry

create the subdirectory ghostscript in ../Amiweb2c-2.1 either by hand or during the installation process. Note that this installation adds to user-startup a section starting with ;Begin Ghostscript which has then entry assign PSFONTS:Ghostscript:fonts without the qualifier “add”, undoing all the settings to PSFONTS: in user-startup.entry. So it is advisable to uncomment this line. AFAICT Ghostscript 5.10 ignores that assignment anyway.

Invoke Ghostscript on a .ps-file in the directory of that .ps-file by gs <psfile>. The resolution of the display window of can be changed by the command line option –r<dpi>. I have found that <dpi>=250 is the maximum value, for <dpi>=300 Ghostscript crashes. This might be a problem of insufficient memory.

Ghostscript has two ways of finding the .pfb-files (or .pfa-files, the ASCII variant of the binary .pfb-files) for a font: One is the file Fontmap in Ghostscript: which has lines of the form

        /fontname (pfbfilename.pfb);

where fontname is the full font name as given in the .pfb-file in the line beginning with /Fontname and pfbfilename is, well, you’ve guessed it. If only pfbfilename is given, Ghostscript looks for it in Ghostscript:fonts. But you

can also give the full path like TYPE1DIR:supplier/typeface/pfbfilename.pfb.

Another way is to set the environment variable GS_FONTPATH by

        setenv GS_FONTPATH Path

The problem is that AFAICT Ghostscript 5.10 does not search in multiple paths of the form Path1,Path2... nor does it accept wild cards like #? or * so for Ghostscript all .pfb-files would be needed to be stored in one directory if you want to use the environment variable.

On a final note, avoid running dvips and gs from the same CLI window. There seem to be some incongruities which causes dvips to crash or stall.

4.3.4 Ghostscript and PostScript cm/ec fonts

Running dvips on a .dvi-file containing cm fonts in the OT1 encoding using the default psfonts.map gives a clean run. But when viewing the resulting .ps-file in Ghostscript 5.10 there are missing glyphs. Viewing that .ps-file on a modern modern PC with TeXLive installed gives the same result. An even bigger but^{7} is that using the maps from bakoma package, the .ps-file is displayed correctly in Ghostscript but has missing glyphs and weird font substitution when viewing on a modern PC.

For the ec fonts in the cm-super form dvips runs cleanly, but Ghostscript throws up the maddeningly unhelpful error message “/undefined in T1Encoding”. Viewing the same .ps-file on a modern PC has missing glyphs.

7I can’t lie, I had to.

4.3.5 Ghostscript and pdfTEX

Running pdflatex on .tex files with bakoma or cm-super PostScript fonts produces a .pdf-file which is is displayed without errors on a modern PC but Ghostscript throws up the maddeningly unhelpful error message “undefined in ¥”. For PostScript ec fonts from the Latin Modern package pdflatex throws up “unexpected end of file”.

4.3.6 Ghostview and PostScript New Font Selection Scheme

The PostScript New Font Selection System (psnfss) detailed in psnfss.pdf in ..texmf/doc/latex/psnfss works in Amiweb2c for all packages like avant, courier etc. (see psnfss.pdf for a full list) . Note that the font outlines for all packages in the psnfss are not part of the distribution due to licensing. However, for the fonts used in psnfss (see below) Ghostscript comes equipped with its own version of the .pfb-files (the .gsf-files) and will call them automatically. The .gsf versions are generally seen as lacking in quality, but with the resolution on an old-school Amiga this is not really an issue. Two exceptions are the Utopia fonts and the Charter fonts which Ghostscript has on board in the form of .pfa-files. Alternatively for the packages charter and utopia there are freely available .pfb-files on CTAN. To install these, copy them into

        .../texmf/fonts/type1/adobe/charter/
        .../texmf/fonts/xxx/adobe/utopia.

respectively. The map files charter.map, utopia,map are already in ../dvips/psnfss. Activate these map files by adding the lines

        p +psnfss/utopia.map
        p +psnfss/charter.map

to ..dvips/config.ps. Dvips reads in map files according to the file config.ps. See section 4.3.6. Another way is to specify the map on the command line with -u option like

        dvips -upsnfss/utopia.map test

However displaying the resulting .ps-file in Ghostscript causes the program to fail and throw up a lot of incomprehensible error messages. According to the man page of dvips using this -u option means that dvips uses the specified map file exclusively. It should be possible to call dvips as

        dvips -u +psnfss/utopia.map test

so that utopia.map is used in addition to psfonts.map. But this causes dvips to complain that it cannot find the headerfile +psnfss/utopia.map.

4.3.7 General PostScript fonts

The installation of any PostScript font can be done pretty much as outlined in the two above examples. Most packages on CTAN for PostScript fonts come with the relevant files which just need to be copied to their appropriate locations and then run mktexlsr. The best way is keep in accordance with the TDS (TeX Directory Structure) is to copy the files of type xxx of a font designed by the “sup-

plier” and with the “typeface” into .../texmf/fonts/xxx/supplier/typeface.

If you have only .afm- and .pfb-files, the process is more daunting and I cannot claim to fully understand it. A starting point for DIY PostScript font installation would be

        https://www.tug.org/TUGboat/tb27-1/
        tb86kroonenberg-fonts.pdf

for details.

There is a package fontinst on CTAN which automatizes most of the installation process of PostScript fonts (see:

        http://texdoc.net/texmf-dist/doc/fonts/Type1fonts/
        fontinstallationguide.pdf

However this can be time consuming. The process of converting a single .afmfile to a .pl-file (the ASCII version of the binary .tfm-file) and several .vpl-files the ASCII version of the binary .vf-files takes about 15 minutes. So installing whole font families from scratch is something of a project.

4.3.8 Automatic font creation

The Amiweb2c-2.1 distribution can create .tfm- and .pk-files form source files automatically. However PostScript fonts are outline fonts and not bitmaps like .pk-fonts. So pk is pk and pfb is pfb and never shall the twain meet. In principle CallMF2 contains a subsection for the generation of .pkfiles from .pfb-files using the program ps2pk. Calling ShowDVi on a .dvi-file containing PostScript fonts (or more to the point their .tfm-file) then effects a call on via CallMF2 which complains that is cannot find some .mf-file.

However MakeTeXFont.rexx, the heart of the automatic font generation scripts for Amiweb2c looks for the fonts according to the names given in the .dvi-file. These names depend on the encoding (OT1,T1...) chosen in the L^{A}TEX file. But MakeTeXFont.rexx looks for the corresponding .pfb-files according to that encoding scheme determined by the final two symbols (number and letter) in the .tfm-filename which which it was called. For the Utopia-Roman font in the T1 encoding that filename is putr8t. But MakeTexFont.,rexx then looks for that string in a single map file ps2pk.map which isn’t even the default map of dvips. The problem is that the naming convention by Karl Berry has the names of the .pfb-files end on two letters determining the encoding (8a for Adobe, 7t for OT1, 8t for T1, see input98.pdf in the package fontinst for a partial list and Karl Berry Filenames for fonts

        https://www.tug.org/TUGboat/tb11-4/tb30berry.pdf

for a full list. The naming scheme is a result of the restriction on the length of filename on old operating systems. Note however that modern packages come with filenames which break the maximum length of filenames for AmigaOS. Here you are on your own. So to make a long story short, MakeTexFont.rexx fails to find the .pfb-file and proceeds to look for a corresponding .mf-file. Which fails. While it would be possible to patch the script by hand, CallMF2 for Amiweb2c is derived from web2c sources, which should be edited. Summoning some TeX-genie at this point...

4.4 Afterword

After my adventure in PostScript land so far as it applies to the Amiweb2c distribution on an Old-School Amiga, it is my considered opinion that PostScript fonts should only be used with Amiweb2c in connection with the psnfss. For this Ghostscript displays the files correctly. For common cm/ec fonts it is best to stick to the classic world. If you want to use their PostScript versions nonetheless, my advice is to use pdfL^{A}TEX and display the .pdf-file on a modern PC with a modern TEX installation.

5 Conclusion

This concludes the installation of the L^{A}TEX distribution Amiweb2c on an emulated Amiga with Workbench 3.1. Happy TEX-ing!

A Keyboard

The keyboard of the emulated Amiga and the modern PC keyboard are not identical, so the mapping of the emulated Amiga keyboard to your physical keyboard can be a bit ...opaque. Below is a list of keymappings I found out — some of them quite by accident — to be helpful. Note that they depend on my keyboard with German layout. The left side of the equation sign is the PC keyboard and the right side is the Amiga keyboard:

        Einf = #
        Shift + Einf = ^
        # = \
        Shift + # = |
        ^= `
        Shift + ^= ~
        Pos 1 = [
        Shift + Pos 1 = {
        Bild up = ]
        Shift + Bild up = }
        Bild down = Amiga key

The key Einf corresponds to Ins and Bild corresponds to Pg on an English keyboard.

The keymapping of the emulator has consequences for the navigation of the cursor in CED:

        Line up:  Shift + Numpad 8
        Line down:  Shift + Numpad 2
        Beginning of file:  Ctrl (left) + Shift + Numpad 8
        End of file:  Ctrl (left) + Shift + Numpad 2
        Character left:  Shift + Numpad 4
        Character right:  Shift + Numpad 6
        Word left:  Ctrl (left) + Shift + Numpad 4
        Word right:  Ctrl (left) + Shift + Numpad 6
        Beginning of line:  Ctrl (left) + Shift + Numpad 7
        End of line:  Ctrl (left) + Shift + Numpad 1
        12 lines up:  Ctrl + Shift + Numpad 9
        12 lines down:  Ctrl + Shift + Numpad 3

B Searching files

Quite often during the installation process you will have to find out where a particular file is located or whether it contains a particular phrase. This can be achieved from the CLI by the search command:

        search from pattern file all quiet

The option from is the full directory path in which to search. If the search is to be conducted from the currently active directory the from part is just “” (not an empty string, but double quotation marks). The option pattern is whatever you are searching for. For example to search for files with the ending .mf, use the pattern #?.mf. The options file means that only file names are searched, without it the pattern is looked for also inside the files. Which can come in handy but slows things down. The option all means to search in all subdirectories and the option quiet means to show only the files where pattern is found, not to show all files being searched.

If the list of results is rather long and scrolls past too quickly you can use w

        search from pattern file all quiet > filename

and the output will be redirected to the file filename for you leisurely perusal at you convenience.