diff options
author | Karl Berry <karl@freefriends.org> | 2023-10-08 21:09:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-10-08 21:09:45 +0000 |
commit | 5cb9781fa578e0d6e7cdca243aacf8c78b26ab47 (patch) | |
tree | a2b14c6dbbc55a81fd421f1d20a09b05a28c9e21 /Master/texmf-dist/tex/plain | |
parent | 4e5e09011ba22163554556c4bf0ee44e80b6160f (diff) |
pwebmac (7oct23)
git-svn-id: svn://tug.org/texlive/trunk@68486 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/plain')
-rw-r--r-- | Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex | 49 |
1 files changed, 28 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex b/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex index f7cff636289..880075cb2a5 100644 --- a/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex +++ b/Master/texmf-dist/tex/plain/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 |