summaryrefslogtreecommitdiff
path: root/systems/unix
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-04-09 03:02:31 +0000
committerNorbert Preining <norbert@preining.info>2021-04-09 03:02:31 +0000
commit8ccafc1be8d24ff0c4126d40847afbedab7fc7fb (patch)
tree06fbb0b4fc6fa3865d719139f6a1f04aaa03c963 /systems/unix
parent31d38d879db092b485e49e1b7c79f96c312fd1fb (diff)
CTAN sync 202104090302
Diffstat (limited to 'systems/unix')
-rwxr-xr-xsystems/unix/tex-fpc/MFT/manfonts5
-rw-r--r--systems/unix/tex-fpc/README12
-rw-r--r--systems/unix/tex-fpc/fpcbugs2
-rw-r--r--systems/unix/tex-fpc/history4
-rw-r--r--systems/unix/tex-fpc/mf.ch19
-rw-r--r--systems/unix/tex-fpc/tex-fpc.pdfbin189125 -> 613445 bytes
-rw-r--r--systems/unix/tex-fpc/tex.ch80
-rw-r--r--systems/unix/tex-fpc/twebmac/README20
-rw-r--r--systems/unix/tex-fpc/twebmac/patch.sh92
-rw-r--r--systems/unix/tex-fpc/twebmac/report91
-rw-r--r--systems/unix/tex-fpc/weave.ch4
11 files changed, 283 insertions, 46 deletions
diff --git a/systems/unix/tex-fpc/MFT/manfonts b/systems/unix/tex-fpc/MFT/manfonts
index cd84126c14..bc3262c8b3 100755
--- a/systems/unix/tex-fpc/MFT/manfonts
+++ b/systems/unix/tex-fpc/MFT/manfonts
@@ -7,3 +7,8 @@ mkfont cmman # font used for miscellaneous Computer Modern variations
# from ctan:/systems/knuth/local/mf/cmman.mf
mkfont random # from ctan:/systems/knuth/local/lib/random.mf
mkfont cmss9
+mkfont cmbx12
+mkfont cmti12
+mkfont cmsl12
+mkfont cmmi12
+mkfont cmr12
diff --git a/systems/unix/tex-fpc/README b/systems/unix/tex-fpc/README
index 1d9cd8dcfa..96e9af8865 100644
--- a/systems/unix/tex-fpc/README
+++ b/systems/unix/tex-fpc/README
@@ -1,4 +1,4 @@
-TeX-FPC 3rd ed. 2021-02-14
+TeX-FPC 4th ed. 2021-04-08
This directory contains change files for Donald E. Knuth's suite
of TeX related programs. The change files (.ch) and Don Knuth's WEB
@@ -26,6 +26,8 @@ Likewise the directory mp for John Hobby's METAPOST.
The directory tech demonstrates how to build a TeX system that
supports the german language.
+The directory twebmac explains and fixes bugs of WEB macros.
+
And the ch.ch directory contains change files for change files.
Requirements:
@@ -38,7 +40,7 @@ I have to admit, now and then I used vi instead of ed, the Unix Standard
Editor.
If TeX-FPC doesn't work on your system, it is not Unix, not even remotely so.
-Ane version of FPC from 3.0.0 (Nov. 2015) to 3.2.0 (June 2020)
+Any 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.
@@ -267,14 +269,14 @@ Create links to the master directories in tex-fpc:
Get Knuth's source files:
------------------------
-Get some directories Knuth's distribution from
+Get some directories of 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 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.
+all compiling etc. will be done in tex-fpc and it's subdirectories.
Install the files from cm to MFinputs:
mv cm/* MFinputs
@@ -329,7 +331,7 @@ binary directory.
tex.web, tex.ch --> initex,initex.p tex.pool
--------------------------------------------
-Build the ini-programs itgl and save them as initex, resp. inimf in your
+Build the ini-programs using 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
diff --git a/systems/unix/tex-fpc/fpcbugs b/systems/unix/tex-fpc/fpcbugs
index 58162f5678..f4b07972c9 100644
--- a/systems/unix/tex-fpc/fpcbugs
+++ b/systems/unix/tex-fpc/fpcbugs
@@ -51,6 +51,6 @@ interpreter of the Pascal-p5 system, which claims to be ISO-Pascal,
since pcom, pint use only text files whose names appear in the
program header.
-TeX-FPC does not depend on one of the last to features, i. e.
+TeX-FPC does not depend on one of the last two features, i. e.
TeX-FPC's programs flush (or close) text-files always and assign
external file names always, since it is simply easier to code.
diff --git a/systems/unix/tex-fpc/history b/systems/unix/tex-fpc/history
index 29b8229088..ba8e364491 100644
--- a/systems/unix/tex-fpc/history
+++ b/systems/unix/tex-fpc/history
@@ -96,6 +96,7 @@ 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
@@ -103,3 +104,6 @@ future: Bugs that remain to be fixed:
The minimal installation does not care for the .pk fonts. They will
be created on demand by the dvi drivers. (dvips and xdvi)
+
+2021-04: 4th edition. Joachim found some typos in README and helped to
+ fix the WEB macros.
diff --git a/systems/unix/tex-fpc/mf.ch b/systems/unix/tex-fpc/mf.ch
index 1a5a2eab18..eb993dde7c 100644
--- a/systems/unix/tex-fpc/mf.ch
+++ b/systems/unix/tex-fpc/mf.ch
@@ -1,5 +1,16 @@
-% This is a change file of Metafont for FPC, Wolfgang Helbig, Nov. 2007
-[0] to print changed sections only
+% This is a change file of Metafont, Wolfgang Helbig, Nov. 2007 - Apr.2021
+@x nwebmac
+\outer\def\N#1. \[#2]#3.{\MN#1.\vfil\eject % begin starred section
+ \def\rhead{PART #2:\uppercase{#3}} % define running headline
+@y
+\outer\def\N#1. \[#2]#3.{ % begin starred section
+ {\xdef\modstar{#1}\let\*=\empty\xdef\modno{#1}}% remove \* from section name
+ \ifx\modno\modstar \onmaybe \else\ontrue \fi
+ \def\rhead{PART #2:\uppercase{#3}} % define running headline
+ \ifon\mark{{{\tensy x}\modno}{\rhead}}
+ \vfil\eject
+ \fi
+@z
@x
\def\gglob{20, 26} % this should be the next two sections of "<Global...>"
@y
@@ -7,7 +18,7 @@
\input webmac-fpc
\emergencystretch 0.5in % avoid overfull boxes
-\let\maybe=\iftrue % print changed modules only.
+\let\maybe=\iffalse % print changed modules only.
\def\name{\MF}
@@ -38,7 +49,7 @@ Comments and questions are welcome!
@x
@d banner=='This is METAFONT, Version 2.71828182' {printed when \MF\ starts}
@y
-@d banner=='This is METAFONT-FPC, 3rd ed.' {printed when \MF\ starts}
+@d banner=='This is METAFONT-FPC, 4th ed.' {printed when \MF\ starts}
@z
[4] terminal output and input
diff --git a/systems/unix/tex-fpc/tex-fpc.pdf b/systems/unix/tex-fpc/tex-fpc.pdf
index fab992d408..926dd8017b 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 c6f0087062..b191a7fe4a 100644
--- a/systems/unix/tex-fpc/tex.ch
+++ b/systems/unix/tex-fpc/tex.ch
@@ -1,6 +1,18 @@
% This is a change file of TeX, Wolfgang Helbig, Nov. 2007-Feb. 2021
[0] About TeX-FPC
+@x nwebmac
+\outer\def\N#1. \[#2]#3.{\MN#1.\vfil\eject % begin starred section
+ \def\rhead{PART #2:\uppercase{#3}} % define running headline
+@y
+\outer\def\N#1. \[#2]#3.{ % begin starred section
+ {\xdef\modstar{#1}\let\*=\empty\xdef\modno{#1}}% remove \* from section name
+ \ifx\modno\modstar \onmaybe \else\ontrue \fi
+ \def\rhead{PART #2:\uppercase{#3}} % define running headline
+ \ifon\mark{{{\tensy x}\modno}{\rhead}}
+ \vfil\eject
+ \fi
+@z
Strangely, the first page is page 3
@x
\pageno=3
@@ -136,7 +148,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, 3rd ed.'
+@d banner=='This is TeX-FPC, 4th ed.'
@z
[4] program header
@@ -674,11 +686,11 @@ loop@+begin write(term_out,'**');
@z
[37] chatty
- @x chatty
- write(term_out,'! End of file on the terminal... why?');
- @.End of file on the terminal@>
- @y
- @z
+@x chatty
+ write(term_out,'! End of file on the terminal... why?');
+@.End of file on the terminal@>
+@y
+@z
[37] hint Control-D
@x
@@ -834,30 +846,30 @@ end;
@z
[360] Don't print empty lines
- @x chatty
- @ All of the easy branches of |get_next| have now been taken care of.
- There is one more branch.
- @y
- @ All of the easy branches of |get_next| have now been taken care of.
- There is one more branch.
-
- \marke h \TeX82 ends the current line by calling |print_ln| even
- if the line is empty. This causes a spurious ugly empty line.
- Calling |print_nl("")| is smarter. It ends the current
- line only if it is not empty.
- @z
+@x chatty
+@ All of the easy branches of |get_next| have now been taken care of.
+There is one more branch.
+@y
+@ All of the easy branches of |get_next| have now been taken care of.
+There is one more branch.
- @x chatty
- if limit=start then {previous line was empty}
- print_nl("(Please type a command or say `\end')");
- @.Please type...@>
- print_ln; first:=start;
- @y
- if limit=-1 then {previous line was empty}
- print_nl("(Please type a command or say `\end')");
- @.Please type...@>
- print_nl(""); first:=start;
- @z
+\marke h \TeX82 ends the current line by calling |print_ln| even
+if the line is empty. This causes a spurious ugly empty line.
+Calling |print_nl("")| is smarter. It ends the current
+line only if it is not empty.
+@z
+
+@x chatty
+ if limit=start then {previous line was empty}
+ print_nl("(Please type a command or say `\end')");
+@.Please type...@>
+ print_ln; first:=start;
+@y
+ if limit=-1 then {previous line was empty}
+ print_nl("(Please type a command or say `\end')");
+@.Please type...@>
+ print_nl(""); first:=start;
+@z
@x [514]
|TEX_font_area|. These system area names will, of course, vary from place
@@ -1114,11 +1126,11 @@ Stop pruning at this node.
@z
[1265] empty line after change of interaction mode
- @x chatty
- begin print_ln;
- @y
- begin print_nl(""); { print new line only if current line not empty \marke h}
- @z
+@x chatty
+begin print_ln;
+@y
+begin print_nl(""); { print new line only if current line not empty \marke h}
+@z
[1327] eof is broken
@x
diff --git a/systems/unix/tex-fpc/twebmac/README b/systems/unix/tex-fpc/twebmac/README
new file mode 100644
index 0000000000..280abdbb63
--- /dev/null
+++ b/systems/unix/tex-fpc/twebmac/README
@@ -0,0 +1,20 @@
+Here is how to three bugs of the WEB macros:
+1. Excessive memory usage: TeX cannot compile tex.tex with its
+ default memory size.
+2. Module number in the header don't agree with the the first module on
+ the page.
+3. Modules starts on new pages when they shouldn't.
+
+The report describes the bugs, explains them and their fixes.
+The script patch.sh creates the file nwebmac.tex file from the original
+file TeXinputs/webmac.tex. Install nwebmac.tex in TeXinputs as webmac.tex,
+thus overwriting the original.
+
+To test the new macros cd to the tex directory, set \let\maybe=\iffalse in
+tex.ch. Then weave:
+ wve tex.web tex.ch
+It should print more than 90 pages and less than 100. Than and only then
+bug 1 and bug 3 are fixed.
+
+Happy TeXing and WEAVEing.
+Wolfgang
diff --git a/systems/unix/tex-fpc/twebmac/patch.sh b/systems/unix/tex-fpc/twebmac/patch.sh
new file mode 100644
index 0000000000..426475e155
--- /dev/null
+++ b/systems/unix/tex-fpc/twebmac/patch.sh
@@ -0,0 +1,92 @@
+ed TeXinputs/webmac.tex <<'END'
+207a
+ \let\toppart\rhead
+.
+192a
+ \let\toppart\rhead
+.
+159a
+\newif\ifdp \dptrue % writing to dummy page
+\newif\ifwp \wpfalse % writing not pending
+\edef\nextcl{}
+.
+157c
+ \ifcomp
+ \global\output{\normaloutput\page\clheader\crheader}
+ \else
+ \global\output{\normaloutput\page\lheader\rheader}
+ \fi
+}
+.
+155a
+ \global\dpfalse % not writing to dummy page
+.
+137c
+\def\rhead{WEB OUTPUT} % this running head is reset by starred sections
+\def\rrhead{WEB OUTPUT} % \rrhead and \rhead match for unchanged tex.tex
+.
+124a
+\def\toppart{\expandafter\taketwo\topmark}
+.
+123a
+% not compatible
+\def\lheader{\mainfont\the\pageno\eightrm\qquad\toppart
+ \hfill\title\qquad\mainfont\topsecno} % top line on left-hand pages
+\def\rheader{\mainfont\topsecno\eightrm\qquad\title\hfill
+ \toppart\qquad\mainfont\the\pageno} % top line on right-hand pages
+.
+122c
+\def\crheader{\mainfont\topsecno\eightrm\qquad\title\hfill
+.
+120c
+\newif\ifcomp \compfalse
+% compatible
+\def\clheader{\mainfont\the\pageno\eightrm\qquad\rhead
+.
+89,90c
+ \ifon \mark{{{\tensy x}\modno}{\rhead}}\fi}
+
+.
+87a
+ \comptrue
+.
+86c
+\def\MN#1.{\par % common code for \M, \N only called by private \N module
+.
+84d
+82a
+ \ifon\mark{{{\tensy x}\modno}{\rhead}}
+ \vfil\eject
+ \fi
+ \ifdp
+ \edef\nextcl{\nextcl\write\cont{\Z{#2}{\modno}{\the\pageno}}}
+ \wptrue
+ \else
+ \ifwp
+ \nextcl
+ \wpfalse
+ \fi
+ \edef\nextcl{\write\cont{\Z{#2}{\modno}{\the\pageno}}}\nextcl
+ % to contents file
+ \fi
+.
+79,81c
+\outer\def\M#1.{ % beginning of section
+ {\xdef\modstar{#1}\let\*=\empty\xdef\modno{#1}}
+ \ifx\modno\modstar \onmaybe \else\ontrue \fi
+ \ifon
+ \mark{{{\tensy x}\modno}{\rhead}}
+ \vfil\penalty-100\vfilneg
+ \vskip12ptminus3pt\startsection\ignorespaces
+}
+\outer\def\N#1.#2.{ % beginning of starred section
+ {\xdef\modstar{#1}\let\*=\empty\xdef\modno{#1}}% remove \* from section name
+ \ifx\modno\modstar \onmaybe \else\ontrue \fi
+.
+2c
+\xdef\fmtversion{\fmtversion+WEBMAC4.2+TeX-FPC, 4th ed.}
+ % identifies current set of macros
+\message{\fmtversion}
+.
+w nwebmac.tex
+END
diff --git a/systems/unix/tex-fpc/twebmac/report b/systems/unix/tex-fpc/twebmac/report
new file mode 100644
index 0000000000..9789534b9f
--- /dev/null
+++ b/systems/unix/tex-fpc/twebmac/report
@@ -0,0 +1,91 @@
+All bugs occur when weave prints changed modules only.
+
+bug 1: Excessive memory usage.
+reason: All modules \mark their module numbers on the current page.
+In tex.tex modules 880 to 1332 put their marks all on page 25, since
+most of these modules are unchanged. The fix is obvious: mark
+your module number only when you are going to be printed.
+
+bug 2: The module number in the header sometime differs from the first
+module on the page.
+reason: To keep it simple, we denote the four kinds of Modules with letters:
+m: unchanged unstarred Module
+n: unchanged starred Module
+M: changed unstarred Module
+N: changed starred Module
+
+The module sequence "n M", leads to the course of actions:
+1. n marks its number on page p.
+2. n \ejects p.
+3. M marks its number on page p+1
+4. M tentativly tries a page break. This break is prohibitive expensive.
+ M is still at the start of p+1.
+5. Eventually page p+1 is shipped out.
+6. The \output routine writes the last mark from the previous page as module
+ number in the header. This is the number of n.
+The fix is obvious: Don't \eject a page when you are not going to
+be printed. This way there is always some text of the previous
+module (or of the initial "\vbox to \vsize".) when it marks its
+number. If the break after the mark is performed, M will have put
+its mark on the previous page and the heading will show its number.
+If the break is not performed, there will be some text some text
+of the previous module, that is, M will not print at the start of
+the page and the heading shows correctly the number of the previous
+module.
+
+bug 3: A (nonstarred) module starts on a new page, even though there
+was enough room left for the whole module on the old page.
+The fix of bug 2 also fixes bug 3.
+
+bug 4: Some starred modules are not listed in the contents file.
+This bug is introduced by the fix of bug 2.
+This bug is triggered, when the first module of the program is starred but not
+changed.
+Writing the contents line is delayed until the current page is
+shipped out. Because only then the page number is determined. But
+the very first page, the dummy page, will never be shipped out.
+Because the dummy page is not ejected before n writes its content line, the
+write will get lost.
+The fix is obious: Maintain a flag "dp" with the meaning: "Writing
+to dummy page" and collect the lines in a macro like this:
+\ifdp
+ \edef\cline{\cline "line for this module"}
+\else
+ \edef\cline{"line for this module"}\cline
+\fi
+
+bug 5: Sometimes the heading shows the wrong part name
+The fix of bug2 introduces bug5.
+A starred module defines its part name in the macro \rhead.
+The \output-routine then displays \rhead in the heading.
+The sequence n1.p1. n2.p2 M3 N4.p3. triggers the bug: M2 is member of part p2,
+but the heading for M2 displays p3 instead of p2. That's because N4 puts p3
+in \rhead and then \ejects. The \ejected page starts with M3 but the
+\output routine includes the \rhead as defined at the time of \output.
+
+The fix is obvious: Store both the part name and the module number in
+the mark. And use both components of the mark to fill the header.
+
+bug 6: \input webmac and the say \bye. The \output will \cycle and fill your
+disk.
+The fix of bug5 triggers this bug.
+What happened? The mark (to the dummy page) is defined to contain \rhead
+and \def\rhead{\.{WEB} OUTPUT} breaks the execution of the tokenlist in
+the mark.
+
+The kludge is obvious: \def\rhead{WEB OUTPUT} saves the day. The
+\.-Macro kills the \output routine.
+
+Why and how the \. macro does its devastating deeds, you ask? Don't
+know, I answer.
+
+bug 7: weaving tex.web w/o tex.ch will give you wrong part names in the
+header, namely the one of the preceding part.
+case: N1.p1 M2 N3.p2 will display the part name WEB OUTPUT for N1.p1
+and part name p1 for N3.p2. It should show p1 and p2.
+The reason is simple: tex.tex defines a private macro \N which assumes
+the old \output routine which puts the part name via \rhead into the header.
+(See bug5)
+The fix is obvious: \NM is invoked only by the private unchanged \N of
+pure TeX or mf. This sets a flag, that controls the \output routine to
+get the part name from the topmark (not compatible) or from the \rhead.
diff --git a/systems/unix/tex-fpc/weave.ch b/systems/unix/tex-fpc/weave.ch
index a59132fbed..1e35341bc9 100644
--- a/systems/unix/tex-fpc/weave.ch
+++ b/systems/unix/tex-fpc/weave.ch
@@ -33,8 +33,8 @@ to compile its input.
These commands will do:
{\obeylines
-\indent\.{sed s/MEMMAX=30000/MEMMAX=32000/ ../tex.p >tex.p}
-\indent\.{fpc -Fasysutils,baseunix tex.p}
+\indent\.{sed s/MEMMAX=30000/MEMMAX=32000/ ../tex/tex.p >tex.p}
+\indent\.{fpc -Fasysutils,baseunix,unix tex.p}
}
\medskip