From 3b7ec2d472bacaa40338eedb0039cf38f0d3a0e8 Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Wed, 25 Oct 2023 10:08:04 +0000 Subject: [CWEB] Bring PDF/HINT macros together. git-svn-id: svn://tug.org/texlive/trunk@68646 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/cwebdir/ChangeLog | 6 ++++ Build/source/texk/web2c/cwebdir/cwebmac.tex | 28 ++++++++-------- .../texk/web2c/cwebdir/texinputs/pdfctproofmac.tex | 30 +++++++++--------- .../texk/web2c/cwebdir/texinputs/pdfctwimac.tex | 37 +++++++++++----------- 4 files changed, 54 insertions(+), 47 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/web2c/cwebdir/ChangeLog b/Build/source/texk/web2c/cwebdir/ChangeLog index 6db4bcd3aed..ceb6ed51ed9 100644 --- a/Build/source/texk/web2c/cwebdir/ChangeLog +++ b/Build/source/texk/web2c/cwebdir/ChangeLog @@ -1,3 +1,9 @@ +2023-10-25 Andreas Scherer + + * cwebmac.tex, + * texinputs/pdfctproofmac.tex, + * texinputs/pdfctwimac.tex: Bring PDF/HINT macros together. + 2023-10-18 Andreas Scherer * cwebmac.tex, diff --git a/Build/source/texk/web2c/cwebdir/cwebmac.tex b/Build/source/texk/web2c/cwebdir/cwebmac.tex index 4d288e577cd..e079a80ef52 100644 --- a/Build/source/texk/web2c/cwebdir/cwebmac.tex +++ b/Build/source/texk/web2c/cwebdir/cwebmac.tex @@ -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 diff --git a/Build/source/texk/web2c/cwebdir/texinputs/pdfctproofmac.tex b/Build/source/texk/web2c/cwebdir/texinputs/pdfctproofmac.tex index 0ba54fbe804..7abb58d883d 100644 --- a/Build/source/texk/web2c/cwebdir/texinputs/pdfctproofmac.tex +++ b/Build/source/texk/web2c/cwebdir/texinputs/pdfctproofmac.tex @@ -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 diff --git a/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex b/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex index 699cc476626..1eb66a2db8b 100644 --- a/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex +++ b/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex @@ -1,28 +1,11 @@ % 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' % 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{*}} -- cgit v1.2.3