texlive[74648] Master/texmf-dist: pwebmac (16mar25)
commits+karl at tug.org
commits+karl at tug.org
Sun Mar 16 20:56:22 CET 2025
Revision: 74648
https://tug.org/svn/texlive?view=revision&revision=74648
Author: karl
Date: 2025-03-16 20:56:22 +0100 (Sun, 16 Mar 2025)
Log Message:
-----------
pwebmac (16mar25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/plain/pwebmac/README.md
trunk/Master/texmf-dist/doc/plain/pwebmac/index.md
trunk/Master/texmf-dist/doc/plain/pwebmac/makeall
trunk/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex
Added Paths:
-----------
trunk/Master/texmf-dist/doc/plain/pwebmac/webman-changes.ch
trunk/Master/texmf-dist/doc/plain/pwebmac/webman-outlines.ch
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/plain/pwebmac/webman.ch
Modified: trunk/Master/texmf-dist/doc/plain/pwebmac/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/plain/pwebmac/README.md 2025-03-16 17:23:02 UTC (rev 74647)
+++ trunk/Master/texmf-dist/doc/plain/pwebmac/README.md 2025-03-16 19:56:22 UTC (rev 74648)
@@ -38,4 +38,4 @@
The `pwebmac` package is free software and may be used without constraints.
-This is version **5.0** of the `pwebmac` package — 2024-08-12, Andreas Scherer.
+This is version **5.1** of the `pwebmac` package — 2025-03-16, Andreas Scherer.
Modified: trunk/Master/texmf-dist/doc/plain/pwebmac/index.md
===================================================================
--- trunk/Master/texmf-dist/doc/plain/pwebmac/index.md 2025-03-16 17:23:02 UTC (rev 74647)
+++ trunk/Master/texmf-dist/doc/plain/pwebmac/index.md 2025-03-16 19:56:22 UTC (rev 74648)
@@ -1,5 +1,8 @@
---
title: C/WEB programs in \TeX\ Live
+date: \today
+author: Andreas Scherer
+
colorlinks: true
filecolor: blue
urlcolor: blue
@@ -15,13 +18,13 @@
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.
+\TeX\ Live distribution, so you may want to study these pairs together.
Care has been taken to keep the section numbering 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
-for reading and searching. And they all stem from the system that Knuth
-created.
+Although not all programs presented here are written or maintained by
+Donald Knuth, it is more convenient for everything to be collected in
+one place for reading and searching. And they all stem from the system
+that Knuth created.
Note that all `WEB` programs are mogrified from Pascal code to C code before
compilation, so further modifications and amendments will occur for the real
@@ -58,12 +61,14 @@
[`PLtoTF`](texware/pltotf.pdf)+[`chg`](texware/pltotf-changes.pdf) \|
[`DVItype`](texware/dvitype.pdf)+[`chg`](texware/dvitype-changes.pdf) \]
* `web/` \[
- [`WEBMAN`](web/webman.pdf) \|
+ [`WEBMAN`](web/webman.pdf)+[`chg`](web/webman-changes.pdf)[^1] \|
[`WEAVE`](web/weave.pdf)+[`chg`](web/weave-changes.pdf) \|
[`TANGLE`](web/tangle.pdf)+[`chg`](web/tangle-changes.pdf) \|
- [`TWILL`](web/twill.pdf)[^1] \]
+ [`TWILL`](web/twill.pdf)[^2] \]
-[^1]: `TWILL` is presented here as a changed variant of `WEAVE`.
+[^1]: The changed variant of the `WEB` manual contains additional material
+ specific to the \TeX\ Live distribution.
+[^2]: `TWILL` is presented here as a changed variant of `WEAVE`.
## Complementary WEB programs by other authors
@@ -83,18 +88,22 @@
[`COMMON`](cweb/common.pdf)+[`chg`](cweb/common-changes.pdf) \|
[`CTANGLE`](cweb/ctangle.pdf)+[`chg`](cweb/ctangle-changes.pdf) \|
[`CWEAVE`](cweb/cweave.pdf)+[`chg`](cweb/cweave-changes.pdf) \|\
- [`CTWILL`](cweb/ctwill.pdf)[^2] \|
+ [`CTWILL`](cweb/ctwill.pdf)[^3] \|
[`REFSORT`](cweb/refsort.pdf)+[`chg`](cweb/refsort-changes.pdf) \|
[`TWINX`](cweb/twinx.pdf)+[`chg`](cweb/twinx-changes.pdf) \]
* `ctie/` \[ [`CTIE`](ctie/ctie.pdf)+[`chg`](ctie/ctie-changes.pdf) \]
* `tie/` \[ [`TIE`](tie/tie.pdf)+[`chg`](tie/tie-changes.pdf) \]
-* `hitex/` \[ [`HiTeX`](hitex/hitex.pdf) \]
-* `mp/` \[ [`MP`](mp/mp.pdf) \| [`MPOST`](mp/mpost.pdf) \][^3]
+* `hitex/` \[ [`HiTeX`](hitex/hitex.pdf)[^4] \]
+* `mp/` \[ [`MP`](mp/mp.pdf) \| [`MPOST`](mp/mpost.pdf) \][^5]
-[^2]: `CTWILL` is presented here in its own format with “mini-indexes” for
+[^3]: `CTWILL` is presented here in its own format with “mini-indexes” for
every two consecutive pages.
-[^3]: `MP` and `MPOST` have received quite a few changes “behind the scenes” in
+[^4]: `HiTeX` has received quite a few changes “behind the scenes” in
+ order to present it in this collection; see project
+ [`web`](https://github.com/ascherer/web) for details.
+
+[^5]: `MP` and `MPOST` have received quite a few changes “behind the scenes” in
order to present them in this collection; see project
[`mplibdir`](https://github.com/ascherer/mplibdir) for details.
@@ -117,5 +126,3 @@
* [Computers & Typesetting, 31\ January\ 2021](errata/errata.pdf)
## Happy C/WEB Programming!
-
-2024-08-11 Andreas Scherer
Modified: trunk/Master/texmf-dist/doc/plain/pwebmac/makeall
===================================================================
--- trunk/Master/texmf-dist/doc/plain/pwebmac/makeall 2025-03-16 17:23:02 UTC (rev 74647)
+++ trunk/Master/texmf-dist/doc/plain/pwebmac/makeall 2025-03-16 19:56:22 UTC (rev 74648)
@@ -36,7 +36,10 @@
TEX=tex # or 'pdftex' or 'xetex' or 'hitex' or 'luatex'
VALID=false # give 'pdftex' a chance to produce valid output
-# Extra material -- unpublished
+# Extra material for editorial improvements
+# published in https://ctan.org/pkg/pwebmac (editorsnote.tex etc.),
+# https://github.com/ascherer/web (cosmetics for HiTeX and PDFTeX),
+# and https://github.com/ascherer/mplibdir (cosmetics for MetaPost)
LOCALSTUFF=/opt/github/web
# Initial list of C/WEB sources to process, overridable with option '-f':
@@ -71,13 +74,13 @@
if [ $? -eq 0 ] # Check return code from getopt
then eval set -- $OPTS
-else echo "Failed to parse options." >&2; exit 1
+else echo 'Failed to parse options.' >&2; exit 1
fi
while true
do
case "$1" in
- -c | --changes ) CHANGES="-changes"; shift ;;
+ -c | --changes ) CHANGES='-changes'; shift ;;
-f | --files ) FILES="$2"; FILESELECT=true; shift 2 ;;
-h | --help ) usage; exit 0 ;;
-n | --new ) NEW=true; shift ;;
@@ -90,12 +93,19 @@
esac
done
-CWEAVE="cweave -f +lX +bph"
-CTWILL="ctwill -f +lpdf +bph"
-HITEX="hitex --compress"
-PAX="pax -wvzf"
-PDF=pdf # default extension for 'knuth-pdf'
-SED_I="sed -i" # non-GNU-sed requires an extra '' argument for '-i' option.
+CWEAVE='cweave -f +lX +bph'
+CTWILL='ctwill -f +lpdf +bph'
+HITEX='hitex --compress'
+PAX='pax -wvzf'
+EXT=pdf # default extension for 'knuth-pdf'
+SED_I='sed -i' # non-GNU-sed requires an extra '' argument for '-i' option.
+# Prevent '#1)' from showing up in the PDF bookmarks/outlines:
+PURGE_OUTLINES='s/\\(\([0-9a-z]\)[0-9a-z]*)/\\9{\1}/g'
+# Sorting order of new material from TEX.CH and ENCTEX2.CH
+SORT_NOS='s/\(ump \)\(a couple\)/\1\\(a)\2/
+s/\(ump \)\(constants\)/\1\\(c)\2/
+s/\(ump \)\(enc\)/\1\\(e)\2/
+s/\(ump \)\(ML\)/\1\\(m)\2/'
WEAVE=weave
XETEX=xetex
@@ -103,7 +113,7 @@
hitex ) # HINT format
CTWILL="$CTWILL +P"
TEX="$HITEX"
- PDF=hnt # default extension for 'knuth-hint'
+ EXT=hnt # default extension for 'knuth-hint'
PDFTOCFRONT=false # use 'hintview -h' to start with TOC page
VALID=false ;; # HiTeX has no command-line option '--shell-escape'
@@ -116,9 +126,9 @@
VALID=false ;;
esac
-# Valid PDF output from 'pdftex' and 'luatex': In 'pwebmac.tex' set '\countD'
+# Valid PDF output from 'pdftex' and 'luatex': In 'pwebmac.tex' set '\countNOS'
# to the actual number of @<named modules@>, not the number of all sections.
-if $VALID && { [ pdftex = "$TEX" ] || [ luatex = "$TEX" ]; }
+if $VALID
then
NEW=true # PDF output requires 'pwebmac.tex'
TEX="$TEX --shell-escape"
@@ -133,22 +143,28 @@
do
f=$(basename $f .web)
+ # Prepare local C/WEB sources
case $f in
+ vftovp ) # FIX: Sorting order of named sections
+ sed -e 's/\(Compute the \)\(|activity\)/\1\\9{a}\2/
+/\\def\\(/d' -e $PURGE_OUTLINES $KNUTHWARE/$f.web > $f.web ;; # )
+
pdftex ) # Fix several 'Overfull \hbox'es
tie -m $f.web $f.web $LOCALSTUFF/$f.ch ;;
- mp | mpost | mpmath* | mpstrings | tfmin )
- # Beautifications for MetaPost
- tie -m $f.w $f.w $LOCALSTUFF/$f.ch ;;
+ hitex | mp | mpost | mpmath* | mpstrings | tfmin )
+ # Beautifications for HiTeX and MetaPost
+ tie -m $f.w $f.w $LOCALSTUFF/$f.ch
+ $SED_I -e $PURGE_OUTLINES -e '/\\def\\(/d' $f.w ;; # )
- weave | twill )
- if [ "$HITEX" = "$TEX" ] # Fix non-constant factor
- then
- cp $KNUTHWARE/weave.web .
- $SED_I weave.web -e 's/\\the\\hsize/460pt/'
+ weave | twill ) # Fix non-constant factor
+ if [ "$HITEX" = "$TEX" ] && [ ! -f weave.web ]
+ then sed -e 's/\\the\\hsize/460pt/' \
+ $KNUTHWARE/weave.web > weave.web
fi ;;
esac
+ # Run C/WEAVE on the C/WEB sources w/o changes
if [ -n "$CHANGES" ]
then
case $f in
@@ -165,16 +181,24 @@
tie ) $CWEAVE $f $f-w2c ;;
# main WEB programs have complex change files
- tex | mf | pdftex | xetex )
+ mf | pdftex | xetex )
WEBINPUTS=.:$KNUTHWARE/../../Work//:$WEBINPUTS: \
$WEAVE $f $f-final ;;
+ tex )
+ sed -e "$SORT_NOS" $KNUTHWARE/$f.web > $f.web
+ sed -e "$SORT_NOS" $KNUTHWARE/../../Work/texk/web2c/$f-final.ch > $f-final.ch
+ WEBINPUTS=.:$WEBINPUTS $WEAVE $f $f-final ;;
+ # FIX: Sorting order of new @<Define...@> sections
+ vftovp ) WEBINPUTS=.:$WEBINPUTS $WEAVE $f $f
+ $SED_I -e $PURGE_OUTLINES $f.tex ;;
+
# all other WEB codes have singular changefiles
* ) $WEAVE $f $f ;;
esac
# only document changed modules/sections
- $SED_I $f.tex -e '/\\let\\maybe/s/\\iftrue/\\iffalse/'
+ $SED_I -e '/\\let\\maybe/s/\\iftrue/\\iffalse/' $f.tex
else # -z $CHANGES
case $f in
ctwill ) # apply tons of editorial changes to 'ctwill.w'
@@ -185,65 +209,39 @@
$CTWILL $f ;; # get decent answers
c* | refsort | twinx | tie ) $CWEAVE $f ;;
- hitex ) $CWEAVE $f || true ;; # lots of unused sections
- mp | mpost | mpmath* | mpstrings | tfmin )
+ hitex | mp | mpost | mpmath* | mpstrings | tfmin )
CWEBINPUTS=.: $CWEAVE $f ;;
twill ) WEBINPUTS=.:$WEBINPUTS \
- tie -c $f.ch weave.web weave.ch weav-$f.ch
- WEBINPUTS=.:$WEBINPUTS $WEAVE weave $f $f ;;
+ tie -c $f.ch weave.web weave.ch weav-$f.ch &&
+ $WEAVE weave $f $f ;;
- pdftex | weave ) WEBINPUTS=.:$WEBINPUTS $WEAVE $f ;;
+ pdftex | weave | vftovp )
+ WEBINPUTS=.:$WEBINPUTS $WEAVE $f ;;
* ) $WEAVE $f ;;
esac
fi # $CHANGES
- # 'pwebmac' is for WEB only; do nothing for CWEB programs
- if $NEW && echo $f | grep -v -q -E \
- '^c|refsort|twinx|tie|hitex|^mp|tfmin'
- then
- # timestamp on table-of-contents page or the first page
- case $f in
- bibtex | patgen | tangle | weave | twill )
- $SED_I $f.tex -e 's/\\def\\title{/\\datecontentspage\n&/' ;; # }
-
- mf | tex | pdftex | xetex )
- # amend '\N' redefinition for PDF outlines in
- # Metafont and TeX (also pdfTeX and XeTeX)
- # 'pwebmac' defines headers differently
- cat > texmf-pdf.sed << 'FI'
-s/\\outer\\def\\N.*{/&%/
-s/\\def\\rhead\({.*}\)/\\gtitle=\1\\MN#1.\\vfill\\eject/
-s/\\def\\title{/\\datethis\n\\emergencystretch=.1\\hsize\n&/
-FI
- # active links in PDF outlines/bookmarks
- cat > texmf-pdf.patch1 << FI
- \ifpdf{\makeoutlinetoks{[#2] #3}\outlinedone}\fi
-FI
- cat >> texmf-pdf.sed << 'FI'
-/\\outer\\def\\N/r texmf-pdf.patch1
+ case $f in
+ # amend '\N' redefinition for PDF outlines in Metafont and TeX
+ # (also pdfTeX and XeTeX); 'pwebmac' redefines the headers.
+ mf | tex | pdftex | xetex ) $NEW && $SED_I -e \
+'s/\\outer\\def\\N.*{/&%/
+/\\outer\\def\\N/a\
+ \\ifpdf{\\makeoutlinetoks{[#2] #3}\\outlinedone}\\fi
+s/\\def\\rhead/\\gtitle=/
+/\\gtitle=/a\
+ \\MN#1.\\vfill\\eject % begin starred section
s/{\\the\\pageno}/&{\\the\\toksE}/
-FI
- cat > texmf-pdf.patch2 << FI
- \ifpdflua\relax\else
- \ifpdf\special{pdf: outline 0 << /Title (\the\toksE) /Dest
- [ @thispage /FitH @ypos ] >>}\fi\fi
-FI
- cat >> texmf-pdf.sed << 'FI'
-/\\edef\\next/r texmf-pdf.patch2
-FI
- $SED_I $f.tex -f texmf-pdf.sed
- rm -f texmf-pdf.* ;;
+/\\edef\\next/a\
+ \\ifpdflua\\relax\\else\
+ \\ifpdf\\special{pdf: outline 0 << /Title (\\the\\toksE) /Dest\
+ [ @thispage /FitH @ypos ] >>}\\fi\\fi
+/\\def\\(/d' -e $PURGE_OUTLINES $f.tex ;; # )}
+ esac # mf | tex | pdftex | xetex
- * ) $SED_I $f.tex -e '/\\def\\botofcontents/d' \
- -e 's/ \\centerline{\(\\hsize\)/\\def\\covernote{\1/' \
- -e 's/\(Publishing Company.}}\)}/\1\n\\datecontentspage/' \
- -e 's/\(Mathematical Society.}}\)}/\1\n\\datecontentspage/' ;;
- esac
- fi # $NEW
-
# special treatment for individual C/WEB programs
case $f in
# replace former convention to indicate "not a title
@@ -252,91 +250,134 @@
# 'E' no longer free to be active character
# fix table-of-contents page for bibtex
# FIX: don't wait for Oren Patashnik.
- bibtex ) $SED_I $f.tex -e 's/\\def\\titlepage{F}/\\titletrue/'
- [ -z "$CHANGES" ] && $SED_I $f.tex -e "71,78d" ;;
+ bibtex ) $SED_I -e 's/\\def\\titlepage{F}/\\titletrue/' $f.tex
+ [ -z "$CHANGES" ] && $SED_I -e '71,78d' $f.tex ;;
+ # FIX: 'glue.web' obviously uses an old 'webmac.tex'.
+ glue ) $SED_I -e 's/titlefalse/titletrue/
+/\\def\\title{GLUE}/a\
+\\pageno=\\contentspagenumber \\advance\\pageno by1\\relax' $f.tex ;;
+
# FIX: GFtoDVI uses 'Metafont' in a module name;
# this should appear correctly in the bookmarks, too.
- gftodvi ) $NEW && $SED_I $f.tex \
- -e 's/\\def\\(/\\ifpdf\\sanitizecommand\\MF{Metafont}\\fi\n\n&/' ;; # )
-
- # FIX: 'glue.web' obviously uses an old 'webmac.tex'.
- glue ) $SED_I $f.tex -e 's/titlefalse/titletrue/' \
- -e 's/\\def\\title{GLUE}/&\n\\pageno=\\contentspagenumber \\advance\\pageno by1\\relax/' ;;
-
# FIX: Metafont uses '\over' in several module names;
# this should appear correctly in the bookmarks, too.
- mf ) $NEW && $SED_I $f.tex \
- -e 's/\\def\\(/\\ifpdf\n\\sanitizecommand\\MF{Metafont}\n\\sanitizecommand\\over{\/}\n\\sanitizecommand\\langle{<}\n\\sanitizecommand\\rangle{>}\n\\fi\n\n&/' ;; # )
+ # FIX: typo in MF.WEB.
+ gftodvi | mf ) $NEW && $SED_I -e '/\\def\\MF/a\
+\\ifpdf\
+\\sanitizecommand\\MF{Metafont}\
+\\sanitizecommand\\over{\/}\
+\\sanitizecommand\\langle{<}\
+\\sanitizecommand\\rangle{>}\
+\\fi' -e 's/a ano/ano/' $f.tex ;;
# FIX: MFT uses '\pb' in several module names;
# this should appear correctly in the bookmarks, too.
- mft ) $NEW && $SED_I $f.tex \
- -e 's/\\def\\pb.*/&\n\\ifpdf\\sanitizecommand\\pb{\|...\|}\\fi/' ;;
+ mft ) $NEW && $SED_I -e '/\\def\\pb/a\
+\\ifpdf\\sanitizecommand\\pb{\|...\|}\\fi' $f.tex ;;
# FIX: pdfTeX uses '\pdfTeX' in section names; these should
# appear correctly in the bookmarks, too.
- pdftex ) $NEW && $SED_I $f.tex \
- -e 's/\\def\\pdfeTeX{pdf\\eTeX}/&\n\\ifpdf\n\\sanitizecommand\\pdfTeX{pdfTeX}\n\\sanitizecommand\\eTeX{e-TeX}\n\\sanitizecommand\\over{\/}\n\\fi/' ;;
+ pdftex ) $NEW && $SED_I -e '/\\def\\pdfeTeX{pdf\\eTeX}/a\
+\\ifpdf\
+\\sanitizecommand\\pdfTeX{pdfTeX}\
+\\sanitizecommand\\eTeX{e-TeX}\
+\\sanitizecommand\\over{\/}\
+\\fi' $f.tex ;;
# FIX: weave uses '\max' in name of module 173; this should
# appear correctly in the bookmarks, too.
- weave ) $NEW && $SED_I $f.tex \
- -e 's/\\def\\({}/\\ifpdf\\sanitizecommand\\max{max}\\fi\n&/' ;; # )
+ weave | twill ) $NEW && $SED_I -e '/\\def\\({}/a\
+\\ifpdf\\sanitizecommand\\max{max}\\fi' $f.tex ;; # )
# FIX: purge obsolete macros from XeTeX.
# FIX: XeTeX uses '\pdfTeX' from section 114, which is not
# changed and thus 'disappears'; repeat in preamble.
# FIX: apply '\sanitizecommand' for bookmarks.
- xetex ) $SED_I $f.tex -e '/\\input xewebmac/d' \
- -e 's/\\let\\maybe/\\def\\pdfTeX{pdf\\TeX}\n&/'
- $NEW && $SED_I $f.tex \
- -e 's/\\def\\pdfTeX{pdf\\TeX}/&\n\\ifpdf\\sanitizecommand\\pdfTeX{pdfTeX}\\fi/' \
- -e 's/\\def\\eTeX/\\ifpdf\n\\sanitizecommand\\eTeX{e-TeX}\n\\sanitizecommand\\over{\/}\n\\fi\n&/' ;;
+ xetex ) $SED_I -e '/\\input xewebmac/d
+/\\let\\maybe/i\
+\\def\\pdfTeX{pdf\\TeX}' $f.tex
+ $NEW && $SED_I -e '/\\def\\pdfTeX/a\
+\\ifpdf\\sanitizecommand\\pdfTeX{pdfTeX}\\fi
+/\\def\\eTeX/a\
+\\ifpdf\
+\\sanitizecommand\\eTeX{e-TeX}\
+\\sanitizecommand\\over{\/}\
+\\fi' $f.tex ;;
+ esac
- # timestamp on table-of-contents page or the first page
- hitex | mp ) $SED_I $f.tex -e 's/\\def\\topofcontents/\\datethis\n\\emergencystretch=.1\\hsize\n&/' ;;
- common | ctangle | cweave | ctie | tie ) $SED_I $f.tex -e 's/\\def\\botofcontents/\\datethis\n&/' ;;
- mpost | mpmath* | mpstrings | tfmin ) $SED_I $f.tex -e 's/\\def\\title{/\\datecontentspage\n\n&/' ;; # }
+ # timestamp on table-of-contents page or the first page
+ case $f in
+ tex | pdftex | xetex | hitex | mf | mp )
+ $NEW && $SED_I -e '/\\def\\title{/i\
+\\datethis\
+\\emergencystretch=.1\\hsize' $f.tex ;; # }
+
+ common | ctangle | cweave | ctie | tie )
+ $SED_I -e '/\\def\\botofcontents/i\
+\\datethis' $f.tex ;;
+
+ bibtex | patgen | tangle | weave | twill | \
+ mpost | mpmath* | mpstrings | tfmin )
+ $NEW && $SED_I -e '/\\def\\title{/i\
+\\datecontentspage\
+' $f.tex ;; # } { {{ {
+
+ * ) $NEW && $SED_I -e '/\\def\\botofcontents/d
+s/ \\centerline{\(\\hsize\)/\\def\\covernote{\1/
+s/\(Publishing Company.}}\)}/\1\n\\datecontentspage/
+s/\(Mathematical Society.}}\)}/\1\n\\datecontentspage/' $f.tex ;;
esac
# shift table-of-contents pages to the front in PDF
if $PDFTOCFRONT && echo $f | grep -v -q -E 'ctwill|hitex'
- then $SED_I $f.tex \
- -e '0,/\\N[1{]/s/\\N[1{]/\\input pdfwebtocfront\n\n&/'
- fi # $PDFTOCFRONT
+ then $SED_I -e '0,/\\N[1{]/s/\\N[1{]/\\input pdfwebtocfront\n\n&/' $f.tex # }}
+ fi
if [ -n "$CHANGES" ] || [ twill = "$f" ]
then
# We add an Editor's Note and the list of changed
# sections on the ToC page.
- cp $LOCALSTUFF/editorsnote.tex .
+ [ -f editorsnote.tex ] || cp $LOCALSTUFF/editorsnote.tex .
case $f in
- mf ) $SED_I $f.tex -e 's/\\datethis/\\input editorsnote.tex\n\\def&{\\def\\startsection{\\leftline{\\sc\\today\\ at \\hours}\n \\medskip\\editorsnote\\readchanges\\bigskip\n \\let\\startsection=\\stsec\\stsec}}\n&/' ;;
+ mf ) $SED_I -e '/\\datethis/i\
+\\input editorsnote.tex\
+\\def\\datethis{\\def\\startsection{\\leftline{\\sc\\today\\ at \\hours}\
+ \\medskip\\editorsnote\\readchanges\\bigskip\
+ \\let\\startsection=\\stsec\\stsec}}' $f.tex ;;
# TeX and XeTeX grow significantly for TeX Live
# so there's enough room on the last ToC page.
- pdftex | tex | xetex ) $SED_I $f.tex \
- -e '/\\datethis/d' \
- -e 's/\(\\def\\botofcontents\).*/\\input editorsnote.tex\n\1{\\hsize6.5in\\vskip 0pt plus 1filll\n \\editorsnote\\readchanges\\medskip\\noindent\\sc\\today\\ at \\hours}/' \
- -e 's/\\input pdfwebtocfront/&\n\n\\def\\tocpages{2}/' ;;
+ pdftex | tex | xetex ) $SED_I -e '/\\datethis/d
+s/\(\\def\\botofcontents\).*/\1{\\hsize6.5in\\vskip 0pt plus 1filll/
+/\\def\\botofcontents/i\
+\\input editorsnote.tex
+/\\def\\botofcontents/a\
+ \\editorsnote\\readchanges\\medskip\\noindent\\sc\\today\\ at \\hours}
+/\\input pdfwebtocfront/a\
+\
+\\def\\tocpages{2}' $f.tex ;;
- bibtex | patgen | tangle | weave | refsort | twinx ) $SED_I $f.tex -e 's/\\date.*/\\input editorsnote\n\\def\\covernote{\\vbox{\\editorsnote\\readchanges\\par}}\n\\datecontentspage/' ;;
+ bibtex | patgen | tangle | weave | twill | \
+ refsort | twinx )
+ $SED_I -e 's/\\date.*/\\datecontentspage/
+/\\datecontentspage/i\
+\\input editorsnote\
+\\def\\covernote{\\vbox{\\editorsnote\\readchanges\\par}}' $f.tex ;;
- common | ctangle | cweave | ctie | tie ) $SED_I $f.tex \
- -e 's/\\def\\covernote/\\input editorsnote.tex\n&/' \
- -e 's/^}}/\\bigskip\\editorsnote\\readchanges\\par&/' ;;
+ common | ctangle | cweave | ctie | tie ) # {{
+ $SED_I -e '/\\def\\covernote/i\
+\\input editorsnote.tex
+s/^}}/\\bigskip\\editorsnote\\readchanges\\par&/' $f.tex ;;
- twill ) $SED_I $f.tex \
- -e 's/\\datecontentspage/\\input editorsnote.tex\n\\def\\covernote{\\vbox{\\editorsnote\\readchanges\\par}}\n&/' ;;
-
- * ) $SED_I $f.tex \
- -e 's/\\def\\title{/\\input editorsnote.tex\n&/' \
- -e 's/\\vbox{\\ninerm/&\\editorsnote\\readchanges\\medskip/' ;;
+ * ) $SED_I -e '/\\def\\title{/i\
+\\input editorsnote.tex
+s/\\vbox{\\ninerm/&\\editorsnote\\readchanges\\medskip/' $f.tex ;; # }}
esac
fi # $CHANGES
+ # Run TeX on the woven C/WEB programs
case $f in
ctwill ) # gives two different outcomes
if [ "$HITEX" = "$TEX" ] # sort mini-indexes
@@ -350,9 +391,8 @@
* ) # run TeX twice
if $PDFTOCFRONT || [ -n "$CHANGES" ]
- then # only XeTeX can process XETEX.WEB
- [ xetex = $f ] && $XETEX $f || $TEX $f
- fi
+ then [ xetex = $f ] && $XETEX $f || $TEX $f
+ fi # only XeTeX can process XETEX.WEB
[ xetex = $f ] && $XETEX $f || $TEX $f ;;
esac
done
@@ -360,9 +400,19 @@
# create tarballs w/o changes for publication
if ( $PDFTOCFRONT || [ "$HITEX" = "$TEX" ] ) && ! $FILESELECT
then
+ export TEXINPUTS=.:$(kpsewhich --var-value=TEXMFDIST)//:$KNUTHWARE//
+
+ # Prepare 'webman' with section links and bookmarks.
+ rm -f webman.tex
+ f=$(kpsewhich -engine tex webman)
+ [ -z "$CHANGES" ] &&
+ tie -m webman.tex $f $LOCALSTUFF/webman-outlines.ch ||
+ tie -m webman.tex $f $LOCALSTUFF/webman-outlines.ch \
+ $LOCALSTUFF/webman-changes.ch
+ $TEX webman
+
if [ -z "$CHANGES" ]
then
- export TEXINPUTS=.:$(kpsewhich --var-value=TEXMFDIST)//:$KNUTHWARE//
touch pages.tex # let 'manmac' produce output at all
$TEX -jobname=errorlog $LOCALSTUFF/Xerrorlog.tex
@@ -371,82 +421,79 @@
do $TEX -jobname errata.$f errata.$f
done
$TEX errata
- $PAX "$OUTDIR/errata.tar.gz" -s ,^,errata/, err*.$PDF
+ $PAX "$OUTDIR/errata.tar.gz" -s ,^,errata/, err*.$EXT && true
- $PAX "$OUTDIR/hitex.tar.gz" -s ,^,hitex/, hitex.$PDF
- $PAX "$OUTDIR/mp.tar.gz" -s ,^,mp/, mp.$PDF mpost.$PDF
+ $PAX "$OUTDIR/hitex.tar.gz" -s ,^,hitex/, hitex.$EXT && true
+ $PAX "$OUTDIR/mp.tar.gz" -s ,^,mp/, mp.$EXT mpost.$EXT && true
# Finally, build the remaining documents
# * TeX and Metafont test routines
# * WEB and CWEB manuals
- rm -f trapman.tex webman.tex cwebman.tex
+ rm -f trapman.tex cwebman.tex
# FIX: Prepare 'trapman' for automatic processing; several
# input files are renamed in TeX Live (in fact, there are
# additional files for MetaPost).
- # Prepare 'webman' with section links and bookmarks.
- for f in trapman webman
- do
- f=$(kpsewhich -engine tex $f)
- tie -m $(basename $f) $f $LOCALSTUFF/$(basename $f .tex).ch
- done
+ f=$(kpsewhich -engine tex trapman)
+ tie -m trapman.tex $f $LOCALSTUFF/trapman.ch
# Prepare 'cwebman' with footnotes describing the extended CWEB.
f=$(kpsewhich -engine tex cwebman)
- tie -m $(basename $f) $f $(basename $f .tex)-w2c.ch
+ tie -m cwebman.tex $f cwebman-w2c.ch
- for f in tripman trapman webman cwebman
+ for f in tripman trapman cwebman
do $TEX $f
done
- $PAX "$OUTDIR/mf.tar.gz" -s ,^,mf/, mf.$PDF trapman.$PDF
+ $PAX "$OUTDIR/mf.tar.gz" -s ,^,mf/, mf.$EXT trapman.$EXT && true
$PAX "$OUTDIR/tex.tar.gz" -s ,^,tex/, \
- glue.$PDF tex.$PDF tripman.$PDF
+ glue.$EXT tex.$EXT tripman.$EXT && true
$PAX "$OUTDIR/web.tar.gz" -s ,^,web/, \
- webman.$PDF tangle.$PDF weave.$PDF twill.$PDF
+ webman.$EXT tangle.$EXT weave.$EXT twill.$EXT && true
$PAX "$OUTDIR/cweb.tar.gz" -s ,^,cweb/, \
- cwebman.$PDF common.$PDF ctangle.$PDF cweave.$PDF \
- ctwill.$PDF refsort.$PDF twinx.$PDF
+ cwebman.$EXT common.$EXT ctangle.$EXT cweave.$EXT \
+ ctwill.$EXT refsort.$EXT twinx.$EXT && true
else # -n $CHANGES
- for f in *.$PDF
+ for f in *.$EXT
do
- case $f in *$CHANGES.$PDF ) rm -f $f; continue ;; esac
- mv $f $(basename $f .$PDF)$CHANGES.$PDF
+ case $f in *$CHANGES.$EXT ) rm -f $f; continue ;; esac
+ mv $f $(basename $f .$EXT)$CHANGES.$EXT && true
done
[ "$HITEX" = "$TEX" ] && mv -f xetex.pdf xetex$CHANGES.pdf
- $PAX "$OUTDIR/mf$CHANGES.tar.gz" -s ,^,mf/, mf$CHANGES.$PDF
- $PAX "$OUTDIR/tex$CHANGES.tar.gz" -s ,^,tex/, tex$CHANGES.$PDF
+ $PAX "$OUTDIR/mf$CHANGES.tar.gz" -s ,^,mf/, mf$CHANGES.$EXT && true
+ $PAX "$OUTDIR/tex$CHANGES.tar.gz" -s ,^,tex/, tex$CHANGES.$EXT && true
$PAX "$OUTDIR/web$CHANGES.tar.gz" -s ,^,web/, \
- tangle$CHANGES.$PDF weave$CHANGES.$PDF
+ webman$CHANGES.$EXT \
+ tangle$CHANGES.$EXT weave$CHANGES.$EXT && true
$PAX "$OUTDIR/cweb$CHANGES.tar.gz" -s ,^,cweb/, \
- common$CHANGES.$PDF ctangle$CHANGES.$PDF \
- cweave$CHANGES.$PDF refsort$CHANGES.$PDF \
- twinx$CHANGES.$PDF
+ common$CHANGES.$EXT ctangle$CHANGES.$EXT \
+ cweave$CHANGES.$EXT refsort$CHANGES.$EXT \
+ twinx$CHANGES.$EXT && true
fi # $CHANGES
$PAX "$OUTDIR/etc$CHANGES.tar.gz" -s ,^,etc/, \
- vftovp$CHANGES.$PDF vptovf$CHANGES.$PDF
+ vftovp$CHANGES.$EXT vptovf$CHANGES.$EXT && true
$PAX "$OUTDIR/mfware$CHANGES.tar.gz" -s ,^,mfware/, \
- gftodvi$CHANGES.$PDF gftopk$CHANGES.$PDF \
- gftype$CHANGES.$PDF mft$CHANGES.$PDF
+ gftodvi$CHANGES.$EXT gftopk$CHANGES.$EXT \
+ gftype$CHANGES.$EXT mft$CHANGES.$EXT && true
$PAX "$OUTDIR/texware$CHANGES.tar.gz" -s ,^,texware/, \
- dvitype$CHANGES.$PDF pltotf$CHANGES.$PDF \
- pooltype$CHANGES.$PDF tftopl$CHANGES.$PDF
+ dvitype$CHANGES.$EXT pltotf$CHANGES.$EXT \
+ pooltype$CHANGES.$EXT tftopl$CHANGES.$EXT && true
$PAX "$OUTDIR/other$CHANGES.tar.gz" -s ,^,other/, \
- dvicopy$CHANGES.$PDF patgen$CHANGES.$PDF \
- pktogf$CHANGES.$PDF pktype$CHANGES.$PDF
- $PAX "$OUTDIR/xetex$CHANGES.tar.gz" -s ,^,xetex/, \
- xetex$CHANGES.pdf
+ dvicopy$CHANGES.$EXT patgen$CHANGES.$EXT \
+ pktogf$CHANGES.$EXT pktype$CHANGES.$EXT && true
+ [ "$HITEX" = "$TEX" ] || {
+ $PAX "$OUTDIR/xetex$CHANGES.tar.gz" -s ,^,xetex/, \
+ xetex$CHANGES.pdf && true ; }
for f in bibtex pdftex ctie tie
- do $PAX "$OUTDIR/$f$CHANGES.tar.gz" -s ,^,$f/, $f$CHANGES.$PDF
+ do $PAX "$OUTDIR/$f$CHANGES.tar.gz" -s ,^,$f/, $f$CHANGES.$EXT && true
done
# Notes to self:
# (1) Create a user-friendly central entrypoint with
# (a) pandoc index.md -o index.pdf
- # (b) pandoc index.md -o index.tex;
- # pandoc index.tex -s -o index.html \
- # --metadata title="C/WEB programs in TeX Live";
+ # (b) pandoc index.md -s -o index.tex
+ # pandoc index.tex -s -o index.html
# rm index.tex
# (2) Prepare a super-tarball from all the contents of these
# individual tarballs (42/53 and 34/54) with either of
Added: trunk/Master/texmf-dist/doc/plain/pwebmac/webman-changes.ch
===================================================================
--- trunk/Master/texmf-dist/doc/plain/pwebmac/webman-changes.ch (rev 0)
+++ trunk/Master/texmf-dist/doc/plain/pwebmac/webman-changes.ch 2025-03-16 19:56:22 UTC (rev 74648)
@@ -0,0 +1,561 @@
+ at x l.8
+\font\eighttt=cmtt8
+ at y
+\font\eighttt=cmtt8
+\font\authorfont=cmr12
+ at z
+
+ at x l.16
+\def\appA{7}
+\def\appB{8}
+\def\appC{9}
+\def\appD{0}
+\def\appE{0}
+\def\appF{10}
+\def\appG{11}
+\def\appH{12}
+ at y
+% 1 Introduction (new!)
+% 2 General rules
+% 3 Macros
+% 4 Control codes
+% 5 Additional features and caveats
+% 6 Appendices
+% 7 Performance statistics
+\def\appA{8}
+\def\appB{9}
+\def\appC{10}
+\def\appD{0}
+\def\appE{0}
+\def\appF{11}
+\def\appG{12}
+\def\appH{13}
+ at z
+
+ at x l.21
+\def\runninghead{{\tentt WEB} USER MANUAL}
+ at y
+\def\runninghead{{\ninett WEB} USER MANUAL}
+ at z
+
+ at x l.31
+
\centerline{\titlefont The {\ttitlefont WEB} System
+ at y
+
+\null\vfill
+\centerline{\titlefont The {\ttitlefont WEB} System of
+ Structured Documentation}
+\vskip 18pt\centerline{(Version 4.5 --- January 2021)}
+\vskip 24pt
+\centerline{\authorfont Donald E. Knuth}
+\vfill
+
+\noindent
+Editor's Note: This document describes the extended \.{WEB} system
+(Version 4.5 [\TeX~Live]).
+
+\noindent
+It fixes a set of bugs in \pdfURL{the original variant}{webman.pdf}, replaces
+the \.{webmac.tex} file in \Appendix F\null\ with the most recent version, and
+adds new material describing extended features of the \.{WEB} system as
+distributed in current \TeX\ Live. For the most part, this is the \.{-p}
+command-line option of the \.{WEAVE} processor and the associated
+\.{pwebmac.tex} macro file with support for {\mc PDF} and {\mc HINT} output
+formats; see section ``Hypertext and hyperdocumentation'' below.
+
+\smallskip\noindent
+See also the online project
+\pdfURL{\.{https://github.com/ascherer/web}}{https://github.com/ascherer/web}
+for more information.
+
+\pageno=0 \titletrue\eject
+
+\centerline{\titlefont The {\ttitlefont WEB} System
+ at z
+
+ at x l.34
+\vskip 15pt plus 3pt minus 3pt
+\noindent This memo describes how to write programs in the
+ at y
+
\section Introduction.
+This memo describes how to write programs in the
+ at z
+
+ at x l.126
+well known work of Pierre-Arnoul de Marneffe [``Holon programming: A
+survey,'' Univ.\ de Liege, Service Informatique, Liege, Belgium, 1973; 135
+ at y
+well known work of Pierre-Arnoul de Marneffe [``\pdfURL{Holon programming:
+A survey}{https://github.com/holon-scribe/holon-programming},'' Univ.\ de
+Li\`ege, Service d'Informatique, Li\`ege, Belgium, 1973; 135
+ at z
+
+ at x l.180
+\yskip\item{1)} A \TeX\ part, containing explanatory material about what
+ at y
+\begingroup\parindent=2.5em
+\yskip\item{1)} A \TeX\ part, containing explanatory material about what
+ at z
+
+ at x l.190
+that its structure is readily perceived.
+ at y
+that its structure is readily perceived.\par
+\endgroup
+ at z
+
+ at x l.304
+`\.{\\input webmac}'; this will cause \TeX\ to read in the macros that
+ at y
+`\.{\\input webmac}'---or, if you invoke `\.{weave -p}',
+`\.{\\input pwebmac}'---; this will cause \TeX\ to read in the macros that
+ at z
+
+ at x l.358
+ \.{which is a \\\&\{packed\}{ }\\\&\{array\}{ }\$
+ at y
+ \.{which is a \\\&\{packed\}{ }\\\&\{array\}{ }\$%
+ at z
+
+ at x l.607
+the \.{TANGLE} processor will treat this an equivalent to `\.{64}';
+the constant will be formatted as ``\O{100}'' in the \TeX\ output
+ at y
+the \.{TANGLE} processor will treat this as equivalent to `\.{64}';
+the constant will be formatted as `\O{100}' in the \TeX\ output
+ at z
+
+ at x l.628
+outputs of \.{WEAVE} and \.{TANGLE} (see \Appendix C\null). Meta-comments
+ at y
+outputs of \.{WEAVE} (see \Appendix B\null) and \.{TANGLE}
+(see \Appendix C\null). Meta-comments
+ at z
+
+ at x l.788
+\yskip\itemitem{a)}Comments in \PASCAL\ text should appear only after
+ at y
+\yskip
+\begingroup\parindent=1.5em
+\itemitem{a)}Comments in \PASCAL\ text should appear only after
+ at z
+
+ at x l.796
+statements.
+ at y
+statements.\par
+\endgroup
+ at z
+
+ at x l.909
+Finally, \Appendix F is the `\.{webmac}' file that sets \TeX\ up to accept
+the output of \.{WEAVE}; \Appendix G discusses how to use some of its macros
+to vary the output formats; and \Appendix H discusses what needs to be done
+ at y
+Finally, \Appendix F shows the `\.{webmac.tex}' file that sets \TeX\ up to
+accept the output of \.{WEAVE}; it also shows the `\.{pwebmac.tex}' file that
+provides alternative macros more suited for {\mc PDF} output with modern \TeX\
+engines; \Appendix G discusses how to use some of these macros
+to vary the output formats; and \Appendix H discusses what needs to be done
+ at z
+
+ at x l.989
+
\def\runninghead{APPENDIX A --- {\tentt WEB} FILE FORMAT}
+ at y
+
\def\runninghead{APPENDIX A --- {\ninett WEB} FILE FORMAT}
+ at z
+
+ at x l.1050
+ASCII codes is $c_1c_2\ldots c_m$, its hash value will be
+ at y
+ASCII codes is $c_1c_2\ldots c_n$, its hash value will be
+ at z
+
+ at x l.1061
+
\def\runninghead{APPENDIX B --- TRANSLATION BY {\tentt WEAVE}}
+ at y
+
\def\runninghead{APPENDIX B --- TRANSLATION BY {\ninett WEAVE}}
+ at z
+
+ at x l.1129
+ASCII codes is $c_1c_2\ldots c_m$, its hash value will be
+ at y
+ASCII codes is $c_1c_2\ldots c_n$, its hash value will be
+ at z
+
+ at x l.1139
+\U section~58.\fi
+ at y
+\U58.\fi
+ at z
+
+ at x l.1143
+
\def\runninghead{APPENDIX C --- TRANSLATION BY {\tentt TANGLE}}
+ at y
+
\def\runninghead{APPENDIX C --- TRANSLATION BY {\ninett TANGLE}}
+ at z
+
+ at x l.1149
+those lines. There are 1559 lines in all; the notation
+ at y
+those lines. There are 1585 lines in all; the notation
+ at z
+
+ at 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;
+ at 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;
+ at z
+
+ at x l.1162
+TOKPTR:0..MAXTOKS;{MAXTOKPTR,MAXTXTPTR:0..MAXTOKS;}{:53}{55:}
+IDFIRST:0..LONGBUFSIZE;IDLOC:0..LONGBUFSIZE;
+ at y
+TOKPTR:0..MAXTOKS;{MAXTOKPTR,MAXTXTPTR:0..MAXTOKS;}
+{:53}{55:}IDFIRST:0..LONGBUFSIZE;IDLOC:0..LONGBUFSIZE;
+ at z
+
+ at 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}
+ at y
+{:33}PROCEDURE INITIALIZE;VAR{16:}I:0..255;{:16}{40:}WI:0..1;
+{:40}{56:}H:0..HASHSIZE;{:56}{247:}C:ASCIICODE;
+ at z
+
+ at 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;
+ at y
+{:49}{54:}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;
+ at z
+
+ at 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;
+ at y
+IF R=0 THEN XREF[P]:=XREFPTR ELSE XMEM[R].XLINKFIELD:=XREFPTR;END;
+{:51}{58:}FUNCTION IDLOOKUP(T:EIGHTBITS):NAMEPOINTER;LABEL 31;
+ at z
+
+ at x l.1176
+L:0..LONGBUFSIZE;P:NAMEPOINTER;BEGIN L:=IDLOC-IDFIRST;{59:}
+H:=BUFFER[IDFIRST];I:=IDFIRST+1;
+ at y
+L:0..LONGBUFSIZE;P:NAMEPOINTER;BEGIN L:=IDLOC-IDFIRST;
+{59:}H:=BUFFER[IDFIRST];I:=IDFIRST+1;
+ at z
+
+ at x l.1184
+LINK[P]:=HASH[H];HASH[H]:=P;31:{:60};IF P=NAMEPTR THEN{62:}
+BEGIN W:=NAMEPTR MOD 2;
+ at y
+LINK[P]:=HASH[H];HASH[H]:=P;31:{:60};
+IF P=NAMEPTR THEN{62:}BEGIN W:=NAMEPTR MOD 2;
+ at z
+
+ at x l.1194
+XREF[P]:=0;END{:62};IDLOOKUP:=P;END;{:58}{66:}
+FUNCTION MODLOOKUP(L:SIXTEENBITS):NAMEPOINTER;LABEL 31;VAR C:0..4;
+ at y
+XREF[P]:=0;END{:62};IDLOOKUP:=P;END;
+{:58}{66:}FUNCTION MODLOOKUP(L:SIXTEENBITS):NAMEPOINTER;LABEL 31;
+ at z
+
+ at x l.1203
+\section Appendix F: The \.{webmac.tex} file.
+This is the file that extends ``plain \TeX'' format in order to support the
+ at y
+\section Appendix F: Macros for formatting.
+The \.{webmac.tex} file extends ``plain \TeX'' format in order to support the
+ at z
+
+ at x l.1208
+\verbatim
+% standard macros for WEB listings (in addition to PLAIN.TEX)
+\xdef\fmtversion{\fmtversion+WEBMAC4.0} % identifies current set of macros
+\parskip 0pt % no stretch between paragraphs
+\parindent 1em % for paragraphs and for the first line of Pascal text
+
+\font\eightrm=cmr8 \let\sc=\eightrm % NOT a caps-and-small-caps font!
+\let\mainfont=\tenrm
+\font\titlefont=cmr7 scaled\magstep4 % title on the contents page
+\font\ttitlefont=cmtt10 scaled\magstep2 % typewriter type in title
+\font\tentex=cmtex10 % TeX extended character set (used in strings)
+
+\def\\#1{\hbox{\it#1\/\kern.05em}} % italic type for identifiers
+\def\|#1{\hbox{$#1$}} % one-letter identifiers look a bit better this way
+\def\{\hbox{\bf#1\/}} % boldface type for reserved words
+\def\.#1{\hbox{\tentex % typewriter type for strings
+ \let\\=\BS % backslash in a string
+ \let\'=\RQ % right quote in a string
+ \let\`=\LQ % left quote in a string
+ \let\{=\LB % left brace in a string
+ \let\}=\RB % right brace in a string
+ \let\~=\TL % tilde in a string
+ \let\ =\SP % space in a string
+ \let\_=\UL % underline in a string
+ \let\&=\AM % ampersand in a string
+ #1}}
+\def\#{\hbox{\tt\char`\#}} % parameter sign
+\def\${\hbox{\tt\char`\$}} % dollar sign
+\def\%{\hbox{\tt\char`\%}} % percent sign
+\def\^{\ifmmode\mathchar"222 \else\char`^ \fi} % pointer or hat
+% circumflex accents can be obtained from \^^D instead of \^
+\def\AT!{@} % at sign for control text
+
+\chardef\AM=`\& % ampersand character in a string
+\chardef\BS=`\\ % backslash in a string
+\chardef\LB=`\{ % left brace in a string
+\def\LQ{{\tt\char'22}} % left quote in a string
+\chardef\RB=`\} % right brace in a string
+\def\RQ{{\tt\char'23}} % right quote in a string
+\def\SP{{\tt\char`\ }} % (visible) space in a string
+\chardef\TL=`\~ % tilde in a string
+\chardef\UL=`\_ % underline character in a string
+
+\newbox\bak \setbox\bak=\hbox to -1em{} % backspace one em
+\newbox\bakk\setbox\bakk=\hbox to -2em{} % backspace two ems
+
+\newcount\ind % current indentation in ems
+\def\1{\global\advance\ind by1\hangindent\ind em} % indent one more notch
+\def\2{\global\advance\ind by-1} % indent one less notch
+\def\3#1{\hfil\penalty#10\hfilneg} % optional break within a statement
+\def\4{\copy\bak} % backspace one notch
+\def\5{\hfil\penalty-1\hfilneg\kern2.5em\copy\bakk\ignorespaces}% optional break
+\def\6{\ifmmode\else\par % forced break
+ \hangindent\ind em\noindent\kern\ind em\copy\bakk\ignorespaces\fi}
+\def\7{\Y\6} % forced break and a little extra space
+
+\let\yskip=\smallskip
+\def\to{\mathrel{.\,.}} % double dot, used only in math mode
+\def\note#1#2.{\Y\noindent{\hangindent2em\baselineskip10pt\eightrm#1~#2.\par}}
+\def\lapstar{\rlap{*}}
+\def\startsection{\Q\noindent{\let\*=\lapstar\bf\modstar.\quad}}
+\def\defin#1{\global\advance\ind by 2 \1\&{#1 }} % begin `define' or `format'
+\def\A{\note{See also section}} % crossref for doubly defined section name
+\def\As{\note{See also sections}} % crossref for multiply defined section name
+\def\B{\mathopen{\.{@\{}}} % begin controlled comment
+\def\C#1{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi % Pascal comments
+ \XX\hfil\penalty-1\hfilneg\quad$\{\,$#1$\,\}$\XX}
+\def\D{\defin{define}} % macro definition
+\def\E{\cdot10^} % exponent in floating point constant
+\def\ET{ and~} % conjunction between two section numbers
+\def\ETs{, and~} % conjunction between the last two of several section numbers
+\def\F{\defin{format}} % format definition
+\let\G=\ge % greater than or equal sign
+\def\H#1{\hbox{\rm\char"7D\tt#1}} % hexadecimal constant
+\let\I=\ne % unequal sign
+\def\J{\.{@\&}} % TANGLE's join operation
+\let\K=\gets % left arrow
+\let\L=\le % less than or equal sign
+\outer\def\M#1.{\MN#1.\ifon\vfil\penalty-100\vfilneg % beginning of section
+ \vskip12ptminus3pt\startsection\ignorespaces}
+\outer\def\N#1.#2.{\MN#1.\vfil\eject % beginning of starred section
+ \def\rhead{\uppercase{\ignorespaces#2}} % define running headline
+ \message{*\modno} % progress report
+ \edef\next{\write\cont{\Z{#2}{\modno}{\the\pageno}}}\next % to contents file
+ \ifon\startsection{\bf\ignorespaces#2.\quad}\ignorespaces}
+\def\MN#1.{\par % common code for \M, \N
+ {\xdef\modstar{#1}\let\*=\empty\xdef\modno{#1}}
+ \ifx\modno\modstar \onmaybe \else\ontrue \fi \mark{\modno}}
+\def\O#1{\hbox{\rm\char'23\kern-.2em\it#1\/\kern.05em}} % octal constant
+\def\P{\rightskip=0pt plus 100pt minus 10pt % go into Pascal mode
+ \sfcode`;=3000
+ \pretolerance 10000
+ \hyphenpenalty 10000 \exhyphenpenalty 10000
+ \global\ind=2 \1\ \unskip}
+\def\Q{\rightskip=0pt % get out of Pascal mode
+ \sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50 }
+\let\R=\lnot % logical not
+\let\S=\equiv % equivalence sign
+\def\T{\mathclose{\.{@\}}}} % terminate controlled comment
+\def\U{\note{This code is used in section}} % crossref for use of a section
+\def\Us{\note{This code is used in sections}} % crossref for uses of a section
+\let\V=\lor % logical or
+\let\W=\land % logical and
+\def\X#1:#2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi % section name
+ \XX$\langle\,$#2{\eightrm\kern.5em#1}$\,\rangle$\XX}
+\def\Y{\par\yskip}
+\let\Z=\let % now you can \send the control sequence \Z
+\def\){\hbox{\.{@\$}}} % sign for string pool check sum
+\def\]{\hbox{\.{@\\}}} % sign for forced line break
+\def\=#1{\kern2pt\hbox{\vrule\vtop{\vbox{\hrule
+ \hbox{\strut\kern2pt\.{#1}\kern2pt}}
+ \hrule}\vrule}\kern2pt} % verbatim string
+\let\~=\ignorespaces
+\let\*=*
+
+\def\onmaybe{\let\ifon=\maybe} \let\maybe=\iftrue
+\newif\ifon \newif\iftitle \newif\ifpagesaved
+\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
+\def\page{\box255 }
+\def\normaloutput#1#2#3{\ifodd\pageno\hoffset=\pageshift\fi
+ \shipout\vbox{
+ \vbox to\fullpageheight{
+ \iftitle\global\titlefalse
+ \else\hbox to\pagewidth{\vbox to10pt{}\ifodd\pageno #3\else#2\fi}\fi
+ \vfill#1}} % parameter #1 is the page itself
+ \global\advance\pageno by1}
+
+\def\rhead{\.{WEB} OUTPUT} % this running head is reset by starred sections
+\def\title{} % an optional title can be set by the user
+\def\topofcontents{\centerline{\titlefont\title}
+ \vfill} % this material will start the table of contents page
+\def\botofcontents{\vfill} % this material will end the table of contents page
+\def\contentspagenumber{0} % default page number for table of contents
+\newdimen\pagewidth \pagewidth=6.5in % the width of each page
+\newdimen\pageheight \pageheight=8.7in % the height of each page
+\newdimen\fullpageheight \fullpageheight=9in % page height including headlines
+\newdimen\pageshift \pageshift=0in % shift righthand pages wrt lefthand ones
+\def\magnify#1{\mag=#1\pagewidth=6.5truein\pageheight=8.7truein
+ \fullpageheight=9truein\setpage}
+\def\setpage{\hsize\pagewidth\vsize\pageheight} % use after changing page size
+\def\contentsfile{CONTENTS} % file that gets table of contents info
+\def\readcontents{\input CONTENTS}
+
+\newwrite\cont
+\output{\setbox0=\page % the first page is garbage
+ \openout\cont=\contentsfile
+ \global\output{\normaloutput\page\lheader\rheader}}
+\setpage
+\vbox to \vsize{} % the first \topmark won't be null
+
+\def\ch{\note{The following sections were changed by the change file:}
+ \let\*=\relax}
+\newbox\sbox % saved box preceding the index
+\newbox\lbox % lefthand column in the index
+\def\inx{\par\vskip6pt plus 1fil % we are beginning the index
+ \write\cont{} % ensure that the contents file isn't empty
+ \closeout\cont % the contents information has been fully gathered
+ \output{\ifpagesaved\normaloutput{\box\sbox}\lheader\rheader\fi
+ \global\setbox\sbox=\page \global\pagesavedtrue}
+ \pagesavedfalse \eject % eject the page-so-far and predecessors
+ \setbox\sbox\vbox{\unvbox\sbox} % take it out of its box
+ \vsize=\pageheight \advance\vsize by -\ht\sbox % the remaining height
+ \hsize=.5\pagewidth \advance\hsize by -10pt
+ % column width for the index (20pt between cols)
+ \parfillskip 0pt plus .6\hsize % try to avoid almost empty lines
+ \def\lr{L} % this tells whether the left or right column is next
+ \output{\if L\lr\global\setbox\lbox=\page \gdef\lr{R}
+ \else\normaloutput{\vbox to\pageheight{\box\sbox\vss
+ \hbox to\pagewidth{\box\lbox\hfil\page}}}\lheader\rheader
+ \global\vsize\pageheight\gdef\lr{L}\global\pagesavedfalse\fi}
+ \message{Index:}
+ \parskip 0pt plus .5pt
+ \outer\def\:##1, {\par\hangindent2em\noindent##1:\kern1em} % index entry
+ \let\ttentry=\. \def\.##1{\ttentry{##1\kern.2em}} % give \tt a little room
+ \def\[##1]{$\underline{##1}$} % underlined index item
+ \rm \rightskip0pt plus 2.5em \tolerance 10000 \let\*=\lapstar
+ \hyphenpenalty 10000 \parindent0pt}
+\def\fin{\par\vfill\eject % this is done when we are ending the index
+ \ifpagesaved\null\vfill\eject\fi % output a null index column
+ \if L\lr\else\null\vfill\eject\fi % finish the current page
+ \parfillskip 0pt plus 1fil
+ \def\rhead{NAMES OF THE SECTIONS}
+ \message{Section names:}
+ \output{\normaloutput\page\lheader\rheader}
+ \setpage
+ \def\note##1##2.{\hfil\penalty-1\hfilneg\quad{\eightrm##1 ##2.}}
+ \linepenalty=10 % try to conserve lines
+ \def\U{\note{Used in section}} % crossref for use of a section
+ \def\Us{\note{Used in sections}} % crossref for uses of a section
+ \def\:{\par\hangindent 2em}\let\*=*\let\.=\ttentry}
+\def\con{\par\vfill\eject % finish the section names
+ \rightskip 0pt \hyphenpenalty 50 \tolerance 200
+ \setpage
+ \output{\normaloutput\page\lheader\rheader}
+ \titletrue % prepare to output the table of contents
+ \pageno=\contentspagenumber \def\rhead{TABLE OF CONTENTS}
+ \message{Table of contents:}
+ \topofcontents
+ \line{\hfil Section\hbox to3em{\hss Page}}
+ \def\Z##1##2##3{\line{\ignorespaces##1
+ \leaders\hbox to .5em{.\hfil}\hfil\ ##2\hbox to3em{\hss##3}}}
+ \readcontents\relax % read the contents info
+ \botofcontents \end} % print the contents page(s) and terminate
+?endgroup
+ at y
+\begingroup \def\tt{\eighttt} \baselineskip9pt
+\def\printmacs#1{\begingroup
+ \def\do##1{\catcode`##1=12 } \dospecials
+ \parskip 0pt \parindent 0pt
+ \catcode`\ =13 \catcode`\^^M=13
+ \tt \verbatimdefs \input #1 \endgroup}
+\printmacs{webmac}
+\vskip6pt \baselineskip12pt
+
\section Hypertext and hyperdocumentation.
+Many people have of course noticed analogies between \.{WEB} and the
+World Wide Web. The following \.{WEB} macros \.{pwebmac.tex} are in fact
+set up so that the output of \.{WEAVE} can be converted easily into
+Portable Document Format, with clickable hyperlinks that can be read
+with your favorite {\mc PDF} viewer.
+After using \.{WEAVE} with command line option `\.{-p}' to convert
+\.{cob.web} into \.{cob.tex}, you can prepare a hypertext version of
+the program by giving the commands
+$$\vbox{\halign{\.{#}\hfil\cr
+tex "\\let\\pdf+ \\input cob"\cr
+dvipdfm cob\cr}}$$
+instead of invoking \TeX\ in the normal way.
+Alternatively you can generate \.{cob.pdf} in one step by simply saying
+`\.{pdftex}~\.{cob}' or `\.{xetex}~\.{cob}' or `\.{luatex}~\.{cob}'.
+(You are advised to use the command line option `\.{--shell-escape}' with
+\.{pdftex} and \.{luatex} in order to receive ``valid'' {\mc PDF} output;
+otherwise, the internal counter for the ``Names of the sections'' part
+in the {\mc PDF} ``bookmarks'' will be incorrect.)
+
+Similar output for ``smart'' devices can be created with Martin Ruckert's
+Hi\TeX\ and its dynamic {\mc HINT} format; just say `\.{hitex}~\.{cob}'.
+{\mc HINT} files can be viewed with the \.{hintview} program, which is
+available from
+\pdfURL{\.{https://hint.userweb.mwn.de/hint/hintview.html}}%
+ {https://hint.userweb.mwn.de/hint/hintview.html}.%
+
+A more elaborate system called \pdfURL{\.{TWILL}}{twill.pdf}, which extends
+the usual cross references of \.{WEAVE} by preparing links from the uses of
+identifiers to their definitions, is also available---provided that you are
+willing to work a bit harder in cases where an identifier is multiply defined.
+\.{TWILL} is intended primarily for hardcopy output, but its principles could
+be used for hypertext as well. It uses its own set of macros
+`\.{twimac-web.tex}'.
+
+\vskip6pt \baselineskip9pt
+\printmacs{pwebmac}
+\endgroup
+\vfill\eject
+ at z
+
+ at x l.1418
+The macros in \.{webmac} make it possible to produce a variety of formats
+ at y
+The macros in \.{webmac} and \.{pwebmac} make it possible to produce
+a variety of formats
+ at z
+
+ at x l.1569
+\.{\\ch}, \.{\\fin}, and \.{\\con}. \.{WEAVE} itself need not be changed.
+ at y
+\.{\\ch}, \.{\\fin}, and \.{\\con}. \.{WEAVE} itself need not be changed.
+
+\point 15. In conjunction with `\.{weave -p}' and the \.{pwebmac} macros you
+can say `\.{\\input pdfwebtocfront}' as the last command in the limbo section
+and run \TeX\ \\{twice} on your woven \.{WEB} document, in order to shift the
+table-of-contents to the front of the {\mc PDF} output.
+ at z
+
+ at x l.1592
+first change files; then you can sure that your compiler will handle
+ at y
+first change files; then you can be sure that your compiler will handle
+ at z
Property changes on: trunk/Master/texmf-dist/doc/plain/pwebmac/webman-changes.ch
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/plain/pwebmac/webman-outlines.ch
===================================================================
--- trunk/Master/texmf-dist/doc/plain/pwebmac/webman-outlines.ch (rev 0)
+++ trunk/Master/texmf-dist/doc/plain/pwebmac/webman-outlines.ch 2025-03-16 19:56:22 UTC (rev 74648)
@@ -0,0 +1,197 @@
+ at x l.2
+\input webmac
+ at y
+\input pwebmac
+\ifpdf
+ \pdfpagewidth=\pagewidth \advance\pdfpagewidth by 2cm
+ \pdfpageheight=\pageheight \advance\pdfpageheight by 3cm
+ \ifpdflua \pdfhorigin=1cm \pdfvorigin=1cm
+ \else \advance\pdfpageheight by 1cm \global\pageshift=-1.54cm
+ \global\hoffset=-1.54cm \global\voffset=-1.54cm \fi
+\else\pageno=1\fi
+ at z
+
+ at x l.16
+\outer\def\section #1.{\penalty-50\vskip 12pt plus 3pt minus 3pt
+ \noindent{\bf #1.}\quad\ignorespaces}
+ at y
+\newcount\destcount \destcount=1\relax
+
+\def\bkminfo{}
+\outer\def\section #1.{\penalty-50\vskip 12pt plus 3pt minus 3pt
+ \noindent\ifpdf\vbox to 0pt{\kern-2.5ex\relax
+ \ifpdflua\pdfdest num \destcount fith\relax
+ \else\special{pdf: dest (\the\destcount) [ @thispage /FitH @ypos ]}\fi
+ \def\.##1{##1}%
+ \ifx\bkminfo\empty\def\sectitle{#1}\else\def\sectitle{#1 (\bkminfo)}\fi
+ \ifpdflua\pdfoutline goto num \destcount {\sectitle}\relax
+ \else\special{pdf: outline 0 << /Title (\sectitle)
+ /A << /S /GoTo /D (\the\destcount) >> >>}\fi
+ \gdef\bkminfo{}%
+ \global\advance\destcount by 1\relax
+ \kern2.5ex\relax
+ }\fi{\bf #1.}\quad\ignorespaces}
+
+\def\appA{7}
+\def\appB{8}
+\def\appC{9}
+\def\appD{0}
+\def\appE{0}
+\def\appF{10}
+\def\appG{11}
+\def\appH{12}
+
+\def\Appendix#1{\leavevmode
+ \ifnum\csname app#1\endcsname>0 %
+ \ifpdf\ifpdflua
+ \pdfstartlink attr{/Border[0 0 0]} goto num\csname app#1\endcsname\relax
+ \Blue\hbox{Appendix}~#1\Black
+ \pdfendlink
+ \else
+ \setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{\hbox{Appendix}~#1}%
+ \special{pdf: ec}}\special{pdf: ann width \thewidth height \theheight
+ depth \thedepth << /Type /Annot /Subtype /Link /Border [0 0 0]
+ /A << /S /GoTo /D (\csname app#1\endcsname) >> >>}\box0\relax
+ \fi\else Appendix~#1\fi
+ \else Appendix~#1\fi}
+ at z
+
+ at x l.447
+program for \.{TANGLE}, in the appendix, gives precise details about this
+ at y
+program for \.{TANGLE}, in \pdfURL{Appendix~E}{tangle.pdf},
+gives precise details about this
+ at z
+
+ at x l.628
+outputs of \.{WEAVE} and \.{TANGLE} (see Appendix~C\null). Meta-comments
+ at y
+outputs of \.{WEAVE} and \.{TANGLE} (see \Appendix C\null). Meta-comments
+ at z
+
+ at x l.895
+examples of ``real'' programs. Appendix~A shows the \.{WEB} input that
+generated modules 55--59 of the \.{WEAVE} program; Appendix~B shows the
+corresponding \TeX\ code output by \.{WEAVE}; and Appendix~C shows excerpts
+ at y
+examples of ``real'' programs. \Appendix A shows the \.{WEB} input that
+generated modules 55--59 of the \.{WEAVE} program; \Appendix B shows the
+corresponding \TeX\ code output by \.{WEAVE}; and \Appendix C shows excerpts
+ at z
+
+ at x l.901
+report, in Appendices D and~E. The reader should first compare Appendix~A
+to the corresponding portion of Appendix~D; then the same material should
+be compared to Appendices B and~C. Finally, if time permits, the reader may
+enjoy studying the complete programs in Appendices D and~E, since \.{WEAVE}
+ at y
+report, in Appendices \pdfURL{D}{weave.pdf} and~\pdfURL{E}{tangle.pdf}.
+The reader should first compare \Appendix A to the corresponding portion of
+\pdfURL{Appendix~D}{weave.pdf}; then the same material should be compared to
+\Appendix B and \Appendix C. Finally, if time permits, the reader may enjoy
+studying the complete programs in Appendices \pdfURL{D}{weave.pdf}
+and~\pdfURL{E}{tangle.pdf}, since \.{WEAVE}
+ at z
+
+ at x l.909
+Finally, Appendix F is the `\.{webmac}' file that sets \TeX\ up to accept
+the output of \.{WEAVE}; Appendix~G discusses how to use some of its macros
+to vary the output formats; and Appendix~H discusses what needs to be done
+ at y
+Finally, \Appendix F is the `\.{webmac}' file that sets \TeX\ up to accept
+the output of \.{WEAVE}; \Appendix G discusses how to use some of its macros
+to vary the output formats; and \Appendix H discusses what needs to be done
+ at z
+
+ at x l.914
+The programs in Appendices D and E will optionally keep statistics on
+ at y
+The programs in Appendices \pdfURL{D}{weave.pdf} and \pdfURL{E}{tangle.pdf}
+will optionally keep statistics on
+ at z
+
+ at x l.990
+\section Appendix A.
+This excerpt from \.{WEAVE.WEB} produced modules 55--59 in Appendix~D.
+ at y
+\def\bkminfo{WEB file format}
+\section Appendix A.
+This excerpt from \.{WEAVE.WEB} produced modules 55--59 in
+\pdfURL{Appendix~D}{weave.pdf}.
+ at z
+
+ at x l.1062
+\section Appendix B.
+This excerpt from \.{WEAVE.TEX} corresponds to Appendix A.
+ at y
+\def\bkminfo{Translations by WEAVE}
+\section Appendix B.
+This excerpt from \.{WEAVE.TEX} corresponds to \Appendix A.
+ at z
+
+ at x l.1144
+\section Appendix C.
+ at y
+\def\bkminfo{Translation by TANGLE}
+\section Appendix C.
+ at z
+
+ at x l.1463
+in small caps. For example, Appendix~D was produced after saying
+ at y
+in small caps. For example, \pdfURL{Appendix~D}{weave.pdf} was produced
+after saying
+ at z
+
+ at x l.1469
+\.{\\pageno=\\contentspagenumber} \.{\\advance\\pageno by 1}'. (Appendix~D
+ at y
+\.{\\pageno=\\contentspagenumber} \.{\\advance\\pageno by 1}'.
+(\pdfURL{Appendix~D}{weave.pdf}
+ at z
+
+ at x l.1480
+For example, Appendix~D was produced with the following definitions:
+ at y
+For example, \pdfURL{Appendix~D}{weave.pdf} was produced with the following
+definitions:
+ at z
+
+ at x l.1492
+for every starred module. For example, when Appendix~D was being generated,
+ at y
+for every starred module. For example, when \pdfURL{Appendix~D}{weave.pdf}
+was being generated,
+ at z
+
+ at x l.1584
+dependencies'' in the index of Appendix~E above, and figure out what changes
+ at y
+dependencies'' in the index of \pdfURL{Appendix~E}{tangle.pdf} above,
+and figure out what changes
+ at z
+
+ at x l.1610
+the index to Appendix~D.
+ at y
+the index to \pdfURL{Appendix~D}{weave.pdf}.
+ at z
+
+ at x l.1617
+Appendix~E. This listing will incorporate your changes.
+ at y
+\pdfURL{Appendix~E}{tangle.pdf}. This listing will incorporate your changes.
+ at z
+
+ at x l.1621
+Appendix~D that incorporates your changes.
+ at y
+\pdfURL{Appendix~D}{weave.pdf} that incorporates your changes.
+ at z
+
+ at x l.1667
+computer by following Appendices D and E. Then you have to simulate the
+ at y
+computer by following Appendices \pdfURL{D}{weave.pdf}
+and~\pdfURL{E}{tangle.pdf}. Then you have to simulate the
+ at z
Property changes on: trunk/Master/texmf-dist/doc/plain/pwebmac/webman-outlines.ch
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/plain/pwebmac/webman.ch
===================================================================
--- trunk/Master/texmf-dist/doc/plain/pwebmac/webman.ch 2025-03-16 17:23:02 UTC (rev 74647)
+++ trunk/Master/texmf-dist/doc/plain/pwebmac/webman.ch 2025-03-16 19:56:22 UTC (rev 74648)
@@ -1,661 +0,0 @@
- at x l.2
-\input webmac
- at y
-\input pwebmac
-\ifpdf
- \pdfpagewidth=\pagewidth \advance\pdfpagewidth by 2cm
- \pdfpageheight=\pageheight \advance\pdfpageheight by 3cm
- \ifpdflua \pdfhorigin=1cm \pdfvorigin=1cm
- \else \advance\pdfpageheight by 1cm \global\pageshift=-1.54cm
- \global\hoffset=-1.54cm \global\voffset=-1.54cm \fi
-\else\pageno=1\fi
- at z
-
- at x l.16
-\outer\def\section #1.{\penalty-50\vskip 12pt plus 3pt minus 3pt
- \noindent{\bf #1.}\quad\ignorespaces}
- at y
-\newcount\destcount \destcount=1\relax
-
-\def\bkminfo{}
-\outer\def\section #1.{\penalty-50\vskip 12pt plus 3pt minus 3pt
- \noindent\ifpdf\vbox to 0pt{\kern-2.5ex\relax
- \ifpdflua\pdfdest num \destcount fith\relax
- \else\special{pdf: dest (\the\destcount) [ @thispage /FitH @ypos ]}\fi
- \def\.##1{##1}%
- \ifx\bkminfo\empty\def\sectitle{#1}\else\def\sectitle{#1 (\bkminfo)}\fi
- \ifpdflua\pdfoutline goto num \destcount {\sectitle}\relax
- \else\special{pdf: outline 0 << /Title (\sectitle)
- /A << /S /GoTo /D (\the\destcount) >> >>}\fi
- \gdef\bkminfo{}%
- \global\advance\destcount by 1\relax
- \kern2.5ex\relax
- }\fi{\bf #1.}\quad\ignorespaces}
-
-\def\appA{8}
-\def\appB{9}
-\def\appC{10}
-\def\appD{0}
-\def\appE{0}
-\def\appF{11}
-\def\appG{12}
-\def\appH{13}
-
-\def\Appendix#1{\leavevmode
- \ifnum\csname app#1\endcsname>0 %
- \ifpdf\ifpdflua
- \pdfstartlink attr{/Border[0 0 0]} goto num\csname app#1\endcsname\relax
- \Blue\hbox{Appendix}~#1\Black
- \pdfendlink
- \else
- \setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{\hbox{Appendix}~#1}%
- \special{pdf: ec}}\special{pdf: ann width \thewidth height \theheight
- depth \thedepth << /Type /Annot /Subtype /Link /Border [0 0 0]
- /A << /S /GoTo /D (\csname app#1\endcsname) >> >>}\box0\relax
- \fi\else Appendix~#1\fi
- \else Appendix~#1\fi}
- at z
-
- at x l.21
-\def\runninghead{{\tentt WEB} USER MANUAL}
- at y
-\def\runninghead{{\ninett WEB} USER MANUAL}
- at z
-
- at x l.34
-\vskip 15pt plus 3pt minus 3pt
-\noindent This memo describes how to write programs in the
- at y
-
\section Introduction.
-This memo describes how to write programs in the
- at z
-
- at x l.126
-well known work of Pierre-Arnoul de Marneffe [``Holon programming: A
-survey,'' Univ.\ de Liege, Service Informatique, Liege, Belgium, 1973; 135
- at y
-well known work of Pierre-Arnoul de Marneffe [``\pdfURL{Holon programming:
-A survey}{https://github.com/holon-scribe/holon-programming},'' Univ.\ de
-Li\`ege, Service d'Informatique, Li\`ege, Belgium, 1973; 135
- at z
-
- at x l.180
-\yskip\item{1)} A \TeX\ part, containing explanatory material about what
- at y
-\begingroup\parindent=2.5em
-\yskip\item{1)} A \TeX\ part, containing explanatory material about what
- at z
-
- at x l.190
-that its structure is readily perceived.
- at y
-that its structure is readily perceived.\par
-\endgroup
- at z
-
- at x l.304
-`\.{\\input webmac}'; this will cause \TeX\ to read in the macros that
- at y
-`\.{\\input webmac}'---or, if you invoke `\.{weave -p}',
-`\.{\\input pwebmac}'---; this will cause \TeX\ to read in the macros that
- at z
-
- at x l.358
- \.{which is a \\\&\{packed\}{ }\\\&\{array\}{ }\$
- at y
- \.{which is a \\\&\{packed\}{ }\\\&\{array\}{ }\$%
- at z
-
- at x l.447
-program for \.{TANGLE}, in the appendix, gives precise details about this
- at y
-program for \.{TANGLE}, in \pdfURL{Appendix~E}{tangle.pdf},
-gives precise details about this
- at z
-
- at x l.628
-outputs of \.{WEAVE} and \.{TANGLE} (see Appendix~C\null). Meta-comments
- at y
-outputs of \.{WEAVE} (see \Appendix B\null) and \.{TANGLE}
-(see \Appendix C\null). Meta-comments
- at z
-
- at x l.788
-\yskip\itemitem{a)}Comments in \PASCAL\ text should appear only after
- at y
-\yskip
-\begingroup\parindent=1.5em
-\itemitem{a)}Comments in \PASCAL\ text should appear only after
- at z
-
- at x l.796
-statements.
- at y
-statements.\par
-\endgroup
- at z
-
- at x l.895
-examples of ``real'' programs. Appendix~A shows the \.{WEB} input that
-generated modules 55--59 of the \.{WEAVE} program; Appendix~B shows the
-corresponding \TeX\ code output by \.{WEAVE}; and Appendix~C shows excerpts
- at y
-examples of ``real'' programs. \Appendix A shows the \.{WEB} input that
-generated modules 55--59 of the \.{WEAVE} program; \Appendix B shows the
-corresponding \TeX\ code output by \.{WEAVE}; and \Appendix C shows excerpts
- at z
-
- at x l.901
-report, in Appendices D and~E. The reader should first compare Appendix~A
-to the corresponding portion of Appendix~D; then the same material should
-be compared to Appendices B and~C. Finally, if time permits, the reader may
-enjoy studying the complete programs in Appendices D and~E, since \.{WEAVE}
- at y
-report, in Appendices \pdfURL{D}{weave.pdf} and~\pdfURL{E}{tangle.pdf}.
-The reader should first compare \Appendix A to the corresponding portion of
-\pdfURL{Appendix~D}{weave.pdf}; then the same material should be compared to
-\Appendix B and \Appendix C. Finally, if time permits, the reader may enjoy
-studying the complete programs in Appendices \pdfURL{D}{weave.pdf}
-and~\pdfURL{E}{tangle.pdf}, since \.{WEAVE}
- at z
-
- at x l.909
-Finally, Appendix F is the `\.{webmac}' file that sets \TeX\ up to accept
-the output of \.{WEAVE}; Appendix~G discusses how to use some of its macros
-to vary the output formats; and Appendix~H discusses what needs to be done
- at y
-Finally, \Appendix F shows the `\.{webmac.tex}' file that sets \TeX\ up to
-accept the output of \.{WEAVE}; it also shows the `\.{pwebmac.tex}' file that
-provides alternative macros more suited for {\mc PDF} output with modern \TeX\
-engines; \Appendix G discusses how to use some of these macros
-to vary the output formats; and \Appendix H discusses what needs to be done
- at z
-
- at x l.914
-The programs in Appendices D and E will optionally keep statistics on
- at y
-The programs in Appendices \pdfURL{D}{weave.pdf} and \pdfURL{E}{tangle.pdf}
-will optionally keep statistics on
- at z
-
- at x l.989
-
\def\runninghead{APPENDIX A --- {\tentt WEB} FILE FORMAT}
-\section Appendix A.
-This excerpt from \.{WEAVE.WEB} produced modules 55--59 in Appendix~D.
- at y
-
\def\runninghead{APPENDIX A --- {\ninett WEB} FILE FORMAT}
-\def\bkminfo{WEB file format}
-\section Appendix A.
-This excerpt from \.{WEAVE.WEB} produced modules 55--59 in
-\pdfURL{Appendix~D}{weave.pdf}.
- at z
-
- at x l.1050
-ASCII codes is $c_1c_2\ldots c_m$, its hash value will be
- at y
-ASCII codes is $c_1c_2\ldots c_n$, its hash value will be
- at z
-
- at x l.1061
-
\def\runninghead{APPENDIX B --- TRANSLATION BY {\tentt WEAVE}}
-\section Appendix B.
-This excerpt from \.{WEAVE.TEX} corresponds to Appendix A.
- at y
-
\def\runninghead{APPENDIX B --- TRANSLATION BY {\ninett WEAVE}}
-\def\bkminfo{Translations by WEAVE}
-\section Appendix B.
-This excerpt from \.{WEAVE.TEX} corresponds to \Appendix A.
- at z
-
- at x l.1129
-ASCII codes is $c_1c_2\ldots c_m$, its hash value will be
- at y
-ASCII codes is $c_1c_2\ldots c_n$, its hash value will be
- at z
-
- at x l.1139
-\U section~58.\fi
- at y
-\U58.\fi
- at z
-
- at x l.1143
-
\def\runninghead{APPENDIX C --- TRANSLATION BY {\tentt TANGLE}}
-\section Appendix C.
- at y
-
\def\runninghead{APPENDIX C --- TRANSLATION BY {\ninett TANGLE}}
-\def\bkminfo{Translation by TANGLE}
-\section Appendix C.
- at z
-
- at x l.1149
-those lines. There are 1559 lines in all; the notation
- at y
-those lines. There are 1585 lines in all; the notation
- at z
-
- at 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;
- at 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;
- at z
-
- at x l.1162
-TOKPTR:0..MAXTOKS;{MAXTOKPTR,MAXTXTPTR:0..MAXTOKS;}{:53}{55:}
-IDFIRST:0..LONGBUFSIZE;IDLOC:0..LONGBUFSIZE;
- at y
-TOKPTR:0..MAXTOKS;{MAXTOKPTR,MAXTXTPTR:0..MAXTOKS;}
-{:53}{55:}IDFIRST:0..LONGBUFSIZE;IDLOC:0..LONGBUFSIZE;
- at z
-
- at 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}
- at y
-{:33}PROCEDURE INITIALIZE;VAR{16:}I:0..255;{:16}{40:}WI:0..1;
-{:40}{56:}H:0..HASHSIZE;{:56}{247:}C:ASCIICODE;
- at z
-
- at 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;
- at 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;
- at z
-
- at 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;
- at y
-IF R=0 THEN XREF[P]:=XREFPTR ELSE XMEM[R].XLINKFIELD:=XREFPTR;END;
-{:51}{58:}FUNCTION IDLOOKUP(T:EIGHTBITS):NAMEPOINTER;LABEL 31;
- at z
-
- at x l.1176
-L:0..LONGBUFSIZE;P:NAMEPOINTER;BEGIN L:=IDLOC-IDFIRST;{59:}
-H:=BUFFER[IDFIRST];I:=IDFIRST+1;
- at y
-L:0..LONGBUFSIZE;P:NAMEPOINTER;BEGIN L:=IDLOC-IDFIRST;
-{59:}H:=BUFFER[IDFIRST];I:=IDFIRST+1;
- at z
-
- at x l.1184
-LINK[P]:=HASH[H];HASH[H]:=P;31:{:60};IF P=NAMEPTR THEN{62:}
-BEGIN W:=NAMEPTR MOD 2;
- at y
-LINK[P]:=HASH[H];HASH[H]:=P;31:{:60};
-IF P=NAMEPTR THEN{62:}BEGIN W:=NAMEPTR MOD 2;
- at z
-
- at x l.1194
-XREF[P]:=0;END{:62};IDLOOKUP:=P;END;{:58}{66:}
-FUNCTION MODLOOKUP(L:SIXTEENBITS):NAMEPOINTER;LABEL 31;VAR C:0..4;
- at y
-XREF[P]:=0;END{:62};IDLOOKUP:=P;END;
-{:58}{66:}FUNCTION MODLOOKUP(L:SIXTEENBITS):NAMEPOINTER;LABEL 31;
- at z
-
- at x l.1203
-\section Appendix F: The \.{webmac.tex} file.
-This is the file that extends ``plain \TeX'' format in order to support the
- at y
-\section Appendix F: Macros for formatting.
-The \.{webmac.tex} file extends ``plain \TeX'' format in order to support the
- at z
-
- at x l.1208
-\verbatim
-% standard macros for WEB listings (in addition to PLAIN.TEX)
-\xdef\fmtversion{\fmtversion+WEBMAC4.0} % identifies current set of macros
-\parskip 0pt % no stretch between paragraphs
-\parindent 1em % for paragraphs and for the first line of Pascal text
-
-\font\eightrm=cmr8 \let\sc=\eightrm % NOT a caps-and-small-caps font!
-\let\mainfont=\tenrm
-\font\titlefont=cmr7 scaled\magstep4 % title on the contents page
-\font\ttitlefont=cmtt10 scaled\magstep2 % typewriter type in title
-\font\tentex=cmtex10 % TeX extended character set (used in strings)
-
-\def\\#1{\hbox{\it#1\/\kern.05em}} % italic type for identifiers
-\def\|#1{\hbox{$#1$}} % one-letter identifiers look a bit better this way
-\def\{\hbox{\bf#1\/}} % boldface type for reserved words
-\def\.#1{\hbox{\tentex % typewriter type for strings
- \let\\=\BS % backslash in a string
- \let\'=\RQ % right quote in a string
- \let\`=\LQ % left quote in a string
- \let\{=\LB % left brace in a string
- \let\}=\RB % right brace in a string
- \let\~=\TL % tilde in a string
- \let\ =\SP % space in a string
- \let\_=\UL % underline in a string
- \let\&=\AM % ampersand in a string
- #1}}
-\def\#{\hbox{\tt\char`\#}} % parameter sign
-\def\${\hbox{\tt\char`\$}} % dollar sign
-\def\%{\hbox{\tt\char`\%}} % percent sign
-\def\^{\ifmmode\mathchar"222 \else\char`^ \fi} % pointer or hat
-% circumflex accents can be obtained from \^^D instead of \^
-\def\AT!{@} % at sign for control text
-
-\chardef\AM=`\& % ampersand character in a string
-\chardef\BS=`\\ % backslash in a string
-\chardef\LB=`\{ % left brace in a string
-\def\LQ{{\tt\char'22}} % left quote in a string
-\chardef\RB=`\} % right brace in a string
-\def\RQ{{\tt\char'23}} % right quote in a string
-\def\SP{{\tt\char`\ }} % (visible) space in a string
-\chardef\TL=`\~ % tilde in a string
-\chardef\UL=`\_ % underline character in a string
-
-\newbox\bak \setbox\bak=\hbox to -1em{} % backspace one em
-\newbox\bakk\setbox\bakk=\hbox to -2em{} % backspace two ems
-
-\newcount\ind % current indentation in ems
-\def\1{\global\advance\ind by1\hangindent\ind em} % indent one more notch
-\def\2{\global\advance\ind by-1} % indent one less notch
-\def\3#1{\hfil\penalty#10\hfilneg} % optional break within a statement
-\def\4{\copy\bak} % backspace one notch
-\def\5{\hfil\penalty-1\hfilneg\kern2.5em\copy\bakk\ignorespaces}% optional break
-\def\6{\ifmmode\else\par % forced break
- \hangindent\ind em\noindent\kern\ind em\copy\bakk\ignorespaces\fi}
-\def\7{\Y\6} % forced break and a little extra space
-
-\let\yskip=\smallskip
-\def\to{\mathrel{.\,.}} % double dot, used only in math mode
-\def\note#1#2.{\Y\noindent{\hangindent2em\baselineskip10pt\eightrm#1~#2.\par}}
-\def\lapstar{\rlap{*}}
-\def\startsection{\Q\noindent{\let\*=\lapstar\bf\modstar.\quad}}
-\def\defin#1{\global\advance\ind by 2 \1\&{#1 }} % begin `define' or `format'
-\def\A{\note{See also section}} % crossref for doubly defined section name
-\def\As{\note{See also sections}} % crossref for multiply defined section name
-\def\B{\mathopen{\.{@\{}}} % begin controlled comment
-\def\C#1{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi % Pascal comments
- \XX\hfil\penalty-1\hfilneg\quad$\{\,$#1$\,\}$\XX}
-\def\D{\defin{define}} % macro definition
-\def\E{\cdot10^} % exponent in floating point constant
-\def\ET{ and~} % conjunction between two section numbers
-\def\ETs{, and~} % conjunction between the last two of several section numbers
-\def\F{\defin{format}} % format definition
-\let\G=\ge % greater than or equal sign
-\def\H#1{\hbox{\rm\char"7D\tt#1}} % hexadecimal constant
-\let\I=\ne % unequal sign
-\def\J{\.{@\&}} % TANGLE's join operation
-\let\K=\gets % left arrow
-\let\L=\le % less than or equal sign
-\outer\def\M#1.{\MN#1.\ifon\vfil\penalty-100\vfilneg % beginning of section
- \vskip12ptminus3pt\startsection\ignorespaces}
-\outer\def\N#1.#2.{\MN#1.\vfil\eject % beginning of starred section
- \def\rhead{\uppercase{\ignorespaces#2}} % define running headline
- \message{*\modno} % progress report
- \edef\next{\write\cont{\Z{#2}{\modno}{\the\pageno}}}\next % to contents file
- \ifon\startsection{\bf\ignorespaces#2.\quad}\ignorespaces}
-\def\MN#1.{\par % common code for \M, \N
- {\xdef\modstar{#1}\let\*=\empty\xdef\modno{#1}}
- \ifx\modno\modstar \onmaybe \else\ontrue \fi \mark{\modno}}
-\def\O#1{\hbox{\rm\char'23\kern-.2em\it#1\/\kern.05em}} % octal constant
-\def\P{\rightskip=0pt plus 100pt minus 10pt % go into Pascal mode
- \sfcode`;=3000
- \pretolerance 10000
- \hyphenpenalty 10000 \exhyphenpenalty 10000
- \global\ind=2 \1\ \unskip}
-\def\Q{\rightskip=0pt % get out of Pascal mode
- \sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50 }
-\let\R=\lnot % logical not
-\let\S=\equiv % equivalence sign
-\def\T{\mathclose{\.{@\}}}} % terminate controlled comment
-\def\U{\note{This code is used in section}} % crossref for use of a section
-\def\Us{\note{This code is used in sections}} % crossref for uses of a section
-\let\V=\lor % logical or
-\let\W=\land % logical and
-\def\X#1:#2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi % section name
- \XX$\langle\,$#2{\eightrm\kern.5em#1}$\,\rangle$\XX}
-\def\Y{\par\yskip}
-\let\Z=\let % now you can \send the control sequence \Z
-\def\){\hbox{\.{@\$}}} % sign for string pool check sum
-\def\]{\hbox{\.{@\\}}} % sign for forced line break
-\def\=#1{\kern2pt\hbox{\vrule\vtop{\vbox{\hrule
- \hbox{\strut\kern2pt\.{#1}\kern2pt}}
- \hrule}\vrule}\kern2pt} % verbatim string
-\let\~=\ignorespaces
-\let\*=*
-
-\def\onmaybe{\let\ifon=\maybe} \let\maybe=\iftrue
-\newif\ifon \newif\iftitle \newif\ifpagesaved
-\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
-\def\page{\box255 }
-\def\normaloutput#1#2#3{\ifodd\pageno\hoffset=\pageshift\fi
- \shipout\vbox{
- \vbox to\fullpageheight{
- \iftitle\global\titlefalse
- \else\hbox to\pagewidth{\vbox to10pt{}\ifodd\pageno #3\else#2\fi}\fi
- \vfill#1}} % parameter #1 is the page itself
- \global\advance\pageno by1}
-
-\def\rhead{\.{WEB} OUTPUT} % this running head is reset by starred sections
-\def\title{} % an optional title can be set by the user
-\def\topofcontents{\centerline{\titlefont\title}
- \vfill} % this material will start the table of contents page
-\def\botofcontents{\vfill} % this material will end the table of contents page
-\def\contentspagenumber{0} % default page number for table of contents
-\newdimen\pagewidth \pagewidth=6.5in % the width of each page
-\newdimen\pageheight \pageheight=8.7in % the height of each page
-\newdimen\fullpageheight \fullpageheight=9in % page height including headlines
-\newdimen\pageshift \pageshift=0in % shift righthand pages wrt lefthand ones
-\def\magnify#1{\mag=#1\pagewidth=6.5truein\pageheight=8.7truein
- \fullpageheight=9truein\setpage}
-\def\setpage{\hsize\pagewidth\vsize\pageheight} % use after changing page size
-\def\contentsfile{CONTENTS} % file that gets table of contents info
-\def\readcontents{\input CONTENTS}
-
-\newwrite\cont
-\output{\setbox0=\page % the first page is garbage
- \openout\cont=\contentsfile
- \global\output{\normaloutput\page\lheader\rheader}}
-\setpage
-\vbox to \vsize{} % the first \topmark won't be null
-
-\def\ch{\note{The following sections were changed by the change file:}
- \let\*=\relax}
-\newbox\sbox % saved box preceding the index
-\newbox\lbox % lefthand column in the index
-\def\inx{\par\vskip6pt plus 1fil % we are beginning the index
- \write\cont{} % ensure that the contents file isn't empty
- \closeout\cont % the contents information has been fully gathered
- \output{\ifpagesaved\normaloutput{\box\sbox}\lheader\rheader\fi
- \global\setbox\sbox=\page \global\pagesavedtrue}
- \pagesavedfalse \eject % eject the page-so-far and predecessors
- \setbox\sbox\vbox{\unvbox\sbox} % take it out of its box
- \vsize=\pageheight \advance\vsize by -\ht\sbox % the remaining height
- \hsize=.5\pagewidth \advance\hsize by -10pt
- % column width for the index (20pt between cols)
- \parfillskip 0pt plus .6\hsize % try to avoid almost empty lines
- \def\lr{L} % this tells whether the left or right column is next
- \output{\if L\lr\global\setbox\lbox=\page \gdef\lr{R}
- \else\normaloutput{\vbox to\pageheight{\box\sbox\vss
- \hbox to\pagewidth{\box\lbox\hfil\page}}}\lheader\rheader
- \global\vsize\pageheight\gdef\lr{L}\global\pagesavedfalse\fi}
- \message{Index:}
- \parskip 0pt plus .5pt
- \outer\def\:##1, {\par\hangindent2em\noindent##1:\kern1em} % index entry
- \let\ttentry=\. \def\.##1{\ttentry{##1\kern.2em}} % give \tt a little room
- \def\[##1]{$\underline{##1}$} % underlined index item
- \rm \rightskip0pt plus 2.5em \tolerance 10000 \let\*=\lapstar
- \hyphenpenalty 10000 \parindent0pt}
-\def\fin{\par\vfill\eject % this is done when we are ending the index
- \ifpagesaved\null\vfill\eject\fi % output a null index column
- \if L\lr\else\null\vfill\eject\fi % finish the current page
- \parfillskip 0pt plus 1fil
- \def\rhead{NAMES OF THE SECTIONS}
- \message{Section names:}
- \output{\normaloutput\page\lheader\rheader}
- \setpage
- \def\note##1##2.{\hfil\penalty-1\hfilneg\quad{\eightrm##1 ##2.}}
- \linepenalty=10 % try to conserve lines
- \def\U{\note{Used in section}} % crossref for use of a section
- \def\Us{\note{Used in sections}} % crossref for uses of a section
- \def\:{\par\hangindent 2em}\let\*=*\let\.=\ttentry}
-\def\con{\par\vfill\eject % finish the section names
- \rightskip 0pt \hyphenpenalty 50 \tolerance 200
- \setpage
- \output{\normaloutput\page\lheader\rheader}
- \titletrue % prepare to output the table of contents
- \pageno=\contentspagenumber \def\rhead{TABLE OF CONTENTS}
- \message{Table of contents:}
- \topofcontents
- \line{\hfil Section\hbox to3em{\hss Page}}
- \def\Z##1##2##3{\line{\ignorespaces##1
- \leaders\hbox to .5em{.\hfil}\hfil\ ##2\hbox to3em{\hss##3}}}
- \readcontents\relax % read the contents info
- \botofcontents \end} % print the contents page(s) and terminate
-?endgroup
- at y
-\begingroup \def\tt{\eighttt} \baselineskip9pt
-\def\printmacs#1{\begingroup
- \def\do##1{\catcode`##1=12 } \dospecials
- \parskip 0pt \parindent 0pt
- \catcode`\ =13 \catcode`\^^M=13
- \tt \verbatimdefs \input #1 \endgroup}
-\printmacs{webmac}
-\vskip6pt \baselineskip12pt
-
\section Hypertext and hyperdocumentation.
-Many people have of course noticed analogies between \.{WEB} and the
-World Wide Web. The following \.{WEB} macros \.{pwebmac.tex} are in fact
-set up so that the output of \.{WEAVE} can be converted easily into
-Portable Document Format, with clickable hyperlinks that can be read
-with your favorite {\mc PDF} viewer.
-After using \.{WEAVE} with command line option `\.{-p}' to convert
-\.{cob.web} into \.{cob.tex}, you can prepare a hypertext version of
-the program by giving the commands
-$$\vbox{\halign{\.{#}\hfil\cr
-tex "\\let\\pdf+ \\input cob"\cr
-dvipdfm cob\cr}}$$
-instead of invoking \TeX\ in the normal way.
-Alternatively you can generate \.{cob.pdf} in one step by simply saying
-`\.{pdftex}~\.{cob}' or `\.{xetex}~\.{cob}' or `\.{luatex}~\.{cob}'.
-(You are advised to use the command line option `\.{--shell-escape}' with
-\.{pdftex} and \.{luatex} in order to receive ``valid'' {\mc PDF} output;
-otherwise, the internal counter for the ``Names of the sections'' part
-in the {\mc PDF} ``bookmarks'' will be incorrect.)
-
-Similar output for ``smart'' devices can be created with Martin Ruckert's
-Hi\TeX\ and its dynamic \.{HINT} format; just say `\.{hitex}~\.{cob}'.
-\.{HINT} files can be viewed with the \.{hintview} program, which is
-available from
-\pdfURL{\.{https://hint.userweb.mwn.de/hint/hintview.html}}%
- {https://hint.userweb.mwn.de/hint/hintview.html}.%
-
-A more elaborate system called \.{TWILL}, which extends the usual cross
-references of \.{WEAVE} by preparing links from the uses of identifiers
-to their definitions, is also available---provided that you are willing
-to work a bit harder in cases where an identifier is multiply defined.
-\.{TWILL} is intended primarily for hardcopy output, but its principles
-could be used for hypertext as well. It uses its own set of macros
-`\.{twimac-web.tex}'.
-
-\vskip6pt \baselineskip9pt
-\printmacs{pwebmac}
-\endgroup
-\vfill\eject
- at z
-
- at x l.1418
-The macros in \.{webmac} make it possible to produce a variety of formats
- at y
-The macros in \.{webmac} and \.{pwebmac} make it possible to produce
-a variety of formats
- at z
-
- at x l.1463
-in small caps. For example, Appendix~D was produced after saying
- at y
-in small caps. For example, \pdfURL{Appendix~D}{weave.pdf} was produced
-after saying
- at z
-
- at x l.1469
-\.{\\pageno=\\contentspagenumber} \.{\\advance\\pageno by 1}'. (Appendix~D
- at y
-\.{\\pageno=\\contentspagenumber} \.{\\advance\\pageno by 1}'.
-(\pdfURL{Appendix~D}{weave.pdf}
- at z
-
- at x l.1480
-For example, Appendix~D was produced with the following definitions:
- at y
-For example, \pdfURL{Appendix~D}{weave.pdf} was produced with the following
-definitions:
- at z
-
- at x l.1492
-for every starred module. For example, when Appendix~D was being generated,
- at y
-for every starred module. For example, when \pdfURL{Appendix~D}{weave.pdf}
-was being generated,
- at z
-
- at x l.1569
-\.{\\ch}, \.{\\fin}, and \.{\\con}. \.{WEAVE} itself need not be changed.
- at y
-\.{\\ch}, \.{\\fin}, and \.{\\con}. \.{WEAVE} itself need not be changed.
-
-\point 15. In conjunction with `\.{weave -p}' and the \.{pwebmac} macros you
-can say `\.{\\input pdfwebtocfront}' as the last command in the limbo section
-and run \TeX\ \\{twice} on your woven \.{WEB} document, in order to shift the
-table-of-contents to the front of the {\mc PDF} output.
- at z
-
- at x l.1584
-dependencies'' in the index of Appendix~E above, and figure out what changes
- at y
-dependencies'' in the index of \pdfURL{Appendix~E}{tangle.pdf} above,
-and figure out what changes
- at z
-
- at x l.1592
-first change files; then you can sure that your compiler will handle
- at y
-first change files; then you can be sure that your compiler will handle
- at z
-
- at x l.1610
-the index to Appendix~D.
- at y
-the index to \pdfURL{Appendix~D}{weave.pdf}.
- at z
-
- at x l.1617
-Appendix~E. This listing will incorporate your changes.
- at y
-\pdfURL{Appendix~E}{tangle.pdf}. This listing will incorporate your changes.
- at z
-
- at x l.1621
-Appendix~D that incorporates your changes.
- at y
-\pdfURL{Appendix~D}{weave.pdf} that incorporates your changes.
- at z
-
- at x l.1631
-\def\substep(10.#1){\par\hangindent 4em\noindent
- \hbox to 4em{\hfil(10.#1) }\ignorespaces}
- at y
-\def\substep(10.#1){\par\hangindent 3em\noindent
- \hbox to 3em{\hfil(10.#1) }\ignorespaces}
- at z
-
- at x l.1667
-computer by following Appendices D and E. Then you have to simulate the
- at y
-computer by following Appendices \pdfURL{D}{weave.pdf}
-and~\pdfURL{E}{tangle.pdf}. Then you have to simulate the
- at z
Modified: trunk/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex 2025-03-16 17:23:02 UTC (rev 74647)
+++ trunk/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex 2025-03-16 19:56:22 UTC (rev 74648)
@@ -5,7 +5,7 @@
% macro integration \`a la CWEB by Andreas Scherer <andreas_tex at freenet.de>.
% This file is not copyrighted and can be used freely.
\ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros
-\xdef\fmtversion{\fmtversion+PWEBMAC5.0}
+\xdef\fmtversion{\fmtversion+PWEBMAC5.1}
\parskip 0pt % no stretch between paragraphs
\parindent 1em % for paragraphs and for the first line of Pascal text
@@ -121,10 +121,10 @@
\ifnum\countB<`0
\ifhavenum\makenote\fi
\ifx\first.\let\next=\maketoksdone % fullstop
- \else \addtokens\toksB{\the\toksD}
+ \else\addtokens\toksB{\the\toksD}%
\ifx\first,\addtokens\toksB{\space}\fi
\fi
- \else \addtokens\toksC{\the\toksD}\global\havenumtrue
+ \else\addtokens\toksC{\the\toksD}\global\havenumtrue
\fi
\next
}
@@ -159,6 +159,7 @@
\afterassignment\makeolproctok\let\nxt= }
\def\makeolnexttok{\afterassignment\makeolproctok\let\nxt= }
\def\makeolgobbletok{\afterassignment\makeolnexttok\let\nxt= }
+\def\makeolgobbletokk{\afterassignment\makeolgobbletok\let\nxt= }
\def\addF#1{\addtokens\toksF{#1}\tokprocessedtrue}
% now comes a routine to "sanitize" section names, for pdf outlines
\def\makeolproctok{\tokprocessedfalse
@@ -193,6 +194,7 @@
\else\ifx\nxt\CPLUSPLUS\addF{C++}\let\next\makeolgobbletok % \CPLUSPLUS/
\else\ifx\nxt\CEE\addF{C}\else\ifx\nxt\Cee\addF{C}%
\else\ifx\nxt\PB \let\next\makeolgobbletok \tokprocessedtrue % \PB{...}
+ \else\ifx\nxt\9 \expandafter\nxt\relax \let\next\makeolgobbletokk % \9{#1}
\else\ifx\nxt\.\tokprocessedtrue\instrtrue % \.{...}
% skip \|
\else\ifx\nxt\\\ifinstr\addF{\bschar\bschar}\else\tokprocessedtrue\fi
@@ -205,16 +207,17 @@
\else\ifx\nxt\ \addF\space\else\ifx\nxt\#\addF{\string\#}%
\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi
\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi
+ \fi
}
\def\makeolproctokmath{%
\ifx\nxt\alpha\addF{alpha}\else\ifx\nxt\beta\addF{beta}%
\else\ifx\nxt\gamma\addF{gamma}\else\ifx\nxt\delta\addF{delta}%
\else\ifx\nxt\theta\addF{theta}\else\ifx\nxt\psqrt\addF{root\space}%
- \else\ifx\nxt\H\addF{"}\else\ifx\nxt\O\addF{'}%
- \else\ifx\nxt\v\addF{|}\else\ifx\nxt\prime\addF{'}%
- \else\ifx\nxt\K\addF{:=}\else\ifx\nxt\S\addF{==}%
+ \else\ifx\nxt\H\addF{"}\else\ifx\nxt\O\addF{'}\else\ifx\nxt\v\addF{|}%
+ \else\ifx\nxt\prime\addF{'}\else\ifx\nxt\K\addF{:=}\else\ifx\nxt\S\addF{==}%
+ \else\ifx\nxt\dots\addF{...\space}\else\ifx\nxt\<\addF{<}%
\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi
- \fi\fi
+ \fi\fi\fi\fi
}
\def\makeolproctokchar#1 #2 #3{\addF{#3}}
\def\outlinedone{\edef\outlinest{\global\noexpand\toksE={\the\toksF}}%
More information about the tex-live-commits
mailing list.