texlive[68405] Build/source/texk/web2c/cwebdir: [CWEB] Add support

commits+ascherer at tug.org commits+ascherer at tug.org
Sat Sep 30 17:17:36 CEST 2023


Revision: 68405
          https://tug.org/svn/texlive?view=revision&revision=68405
Author:   ascherer
Date:     2023-09-30 17:17:36 +0200 (Sat, 30 Sep 2023)
Log Message:
-----------
[CWEB] Add support for LuaTeX.

Note that 'pdfwebtocfront.tex' is not yet ready for LuaTeX, because
'gftodvi.tex' breaks in and around 'pwebmac.tex'. -- Later.

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/cwebdir/ChangeLog
    trunk/Build/source/texk/web2c/cwebdir/Makefile
    trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
    trunk/Build/source/texk/web2c/cwebdir/cwebacromac.tex
    trunk/Build/source/texk/web2c/cwebdir/cwebmac.tex
    trunk/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch
    trunk/Build/source/texk/web2c/cwebdir/cwebman.tex
    trunk/Build/source/texk/web2c/cwebdir/texinputs/dcwebmac.tex
    trunk/Build/source/texk/web2c/cwebdir/texinputs/fcwebmac.tex
    trunk/Build/source/texk/web2c/cwebdir/texinputs/icwebmac.tex
    trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctproofmac.tex
    trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex

Modified: trunk/Build/source/texk/web2c/cwebdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ChangeLog	2023-09-29 23:43:39 UTC (rev 68404)
+++ trunk/Build/source/texk/web2c/cwebdir/ChangeLog	2023-09-30 15:17:36 UTC (rev 68405)
@@ -1,3 +1,17 @@
+2023-09-30  Andreas Scherer  <https://ascherer.github.io>
+
+	* Makefile,
+	* ctwill-mini.ch,
+	* cwebacromac.tex,
+	* cwebmac.tex,
+	* cwebman-w2c.ch,
+	* cwebman.tex,
+	* texinputs/dcwebmac.tex,
+	* texinputs/fcwebmac.tex,
+	* texinputs/icwebmac.tex,
+	* texinputs/pdfctproofmac.tex,
+	* texinputs/pdfctwimac.tex: Add support for LuaTeX.
+
 2023-09-26  Andreas Scherer  <https://ascherer.github.io>
 
 	* cwebman-w2c.ch,

Modified: trunk/Build/source/texk/web2c/cwebdir/Makefile
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/Makefile	2023-09-29 23:43:39 UTC (rev 68404)
+++ trunk/Build/source/texk/web2c/cwebdir/Makefile	2023-09-30 15:17:36 UTC (rev 68405)
@@ -1,6 +1,6 @@
 # This file is part of CWEB.
 # It is distributed WITHOUT ANY WARRANTY, express or implied.
-# Version 4.10 --- August 2023
+# Version 4.11 --- September 2023
 
 # Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth
 
@@ -69,6 +69,7 @@
 #PDFTEX = pdftex
 #PDFTEX = xetex
 #PDFTEX = hitex
+#PDFTEX = luatex
 
 ##########  You shouldn't have to change anything after this point #######
 

Modified: trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch	2023-09-29 23:43:39 UTC (rev 68404)
+++ trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch	2023-09-30 15:17:36 UTC (rev 68405)
@@ -23,7 +23,7 @@
 \else
   \pdfpagewidth=\pagewd \advance\pdfpagewidth by 2cm
   \pdfpageheight=\pageht \advance\pdfpageheight by 5cm
-  \ifpdftex \pdfhorigin=1cm \pdfvorigin=1cm
+  \ifpdflua \pdfhorigin=1cm \pdfvorigin=1cm
   \else \global\hoffset=-1.54cm \global\voffset=-1.54cm \fi
 \fi
 
@@ -2077,8 +2077,11 @@
 
 @q Section 2->272. @>
 @* {\tentex CTWILL} user manual.
+Here is a sort of user manual for \.{CTWILL}---which is exactly like
 @y
 @** Mogrify {\tentex CWEAVE} into {\tentex CTWILL}.
+Here is a sort of user manual for \.{CTWILL}%
+\ifluatex, \else---\fi which is exactly like
 @-s@>
 @z
 

Modified: trunk/Build/source/texk/web2c/cwebdir/cwebacromac.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cwebacromac.tex	2023-09-29 23:43:39 UTC (rev 68404)
+++ trunk/Build/source/texk/web2c/cwebdir/cwebacromac.tex	2023-09-30 15:17:36 UTC (rev 68405)
@@ -1,11 +1,25 @@
 % hypertext macros for CWEB listings (in addition to cwebmac.tex)
-% Version 1.0 --- August 2023
+% Version 1.1 --- September 2023
 \ifx\acrohint\undefined\else\endinput\fi % these are not standalone macros
-\ifacro % The following are pdf macros
+\ifluatex % LuaTeX is almost like pdfTeX
+\protected\def\pdfliteral   {\pdfextension literal}
+\protected\def\pdfstartlink {\pdfextension startlink\space}
+\protected\def\pdfendlink   {\pdfextension endlink}
+\protected\def\pdfoutline   {\pdfextension outline\space}
+\protected\def\pdfdest      {\pdfextension dest\space}
+\protected\def\pdfcatalog   {\pdfextension catalog}
+\edef\pdfhorigin {\pdfvariable horigin}
+\edef\pdfvorigin {\pdfvariable vorigin}
+\let\pdfpagewidth=\pagewidth
+\let\pdfpageheight=\pageheight
+\let\pdfoutput=\outputmode
+\fi % end of LuaTeX->pdfTeX redirection macros
+
+\ifacro % The following are general pdf macros
 \def\thewidth{\the\wd0 \space}
 \def\theheight{\the\ht\strutbox\space}
 \def\thedepth{\the\dp\strutbox\space}
-\ifpdftex
+\ifpdflua
   \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

Modified: trunk/Build/source/texk/web2c/cwebdir/cwebmac.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cwebmac.tex	2023-09-29 23:43:39 UTC (rev 68404)
+++ trunk/Build/source/texk/web2c/cwebdir/cwebmac.tex	2023-09-30 15:17:36 UTC (rev 68405)
@@ -1,8 +1,8 @@
 % standard macros for CWEB listings (in addition to plain.tex)
-% Version 4.10 --- August 2023
+% Version 4.11 --- September 2023
 \ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros
-\xdef\fmtversion{\fmtversion+CWEB4.10}
-\chardef\cwebversion=4 \chardef\cwebrevision=10
+\xdef\fmtversion{\fmtversion+CWEB4.11}
+\chardef\cwebversion=4 \chardef\cwebrevision=11
 \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
@@ -9,12 +9,13 @@
 %\ifx\pdf-\else\pdftrue\fi
 \def\pdflinkcolor{0 0 1} % the RGB values for hyperlink color
 \ifxetex\pdftrue\fi % XeTeX produces PDF output
-\ifpdftex % pdfTeX produces PDF output if \pdfoutput>0
+\let\ifacro=\ifpdf
+\newif\ifacrohint \ifacro\acrohinttrue\fi \ifhint\acrohinttrue\fi
+\newif\ifpdflua \ifluatex\pdfluatrue\fi \ifpdftex\pdfluatrue\fi
+\ifpdflua % luaTeX and pdfTeX produce PDF output if \pdfoutput>0
   \def\Black{\pdfliteral{0 g 0 G}}  % use rgb colors for direct PDF output too
   \def\Blue{\pdfliteral{\pdflinkcolor\space rg \pdflinkcolor\space RG}}
 \fi
-\let\ifacro=\ifpdf
-\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)
@@ -136,7 +137,7 @@
 
 \ifacrohint \input cwebacromac \fi % load hypertext macros
 
-\def\pdfURL#1#2{\ifpdf \ifpdftex\pdfannotlink height \theheight depth \thedepth
+\def\pdfURL#1#2{\ifpdf \ifpdflua\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}%
@@ -153,7 +154,7 @@
   \ifhint\HINTlabel\fi% Start page before section
   \noindent{\let\*=\lapstar\bf\secstar.\quad}%
   \ifacro \smash{\raise\baselineskip\hbox to0pt{\let\*=\empty
-    \ifpdftex \pdfdest num \secstar fith%
+    \ifpdflua \pdfdest num \secstar fith%
     \else \special{pdf: dest (\romannumeral\secstar)
       [ @thispage /FitH @ypos ]}\fi}}\fi}
 \let\startsection=\stsec
@@ -194,7 +195,7 @@
   \edef\gtitletoks{\expandafter\stripprefix\meaning\gtitletoks}%
   \edef\next{\write\cont{\ZZ{\gtitletoks}{#1}{\secno}% write to contents file
    {\noexpand\the\pageno}{\the\toksE}}}\next % \ZZ{title}{depth}{sec}{page}{ss}
-  \ifpdf \ifpdftex\expandafter\xdef\csname curr#1\endcsname{\secno}
+  \ifpdf \ifpdflua\expandafter\xdef\csname curr#1\endcsname{\secno}
     \ifnum#1>0\countB=#1 \advance\countB by-1
       \advancenumber{chunk\the\countB.\expnumber{curr\the\countB}}\fi
   \else \special{pdf: outline #1 << /Title (\the\toksE)
@@ -275,7 +276,7 @@
 \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{\ifpdf \ifpdftex\pdfcatalog{/PageMode /UseOutlines}
+\def\startpdf{\ifpdf \ifpdflua\pdfcatalog{/PageMode /UseOutlines}
   \else {\special{pdf: docview << /PageMode /UseOutlines >>}}\fi\fi}
 \def\botofcontents{\vfill
   \centerline{\covernote}} % this material will end the table of contents page
@@ -337,7 +338,7 @@
 \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
-  \ifpdf \ifpdftex \makebookmarks % added in Version 3.68
+  \ifpdf \ifpdflua \makebookmarks % added in Version 3.68
     \countsections \fi\fi % and in Version 4.9
   \parfillskip 0pt plus 1fil
   \def\grouptitle{NAMES OF THE SECTIONS}
@@ -352,8 +353,8 @@
   \def\Us{\note{Used in sections}} % crossref for uses of a section
   \def\I{\par\hangindent 2em}\let\*=*
   \ifacro \def\outsecname{Names of the sections} \let\Xpdf\X
-%  \ifpdftex \makebookmarks \pdfdest name {NOS} fitb % in versions < 3.68
-  \ifpdftex \pdfdest name {NOS} fith % changed in version 3.69
+%  \ifpdflua \makebookmarks \pdfdest name {NOS} fitb % in versions < 3.68
+  \ifpdflua \pdfdest name {NOS} fith % changed in version 3.69
     \pdfoutline goto name {NOS} count -\the\countD {\outsecname}
     \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.%
       {\toksF={}\makeoutlinetoks##2\outlinedone\outlinedone}%

Modified: trunk/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch	2023-09-29 23:43:39 UTC (rev 68404)
+++ trunk/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch	2023-09-30 15:17:36 UTC (rev 68405)
@@ -40,7 +40,7 @@
 \ifacro
   \pdfpagewidth=\pagewidth \advance\pdfpagewidth by 2cm
   \pdfpageheight=\pageheight \advance\pdfpageheight by 3cm
-  \ifpdftex \pdfhorigin=1cm \pdfvorigin=1cm
+  \ifpdflua \pdfhorigin=1cm \pdfvorigin=1cm
   \else \advance\pdfpageheight by 1cm \global\pageshift=-1.54cm
     \global\hoffset=-1.54cm \global\voffset=-1.54cm \fi
 \fi
@@ -51,10 +51,10 @@
 \outer\def\section #1.{\penalty-500\bigskip
         \centerline{\sectionfont\def\.##1{{\twelvett##1}}
   \ifacro\vbox to 0pt{\kern-2.5ex\relax
-    \ifpdftex\pdfdest num \destcount fitbh\relax
+    \ifpdflua\pdfdest num \destcount fitbh\relax
     \else\special{pdf: dest (\the\destcount) [ @thispage /FitBH @ypos ]}\fi
     \def\.##1{##1}\def\TeX{TeX}%
-    \ifpdftex\pdfoutline goto num \destcount
+    \ifpdflua\pdfoutline goto num \destcount
       \ifnum\subsections>0 count -\subsections\fi {#1}\relax
     \else\special{pdf: outline 0 << /Title (#1)
       /A << /S /GoTo /D (\the\destcount) >> >>}\fi
@@ -69,7 +69,7 @@
 \def\appC{17}
 
 \def\Appendix#1{\leavevmode
-  \ifacro\ifpdftex
+  \ifacro\ifpdflua
     \pdfstartlink attr{/Border[0 0 0]} goto num\csname app#1\endcsname\relax
     \Blue\hbox{Appendix}~#1\Black
     \pdfendlink
@@ -83,7 +83,7 @@
 \newcount\subdestcount \subdestcount=151\relax
 
 \outer\def\subsection #1.{\ifacro
-    \ifpdftex\pdfdest num \subdestcount fitbh\relax
+    \ifpdflua\pdfdest num \subdestcount fitbh\relax
       \pdfoutline goto num \subdestcount {#1}\relax
     \else\special{pdf: dest (\the\subdestcount) [ @thispage /FitBH @ypos ]}%
       \special{pdf: outline 1 << /Title (#1)
@@ -93,17 +93,17 @@
 @z
 
 @x
-\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.10)}
+\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.11)}
 @y
 \def\Kpathsea/{{\mc KPATHSEA\spacefactor1000}}
-\def\runninghead{{\tentt CWEB} USER MANUAL (Version 4.10 [\TeX~Live])}
+\def\runninghead{{\tentt CWEB} USER MANUAL (Version 4.11 [\TeX~Live])}
 @z
 
 @x
-\vskip 18pt\centerline{(Version 4.10 --- August 2023)}
+\vskip 18pt\centerline{(Version 4.11 --- September 2023)}
 @y
-\vskip 18pt\centerline{(Version 4.10 --- August 2023)%
-\footnote*{This document describes the extended \.{CWEB} (Version 4.10 [\TeX~Live]).}}
+\vskip 18pt\centerline{(Version 4.11 --- September 2023)%
+\footnote*{This document describes the extended \.{CWEB} (Version 4.11 [\TeX~Live]).}}
 @z
 
 @x
@@ -205,7 +205,7 @@
 @y
 `$\\{main}(\\{argc},\39\\{argv}{}$)'.
 \ifx\pdf+\pdftrue\fi \ifxetex\pdftrue\fi
-\ifpdftex\ifnum\pdfoutput>0\pdftrue\fi\fi
+\ifpdflua\ifnum\pdfoutput>0\pdftrue\fi\fi
 \ifpdf\acrohinttrue\fi \ifhint\acrohinttrue\fi
 @z
 
@@ -323,14 +323,14 @@
 @y
 \vfil\eject\titletrue
 \ifx\pdf+\pdftrue\fi \ifxetex\pdftrue\fi
-\ifpdftex\ifnum\pdfoutput>0 \pdftrue\fi\fi
+\ifpdflua\ifnum\pdfoutput>0 \pdftrue\fi\fi
 \ifacro\acrohinttrue\fi \ifhint\acrohinttrue\fi
 @z
 
 @x
-  \.{ { }\\vskip 15pt \\centerline\{(Version 4.10)\}{ }\\vfill\}}\cr}$$
+  \.{ { }\\vskip 15pt \\centerline\{(Version 4.11)\}{ }\\vfill\}}\cr}$$
 @y
-  \.{ { }\\vskip 15pt \\centerline\{(Version 4.10)\}{ }\\vfill\}}\cr}$$
+  \.{ { }\\vskip 15pt \\centerline\{(Version 4.11)\}{ }\\vfill\}}\cr}$$
 @z
 
 @x

Modified: trunk/Build/source/texk/web2c/cwebdir/cwebman.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cwebman.tex	2023-09-29 23:43:39 UTC (rev 68404)
+++ trunk/Build/source/texk/web2c/cwebdir/cwebman.tex	2023-09-30 15:17:36 UTC (rev 68405)
@@ -35,7 +35,7 @@
 
 \def\lheader{\mainfont\the\pageno\hfill\sc\runninghead\hfill}
 \def\rheader{\hfill\sc\runninghead\hfill\mainfont\the\pageno}
-\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.10)}
+\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.11)}
 
 % This verbatim mode assumes that ! marks are !! in the text being copied.
 \def\verbatim{\begingroup
@@ -49,7 +49,7 @@
 \null\vfill
 \centerline{\titlefont The {\ttitlefont CWEB} System of
     Structured Documentation}
-\vskip 18pt\centerline{(Version 4.10 --- August 2023)}
+\vskip 18pt\centerline{(Version 4.11 --- September 2023)}
 \vskip 24pt
 \centerline{\authorfont Donald E. Knuth and Silvio Levy}
 \vfill
@@ -1163,8 +1163,8 @@
 Alternatively, thanks to H\`an Th\^e\kern-.3em\raise.3ex\hbox{\'{}} Th\`anh
 and Andreas Scherer, you can generate \.{cob.pdf} in one step by simply
 saying `\.{pdftex}~\.{cob}'.
-And a third way to create PDF output from \.{CWEB} input is to say
-`\.{xetex}~\.{cob}'.
+Alternative ways to create PDF output from \.{CWEB} input is to say
+`\.{xetex}~\.{cob}' or `\.{luatex}~\.{cob}'.
 
 Similar output for ``smart'' devices can be created with Martin Ruckert's
 Hi\TeX\ and its dynamic \.{HINT} format; just say `\.{hitex}~\.{cob}'.
@@ -1615,7 +1615,7 @@
   \.{ { }\\titlefalse \% include headline on the contents page}\cr
   \.{ { }\\def\\rheader\{\\mainfont The \{\\tt CWEAVE\}{ }processor\\hfil\}}\cr
   \.{ { }\\centerline\{\\titlefont The \{\\ttitlefont CWEAVE\}{ }processor\}}\cr
-  \.{ { }\\vskip 15pt \\centerline\{(Version 4.10)\}{ }\\vfill\}}\cr}$$
+  \.{ { }\\vskip 15pt \\centerline\{(Version 4.11)\}{ }\\vfill\}}\cr}$$
 Redefining \.{\\rheader}, which is the headline for right-hand pages,
 suffices in this case to put the desired information at the top of the
 contents page.

Modified: trunk/Build/source/texk/web2c/cwebdir/texinputs/dcwebmac.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/texinputs/dcwebmac.tex	2023-09-29 23:43:39 UTC (rev 68404)
+++ trunk/Build/source/texk/web2c/cwebdir/texinputs/dcwebmac.tex	2023-09-30 15:17:36 UTC (rev 68405)
@@ -54,7 +54,7 @@
 \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
-  \ifpdf \ifpdftex \makebookmarks % added in Version 3.68
+  \ifpdf \ifpdflua \makebookmarks % added in Version 3.68
     \countsections \fi\fi % and in Version 4.9
   \parfillskip 0pt plus 1fil
   \let\topsecno=\nullsec
@@ -64,7 +64,7 @@
   \def\note##1##2.{\quad{\eightrm##1~\ifacrohint{\pdfnote##2.}\else{##2}\fi.}}
   \def\I{\par\hangindent 2em}\let\*=*
   \ifacro \let\Xpdf\X
-  \ifpdftex \pdfdest name {NOS} fith
+  \ifpdflua \pdfdest name {NOS} fith
     \pdfoutline goto name {NOS} count -\the\countD {\outsecname}
     \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.%
       {\toksF={}\makeoutlinetoks##2\outlinedone\outlinedone}%

Modified: trunk/Build/source/texk/web2c/cwebdir/texinputs/fcwebmac.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/texinputs/fcwebmac.tex	2023-09-29 23:43:39 UTC (rev 68404)
+++ trunk/Build/source/texk/web2c/cwebdir/texinputs/fcwebmac.tex	2023-09-30 15:17:36 UTC (rev 68405)
@@ -74,7 +74,7 @@
 \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
-  \ifpdf \ifpdftex \makebookmarks % added in Version 3.68
+  \ifpdf \ifpdflua \makebookmarks % added in Version 3.68
     \countsections \fi\fi % and in Version 4.9
   \parfillskip 0pt plus 1fil
   \def\grouptitle{NOMS DES SECTIONS}
@@ -89,8 +89,8 @@
   \def\Us{\note{Utilis\'e dans les sections}} % crossref for uses of a section
   \def\I{\par\hangindent 2em}\let\*=*
   \ifpdf \def\outsecname{Noms des sections} \let\Xpdf\X
-%  \ifpdftex \makebookmarks \pdfdest name {NOS} fitb % in versions < 3.68
-  \ifpdftex \pdfdest name {NOS} fith % changed in version 3.69
+%  \ifpdflua \makebookmarks \pdfdest name {NOS} fitb % in versions < 3.68
+  \ifpdflua \pdfdest name {NOS} fith % changed in version 3.69
     \pdfoutline goto name {NOS} count -\the\countD {\outsecname}
     \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.%
       {\toksF={}\makeoutlinetoks##2\outlinedone\outlinedone}%

Modified: trunk/Build/source/texk/web2c/cwebdir/texinputs/icwebmac.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/texinputs/icwebmac.tex	2023-09-29 23:43:39 UTC (rev 68404)
+++ trunk/Build/source/texk/web2c/cwebdir/texinputs/icwebmac.tex	2023-09-30 15:17:36 UTC (rev 68405)
@@ -100,7 +100,7 @@
 \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
-  \ifpdf \ifpdftex \makebookmarks % added in Version 3.68
+  \ifpdf \ifpdflua \makebookmarks % added in Version 3.68
     \countsections \fi\fi % and in Version 4.9
   \parfillskip 0pt plus 1fil
   \def\grouptitle{NOMI DELLE SEZIONI}
@@ -115,8 +115,8 @@
   \def\Us{\note{Usato nelle sezioni}} % crossref for uses of a section
   \def\I{\par\hangindent 2em}\let\*=*
   \ifpdf \def\outsecname{Nomi delle sezioni} \let\Xpdf\X
-%  \ifpdftex \makebookmarks \pdfdest name {NOS} fitb % in versions < 3.68
-  \ifpdftex \pdfdest name {NOS} fith % changed in version 3.69
+%  \ifpdflua \makebookmarks \pdfdest name {NOS} fitb % in versions < 3.68
+  \ifpdflua \pdfdest name {NOS} fith % changed in version 3.69
     \pdfoutline goto name {NOS} count -\the\countD {\outsecname}
     \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.%
       {\toksF={}\makeoutlinetoks##2\outlinedone\outlinedone}%

Modified: trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctproofmac.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctproofmac.tex	2023-09-29 23:43:39 UTC (rev 68404)
+++ trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctproofmac.tex	2023-09-30 15:17:36 UTC (rev 68405)
@@ -1,10 +1,10 @@
 % standard macros for CWEB listings (in addition to plain.tex)
-% Version 4.10 --- August 2023
+% Version 4.11 --- September 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.10+PROOFS+PDF}
+\xdef\fmtversion{\fmtversion+CTWILL4.11+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
@@ -11,12 +11,13 @@
 %\ifx\pdf-\else\pdftrue\fi
 \def\pdflinkcolor{0 0 1} % the RGB values for hyperlink color
 \ifxetex\pdftrue\fi % XeTeX produces PDF output
-\ifpdftex % pdfTeX produces PDF output if \pdfoutput>0
+\let\ifacro=\ifpdf
+\newif\ifacrohint \ifacro\acrohinttrue\fi \ifhint\acrohinttrue\fi
+\newif\ifpdflua \ifluatex\pdfluatrue\fi \ifpdftex\pdfluatrue\fi
+\ifpdflua % luaTeX and pdfTeX produce PDF output if \pdfoutput>0
   \def\Black{\pdfliteral{0 g 0 G}}  % use rgb colors for direct PDF output too
   \def\Blue{\pdfliteral{\pdflinkcolor\space rg \pdflinkcolor\space RG}}
 \fi
-\let\ifacro=\ifpdf
-\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)
@@ -137,7 +138,7 @@
 
 \ifacrohint \input cwebacromac \fi % load hypertext macros
 
-\def\pdfURL#1#2{\ifpdf \ifpdftex\pdfannotlink height \theheight depth \thedepth
+\def\pdfURL#1#2{\ifpdf \ifpdflua\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}%
@@ -154,7 +155,7 @@
   \ifhint\HINTlabel\fi% Start page before section
   \noindent{\let\*=\lapstar\bf\secstar.\quad}%
   \ifpdf \smash{\raise\baselineskip\hbox to0pt{\let\*=\empty
-    \ifpdftex \pdfdest num \secstar fith%
+    \ifpdflua \pdfdest num \secstar fith%
     \else \special{pdf: dest (\romannumeral\secstar)
       [ @thispage /FitH @ypos ]}\fi}}\fi}
 \let\startsection=\stsec
@@ -195,7 +196,7 @@
   \edef\gtitletoks{\expandafter\stripprefix\meaning\gtitletoks}%
   \edef\next{\write\cont{\ZZ{\gtitletoks}{#1}{\secno}% write to contents file
    {\noexpand\the\pageno}{\the\toksE}}}\next % \ZZ{title}{depth}{sec}{page}{ss}
-  \ifpdf \ifpdftex\expandafter\xdef\csname curr#1\endcsname{\secno}
+  \ifpdf \ifpdflua\expandafter\xdef\csname curr#1\endcsname{\secno}
     \ifnum#1>0\countB=#1 \advance\countB by-1
       \advancenumber{chunk\the\countB.\expnumber{curr\the\countB}}\fi
   \else \special{pdf: outline #1 << /Title (\the\toksE)
@@ -273,7 +274,7 @@
 \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{\ifpdf \ifpdftex\pdfcatalog{/PageMode /UseOutlines}
+\def\startpdf{\ifpdf \ifpdflua\pdfcatalog{/PageMode /UseOutlines}
   \else {\special{pdf: docview << /PageMode /UseOutlines >>}}\fi\fi}
 \def\botofcontents{\vfill
   \centerline{\covernote}} % this material will end the table of contents page
@@ -356,7 +357,7 @@
 \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
-  \ifpdf \ifpdftex \makebookmarks \countsections \fi\fi
+  \ifpdf \ifpdflua \makebookmarks \countsections \fi\fi
   \parfillskip 0pt plus 1fil
   \def\grouptitle{NAMES OF THE SECTIONS}
   \let\topsecno=\nullsec
@@ -370,7 +371,7 @@
   \def\Us{\note{Used in sections}} % crossref for uses of a section
   \def\I{\par\hangindent 2em}\let\*=*
   \ifpdf \def\outsecname{Names of the sections} \let\Xpdf\X
-  \ifpdftex \pdfdest name {NOS} fith
+  \ifpdflua \pdfdest name {NOS} fith
     \pdfoutline goto name {NOS} count -\the\countD {\outsecname}
     \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.%
       {\toksF={}\makeoutlinetoks##2\outlinedone\outlinedone}%

Modified: trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex	2023-09-29 23:43:39 UTC (rev 68404)
+++ trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex	2023-09-30 15:17:36 UTC (rev 68405)
@@ -1,11 +1,11 @@
 % standard macros for CWEB listings (in addition to plain.tex)
-% Version 4.10 --- August 2023
+% Version 4.11 --- September 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.10+LNCS+PDF}
+\xdef\fmtversion{\fmtversion+CTWILL4.11+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
@@ -12,10 +12,6 @@
 %\ifx\pdf-\else\pdftrue\fi
 \def\pdflinkcolor{0 0 1} % the RGB values for hyperlink color
 \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\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.}
@@ -22,6 +18,11 @@
   \end
 \fi
 \newif\ifacrohint \ifacro\acrohinttrue\fi \ifhint\acrohinttrue\fi
+\newif\ifpdflua \ifluatex\pdfluatrue\fi \ifpdftex\pdfluatrue\fi
+\ifpdflua % luaTeX and pdfTeX produce PDF output if \pdfoutput>0
+  \def\Black{\pdfliteral{0 g 0 G}}  % use rgb colors for direct PDF output too
+  \def\Blue{\pdfliteral{\pdflinkcolor\space rg \pdflinkcolor\space RG}}
+\fi
 
 \let\:=\. % preserve a way to get the dot accent
  % (all other accents will still work as usual)
@@ -258,7 +259,7 @@
   \sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50
   \noindent\strut{\let\*=\lapstar\bf\secno.\quad}%
   \ifacro \smash{\raise\baselineskip\hbox to0pt{\let\*=\empty
-    \ifpdftex \pdfdest num \secstar fith%
+    \ifpdflua \pdfdest num \secstar fith%
     \else \special{pdf: dest (\romannumeral\secstar)
       [ @thispage /FitH @ypos ]}\fi}}\fi}
 \def\startsection{\titletrue
@@ -309,7 +310,7 @@
       \gdef\rrhead{\let\i=I\uppercase{\ignorespaces#3}}
   \fi
   \message{*\secno} % progress report
-  \ifpdf \ifpdftex\def\stripprefix##1>{}\def\gtitletoks{#3}%
+  \ifpdf \ifpdflua\def\stripprefix##1>{}\def\gtitletoks{#3}%
     \edef\gtitletoks{\expandafter\stripprefix\meaning\gtitletoks}%
     {\immediate\write\cont{\ZZ{\gtitletoks}{#1}{\secno}% write to contents file
       {\noexpand\the\pageno}{\the\toksE}}} % \ZZ{title}{depth}{sec}{page}{ss}
@@ -513,7 +514,7 @@
   %\global\advance\pageno by1}
 %\def\topofcontents{\centerline{\titlefont\title}\vskip.7in
   %\vfill} % this material will start the table of contents page
-%\def\startpdf{\ifpdf \ifpdftex\pdfcatalog{/PageMode /UseOutlines}
+%\def\startpdf{\ifpdf \ifpdflua\pdfcatalog{/PageMode /UseOutlines}
   %\else {\special{pdf: docview << /PageMode /UseOutlines >>}}\fi\fi}
 %\def\botofcontents{\vfill
   %\centerline{\covernote}} % this material will end the table of contents page
@@ -527,13 +528,13 @@
 \def\readsections{\input \jobname.scn}
 
 \newwrite\cont
-\ifpdftex
+\ifpdflua
   \immediate\openout\cont=\contentsfile
   \immediate\write\cont{\catcode `\noexpand\@=11\relax} % \makeatletter
 \fi
 
 \def\inx{\flushout % No full index at the end
-  \ifpdftex
+  \ifpdflua
     \immediate\write\cont{\catcode `\noexpand\@=12\relax} % \makeatother
     \immediate\closeout\cont % the contents information has been fully gathered
   \fi}
@@ -541,7 +542,7 @@
   \def\U##1.{} \def\Us##1.{} \def\Q##1.{} \def\Qs##1.{} \let\I=\relax \let\*=*
   \newrefs={} \output={\shipout\box255}
   \def\outsecname{Names of the sections}
-  \ifpdftex \makebookmarks \countsections
+  \ifpdflua \makebookmarks \countsections
     \pdfdest name {NOS} fith
     \pdfoutline goto name {NOS} count -\the\countD {\outsecname}
     \def\X##1:##2\X{\firstsecno##1.%



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