summaryrefslogtreecommitdiff
path: root/web/c_cpp/cweb/cwebmac.tex
diff options
context:
space:
mode:
Diffstat (limited to 'web/c_cpp/cweb/cwebmac.tex')
-rw-r--r--web/c_cpp/cweb/cwebmac.tex19
1 files changed, 9 insertions, 10 deletions
diff --git a/web/c_cpp/cweb/cwebmac.tex b/web/c_cpp/cweb/cwebmac.tex
index 60f86ce5a9..385dc474e7 100644
--- a/web/c_cpp/cweb/cwebmac.tex
+++ b/web/c_cpp/cweb/cwebmac.tex
@@ -1,19 +1,20 @@
% standard macros for CWEB listings (in addition to plain.tex)
-% Version 3.70 --- July 2017
+% Version 4.2 --- February 2021
\ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros
-\xdef\fmtversion{\fmtversion+CWEB3.70}
-\chardef\cwebversion=3 \chardef\cwebrevision=70
+\xdef\fmtversion{\fmtversion+CWEB4.2}
+\chardef\cwebversion=4 \chardef\cwebrevision=1
\newif\ifpdf
\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
+\ifx\undefined\XeTeXrevision\else\pdftrue\fi % XeTeX produces PDF output
\newif\ifpdftex
\ifx\pdfoutput\undefined \pdftexfalse \else\ifnum\pdfoutput=0 \pdftexfalse
%\else \pdftextrue \pdfoutput=1 \input pdfcolor \let\setcolor\pdfsetcolor \fi\fi
\else \pdftextrue \pdfoutput=1 % changed in 3.69
\def\Black{\pdfliteral{0 g 0 G}} % use rgb colors for direct PDF output too
- \def\Blue{\pdfliteral{0 0 1 rg 0 0 1 RG}}
+ \def\Blue{\pdfliteral{\pdflinkcolor\space rg \pdflinkcolor\space RG}}
\fi\fi
\newif\ifacro \ifpdf\acrotrue\fi \ifpdftex\acrotrue\fi
@@ -281,12 +282,10 @@
\def\stsec{\rightskip=0pt % get out of C mode (cf. \B)
\sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50
\noindent{\let\*=\lapstar\bf\secstar.\quad}%
- \ifpdftex\smash{\raise\baselineskip\hbox to0pt{%
-% \let\*=\empty\pdfdest num \secstar fith}} % bad space in versions < 3.68
- \let\*=\empty\pdfdest num \secstar fith}}% changed in version 3.68
- \else\ifpdf\smash{\raise\baselineskip\hbox to0pt{%
- \let\*=\empty\special{%
- pdf: dest (\romannumeral\secstar) [ @thispage /FitH @ypos ]}}}\fi\fi}
+ \ifacro \smash{\raise\baselineskip\hbox to0pt{\let\*=\empty
+ \ifpdftex \pdfdest num \secstar fith%
+ \else \special{pdf: dest (\romannumeral\secstar)
+ [ @thispage /FitH @ypos ]}\fi}}\fi}
\let\startsection=\stsec
\def\defin#1{\global\advance\ind by 2 \1\&{#1 } } % begin `define' or `format'
\def\A{\note{See also section}} % xref for doubly defined section name