From 2ad9ba639ce94830d255f9187358a56a5defab72 Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Tue, 31 Dec 2024 14:49:02 +0000 Subject: [PATCH] [CTWILL] Append 'Names of the sections'. git-svn-id: svn://tug.org/texlive/trunk/Build/source@73243 c570f23f-e606-0410-a88d-b1316a301751 --- texk/web2c/cwebdir/ChangeLog | 4 +++ texk/web2c/cwebdir/texinputs/pdfctwimac.tex | 29 ++++++++++++--------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/texk/web2c/cwebdir/ChangeLog b/texk/web2c/cwebdir/ChangeLog index 358dc98cbc..5970631a4d 100644 --- a/texk/web2c/cwebdir/ChangeLog +++ b/texk/web2c/cwebdir/ChangeLog @@ -1,3 +1,7 @@ +2024-12-31 Andreas Scherer + + * texinputs/pdfctwimac.tex: Append 'Names of the sections'. + 2024-12-27 Andreas Scherer * ctwill-mini.ch, diff --git a/texk/web2c/cwebdir/texinputs/pdfctwimac.tex b/texk/web2c/cwebdir/texinputs/pdfctwimac.tex index 8fafb4649a..28cd276025 100644 --- a/texk/web2c/cwebdir/texinputs/pdfctwimac.tex +++ b/texk/web2c/cwebdir/texinputs/pdfctwimac.tex @@ -504,14 +504,13 @@ \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\fullpageheight{ - %\iftitle\global\titlefalse - %\else\hbox to\pagewidth{\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\pagewidth\vsize\pageheight} % 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,20 @@ \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\U##1.{} \def\Us##1.{} \def\Q##1.{} \def\Qs##1.{} + \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)