diff --git a/0001-Support-extended-syntax-for-numeric-literals.patch b/0001-Support-extended-syntax-for-numeric-literals.patch index 48c39cf..53ef9ee 100644 --- a/0001-Support-extended-syntax-for-numeric-literals.patch +++ b/0001-Support-extended-syntax-for-numeric-literals.patch @@ -1,7 +1,7 @@ -From ba514ca2a52ab65e46d3477724672564cb492646 Mon Sep 17 00:00:00 2001 +From 07e8fcc3d675a01043c97d1ae01df3eff2745399 Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Mon, 29 Mar 2021 13:14:34 +0200 -Subject: [PATCH 1/5] Support extended syntax for numeric literals. +Subject: [PATCH 1/6] Support extended syntax for numeric literals. --- ctwimac.tex | 15 ++++++++++----- @@ -90,5 +90,5 @@ index 29533b8..dbcf312 100644 \hbox{\strut\kern2pt\.{#1}\kern2pt}} \hrule}\vrule\kern2pt}} % verbatim string -- -2.41.0 +2.47.1 diff --git a/0002-Purge-redundant-TeX-macro.patch b/0002-Purge-redundant-TeX-macro.patch index 8a5e52d..c3da5b2 100644 --- a/0002-Purge-redundant-TeX-macro.patch +++ b/0002-Purge-redundant-TeX-macro.patch @@ -1,7 +1,7 @@ -From a5ee9d7e41df5d084cdbd23a9e43cdd9e31c1e6c Mon Sep 17 00:00:00 2001 +From e915d4e570ec3d56765317862eb3b664dbf764c1 Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Thu, 8 Apr 2021 14:44:11 +0200 -Subject: [PATCH 2/5] Purge redundant '\TeX' macro. +Subject: [PATCH 2/6] Purge redundant '\TeX' macro. --- ctwimac.tex | 5 +---- @@ -68,5 +68,5 @@ index 99ae604..89e3b68 100644 \let\mc=\ninerm % medium caps \def\CEE/{{\mc C\spacefactor1000}} -- -2.41.0 +2.47.1 diff --git a/0003-Adapt-to-CWEB-4.5.patch b/0003-Adapt-to-CWEB-4.5.patch index 29f8878..8aa07e4 100644 --- a/0003-Adapt-to-CWEB-4.5.patch +++ b/0003-Adapt-to-CWEB-4.5.patch @@ -1,7 +1,7 @@ -From eb98776596c3d9504243de133819946540fa609a Mon Sep 17 00:00:00 2001 +From 2ee035a94ad155cd244afe6f35b483eb02d818de Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Wed, 7 Jul 2021 13:57:00 +0200 -Subject: [PATCH 3/5] Adapt to CWEB 4.5. +Subject: [PATCH 3/6] Adapt to CWEB 4.5. --- ctwimac.tex | 40 ++++++++++++++++++++-------------------- @@ -266,5 +266,5 @@ index 89e3b68..6d9ac2f 100644 \def\normaloutput#1{\shipout\vbox{ \vbox to 3pc{\ifodd\pageno\rightheadline\else\leftheadline\fi\vfill} -- -2.41.0 +2.47.1 diff --git a/0004-Add-silent-datecontentspage-macro.patch b/0004-Add-silent-datecontentspage-macro.patch index 9a3d535..afdd22b 100644 --- a/0004-Add-silent-datecontentspage-macro.patch +++ b/0004-Add-silent-datecontentspage-macro.patch @@ -1,7 +1,7 @@ -From e1d2ad3d3bde4a6d5611b4627a9feb43118a87fa Mon Sep 17 00:00:00 2001 +From abcfe710f5d5ce3b6801e391ac57105046cb446e Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Thu, 10 Feb 2022 09:24:39 +0100 -Subject: [PATCH 4/5] Add silent \datecontentspage macro. +Subject: [PATCH 4/6] Add silent \datecontentspage macro. --- ctwimac.tex | 2 +- @@ -21,5 +21,5 @@ index df24900..014168b 100644 % To produce only a subset of pages, put the page numbers on separate % lines in a file called pages.tex -- -2.41.0 +2.47.1 diff --git a/0005-Update-CTWILL-macros-for-CWEB-4.9.patch b/0005-Update-CTWILL-macros-for-CWEB-4.9.patch index c050ea6..df63558 100644 --- a/0005-Update-CTWILL-macros-for-CWEB-4.9.patch +++ b/0005-Update-CTWILL-macros-for-CWEB-4.9.patch @@ -1,7 +1,7 @@ -From 6b42e6c76f705f1adc9ef62ddc63318df9676d42 Mon Sep 17 00:00:00 2001 +From 9352f2538be0025a86ecee2f3fac4222d756483a Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Wed, 14 Jun 2023 10:00:33 +0200 -Subject: [PATCH 5/5] Update CTWILL macros for CWEB 4.9. +Subject: [PATCH 5/6] Update CTWILL macros for CWEB 4.9. --- ctwimac.tex | 10 ++++++---- @@ -109,5 +109,5 @@ index 6d9ac2f..6865478 100644 % \L is Polish letter suppressed-L; we have no shorthand for \le % \O is Scandinavian letter O-with-slash -- -2.41.0 +2.47.1 diff --git a/0006-Rename-page-dimensions-to-match-cwebmac.patch b/0006-Rename-page-dimensions-to-match-cwebmac.patch new file mode 100644 index 0000000..bcc2da6 --- /dev/null +++ b/0006-Rename-page-dimensions-to-match-cwebmac.patch @@ -0,0 +1,94 @@ +From 88a5e5237f615d94a3ea3f6c8e8d7391969198e5 Mon Sep 17 00:00:00 2001 +From: debbuild +Date: Fri, 27 Dec 2024 11:35:30 +0100 +Subject: [PATCH 6/6] Rename page dimensions to match cwebmac. + +--- + ctwimac.tex | 26 +++++++++++++------------- + 1 file changed, 13 insertions(+), 13 deletions(-) + +diff --git a/ctwimac.tex b/ctwimac.tex +index d65f5bf..a7978d8 100644 +--- a/ctwimac.tex ++++ b/ctwimac.tex +@@ -259,16 +259,16 @@ + % \L is Polish letter suppressed-L + \outer\def\M#1{\def\secno{#1}\startsection\ignorespaces} + \outer\def\N{\ifvoid\partialpage\lefttrue +- \else\ifdim\ht\partialpage<\pageht \leftfalse\else\lefttrue\fi\fi\NNN} ++ \else\ifdim\ht\partialpage<\pageheight \leftfalse\else\lefttrue\fi\fi\NNN} + \outer\def\NN{\ifvoid\partialpage\leftfalse +- \else\ifdim\ht\partialpage<\pageht \lefttrue\else\leftfalse\fi\fi\NNN} ++ \else\ifdim\ht\partialpage<\pageheight \lefttrue\else\leftfalse\fi\fi\NNN} + \outer\def\NNN#1#2#3.{% beginning of starred section + \gdepth=#1\gtitle={#3}\def\secno{#2} + \ifleft \flushout + \gdef\rlhead{\let\i=I\uppercase{\ignorespaces#3}} % running left headline + \global\let\rrhead=\rlhead % running right headline + \else\global\setbox\partialpage=\vbox{ +- \vbox to\pageht{\unvbox\partialpage\vfill}\break} ++ \vbox to\pageheight{\unvbox\partialpage\vfill}\break} + \gdef\rrhead{\let\i=I\uppercase{\ignorespaces#3}} + \fi + \message{*\secno} % progress report +@@ -315,12 +315,12 @@ + % \count and \toks registers 200--219 are also used to keep track of refs + \catcode`\@=11 + \newcount\@n \newcount\@m \newcount\@p +-\newdimen\pageht \pageht=19cm +-\newdimen\pagewd \pagewd=13cm +-\newdimen\colwd \colwd=\pagewd ++\newdimen\pageheight \pageheight=19cm ++\newdimen\pagewidth \pagewidth=13cm ++\newdimen\colwd \colwd=\pagewidth + \advance\colwd by -2pc \divide\colwd by 3 % for three columns +-\newdimen\fullpageht \fullpageht=\pageht \advance\fullpageht by 4pc +-\newdimen\pagethresh \pagethresh=2\pageht ++\newdimen\fullpageheight \fullpageheight=\pageheight \advance\fullpageheight by 4pc ++\newdimen\pagethresh \pagethresh=2\pageheight + \newdimen\nsize \newdimen\msize + \newskip\intersecskip \intersecskip=8pt plus 2pt minus 3pt + \newbox\partialpage +@@ -331,7 +331,7 @@ + \newif\iftitle \newif\ifleft + + \def\flushout{\ifvoid\partialpage\else +- \setbox0=\vsplit\partialpage to \pageht ++ \setbox0=\vsplit\partialpage to \pageheight + \shipout\vbox{ + \vbox to 3pc{\leftheadline\vfill} + \nointerlineskip\box0} +@@ -345,7 +345,7 @@ + \hyphenpenalty 10000 \exhyphenpenalty 10000 + \noindent\vbox to1pt{}\par % 1pt = \topskip - \ninept + \readin} +- \shipout\vbox to\fullpageht{ ++ \shipout\vbox to\fullpageheight{ + \vbox to 3pc{\rightheadline\vfill} + \unvbox\partialpage + \vfill +@@ -364,10 +364,10 @@ + \@n=199 \loop \ifnum\@n<222 \toks\@n={} \count\@n=0 \advance\@n 1 \repeat + \nrefs=0 + \baseno=\secno}} +-\def\leftheadline{\hbox to\pagewd{\vbox to10pt{}% ++\def\leftheadline{\hbox to\pagewidth{\vbox to10pt{}% + \iftitle\global\titlefalse\else\ninerm\title:\enspace \eightsl\rlhead\fi + \hfil\eightrm\folio}} +-\def\rightheadline{\hbox to\pagewd{\vbox to10pt{}% ++\def\rightheadline{\hbox to\pagewidth{\vbox to10pt{}% + \eightrm\folio\hfil\ninerm\title:\enspace \eightsl\rrhead\/}} + + \def\mini{\begingroup \obeylines \globaldefs=1 \newrefs=\bgroup} +@@ -448,7 +448,7 @@ + \def\donewithpage#1 {\let\readin=\relax} + \catcode`\@=12 + +-\hsize=\pagewd \vsize=\maxdimen \output={\twillout} ++\hsize=\pagewidth \vsize=\maxdimen \output={\twillout} + + \def\inx{\flushout\end} + \def\fin{\parfillskip 0pt plus 1fil +-- +2.47.1 + diff --git a/README.md b/README.md index a5f3d5f..0f64673 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [cweb system](http://www-cs-faculty.stanford.edu/~uno/cweb.html) and donald e. knuth's [ctwill program](http://ftp.cs.stanford.edu/pub/ctwill). it requires the contents of [the original *cweb* source -drop](https://github.com/ascherer/cweb/releases/download/cweb-4.12/cweb-4.12.tar.gz) +drop](https://github.com/ascherer/cweb/releases/download/cweb-4.12.1/cweb-4.12.1.tar.gz) and [the secondary *ctwill* source drop](http://ftp.cs.stanford.edu/pub/ctwill/ctwill.tar.gz), to which it applies a set of change files to introduce advanced features. see the extensive @@ -23,11 +23,11 @@ a set of change files to introduce advanced features. see the extensive ## manual compilation -extract `ctwill.tar.gz` and add the contents of `cweb-4.12.tar.gz` (overwriting +extract `ctwill.tar.gz` and add the contents of `cweb-4.12.1.tar.gz` (overwriting outdated source files `Makefile`, `common.h`, `common.w`, and `prod.w`) and -`cwebbin-2024.tar.gz` for the full set of source files. +`cwebbin-2025.tar.gz` for the full set of source files. replace `@@VERSION@@` in line 129 of the `Makefile.unix` with something like -`Version 4.12 [CWEBbin 2024]`. +`Version 4.12.1 [CWEBbin 2025]`. `touch *.cxx`. unix/linux users should work with [`make -f Makefile.unix`](Makefile.unix) exclusively (targets `boot`, `cautiously`, and `all`). @@ -47,8 +47,8 @@ clone [cweb](https://github.com/ascherer/cweb) and [cwebbin](https://github.com/ascherer/cwebbin), create the source drops with ``` -git archive -o cweb-4.12.tar.gz cweb-4.12 -git archive -o cwebbin-2024.tar.gz cwebbin-2024 +git archive -o cweb-4.12.1.tar.gz cweb-4.12.1 +git archive -o cwebbin-2025.tar.gz cwebbin-2025 ``` respectively, put these two tarballs and the original `ctwill.tar.gz` in the *SOURCES* directory, add the patch files @@ -96,5 +96,5 @@ macros, and cweb include files. updated versions of **cweb** are added to the texlive source tree with ``` cd /path/to/texlive-source/texk/web2c/cwebdir -pax -rzf /path/to/cweb-4.12.tar.gz +pax -rzf /path/to/cweb-4.12.1.tar.gz ``` diff --git a/README.txt b/README.txt index d797422..85ea770 100644 --- a/README.txt +++ b/README.txt @@ -1,12 +1,12 @@ -*-Text-*- %%% LEGALESE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% This file is part of CWEBbin (Version 4.12 [2024]). +% This file is part of CWEBbin (Version 4.12.1 [2025]). % (Set TAB to 8 spaces to get the spacing right.) % The CWEB programs by Silvio Levy are based on programs by D. E. Knuth. % They are distributed WITHOUT ANY WARRANTY, express or implied. -% This README file was last updated August 12, 2024 by Andreas Scherer. +% This README file was last updated January 1, 2025 by Andreas Scherer. % The following copyright notices extend to the respective parts of the % changed or added source code introduced in this patch only, not to the @@ -16,7 +16,7 @@ % Copyright (C) 1991-1993 Hans-Hermann Bode % Copyright (C) 1992 Klaus Guntermann % Copyright (C) 1991,1993 Carsten Steger -% Copyright (C) 1993-2000,2005,2011,2018–2024 Andreas Scherer +% Copyright (C) 1993-2000,2005,2011,2018–2025 Andreas Scherer % Permission is granted to make and distribute verbatim copies of this % document provided that the copyright notice and this permission notice diff --git a/comm-mini.ch b/comm-mini.ch index adf9fc0..e9ffe8f 100644 --- a/comm-mini.ch +++ b/comm-mini.ch @@ -1,9 +1,9 @@ Limbo. @x -\def\title{Common code for CTANGLE and CWEAVE (4.12 [\TeX~Live])} +\def\title{Common code for CTANGLE and CWEAVE (4.12.1 [\TeX~Live])} @y -\def\title{COMMON (4.12 [\TeX~Live])} +\def\title{COMMON (4.12.1 [\TeX~Live])} \def\contentspagenumber{0} @z diff --git a/comm-patch.ch b/comm-patch.ch index f8cb017..b1cb09c 100644 --- a/comm-patch.ch +++ b/comm-patch.ch @@ -1,6 +1,6 @@ -*-Web-*- This file, COMM-FOO.CH, is part of CWEBBIN (@VERSION@). -It is a changefile for COMMON.W, Version 4.12. +It is a changefile for COMMON.W, Version 4.12.1. Technically, COMM-FOO.CH is constructed from a multitude of separate change files by applying Klaus Guntermann's TIE processor. Any comments (like this @@ -34,7 +34,7 @@ This program is distributed WITHOUT ANY WARRANTY, express or implied. The following copyright notice extends to this changefile only, not to the masterfile COMMON.W. -Copyright (C) 1993-1995,1998,2000,2005,2018-2024 Andreas Scherer +Copyright (C) 1993-1995,1998,2000,2005,2018-2025 Andreas Scherer Copyright (C) 1991,1993 Carsten Steger Copyright (C) 1991-1993 Hans-Hermann Bode @@ -188,17 +188,18 @@ p21 29 October 2005 AS ANSI C++ patches to patch level [p21]. 02 December 2023 AS Tuneup for CWEB 4.11 [2023]. 2024 12 August 2024 AS Tuneup for CWEB 4.12 [2024]. +2025 01 January 2025 AS Tuneup for CWEB 4.12.1 [2025]. ------------------------------------------------------------------------------ Material in limbo. @x l.25 -\def\title{Common code for CTANGLE and CWEAVE (Version 4.12)} +\def\title{Common code for CTANGLE and CWEAVE (Version 4.12.1)} @y \def\title{Common code for CTANGLE and CWEAVE (@VERSION@)} @z @x l.30 - \centerline{(Version 4.12)} + \centerline{(Version 4.12.1)} @y \centerline{(@VERSION@)} @z diff --git a/comm-texlive.ch b/comm-texlive.ch index e2fb46b..b940b00 100644 --- a/comm-texlive.ch +++ b/comm-texlive.ch @@ -13,13 +13,13 @@ Material in limbo. \def\title{Common code for CTANGLE and CWEAVE (@VERSION@)} @y \def\Kpathsea/{{\mc KPATHSEA\spacefactor1000}} \ifacro\sanitizecommand\Kpathsea{KPATHSEA}\fi -\def\title{Common code for CTANGLE and CWEAVE (4.12 [\TeX~Live])} +\def\title{Common code for CTANGLE and CWEAVE (4.12.1 [\TeX~Live])} @z @x l.30 and l.199 of COMM-PATCH.CH \centerline{(@VERSION@)} @y - \centerline{(Version 4.12 [\TeX~Live])} + \centerline{(Version 4.12.1 [\TeX~Live])} @z @x l.32 diff --git a/ctang-patch.ch b/ctang-patch.ch index 365242b..5fe83fc 100644 --- a/ctang-patch.ch +++ b/ctang-patch.ch @@ -172,17 +172,18 @@ p21 29 October 2005 AS ANSI C++ patches for patch level [p21]. 02 December 2023 AS tuneup for CWEB 4.11 [2023]. 2024 12 August 2024 AS tuneup for CWEB 4.12 [2024]. +2025 01 January 2025 AS tuneup for CWEB 4.12.1 [2025]. ------------------------------------------------------------------------------ Material in limbo. @x l.30 -\def\title{CTANGLE (Version 4.12)} +\def\title{CTANGLE (Version 4.12.1)} @y \def\title{CTANGLE (@VERSION@)} @z @x l.34 - \centerline{(Version 4.12)} + \centerline{(Version 4.12.1)} @y \centerline{(@VERSION@)} @z @@ -198,7 +199,7 @@ z Section 1. @x l.64 -@d banner "This is CTANGLE (Version 4.12)" +@d banner "This is CTANGLE (Version 4.12.1)" @y @d banner "This is CTANGLE (@VERSION@)" @z diff --git a/ctang-texlive.ch b/ctang-texlive.ch index 08dd6a3..4e7dee7 100644 --- a/ctang-texlive.ch +++ b/ctang-texlive.ch @@ -12,13 +12,13 @@ Material in limbo. @x l.30 and CTANG-PATCH.CH \def\title{CTANGLE (@VERSION@)} @y -\def\title{CTANGLE (Version 4.12 [\TeX~Live])} +\def\title{CTANGLE (Version 4.12.1 [\TeX~Live])} @z @x l.34 and CTANG-PATCH.CH \centerline{(@VERSION@)} @y - \centerline{(Version 4.12 [\TeX~Live])} + \centerline{(Version 4.12.1 [\TeX~Live])} @z @x l.36 @@ -38,7 +38,7 @@ Section 1. @x l.64 and CTANG-PATCH.CH and CTANG-I18N.CH @d banner _("This is CTANGLE (@VERSION@)") @y -@d banner "This is CTANGLE, Version 4.12" +@d banner "This is CTANGLE, Version 4.12.1" /* will be extended by the \TeX~Live |versionstring| */ @z diff --git a/ctangle.cxx b/ctangle.cxx index a41213e..adbfe64 100644 --- a/ctangle.cxx +++ b/ctangle.cxx @@ -28,7 +28,7 @@ /*:5*/ #line 67 "ctangle.w" -#define banner _("This is CTANGLE (Version 4.12 [CWEBbin 2024])") \ +#define banner _("This is CTANGLE (Version 4.12.1 [CWEBbin 2025])") \ #define _(s) gettext(s) \ diff --git a/ctwill-mini.ch b/ctwill-mini.ch index c5f7a3d..0222450 100644 --- a/ctwill-mini.ch +++ b/ctwill-mini.ch @@ -21,8 +21,8 @@ Section 1. @y \ifx\undefined\pdfpagewidth \else - \pdfpagewidth=\pagewd \advance\pdfpagewidth by 2cm - \pdfpageheight=\pageht \advance\pdfpageheight by 5cm + \pdfpagewidth=\pagewidth \advance\pdfpagewidth by 2cm + \pdfpageheight=\pageheight \advance\pdfpageheight by 5cm \ifpdflua \pdfhorigin=1cm \pdfvorigin=1cm \else \global\hoffset=-1.54cm \global\voffset=-1.54cm \fi \fi @@ -37,6 +37,7 @@ additional material specific to \.{CTWILL}. % FIXME Until then, \.{CWEAVE}'s sequence of sections will be preserved. The ``banner line'' defined here should be changed whenever \.{CTWILL} is +modified. The version number parallels the corresponding version of \.{CWEAVE}. @y A kind of ``user manual'' for \.{CTWILL} can be found in section~% \X287:Mogrify {\tentex CWEAVE} into {\tentex CTWILL}\X~and beyond, @@ -58,6 +59,7 @@ faithful overall rendering of {\itt CTWILL}'s code, though. \hfill ---Enjoy!\par} \bigskip The ``banner line'' defined here should be changed whenever \.{CTWILL} is +modified. The version number parallels the corresponding version of \.{CWEAVE}. @-banner@> @$banner {CTWILL}1 =\.{"This\ is\ CTWILL"}@> @@ -1589,9 +1591,9 @@ Section 212--213. Section 215. @x -@={@+ int count=-1; /* characters remaining before string break */ +@={@+ int count=-1; /* characters remaining before string break */ @y -@={int count=-1; /* characters remaining before string break */ +@={@+ int count=-1; /* characters remaining before string break */ @z Section 220. @@ -1815,16 +1817,24 @@ Section 245. @-phase_two@> @z -Section 247. +Section 246. @x -@ @d usage_sentinel (struct perm_meaning *)1 -@= { +@d save_position() save_line=out_line; save_place=out_ptr @y -@ @d usage_sentinel (struct perm_meaning *)1 +@d usage_sentinel (struct perm_meaning *)1 @-usage_sentinel@> @$usage_sentinel {CTWILL}247 =(\&{struct} \&{perm\_meaning} ${}{*}{}$) \T{1}@> -@=@+ { +@d save_position() save_line=out_line; save_place=out_ptr +@z + +Section 247. + +@x +@ @d usage_sentinel (struct perm_meaning *)1 +@= { +@y +@ @= @+ { @z Section 251. @@ -1851,9 +1861,9 @@ Section 252. Section 254. @x -@ @= { +@ @= { @y -@r @ @= { +@r @ @= { @z Section 255. diff --git a/ctwill-texlive.ch b/ctwill-texlive.ch index 5cbb145..f5c7076 100644 --- a/ctwill-texlive.ch +++ b/ctwill-texlive.ch @@ -13,7 +13,7 @@ Material in limbo. \def\title{CTWILL (@VERSION@)} @y \def\Kpathsea/{{\mc KPATHSEA\spacefactor1000}} \ifacro\sanitizecommand\Kpathsea{KPATHSEA}\fi -\def\title{CTWILL (Version 4.12 [\TeX~Live])} +\def\title{CTWILL (Version 4.12.1 [\TeX~Live])} @z Section 1. @@ -21,7 +21,7 @@ Section 1. @x l.69 of CWEAV-TWILL.CH @d banner _("This is CTWILL (@VERSION@)") @y -@d banner "This is CTWILL, Version 4.12" +@d banner "This is CTWILL, Version 4.12.1" /* will be extended by the \TeX~Live |versionstring| */ @z diff --git a/ctwill.md b/ctwill.md index a566066..30d1b3c 100644 --- a/ctwill.md +++ b/ctwill.md @@ -1,6 +1,6 @@ % CTWILL(1) Web2c @VERSION@ | General Commands Manual % -% August 12, 2024 +% January 1, 2025. # NAME @@ -99,7 +99,7 @@ The present incarnation of **ctwill** and its utilities tries hard to be a drop-in replacement for the original package. There are, however, a few differences worth noting: -* This version is based on the most recent version of CWEB (4.12). +* This version is based on the most recent version of CWEB (4.12.1). * In TeX\ Live the utility programs are prefixed with **ctwill-** and the macro files with **ct** for technical reasons. * Options **\-\-help**, **\-\-quiet**, **\-\-verbose**, **\-\-version**, and diff --git a/cweav-extensions.ch b/cweav-extensions.ch index 6fe1715..803a8e2 100644 --- a/cweav-extensions.ch +++ b/cweav-extensions.ch @@ -14,7 +14,7 @@ beginning of phase two. We initialize the output variables in a slightly tricky way so that the first line of the output file will be `\.{\\input cwebmac}'. -@= +@= out_ptr=out_buf+1; out_line=1; active_file=tex_file; tex_printf("\\input cwebma"); *out_ptr='c'; @y @@ -29,7 +29,7 @@ prepended to `\.{cwebmac.tex}', e.g., if you call \.{CWEAVE} with Without this option the first line of the output file will be `\.{\\input cwebmac}'. -@= +@= out_ptr=out_buf+1; out_line=1; active_file=tex_file; tex_puts("\\input "); tex_printf(use_language); diff --git a/cweav-patch.ch b/cweav-patch.ch index 91fb980..2aa6c89 100644 --- a/cweav-patch.ch +++ b/cweav-patch.ch @@ -1,6 +1,6 @@ -*-Web-*- This file, CWEAV-FOO.CH, is part of CWEBBIN (@VERSION@). -It is a changefile for CWEAVE.W, Version 4.12. +It is a changefile for CWEAVE.W, Version 4.12.1. Technically, CWEAV-FOO.CH is constructed from a multitude of separate change files by applying Klaus Guntermann's TIE processor. Any comments @@ -36,7 +36,7 @@ This program is distributed WITHOUT ANY WARRANTY, express or implied. The following copyright notice extends to this changefile only, not to the masterfile CWEAVE.W. -Copyright (C) 1993-1995,2000,2005,2021-2024 Andreas Scherer +Copyright (C) 1993-1995,2000,2005,2021-2025 Andreas Scherer Copyright (C) 1991,1993 Carsten Steger Copyright (C) 1991-1993 Hans-Hermann Bode @@ -187,17 +187,18 @@ p21 29 October 2005 AS ANSI C++ patches for patch level [p21]. 02 December 2023 AS tuneup for CWEB 4.11 [2023]. 2024 12 August 2024 AS tuneup for CWEB 4.12 [2024]. +2025 01 January 2025 AS tuneup for CWEB 4.12.1 [2025]. ------------------------------------------------------------------------------ Material in limbo. @x l.35 -\def\title{CWEAVE (Version 4.12)} +\def\title{CWEAVE (Version 4.12.1)} @y \def\title{CWEAVE (@VERSION@)} @z @x l.39 - \centerline{(Version 4.12)} + \centerline{(Version 4.12.1)} @y \centerline{(@VERSION@)} @z @@ -213,7 +214,7 @@ z Section 1. @x l.70 -@d banner "This is CWEAVE (Version 4.12)" +@d banner "This is CWEAVE (Version 4.12.1)" @y @d banner "This is CWEAVE (@VERSION@)" @z diff --git a/cweav-texlive.ch b/cweav-texlive.ch index 49bd94b..b444b9d 100644 --- a/cweav-texlive.ch +++ b/cweav-texlive.ch @@ -12,7 +12,7 @@ Material in limbo. @x l.35 and CWEAV-PATCH.CH \def\title{CWEAVE (@VERSION@)} @y -\def\title{CWEAVE (Version 4.12 [\TeX~Live])} +\def\title{CWEAVE (Version 4.12.1 [\TeX~Live])} @z @x l.54 and CWTW-TEXLIVE.ch. @@ -26,6 +26,6 @@ Section 1. @x l.70 and CWEAV-PATCH.CH and CWEAV-I18N.CH @d banner _("This is CWEAVE (@VERSION@)") @y -@d banner "This is CWEAVE, Version 4.12" +@d banner "This is CWEAVE, Version 4.12.1" /* will be extended by the \TeX~Live |versionstring| */ @z diff --git a/cweav-twill.ch b/cweav-twill.ch index 11a4393..5c5378d 100644 --- a/cweav-twill.ch +++ b/cweav-twill.ch @@ -563,7 +563,7 @@ section_count=0; format_visible=true; right_start_switch=false; copy_limbo(); @x l.4214 static boolean group_found=false; /* has a starred section occurred? */ -@ @= { +@ @= { section_count++; @y static boolean group_found=false; /* has a starred section occurred? */ @@ -571,7 +571,7 @@ static boolean right_start_switch; /* has `\.{@@r}' occurred recently? */ static boolean temp_switch; /* has `\.{@@\%}' occurred recently? */ @ @d usage_sentinel (struct perm_meaning *)1 -@= { +@= { section_count++; temp_switch=false; temp_meaning_ptr=temp_meaning_stack; top_usage=usage_sentinel; @@ -639,9 +639,9 @@ flush_buffer(out_ptr,false,false); @z @x l.4340 -@= { +@= { @y -@= { +@= { is_macro=true; @z @@ -658,10 +658,10 @@ flush_buffer(out_ptr,false,false); @z @x l.4369 -@ @= { +@ @= { doing_format=true; @y -@ @= { +@ @= { doing_format=true; is_macro=false; @z diff --git a/cwebbin.spec b/cwebbin.spec index 8b0e787..49989ec 100644 --- a/cwebbin.spec +++ b/cwebbin.spec @@ -35,8 +35,8 @@ Distribution: openSUSE 42 (x86_64) %endif BuildRoot: %{_tmppath}/%{name}-%{version}-root -Version: 4.12 -Release: 2024 +Version: 4.12.1 +Release: 2025 # Start with CTWILL; only very few things are actually used Source0: ftp://ftp.cs.stanford.edu/pub/ctwill/ctwill.tar.gz @@ -51,6 +51,7 @@ Patch2: 0002-Purge-redundant-TeX-macro.patch Patch3: 0003-Adapt-to-CWEB-4.5.patch Patch4: 0004-Add-silent-datecontentspage-macro.patch Patch5: 0005-Update-CTWILL-macros-for-CWEB-4.9.patch +Patch6: 0006-Rename-page-dimensions-to-match-cwebmac.patch %global __sed_i %{__sed} -i @@ -221,6 +222,9 @@ do %{__sed_i} -e "s/Web2c .*\[at\]/CWEBbin %{version}/" $m.1; done %{__texhash} %changelog +* Wed Jan 01 2025 Andreas Scherer +- Tuneup for CWEB 4.12.1 + * Mon Aug 12 2024 Andreas Scherer - Tuneup for CWEB 4.12 diff --git a/cwebman-patch.ch b/cwebman-patch.ch index 3be097a..71df869 100644 --- a/cwebman-patch.ch +++ b/cwebman-patch.ch @@ -1,6 +1,6 @@ -*-Web-*- This file, CWEBMAN-FOO.CH, is part of CWEBBIN (@VERSION@). It is a -changefile written by Andreas Scherer for CWEBMAN.TEX, Version 4.12, that +changefile written by Andreas Scherer for CWEBMAN.TEX, Version 4.12.1, that provides changes appropriate for extensions by Carsten Steger, Andreas Scherer (deutsch), Giuseppe Ghibò (italiano), and Denis Roegel (français). @@ -14,7 +14,7 @@ This program is distributed WITHOUT ANY WARRANTY, express or implied. The following copyright notice extends to this changefile only, not to the masterfile CWEBMAN.TEX. -Copyright (C) 1993-1995,1998-2000,2005,2011,2018-2024 Andreas Scherer +Copyright (C) 1993-1995,1998-2000,2005,2011,2018-2025 Andreas Scherer Permission is granted to make and distribute verbatim copies of this document provided that the copyright notice and this permission notice @@ -68,20 +68,20 @@ a22 18 Aug 2011 AS Updated for CWEB 3.64ad. @z ------------------------------------------------------------------------------ @x l.34 -\def\runninghead{{\ninett CWEB} USER MANUAL (VERSION 4.12)} +\def\runninghead{{\ninett CWEB} USER MANUAL (VERSION 4.12.1)} @y \def\runninghead{{\ninett CWEB} USER MANUAL (@VERSION@)} @z ------------------------------------------------------------------------------ @x l.48 -\vskip 18pt\centerline{(Version 4.12 --- August 2024)} +\vskip 18pt\centerline{(Version 4.12.1 --- January 2025)} @y -\vskip 18pt\centerline{(Version 4.12 --- August 2024)% +\vskip 18pt\centerline{(Version 4.12.1 --- January 2025)% \footnote*{This document describes the extended \.{CWEB} (@VERSION@).}} @z ------------------------------------------------------------------------------ @x l.1613 - \.{ { }\\vskip 15pt \\centerline\{(Version 4.12)\}{ }\\vfill\}}\cr}$$ + \.{ { }\\vskip 15pt \\centerline\{(Version 4.12.1)\}{ }\\vfill\}}\cr}$$ @y \.{ { }\\vskip 15pt \\centerline\{(@VERSION@)\}{ }\\vfill\}}\cr}$$ @z diff --git a/cwebman-texlive.ch b/cwebman-texlive.ch index eea5263..cea1b92 100644 --- a/cwebman-texlive.ch +++ b/cwebman-texlive.ch @@ -77,13 +77,13 @@ For a complete history of the changes made to CWEBMAN.TEX see CWEBMAN-PATCH.CH. \def\runninghead{{\ninett CWEB} USER MANUAL (@VERSION@)} @y \def\Kpathsea/{{\mc KPATHSEA\spacefactor1000}} -\def\runninghead{{\ninett CWEB} USER MANUAL (Version 4.12 [\TeX~Live])} +\def\runninghead{{\ninett CWEB} USER MANUAL (Version 4.12.1 [\TeX~Live])} @z ------------------------------------------------------------------------------ @x l.80 of CWEBMAN-PATCH.CH \footnote*{This document describes the extended \.{CWEB} (@VERSION@).}} @y -\footnote*{This document describes the extended \.{CWEB} (Version 4.12 [\TeX~Live]).}} +\footnote*{This document describes the extended \.{CWEB} (Version 4.12.1 [\TeX~Live]).}} @z ------------------------------------------------------------------------------ @x l.79 @@ -115,7 +115,7 @@ Readers who are familiar with Knuth's memo ``The \.{WEB} System of Structured Documentation'' will be able @y Readers who are familiar with Knuth's memo ``\pdfURL{The \.{WEB} System of -Structured Documentation}{../web/webman.pdf}'' will be able +Structured Documentation}{../web/webman-changes.pdf}'' will be able @z ------------------------------------------------------------------------------ @x l.523 @@ -265,6 +265,6 @@ And here's what the same excerpt looks like when typeset. @x l.1613 and l.86 of CWEBMAN-PATCH.CH \.{ { }\\vskip 15pt \\centerline\{(@VERSION@)\}{ }\\vfill\}}\cr}$$ @y - \.{ { }\\vskip 15pt \\centerline\{(Version 4.12)\}{ }\\vfill\}}\cr}$$ + \.{ { }\\vskip 15pt \\centerline\{(Version 4.12.1)\}{ }\\vfill\}}\cr}$$ @z ------------------------------------------------------------------------------ diff --git a/cwtw-texlive.ch b/cwtw-texlive.ch index 93fde32..e7097fc 100644 --- a/cwtw-texlive.ch +++ b/cwtw-texlive.ch @@ -10,7 +10,7 @@ Material in limbo. @x l.39 and CWEAV-PATCH.CH \centerline{(@VERSION@)} @y - \centerline{(Version 4.12 [\TeX~Live])} + \centerline{(Version 4.12.1 [\TeX~Live])} @z @x l.41 diff --git a/po/cweb-tl.pot b/po/cweb-tl.pot index 9ba8011..f86c232 100644 --- a/po/cweb-tl.pot +++ b/po/cweb-tl.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: CWEBbin 2024\n" +"Project-Id-Version: CWEBbin 2025\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-12 13:10+0200\n" +"POT-Creation-Date: 2025-01-01 15:08+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -30,15 +30,15 @@ msgid "%s: Need one to three file arguments.\n" msgstr "" #: ctang-texlive.ch:39 -msgid "This is CTANGLE, Version 4.12" +msgid "This is CTANGLE, Version 4.12.1" msgstr "" #: ctwill-texlive.ch:39 -msgid "This is CTWILL, Version 4.12" +msgid "This is CTWILL, Version 4.12.1" msgstr "" #: cweav-texlive.ch:39 -msgid "This is CWEAVE, Version 4.12" +msgid "This is CWEAVE, Version 4.12.1" msgstr "" #: comm-texlive.ch:512 diff --git a/po/de/cweb-tl.po b/po/de/cweb-tl.po index b141274..1f39e18 100644 --- a/po/de/cweb-tl.po +++ b/po/de/cweb-tl.po @@ -1,14 +1,14 @@ # International version of CWEB (CWEBbin, TeXLive). -# Copyright (C) 2024 Andreas Scherer et al. +# Copyright (C) 2025 Andreas Scherer et al. # This file is distributed under the same license as the CWEB package. # Andreas Scherer . # msgid "" msgstr "" -"Project-Id-Version: CWEBbin 2024\n" +"Project-Id-Version: CWEBbin 2025\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-12 13:10+0200\n" -"PO-Revision-Date: 2024-08-12 13:10+0200\n" +"POT-Creation-Date: 2025-01-01 15:08+0100\n" +"PO-Revision-Date: 2025-01-01 15:08+0100\n" "Last-Translator: Andreas Scherer \n" "Language-Team: German\n" "Language: de\n" diff --git a/po/de/cweb.po b/po/de/cweb.po index 9b0a139..6beda4f 100644 --- a/po/de/cweb.po +++ b/po/de/cweb.po @@ -1,14 +1,14 @@ # International version of CWEB (CWEBbin, TeXLive). -# Copyright (C) 2021 Andreas Scherer et al. +# Copyright (C) 2025 Andreas Scherer et al. # This file is distributed under the same license as the CWEB package. # Andreas Scherer , 2021. # msgid "" msgstr "" -"Project-Id-Version: CWEBbin 2021\n" +"Project-Id-Version: CWEBbin 2025\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-06 15:25+0100\n" -"PO-Revision-Date: 2021-02-06 15:57+0100\n" +"POT-Creation-Date: 2025-01-01 15:08+0100\n" +"PO-Revision-Date: 2025-01-01 15:08+0100\n" "Last-Translator: Andreas Scherer \n" "Language-Team: German\n" "Language: de\n" diff --git a/po/de/web2c-help.po b/po/de/web2c-help.po index 139d336..d38dd46 100644 --- a/po/de/web2c-help.po +++ b/po/de/web2c-help.po @@ -1,14 +1,14 @@ # International version of CWEB (CWEBbin, TeXLive). -# Copyright (C) 2021 Andreas Scherer et al. +# Copyright (C) 2025 Andreas Scherer et al. # This file is distributed under the same license as the CWEB package. # Andreas Scherer , 2021. # msgid "" msgstr "" -"Project-Id-Version: CWEBbin 2024\n" +"Project-Id-Version: CWEBbin 2025\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-10 16:35+0100\n" -"PO-Revision-Date: 2024-03-10 16:35+0100\n" +"POT-Creation-Date: 2025-01-01 15:08+0100\n" +"PO-Revision-Date: 2025-01-01 15:08+0100\n" "Last-Translator: Andreas Scherer \n" "Language-Team: German\n" "Language: de\n" diff --git a/po/it/cweb.po b/po/it/cweb.po index 874dd72..597d1aa 100644 --- a/po/it/cweb.po +++ b/po/it/cweb.po @@ -1,14 +1,14 @@ # International version of CWEB (CWEBbin, TeXLive). -# Copyright (C) 2024 Andreas Scherer et al. +# Copyright (C) 2025 Andreas Scherer et al. # This file is distributed under the same license as the CWEB package. # Andreas Scherer . # msgid "" msgstr "" -"Project-Id-Version: CWEBbin 2024\n" +"Project-Id-Version: CWEBbin 2025\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-12 13:10+0200\n" -"PO-Revision-Date: 2024-08-12 13:10+0200\n" +"POT-Creation-Date: 2025-01-01 15:08+0100\n" +"PO-Revision-Date: 2025-01-01 15:08+0100\n" "Last-Translator: Andreas Scherer \n" "Language-Team: Italian\n" "Language: it\n" @@ -599,15 +599,15 @@ msgstr "Ordinamento:" #: ctang-i18n.ch:17 msgid "This is CTANGLE (@@VERSION@@)" -msgstr "Questo è CTANGLE (Versione 4.12 [CWEBbin 2024])" +msgstr "Questo è CTANGLE (Versione 4.12.1 [CWEBbin 2025])" #: cweav-i18n.ch:17 msgid "This is CWEAVE (@@VERSION@@)" -msgstr "Questo è CWEAVE (Versione 4.12 [CWEBbin 2024])" +msgstr "Questo è CWEAVE (Versione 4.12.1 [CWEBbin 2025])" #: cweav-twill.ch:68 msgid "This is CTWILL (@@VERSION@@)" -msgstr "Questo è CTWILL (Versione 4.12 [CWEBbin 2024])" +msgstr "Questo è CTWILL (Versione 4.12.1 [CWEBbin 2025])" #: cweav-i18n.ch:301 cweav-i18n.ch:309 msgid "buffer" diff --git a/po/web2c-help.pot b/po/web2c-help.pot index ba49350..0810453 100644 --- a/po/web2c-help.pot +++ b/po/web2c-help.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: CWEBbin 2024\n" +"Project-Id-Version: CWEBbin 2025\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-10 16:35+0100\n" +"POT-Creation-Date: 2025-01-01 15:08+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/refsort.ch b/refsort.ch index 67175b0..2ebedfc 100644 --- a/refsort.ch +++ b/refsort.ch @@ -45,12 +45,24 @@ int main() item *x, **y; @z +@x [4] l.83 + @; +@y + @; +@z + @x [5] l.89 variable not used { register int k; @y { @z +@x [6] l.99 +@= +@y +@= +@z + @x [9] l.149 'register' removed in C++17 { register int toggle=0; @y diff --git a/texinputs/pdfctwimac.tex b/texinputs/pdfctwimac.tex index d1278ca..b8beba7 100644 --- a/texinputs/pdfctwimac.tex +++ b/texinputs/pdfctwimac.tex @@ -296,9 +296,9 @@ {\xdef\secstar{#1}\let\*=\empty\xdef\secno{#1}}% remove \* from section name \vskip\intersecskip\startsection\ignorespaces} \outer\def\N{\ifvoid\partialpage\lefttrue - \else\ifdim\ht\partialpage<\pageht \leftfalse\else\lefttrue\fi\fi\NNN} + \else\ifdim\ht\partialpage<\pageheight \leftfalse\else\lefttrue\fi\fi\NNN} \outer\def\NN{\ifvoid\partialpage\leftfalse - \else\ifdim\ht\partialpage<\pageht \lefttrue\else\leftfalse\fi\fi\NNN} + \else\ifdim\ht\partialpage<\pageheight \lefttrue\else\leftfalse\fi\fi\NNN} \outer\def\NNN#1#2#3.{% beginning of starred section \ifacro{\makeoutlinetoks#3\outlinedone}\fi \gdepth=#1\gtitle={#3}\def\secno{#2}\xdef\secstar{#2} @@ -306,7 +306,7 @@ \gdef\rlhead{\let\i=I\uppercase{\ignorespaces#3}} % running left headline \global\let\rrhead=\rlhead % running right headline \else\global\setbox\partialpage=\vbox{ - \vbox to\pageht{\unvbox\partialpage\vfill}\break} + \vbox to\pageheight{\unvbox\partialpage\vfill}\break} \gdef\rrhead{\let\i=I\uppercase{\ignorespaces#3}} \fi \message{*\secno} % progress report @@ -367,12 +367,12 @@ % \count and \toks registers 200--219 are also used to keep track of refs \catcode`\@=11 \newcount\@n \newcount\@m \newcount\@p -\newdimen\pageht \pageht=19cm -\newdimen\pagewd \pagewd=13cm -\newdimen\colwd \colwd=\pagewd +\newdimen\pageheight \pageheight=19cm +\newdimen\pagewidth \pagewidth=13cm +\newdimen\colwd \colwd=\pagewidth \advance\colwd by -2pc \divide\colwd by 3 % for three columns -\newdimen\fullpageht \fullpageht=\pageht \advance\fullpageht by 4pc -\newdimen\pagethresh \pagethresh=2\pageht +\newdimen\fullpageheight \fullpageheight=\pageheight \advance\fullpageheight by 4pc +\newdimen\pagethresh \pagethresh=2\pageheight \newdimen\nsize \newdimen\msize \newskip\intersecskip \intersecskip=8pt plus 2pt minus 3pt \newbox\partialpage @@ -383,7 +383,7 @@ \newif\iftitle \newif\ifleft \def\flushout{\ifvoid\partialpage\else - \setbox0=\vsplit\partialpage to \pageht + \setbox0=\vsplit\partialpage to \pageheight \shipout\vbox{ \vbox to 3pc{\leftheadline\vfill} \nointerlineskip\box0} @@ -397,7 +397,7 @@ \hyphenpenalty 10000 \exhyphenpenalty 10000 \noindent\vbox to1pt{}\par % 1pt = \topskip - \ninept \readin} - \shipout\vbox to\fullpageht{ + \shipout\vbox to\fullpageheight{ \vbox to 3pc{\rightheadline\vfill} \unvbox\partialpage \vfill @@ -416,10 +416,10 @@ \@n=199 \loop \ifnum\@n<222 \toks\@n={} \count\@n=0 \advance\@n 1 \repeat \nrefs=0 \baseno=\secno}} -\def\leftheadline{\hbox to\pagewd{\vbox to10pt{}% +\def\leftheadline{\hbox to\pagewidth{\vbox to10pt{}% \iftitle\global\titlefalse\else\ninerm\title:\enspace \eightsl\rlhead\fi \hfil\eightrm\folio}} -\def\rightheadline{\hbox to\pagewd{\vbox to10pt{}% +\def\rightheadline{\hbox to\pagewidth{\vbox to10pt{}% \eightrm\folio\hfil\ninerm\title:\enspace \eightsl\rrhead\/}} \def\mini{\begingroup \obeylines \globaldefs=1 \newrefs=\bgroup} @@ -501,17 +501,16 @@ \def\donewithpage#1 {\let\readin=\relax} \catcode`\@=12 -\hsize=\pagewd \vsize=\maxdimen \output={\twillout} +\hsize=\pagewidth \vsize=\maxdimen \output={\twillout} %\let\page=\pagebody \raggedbottom -% \def\page{\box255 }\normalbottom % faster, but loses plain TeX footnotes -%\def\normaloutput#1#2#3{\ifodd\pageno\hoffset=\pageshift\fi - %\shipout\vbox{ - %\vbox to\fullpageht{ - %\iftitle\global\titlefalse - %\else\hbox to\pagewd{\vbox to10pt{}\ifodd\pageno #3\else#2\fi}\fi - %\vfill#1}} % parameter #1 is the page itself - %\global\advance\pageno by1} +\def\page{\box255 }\normalbottom % faster, but loses plain TeX footnotes +\def\normaloutput#1#2#3{\shipout\vbox{\vbox to\fullpageheight{% + \iftitle\global\titlefalse + \else\hbox to\pagewidth{\vbox to10pt{}% + \ifodd\pageno\vbox to3pc{#3\vfill}\else\vbox to3pc{#2\vfill}\fi}\fi + #1\vfill}} % parameter #1 is the page itself + \global\advance\pageno by1} %\def\topofcontents{\centerline{\titlefont\title}\vskip.7in %\vfill} % this material will start the table of contents page %\def\botofcontents{\vfill @@ -520,7 +519,7 @@ \def\contentspagenumber{0} % default page number for table of contents %\newdimen\pageshift \pageshift=\hoffset %% shift righthand pages wrt lefthand ones (changed in version 3.70) -%\def\setpage{\hsize\pagewd\vsize\pageht} % use after changing page size +\def\setpage{\hsize\pagewidth\vsize\pageheight} % use after changing page size \def\contentsfile{\jobname.toc} % file that gets table of contents info \def\readcontents{\input \contentsfile} \def\readsections{\input \jobname.scn} @@ -536,16 +535,24 @@ \immediate\write\cont{\catcode `\noexpand\@=12\relax} % \makeatother \immediate\closeout\cont % the contents information has been fully gathered \fi} -\def\fin{\ifacro \message{Section names:} - \def\U##1.{} \def\Us##1.{} \def\Q##1.{} \def\Qs##1.{} \let\I=\relax \let\*=* - \newrefs={} \output={\shipout\box255} +\def\fin{\ifacro \message{Section names:} \let\Xpdf\X + \def\note##1##2.{\quad{\eightrm##1~{\sevenrm\pdfnote##2.}.}} + \def\Q{\note{Cited in section}} % crossref for mention of a section + \def\Qs{\note{Cited in sections}} % crossref for mentions of a section + \def\U{\note{Used in section}} % crossref for use of a section + \def\Us{\note{Used in sections}} % crossref for uses of a section + \def\I{\par\hangindent 2em\noindent}\let\*=* + \def\rlhead{NAMES OF THE SECTIONS} % running left headline + \let\rrhead=\rlhead % running right headline + \output={\normaloutput\page\rightheadline\leftheadline} + \setpage \def\outsecname{Names of the sections} \ifpdflua \makebookmarks \countsections \pdfdest name {NOS} fith \pdfoutline goto name {NOS} count -\the\countNOS {\outsecname} \else \special{pdf: outline -1 << /Title (\outsecname) /Dest [ @thispage /FitH @ypos ] >>}\fi - \def\X##1:##2\X{\firstsecno##1.% + \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.% {\makeoutlinetoks##2\outlinedone}% \ifpdflua \pdfoutline goto num \the\toksA \expandafter{\the\toksE} \else \special{pdf: outline 0 << /Title (\the\toksE)