diff options
author | Karl Berry <karl@freefriends.org> | 2021-08-12 20:34:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-08-12 20:34:12 +0000 |
commit | ea6b1ea556ba4cbf5e9ce9f754cc1c0da64c5b36 (patch) | |
tree | bdef1c466fe25fb87ece0e7dcbf33174f4faac64 /Master/texmf-dist/doc/plain | |
parent | 799a3a5a066d1ee7c54b070ed42a8979cf87de7c (diff) |
pwebmac (12aug21)
git-svn-id: svn://tug.org/texlive/trunk@60229 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/plain')
-rw-r--r-- | Master/texmf-dist/doc/plain/pwebmac/README.md | 12 | ||||
-rw-r--r-- | Master/texmf-dist/doc/plain/pwebmac/index.md | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/plain/pwebmac/makeall | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/plain/pwebmac/webman.ch | 171 |
4 files changed, 182 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/plain/pwebmac/README.md b/Master/texmf-dist/doc/plain/pwebmac/README.md index 59d5e38f990..030376e19d1 100644 --- a/Master/texmf-dist/doc/plain/pwebmac/README.md +++ b/Master/texmf-dist/doc/plain/pwebmac/README.md @@ -3,11 +3,11 @@ The original [WEB](https://ctan.org/pkg/web) system by Donald Knuth has the macros `webmac.tex` that produce DVI output only; for historic reasons, it will never be modified (apart from catastrophic errors). -Hàn Thế Thành has modified these macros in his (outdated?) `pdfwebmac.tex` for +Hàn Thế Thành has extended these macros in his (outdated?) `pdfwebmac.tex` for PDF output (only) with [pdfTeX](https://ctan.org/pkg/pdftex). Jonathan Kew's [XeTeX](https://ctan.org/pkg/xetex) has similar macros -`xewebmac.tex` by Khaled Hosny that _modify_ `webmac.tex` for PDF output; -these macros can only be used with a specific “TeX engine” each. +`xewebmac.tex` by Khaled Hosny that include and _modify_ `webmac.tex` for PDF +output; all these macros can only be used with a specific “TeX engine” each. The present `pwebmac` package integrates these three WEB macro files similar to `cwebmac.tex` in Silvio Levy's and Don Knuth's @@ -18,8 +18,8 @@ Its initial application is the production of PDF files for all major WEB programs for “TeX and friends” as distributed in [TeX Live](https://www.tug.org/texlive). For this purpose, the shell script `makeall` was whipped together; it provides various commandline options and -works around several “quirks” in the WEB sources. The resulting ``PDF -library'' can be browsed in the `knuth-pdf` package. +works around several “quirks” in the WEB sources. The resulting collection +of PDF documents can be browsed in the `knuth-pdf` package. WEB programmers who want to use `pwebmac.tex` instead of the default `webmac.tex` in their programs have to change the first line in the TeX file @@ -30,4 +30,4 @@ clickable links and bookmarks (depending on your PDF viewer). The `pwebmac` package is free software and may be used without constraints. -This is version “4.6.2” of the `pwebmac` package — 2021-03-17, Andreas Scherer. +This is version “4.6.3” of the `pwebmac` package — 2021-08-12, Andreas Scherer. diff --git a/Master/texmf-dist/doc/plain/pwebmac/index.md b/Master/texmf-dist/doc/plain/pwebmac/index.md index 1554700c7d2..0c9accb73ef 100644 --- a/Master/texmf-dist/doc/plain/pwebmac/index.md +++ b/Master/texmf-dist/doc/plain/pwebmac/index.md @@ -14,9 +14,9 @@ Welcome to “All Things `WEB`” in “\TeX\ Live.” Here you find the documented source code of all major `WEB` and `CWEB` programs in readable format. The “named” entries represent the unmodified base sources as written by their respective authors, the attached “`chg`” links point to -“only the changed sections (or modules)” as applied for release in the “\TeX\ -Live” distribution, so you may want to study these pairs in parallel. Care has -been taken to keep the section numbers for the main parts intact. +“only the changed sections (or modules)” as applied for release in the +“\TeX\ Live” distribution, so you may want to study these pairs in parallel. +Care has been taken to keep the section numbers for the main parts intact. Although not all the programs presented here are written or maintained by Donald Knuth, it is more convenient for everything to be collected in one place diff --git a/Master/texmf-dist/doc/plain/pwebmac/makeall b/Master/texmf-dist/doc/plain/pwebmac/makeall index 5f817ea2425..08347f321ea 100644 --- a/Master/texmf-dist/doc/plain/pwebmac/makeall +++ b/Master/texmf-dist/doc/plain/pwebmac/makeall @@ -174,6 +174,8 @@ FI r texmf-pdf.patch }" $f.tex + $SED_I -e "s/{\\\\the\\\\pageno}}}\\\\next/{\\\\the\\\\pageno}{\\\\the\\\\toksE}}}\\\\next/" $f.tex + cat > texmf-pdf.patch << FI \ifpdf\special{pdf: outline 0 << /Title (\the\toksE) /Dest [ @thispage /FitH @ypos ] >>}\fi diff --git a/Master/texmf-dist/doc/plain/pwebmac/webman.ch b/Master/texmf-dist/doc/plain/pwebmac/webman.ch index af8b2e88ff2..074af792e77 100644 --- a/Master/texmf-dist/doc/plain/pwebmac/webman.ch +++ b/Master/texmf-dist/doc/plain/pwebmac/webman.ch @@ -121,6 +121,12 @@ This excerpt from \.{WEAVE.WEB} produced modules 55--59 in \pdfURL{Appendix~D}{weave.pdf}. @z +@x l.1050 +ASCII codes is $c_1c_2\ldots c_m$, its hash value will be +@y +ASCII codes is $c_1c_2\ldots c_n$, its hash value will be +@z + @x l.1061 \section Appendix B. This excerpt from \.{WEAVE.TEX} corresponds to Appendix A. @@ -130,6 +136,18 @@ This excerpt from \.{WEAVE.TEX} corresponds to Appendix A. This excerpt from \.{WEAVE.TEX} corresponds to \Appendix A. @z +@x l.1129 +ASCII codes is $c_1c_2\ldots c_m$, its hash value will be +@y +ASCII codes is $c_1c_2\ldots c_n$, its hash value will be +@z + +@x l.1139 +\U section~58.\fi +@y +\U58.\fi +@z + @x l.1143 \section Appendix C. @y @@ -137,6 +155,153 @@ This excerpt from \.{WEAVE.TEX} corresponds to \Appendix A. \section Appendix C. @z +@x l.1149 +those lines. There are 1559 lines in all; the notation +@y +those lines. There are 1585 lines in all; the notation +@z + +@x l.1158 +{2:}{4:}{$C-,A+,D-}{[$C+,D+]}{:4} +PROGRAM WEAVE(WEBFILE,CHANGEFILE,TEXFILE);LABEL 9999;CONST{8:} +MAXBYTES=45000;MAXNAMES=5000;MAXMODULES=2000;HASHSIZE=353;BUFSIZE=100; +@y +{2:}{4:}{$C-,A+,D-}{[$C+,D+]} +{:4}PROGRAM WEAVE(WEBFILE,CHANGEFILE,TEXFILE);LABEL 9999; +CONST{8:}MAXBYTES=45000;MAXNAMES=5000;MAXMODULES=2000;HASHSIZE=353; +@z + +@x l.1162 +TOKPTR:0..MAXTOKS;{MAXTOKPTR,MAXTXTPTR:0..MAXTOKS;}{:53}{55:} +IDFIRST:0..LONGBUFSIZE;IDLOC:0..LONGBUFSIZE; +@y +TOKPTR:0..MAXTOKS;{MAXTOKPTR,MAXTXTPTR:0..MAXTOKS;} +{:53}{55:}IDFIRST:0..LONGBUFSIZE;IDLOC:0..LONGBUFSIZE; +@z + +@x l.1166 +PROCEDURE INITIALIZE;VAR{16:}I:0..127;{:16}{40:}WI:0..1;{:40}{56:} +H:0..HASHSIZE;{:56}{247:}C:ASCIICODE;{:247}BEGIN{10:}HISTORY:=0;{:10} +@y +{:33}PROCEDURE INITIALIZE;VAR{16:}I:0..255;{:16}{40:}WI:0..1; +{:40}{56:}H:0..HASHSIZE;{:56}{247:}C:ASCIICODE; +@z + +@x l.1169 +TOKPTR:=1;TEXTPTR:=1;TOKSTART[0]:=1;TOKSTART[1]:=1;{MAXTOKPTR:=1; +MAXTXTPTR:=1;}{:54}{57:}FOR H:=0 TO HASHSIZE-1 DO HASH[H]:=0;{:57}{94:} +SCANNINGHEX:=FALSE;{:94}{102:}MODTEXT[0]:=32;{:102}{124:}OUTPTR:=1; +@y +{MAXTOKPTR:=1;MAXTXTPTR:=1;} +{:54}{57:}FOR H:=0 TO HASHSIZE-1 DO HASH[H]:=0; +{:57}{94:}SCANNINGHEX:=FALSE;{:94}{102:}MODTEXT[0]:=32; +@z + +@x l.1173 +IF R=0 THEN XREF[P]:=XREFPTR ELSE XMEM[R].XLINKFIELD:=XREFPTR;END;{:51} +{58:}FUNCTION IDLOOKUP(T:EIGHTBITS):NAMEPOINTER;LABEL 31; +@y +IF R=0 THEN XREF[P]:=XREFPTR ELSE XMEM[R].XLINKFIELD:=XREFPTR;END; +{:51}{58:}FUNCTION IDLOOKUP(T:EIGHTBITS):NAMEPOINTER;LABEL 31; +@z + +@x l.1176 +L:0..LONGBUFSIZE;P:NAMEPOINTER;BEGIN L:=IDLOC-IDFIRST;{59:} +H:=BUFFER[IDFIRST];I:=IDFIRST+1; +@y +L:0..LONGBUFSIZE;P:NAMEPOINTER;BEGIN L:=IDLOC-IDFIRST; +{59:}H:=BUFFER[IDFIRST];I:=IDFIRST+1; +@z + +@x l.1184 +LINK[P]:=HASH[H];HASH[H]:=P;31:{:60};IF P=NAMEPTR THEN{62:} +BEGIN W:=NAMEPTR MOD 2; +@y +LINK[P]:=HASH[H];HASH[H]:=P;31:{:60}; +IF P=NAMEPTR THEN{62:}BEGIN W:=NAMEPTR MOD 2; +@z + +@x l.1194 +XREF[P]:=0;END{:62};IDLOOKUP:=P;END;{:58}{66:} +FUNCTION MODLOOKUP(L:SIXTEENBITS):NAMEPOINTER;LABEL 31;VAR C:0..4; +@y +XREF[P]:=0;END{:62};IDLOOKUP:=P;END; +{:58}{66:}FUNCTION MODLOOKUP(L:SIXTEENBITS):NAMEPOINTER;LABEL 31; +@z + +@x l.1208 +\verbatim +@y +\begingroup \def\tt{\ninett} \baselineskip10pt +\verbatim +@z + +@x l.1210 +\xdef\fmtversion{\fmtversion+WEBMAC4.0} % identifies current set of macros +@y +\xdef\fmtversion{\fmtversion+WEBMAC4.2} % identifies current set of macros +@z + +@x l.1218 +\font\tentex=cmtex10 % TeX extended character set (used in strings) +@y +\font\tentex=cmtex10 % TeX extended character set (used in strings) +\fontdimen7\tentex=0pt % no extra space after punctuation +@z + +@x l.1294 + {\xdef\modstar{#1}\let\*=\empty\xdef\modno{#1}} + \ifx\modno\modstar \onmaybe \else\ontrue \fi \mark{\modno}} +@y + {\xdef\modstar{#1}\let\*=\empty\xdef\modno{#1}}% remove \* from section name + \ifx\modno\modstar \onmaybe \else\ontrue \fi + \mark{{{\tensy x}\modno}{\rhead}}} + % each \mark is {section reference or null}{group title} +@z + +@x l.1325 +\def\lheader{\mainfont\the\pageno\eightrm\qquad\rhead\hfill\title\qquad + \tensy x\mainfont\topmark} % top line on left-hand pages +\def\rheader{\tensy x\mainfont\topmark\eightrm\qquad\title\hfill\rhead + \qquad\mainfont\the\pageno} % top line on right-hand pages +@y +\def\lheader{\mainfont\the\pageno\eightrm\qquad\rhead + \hfill\title\qquad\mainfont\topsecno} % top line on left-hand pages +\def\rheader{\mainfont\topsecno\eightrm\qquad\title\hfill + \rhead\qquad\mainfont\the\pageno} % top line on right-hand pages +\def\topsecno{\expandafter\takeone\topmark} +\def\takeone#1#2{#1} +\def\taketwo#1#2{#2} +\def\nullsec{\eightrm\kern-2em} % the \kern-2em cancels \qquad in headers +@z + +@x l.1336 +\def\rhead{\.{WEB} OUTPUT} % this running head is reset by starred sections +@y +\def\rhead{\.{WEB} OUTPUT} % this running head is reset by starred sections +\mark{\noexpand\nullsec{\rhead}} +@z + +@x l.1392 + \def\rhead{NAMES OF THE SECTIONS} +@y + \def\rhead{NAMES OF THE SECTIONS} + \let\topsecno=\nullsec +@z + +@x l.1395 + \def\note##1##2.{\hfil\penalty-1\hfilneg\quad{\eightrm##1 ##2.}} +@y + \def\note##1##2.{\hfil\penalty-1\hfilneg\quad{\eightrm##1~##2.}} +@z + +@x l.1414 +?endgroup +@y +?endgroup +\endgroup +@z + @x l.1425 in small caps. For example, Appendix~D was produced after saying @y @@ -172,6 +337,12 @@ dependencies'' in the index of \pdfURL{Appendix~E}{tangle.pdf} above, and figure out what changes @z +@x l.1592 +first change files; then you can sure that your compiler will handle +@y +first change files; then you can be sure that your compiler will handle +@z + @x l.1609 the index to Appendix~D. @y |