summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-06-02 03:03:19 +0000
committerNorbert Preining <norbert@preining.info>2020-06-02 03:03:19 +0000
commit51cae99db4d58606cdce9181fd1f4c94e1a019de (patch)
treef685715c30d06a284e8c0a0f8cd62a22ce42079f /web
parent6a81e69e8cf1f56e4715ede8d84cdce284117970 (diff)
CTAN sync 202006020303
Diffstat (limited to 'web')
-rw-r--r--web/pwebmac/README.md2
-rwxr-xr-xweb/pwebmac/makeall63
-rw-r--r--web/pwebmac/pwebmac.tex18
3 files changed, 65 insertions, 18 deletions
diff --git a/web/pwebmac/README.md b/web/pwebmac/README.md
index c2aeee9760..924b1d11d4 100644
--- a/web/pwebmac/README.md
+++ b/web/pwebmac/README.md
@@ -28,4 +28,4 @@ created by `weave`. From there, all depends on the “TeX engine” you use:
clickable links and bookmarks (depending on your PDF viewer).
The `pwebmac` package is free software and may be used without restraints.
-This is version “4.5.1” of the `pwebmac` package — 2020-05-29, AS.
+This is version “4.5.2” of the `pwebmac` package — 2020-06-01, AS.
diff --git a/web/pwebmac/makeall b/web/pwebmac/makeall
index 0ceba6f511..6f0762a8d9 100755
--- a/web/pwebmac/makeall
+++ b/web/pwebmac/makeall
@@ -41,25 +41,43 @@ done
KNUTHWHERE=$(locate /bibtex.web)
KNUTHWARE=$(dirname $KNUTHWHERE)
+export CWEBINPUTS=$KNUTHWARE//:
+export WEBINPUTS=$KNUTHWARE//:
+
+# WEB and CWEB programs we want to get formatted; 'xetex.web' must be last,
+# because it switches the TEX engine!
for f in \
$KNUTHWARE/*.web \
- $KNUTHWARE/pdftexdir/pdftex.web \
- $KNUTHWARE/xetexdir/xetex.web
+ common ctangle cweave ctwill ctie tie \
+ pdftex.web xetex.web
do
if $CHANGES
then
- c=$(basename $f .web)
- case $c in
- "pdftex"|"xetex" )
- c=$KNUTHWARE/$c
- c=$(echo $c | sed -e 's?\(texk/\)?Work/\1?') ;;
- * ) c=$KNUTHWARE/$c ;;
+ c=$(basename $f .web).ch
+
+ # pdftex.ch and xetex.ch for TeX Live are here
+ WEBINPUTS=$KNUTHWARE/../../Work//:$WEBINPUTS:
+
+ case $f in
+ *.web ) weave $f $c ;;
+ "common" ) cweave -f $f comm-w2c ;;
+ "ctangle" ) cweave -f $f ctang-w2c ;;
+ "cweave" ) cweave -f $f cweav-w2c ;;
+ "ctwill" ) cweave -f cweave $f-w2c $f ;;
+ "ctie" ) cweave -f $f $f-k ;;
+ "tie" ) cweave -f $f $f-w2c ;;
esac
- weave $f $c.ch
- sed -i -e "s/\(\\\\let\\\\maybe=\)\\\\iftrue/\1\\\\iffalse/" \
+
+ # make full documentation with changes applied
+ sed -i -e "s/\(\\\\let\\\\maybe=\)\\\\iffalse/\1\\\\iftrue/" \
$(basename $f .web).tex
else
- weave $f
+ case $f in
+ *.web ) weave $f ;;
+ "common"|"ctangle"|"cweave"|"ctie"|"tie" )
+ cweave -f $f ;;
+ "ctwill" ) cweave -f cweave $f-w2c $f ;;
+ esac
fi
f=$(basename $f .web)
@@ -72,6 +90,7 @@ do
# replace former convention to indicate "not a title page"
# to include page headers for table-of-contents
+ # FIX: most of the WEB codes will be corrected.
sed -i -e "s/\\\\def\\\\titlepage{F}/\\\\titlefalse/" $f.tex
# special treatment for individual WEB programs
@@ -79,10 +98,12 @@ do
# purge conflict between bibtex.web and webmac.tex
# '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 -e "s/titlefalse/titletrue/" \
-e "70,77d" $f.tex ;;
# make room for new material in weave.web
+ # FIX: should be fixed upstream.
"tangle" ) sed -i -e "s/number{123}/number{125}/" $f.tex ;;
# amend '\N' redefinition for PDF outlines in mf.tex and
@@ -125,13 +146,27 @@ FI
}" $f.tex
rm texmf-pdf.patch
fi ;;
+
+ "common"|"ctangle"|"cweave"|"ctwill"|"ctie"|"tie" )
+ # Use nicer format for C comments and assignment
+ sed -i -e "1 s/\(\\\\input cwebmac\)/\1\n\\\\input Xcwebmac/" \
+ $f.tex
+
+ # 'cwebmac.tex' needs a little push for 'xetex'
+ # FIX: should be fixed upstream in 'cwebmac.tex'.
+ if [ "xetex" = $TEX ]
+ then
+ sed -i -e "1 s/\(\\\\input cwebmac\)/\\\\let\\\\pdf+\n\1\n/" \
+ $f.tex
+ fi ;;
esac
if $PDFTOCFRONT
then
# shift table-of-contents pages to the front in PDF
sed -i -e "1 s/\(webmac\)/\1\n\\\\input pdfwebtocfront/" $f.tex
- $TEX $f.tex # run TeX twice
+ sed -i -e "2 s/\(cwebmac\)/\1\n\\\\input pdfwebtocfront/" $f.tex
+ $TEX $f # run TeX twice
fi
$TEX $f
@@ -153,6 +188,10 @@ then
-wvzf $OUTDIR/other.tar.gz -s ,^,other/,
pax pdftex.pdf -wvzf $OUTDIR/pdftex.tar.gz -s ,^,pdftex/,
pax xetex.pdf -wvzf $OUTDIR/xetex.tar.gz -s ,^,xetex/,
+ pax ctie.pdf -wvzf $OUTDIR/ctie.tar.gz -s ,^,ctie/,
+ pax tie.pdf -wvzf $OUTDIR/tie.tar.gz -s ,^,tie/,
+ pax common.pdf ctangle.pdf cweave.pdf ctwill.pdf \
+ -wvzf $OUTDIR/cweb.tar.gz -s ,^,cweb/,
fi
exit 0
diff --git a/web/pwebmac/pwebmac.tex b/web/pwebmac/pwebmac.tex
index 648064e650..47390e217a 100644
--- a/web/pwebmac/pwebmac.tex
+++ b/web/pwebmac/pwebmac.tex
@@ -10,7 +10,7 @@
% Uncomment the following line if you want PDF goodies to be the default
%\ifx\pdf-\else\pdftrue\fi
\def\pdflinkcolor{0 0 1} % the RGB values for hyperlink color
-\ifx\undefined\XeTeXlinebreakpenalty\else\pdftrue\fi % XeTeX produces PDF output
+\ifx\undefined\XeTeXrevision\else\pdftrue\fi % XeTeX produces PDF output
\newif\ifpdftex
\ifx\pdfoutput\undefined \pdftexfalse \else\ifnum\pdfoutput=0 \pdftexfalse
\else \pdftextrue \pdfoutput=1
@@ -215,7 +215,8 @@
\def\MN#1.{\par % common code for \M, \N
{\xdef\modstar{#1}\let\*=\empty\xdef\modno{#1}}% remove \* from section name
\ifx\modno\modstar \onmaybe \else\ontrue \fi
- \mark{\modno}}
+ \mark{{{\tensy x}\modno}{\rhead}}}
+% each \mark is {section reference or null}{group title}
\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
@@ -246,9 +247,14 @@
\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
+ \hfill\title\qquad\mainfont\topsecno} % top line on left-hand pages
+\def\rheader{\mainfont\topsecno\eightrm\qquad\title\hfill
\rhead\qquad\mainfont\the\pageno} % top line on right-hand pages
+\def\topsecno{\expandafter\takeone\topmark}
+\def\takeone#1#2{#1}
+\def\taketwo#1#2{#2}
+\def\nullsec{\eightrm\kern-2em} % the \kern-2em cancels \qquad in headers
+
%\let\page=\pagebody \raggedbottom % cweb 3.2 uses this instead of next line
\def\page{\box255 }\normalbottom % faster, but loses plain TeX footnotes
\def\normaloutput#1#2#3{\ifodd\pageno\hoffset=\pageshift\fi
@@ -260,6 +266,7 @@
\global\advance\pageno by1}
\def\rhead{\.{WEB} OUTPUT} % this running head is reset by starred sections
+\mark{\noexpand\nullsec{\rhead}}
\def\title{\expandafter\uppercase\expandafter{\jobname}}
\def\topofcontents{\centerline{\titlefont\title}\vskip.7in
\vfill} % this material will start the table of contents page
@@ -278,7 +285,7 @@
\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}
+\def\readcontents{\input \contentsfile}
\newwrite\cont
\output{\setbox0=\page % the first page is garbage
@@ -324,6 +331,7 @@
\ifpdftex \makebookmarks \fi % added in Version 4.5
\parfillskip 0pt plus 1fil
\def\rhead{NAMES OF THE SECTIONS}
+ \let\topsecno=\nullsec
\message{Section names:}
\output={\normaloutput\page\lheader\rheader}
\setpage