summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/web2c/cwebdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/cwebdir/texinputs/Xcwebmac.tex5
-rw-r--r--Build/source/texk/web2c/cwebdir/texinputs/pdfwebtocfront.tex27
3 files changed, 27 insertions, 10 deletions
diff --git a/Build/source/texk/web2c/cwebdir/ChangeLog b/Build/source/texk/web2c/cwebdir/ChangeLog
index 1a36c3bbc47..e11fb23cf9b 100644
--- a/Build/source/texk/web2c/cwebdir/ChangeLog
+++ b/Build/source/texk/web2c/cwebdir/ChangeLog
@@ -1,3 +1,8 @@
+2020-05-22 Andreas Scherer <https://ascherer.github.io>
+
+ * texinputs/Xcwebmac.tex: Activate alternative assignment operator.
+ * texinputs/pdfwebtocfront.tex: Add comments to the macro code.
+
2020-05-07 Andreas Scherer <https://ascherer.github.io>
* texinputs/Xcwebmac.tex: Amend macros from knuth.drv (n
diff --git a/Build/source/texk/web2c/cwebdir/texinputs/Xcwebmac.tex b/Build/source/texk/web2c/cwebdir/texinputs/Xcwebmac.tex
index e608d5f8b0e..c2a8b4115ad 100644
--- a/Build/source/texk/web2c/cwebdir/texinputs/Xcwebmac.tex
+++ b/Build/source/texk/web2c/cwebdir/texinputs/Xcwebmac.tex
@@ -25,10 +25,11 @@
% Version 3.64 [p20] --- Andreas Scherer, March 2002
% Version 3.64 [p21] --- Andreas Scherer, Octobre 2005
% Version 3.64 [2018] --- Andreas Scherer, Octobre 2018
+% Version 3.64 [2020] --- Andreas Scherer, May 2020
\ifx\undefined\botofcontents\input cwebmac.tex\fi
-\xdef\fmtversion{\fmtversion[2018]}
+\xdef\fmtversion{\fmtversion[2020]}
\def\Cpp{\CPLUSPLUS/} % for backward compatibility
@@ -37,4 +38,4 @@
\def\C#1{\5\5\quad$\triangleright\,${\cmntfont#1}$\,\triangleleft$}
\def\SHC#1{\5\5\quad$\diamond\,${\cmntfont#1}}
-%\let\K=\leftarrow % "honest" alternative to standard assignment operator
+\let\K=\leftarrow % "honest" alternative to standard assignment operator
diff --git a/Build/source/texk/web2c/cwebdir/texinputs/pdfwebtocfront.tex b/Build/source/texk/web2c/cwebdir/texinputs/pdfwebtocfront.tex
index 3fb8d393a4e..be662846096 100644
--- a/Build/source/texk/web2c/cwebdir/texinputs/pdfwebtocfront.tex
+++ b/Build/source/texk/web2c/cwebdir/texinputs/pdfwebtocfront.tex
@@ -1,32 +1,44 @@
+% pdfwebtofront.tex
+% Code from knuth.drv in https://github.com/oberdiek/latex-tds
+% 2020/05/21 v1.0 by Andreas Scherer.
%
-% Move contents page to the front
+% This file is part of project https://github.com/ascherer/cwebbin
+% and may be distributed under the MIT License or the LaTeX Project
+% Public License.
%
-% Code from knuth.drv in https://github.com/oberdiek/latex-tds
-% Works with pdftex and xetex.
+% Move table-of-contents page to the front in PDF output.
+% Works with pdftex and xetex in connection with either 'webmac.tex'
+% for Pascal/WEB programs or 'cwebmac.tex' for C/CWEB programs.
%
\ifx\detokenize\undefined\endinput\fi
\newread\testread
\openin\testread=\contentsfile\relax
\ifeof\testread % First run
\else % Second run
- \let\ORGcon\con
+ \let\ORGcon\con \let\ORGtoc\topofcontents
+ \ifx\undefined\grouptitle \mark{1} % WEB: let's start with section '1'.
+ \else\def\topofcontents{\ORGtoc\gtitle={\the\grouptitle}}\fi % CWEB
+ % Redefine '\con' to be invoked before the first '\N' (starred section).
\def\con{%
- \ifnum\pageno=1 \global\titletrue\fi
+ \def\:{\par\hangindent 2em} % Fix for 'bibtex.web'.
\begingroup
\let\end\relax
- \ORGcon
+ \ORGcon\eject
\endgroup
\let\con\end
}%
+ % Redefine '\N’ to invoke redefined '\con' before switching back
+ % to original '\N'.
\expandafter\let\csname ORGN\expandafter\endcsname
\csname N\endcsname
\expandafter\outer\expandafter\def\csname N\endcsname{%
\con
- \advance\pageno by -1\relax
\expandafter\let\csname N\expandafter\endcsname
\csname ORGN\endcsname
\csname N\endcsname
}%
+ % Special variant of the above for 'mf.web' and 'tex.web'. They put
+ % their tables-of-contents on a sparce 'page 2' and start on page '3'.
\begingroup
\def\num{0}%
\edef\x{\jobname}%
@@ -48,7 +60,6 @@
\csname N\endcsname
\expandafter\outer\expandafter\def\csname N\endcsname{%
\con
- \advance\pageno by -1\relax
\expandafter\let\csname N\expandafter\endcsname
\csname ORGN\endcsname
\csname N\endcsname