texlive[55379] Master/texmf-dist: pwebmac (1jun20)

commits+karl at tug.org commits+karl at tug.org
Mon Jun 1 23:10:27 CEST 2020


Revision: 55379
          http://tug.org/svn/texlive?view=revision&revision=55379
Author:   karl
Date:     2020-06-01 23:10:27 +0200 (Mon, 01 Jun 2020)
Log Message:
-----------
pwebmac (1jun20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/plain/pwebmac/README.md
    trunk/Master/texmf-dist/doc/plain/pwebmac/makeall
    trunk/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex

Modified: trunk/Master/texmf-dist/doc/plain/pwebmac/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/plain/pwebmac/README.md	2020-06-01 21:09:20 UTC (rev 55378)
+++ trunk/Master/texmf-dist/doc/plain/pwebmac/README.md	2020-06-01 21:10:27 UTC (rev 55379)
@@ -28,4 +28,4 @@
 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.

Modified: trunk/Master/texmf-dist/doc/plain/pwebmac/makeall
===================================================================
--- trunk/Master/texmf-dist/doc/plain/pwebmac/makeall	2020-06-01 21:09:20 UTC (rev 55378)
+++ trunk/Master/texmf-dist/doc/plain/pwebmac/makeall	2020-06-01 21:10:27 UTC (rev 55379)
@@ -41,25 +41,43 @@
 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 @@
 
 	# 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 @@
 		# 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,6 +146,19 @@
 					}" $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
@@ -131,7 +165,8 @@
 	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 @@
 		-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

Modified: trunk/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex	2020-06-01 21:09:20 UTC (rev 55378)
+++ trunk/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex	2020-06-01 21:10:27 UTC (rev 55379)
@@ -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



More information about the tex-live-commits mailing list.