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/README288
1 files changed, 170 insertions, 118 deletions
diff --git a/systems/unix/tex-fpc/README b/systems/unix/tex-fpc/README
index 4d62296690..b227918699 100644
--- a/systems/unix/tex-fpc/README
+++ b/systems/unix/tex-fpc/README
@@ -1,35 +1,57 @@
-2019-03-04
+TeX-FPC, second edition, 2020-11-24
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 TeX system which is based on
-the Free Pascal Compiler (FPC) and runs in a Unix environment. It's
-by magnitudes smaller than other TeX distributions.
+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
+Compiler (FPC), and running in any Unix environment.
These building bricks are glued together by shell scripts in
the---guess where---shell subdirectory.
-The MFT directory contains shell scripts for installing fonts
-(xxxfonts), and the directory iby shows how to install fonts
-with TeX-FPC. In this case a polytonic Greek font, suited for ancient
-Greek texts.
+The file tex-fpc.pdf shows how and why TeX-FPC differs from the original.
+It was produced by two command lines:
+ $ wve tex.web tex.ch
+ $ dvipdf tex.dvi
-The directories dvipsnk and xdvi show how to install Tom Rokicki's
-dvips and Paul Vojta's xdvi.
-If your printer does not accept postscript, you might want to install
-ghostscript, which converts postscript to the language of you printer or
-to pdf. Use ghostscripts dvipdf to convert ps to pdf.
+The MFT directory contains shell scripts to create fonts (xxxfonts).
+Its subdirectory iby shows how to add a font to TeX-FPC. In this
+case a polytonic Greek font, suited for ancient Greek texts.
-TeX-FPC replaces the famous and beautiful TeX-GPC. The GNU Pascal Compiler
-is not supported on Linux, the BSDs and OS X. Free Pascal is chosen
-not because it is the best alternative but because it is the only
-alternative.
-In FPC 3.0.4 I spotted to errors: See
-0035136: The function EOF does not comply to ISO Pascal
-0035066: fpc says "cannot determine which overloaded function to call"
-at bugs.freepascal.org
+The directories dvips and xdvi help to get, compile and install Tom
+Rokicki's dvips and Paul Vojta's xdvi.
+Likewise the directory mp for John Hobby's METAPOST.
+
+The directory tech demonstrates how to build a TeX system that
+supports the german language.
+
+And the ch.ch directory contains change files for change files.
+
+Requirements:
+============
+TeX-FPC is liberal in what it accepts:
+You will succeed with any flavor of the Unix operating system.
+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.
+
+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
+
+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.
+
+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.
Overview:
=========
@@ -39,7 +61,7 @@ File formats and their documentation:
WEB files:
.web WEB programs, "The WEB System of Structured Documentation" (webman.tex)
.ch Change files for WEB programs (patches to be applied to .web files)
-.p Free Pascal source
+.p Pascal source
.pool String pool, contains the string constants of a WEB program.
@@ -57,66 +79,84 @@ METAFONT files:
TeX files:
.tex TeX source, "The TeXbook" (texbook.tex)
.fmt Format file, a compact representation of TeX's memory.
- contains the string pool (tex.pool) and preloaded .tfm files.
+ contains the string pool (tex.pool) and fifty .tfm files.
.dvi device independent file, "TeX: The Program" (tex.web), part 31
.log a log file
-
+Dependencies of files and programs:
+File depends on
+---- ----------
+xxx xxx.p
+xxx.p xxx.web, xxx.ch
+tex.pool strings in tex.web or tex.ch
+plain.fmt plain.tex
+ .tfm files (cf. plain.log)
+ hyphen.tex
+ tex.pool
+mf.pool strings in mf.web or mf.ch
+plain.base plain.mf
+ local.mf
+ mf.pool
+
+Program depends on
+------- ----------
+initex TeXformats/tex.pool
+tex TeXformats/tex.fmt
+inimf MFbases/mf.pool
+mf MFbases/plain.base
Files and their processors:
--------------------------
WEB:
tangle
- .web, .ch --------> .p, .pool
+ x.web, x.ch --------> x.p, x.pool
fpc
x.p --------> x
tgl
- x.web, x.ch --------> x (linking the last two steps)
+ x.web, x.ch --------> x (combines the last two steps, no pool)
itgl
- x.web, x.ch --------> x, inix.p, .pool (links the first two steps
- and keeps the pascal sources)
+ 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)
METAFONT:
- inimf
- plain.mf --------> plain.base
+ inimf
+ mf.pool, local.mf plain.mf --------> plain.base
- mf
- .mf --------> .nnngf, tfm
+ mf
+ plain.base, .mf --------> .nnngf, .tfm
- gftopk
- .nnngf --------> .nnnpk
+ gftopk
+ .nnngf --------> .nnnpk
- mkfont
- .mf --------> TeXfonts/.tfm, PKfonts/.nnnpk
+ mkfont
+ .mf --------> TeXfonts/.tfm, PKfonts/.nnnpk
- mkpkfont
- .mf --------> PKfonts/.nnnpk
+ mkpkfont
+ .mf --------> PKfonts/.nnnpk
TeX:
- initex
- .tfm, plain.tex --------> plain.fmt
-
- tex
- [ .tfm ], .tex --------> .dvi
+ initex
+ tex.pool, hyphen.tex, plain.tex, .tfm --------> plain.fmt
+ tex
+ plain.fmt, .tfm, .tex --------> .dvi
DVI drivers:
- dvips
- .dvi, .nnnpk --------> .ps, PostScript printer
+ dvips
+ .tfm, .nnnpk, .dvi --------> .ps, PostScript printer
- xdvi
- .dvi, .nnnpk --------> X-Window
+ xdvi
+ .tfm, .nnnpk, .dvi --------> X-Window
File names:
@@ -131,8 +171,8 @@ directory:
PKfonts .nnnpk
DVIPSconf .pro, .ps, .map (Header and configuration files for dvips)
-I created one set of "master directories" and used symbolic links
-to my working directory like:
+Create one set of "master directories" and used symbolic links
+to your working directory like:
ln -s ~/TeXformats .
@@ -142,23 +182,21 @@ 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 TeXfonts
-
-Depending on the context, TeX-FPC programs append ".mf", ".tex",
-or ".tfm" to file names without extensions.
-
-builtin file names:
-------------------
-TeXformats/tex.pool string pool for tex, (in initex)
-MFbases/mf.pool string pool for mf, (in inimf)
-TeXformats/plain.fmt format file for Plain TeX, (in tex)
-MFbases/plain.base base file for Plain METAFONT, (in mf)
+ .tex local directory and then TeXinputs
+ .mf local directory and then MFinputs
+ .tfm local directory and the TeXfonts
+ .fmt local directory and then TeXformats
+ plain.fmt hard coded (!) TeXformats/plain.fmt
+ .base local directory and MFbases
+ plain.base hard coded (!) MFbases/plain.base
+ .pool hard coded (!) in TeXformats, MFbases
+
+Depending on the context, TeX-FPC programs append ".mf", ".tex", ".fmt",
+".base" or ".tfm" to file names without extensions.
Fonts in TeX-FPC:
----------------
-For each font TeX needs one .tfm file. For each font and
+For each font, TeX needs one .tfm file. For each font and
resolution/magnification the DVI drivers need one .nnnpk file.
The script mkfont will install both a .tfm and an .nnnpk file, the
script mkpkfont will install an .nnnpk file only. You specify the
@@ -170,9 +208,9 @@ Running TeX-FPC
===============
Missing files
-------------
-Search missing macro files like (webmac.tex) in Knuth's lib
+Search missing macro files like webmac.tex in Knuth's lib
directory and copy them to the working directory or to TeXinputs.
-My change files import webmac-fpc.tex; move it to TeXinputs.
+The .ch files import webmac-fpc.tex; move it to TeXinputs.
Search the sources of missing fonts in the lib directory (.mf),
copy them to MFinputs and use the scripts mkfont or mkpkfont to
@@ -185,104 +223,121 @@ command line
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).
Installing new fonts from CTAN
------------------------------
The directory MFT/iby contains instructions on how to install a font
from CTAN, in this case ibygrk to typeset polytonic ancient Greek.
-Printing the documentation
---------------------------
+Printing the web-programs
+-------------------------
The weave program generates an xxx.tex file from an xxx.web file
-and a possibly empty change file. Use tex to generate an xxx.dvi
-file. This is done by the script wve. For example, to view the
-description of TeX-FPC, use
+and a xxx.ch file. Use tex to generate an xxx.dvi file. This is
+done by the script wve. For example, to view the description of
+TeX-FPC, use
wve tex.web tex.ch && xdvi tex
-The web-macros need another font. Use webfonts to install it.
-The scripts texwebfonts installs additional fonts for tex.tex,
-and mfwebfonts for mf.tex.
+The web-macros need another font. Run MFT/webfonts to install it.
+And run MFT/mfwebfonts for mf.tex.
+The file tex-fpc.pdf provides the doc independent of an installed
+TeX system. It describes how I adopted TeX to FPC, the features and
+and differences of TeX-FPC.
TRIP TRAP
---------
-Both tests might not be passed by TeX-FPC: TeX and METAFONT trim
-trailing spaces from input lines for compatibility with IBM's
-punched cards. TeX-FPC's programs don't.
+Both tests are passed by TeX-FPC. See the trip and the trap directories..
-
-Installing TeX-FPC:
-===================
+Hints to build and install TeX-FPC from Knuth's sources.
+========================================================
Get Knuth's source files:
------------------------
-Make a stage directory, say tex-fpc, which mirrors Knuth's distribution
-from
-
+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
This gives you the WEB files, manuals, macros and some .mf files.
-At least you need the directories lib, tex, mfware, mf and web.
+At least you need the subdirectories lib, tex, mfware, mf and web.
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.
-And Copy the .mf files from the lib directory to MFinputs.
+And copy the .mf files from the lib directory to MFinputs.
cp -p lib/*.mf MFinputs
-I prefer the DANTE server, because that server preserves modification
-times. This is not true with other CTAN mirrors.
+All path names are given relative to directories of Knuth's distribution.
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
-Pascal source with gpc. The command line
+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
-directory.
+directory. Note tgl will not create xxx.pool, since this is only needed
+by the ini-versions that are to be built by itgl.
+
+METAFONT and TEX come in two versions: An initialization version
+(initex, inimf) and a production version (tex, mf). To build the
+initialization version, edit the change file to deactivate the change
+blocks marked by "ini", and use itgl. To build the production version,
+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.
Step by step procedure to bootstrap TeX-FPC
-------------------------------------------
-Install Free Pascal Compiler from www.freepascal.org.
+Install the Free Pascal Compiler
+ https://freepascal.org/download.html
-Create the master directories (see above)
+Create the master directories (see above).
-copy the shell scripts from the tex-fpc/shell to your binary direcory.
+Copy the shell scripts from the tex-fpc/shell to your binary directory.
-0. Make tangle tangle.p --> tangle
-------------------------------------------------------------------------
+0. Compile tangle tangle.p --> tangle
+----------------------------------------------------------------------------
Compile tangle.p (fpc tangle.p) and move tangle to your
binary directory.
-1. Make inimf and initex mf.web, mf.ch --> inimf, inimf.p, MFbases/mf.pool
- tex.web, tex.ch --> initex,initex.p TeXformats/tex.pool
-Make sure, mf.ch and tex.ch are prepared to produce ini versions of
-tex and mf.
-------------------------------------------------------------------------
+1. Make inimf and initex
+------------------------
+ mf.web, mf.ch --> inimf, inimf.p, mf.pool
+ ------------------------------------------
+
+ 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.
-Move tex.pool to TeXformats and mf.pool to MFbases, use itgl instead
-of tgl to keep inimf.p and initex.p.
+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.
2. Make plain.base lib/plain.mf --> MFbases/plain.base
------------------------------------------------------------------------
Go to the directory 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 then type
- inimf ../lib/plain input ../MFT/local dump
+printer. Adapt local.mf to your printer and copy it to the mf directory.
+ inimf ../lib/plain input local dump
Move plain.base to MFbases.
3. Make mf mf.web, mf.ch --> mf
------------------------------------------------------------------------
-Edit mf.ch and look for the string @x inimf that introduces a change
-block. This change block is commented out, since it is shifted
-right. Shift left this block to uncomment it. This way mf.ch is
-changed to build a production version.
+Activate the the inimf-change block in mf.ch and build it with tgl.
4. Make gftopk gftopk.web, gftopk.ch --> gftopk
------------------------------------------------------------------------
@@ -291,13 +346,13 @@ packed font files (.nnnpk) in the next step.
5. Install fonts: MFinputs/*.mf --> TeXfonts/*.tfm, PKfonts/*.pk
------------------------------------------------------------------------
-Prepare tex-fpc to run both METAFONT (mk_MF_dir) and TeX (mk_TeX_dir)
-and run the shell script MFT/plainfonts from there.
+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.
Check the file trouble that might contain commands that failed.
6. Make plain.fmt lib/plain.tex --> TeXformats/plain.fmt
------------------------------------------------------------------------
-Copy lib/hyphen.tex to TeXinputs and go to the directory tex-fpc/tex
+Copy lib/hyphen.tex to TeXinputs and go to the directory tex
to build plain.fmt.
This command line will do
initex ../lib/plain \\dump # one backslash is consumend by sh!
@@ -305,12 +360,9 @@ Move plain.fmt to TeXformats.
7. Finally build tex tex.web, tex.ch --> tex
------------------------------------------------------------------------
-Change tex.ch for production, and build it with tgl.
+Activate the initex-change block in tex.ch and build it with tgl.
-Enjoy,
-Wolfgang Helbig, Programmierer
+Happy weaving and happy type setting with your system!
+Wolfgang Helbig,
Comments welcome: helbig@mailbox.org
-
-TeX is a trademark of the American Mathematical Society.
-METAFONT is a trademark of Addison Wesley Publishing Company.