summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/plain
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-12-03 21:09:44 +0000
committerKarl Berry <karl@freefriends.org>2023-12-03 21:09:44 +0000
commit1f59d7616e549fabea384e19171ab2249954962d (patch)
tree5c2d3c2fd28213382c84437e9a9ec76c8fc1032e /Master/texmf-dist/tex/plain
parentfc97164ee528176c45f367b0a4aaca578fce4c6c (diff)
pwebmac (3dec23)
git-svn-id: svn://tug.org/texlive/trunk@69027 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/plain')
-rw-r--r--Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex39
1 files changed, 21 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex b/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex
index 880075cb2a5..a7bdc717b9e 100644
--- a/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex
+++ b/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex
@@ -5,19 +5,7 @@
% macro integration \`a la CWEB by Andreas Scherer <andreas_tex@freenet.de>.
% This file is not copyrighted and can be used freely.
\ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros
-\xdef\fmtversion{\fmtversion+WEBMAC4.10}
-\input iftex.sty % TeX engine tests
-\ifx\pdf+\pdftrue\fi
-% Uncomment the following line if you want PDF goodies to be the default
-%\ifx\pdf-\else\pdftrue\fi
-\def\pdflinkcolor{0 0 1} % the RGB values for hyperlink color
-\ifxetex\pdftrue\fi % XeTeX produces PDF output
-\newif\ifacrohint \ifpdf\acrohinttrue\fi \ifhint\acrohinttrue\fi
-\newif\ifpdflua \ifluatex\pdfluatrue\fi \ifpdftex\pdfluatrue\fi
-\ifpdflua % pdfTeX and luaTeX 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
+\xdef\fmtversion{\fmtversion+PWEBMAC4.11}
\parskip 0pt % no stretch between paragraphs
\parindent 1em % for paragraphs and for the first line of Pascal text
@@ -90,6 +78,20 @@
\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
+\newif\ifacrohint \ifpdf\acrohinttrue\fi \ifhint\acrohinttrue\fi
+\newif\ifpdflua \ifluatex\pdfluatrue\fi \ifpdftex\pdfluatrue\fi
+\ifpdflua % pdfTeX and luaTeX 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
+
\ifluatex % LuaTeX is almost like pdfTeX
\protected\def\pdfliteral {\pdfextension literal}
\protected\def\pdfstartlink {\pdfextension startlink\space}
@@ -97,7 +99,7 @@
\protected\def\pdfoutline {\pdfextension outline\space}
\protected\def\pdfdest {\pdfextension dest\space}
\protected\def\pdfcatalog {\pdfextension catalog}
-\chardef\pdfshellescape
+\chardef\pdfshellescape % excerpt from 'shellesc.sty'
\directlua{tex.sprint((status.shell_escape or os.execute()) .. " ")}
\edef\pdfhorigin {\pdfvariable horigin}
\edef\pdfvorigin {\pdfvariable vorigin}
@@ -106,7 +108,7 @@
\let\pdfoutput=\outputmode
\fi % end of LuaTeX->pdfTeX redirection macros
-\ifpdf % The following are pdf macros from 'cwebmac.tex 3.70'
+\ifpdf % The following are general pdf macros from 'cwebmac.tex 3.70'
\def\thewidth{\the\wd0 \space}
\def\theheight{\the\ht\strutbox\space}
\def\thedepth{\the\dp\strutbox\space}
@@ -190,7 +192,7 @@
\def\makeolproctokchar#1 #2 #3{\addF{#3}}
\def\outlinedone{\edef\outlinest{\global\noexpand\toksE={\the\toksF}}%
\outlinest\let\outlinedone=\relax}
-\fi % End of pdf macros
+\fi % End of general pdf macros
\ifhint
% The following uses HINT primitives to implement:
@@ -232,9 +234,10 @@
\next
}
\def\makenote{\addtokens\toksB
- {\noexpand\pdflink{\the\toksC}{\romannumeral\the\toksC}}\toksC={}\global\countC=0}
+ {\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
+\fi % End of common pdf/hint macros
\def\pdfURL#1#2{\ifpdf \ifpdflua\pdfannotlink height \theheight depth \thedepth
attr {/Border [0 0 0]} user { /Type /Annot /Subtype /Link /A