texlive[68646] Build/source/texk/web2c/cwebdir: [CWEB] Bring PDF/HINT

commits+ascherer at tug.org commits+ascherer at tug.org
Wed Oct 25 12:08:04 CEST 2023


Revision: 68646
          https://tug.org/svn/texlive?view=revision&revision=68646
Author:   ascherer
Date:     2023-10-25 12:08:04 +0200 (Wed, 25 Oct 2023)
Log Message:
-----------
[CWEB] Bring PDF/HINT macros together.

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/cwebdir/ChangeLog
    trunk/Build/source/texk/web2c/cwebdir/cwebmac.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-10-25 09:25:58 UTC (rev 68645)
+++ trunk/Build/source/texk/web2c/cwebdir/ChangeLog	2023-10-25 10:08:04 UTC (rev 68646)
@@ -1,3 +1,9 @@
+2023-10-25  Andreas Scherer  <https://ascherer.github.io>
+
+	* cwebmac.tex,
+	* texinputs/pdfctproofmac.tex,
+	* texinputs/pdfctwimac.tex: Bring PDF/HINT macros together.
+
 2023-10-18  Andreas Scherer  <https://ascherer.github.io>
 
 	* cwebmac.tex,

Modified: trunk/Build/source/texk/web2c/cwebdir/cwebmac.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cwebmac.tex	2023-10-25 09:25:58 UTC (rev 68645)
+++ trunk/Build/source/texk/web2c/cwebdir/cwebmac.tex	2023-10-25 10:08:04 UTC (rev 68646)
@@ -3,19 +3,6 @@
 \ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros
 \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
-%\ifx\pdf-\else\pdftrue\fi
-\ifxetex\pdftrue\fi % XeTeX produces PDF output
-\ifpdf \def\pdflinkcolor{0 0 1} \fi % the RGB values for hyperlink color
-\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 (default)
-  \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)
@@ -135,8 +122,21 @@
 \newif\iftokprocessed \newif\ifTnum \newif\ifinstr
 {\def\\{\global\let\spacechar= }\\ }
 
+% Here we decide the output format, depending on the TeX engine in use:
+\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
+%\ifx\pdf-\else\pdftrue\fi
+\ifxetex\pdftrue\fi % XeTeX produces PDF output
+\ifpdf \def\pdflinkcolor{0 0 1} \fi % the RGB values for hyperlink color
+\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 (default)
+  \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
 \ifacrohint \input cwebacromac \fi % load hypertext macros
-
 \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

Modified: trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctproofmac.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctproofmac.tex	2023-10-25 09:25:58 UTC (rev 68645)
+++ trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctproofmac.tex	2023-10-25 10:08:04 UTC (rev 68646)
@@ -1,23 +1,10 @@
 % standard macros for CWEB listings (in addition to plain.tex)
-% Version 4.11 --- September 2023
+% Version 4.11 --- October 2023
 % modified for proofs in CTWILL
 % modified for PDF/HINT output with 'tex "\let\pdf+' or '{hi|lua|pdf|xe}tex'
 % 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.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
-%\ifx\pdf-\else\pdftrue\fi
-\ifxetex\pdftrue\fi % XeTeX produces PDF output
-\ifpdf \def\pdflinkcolor{0 0 1} \fi % the RGB values for hyperlink color
-\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\:=\. % preserve a way to get the dot accent
  % (all other accents will still work as usual)
@@ -136,8 +123,21 @@
 \newif\iftokprocessed \newif\ifTnum \newif\ifinstr
 {\def\\{\global\let\spacechar= }\\ }
 
+% Here we decide the output format, depending on the TeX engine in use:
+\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
+%\ifx\pdf-\else\pdftrue\fi
+\ifxetex\pdftrue\fi % XeTeX produces PDF output
+\ifpdf \def\pdflinkcolor{0 0 1} \fi % the RGB values for hyperlink color
+\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
 \ifacrohint \input cwebacromac \fi % load hypertext macros
-
 \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

Modified: trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex	2023-10-25 09:25:58 UTC (rev 68645)
+++ trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex	2023-10-25 10:08:04 UTC (rev 68646)
@@ -1,5 +1,5 @@
 % standard macros for CWEB listings (in addition to plain.tex)
-% Version 4.11 --- September 2023
+% Version 4.11 --- October 2023
 % modified for pages produced by CTWILL
 % further modified for page size of the MMIXware book
 % modified for PDF output with 'tex "\let\pdf+' or '{lua|pdf|xe}tex'
@@ -6,23 +6,6 @@
 % 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.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
-%\ifx\pdf-\else\pdftrue\fi
-\ifxetex\pdftrue\fi % XeTeX produces PDF output
-\ifpdf \def\pdflinkcolor{0 0 1} \fi % the RGB values for hyperlink color
-\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
-\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)
@@ -252,6 +235,24 @@
 \newif\iftokprocessed \newif\ifTnum \newif\ifinstr
 {\def\\{\global\let\spacechar= }\\ }
 
+% Here we decide the output format, depending on the TeX engine in use:
+\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
+%\ifx\pdf-\else\pdftrue\fi
+\ifxetex\pdftrue\fi % XeTeX produces PDF output
+\ifpdf \def\pdflinkcolor{0 0 1} \fi % the RGB values for hyperlink color
+\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
+\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
 \ifacrohint \input cwebacromac \fi % load hypertext macros
 
 \def\lapstar{\rlap{*}}



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