summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_tex@freenet.de>2023-09-21 23:04:05 +0000
committerAndreas Scherer <andreas_tex@freenet.de>2023-09-21 23:04:05 +0000
commit72318f55428e26995dac6e0625333773042ccc80 (patch)
treec899569aad18bfb0a6cbaa41c1839be46c5b8f59
parentb8b9347b44a4e48d3aa3ad0e509a99625f2760b8 (diff)
[CWEB] Factor out PDF/HINT macros.
git-svn-id: svn://tug.org/texlive/trunk@68340 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/tex/plain/cweb/cwebacromac.tex157
-rw-r--r--Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctproofmac.tex161
-rw-r--r--Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctwimac.tex152
-rw-r--r--Master/texmf-dist/tex/plain/cweb/cwebmac.tex155
4 files changed, 167 insertions, 458 deletions
diff --git a/Master/texmf-dist/tex/plain/cweb/cwebacromac.tex b/Master/texmf-dist/tex/plain/cweb/cwebacromac.tex
new file mode 100644
index 00000000000..837f61ee782
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/cweb/cwebacromac.tex
@@ -0,0 +1,157 @@
+% hypertext macros for CWEB listings (in addition to cwebmac.tex)
+% Version 1.0 --- August 2023
+\ifx\acrohint\undefined\else\endinput\fi % these are not standalone macros
+\ifacro % The following are pdf macros
+\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 \theheight depth \thedepth
+ attr{/Border [0 0 0]} goto num #1 \Blue #1\Black\pdfendlink}} % changed 3.69
+\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\sanitizecommand#1#2{\addtokens\usersanitizer
+ {\noexpand\dosanitizecommand\noexpand#1{#2}}}
+\def\dosanitizecommand#1#2{\ifx\nxt#1\addF{#2}\fi}
+
+\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
+ \iftokprocessed\else\makeolproctokctli
+ \iftokprocessed\else\makeolproctokctlii
+ \iftokprocessed\else\makeolproctokctliii % if not recognised, skip it
+ \fi\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\)}%
+ \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\makeolproctokctli{%
+ \ifx\nxt\CEE\addF{C}\let\next\makeolgobbletok % \CEE/
+ \else\ifx\nxt\UNIX\addF{UNIX}\let\next\makeolgobbletok % \UNIX/
+ \else\ifx\nxt\TEX\addF{TeX}\let\next\makeolgobbletok % \TEX/
+ \else\ifx\nxt\TeX\addF{TeX}\else\ifx\nxt\LaTeX\addF{LaTeX}%
+ \else\ifx\nxt\CPLUSPLUS\addF{C++}\let\next\makeolgobbletok % \CPLUSPLUS/
+ \else\ifx\nxt\Cee\addF{C}%
+ \else\ifx\nxt\PB \let\next\makeolgobbletok \tokprocessedtrue % \PB{...}
+ \else\ifx\nxt\.\tokprocessedtrue\instrtrue % \.{...}
+ % skip \|
+ \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{0b}\else\addF\\\fi % 0b10111 -> \T{\\10111}
+ \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\#}%
+ \else\ifx\nxt\PP\addF{++}\else\ifx\nxt\MM\addF{--}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+}
+\def\makeolproctokctlii{%
+ \ifx\nxt\MG\addF{->}\else\ifx\nxt\GG\addF{>>}%
+ \else\ifx\nxt\LL\addF{<<}\else\ifx\nxt\NULL\addF{NULL}%
+ \else\ifx\nxt\AND\addF&\else\ifx\nxt\OR\addF|%
+ \else\ifx\nxt\XOR\addF^\else\ifx\nxt\CM\addF\tildechar
+ \else\ifx\nxt\MOD\addF{\string\%}\else\ifx\nxt\DC\addF{::}%
+ \else\ifx\nxt\PA\addF{.*}\else\ifx\nxt\MGA\addF{->*}%
+ \else\ifx\nxt\this\addF{this}\else\ifx\nxt\?\addF?%
+ \else\ifx\nxt\E\addF{==}\else\ifx\nxt\G\addF{>=}%
+ \else\ifx\nxt\I\addF{!=}\else\ifx\nxt\K\addF{=}%
+ \else\ifx\nxt\l\addF{l}\else\ifx\nxt\L\addF{L}%
+ \else\ifx\nxt\o\addF{o}\else\ifx\nxt\O\addF{O}%
+ \else\ifx\nxt\R\addF!%
+ \else\ifx\nxt\T \Tnumtrue \let\next\makeolgobbletok
+ \tokprocessedtrue % \T{number}
+ \else\ifx\nxt\AM\addF&\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
+ \fi\fi\fi\fi\fi\fi
+}
+\def\makeolproctokctliii{%
+ \ifx\nxt\V\addF{||}\else\ifx\nxt\W\addF{&&}\else\ifx\nxt\Z\addF{<=}%
+ \else\ifx\nxt\*\addF*\else\ifx\nxt\Xand\addF{\space and\space}%
+ \else\ifx\nxt\Xandxeq\addF{\space and_eq\space}%
+ \else\ifx\nxt\Xbitand\addF{\space bitand\space}%
+ \else\ifx\nxt\Xbitor\addF{\space bitor\space}%
+ \else\ifx\nxt\Xcompl\addF{\space compl\space}%
+ \else\ifx\nxt\Xnot\addF{\space not\space}%
+ \else\ifx\nxt\Xnotxeq\addF{\space not_eq\space}%
+ \else\ifx\nxt\Xor\addF{\space or\space}%
+ \else\ifx\nxt\Xorxeq\addF{\space or_eq\space}%
+ \else\ifx\nxt\Xxor\addF{\space xor\space}%
+ \else\ifx\nxt\Xxorxeq\addF{\space xor_eq\space}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi
+}
+\def\outlinedone{\edef\outlinest{\global\noexpand\toksE={\the\toksF}}%
+ \outlinest\let\outlinedone=\relax}
+\fi % End of pdf macros
+
+\ifhint
+% The following uses HINT primitives to implement:
+% \HINThome to mark the position of the home page
+% \HINTlabel to attach a label to the top of a section
+% \HINTlink to link a section number to the section label
+% \HINTcontents to produce an 'outline' item
+% These are the top level HINT macros that are used in this file
+% No HINT primitives are used directly.
+\def\HINThome{\HINTdest name {HINT.home}%
+ \HINToutline goto name {HINT.home} depth 1 {Table of Contents}}
+\def\HINTlabel{{\let\*=\empty\HINTdest num \secstar 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}}
+\let\pdflink=\HINTlink
+\fi % End of HINT macros
+
+% Common macros for \ifacro and \ifhint
+\ifacrohint
+\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}
+\fi % End of common macros
diff --git a/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctproofmac.tex b/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctproofmac.tex
index 811af251499..9a64c366a4d 100644
--- a/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctproofmac.tex
+++ b/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctproofmac.tex
@@ -1,10 +1,10 @@
% standard macros for CWEB listings (in addition to plain.tex)
-% Version 4.9 --- June 2023
+% Version 4.10 --- August 2023
% modified for proofs in CTWILL
% modified for PDF output with 'tex "\let\pdf+', 'pdftex', 'xetex', and 'hitex'
% This file is not copyrighted and can be used freely.
\ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros
-\xdef\fmtversion{\fmtversion+CTWILL4.9+PROOFS+PDF}
+\xdef\fmtversion{\fmtversion+CTWILL4.10+PROOFS+PDF}
\input iftex.sty % TeX engine tests
\ifx\pdf+\pdftrue\fi % for plain TeX in combination with dvipdfm
% Uncomment the following line if you want PDF goodies to be the default
@@ -13,7 +13,7 @@
\ifxetex\pdftrue\fi % XeTeX produces PDF output
\ifpdftex % pdfTeX produces PDF output if \pdfoutput>0
\def\Black{\pdfliteral{0 g 0 G}} % use rgb colors for direct PDF output too
- \def\PDFlinkcolor{\pdfliteral{\pdflinkcolor\space rg \pdflinkcolor\space RG}}
+ \def\Blue{\pdfliteral{\pdflinkcolor\space rg \pdflinkcolor\space RG}}
\fi
\let\ifacro=\ifpdf
\newif\ifacrohint \ifacro\acrohinttrue\fi \ifhint\acrohinttrue\fi
@@ -135,160 +135,7 @@
\newif\iftokprocessed \newif\ifTnum \newif\ifinstr
{\def\\{\global\let\spacechar= }\\ }
-\ifacro % The following are pdf macros
-\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 \theheight depth \thedepth
- attr{/Border [0 0 0]} goto num #1 \PDFlinkcolor #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\sanitizecommand#1#2{\addtokens\usersanitizer
- {\noexpand\dosanitizecommand\noexpand#1{#2}}}
-\def\dosanitizecommand#1#2{\ifx\nxt#1\addF{#2}\fi}
-
-\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
- \iftokprocessed\else\makeolproctokctli
- \iftokprocessed\else\makeolproctokctlii
- \iftokprocessed\else\makeolproctokctliii % if not recognised, skip it
- \fi\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\)}%
- \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\makeolproctokctli{%
- \ifx\nxt\CEE\addF{C}\let\next\makeolgobbletok % \CEE/
- \else\ifx\nxt\UNIX\addF{UNIX}\let\next\makeolgobbletok % \UNIX/
- \else\ifx\nxt\TEX\addF{TeX}\let\next\makeolgobbletok % \TEX/
- \else\ifx\nxt\TeX\addF{TeX}\else\ifx\nxt\LaTeX\addF{LaTeX}%
- \else\ifx\nxt\CPLUSPLUS\addF{C++}\let\next\makeolgobbletok % \CPLUSPLUS/
- \else\ifx\nxt\Cee\addF{C}%
- \else\ifx\nxt\PB \let\next\makeolgobbletok \tokprocessedtrue % \PB{...}
- \else\ifx\nxt\.\tokprocessedtrue\instrtrue % \.{...}
- % skip \|
- \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{0b}\else\addF\\\fi % 0b10111 -> \T{\\10111}
- \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\#}%
- \else\ifx\nxt\PP\addF{++}\else\ifx\nxt\MM\addF{--}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-}
-\def\makeolproctokctlii{%
- \ifx\nxt\MG\addF{->}\else\ifx\nxt\GG\addF{>>}%
- \else\ifx\nxt\LL\addF{<<}\else\ifx\nxt\NULL\addF{NULL}%
- \else\ifx\nxt\AND\addF&\else\ifx\nxt\OR\addF|%
- \else\ifx\nxt\XOR\addF^\else\ifx\nxt\CM\addF\tildechar
- \else\ifx\nxt\MOD\addF{\string\%}\else\ifx\nxt\DC\addF{::}%
- \else\ifx\nxt\PA\addF{.*}\else\ifx\nxt\MGA\addF{->*}%
- \else\ifx\nxt\this\addF{this}\else\ifx\nxt\?\addF?%
- \else\ifx\nxt\E\addF{==}\else\ifx\nxt\G\addF{>=}%
- \else\ifx\nxt\I\addF{!=}\else\ifx\nxt\K\addF{=}%
- \else\ifx\nxt\l\addF{l}\else\ifx\nxt\L\addF{L}%
- \else\ifx\nxt\o\addF{o}\else\ifx\nxt\O\addF{O}%
- \else\ifx\nxt\R\addF!%
- \else\ifx\nxt\T \Tnumtrue \let\next\makeolgobbletok
- \tokprocessedtrue % \T{number}
- \else\ifx\nxt\AM\addF&\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
- \fi\fi\fi\fi\fi\fi
-}
-\def\makeolproctokctliii{%
- \ifx\nxt\V\addF{||}\else\ifx\nxt\W\addF{&&}\else\ifx\nxt\Z\addF{<=}%
- \else\ifx\nxt\*\addF*\else\ifx\nxt\Xand\addF{\space and\space}%
- \else\ifx\nxt\Xandxeq\addF{\space and_eq\space}%
- \else\ifx\nxt\Xbitand\addF{\space bitand\space}%
- \else\ifx\nxt\Xbitor\addF{\space bitor\space}%
- \else\ifx\nxt\Xcompl\addF{\space compl\space}%
- \else\ifx\nxt\Xnot\addF{\space not\space}%
- \else\ifx\nxt\Xnotxeq\addF{\space not_eq\space}%
- \else\ifx\nxt\Xor\addF{\space or\space}%
- \else\ifx\nxt\Xorxeq\addF{\space or_eq\space}%
- \else\ifx\nxt\Xxor\addF{\space xor\space}%
- \else\ifx\nxt\Xxorxeq\addF{\space xor_eq\space}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
- \fi\fi\fi\fi\fi
-}
-\def\outlinedone{\edef\outlinest{\global\noexpand\toksE={\the\toksF}}%
- \outlinest\let\outlinedone=\relax}
-\fi % End of pdf macros
-
-\ifhint
-% The following uses HINT primitives to implement:
-% \HINThome to mark the position of the home page
-% \HINTlabel to attach a label to the top of a section
-% \HINTlink to link a section number to the section label
-% \HINTcontents to produce an 'outline' item
-% These are the top level HINT macros that are used in this file
-% No HINT primitives are used directly.
-\def\HINThome{\HINTdest name {HINT.home}%
- \HINToutline goto name {HINT.home} depth 1 {Table of Contents}}
-\def\HINTlabel{{\let\*=\empty\HINTdest num \secstar 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}}
-\let\pdflink=\HINTlink
-\fi % End of HINT macros
-
-% Common macros for \ifpdf and \ifhint
-\ifacrohint
-\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}
-\fi % End of common macros
+\ifacrohint \input cwebacromac \fi % load hypertext macros
\def\pdfURL#1#2{\ifpdf \ifpdftex\pdfannotlink height \theheight depth \thedepth
attr {/Border [0 0 0]} user { /Type /Annot /Subtype /Link /A
diff --git a/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctwimac.tex b/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctwimac.tex
index f76d22ae8d9..c982784fd2d 100644
--- a/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctwimac.tex
+++ b/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctwimac.tex
@@ -1,11 +1,11 @@
% standard macros for CWEB listings (in addition to plain.tex)
-% Version 4.9 --- June 2023
+% Version 4.10 --- August 2023
% modified for pages produced by CTWILL
% further modified for page size of the MMIXware book
% modified for PDF output with 'tex "\let\pdf+', 'pdftex', and 'xetex'
% This file is not copyrighted and can be used freely.
\ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros
-\xdef\fmtversion{\fmtversion+CTWILL4.9+LNCS+PDF}
+\xdef\fmtversion{\fmtversion+CTWILL4.10+LNCS+PDF}
\input iftex.sty % TeX engine tests
\ifx\pdf+\pdftrue\fi % for plain TeX in combination with dvipdfm
% Uncomment the following line if you want PDF goodies to be the default
@@ -14,13 +14,14 @@
\ifxetex\pdftrue\fi % XeTeX produces PDF output
\ifpdftex % pdfTeX produces PDF output if \pdfoutput>0
\def\Black{\pdfliteral{0 g 0 G}} % use rgb colors for direct PDF output too
- \def\PDFlinkcolor{\pdfliteral{\pdflinkcolor\space rg \pdflinkcolor\space RG}}
+ \def\Blue{\pdfliteral{\pdflinkcolor\space rg \pdflinkcolor\space RG}}
\fi
\let\ifacro=\ifpdf
\ifhint\message{These macros are not suitable for HiTeX.}
\message{Please use 'ctwill +P [+lpdf]' instead.}
\end
\fi
+\newif\ifacrohint \ifacro\acrohinttrue\fi \ifhint\acrohinttrue\fi
\let\:=\. % preserve a way to get the dot accent
% (all other accents will still work as usual)
@@ -250,150 +251,7 @@
\newif\iftokprocessed \newif\ifTnum \newif\ifinstr
{\def\\{\global\let\spacechar= }\\ }
-\ifacro % The following are pdf macros
-\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 \theheight depth \thedepth
- attr{/Border [0 0 0]} goto num #1 \PDFlinkcolor #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{\ifpdf \ifpdftex\pdfannotlink height \theheight depth \thedepth
- attr {/Border [0 0 0]} user { /Type /Annot /Subtype /Link /A
- << /S /URI /URI (#2) >>}\Blue #1\Black \pdfendlink % changed in 3.69
- \else {\setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{#1}%
- \special{pdf: ec}}\special{pdf: ann width \thewidth height \theheight
- depth \thedepth << /Border [0 0 0] /Type /Annot /Subtype /Link /A
- << /S /URI /URI (#2) >> >>}\box0\relax}\fi
- \else #1 ({\tt#2})\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}
-
-\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
- \iftokprocessed\else\makeolproctokctli
- \iftokprocessed\else\makeolproctokctlii
- \iftokprocessed\else\makeolproctokctliii % if not recognised, skip it
- \fi\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\)}%
- \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\makeolproctokctli{%
- \ifx\nxt\CEE\addF{C}\let\next\makeolgobbletok % \CEE/
- \else\ifx\nxt\UNIX\addF{UNIX}\let\next\makeolgobbletok % \UNIX/
- \else\ifx\nxt\TEX\addF{TeX}\let\next\makeolgobbletok % \TEX/
- \else\ifx\nxt\TeX\addF{TeX}\else\ifx\nxt\LaTeX\addF{LaTeX}%
- \else\ifx\nxt\CPLUSPLUS\addF{C++}\let\next\makeolgobbletok % \CPLUSPLUS/
- \else\ifx\nxt\Cee\addF{C}%
- \else\ifx\nxt\PB \let\next\makeolgobbletok \tokprocessedtrue % \PB{...}
- \else\ifx\nxt\.\tokprocessedtrue\instrtrue % \.{...}
- % skip \|
- \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{0b}\else\addF\\\fi % 0b10111 -> \T{\\10111}
- \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\#}%
- \else\ifx\nxt\PP\addF{++}\else\ifx\nxt\MM\addF{--}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-}
-\def\makeolproctokctlii{%
- \ifx\nxt\MG\addF{->}\else\ifx\nxt\GG\addF{>>}%
- \else\ifx\nxt\LL\addF{<<}\else\ifx\nxt\NULL\addF{NULL}%
- \else\ifx\nxt\AND\addF&\else\ifx\nxt\OR\addF|%
- \else\ifx\nxt\XOR\addF^\else\ifx\nxt\CM\addF\tildechar
- \else\ifx\nxt\MOD\addF{\string\%}\else\ifx\nxt\DC\addF{::}%
- \else\ifx\nxt\PA\addF{.*}\else\ifx\nxt\MGA\addF{->*}%
- \else\ifx\nxt\this\addF{this}\else\ifx\nxt\?\addF?%
- \else\ifx\nxt\E\addF{==}\else\ifx\nxt\G\addF{>=}%
- \else\ifx\nxt\I\addF{!=}\else\ifx\nxt\K\addF{=}%
- \else\ifx\nxt\l\addF{l}\else\ifx\nxt\L\addF{L}%
- \else\ifx\nxt\o\addF{o}\else\ifx\nxt\O\addF{O}%
- \else\ifx\nxt\R\addF!%
- \else\ifx\nxt\T \Tnumtrue \let\next\makeolgobbletok
- \tokprocessedtrue % \T{number}
- \else\ifx\nxt\AM\addF&\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
- \fi\fi\fi\fi\fi\fi
-}
-\def\makeolproctokctliii{%
- \ifx\nxt\V\addF{||}\else\ifx\nxt\W\addF{&&}\else\ifx\nxt\Z\addF{<=}%
- \else\ifx\nxt\*\addF*\else\ifx\nxt\Xand\addF{\space and\space}%
- \else\ifx\nxt\Xandxeq\addF{\space and_eq\space}%
- \else\ifx\nxt\Xbitand\addF{\space bitand\space}%
- \else\ifx\nxt\Xbitor\addF{\space bitor\space}%
- \else\ifx\nxt\Xcompl\addF{\space compl\space}%
- \else\ifx\nxt\Xnot\addF{\space not\space}%
- \else\ifx\nxt\Xnotxeq\addF{\space not_eq\space}%
- \else\ifx\nxt\Xor\addF{\space or\space}%
- \else\ifx\nxt\Xorxeq\addF{\space or_eq\space}%
- \else\ifx\nxt\Xxor\addF{\space xor\space}%
- \else\ifx\nxt\Xxorxeq\addF{\space xor_eq\space}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
- \fi\fi\fi\fi\fi
-}
-\def\outlinedone{\edef\outlinest{\global\noexpand\toksE={\the\toksF}}%
- \outlinest\let\outlinedone=\relax}
-\fi % End of pdf macros
+\ifacrohint \input cwebacromac \fi % load hypertext macros
\def\lapstar{\rlap{*}}
\def\stsec{\tenpoint\rightskip=0pt % get out of C mode (cf. \B)
diff --git a/Master/texmf-dist/tex/plain/cweb/cwebmac.tex b/Master/texmf-dist/tex/plain/cweb/cwebmac.tex
index 382400a3f7f..c304d3cd693 100644
--- a/Master/texmf-dist/tex/plain/cweb/cwebmac.tex
+++ b/Master/texmf-dist/tex/plain/cweb/cwebmac.tex
@@ -134,160 +134,7 @@
\newif\iftokprocessed \newif\ifTnum \newif\ifinstr
{\def\\{\global\let\spacechar= }\\ }
-\ifacro % The following are pdf macros
-\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 \theheight depth \thedepth
- attr{/Border [0 0 0]} goto num #1 \Blue #1\Black\pdfendlink}} % changed 3.69
-\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\sanitizecommand#1#2{\addtokens\usersanitizer
- {\noexpand\dosanitizecommand\noexpand#1{#2}}}
-\def\dosanitizecommand#1#2{\ifx\nxt#1\addF{#2}\fi}
-
-\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
- \iftokprocessed\else\makeolproctokctli
- \iftokprocessed\else\makeolproctokctlii
- \iftokprocessed\else\makeolproctokctliii % if not recognised, skip it
- \fi\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\)}%
- \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\makeolproctokctli{%
- \ifx\nxt\CEE\addF{C}\let\next\makeolgobbletok % \CEE/
- \else\ifx\nxt\UNIX\addF{UNIX}\let\next\makeolgobbletok % \UNIX/
- \else\ifx\nxt\TEX\addF{TeX}\let\next\makeolgobbletok % \TEX/
- \else\ifx\nxt\TeX\addF{TeX}\else\ifx\nxt\LaTeX\addF{LaTeX}%
- \else\ifx\nxt\CPLUSPLUS\addF{C++}\let\next\makeolgobbletok % \CPLUSPLUS/
- \else\ifx\nxt\Cee\addF{C}%
- \else\ifx\nxt\PB \let\next\makeolgobbletok \tokprocessedtrue % \PB{...}
- \else\ifx\nxt\.\tokprocessedtrue\instrtrue % \.{...}
- % skip \|
- \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{0b}\else\addF\\\fi % 0b10111 -> \T{\\10111}
- \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\#}%
- \else\ifx\nxt\PP\addF{++}\else\ifx\nxt\MM\addF{--}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-}
-\def\makeolproctokctlii{%
- \ifx\nxt\MG\addF{->}\else\ifx\nxt\GG\addF{>>}%
- \else\ifx\nxt\LL\addF{<<}\else\ifx\nxt\NULL\addF{NULL}%
- \else\ifx\nxt\AND\addF&\else\ifx\nxt\OR\addF|%
- \else\ifx\nxt\XOR\addF^\else\ifx\nxt\CM\addF\tildechar
- \else\ifx\nxt\MOD\addF{\string\%}\else\ifx\nxt\DC\addF{::}%
- \else\ifx\nxt\PA\addF{.*}\else\ifx\nxt\MGA\addF{->*}%
- \else\ifx\nxt\this\addF{this}\else\ifx\nxt\?\addF?%
- \else\ifx\nxt\E\addF{==}\else\ifx\nxt\G\addF{>=}%
- \else\ifx\nxt\I\addF{!=}\else\ifx\nxt\K\addF{=}%
- \else\ifx\nxt\l\addF{l}\else\ifx\nxt\L\addF{L}%
- \else\ifx\nxt\o\addF{o}\else\ifx\nxt\O\addF{O}%
- \else\ifx\nxt\R\addF!%
- \else\ifx\nxt\T \Tnumtrue \let\next\makeolgobbletok
- \tokprocessedtrue % \T{number}
- \else\ifx\nxt\AM\addF&\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
- \fi\fi\fi\fi\fi\fi
-}
-\def\makeolproctokctliii{%
- \ifx\nxt\V\addF{||}\else\ifx\nxt\W\addF{&&}\else\ifx\nxt\Z\addF{<=}%
- \else\ifx\nxt\*\addF*\else\ifx\nxt\Xand\addF{\space and\space}%
- \else\ifx\nxt\Xandxeq\addF{\space and_eq\space}%
- \else\ifx\nxt\Xbitand\addF{\space bitand\space}%
- \else\ifx\nxt\Xbitor\addF{\space bitor\space}%
- \else\ifx\nxt\Xcompl\addF{\space compl\space}%
- \else\ifx\nxt\Xnot\addF{\space not\space}%
- \else\ifx\nxt\Xnotxeq\addF{\space not_eq\space}%
- \else\ifx\nxt\Xor\addF{\space or\space}%
- \else\ifx\nxt\Xorxeq\addF{\space or_eq\space}%
- \else\ifx\nxt\Xxor\addF{\space xor\space}%
- \else\ifx\nxt\Xxorxeq\addF{\space xor_eq\space}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
- \fi\fi\fi\fi\fi
-}
-\def\outlinedone{\edef\outlinest{\global\noexpand\toksE={\the\toksF}}%
- \outlinest\let\outlinedone=\relax}
-\fi % End of pdf macros
-
-\ifhint
-% The following uses HINT primitives to implement:
-% \HINThome to mark the position of the home page
-% \HINTlabel to attach a label to the top of a section
-% \HINTlink to link a section number to the section label
-% \HINTcontents to produce an 'outline' item
-% These are the top level HINT macros that are used in this file
-% No HINT primitives are used directly.
-\def\HINThome{\HINTdest name {HINT.home}%
- \HINToutline goto name {HINT.home} depth 1 {Table of Contents}}
-\def\HINTlabel{{\let\*=\empty\HINTdest num \secstar 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}}
-\let\pdflink=\HINTlink
-\fi % End of HINT macros
-
-% Common macros for \ifacro and \ifhint
-\ifacrohint
-\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}
-\fi % End of common macros
+\ifacrohint \input cwebacromac \fi % load hypertext macros
\def\pdfURL#1#2{\ifpdf \ifpdftex\pdfannotlink height \theheight depth \thedepth
attr {/Border [0 0 0]} user { /Type /Annot /Subtype /Link /A