summaryrefslogtreecommitdiff
path: root/web/pwebmac/makeall
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-05-25 03:00:53 +0000
committerNorbert Preining <norbert@preining.info>2024-05-25 03:00:53 +0000
commit737e568a228eca50e9aeabe3116e1fe8116d27d5 (patch)
tree37a2c52f123e7822ce21f171f8c628aa9fb2288e /web/pwebmac/makeall
parent963914ddc7252b9f6d59db0e1d393f28c658917b (diff)
CTAN sync 202405250300
Diffstat (limited to 'web/pwebmac/makeall')
-rwxr-xr-xweb/pwebmac/makeall66
1 files changed, 44 insertions, 22 deletions
diff --git a/web/pwebmac/makeall b/web/pwebmac/makeall
index b5b53ff72e..6be5b6e91a 100755
--- a/web/pwebmac/makeall
+++ b/web/pwebmac/makeall
@@ -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 hitex"
+FILES="$FILES common ctangle cweave ctwill refsort twinx ctie tie hitex mp"
CWEBINPUTS=$KNUTHWARE//:
KNUTHWHERE=$(locate /glue.web)
@@ -92,7 +92,8 @@ 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.
-WEAVE="weave"
+WEAVE=weave
+XETEX=xetex
case "$TEX" in
hitex ) # HINT format
@@ -105,6 +106,10 @@ case "$TEX" in
pdftex | luatex ) # actually only necessary for 'pwebmac.tex'
VALID=true ;;
+ tex ) # plain TeX
+ XETEX="$XETEX --no-pdf" # XeTeX's extended DVI format
+ VALID=false ;;
+
* ) VALID=false ;; # plain TeX and XeTeX use different approach
esac
@@ -126,10 +131,26 @@ for f in $FILES
do
f=$(basename $f .web)
- if $CHANGES && echo $f | grep -v -q -E 'twill|glue|hitex'
- # These are changes in and of themselves
+ case $f in
+ pdftex ) # Fix several 'Overfull \hbox'es
+ tie -m $f.web $f.web /opt/github/web/$f.ch ;;
+
+ hitex | mp ) # Beautifications for 'hitex.w' and 'mp.w'
+ tie -m $f.w $f.w /opt/github/web/$f.ch ;;
+
+ weave | twill )
+ cp $KNUTHWARE/weave.web .
+ if [ "$HITEX" = "$TEX" ] # Fix non-constant factor
+ then $SED_I -e "s/\\\\the\\\\hsize/460pt/" weave.web
+ fi ;;
+ esac
+
+ if $CHANGES
then
case $f in
+ # These are changes in and of themselves
+ ctwill | twill | glue | hitex | mp ) continue ;;
+
# CWEB programs have individual changefiles
common ) $CWEAVE $f comm-w2c ;;
ctangle ) $CWEAVE $f ctang-w2c ;;
@@ -140,7 +161,7 @@ do
# main WEB programs have complex change files
tex | mf | pdftex | xetex )
- WEBINPUTS=$KNUTHWARE/../../Work//:$WEBINPUTS: \
+ WEBINPUTS=.:$KNUTHWARE/../../Work//:$WEBINPUTS: \
$WEAVE $f $f-final
# FIX: XeTeX uses '\pdfTeX' from section 114,
@@ -168,22 +189,27 @@ do
$CTWILL $f # prime the pump
$CTWILL $f ;; # get decent answers
- c* | refsort | twinx | tie | hitex ) $CWEAVE $f ;;
+ c* | refsort | twinx | tie ) $CWEAVE $f ;;
+
+ hitex | mp ) CWEBINPUTS=.: $CWEAVE $f ;;
twill )
+ WEBINPUTS=.:$WEBINPUTS \
tie -m $f.web weave.web weave.ch weav-$f.ch
- $WEAVE $f ;;
+ WEBINPUTS=.: $WEAVE $f ;;
+
+ pdftex | weave ) WEBINPUTS=.: $WEAVE $f ;;
* ) $WEAVE $f ;;
esac
fi
# 'pwebmac' is for WEB only; do nothing for CWEB programs
- if $NEW && echo $f | grep -v -q -E '^c|refsort|twinx|tie|hitex'
+ if $NEW && echo $f | grep -v -q -E '^c|refsort|twinx|tie|hitex|mp'
then
# timestamp on table-of-contents page or the first page
case $f in
- bibtex | patgen | tangle | weave )
+ bibtex | patgen | tangle | weave | twill )
$SED_I -e "s/\(\\\\def\\\\title\)/\\\\datecontentspage\n\1/" $f.tex ;;
mf | tex | pdftex | xetex )
@@ -259,7 +285,7 @@ FI
xetex ) $SED_I -e "/\\\\input xewebmac/d" $f.tex ;;
# timestamp on table-of-contents page or the first page
- hitex ) $SED_I -e "s/\(\\\\def\\\\topofcontents\)/\\\\datethis\n\\\\emergencystretch=.1\\\\hsize\n\1/" $f.tex ;;
+ hitex | mp ) $SED_I -e "s/\(\\\\def\\\\topofcontents\)/\\\\datethis\n\\\\emergencystretch=.1\\\\hsize\n\1/" $f.tex ;;
esac
# shift table-of-contents pages to the front in PDF
@@ -269,7 +295,7 @@ FI
# only XeTeX can process XETEX.WEB
if [ xetex = $f ]
- then $f $f # run TeX twice
+ then $XETEX $f # run XeTeX twice
else $TEX $f # run TeX twice
fi
@@ -280,13 +306,12 @@ FI
fi
case $f in
- xetex ) $f $f ;; # only XeTeX can process XETEX.WEB
+ xetex ) $XETEX $f ;; # only XeTeX can process XETEX.WEB
ctwill ) # gives two different outcomes
if [ "$HITEX" = "$TEX" ] # sort mini-indexes
then # directly in the TeX file
- ctwill-proofsort < $f.tex > $f-sorted.tex
- mv $f-sorted.tex $f.tex
+ ( ctwill-proofsort < $f.tex ) 1<> $f.tex
else # in the TeX-created .ref file
$TEX $f
ctwill-refsort < $f.ref > $f.sref
@@ -306,8 +331,7 @@ then
then
for f in *.$PDF
do
- case $f in
- *-changes.$PDF ) rm -f $f; continue ;;
+ case $f in *-changes.$PDF ) rm -f $f; continue ;;
esac
mv $f $(basename $f .$PDF)-changes.$PDF
done
@@ -375,17 +399,14 @@ then
touch pages.tex # let 'manmac' produce output at all
for f in tripman trapman webman cwebman
- do
- $TEX $f
+ do $TEX $f
done
$TEX -jobname=errorlog /opt/github/web/Xerrorlog.tex
for f in one two three four five six seven eight nine ten \
eleven twelve
- do
- $TEX errata.$f
- mv errata.$PDF errata.$f.$PDF
+ do $TEX -jobname errata.$f errata.$f
done
$TEX errata
@@ -406,6 +427,7 @@ then
$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/mp.tar.gz" -s ,^,mp/, mp.$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
@@ -420,7 +442,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 2023";
+ # --metadata title="C/WEB programs in TeX Live";
# rm index.tex
# (2) Prepare a super-tarball from all the contents of these
# individual tarballs (42/53 and 34/54) with either of