summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-10-01 20:09:39 +0000
committerKarl Berry <karl@freefriends.org>2023-10-01 20:09:39 +0000
commitb074876c74b4a7c72764cbf1205141d96b3de6fe (patch)
tree8bd1d763d4bbdb9d38824fab5fb2dc5aac945c6a /Master/texmf-dist/doc
parentfad7cf291919646cb0a7fc0ba5712a1c8775a7b2 (diff)
pwebmac (1oct23)
git-svn-id: svn://tug.org/texlive/trunk@68419 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/plain/pwebmac/README.md24
-rw-r--r--Master/texmf-dist/doc/plain/pwebmac/index.md5
-rw-r--r--Master/texmf-dist/doc/plain/pwebmac/makeall55
-rw-r--r--Master/texmf-dist/doc/plain/pwebmac/webman.ch22
4 files changed, 63 insertions, 43 deletions
diff --git a/Master/texmf-dist/doc/plain/pwebmac/README.md b/Master/texmf-dist/doc/plain/pwebmac/README.md
index 7468ba8092a..a5288c99f61 100644
--- a/Master/texmf-dist/doc/plain/pwebmac/README.md
+++ b/Master/texmf-dist/doc/plain/pwebmac/README.md
@@ -1,4 +1,4 @@
-# pwebmac – Consolidated WEB macros for DVI and PDF output
+# pwebmac – Consolidated WEB macros for DVI, PDF, and HINT output
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
@@ -12,26 +12,28 @@ 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
[CWEB](https://ctan.org/pkg/cweb) system, so `pwebmac.tex` can be used with
-“plain TeX,” “pdfTeX,” and “XeTeX” alike. And it adds full support for Martin
-Ruckert's “[HiTeX](https://ctan.org/pkg/hitex)” engine and its `HINT` output
-format.
+“plain TeX,” “pdfTeX,” “LuaTeX,” and “XeTeX” alike. And it adds full support
+for Martin Ruckert's “[HiTeX](https://ctan.org/pkg/hitex)” engine and its
+[`HINT`](https://hint.userweb.mwn.de/hint/format.html) output format.
Its initial application is the production of PDF and HINT 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 collection
-of PDF documents can be browsed in the `knuth-pdf` package and the collection
-of HINT documents are available in the `knuth-hint` package.
+works around several “quirks” in the WEB sources. The resulting collections
+of PDF and HINT documents can be browsed in the
+[`knuth-pdf`](https://ctan.org/pkg/knuth-pdf) and
+[`knuth-hint`](https://ctan.org/pkg/knuth-hint) packages.
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
created by `weave`. From there, all depends on the “TeX engine” you use:
“plain TeX” by default creates DVI output, “plain TeX” with the invocation
-`tex "\let\pdf+\input…"`, `pdftex`, and `xetex` create PDF output with
-clickable links and bookmarks (depending on your PDF viewer), and `hitex`
-creates HINT output that can be viewed with the `hintview` program.
+`tex "\let\pdf+\input…"`, `pdftex`, `luatex`, and `xetex` create PDF output
+with clickable links and bookmarks (depending on your PDF viewer), and `hitex`
+creates HINT output that can be viewed with the
+[`hintview`](https://hint.userweb.mwn.de/hint/hintview.html) program.
The `pwebmac` package is free software and may be used without constraints.
-This is version “4.8.1” of the `pwebmac` package — 2022-06-25, Andreas Scherer.
+This is version **4.9** of the `pwebmac` package — 2023-10-01, Andreas Scherer.
diff --git a/Master/texmf-dist/doc/plain/pwebmac/index.md b/Master/texmf-dist/doc/plain/pwebmac/index.md
index 59f6663e267..a580c752a66 100644
--- a/Master/texmf-dist/doc/plain/pwebmac/index.md
+++ b/Master/texmf-dist/doc/plain/pwebmac/index.md
@@ -1,5 +1,5 @@
---
-title: C/WEB programs in \TeX\ Live 2022
+title: C/WEB programs in \TeX\ Live 2023
colorlinks: true
filecolor: blue
urlcolor: blue
@@ -86,6 +86,7 @@ directly.
[`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) \]
## Errata for “Computers & Typesetting” by Donald E.\ Knuth
@@ -107,4 +108,4 @@ directly.
## Happy C/WEB Programming!
-2022-02-02 Andreas Scherer
+2023-06-11 Andreas Scherer
diff --git a/Master/texmf-dist/doc/plain/pwebmac/makeall b/Master/texmf-dist/doc/plain/pwebmac/makeall
index 0f857db24f3..05f8178589f 100644
--- a/Master/texmf-dist/doc/plain/pwebmac/makeall
+++ b/Master/texmf-dist/doc/plain/pwebmac/makeall
@@ -33,7 +33,7 @@ FILESELECT=false # user-defined '--files' selection
NEW=false # '\input pwebmac' instead of '\input webmac' for PDF et al.
OUTDIR=. # path where the resulting tarballs are placed
PDFTOCFRONT=false # push table-of-contents to front of PDF output
-TEX=tex # or 'pdftex' or 'xetex' or 'hitex'
+TEX=tex # or 'pdftex' or 'xetex' or 'hitex' or 'luatex'
VALID=false # give 'pdftex' a chance to produce valid output
# Initial list of C/WEB sources to process, overridable with option '-f':
@@ -46,7 +46,7 @@ KNUTHWARE=$(dirname $KNUTHWHERE)
FILES="$KNUTHWARE/*.web pdftex.web xetex.web twill"
WEBINPUTS=$KNUTHWARE//:
-FILES="$FILES common ctangle cweave ctwill refsort twinx ctie tie"
+FILES="$FILES common ctangle cweave ctwill refsort twinx ctie tie hitex"
CWEBINPUTS=$KNUTHWARE//:
KNUTHWHERE=$(locate /glue.web)
@@ -94,15 +94,17 @@ PDF=pdf # default extension for 'knuth-pdf'
HITEX="hitex --compress"
# HINT format
-if [ hitex = $TEX ]
+if [ hitex = "$TEX" ]
then
+ CTWILL="$CTWILL +P"
TEX="$HITEX"
PDF=hnt # default extension for 'knuth-hint'
+ PDFTOCFRONT=false # use 'hintview -h' to start with TOC page
fi
# Valid PDF output from 'pdftex': In 'pwebmac.tex' set '\countD' to the actual
# number of @<named modules@>, not the number of all sections.
-if ( [ pdftex = $TEX ] && $VALID )
+if ( [ pdftex = "$TEX" ] && $VALID )
then
TEX="$TEX --shell-escape"
fi
@@ -115,7 +117,10 @@ do
if [ ctwill = $f ]
then
# apply tons of editorial changes to 'ctwill.w'
- ctie -m $f.w cweave.w $f-w2c.ch $f-mini.ch
+ if [ "$HITEX" = "$TEX" ]
+ then ctie -m $f.w cweave.w $f-w2c.ch $f-hint.ch
+ else ctie -m $f.w cweave.w $f-w2c.ch $f-mini.ch
+ fi
cp -an $KNUTHWARE/cwebdir/*.bux .
$CTWILL $f # prime the pump
$CTWILL $f # get decent answers
@@ -129,6 +134,10 @@ do
then
weave $f # no 'glue.ch' at this time
+ elif [ hitex = $f ]
+ then
+ cweave $f # no 'hitex.ch' at this time
+
elif $CHANGES
then
case $f in
@@ -148,6 +157,9 @@ do
# TWILL is a change in and of itself
twill ) ;;
+ # HiTeX is a stand-alone version of TeX
+ hitex ) ;;
+
# all other WEB codes have singular changefiles
* ) weave $f $f ;;
esac
@@ -165,7 +177,7 @@ do
$f.tex
else
case $f in
- c* | refsort | twinx | tie ) $CWEAVE $f ;;
+ c* | refsort | twinx | tie | hitex ) $CWEAVE $f ;;
* ) weave $f ;;
esac
fi
@@ -180,6 +192,9 @@ do
# do nothing for CWEB programs
c* | refsort | twinx | tie ) ;;
+ hitex )
+ $SED_I -e "s/\(\\\\def\\\\topofcontents\)/\\\\datethis\n\\\\emergencystretch=.1\\\\hsize\n\1/" $f.tex ;;
+
bibtex | patgen | tangle | weave )
$SED_I -e "s/\(\\\\def\\\\title\)/\\\\datecontentspage\n\1/" $f.tex ;;
@@ -204,7 +219,7 @@ FI
$SED_I -e "s/{\\\\the\\\\pageno}}}\\\\next/{\\\\the\\\\pageno}{\\\\the\\\\toksE}}}\\\\next/" $f.tex
cat > texmf-pdf.patch << FI
- \ifpdftex\relax\else
+ \ifpdflua\relax\else
\ifpdf\special{pdf: outline 0 << /Title (\the\toksE) /Dest
[ @thispage /FitH @ypos ] >>}\fi\fi
FI
@@ -262,7 +277,7 @@ FI
esac
# shift table-of-contents pages to the front in PDF
- if $PDFTOCFRONT && [ ctwill != $f ]
+ if $PDFTOCFRONT && [ ctwill != $f ] && [ hitex != $f ]
then
$SED_I -e "0,/\\\\N[1{]/s/\(\\\\N[1{]\)/\\\\input pdfwebtocfront\n\n\1/" \
$f.tex
@@ -279,19 +294,20 @@ FI
fi
fi
- # only XeTeX can process XETEX.WEB
- if [ xetex = $f ]
+ if [ xetex = $f ] # only XeTeX can process XETEX.WEB
then $f $f
- elif [ ctwill = $f ]
+ elif [ ctwill = $f ] # gives two different outcomes
then
+ # sort mini-indexes
if [ "$HITEX" = "$TEX" ]
- then CTWILLTEX=pdftex
- else CTWILLTEX="$TEX"
+ then # directly in the TeX file
+ proofsort $f.tex > $f-sorted.tex
+ mv $f-sorted.tex $f.tex
+ else # in the TeX-created .ref file
+ $TEX $f
+ ctwill-refsort < $f.ref > $f.sref
fi
- $CTWILLTEX $f
- # sort mini-indexes
- ctwill-refsort < $f.ref > $f.sref
- $CTWILLTEX $f
+ $TEX $f
elif [ refsort = $f ]
then $TEX -interaction nonstopmode $f
else $TEX $f
@@ -406,13 +422,14 @@ then
$PAX "$OUTDIR/bibtex.tar.gz" -s ,^,bibtex/, bibtex.$PDF
$PAX "$OUTDIR/other.tar.gz" -s ,^,other/, \
dvicopy.$PDF patgen.$PDF pktogf.$PDF pktype.$PDF
+ $PAX "$OUTDIR/hitex.tar.gz" -s ,^,hitex/, hitex.$PDF
$PAX "$OUTDIR/pdftex.tar.gz" -s ,^,pdftex/, pdftex.$PDF
$PAX "$OUTDIR/xetex.tar.gz" -s ,^,xetex/, xetex.pdf
$PAX "$OUTDIR/ctie.tar.gz" -s ,^,ctie/, ctie.$PDF
$PAX "$OUTDIR/tie.tar.gz" -s ,^,tie/, tie.$PDF
$PAX "$OUTDIR/cweb.tar.gz" -s ,^,cweb/, \
cwebman.$PDF common.$PDF ctangle.$PDF cweave.$PDF \
- ctwill.pdf refsort.$PDF twinx.$PDF
+ ctwill.$PDF refsort.$PDF twinx.$PDF
fi
# Notes to self:
@@ -420,7 +437,7 @@ then
# (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 2022";
+ # --metadata title="C/WEB programs in TeX Live 2023";
# rm index.tex
# (2) Prepare a super-tarball from all the contents of these
# individual tarballs (42/53 and 34/54) with either of
diff --git a/Master/texmf-dist/doc/plain/pwebmac/webman.ch b/Master/texmf-dist/doc/plain/pwebmac/webman.ch
index e781ee01dc3..1663836f422 100644
--- a/Master/texmf-dist/doc/plain/pwebmac/webman.ch
+++ b/Master/texmf-dist/doc/plain/pwebmac/webman.ch
@@ -5,7 +5,7 @@
\ifpdf
\pdfpagewidth=\pagewidth \advance\pdfpagewidth by 2cm
\pdfpageheight=\pageheight \advance\pdfpageheight by 3cm
- \ifpdftex \pdfhorigin=1cm \pdfvorigin=1cm
+ \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
@@ -20,11 +20,11 @@
\def\bkminfo{}
\outer\def\section #1.{\penalty-50\vskip 12pt plus 3pt minus 3pt
\noindent\ifpdf\vbox to 0pt{\kern-2.5ex\relax
- \ifpdftex\pdfdest num \destcount fitbh\relax
+ \ifpdflua\pdfdest num \destcount fitbh\relax
\else\special{pdf: dest (\the\destcount) [ @thispage /FitBH @ypos ]}\fi
\def\.##1{##1}%
\ifx\bkminfo\empty\def\sectitle{#1}\else\def\sectitle{#1 (\bkminfo)}\fi
- \ifpdftex\pdfoutline goto num \destcount {\sectitle}\relax
+ \ifpdflua\pdfoutline goto num \destcount {\sectitle}\relax
\else\special{pdf: outline 0 << /Title (\sectitle)
/A << /S /GoTo /D (\the\destcount) >> >>}\fi
\gdef\bkminfo{}%
@@ -32,20 +32,20 @@
\kern2.5ex\relax
}\fi{\bf #1.}\quad\ignorespaces}
-\def\appA{7}
-\def\appB{8}
-\def\appC{9}
+\def\appA{8}
+\def\appB{9}
+\def\appC{10}
\def\appD{0}
\def\appE{0}
-\def\appF{10}
-\def\appG{11}
-\def\appH{12}
+\def\appF{11}
+\def\appG{12}
+\def\appH{13}
\def\Appendix#1{\leavevmode
\ifnum\csname app#1\endcsname>0 %
- \ifpdf\ifpdftex
+ \ifpdf\ifpdflua
\pdfstartlink attr{/Border[0 0 0]} goto num\csname app#1\endcsname\relax
- \PDFlinkcolor\hbox{Appendix}~#1\Black
+ \Blue\hbox{Appendix}~#1\Black
\pdfendlink
\else
\setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{\hbox{Appendix}~#1}%