summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-10-08 03:02:13 +0000
committerNorbert Preining <norbert@preining.info>2023-10-08 03:02:13 +0000
commit9f6bac4b7884af8d5a457275e30fc5e253ff9de8 (patch)
tree978ab71be8f7dbda32fb68c38753b132ae37512a /web
parent1ca4946e587189e1924b5a2627aba47c535d3e49 (diff)
CTAN sync 202310080302
Diffstat (limited to 'web')
-rw-r--r--web/pwebmac/README.md2
-rwxr-xr-xweb/pwebmac/makeall7
-rw-r--r--web/pwebmac/pwebmac.tex49
3 files changed, 33 insertions, 25 deletions
diff --git a/web/pwebmac/README.md b/web/pwebmac/README.md
index a5288c99f6..cfd364de09 100644
--- a/web/pwebmac/README.md
+++ b/web/pwebmac/README.md
@@ -36,4 +36,4 @@ creates HINT output that can be viewed with the
The `pwebmac` package is free software and may be used without constraints.
-This is version **4.9** of the `pwebmac` package — 2023-10-01, Andreas Scherer.
+This is version **4.10** of the `pwebmac` package — 2023-10-07, Andreas Scherer.
diff --git a/web/pwebmac/makeall b/web/pwebmac/makeall
index 05f8178589..602f2377c5 100755
--- a/web/pwebmac/makeall
+++ b/web/pwebmac/makeall
@@ -100,11 +100,12 @@ then
TEX="$HITEX"
PDF=hnt # default extension for 'knuth-hint'
PDFTOCFRONT=false # use 'hintview -h' to start with TOC page
+ VALID=false # HiTeX has no command-line option '--shell-escape'
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 )
+# Valid PDF output from 'pdftex' and 'luatex': In 'pwebmac.tex' set '\countD'
+# to the actual number of @<named modules@>, not the number of all sections.
+if ( $VALID )
then
TEX="$TEX --shell-escape"
fi
diff --git a/web/pwebmac/pwebmac.tex b/web/pwebmac/pwebmac.tex
index f7cff63628..880075cb2a 100644
--- a/web/pwebmac/pwebmac.tex
+++ b/web/pwebmac/pwebmac.tex
@@ -5,7 +5,7 @@
% macro integration \`a la CWEB by Andreas Scherer <andreas_tex@freenet.de>.
% This file is not copyrighted and can be used freely.
\ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros
-\xdef\fmtversion{\fmtversion+WEBMAC4.9}
+\xdef\fmtversion{\fmtversion+WEBMAC4.10}
\input iftex.sty % TeX engine tests
\ifx\pdf+\pdftrue\fi
% Uncomment the following line if you want PDF goodies to be the default
@@ -87,8 +87,6 @@
\newtoks\toksE \newtoks\toksF \newtoks\usersanitizer
\newcount\countA \countA=0 \newcount\countB \countB=0
\newcount\countC \countC=0 \newcount\countD \countD=0
-\ifpdftex \ifnum\pdfshellescape=1 {\let\\=\BS
- \global\countD=\input{|grep -c -e '\\:\\X' \jobname.tex}} \fi\fi
\newif\iftokprocessed \newif\ifTnum \newif\ifinstr
{\def\\{\global\let\spacechar= }\\ }
@@ -99,6 +97,8 @@
\protected\def\pdfoutline {\pdfextension outline\space}
\protected\def\pdfdest {\pdfextension dest\space}
\protected\def\pdfcatalog {\pdfextension catalog}
+\chardef\pdfshellescape
+ \directlua{tex.sprint((status.shell_escape or os.execute()) .. " ")}
\edef\pdfhorigin {\pdfvariable horigin}
\edef\pdfvorigin {\pdfvariable vorigin}
\let\pdfpagewidth=\pagewidth
@@ -143,15 +143,17 @@
\ifx\nxt~\addF\space
\else\ifx\nxt\onespace\addF\space
\else\the\usersanitizer
- \iftokprocessed\else\makeolproctokctl
- \iftokprocessed\else\makeolproctokmath % if not recognised, skip it
- \fi\fi\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\)}%
+ \iftokprocessed\else\makeolproctokctl
+ \iftokprocessed\else\makeolproctokmath % if not recognised, skip it
+ \fi\fi
+ \fi\fi
+ \else % we don't have a control sequence, it's an ordinary char
+ \ifx(\nxt \addF{\string\(}\else\ifx)\nxt \addF{\string\)}%
%\else\ifx[\nxt \addF{\string\[}\else\ifx]\nxt \addF{\string\]}%
+ %\else\ifx/\nxt \addF{\string\/}% quote chars special to PDF with backslash
\else\expandafter\makeolproctokchar\meaning\nxt
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%\fi\fi
+ \fi\fi%\fi\f\fi
+ \fi\fi\fi\fi\fi \fi\fi\fi
\next
}
\def\makeolproctokctl{%
@@ -167,20 +169,23 @@
\else\ifx\nxt\\\ifinstr\addF{\bschar\bschar}\else\tokprocessedtrue\fi
\else\ifx\nxt\&\ifinstr\addF&\else\tokprocessedtrue\fi
\else\ifx\nxt\~\ifTnum\addF{0}\else\addF\tildechar\fi % 077->\T{\~77}
- \else\ifx\nxt\_\ifTnum\addF{E}\else\addF_\fi % 0.1E5->\T{0.1\_5}
- \else\ifx\nxt\^\ifTnum\addF{0x}\else\addF^\fi % 0x77 -> \T{\^77}
+ \else\ifx\nxt\_\ifTnum\addF{E}\else\addF_\fi % 0.1E5->\T{0.1\_5}
+ \else\ifx\nxt\^\ifTnum\addF{0x}\else\addF^\fi % 0x77 -> \T{\^77}
\else\ifx\nxt\$\ifTnum\tokprocessedtrue\else\addF$\fi %$% \T{77\$L}
- \else\ifx\nxt\{\addF\lbchar \else\ifx\nxt\}\addF\rbchar
- \else\ifx\nxt\ \addF\space \else\ifx\nxt\#\addF{\string\#}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \else\ifx\nxt\{\addF\lbchar\else\ifx\nxt\}\addF\rbchar
+ \else\ifx\nxt\ \addF\space\else\ifx\nxt\#\addF{\string\#}%
+ \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi
}
\def\makeolproctokmath{%
\ifx\nxt\alpha\addF{alpha}\else\ifx\nxt\beta\addF{beta}%
\else\ifx\nxt\gamma\addF{gamma}\else\ifx\nxt\delta\addF{delta}%
- \else\ifx\nxt\theta\addF{theta}\else\ifx\nxt\psqrt\addF{root }%
+ \else\ifx\nxt\theta\addF{theta}\else\ifx\nxt\psqrt\addF{root\space}%
\else\ifx\nxt\H\addF{"}\else\ifx\nxt\O\addF{'}%
- \else\ifx\nxt\v\addF{|}\else\ifx\nxt\S\addF{==}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \else\ifx\nxt\v\addF{|}\else\ifx\nxt\prime\addF{'}%
+ \else\ifx\nxt\K\addF{:=}\else\ifx\nxt\S\addF{==}%
+ \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi
+ \fi\fi
}
\def\makeolproctokchar#1 #2 #3{\addF{#3}}
\def\outlinedone{\edef\outlinest{\global\noexpand\toksE={\the\toksF}}%
@@ -199,7 +204,7 @@
\HINToutline goto name {HINT.home} depth 1 {Table of Contents}}
\def\HINTlabel{{\let\*=\empty\HINTdest num \modstar top}}
\def\HINTlink#1#2{\HINTstartlink goto num #1 {#1}\HINTendlink}% #2 not used ???
-\def\HINTcontents#1#2#3{\HINToutline goto num #3 depth #2 {#1}}
+\def\HINTcontents#1#2{\HINToutline goto num #2 depth 1 {#1}}
\let\pdflink=\HINTlink
\fi % End of HINT macros
@@ -403,7 +408,9 @@
\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
- \ifpdflua \makebookmarks \fi % added in Version 4.5
+ \ifpdflua \makebookmarks % added in Version 4.5
+ \ifnum\pdfshellescape=1 {\let\\=\BS % count the @<named sections@>
+ \global\countD=\input{|grep -c -e '\\:\\X' \jobname.tex}} \fi\fi
\parfillskip 0pt plus 1fil
\def\grouptitle{NAMES OF THE SECTIONS}
\let\topsecno=\nullsec
@@ -457,7 +464,7 @@
\rm\leaders\hbox to .5em{.\hfil}\hfil
\ \ifhint
\HINTlink{#2}{\romannumeral#2}% No page numbers in HINT
- \HINTcontents{#1}{#2}{#3}%
+ \HINTcontents{#1}{#2}%
\else\ifpdf\pdflink{#2}{\romannumeral#2}\else#2\fi
\hbox to3em{\hss#3}\fi}}
\def\today{\ifcase\month\or