summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_tex@freenet.de>2023-10-25 10:09:47 +0000
committerAndreas Scherer <andreas_tex@freenet.de>2023-10-25 10:09:47 +0000
commit235615565cf5ad8abf385604c6f4df804d5f59c4 (patch)
tree792f962329a4254d4fc740088acbcd1cc54080a8 /Master
parent3b7ec2d472bacaa40338eedb0039cf38f0d3a0e8 (diff)
[CWEB] Bring PDF/HINT macros together.
git-svn-id: svn://tug.org/texlive/trunk@68647 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctproofmac.tex30
-rw-r--r--Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctwimac.tex37
-rw-r--r--Master/texmf-dist/tex/plain/cweb/cwebmac.tex28
3 files changed, 48 insertions, 47 deletions
diff --git a/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctproofmac.tex b/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctproofmac.tex
index 0ba54fbe804..7abb58d883d 100644
--- a/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctproofmac.tex
+++ b/Master/texmf-dist/tex/plain/cweb/cwebbin/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/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctwimac.tex b/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctwimac.tex
index 699cc476626..1eb66a2db8b 100644
--- a/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfctwimac.tex
+++ b/Master/texmf-dist/tex/plain/cweb/cwebbin/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{*}}
diff --git a/Master/texmf-dist/tex/plain/cweb/cwebmac.tex b/Master/texmf-dist/tex/plain/cweb/cwebmac.tex
index 4d288e577cd..e079a80ef52 100644
--- a/Master/texmf-dist/tex/plain/cweb/cwebmac.tex
+++ b/Master/texmf-dist/tex/plain/cweb/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