texlive[55277] Master: pwebmac (25may20)

commits+karl at tug.org commits+karl at tug.org
Mon May 25 23:19:51 CEST 2020


Revision: 55277
          http://tug.org/svn/texlive?view=revision&revision=55277
Author:   karl
Date:     2020-05-25 23:19:51 +0200 (Mon, 25 May 2020)
Log Message:
-----------
pwebmac (25may20)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/libexec/ctan2tds
    trunk/Master/tlpkg/tlpsrc/collection-plaingeneric.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/plain/pwebmac/
    trunk/Master/texmf-dist/doc/plain/pwebmac/LICENSE
    trunk/Master/texmf-dist/doc/plain/pwebmac/README.md
    trunk/Master/texmf-dist/doc/plain/pwebmac/makeall
    trunk/Master/texmf-dist/tex/plain/pwebmac/
    trunk/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex
    trunk/Master/tlpkg/tlpsrc/pwebmac.tlpsrc

Added: trunk/Master/texmf-dist/doc/plain/pwebmac/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/plain/pwebmac/LICENSE	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/plain/pwebmac/LICENSE	2020-05-25 21:19:51 UTC (rev 55277)
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Andreas Scherer
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

Added: trunk/Master/texmf-dist/doc/plain/pwebmac/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/plain/pwebmac/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/plain/pwebmac/README.md	2020-05-25 21:19:51 UTC (rev 55277)
@@ -0,0 +1,31 @@
+# pwebmac – Consolidated WEB macros for DVI and PDF 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
+will never be modified (apart from catastrophic errors).
+Hàn Thế Thành has modified these macros in his `pdfwebmac.tex` for PDF output
+(only) with [pdfTeX](https://ctan.org/pkg/pdftex).
+Jonathan Kew's [XeTeX](https://ctan.org/pkg/xetex) has similar macros
+`xewebmac.tex` by Khaled Hosny that _modify_ `webmac.tex` for PDF output;
+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.
+
+Its initial application is the production of PDF 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.
+
+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).
+
+The `pwebmac` package is free software and may be used and distributed
+according to the MIT License as shipped with the original distribution.


Property changes on: trunk/Master/texmf-dist/doc/plain/pwebmac/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/plain/pwebmac/makeall
===================================================================
--- trunk/Master/texmf-dist/doc/plain/pwebmac/makeall	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/plain/pwebmac/makeall	2020-05-25 21:19:51 UTC (rev 55277)
@@ -0,0 +1,151 @@
+#!/bin/sh
+
+LONGOPTS=changes,new,pdftocfront,tex:
+SHRTOPTS=cnpt:
+
+CHANGES=false
+NEW=false
+PDFTOCFRONT=false
+TEX=tex
+
+getopt -T >/dev/null
+
+if [ $? -eq 4 ] # Check for Linux-getopt with extensions
+then OPTS=$(getopt -n downloadable-programs -o $SHRTOPTS -l $LONGOPTS -- "$@")
+else OPTS=$(getopt $SHRTOPTS $*)
+fi
+
+if [ $? -eq 0 ] # Check return code from getopt
+then eval set -- "$OPTS"
+else echo "Failed to parse options." >&2; exit 1
+fi
+
+while true
+do
+	case "$1" in
+		-c | --changes ) CHANGES=true; shift ;;
+		-n | --new ) NEW=true; export TEXINPUTS=".:/opt/github/web//:"
+			shift ;;
+		-p | --pdftocfront ) PDFTOCFRONT=true; shift ;;
+		-t | --tex ) TEX="$2"; shift 2 ;;
+		-- ) shift; break ;;
+		* ) break ;;
+	esac
+done
+
+KNUTHWHERE=$(locate /bibtex.web)
+KNUTHWARE=$(dirname $KNUTHWHERE)
+
+for f in \
+	$KNUTHWARE/*.web \
+	$KNUTHWARE/pdftexdir/pdftex.web \
+	$KNUTHWARE/xetexdir/xetex.web
+do
+	if $CHANGES
+	then
+		c=$(basename $f .web).ch
+		case $c in
+			"pdftex.ch"|"xetex.ch" )
+				c=$KNUTHWARE/$c
+				c=$(echo $c | sed -e 's?\(texk/\)?Work/\1?') ;;
+			* ) c=$KNUTHWARE/$c ;;
+		esac
+		weave $f $c
+		sed -i -e "s/\(\\\\let\\\\maybe=\)\\\\iftrue/\1\\\\iffalse/" \
+			$(basename $f .web).tex
+	else
+		weave $f
+	fi
+
+	f=$(basename $f .web)
+
+	# use extended macros for TeX Live PDF documentation
+	if $NEW
+	then
+		sed -i -e "1 s/\\\\input webmac/\\\\input pwebmac/" $f.tex
+	fi
+
+	# replace former convention to indicate "not a title page"
+	# to include page headers for table-of-contents
+	sed -i -e "s/\\\\def\\\\titlepage{F}/\\\\titlefalse/" $f.tex
+
+	# special treatment for individual WEB programs
+	case $f in
+		# purge conflict between bibtex.web and webmac.tex
+		# 'E' no longer free to be active character
+		# fix table-of-contents page for bibtex
+		"bibtex") sed -i -e "s/titlefalse/titletrue/" \
+			-e "70,77d" $f.tex ;;
+
+		# make room for new material in weave.web
+		"tangle" ) sed -i -e "s/number{123}/number{125}/" $f.tex ;;
+
+		# amend '\N' redefinition for PDF outlines in mf.tex and
+		# tex.tex (also pdftex.web and xetex.web); depends on the
+		# extended 'pwebmac.tex' macros
+		"mf"|"tex"|"pdftex"|"xetex" )
+			if [ "xetex" = $f ]
+			then
+				# purge obsolete macros from XeTeX
+				sed -i -e "/\\\\input xewebmac/d" $f.tex
+				# only XeTeX can process XeTeX
+				TEX=xetex
+			fi
+			if $NEW
+			then
+				if [ "pdftex" = $f ]
+				then
+					# pdfTeX has a looong table-of-contents
+					cat > pdftex.patch << FI
+  \advance\vsize by 4\baselineskip
+  \ifacro\advance\pdfpageheight by 4\baselineskip\fi
+FI
+					sed -i -e "/\\\\def\\\\topofcontents.*/ {
+						r pdftex.patch
+						}"  $f.tex
+				fi
+				cat > texmf-pdf.patch << FI
+  \ifacro{\toksF={}\makeoutlinetoks{[#2] #3}\outlinedone\outlinedone}\fi
+FI
+				sed -i -e "/\\\\outer\\\\def\\\\N.*/ {
+					r texmf-pdf.patch
+					}" $f.tex
+				cat > texmf-pdf.patch << FI
+  \ifpdf\special{pdf: outline 0 << /Title (\the\toksE) /Dest
+    [ @thispage /FitH @ypos ] >>}\fi
+FI
+				sed -i -e "/  \\\\edef\\\\next.*/ {
+					r texmf-pdf.patch
+					}" $f.tex
+				rm texmf-pdf.patch
+			fi ;;
+	esac
+
+	if $PDFTOCFRONT
+	then
+		# shift table-of-contents pages to the front in PDF
+		export TEXINPUTS=".:/opt/github/cwebbin//:"$TEXINPUTS
+		sed -i -e "1 s/\(webmac\)/\1\n\\\\input pdfwebtocfront/" $f.tex
+		$TEX $f.tex # run TeX twice
+	fi
+
+	$TEX $f
+done
+
+if $PDFTOCFRONT
+then
+	# create tarballs for publication
+	pax vftovp.pdf vptovf.pdf -wvzf etc.tar.gz -s ,^,etc/,
+	pax mf.pdf -wvzf mf.tar.gz -s ,^,mf/,
+	pax gftodvi.pdf gftopk.pdf gftype.pdf mft.pdf \
+		-wvzf mfware.tar.gz -s ,^,mfware/,
+	pax tex.pdf -wvzf tex.tar.gz -s ,^,tex/,
+	pax dvitype.pdf pltotf.pdf pooltype.pdf tftopl.pdf \
+		-wvzf texware.tar.gz -s ,^,texware/,
+	pax tangle.pdf weave.pdf -wvzf web.tar.gz -s ,^,web/,
+	pax bibtex.pdf -wvzf bibtex.tar.gz -s ,^,bibtex/,
+	pax dvicopy.pdf patgen.pdf pktogf.pdf pktype.pdf \
+		-wvzf other.tar.gz -s ,^,other/,
+	pax pdftex.pdf -wvzf pdftex.tar.gz -s ,^,pdftex/,
+	pax xetex.pdf -wvzf xetex.tar.gz -s ,^,xetex/,
+fi


Property changes on: trunk/Master/texmf-dist/doc/plain/pwebmac/makeall
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex	2020-05-25 21:19:51 UTC (rev 55277)
@@ -0,0 +1,392 @@
+% standard macros for WEB listings (in addition to PLAIN.TEX)
+% pdfTeX adjustments provided by Han The Thanh <thanh at pdftex.org>.
+% XeTeX adjustments provided by Khaled Hosny <khaledhosny at eglug.org>.
+% macro integration \`a la CWEB by Andreas Scherer <andreas_tex at freenet.de>.
+\ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros
+\xdef\fmtversion{\fmtversion+WEBMAC4.5}
+\newif\ifpdf
+\ifx\pdf+\pdftrue\fi
+% 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
+\newif\ifpdftex
+\ifx\pdfoutput\undefined \pdftexfalse \else\ifnum\pdfoutput=0 \pdftexfalse
+\else \pdftextrue \pdfoutput=1
+  \def\Black{\pdfliteral{0 g 0 G}}  % use rgb colors for direct PDF output too
+  \def\Blue{\pdfliteral{0 0 1 rg 0 0 1 RG}}
+\fi\fi
+\newif\ifacro \ifpdf\acrotrue\fi \ifpdftex\acrotrue\fi
+
+\parskip 0pt % no stretch between paragraphs
+\parindent 1em % for paragraphs and for the first line of Pascal text
+
+\font\eightrm=cmr8
+\let\sc=\eightrm % for smallish caps (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)
+\fontdimen7\tentex=0pt % no double space after sentences
+
+\def\\#1{\leavevmode\hbox{\it#1\/\kern.05em}} % italic type for identifiers
+\def\|#1{\leavevmode\hbox{$#1$}} % one-letter identifiers look better this way
+\def\&#1{\leavevmode\hbox{\bf
+  \def\_{\kern.04em\vbox{\hrule width.3em height .6pt}\kern.08em}%
+  #1\/\kern.05em}} % boldface type for reserved words
+\def\.#1{\leavevmode\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
+
+\newskip\intersecskip \intersecskip=12pt minus 3pt % space between sections
+\let\yskip=\smallskip
+\def\to{\mathrel{.\,.}} % double dot, used only in math mode
+\def\note#1#2.{\Y\noindent{\hangindent2em%
+    \baselineskip10pt\eightrm#1~\ifacro{\pdfnote#2.}\else#2\fi.\par}}
+
+\newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD
+\newtoks\toksE \newtoks\toksF \newtoks\usersanitizer
+\newcount\countA \countA=0 \newcount\countB \countB=0
+\newcount\countC \countC=0
+\newif\iftokprocessed \newif\ifTnum \newif\ifinstr
+{\def\\{\global\let\spacechar= }\\ }
+
+\ifacro % The following are pdf macros from 'cwebmac.tex 3.70'
+\def\thewidth{\the\wd0 \space}
+\def\theheight{\the\ht\strutbox\space}
+\def\thedepth{\the\dp\strutbox\space}
+\ifpdftex
+  \ifx\pdfannotlink\undefined\let\pdfannotlink\pdfstartlink\fi% for pdfTeX 0.14
+  \def\pdflink#1#2{\hbox{\pdfannotlink height\ht\strutbox depth\dp\strutbox
+    attr{/Border [0 0 0]} goto num #1 \Blue #1\Black\pdfendlink}}
+\else\def\pdflink#1#2{\setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{#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 (#2) >> >>}\box0\relax}\fi
+\def\pdfnote#1.{\setbox0=\hbox{\toksA={#1.}\toksB={}\maketoks}\the\toksA}
+\def\firstsecno#1.{\setbox0=\hbox{\toksA={#1.}\toksB={}%
+    \def\makenote{\addtokens\toksB{\the\toksC}\def\makenote{\toksD={}
+      \toksC={}\let\space\empty}\makenote}\maketoks}}
+\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
+\def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}%
+  \ifcat\noexpand\first0\countB=`#1\else\countB=0\fi\toksA={#2}}
+\def\maketoks{\expandafter\poptoks\the\toksA|ENDTOKS|%
+  \ifnum\countB>`9 \countB=0 \fi
+  \ifnum\countB<`0
+    \ifnum0=\countC\else\makenote\fi
+    \ifx\first.\let\next=\maketoksdone\else
+        \let\next=\maketoks
+        \addtokens\toksB{\the\toksD}
+        \ifx\first,\addtokens\toksB{\space}\fi
+    \fi
+  \else \addtokens\toksC{\the\toksD}\global\countC=1\let\next=\maketoks
+  \fi
+  \next
+}
+\def\makenote{\addtokens\toksB
+    {\noexpand\pdflink{\the\toksC}{\romannumeral\the\toksC}}\toksC={}\global\countC=0}
+\def\maketoksdone{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
+\def\pdfURL#1#2{\ifpdftex\pdfannotlink height\ht\strutbox depth\dp\strutbox
+  attr {/Border [0 0 0]} user { /Type /Action /Subtype /Link /A
+      << /S /URI /URI (#2) >>}\Blue #1\Black \pdfendlink
+  \else \ifpdf{\setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{#1}%
+    \special{pdf: ec}}\special{pdf: ann width \thewidth\space height \theheight
+      \space depth \thedepth\space << /Border [0 0 0]
+      /Type /Action /Subtype /Link /A << /S /URI /URI (#2) >> >>}\box0\relax}%
+  \else #1 ({\tt#2})\fi\fi}
+{\catcode`\~=12 \gdef\TILDE/{~}} % ~ in a URL
+{\catcode`\_=12 \gdef\UNDER/{_}} % _ in a URL
+\def\sanitizecommand#1#2{\addtokens\usersanitizer
+       {\noexpand\dosanitizecommand\noexpand#1{#2}}}
+\def\dosanitizecommand#1#2{\ifx\nxt#1\addF{#2}\fi}
+\sanitizecommand\to{..} % a trivial example
+
+\catcode`\[=1 \catcode`\]=2 \catcode`\{=12 \catcode`\}=12
+  \def\lbchar[{]  \def\rbchar[}]
+\catcode`\[=12 \catcode`\]=12 \catcode`\{=1 \catcode`\}=2
+\catcode`\~=12 \def\tildechar{~}  \catcode`\~=13
+\catcode`\|=0 |catcode`|\=12 |def|bschar{\} |catcode`|\=0 \catcode`\|=12
+\def\makeoutlinetoks{\Tnumfalse\afterassignment\makeolproctok\let\nxt= }
+\def\makeolnexttok{\afterassignment\makeolproctok\let\nxt= }
+\def\makeolgobbletok{\afterassignment\makeolnexttok\let\nxt= }
+\def\addF#1{\addtokens\toksF{#1}\tokprocessedtrue}
+% now comes a routine to "sanitize" section names, for pdf outlines
+\def\makeolproctok{\tokprocessedfalse
+  \let\next\makeolnexttok % default
+  \ifx\nxt\outlinedone\let\next\outlinedone
+  \else\ifx{\nxt \else\ifx}\nxt \Tnumfalse \instrfalse % skip braces
+  \else\ifx$\nxt % or a $ sign
+  \else\ifx^\nxt \addF^\else\ifx_\nxt \addF_% sanitize ^ and _
+  \else\ifx\nxt\spacechar \addF\space
+  \else\if\noexpand\nxt\relax % we have a control sequence; is it one we know?
+    \ifx\nxt~\addF\space
+    \else\ifx\nxt\onespace\addF\space
+    \else\the\usersanitizer % if not recognised, skip it
+    \fi\fi
+   \else  % we don't have a control sequence, it's an ordinary char
+    \ifx/\nxt \addF{\string\/}% quote chars special to PDF with backslash
+    \else\ifx(\nxt \addF{\string\(}\else\ifx)\nxt \addF{\string\)}%
+    %\else\ifx[\nxt \addF{\string\[}\else\ifx]\nxt \addF{\string\]}%
+    \else\expandafter\makeolproctokchar\meaning\nxt
+   \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%\fi\fi
+  \next
+}
+\def\makeolproctokchar#1 #2 #3{\addF{#3}}
+\def\outlinedone{\edef\outlinest{\global\noexpand\toksE={\the\toksF}}%
+  \outlinest\let\outlinedone=\relax}
+\fi % End of pdf macros
+
+\def\lapstar{\rlap{*}}
+\def\stsec{\rightskip=0pt % get out of Pascal mode (cf. \P)
+  \sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50
+  \noindent{\let\*=\lapstar\bf\modstar.\quad}%
+  \ifpdftex\smash{\raise\baselineskip\hbox to0pt{%
+     \let\*=\empty\pdfdest num \modstar fith}}%
+  \else\ifpdf\smash{\raise\baselineskip\hbox to0pt{%
+     \let\*=\empty\special{%
+       pdf: dest (\romannumeral\modstar) [ @thispage /FitH @ypos ]}}}\fi\fi}
+\let\startsection=\stsec
+\def\defin#1{\global\advance\ind by 2 \1\&{#1 } } % begin `define' or `format'
+\def\A{\note{See also section}} % xref for doubly defined section name
+\def\As{\note{See also sections}} % xref 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
+  \vskip\intersecskip\startsection\ignorespaces}
+\outer\def\N#1.#2.{\MN#1.\vfil\eject % beginning of starred section
+  \ifacro{\toksF={}\makeoutlinetoks#2\outlinedone\outlinedone}\fi
+  \def\rhead{\uppercase{\ignorespaces#2}} % define running headline
+  \message{*\modno} % progress report
+  \edef\next{\write\cont{\Z{#2}{\modno}% write to contents file
+   {\noexpand\the\pageno}}}\next % \Z{title}{sec}{page}
+  \ifpdf\special{pdf: outline 0 << /Title (\the\toksE) /Dest
+    [ @thispage /FitH @ypos ] >>}\fi
+  \ifon\startsection{\bf#2.\quad}\ignorespaces}
+\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}}
+\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 1000 % so strings can be broken (discretionary \ is inserted)
+  \exhyphenpenalty 10000
+  \global\ind=2 \1\ \unskip}
+\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}} % xref for use of a section
+\def\Us{\note{This code is used in sections}} % xref 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
+    \ifacro{\pdfnote#1.}\else#1\fi}$\,\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
+%\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
+  \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{\expandafter\uppercase\expandafter{\jobname}}
+\def\topofcontents{\centerline{\titlefont\title}\vskip.7in
+  \vfill} % this material will start the table of contents page
+\def\startpdf{\ifpdftex\pdfcatalog{/PageMode /UseOutlines}\else
+    \ifpdf{\special{pdf: docview << /PageMode /UseOutlines >>}}\fi\fi}
+\def\botofcontents{\vfill
+  \centerline{\covernote}} % this material will end the table of contents page
+\def\covernote{}
+\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=\hoffset
+   % 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
+       \write\cont{\catcode `\noexpand\@=11\relax}   % \makeatletter
+  \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
+  \def\page{\box255 } \normalbottom
+  \write\cont{} % ensure that the contents file isn't empty
+       \write\cont{\catcode `\noexpand\@=12\relax}   % \makeatother
+  \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, ##2.{\par\hangindent2em\noindent##1:\kern1em
+    \ifacro\pdfnote##2.\else##2\fi.} % 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
+  \ifpdftex \makebookmarks \fi % added in Version 4.5
+  \parfillskip 0pt plus 1fil
+  \def\rhead{NAMES OF THE SECTIONS}
+  \message{Section names:}
+  \output={\normaloutput\page\lheader\rheader}
+  \setpage
+  \def\note##1##2.{\quad{\eightrm##1~\ifacro{\pdfnote##2.}\else{##2}\fi.}}
+  \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
+  \ifacro \def\outsecname{Names of the sections} \let\Xpdf\X
+  \ifpdftex \pdfdest name {NOS} fith
+    \pdfoutline goto name {NOS} count -\modno {\outsecname}
+    \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.%
+      {\toksF={}\makeoutlinetoks##2\outlinedone\outlinedone}%
+      \pdfoutline goto num \the\toksA \expandafter{\the\toksE}}
+  \else\ifpdf
+    \special{pdf: outline -1 << /Title (\outsecname)
+      /Dest [ @thispage /FitH @ypos ] >>}
+    \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.%
+      {\toksF={}\makeoutlinetoks##2\outlinedone\outlinedone}%
+      \special{pdf: outline 0 << /Title (\the\toksE)
+        /A << /S /GoTo /D (\romannumeral\the\toksA) >> >>}}
+  \fi\fi\fi}
+\def\makebookmarks{\def\?##1]{[##1]}%
+  \let\Z=\writebookmarkline \readcontents\relax}
+\def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
+  \else \csname#1\endcsname \fi} % Petr Olsak's macros from texinfo.tex
+\def\advancenumber#1{\countA=\expnumber{#1}\relax \advance\countA by1
+  \expandafter\xdef\csname#1\endcsname{\the\countA}}
+\def\writebookmarkline#1#2#3{{%
+  \let\(=\let \let\)=\let \let\[=\let \let\]=\let \let\/=\let
+  \pdfoutline goto num #2{#1}}}
+\def\con{\par\vfill\eject % finish the section names
+% \ifodd\pageno\else\titletrue\null\vfill\eject\fi % for duplex printers
+  \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 \startpdf
+  \line{\hfil Section\hbox to3em{\hss Page}}
+  \let\Z=\contentsline
+  \readcontents\relax % read the contents info
+  \botofcontents \end} % print the contents page(s) and terminate
+\def\contentsline#1#2#3{%
+    \line{\ignorespaces#1
+      \rm\leaders\hbox to .5em{.\hfil}\hfil
+      \ \ifacro\pdflink{#2}{\romannumeral#2}\else#2\fi\hbox to3em{\hss#3}}}
+\def\today{\ifcase\month\or
+  January\or February\or March\or April\or May\or June\or
+  July\or August\or September\or October\or November\or December\fi
+  \space\number\day, \number\year}
+\newcount\twodigits
+\def\hours{\twodigits=\time \divide\twodigits by 60 \printtwodigits
+  \multiply\twodigits by-60 \advance\twodigits by\time :\printtwodigits}
+\def\gobbleone1{}
+\def\printtwodigits{\advance\twodigits100
+  \expandafter\gobbleone\number\twodigits
+  \advance\twodigits-100 }
+\def\datethis{\def\startsection{\leftline{\sc\today\ at \hours}\bigskip
+  \let\startsection=\stsec\stsec}}
+  % say `\datethis' in limbo, to get your listing timestamped before section 1
+\def\datecontentspage{% say this in limbo to get the toc page timestamped
+  \def\botofcontents{\vfill
+   \centerline{\covernote}
+   \bigskip
+   \leftline{\sc\today\ at \hours}}} % timestamps the contents page


Property changes on: trunk/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2020-05-25 21:16:45 UTC (rev 55276)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2020-05-25 21:19:51 UTC (rev 55277)
@@ -613,7 +613,7 @@
     pst2pdf pstool pstricks pstricks-add pstricks_calcnotes pstring
     ptex-base ptex-fontmaps ptex-fonts ptex-manual
     ptex2pdf ptext ptolemaicastronomy ptptex
-    punk punk-latex punknova purifyeps pxbase
+    punk punk-latex punknova purifyeps pwebmac pxbase
     pxchfon pxcjkcat pxfonts pxgreeks pxjahyper pxjodel
     pxpgfmark pxrubrica pxtatescale pxtxalfa pxufont
     pygmentex python pythonhighlight pythontex

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2020-05-25 21:16:45 UTC (rev 55276)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2020-05-25 21:19:51 UTC (rev 55277)
@@ -1685,6 +1685,7 @@
  'pstricks',            'generic',
  'pst-cox',             'generic',
  'ptex-base',		'ptex',
+ 'pwebmac',		'plain',
  'pxbase',              'platex',
  'pxchfon',             'platex',
  'pxjahyper',           'platex',
@@ -2049,6 +2050,7 @@
  'ptex-base',	'\.(ini|lib|src)$|(ascii-jplain|kinsoku|ptex).tex$',
  'ptex-manual', 'NULL', # keep ptex-manual.sty in doc
  'punk',        'NULL', # have separate punk-latex
+ 'pwebmac',	'pwebmac.tex',
  'qobitree',    'qobitree.tex',
  'r_und_s',     '\.tex|\.sty',
  'randomlist',	'randomlist\.tex|' . $standardtex,
@@ -2378,6 +2380,7 @@
  'ptex-fontmaps',       'fonts',
  'ptex-manual',		'ptex',
  'purifyeps',           'support',
+ 'pwebmac',		'plain',
  'pxfonts',             'fonts',
  'pxbase',              'platex',
  'pxchfon',             'platex',

Modified: trunk/Master/tlpkg/tlpsrc/collection-plaingeneric.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-plaingeneric.tlpsrc	2020-05-25 21:16:45 UTC (rev 55276)
+++ trunk/Master/tlpkg/tlpsrc/collection-plaingeneric.tlpsrc	2020-05-25 21:19:51 UTC (rev 55277)
@@ -77,6 +77,7 @@
 depend plstmary
 depend poormanlog
 depend present
+depend pwebmac
 depend random
 depend randomlist
 depend resumemac

Added: trunk/Master/tlpkg/tlpsrc/pwebmac.tlpsrc
===================================================================


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