summaryrefslogtreecommitdiff
path: root/systems/unix/tex-fpc/README
diff options
context:
space:
mode:
Diffstat (limited to 'systems/unix/tex-fpc/README')
-rw-r--r--systems/unix/tex-fpc/README182
1 files changed, 95 insertions, 87 deletions
diff --git a/systems/unix/tex-fpc/README b/systems/unix/tex-fpc/README
index b227918699..1d9cd8dcfa 100644
--- a/systems/unix/tex-fpc/README
+++ b/systems/unix/tex-fpc/README
@@ -1,9 +1,9 @@
-TeX-FPC, second edition, 2020-11-24
+TeX-FPC 3rd ed. 2021-02-14
This directory contains change files for Donald E. Knuth's suite
of TeX related programs. The change files (.ch) and Don Knuth's WEB
-files (.web) from January 2014 are the key components of a construction
-kit for "TeX-FPC"---a complete TeX system based on the Free Pascal
+files (.web) from January 2021 are the key components of a construction
+kit for "TeX-FPC"---a complete TeX system based purely on the Free Pascal
Compiler (FPC), and running in any Unix environment.
These building bricks are glued together by shell scripts in
@@ -36,22 +36,19 @@ In fact, I only used stuff from:
Kernighan, Pike: The Unix programming environment (1984)
I have to admit, now and then I used vi instead of ed, the Unix Standard
Editor.
-If it doesn't work on your system, it is not Unix, not even remotely so.
+If TeX-FPC doesn't work on your system, it is not Unix, not even remotely so.
-Any version of (FPC) from 3.0.0 on will suffice. To compile TeX and
-METAFONT, three additional units are needed:
-SysUtils, BaseUnix, Unix
-They have to be specified on the command line:
- $ fpc -Fasysutils,baseunix,unix
+Ane version of FPC from 3.0.0 (Nov. 2015) to 3.2.0 (June 2020)
+works fine.
To build the DVI-driver xdvi and dvips a C-compiler is necessary.
To run xdvi, you need X-Window and to print your books, you either
need a postscript printer or you use ghostscript to translate
-postscript to your printers language.
+postscript to your printers language. The DVI-drivers are written in C.
Everything you need existed in the mid eighties of the last century.
All the great books produced with TeX demonstrates how much can be
-done with how little.
+done without the latest "innovations".
Overview:
=========
@@ -83,7 +80,7 @@ TeX files:
.dvi device independent file, "TeX: The Program" (tex.web), part 31
.log a log file
-Dependencies of files and programs:
+Dependencies of files:
File depends on
---- ----------
xxx xxx.p
@@ -98,51 +95,45 @@ plain.base plain.mf
local.mf
mf.pool
+Dependencies of programs
Program depends on
------- ----------
initex TeXformats/tex.pool
-tex TeXformats/tex.fmt
+tex TeXformats/plain.fmt
inimf MFbases/mf.pool
mf MFbases/plain.base
Files and their processors:
--------------------------
WEB:
- tangle
+ tangle
x.web, x.ch --------> x.p, x.pool
- fpc
- x.p --------> x
-
+ fpc
+ x.p --------> x (to compile tex and mf you need some units:
+ fpc -FaUnix,sysutils,baseunix)
tgl
- x.web, x.ch --------> x (combines the last two steps, no pool)
+ x.web, x.ch --------> x (combines the last two steps, no pool)
itgl
x.web, x.ch --------> inix.p, inix, x.pool (like tgl, but with pool)
weave
- .web, .ch --------> .tex (description of the program)
+ .web, .ch --------> .tex (description of the program)
- wve
- .web, .ch --------> .dvi (linking the above step and tex)
+ wve
+ .web, .ch --------> .dvi (linking the above step and tex)
-METAFONT:
+METAFONT and TeX metric fonts:
inimf
mf.pool, local.mf plain.mf --------> plain.base
mf
- plain.base, .mf --------> .nnngf, .tfm
-
- gftopk
- .nnngf --------> .nnnpk
+ plain.base, .mf --------> .tfm
mkfont
- .mf --------> TeXfonts/.tfm, PKfonts/.nnnpk
-
- mkpkfont
- .mf --------> PKfonts/.nnnpk
-
+ .mf --------> TeXfonts/.tfm
TeX:
initex
@@ -151,18 +142,29 @@ TeX:
tex
plain.fmt, .tfm, .tex --------> .dvi
-DVI drivers:
+DVI drivers and bitmap fonts:
+ mf
+ plain.base, .mf --------> .nnngf
+ gftopk
+ .nnngf --------> .nnnpk
+
+ MKTeXPK
+ .mf --------> PKfonts/.nnnpk (combining the above steps)
+
+
dvips
.tfm, .nnnpk, .dvi --------> .ps, PostScript printer
xdvi
.tfm, .nnnpk, .dvi --------> X-Window
+The dvi-drivers dvips and xdvi will call MKTeXPK to install .nnnpk
+on demand.
+
File names:
-----------
-TeX-FPC searches files in directories which are local to the working
-directory:
+TeX-FPC searches files in subdirectories of the working directory:
TeXinputs .tex
TeXfonts .tfm
TeXformats .pool, .fmt
@@ -171,23 +173,29 @@ directory:
PKfonts .nnnpk
DVIPSconf .pro, .ps, .map (Header and configuration files for dvips)
-Create one set of "master directories" and used symbolic links
-to your working directory like:
+To run tex or initex the working directory must contain the first
+three directories from the list above. Likewise for mf or inimf and
+the last four directories from the list. The dvi driver xdvi and
+dvips will invoke mf to create PK fonts whenever needed. So you
+might need to install the mf-directories when printing.
+
+To avoid copying the directories to each directory where you want
+to run TeX, create one set of "master directories" and use symbolic
+links to your working directory like:
ln -s ~/TeXformats .
-The scripts mk_TeX_dir and mk_MF_dir help to prepare a directory
-for running TeX resp. METAFONT. Adapt these scripts to the locations
-of your master directories.
+The scripts mk_TeX_dir and mk_MF_dir help do just this automatically.
+Adapt these scripts to the locations of your master directories.
TeX-FPC's path searching applies to file names without directory
components, i.e. without a /:
- .tex local directory and then TeXinputs
- .mf local directory and then MFinputs
- .tfm local directory and the TeXfonts
- .fmt local directory and then TeXformats
+ .tex working directory and then TeXinputs
+ .mf working directory and then MFinputs
+ .tfm working directory and the TeXfonts
+ .fmt working directory and then TeXformats
plain.fmt hard coded (!) TeXformats/plain.fmt
- .base local directory and MFbases
+ .base working directory and then MFbases
plain.base hard coded (!) MFbases/plain.base
.pool hard coded (!) in TeXformats, MFbases
@@ -224,8 +232,9 @@ creates a list of the font names used by plain.tex. I edited
plainfonts to convert it to a shell script that creates all fonts
of the plain format. In the MFT directory you'll find other examples.
If the generation of a font failed, the failing command is written
-to the file trouble in the working directory. You might want to fix the
-error and rerun the file trouble, (sh trouble).
+to the file trouble in the working directory. You might want to fix
+the error and rerun the file trouble, (sh trouble). If the error
+persists though, you might end up in a loop.
Installing new fonts from CTAN
------------------------------
@@ -251,36 +260,35 @@ Both tests are passed by TeX-FPC. See the trip and the trap directories..
Hints to build and install TeX-FPC from Knuth's sources.
========================================================
+Create the master directories if you haven't done so allready.
+Create links to the master directories in tex-fpc:
+ mk_TeX_dir
+ mk_MF_dir
Get Knuth's source files:
------------------------
-Get Knuth's distribution from
- ftp://ftp.dante.de/pub/tex/systems/knuth/dist.zip
-At the DANTE server, passive ftp mode does not work. Try
- tug.org/tex-archive/systems/knuth
-or ftp ftp.cs.stanford.edu/tex/dist
+Get some directories Knuth's distribution from
+ tug.org/tex-archive/systems/knuth/dist.zip
+Unpack dist.zip in the parent directory of tex-fpc and move the files from
+Knuth's distribution to tex-fpc.
+ $ mv dist/* tex-fpc
-This gives you the WEB files, manuals, macros and some .mf files.
-At least you need the subdirectories lib, tex, mfware, mf and web.
+This directory, i.e. tex-fpc will be our stage directory, that is
+all compiling etc. will be done in tex-fpc and it's subdirectories.
-You need another set of source files, namely the METAFONT source
-files (.mf) for Knuth's font Computer Modern.
-
-Copy the .mf files from
- ftp://ftp.dante.de/pub/tex/fonts/cm/mf/
-or ftp.cs.stanford.edu/tex/fonts/
-to MFinputs.
+Install the files from cm to MFinputs:
+ mv cm/* MFinputs
And copy the .mf files from the lib directory to MFinputs.
cp -p lib/*.mf MFinputs
-All path names are given relative to directories of Knuth's distribution.
+All path names are given relative to tex-fpc.
Building from WEB sources, (xxx.web and xxx.ch --> xxx, xxx.pool)
----------------------------------------------------------------
The general procedure to build a binary xxx from its WEB files is:
Move xxx.ch to the directory that contains xxx.web, apply tangle
-to xxx.web and xxx.ch to generate xxx.p and xxx.pool, and compile the
+to xxx.web and xxx.ch to generate xxx.p, and compile the
Pascal source with fpc. The command line
tgl xxx.web xxx.ch
will do all that. It produces xxx that you need to move to your binary
@@ -295,17 +303,17 @@ activate the change blocks marked by "ini" and use tgl.
A change block is active, if each of the web commands @x, @y and
@z are at the start of their lines, inactive if none of the web
-commands are at the start of their lines and defect otherwise.
-See webman.tex, section~11. for details on change files.
+commands are at the start of their lines.
+See webman.tex, for a short description of change files (look for @x).
Step by step procedure to bootstrap TeX-FPC
-------------------------------------------
-Install the Free Pascal Compiler
+Install the Free Pascal Compiler (3.0.0+)
https://freepascal.org/download.html
Create the master directories (see above).
-Copy the shell scripts from the tex-fpc/shell to your binary directory.
+Copy the shell scripts from tex-fpc/shell to your binary directory.
0. Compile tangle tangle.p --> tangle
@@ -321,48 +329,48 @@ binary directory.
tex.web, tex.ch --> initex,initex.p tex.pool
--------------------------------------------
-Make sure, the ini-change blocks in mf.ch and tex.ch are deactivated.
-Build the ini-programs and save them as initex, resp. inimf.
-Save tex.pool in TeXformats and mf.pool in MFbases, use itgl instead
-of tgl to keep inimf.p and initex.p and the .pool files.
+Build the ini-programs itgl and save them as initex, resp. inimf in your
+bin directory. Save tex.pool in TeXformats and mf.pool in MFbases.
2. Make plain.base lib/plain.mf --> MFbases/plain.base
------------------------------------------------------------------------
-Go to the directory tex-fpc/mf and use inimf to create plain.base.
+Go to tex-fpc/mf and use inimf to create plain.base.
The file local.mf contains mode definitions for my HP LaserJet 1320
-printer. Adapt local.mf to your printer and copy it to the mf directory.
- inimf ../lib/plain input local dump
+printer. Adapt local.mf to your printer.
+ inimf ../lib/plain input ../MFT/local dump
Move plain.base to MFbases.
3. Make mf mf.web, mf.ch --> mf
------------------------------------------------------------------------
-Activate the the inimf-change block in mf.ch and build it with tgl.
+goto mf and use ../ch.ch/mkprod mf to activate the inimf-change
+block in mf.ch, build mf with tgl, save mf in your bin directory.
-4. Make gftopk gftopk.web, gftopk.ch --> gftopk
-------------------------------------------------------------------------
-Build gftopk in the mfware directory. You need gftopk to install
-packed font files (.nnnpk) in the next step.
-5. Install fonts: MFinputs/*.mf --> TeXfonts/*.tfm, PKfonts/*.pk
+4. Install TFM-fonts: MFinputs/*.mf --> TeXfonts/*.tfm
------------------------------------------------------------------------
-Prepare the stage directory to run both METAFONT (mk_MF_dir) and
-TeX (mk_TeX_dir) and run the shell script MFT/plainfonts from there.
+Run the shell script MFT/plainfonts.
Check the file trouble that might contain commands that failed.
-6. Make plain.fmt lib/plain.tex --> TeXformats/plain.fmt
+5. Make plain.fmt lib/plain.tex --> TeXformats/plain.fmt
------------------------------------------------------------------------
-Copy lib/hyphen.tex to TeXinputs and go to the directory tex
-to build plain.fmt.
+Copy lib/hyphen.tex to TeXinputs and go to tex to build plain.fmt.
This command line will do
initex ../lib/plain \\dump # one backslash is consumend by sh!
Move plain.fmt to TeXformats.
-7. Finally build tex tex.web, tex.ch --> tex
+6. build tex tex.web, tex.ch --> tex
------------------------------------------------------------------------
-Activate the initex-change block in tex.ch and build it with tgl.
+Use ../ch.ch/mkprod to activate the initex-change block in tex.ch
+and build tex with tgl.
+
+Step 6 completes the minimal installation of TeX-FPC, which enables
+you to study, change, build, and test the six programs tangle,
+weave, inimf, mf, initex, and tex. Run them to typeset your book,
+create your font, and last but not least to try literate programming
+and write your own web programs.
-Happy weaving and happy type setting with your system!
+Happy weaving and typesetting,
Wolfgang Helbig,
Comments welcome: helbig@mailbox.org