summaryrefslogtreecommitdiff
path: root/systems/unix
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-02-16 03:01:00 +0000
committerNorbert Preining <norbert@preining.info>2021-02-16 03:01:00 +0000
commit6893799c8c61ef6b96a867686642fc0d813adab1 (patch)
tree52b02c7dadffbded19a10c564d430eb4406100cd /systems/unix
parent8fb1cfd3d240ef62d78c2320bd90f8f07b7916fa (diff)
CTAN sync 202102160300
Diffstat (limited to 'systems/unix')
-rwxr-xr-xsystems/unix/tex-fpc/MFT/logmacfonts2
-rwxr-xr-xsystems/unix/tex-fpc/MFT/manfonts4
-rwxr-xr-xsystems/unix/tex-fpc/MFT/mfwebfonts2
-rwxr-xr-xsystems/unix/tex-fpc/MFT/plainfonts5
-rwxr-xr-xsystems/unix/tex-fpc/MFT/tripmanfonts2
-rwxr-xr-xsystems/unix/tex-fpc/MFT/webfonts2
-rw-r--r--systems/unix/tex-fpc/README182
-rw-r--r--systems/unix/tex-fpc/dvips/Makefile2
-rw-r--r--systems/unix/tex-fpc/dvips/README3
-rw-r--r--systems/unix/tex-fpc/dvips/dvipsmanfonts2
-rw-r--r--systems/unix/tex-fpc/dvitype.ch4
-rw-r--r--systems/unix/tex-fpc/gftopk.ch4
-rw-r--r--systems/unix/tex-fpc/gftype.ch2
-rw-r--r--systems/unix/tex-fpc/history18
-rw-r--r--systems/unix/tex-fpc/license11
-rw-r--r--systems/unix/tex-fpc/local.mf4
-rw-r--r--systems/unix/tex-fpc/mf.ch121
-rwxr-xr-xsystems/unix/tex-fpc/shell/mkfont9
-rw-r--r--systems/unix/tex-fpc/tangle.ch6
-rw-r--r--systems/unix/tex-fpc/tangle.p20
-rw-r--r--systems/unix/tex-fpc/tex-fpc.pdfbin610582 -> 189125 bytes
-rw-r--r--systems/unix/tex-fpc/tex.ch184
-rw-r--r--systems/unix/tex-fpc/trap/report22
-rw-r--r--systems/unix/tex-fpc/trip/diff_trip.fot4
-rw-r--r--systems/unix/tex-fpc/trip/diff_trip.log16
-rw-r--r--systems/unix/tex-fpc/trip/diff_trip.typ8
-rw-r--r--systems/unix/tex-fpc/trip/diff_tripin.log18
-rw-r--r--systems/unix/tex-fpc/trip/report46
-rw-r--r--systems/unix/tex-fpc/weave.ch17
-rw-r--r--systems/unix/tex-fpc/webmac-fpc.tex2
-rw-r--r--systems/unix/tex-fpc/xdvi/README5
31 files changed, 358 insertions, 369 deletions
diff --git a/systems/unix/tex-fpc/MFT/logmacfonts b/systems/unix/tex-fpc/MFT/logmacfonts
index 24c12db460..3c6326f544 100755
--- a/systems/unix/tex-fpc/MFT/logmacfonts
+++ b/systems/unix/tex-fpc/MFT/logmacfonts
@@ -1,3 +1,3 @@
-# fonts for logmac
+# create .tfm files for logmac
mkfont cmsltt9
mkfont logosl9
diff --git a/systems/unix/tex-fpc/MFT/manfonts b/systems/unix/tex-fpc/MFT/manfonts
index ba37849e82..cd84126c14 100755
--- a/systems/unix/tex-fpc/MFT/manfonts
+++ b/systems/unix/tex-fpc/MFT/manfonts
@@ -1,9 +1,9 @@
+# This script creates and installs .tfm files for the TeX/MF books.
mkfont cmtex10
mkfont cmssi9
mkfont cminch
mkfont cmssdc10 4
-mkpkfont cmr5 2
mkfont cmman # font used for miscellaneous Computer Modern variations
- # from ctan:/systems/knuth/local/mf/cmman.mf
+ # from ctan:/systems/knuth/local/mf/cmman.mf
mkfont random # from ctan:/systems/knuth/local/lib/random.mf
mkfont cmss9
diff --git a/systems/unix/tex-fpc/MFT/mfwebfonts b/systems/unix/tex-fpc/MFT/mfwebfonts
index a66d9a6be8..c9dfdf854a 100755
--- a/systems/unix/tex-fpc/MFT/mfwebfonts
+++ b/systems/unix/tex-fpc/MFT/mfwebfonts
@@ -1,4 +1,4 @@
-# fonts used by mf.web
+# create and install .tfm fonts used by mf.web
mkfont logo10 # font used for the METAFONT logo
mkfont logosl10
mkfont logo8
diff --git a/systems/unix/tex-fpc/MFT/plainfonts b/systems/unix/tex-fpc/MFT/plainfonts
index d2d18bd490..b7f25e8f55 100755
--- a/systems/unix/tex-fpc/MFT/plainfonts
+++ b/systems/unix/tex-fpc/MFT/plainfonts
@@ -1,4 +1,4 @@
-# This script builds and installs .tfm and .pk fonts for plain.tex.
+# create and install .tfm files for plain.tex.
rm -f trouble # clean list of trouble makeing fonts
mkfont cmr10 # roman text
mkfont cmr9
@@ -46,7 +46,4 @@ mkfont cmbsy10 # bold math symbols
mkfont cmcsc10 # caps and small caps
mkfont cmssbx10 # sans serif bold extended
mkfont cmdunh10 # Dunhill style
-mkpkfont cmr7 magstep4 # for titles
-mkpkfont cmtt10 magstep2
-mkpkfont cmssbx10 magstep2
mkfont manfnt # METAFONT logo and dragon curve and special symbols
diff --git a/systems/unix/tex-fpc/MFT/tripmanfonts b/systems/unix/tex-fpc/MFT/tripmanfonts
deleted file mode 100755
index 1d4e4356c4..0000000000
--- a/systems/unix/tex-fpc/MFT/tripmanfonts
+++ /dev/null
@@ -1,2 +0,0 @@
-# font for tripman
-mkpkfont cmr7 magstep5 # for titles
diff --git a/systems/unix/tex-fpc/MFT/webfonts b/systems/unix/tex-fpc/MFT/webfonts
index 86676e2c70..a089db2772 100755
--- a/systems/unix/tex-fpc/MFT/webfonts
+++ b/systems/unix/tex-fpc/MFT/webfonts
@@ -1,2 +1,2 @@
-# fonts for the web macros
+# create and install font for the web macros
mkfont cmtex10
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
diff --git a/systems/unix/tex-fpc/dvips/Makefile b/systems/unix/tex-fpc/dvips/Makefile
index cbdf300d17..05c6431438 100644
--- a/systems/unix/tex-fpc/dvips/Makefile
+++ b/systems/unix/tex-fpc/dvips/Makefile
@@ -1,6 +1,6 @@
#
# Makefile for dvips. Edit this first part of the file.
-# Adapted to TeX-GPC in Aug. 2008.
+# Adapted to TeX-FPC in Jan. 2019.
#
# First, the things that absolutely must be edited for your system.
# Please, don't forget to edit MakeTeXPK in the same way!
diff --git a/systems/unix/tex-fpc/dvips/README b/systems/unix/tex-fpc/dvips/README
index 06119ad5e1..6425406d8d 100644
--- a/systems/unix/tex-fpc/dvips/README
+++ b/systems/unix/tex-fpc/dvips/README
@@ -16,6 +16,9 @@ See xdvi/README for hints on the man directory.
Create a master directory DVIPSconf if you haven't done so already, goto
dvips576/dvips, run mk_TeX_dir, mk_MF_dir, and make install.
+Build and install the program mfware/gftopk. This program is called
+by MakeTeXPK to create bitmap fonts .nnnpk on demand.
+
Edit DVIPSconf/config.ps to reflect paper size and resolution of
your printer. To make dvips generate missing .pk fonts automatically,
the resolutions in config.ps and in the mf mode "localfont" must
diff --git a/systems/unix/tex-fpc/dvips/dvipsmanfonts b/systems/unix/tex-fpc/dvips/dvipsmanfonts
index aa55b0d360..44cd73544c 100644
--- a/systems/unix/tex-fpc/dvips/dvipsmanfonts
+++ b/systems/unix/tex-fpc/dvips/dvipsmanfonts
@@ -1,4 +1,6 @@
# This script builds and installs .pk fonts for dvips.tex
+# you do not need to run it, since dvips will call MakeTeXPK to generate
+# and install .pk fonts on demand.
rm -f trouble # clean list of trouble makeing fonts
mkpkfont logo10 magstep0.5
mkpkfont cminch magstep0.5
diff --git a/systems/unix/tex-fpc/dvitype.ch b/systems/unix/tex-fpc/dvitype.ch
index 7216ae63e0..bcd7d95a81 100644
--- a/systems/unix/tex-fpc/dvitype.ch
+++ b/systems/unix/tex-fpc/dvitype.ch
@@ -1,4 +1,4 @@
-This is a change file of DVItype for FPC, Wolfgang Helbig, Oct. 2020
+This is a change file of DVItype for FPC, Wolfgang Helbig, Oct. 2020 - Jan 2021
[0] About DVItype-FPC
@x
@@ -31,7 +31,7 @@ Comments and questions are welcome!
@x
@d banner=='This is DVItype, Version 3.6' {printed when the program starts}
@y
-@d banner=='This is DVItype-FPC, 2nd ed.' {printed when the program starts}
+@d banner=='This is DVItype-FPC, 3rd ed.' {printed when the program starts}
@z
[2] othercases
diff --git a/systems/unix/tex-fpc/gftopk.ch b/systems/unix/tex-fpc/gftopk.ch
index 2732b87db7..38a66fd4a0 100644
--- a/systems/unix/tex-fpc/gftopk.ch
+++ b/systems/unix/tex-fpc/gftopk.ch
@@ -1,4 +1,4 @@
-This is a change file of GFtoPK for FPC, Wolfgang Helbig, Oct. 2020
+This is a change file of GFtoPK for FPC, Wolfgang Helbig, Oct. 2020 - Feb. 2021
[0] About GFtoPK-FPC
@x
@@ -32,7 +32,7 @@ Comments and questions are welcome!
@x
@d banner=='This is GFtoPK, Version 2.4' {printed when the program starts}
@y
-@d banner=='This is GFtoPK-FPC, 2nd ed.'
+@d banner=='This is GFtoPK-FPC, 3rd ed.'
{printed when the program starts}
@z
diff --git a/systems/unix/tex-fpc/gftype.ch b/systems/unix/tex-fpc/gftype.ch
index 216f9b653e..d3e01980c8 100644
--- a/systems/unix/tex-fpc/gftype.ch
+++ b/systems/unix/tex-fpc/gftype.ch
@@ -32,7 +32,7 @@ Comments and questions are welcome!
@x
@d banner=='This is GFtype, Version 3.1' {printed when the program starts}
@y
-@d banner=='This is GFtype-FPC, 2nd ed.' {printed when the program starts}
+@d banner=='This is GFtype-FPC, 3rd ed.' {printed when the program starts}
@z
[2] othercases
diff --git a/systems/unix/tex-fpc/history b/systems/unix/tex-fpc/history
index 45b9840773..29b8229088 100644
--- a/systems/unix/tex-fpc/history
+++ b/systems/unix/tex-fpc/history
@@ -63,14 +63,14 @@
2015-09-30: Update to macOS 10.11 broke GPC and therefore TeX-GPC
as well. Helpless, sad, hoping for a revival of GPC.
-2019-02-22: Emergency edition of TeX-FPC. Date fixed at 1776-07-14.
+2019-02-22: 1st edition of TeX-FPC. Date fixed at 1776-07-14.
-2019-03-04: same as above, fixing three bugs, all reported by Joachim.
+2019-03-04: fixing three bugs of 1st. edition, all reported by Joachim.
The shell script tgl tried to launch good old GPC. An
extra space in tex.ch corrupted the change file. In
- tex.ch a '\marke G' still waits to be replaced by '\marke X'.
+ tex.ch a '\marke G' waited to be replaced by '\marke X'.
-now: 2nd. edition. All features recreated! Finally arrived the state
+2020-11-25: 2nd edition. All features recreated! Finally arrived the state
of 2008-09-07. Exhausted but happy!
Igor Liferenko reported another bug in TeX: An extra space
@@ -81,13 +81,13 @@ now: 2nd. edition. All features recreated! Finally arrived the state
Realizing that TeX-FPC is the only pure Pascal distribution,
I decided that my personal preferences are not worthwhile
to clutter up TeX-FPC, since I can reinstall them
- whenever I want them. My wishes are: Don't ignore tailing
+ whenever I want them. My wishes are: Don't ignore trailing
spaces of input lines, don't ignore leading spaces of
the first input line. Don't print extra empty lines on
the terminal, when entering a file interactively. These
regressions leads us back to IBM's fixed length records
and punching cards, when the user could not control the
- length of a line or a punching card.
+ length of a line.
future: Bugs that remain to be fixed:
This one-liner loops:
@@ -96,4 +96,10 @@ future: Bugs that remain to be fixed:
Whatever you enter during error recovery, you cannot convince
TeX to forgive your faux pas and continue processing the rest
of the file.
+2021-02: 3rd edition. Will Senn and Dave Jarvis pointed out some ambiguities
+ in the README file. I'll took their comments and questions to
+ improve the wordings in the README file and some of TeX's error
+ messages.
+ The minimal installation does not care for the .pk fonts. They will
+ be created on demand by the dvi drivers. (dvips and xdvi)
diff --git a/systems/unix/tex-fpc/license b/systems/unix/tex-fpc/license
index 1783216cf9..ab23d3f7db 100644
--- a/systems/unix/tex-fpc/license
+++ b/systems/unix/tex-fpc/license
@@ -1,11 +1,16 @@
-Copyright (c) Wolfgang Helbig, All rights reserved.
+Copyright (c) 2021, Wolfgang Helbig
+All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
diff --git a/systems/unix/tex-fpc/local.mf b/systems/unix/tex-fpc/local.mf
index 491430d781..90ee274d78 100644
--- a/systems/unix/tex-fpc/local.mf
+++ b/systems/unix/tex-fpc/local.mf
@@ -14,7 +14,7 @@
mode_def lj = % HP LaserJet 1320 ProRes (1200 dpi)
proofing :=0;
fontmaking := 1;
- tracingtitels := 1;
+ tracingtitles := 1;
pixels_per_inch := 1200;
blacker := .7;
fillin := .15;
@@ -24,7 +24,7 @@ enddef;
mode_def ljfr = % HP LaserJet 1320 FastRes (600dpi)
proofing :=0;
fontmaking := 1;
- tracingtitels := 1;
+ tracingtitles := 1;
pixels_per_inch := 600;
blacker := .25;
fillin := .3;
diff --git a/systems/unix/tex-fpc/mf.ch b/systems/unix/tex-fpc/mf.ch
index 0b697ec3da..1a5a2eab18 100644
--- a/systems/unix/tex-fpc/mf.ch
+++ b/systems/unix/tex-fpc/mf.ch
@@ -13,8 +13,8 @@
\N0\*. \[0] About \namefpc.
-This is an adaption of Donald~E. Knuth's \MF, version 2.7182815
-from January 2014, to Free~Pascal (FPC) and Unix.
+This is an adaption of Donald~E. Knuth's \MF, version 2.71828182
+from January 2021, to Free~Pascal (FPC) and Unix.
The features added include treating the command line as the first
input line and invoking a system editor, in this case \.{vi}, to
@@ -36,9 +36,9 @@ Comments and questions are welcome!
[2] Change the banner line
@x
-@d banner=='This is METAFONT, Version 2.7182818' {printed when \MF\ starts}
+@d banner=='This is METAFONT, Version 2.71828182' {printed when \MF\ starts}
@y
-@d banner=='This is METAFONT-FPC, 2nd ed.' {printed when \MF\ starts}
+@d banner=='This is METAFONT-FPC, 3rd ed.' {printed when \MF\ starts}
@z
[4] terminal output and input
@@ -85,15 +85,15 @@ cursor to the @x line and enter >} or <} to (un)indent a paragraph.
@z
[7] shift left to turn on statistics, shift rigth to turn off statistics
- @x stat
- @d stat==@{ {change this to `$\\{stat}\equiv\null$' when gathering
- usage statistics}
- @d tats==@t@>@} {change this to `$\\{tats}\equiv\null$' when gathering
- usage statistics}
- @y
- @d stat== {change this to `$\\{stat}\equiv\.{@@\{}$' to turn off statistics}
- @d tats== {change this to `$\\{tats}\equiv\.{@@\}}$' to turn off statistics}
- @z
+@x stat
+@d stat==@{ {change this to `$\\{stat}\equiv\null$' when gathering
+ usage statistics}
+@d tats==@t@>@} {change this to `$\\{tats}\equiv\null$' when gathering
+ usage statistics}
+@y
+@d stat== {change this to `$\\{stat}\equiv\.{@@\{}$' to turn off statistics}
+@d tats== {change this to `$\\{tats}\equiv\.{@@\}}$' to turn off statistics}
+@z
[8] shift left to build MF and right it to build INIMF.
@x inimf
@@ -417,9 +417,17 @@ loop@+begin wake_up_terminal; write(term_out,'**'); update_terminal;
@x
else bad_pool('! I can''t read MF.POOL.')
@y
-else bad_pool('! I can''t read mf.pool.')
+else bad_pool('! I can''t read MFbases/mf.pool.')
+@z
+
+[53] tangle would'nt help, installation would
+@x
+done: if a<>@$ then bad_pool('! MF.POOL doesn''t match; TANGLE me again.');
+@y
+done: if a<>@$ then bad_pool('! MFbases/mf.pool doesn''t match. Not installed?');
@z
+
[74] start editor
@x
@!use_err_help:boolean; {should the |err_help| string be shown?}
@@ -438,14 +446,9 @@ start_edit := false; { don't start \.{vi}}
[79] set edit_cmd
@x
- begin print_nl("You want to edit file ");
-@.You want to edit file x@>
- slow_print(input_stack[file_ptr].name_field);
- print(" at line "); print_int(line);@/
interaction:=scroll_mode; jump_out;
end;
@y
- begin {save values to be passed to the system editor}
start_edit := true;
interaction:=scroll_mode; jump_out;
end;
@@ -471,10 +474,12 @@ if c="Q" then decr(selector); return;
[194] date and time
@x
@p procedure fix_date_and_time;
-begin internal[time]:=12*60*unity; {minutes since midnight}
-internal[day]:=4*unity; {fourth day of the month}
-internal[month]:=7*unity; {seventh month of the year}
-internal[year]:=1776*unity; {Anno Domini}
+begin sys_time:=12*60;
+sys_day:=4; sys_month:=7; sys_year:=1776; {self-evident truths}
+internal[time]:=sys_time*unity; {minutes since midnight}
+internal[day]:=sys_day*unity; {day of the month}
+internal[month]:=sys_month*unity; {month of the year}
+internal[year]:=sys_year*unity; {Anno Domini}
end;
@y
@p procedure fix_date_and_time;
@@ -482,11 +487,15 @@ var yy,mm,dd: word;
hh,ss,ms: word;
begin
decodedate(now,yy,mm,dd); {current date}
-internal[day] := dd*unity;
-internal[month] := mm*unity;
-internal[year] := yy*unity;@/
+sys_day := dd;
+sys_month := mm;
+sys_year := yy;
+internal[day] := sys_day*unity;
+internal[month] := sys_month*unity;
+internal[year] := sys_year*unity;@/
decodetime(now,hh,mm,ss,ms); {current time}
-internal[time] := (hh*60+mm)*unity; {minutes since midnight}
+sys_time := hh*60+mm; {minutes since midnight}
+internal[time] := sys_time*unity; {minutes since midnight}
end;
@z
@@ -535,15 +544,15 @@ int(4096))|, and |abs(int(a+b-4096))| will throw an overflow exception.
@z
[679] spurious empty line on terminal
- @x chatty
- print_ln; first:=start;
- prompt_input("*"); {input on-line into |buffer|}
- @y
- @.Please type...@>
- print_nl("");
- first:=start; {avoid empty lines on terminal and log file}
- prompt_input("*"); {input on-line into |buffer|}
- @z
+@x chatty
+ print_ln; first:=start;
+ prompt_input("*"); {input on-line into |buffer|}
+@y
+@.Please type...@>
+ print_nl("");
+ first:=start; {avoid empty lines on terminal and log file}
+ prompt_input("*"); {input on-line into |buffer|}
+@z
[769] Path separator in Unix
@x
@@ -561,27 +570,9 @@ else begin if c="/" then
[774]
@x
-@d append_to_name(#)==begin c:=#; incr(k);
-@y
-@d fpc_set_length==s@&e@&t@&l@&e@&n@&g@&t@&h
-@d append_to_name(#)==begin c:=#; incr(k);
-@z
-
-[774]
-@x
-@!j:pool_pointer; {index into |str_pool|}
-@y
-@!j:pool_pointer; {index into |str_pool|}
-rbs: fpc_string;
-@z
-
-[774]
-@x
for k:=name_length+1 to file_name_size do name_of_file[k]:=' ';
@y
-rbs := name_of_file;
-fpc_set_length(rbs, name_length);
-name_of_file := rbs;
+for k:=name_length+1 to file_name_size do name_of_file[k]:=chr(0);
@z
[776]
@@ -593,19 +584,16 @@ MF_base_default:='MFbases/plain.base';
[778]
@x
-@!j:integer; {index into |buffer| or |MF_base_default|}
+for k:=name_length+1 to file_name_size do name_of_file[k]:=' ';
@y
-@!j:integer; {index into |buffer| or |MF_base_default|}
-rbs: fpc_string;
+for k:=name_length+1 to file_name_size do name_of_file[k]:=chr(0);
@z
-[778]
+[779] report the file you can't read
@x
-for k:=name_length+1 to file_name_size do name_of_file[k]:=' ';
+ wterm_ln('I can''t find the PLAIN base file!');
@y
-rbs := name_of_file;
-fpc_set_length(rbs, name_length);
-name_of_file := rbs;
+ wterm_ln('I can''t find MFbases/plain.base!');
@z
[786]
@@ -617,7 +605,7 @@ print_nl("Please type another "); print(s); print(" or Control-D");
[793] name might be needed to be passed to vi
@x
-if name=str_ptr-1 then {we can conserve string pool space now}
+if name=str_ptr-1 then {conserve string pool space (but see note above)}
begin flush_string(name); name:=cur_name;
end;
@y
@@ -766,11 +754,6 @@ begin
line_arg := chr(0);
iv
@#
- ed
- selector := term_only;
- write('You want to edit at line '); print(s); print_ln;
- de
- @#
selector := sel;
j := str_start[edit_file];
l := length(edit_file);
diff --git a/systems/unix/tex-fpc/shell/mkfont b/systems/unix/tex-fpc/shell/mkfont
index 34b2eb7849..735ca9ad6f 100755
--- a/systems/unix/tex-fpc/shell/mkfont
+++ b/systems/unix/tex-fpc/shell/mkfont
@@ -1,4 +1,4 @@
-# Install .tfm and . pk files from .mf files for TeX-FPC
+# Install .tfm files from .mf files for TeX-FPC
f=`basename $1 .mf`
case $# in
1) mag=1;;
@@ -6,9 +6,8 @@ case $# in
*) echo Usage: $0 mf-file [ magnification ]; exit 1
esac
rm -f $f.*gf
-mf "\\mode=localfont; mag=$mag; batchmode; input $1"\
-&& gftopk $f.*gf `echo $f.*gf | sed 's/gf$/pk/'` \
-&& mv $f.*pk PKfonts/ \
+mf "\\mode=localfont; batchmode; input $1"\
&& mv $f.tfm TeXfonts/ \
&& rm $f.log && rm $f.*gf \
-|| echo $0 $1 $mag >>trouble
+&& echo $1.tfm installed \
+|| (echo $0 $1 $mag >>trouble; echo $f failed, see file trouble)
diff --git a/systems/unix/tex-fpc/tangle.ch b/systems/unix/tex-fpc/tangle.ch
index ee73c2a3c8..661dcd49bb 100644
--- a/systems/unix/tex-fpc/tangle.ch
+++ b/systems/unix/tex-fpc/tangle.ch
@@ -1,4 +1,4 @@
-% This is a change file for TANGLE-FPC, Wolfgang Helbig, Nov. 2007
+% This is a change file for TANGLE-FPC, Wolfgang Helbig, Nov. 2007 - Jan 2021
[0] About TANGLE-FPC
@x
@@ -30,9 +30,9 @@ Comments and questions are welcome!
[1] Change the banner line
@x
-@d banner=='This is TANGLE, Version 4.5'
+@d banner=='This is TANGLE, Version 4.6'
@y
-@d banner=='This is TANGLE-FPC, 2nd ed.'
+@d banner=='This is TANGLE-FPC, 3rd ed.'
@z
[3] turn debugging on
diff --git a/systems/unix/tex-fpc/tangle.p b/systems/unix/tex-fpc/tangle.p
index a34f81d7dd..cc0d9b7ad3 100644
--- a/systems/unix/tex-fpc/tangle.p
+++ b/systems/unix/tex-fpc/tangle.p
@@ -1,5 +1,5 @@
{2:}{4:}{$MODE ISO}{$Q+}{$R+}{:4}PROGRAM TANGLE(OUTPUT);LABEL 9999;
-CONST{8:}BUFSIZE=100;MAXBYTES=45000;MAXTOKS=50000;MAXNAMES=4000;
+CONST{8:}BUFSIZE=100;MAXBYTES=45000;MAXTOKS=65000;MAXNAMES=4000;
MAXTEXTS=2000;HASHSIZE=353;LONGESTNAME=400;LINELENGTH=72;OUTBUFSIZE=144;
STACKSIZE=50;MAXIDLENGTH=12;UNAMBIGLENGT=7;
{:8}TYPE{11:}ASCIICODE=0..255;{:11}{12:}TEXTFILE=TEXT;
@@ -502,9 +502,9 @@ END ELSE IF BUFFER[1]=122 THEN BEGIN PRIMETHECHAN;
CHANGING:=NOT CHANGING;TEMPLINE:=OTHERLINE;OTHERLINE:=LINE;
LINE:=TEMPLINE;END;END;END{:137};
IF NOT CHANGING THEN BEGIN{136:}BEGIN LINE:=LINE+1;
-IF NOT INPUTLN(WEBFILE)THEN INPUTHASENDE:=TRUE ELSE IF LIMIT=CHANGELIMIT
-THEN IF BUFFER[0]=CHANGEBUFFER[0]THEN IF CHANGELIMIT>0 THEN CHECKCHANGE;
-END{:136};IF CHANGING THEN GOTO 20;END;LOC:=0;BUFFER[LIMIT]:=32;END;
+IF NOT INPUTLN(WEBFILE)THEN INPUTHASENDE:=TRUE ELSE IF CHANGELIMIT>0
+THEN CHECKCHANGE;END{:136};IF CHANGING THEN GOTO 20;END;LOC:=0;
+BUFFER[LIMIT]:=32;END;
{:135}{139:}FUNCTION CONTROLCODE(C:ASCIICODE):EIGHTBITS;
BEGIN CASE C OF 64:CONTROLCODE:=64;39:CONTROLCODE:=12;
34:CONTROLCODE:=13;36:CONTROLCODE:=125;32,9:CONTROLCODE:=136;
@@ -525,9 +525,9 @@ WHILE TRUE DO BEGIN IF LOC>LIMIT THEN BEGIN GETLINE;
IF INPUTHASENDE THEN BEGIN BEGIN WRITELN(OUTPUT);
WRITE('! Input ended in mid-comment');ERROR;END;GOTO 10;END;END;
C:=BUFFER[LOC];LOC:=LOC+1;{142:}IF C=64 THEN BEGIN C:=BUFFER[LOC];
-IF(C<>32)AND(C<>9)AND(C<>42)AND(C<>122)AND(C<>90)THEN LOC:=LOC+1 ELSE
-BEGIN BEGIN WRITELN(OUTPUT);WRITE('! Section ended in mid-comment');
-ERROR;END;LOC:=LOC-1;GOTO 10;
+IF(C<>32)AND(C<>9)AND(C<>42)THEN LOC:=LOC+1 ELSE BEGIN BEGIN WRITELN(
+OUTPUT);WRITE('! Section ended in mid-comment');ERROR;END;LOC:=LOC-1;
+GOTO 10;
END END ELSE IF(C=92)AND(BUFFER[LOC]<>64)THEN LOC:=LOC+1 ELSE IF C=123
THEN BAL:=BAL+1 ELSE IF C=125 THEN BEGIN IF BAL=0 THEN GOTO 10;
BAL:=BAL-1;END{:142};END;10:END;{:141}{145:}FUNCTION GETNEXT:EIGHTBITS;
@@ -743,11 +743,11 @@ END;10:END;}{:181}{182:}BEGIN INITIALIZE;{134:}OPENINPUT;LINE:=0;
OTHERLINE:=0;CHANGING:=TRUE;PRIMETHECHAN;CHANGING:=NOT CHANGING;
TEMPLINE:=OTHERLINE;OTHERLINE:=LINE;LINE:=TEMPLINE;LIMIT:=0;LOC:=1;
BUFFER[0]:=32;INPUTHASENDE:=FALSE;{:134};
-WRITELN(OUTPUT,'This is TANGLE-FPC, 2nd ed.');{183:}PHASEONE:=TRUE;
+WRITELN(OUTPUT,'This is TANGLE-FPC, 3rd ed.');{183:}PHASEONE:=TRUE;
MODULECOUNT:=0;REPEAT NEXTCONTROL:=SKIPAHEAD;UNTIL NEXTCONTROL=136;
WHILE NOT INPUTHASENDE DO SCANMODULE;
-{138:}IF CHANGELIMIT<>0 THEN BEGIN FOR II:=0 TO CHANGELIMIT DO BUFFER[II
-]:=CHANGEBUFFER[II];LIMIT:=CHANGELIMIT;CHANGING:=TRUE;LINE:=OTHERLINE;
+{138:}IF CHANGELIMIT<>0 THEN BEGIN FOR II:=0 TO CHANGELIMIT-1 DO BUFFER[
+II]:=CHANGEBUFFER[II];LIMIT:=CHANGELIMIT;CHANGING:=TRUE;LINE:=OTHERLINE;
LOC:=CHANGELIMIT;BEGIN WRITELN(OUTPUT);
WRITE('! Change file entry did not match');ERROR;END;END{:138};
PHASEONE:=FALSE;{:183};{FOR II:=0 TO 3 DO MAXTOKPTR[II]:=TOKPTR[II];}
diff --git a/systems/unix/tex-fpc/tex-fpc.pdf b/systems/unix/tex-fpc/tex-fpc.pdf
index d57450f062..fab992d408 100644
--- a/systems/unix/tex-fpc/tex-fpc.pdf
+++ b/systems/unix/tex-fpc/tex-fpc.pdf
Binary files differ
diff --git a/systems/unix/tex-fpc/tex.ch b/systems/unix/tex-fpc/tex.ch
index 491307d948..c6f0087062 100644
--- a/systems/unix/tex-fpc/tex.ch
+++ b/systems/unix/tex-fpc/tex.ch
@@ -1,4 +1,4 @@
-% This is a change file of TeX, Wolfgang Helbig, Nov. 2007-Nov. 2020
+% This is a change file of TeX, Wolfgang Helbig, Nov. 2007-Feb. 2021
[0] About TeX-FPC
Strangely, the first page is page 3
@@ -19,15 +19,15 @@ Strangely, the first page is page 3
\let\maybe=\iffalse % maybe -> print all, notmaybe -> print changed modules only
% put a mark in the left margin. (see Exercise 14.28 in The TeXbook)
-\def\marke#1{\strut\vadjust{\kern-\dp\strutbox\vbox to 0pt{\vss
- \llap{\bf #1\/\quad\strut}}}\ignorespaces }
+\def\marke#1{\strut\vadjust{\vbox to 0pt
+ {\vskip-\baselineskip\moveleft 2em\hbox{\bf #1\strut}\vss}}\ignorespaces}
\def\name{\TeX}
\N0\*. \[0] About \namefpc.
-\namefpc\ is an adaption of Donald~E. Knuth's \TeX82 in
-the version 3.14159265 from January 2014 to Free~Pascal (FPC) and Unix.
-To help you identify the differences of \TeX82 and
+\namefpc\ is a port of Donald~E. Knuth's typesetting program \TeX,
+version 3.141592653 from February 2021 to Free~Pascal (FPC) and Unix.
+To help you identify the differences of \TeX\ and
\namefpc, the numbers of modified modules carry an asterisk. Letters
in the left margin indicate the reason for a change. They mean:
\medskip
@@ -47,22 +47,21 @@ recovery.
new line until it reaches a nondiscardable node. This might leave
you with an empty box resulting in an \.{Underfull box} warning.
Btw, I discovered this bug while trying to prove the line breaking
-algorithm, not through by testing. In this regard, I go with Dijkstra, not
-with Knuth.
+algorithm, not while plain testing it. If you have time, prove, if
+not test.
\item{(3)} \TeX\ fails to respect end of file (Control-D) from
-terminal oinput during debug dialog.
+terminal input during debug dialog.
-\item{(3)}
-Igor Liferenko reported an extra space in the transcript file and
-a missing last line terminator on terminal output after user switched
-to \.{/batchmode} during error recovery.
+\item{(4)}
+Igor Liferenko reported an extra space in the transcript file
+after the user switched to \.{/batchmode} during error recovery.
\medskip
\item{(1)}\marke F\namefpc\ treats the command line as the first input line;
-\item{(2)}\namefpc\ starts \.{vi} if the user types `\.{E}' during
-error recovery.
+\item{(2)}\namefpc\ starts \.{ed}, the unix system editor, if the
+user types `\.{E}' during error recovery.
\item{(3)}You can interrupt \namefpc\ by typing `\.{Control-C}'.
@@ -129,7 +128,7 @@ I'd rather maintain invariants---not software.
known as `\TeX' [cf.~Stanford Computer Science report CS1027,
November 1984].
-@d banner=='This is TeX, Version 3.14159265' {printed when \TeX\ starts}
+@d banner=='This is TeX, Version 3.141592653' {printed when \TeX\ starts}
@y
known as `\TeX' [cf.~Stanford Computer Science report CS1027,
November 1984].
@@ -137,7 +136,7 @@ November 1984].
Even though \namefpc\ does not differ from \TeX\ I proudly change
the banner! And take responsibility for any error.
-@d banner=='This is TeX-FPC, 2nd ed.'
+@d banner=='This is TeX-FPC, 3rd ed.'
@z
[4] program header
@@ -150,7 +149,7 @@ the banner! And take responsibility for any error.
@d term_in==i @& n @& p @& u @& t
@d term_out==o @& u @& t @& p @& u @& t
-@d mtype==t @& y @& p @& e
+@d mtype==t@&y@&p@&e
@z
[4] program header
@@ -183,15 +182,15 @@ to the @x line and type >} or <} to (un)indent a paragraph.
@z
[7] shift left to turn stats on, right to turn them off.
- @x stats
- @d stat==@{ {change this to `$\\{stat}\equiv\null$' when gathering
- usage statistics}
- @d tats==@t@>@} {change this to `$\\{tats}\equiv\null$' when gathering
- usage statistics}
- @y
- @d stat== {change this to `$\\{stat}\equiv\.{@@\{}$' to turn off statistics}
- @d tats== {change this to `$\\{tats}\equiv\.{@@\}}$' to turn off statistics}
- @z
+@x stats
+@d stat==@{ {change this to `$\\{stat}\equiv\null$' when gathering
+ usage statistics}
+@d tats==@t@>@} {change this to `$\\{tats}\equiv\null$' when gathering
+ usage statistics}
+@y
+@d stat== {change this to `$\\{stat}\equiv\.{@@\{}$' to turn off statistics}
+@d tats== {change this to `$\\{tats}\equiv\.{@@\}}$' to turn off statistics}
+@z
[8] shift left to build TEX and right to build INITEX.
@@ -256,9 +255,9 @@ to Pascal.
@z
The changes headed by trip need to be made for the trip test suite.
- For trip activate all changeblocks with the first line @x trip.
+For trip activate all changeblocks with the first line @x trip.
- [11]
+[11]
@x trip
@!mem_max=30000; {greatest index in \TeX's internal |mem| array;
@y
@@ -638,7 +637,9 @@ while argc <= fpc_param_count do
begin
if last+1>=buf_size then
@<Report overflow of the input buffer, and abort@>;
- buffer[last] := xord[arg[cc]]; incr(last); incr(cc)
+ if xord[arg[cc]] <> invalid_code then
+ buffer[last] := xord[arg[cc]];
+ incr(last); incr(cc)
end;
if (argc <= fpc_param_count) then begin
buffer[last] := " "; incr(last) {insert a space between arguments}
@@ -695,11 +696,19 @@ loop@+begin write(term_out,'**');
get_strings_started:=false; return;
@z
-[51] TANGLE would'nt help, but update
+[51] print more sensible what you can't read
+@x
+else bad_pool('! I can''t read TEX.POOL.')
+@y
+else bad_pool('! I can''t read TeXformats/tex.pool.'){\marke u Unix file name}
+@z
+
+[53] TANGLE would'nt help. Don't guess but report what does not match.
@x
done: if a<>@$ then bad_pool('! TEX.POOL doesn''t match; TANGLE me again.');
@y
-done: if a<>@$ then bad_pool('! TeXformats/tex.pool doesn''t match.');
+done: if a<>@$ then bad_pool
+('! TeXformats/tex.pool doesn''t match. Not installed?'); {\marke u Unix file name}
@z
[79] start editor
@@ -722,22 +731,9 @@ want_edit := false; {\marke F don't start \.{ed}}
[84] set edit_cmd
@x
- begin print_nl("You want to edit file ");
-@.You want to edit file x@>
- slow_print(input_stack[base_ptr].name_field);
- print(" at line "); print_int(line);
interaction:=scroll_mode; jump_out;
- end;
@y
-@^Editor@>
- begin print_nl("You want to edit file ");
-@.You want to edit file x@>
- slow_print(input_stack[base_ptr].name_field);
- print(" at line "); print_int(line);
- interaction:=scroll_mode;
- want_edit := true;
- jump_out;
- end;
+ interaction:=scroll_mode; want_edit := true; jump_out;
@z
[86] extra space in log and missing last line terminator on terminal
@@ -745,8 +741,7 @@ want_edit := false; {\marke F don't start \.{ed}}
"Q":begin print_esc("batchmode"); decr(selector);
end;
@y
-"Q":print_esc("batchmode");
-{ \marke E don't turn off terminal now }
+"Q":print_esc("batchmode"); {\marke E don't turn off terminal now}
@z
[86] continued
@@ -806,10 +801,12 @@ macros are simplified in the obvious way when |min_quarterword=0|.
[241]
@x
@p procedure fix_date_and_time;
-begin time:=12*60; {minutes since midnight}
-day:=4; {fourth day of the month}
-month:=7; {seventh month of the year}
-year:=1776; {Anno Domini}
+begin sys_time:=12*60;
+sys_day:=4; sys_month:=7; sys_year:=1776; {self-evident truths}
+time:=sys_time; {minutes since midnight}
+day:=sys_day; {day of the month}
+month:=sys_month; {month of the year}
+year:=sys_year; {Anno Domini}
end;
@y
\marke X The functions |now|, |decodedate|, and |decodetime| are provided
@@ -828,11 +825,11 @@ var yy,mm,dd: word;
hh,ss,ms: word;
begin
fpc_decode_date(fpc_now,yy,mm,dd); {current date}
-day := dd;
-month := mm;
-year := yy;@/
+sys_day := dd; day:=sys_day;
+sys_month := mm; month:=sys_month;
+sys_year := yy; year := sys_year;@/
fpc_decode_time(fpc_now,hh,mm,ss,ms); {current time}
-time := hh*60+mm; {minutes since midnight}
+sys_time := hh*60+mm; time := sys_time; {minutes since midnight}
end;
@z
@@ -897,25 +894,11 @@ to place.
@d append_to_name(#)==begin c:=#; incr(k);
@y
-\marke X With Free~Pascal you cannot set the length of a |packed
-array|. And with Unix, it does not help to blank out the rest of
-the |array|. But assigning the |name_of_file| to an |fpc_string|,
-setting the length of the |fpc_string| and then assigning it back
-to the |name_of_file| seems to work. @^FPC Pascal@>
-
-@d fpc_set_length==s@&e@&t@&l@&e@&n@&g@&t@&h
+\marke U In Unix strings are terminated by chr(0).
@d append_to_name(#)==begin c:=#; incr(k);
@z
-[519]
-@x
-@!j:pool_pointer; {index into |str_pool|}
-@y
-@!j:pool_pointer; {index into |str_pool|}
-@!s: fpc_string;
-@z
-
[519] pack file name
@x
if k<=file_name_size then name_length:=k@+else name_length:=file_name_size;
@@ -923,9 +906,7 @@ for k:=name_length+1 to file_name_size do name_of_file[k]:=' ';
end;
@y
if k<=file_name_size then name_length:=k@+else name_length:=file_name_size;
-s := name_of_file;
-fpc_set_length(s, name_length);
-name_of_file := s;
+for k:=name_length+1 to file_name_size do name_of_file[k]:=chr(0);
end;
@z
@@ -939,18 +920,17 @@ TEX_format_default:='TeXformats/plain.fmt';
[523] packed buffered name
@x
-@!j:integer; {index into |buffer| or |TEX_format_default|}
+for k:=name_length+1 to file_name_size do name_of_file[k]:=' ';
@y
@^FPC Pascal@>
-@!j:integer; {index into |buffer| or |TEX_format_default|}
-s: fpc_string;
+for k:=name_length+1 to file_name_size do name_of_file[k]:=chr(0);
@z
-[523] packed buffered name
+[524 specify better, what you cannot read:
@x
-for k:=name_length+1 to file_name_size do name_of_file[k]:=' ';
+ wterm_ln('I can''t find the PLAIN format file!');
@y
-s := name_of_file; fpc_set_length(s, name_length); name_of_file := s;
+ wterm_ln('I can''t find TeXformats/plain.fmt!'); {\marke u Unix file name}
@z
[530] Control D will help
@@ -964,26 +944,38 @@ print_nl("Please type another "); print(s); print(" or Control-D");
@x
@ Let's turn now to the procedure that is used to initiate file reading
when an `\.{\\input}' command is being processed.
-
+Beware: For historic reasons, this code foolishly conserves a tiny bit
+of string pool space; but that can confuse the interactive `\.E' option.
+@^system dependencies@>
@y
@ Let's turn now to the procedure that is used to initiate file reading
when an `\.{\\input}' command is being processed.
+Beware: For historic reasons, this code foolishly conserves a tiny bit
+of string pool space; but that can confuse the interactive `\.E' option.
+
+\marke E In fact, it breaks the `\.E' option whenever the file to be
+edited was opened after the log file.
+In that case, the last string constructed is the name of the log file,
+otherwise, the last string constructed is the name of the input file.
+If the name of the input file is the last string constructed,
+\TeX\ strips off area and extension to conserve string
+pool space. The user is shown the base name of the file he wants
+to edit to fix a bug.
+
+Sadly, Knuth doesn't dare to fix this bug, which is known for at
+least twelve years. Are we approaching the limits of ``Literate Programming''.
+It looks beautiful but does it really help to cope with complexity?
+
@^Editor@>
@^Fix@>
-
-\marke E Keep the complete file name since it might be needed to
-be passed to the system editor.
-(\TeX82 strips off area and extension to conserve string
-pool space.)
@z
[537] never flush file name
@x
-if name=str_ptr-1 then {we can conserve string pool space now}
+if name=str_ptr-1 then {conserve string pool space (but see note above)}
begin flush_string; name:=cur_name;
end;
@y
-@^Editor@>
@z
[575] Don't check eof (fpc bug: eof off by one)
@@ -1177,9 +1169,11 @@ fpc_halt(history);
[1333] print last end-of-line marker if needed
@x
-This program doesn't bother to close the input files that may still be open.
+If |final_cleanup| is bypassed, this program doesn't bother to close
+the input files that may still be open.
@y
-This program doesn't bother to close the input files that may still be open.
+If |final_cleanup| is bypassed, this program doesn't bother to close
+the input files that may still be open.
\marke u
Terminate the last line on the terminal.
@z
@@ -1235,7 +1229,7 @@ itself will get a new section number.
@y
itself will get a new section number.
-@ \marke F If the user typed |'E'| to edit a file after confronted
+@ \marke F If the user typed \.{E} to edit a file after confronted
with an error message, \TeX\ will clean up and then call |edit|
as its last feat.
@^Editor@>
@@ -1302,15 +1296,15 @@ unit. @^unix@>
@d fpc_pchar == pchar
@d edit_file == input_stack[base_ptr].name_field
@#
-@d vi==@{ {change this to `$\\{vi}\equiv\null$' when you think \.{vi}
+@d vi== {change this to `$\\{vi}\equiv\null$' when you think \.{vi}
is the system editor}
-@d iv==@t@>@} {change this to `$\\{iv}\equiv\null$' when you think \.{vi}
+@d iv== {change this to `$\\{iv}\equiv\null$' when you think \.{vi}
is the sytem editor}
@f vi == begin
@f iv == end
-@d ed== {change this to `$\\{ed}\equiv\.{@@\{}$' when you think \.{vi}
+@d ed==@{ {change this to `$\\{ed}\equiv\.{@@\{}$' when you think \.{vi}
is the system editor}
-@d de== {change this to `$\\{de}\equiv\.{@@\}}$' when you think \.{vi}
+@d de==@} {change this to `$\\{de}\equiv\.{@@\}}$' when you think \.{vi}
is the system editor}
@f ed == begin
@f de == end
diff --git a/systems/unix/tex-fpc/trap/report b/systems/unix/tex-fpc/trap/report
index 639eccab79..47bc7b12c1 100644
--- a/systems/unix/tex-fpc/trap/report
+++ b/systems/unix/tex-fpc/trap/report
@@ -1,4 +1,5 @@
How to perform the trap test according to the trapman file.
+report of the trap test (cf. trapman)
Step 0.
Move the trap directory to the mf directory, and cd to the trap directory.
@@ -18,38 +19,29 @@ $ cd -
Step 2. run inimf
$ inimf
-This is METAFONT-FPC, 2nd ed. (INIMF)
+This is METAFONT-FPC, 3rd ed. (INIMF)
**
Please type the name of your input file or Control-D.
**\input trap
...
+mv trap.log trapin.log
+See diff_trapin.log for the differences of ../trapin.log and trapin.log
Step 3. run inimf again
$ inimf
-This is METAFONT-FPC, 2nd ed. (INIMF)
+This is METAFONT-FPC, 3rd ed. (INIMF)
** &trap trap
...
-See diff_trapin.log for the differences of ../trapin.log and trapin.log
-
-Step 4. trap.log differs from the master ../trap.log more than
-expected. Reason: Don Knuth changed the log files from the 2008
-distribution manually. He didn't want to wait for a reference installation
-of TeX and friends. He could have taken a slightly modified TeX-GPC!
-But from 2008 to 2014 the one and only change in mf resulted in
-changed addresses of the capsules. Which are not harmful. I undid
-the change of the 2014 distribution and voila, the difference of
-the addresses was gone.
+Copy the screen output to the file ../trap.fot
See diff_trap.log for the differences of ../trap.log and trap.log
-
See diff_trap.fot for the differences of ../trap.fot and trap.fot
Step 5. Check the generic font file:
$ gftype trap.72270gf trap.typ
-This is GFtype-FPC, 2nd ed.
+This is GFtype-FPC, 3rd ed.
Mnemonic output? (default=no, ? for help): y
Pixel output? (default=yes, ? for help): y
-
See diff_trap.typ for the differences of ../trap.typ and trap.typ.
Step 6.
diff --git a/systems/unix/tex-fpc/trip/diff_trip.fot b/systems/unix/tex-fpc/trip/diff_trip.fot
index 0d141edb62..e87a1d87a4 100644
--- a/systems/unix/tex-fpc/trip/diff_trip.fot
+++ b/systems/unix/tex-fpc/trip/diff_trip.fot
@@ -1,4 +1,4 @@
1c1
-< This is TeX-FPC, 2nd ed. (INITEX)
+< This is TeX, Version 3.141592653 (INITEX)
---
-> This is TeX, Version 3.14159265 (INITEX)
+> This is TeX-FPC, 3rd ed. (INITEX)
diff --git a/systems/unix/tex-fpc/trip/diff_trip.log b/systems/unix/tex-fpc/trip/diff_trip.log
index 0a1a5f42ca..1091ee177a 100644
--- a/systems/unix/tex-fpc/trip/diff_trip.log
+++ b/systems/unix/tex-fpc/trip/diff_trip.log
@@ -1,10 +1,12 @@
1c1
-< This is TeX-FPC, 2nd ed. (preloaded format=trip 2020.11.14) 14 NOV 2020 20:58
+< This is TeX, Version 3.141592653 (preloaded format=trip 1776.7.4) 4 JUL 1776 12:00
---
-> This is TeX, Version 3.14159265 (preloaded format=trip 2014.1.7) 7 JAN 2014 09:59
-7296,7297c7296,7297
-< 49 strings out of 1676
-< 273 string characters out of 8422
+> This is TeX-FPC, 3rd ed. (preloaded format=trip 2021.2.6) 6 FEB 2021 15:02
+1838a1839
+>
+7297,7298c7298,7299
+< 47 strings out of 1674
+< 253 string characters out of 8367
---
-> 47 strings out of 1674
-> 253 string characters out of 8354
+> 49 strings out of 1673
+> 273 string characters out of 8354
diff --git a/systems/unix/tex-fpc/trip/diff_trip.typ b/systems/unix/tex-fpc/trip/diff_trip.typ
index 00ee02fdb5..39ed777eb3 100644
--- a/systems/unix/tex-fpc/trip/diff_trip.typ
+++ b/systems/unix/tex-fpc/trip/diff_trip.typ
@@ -1,8 +1,8 @@
1c1
-< This is DVItype-FPC, 2nd ed.
+< This is DVItype, Version 3.6
---
-> This is DVItype, Version 3.6
+> This is DVItype-FPC, 3rd ed.
9c9
-< ' TeX output 2020.11.14:2058'
+< ' TeX output 1776.07.04:1200'
---
-> ' TeX output 2014.01.07:0959'
+> ' TeX output 2021.02.06:1502'
diff --git a/systems/unix/tex-fpc/trip/diff_tripin.log b/systems/unix/tex-fpc/trip/diff_tripin.log
index ed7e3fec2f..63567c0aa8 100644
--- a/systems/unix/tex-fpc/trip/diff_tripin.log
+++ b/systems/unix/tex-fpc/trip/diff_tripin.log
@@ -1,14 +1,10 @@
-1,3c1,3
-< This is TeX-FPC, 2nd ed. (INITEX) 14 NOV 2020 20:09
-< **\input ../trip
-< (../trip.tex
+1c1
+< This is TeX, Version 3.141592653 (INITEX) 4 JUL 1776 12:00
---
-> This is TeX, Version 3.14159265 (INITEX) 7 JAN 2014 09:09
-> **\input trip
-> (trip.tex
+> This is TeX-FPC, 3rd ed. (INITEX) 6 FEB 2021 15:01
450,451c450,451
-< (preloaded format=trip 2020.11.14)
-< 1325 strings of total length 23584
+< (preloaded format=trip 1776.7.4)
+< 1326 strings of total length 23633
---
-> (preloaded format=trip 2014.1.7)
-> 1326 strings of total length 23646
+> (preloaded format=trip 2021.2.6)
+> 1327 strings of total length 23646
diff --git a/systems/unix/tex-fpc/trip/report b/systems/unix/tex-fpc/trip/report
index dfe6472d82..b58628b260 100644
--- a/systems/unix/tex-fpc/trip/report
+++ b/systems/unix/tex-fpc/trip/report
@@ -3,7 +3,8 @@ tripman file.
Step 0.
mv the trip directory to the tex directory, and cd to the trip directory.
-This protects the original files like trip.log to be overwritten.
+Copy the file trip.tex from the tex directory to the trip directory:
+cp ../trip.tex .
Step 1. make and test trip.tfm
$ pltotf ../trip.pl trip.tfm
@@ -25,45 +26,46 @@ $ mktrip
37493
...
$ itgl tex.web tex.ch
-This is TANGLE-FPC, 2nd ed.
+This is TANGLE-FPC, 3rd ed.
...
-(No errors were found.)
-$ mv initex ~/bin/
+
+Save initex to you bin directory:
+mv initex ~/bin/
+
$ cd -
Step 3
$ initex
-This is TeX-FPC, 2nd ed. (INITEX)
+This is TeX-FPC, 3rd ed. (INITEX)
**
Please type the name of your input file or Control-D.
-**\input ../trip
+**\input trip
...
+Save trip.log:
+$ mv trip.log tripin.log
+
+Report the differences:
+$ diff ../tripin.log tripin.log >diff_tripin.log
Step 4
-This is TeX-FPC, 2nd ed. (INITEX)
-** &trip ../trip
-(../trip.tex ##
+$ initex
+This is TeX-FPC, 3rd ed. (INITEX)
+** &trip trip
! Bad number (-7).
...
-Step 5; compare with original files:
-$ diff tripin.log ../tripin.log >mydiff_tripin.log
-... etc. for trip.log, trip.fot,
+Copy the screen output to trip.fot.
+Report the differences:
+$ diff ../trip.log trip.log >diff_trip.log
+$ diff ../trip.fot trip.fot >diff_trip.fot
Note: The files diff_.. are distributed in this directory.
-Note: I performed the trip test with two versions of initex: One compiled
-by FPC 3.0.0 and one compiled by FPC 3.2.0. They seemed to use different
-floating point implementations as the glue set differences demonstrate. See
-the file diff_trip.log300 (fpc 3.0.0) and diff_trip.log (fpc 3.2.0).
-fpc 3.2.0 seems to have the same floating point implementation as Knuth's
-implementation.
Note: I copied the terminal window to create the trip.fot. It contains
-both what I typed in and what tex printed.
+both what I typed and what tex printed.
Step 6
The file options relieves you from typing the options manually.
$ dvitype trip.dvi trip.typ <options
-This is DVItype-FPC, 2nd ed.
+This is DVItype-FPC, 3rd ed.
Output level (default=4, ? for help): Starting page (default=*): Maximum number of pages (default=1000000): Assumed device resolution in pixels per inch (default=300/1): New magnification (default=0 to keep the old one): $
-
The file diff_trip.typ contains the differences of my run to Knuth's.
-
+$ diff ../trip.typ trip.typ >diff_trip.typ
diff --git a/systems/unix/tex-fpc/weave.ch b/systems/unix/tex-fpc/weave.ch
index e476736c28..a59132fbed 100644
--- a/systems/unix/tex-fpc/weave.ch
+++ b/systems/unix/tex-fpc/weave.ch
@@ -1,7 +1,4 @@
-% This is a change file for WEAVE-FPC, Wolfgang Helbig, Nov. 2007
-% Apr. 2008 get file names from command line
-% Jul. 2008 pass the exit code
-% Jul. 2016 change from gpc to fpc
+% This is a change file for WEAVE-FPC, Wolfgang Helbig, Nov. 2007 - Feb. 2021
[0] About WEAVE-FPC
@x
\pageno=\contentspagenumber \advance\pageno by 1
@@ -11,12 +8,12 @@
\def\name{\tt WEAVE}
\tracingstats=1
-\let\maybe=\iftrue % print changed modules only.
+\let\maybe=\iffalse % print changed modules only.
\N0\*. About \namefpc.\fi
-This is an adaption of Donald~E. Knuth's \.{WEAVE}, version 4.4
-from December 2002, to Unix. \namefpc\ is based on FPC~Pascal,
-version 3.2.0.
+This is an adaption of Donald~E. Knuth's \.{WEAVE}, version 4.5
+from January 2021, to Unix. \namefpc\ is based on FPC~Pascal,
+version 3.0.0.
This program expects three file names on the command line: A
web~file (\.{.web}), a change~file (\.{.ch}), and a \TeX~file
@@ -48,9 +45,9 @@ Comments and questions are welcome!
[1] Change the banner line
@x
-@d banner=='This is WEAVE, Version 4.4'
+@d banner=='This is WEAVE, Version 4.5'
@y
-@d banner=='This is WEAVE-FPC, 2nd. ed'
+@d banner=='This is WEAVE-FPC, 3rd ed.'
@z
[2] program header
diff --git a/systems/unix/tex-fpc/webmac-fpc.tex b/systems/unix/tex-fpc/webmac-fpc.tex
index 5d1e3af2ef..b33454ed14 100644
--- a/systems/unix/tex-fpc/webmac-fpc.tex
+++ b/systems/unix/tex-fpc/webmac-fpc.tex
@@ -3,7 +3,7 @@
\def\namefpc{$\hbox{\name}{}_{\fam0 FPC}$}
\def\TeXfpc{\TeX$_{\fam0 FPC}$}
\def\address{{\parindent0pt\sl
- November 2020
+ February 2021
Wolfgang Helbig, Programmierer\hfill
diff --git a/systems/unix/tex-fpc/xdvi/README b/systems/unix/tex-fpc/xdvi/README
index 5e1c79750d..779142c2a5 100644
--- a/systems/unix/tex-fpc/xdvi/README
+++ b/systems/unix/tex-fpc/xdvi/README
@@ -35,6 +35,11 @@ Ignore the install-data error from make install.
The file $HOME/Xdvi will be read by xdvi.
An example configuration file is Xdvi.
+Install the directory mfware from Knuth's distribution in tex-fpc.
+Build and install mfware/gftopk and cp dvips/MakeTeXPK to your bin
+directory. xdvi uses these programs to create bitmap pixel fonts~.nnnpk
+on demand.
+
You might want to change /etc/man.conf to include your private man pages.
I boldly replaced the line
_default /usr/{share,X11R6,pkg,local}/man/