diff options
author | Karl Berry <karl@freefriends.org> | 2024-05-24 20:59:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-05-24 20:59:45 +0000 |
commit | afaa34285d21cc717c5224d034160d1c4eba7c62 (patch) | |
tree | 88d32aed143c9a482f7483773989f98168c7953a /Master/texmf-dist/tex/plain/pwebmac | |
parent | 450183b6d5d3a625ca06bebbc2a493ccc079d2d7 (diff) |
pwebmac (23may24)
git-svn-id: svn://tug.org/texlive/trunk@71345 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/plain/pwebmac')
-rw-r--r-- | Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex b/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex index a7bdc717b9e..01bba0e19f3 100644 --- a/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex +++ b/Master/texmf-dist/tex/plain/pwebmac/pwebmac.tex @@ -5,7 +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+PWEBMAC4.11} +\xdef\fmtversion{\fmtversion+PWEBMAC4.12} \parskip 0pt % no stretch between paragraphs \parindent 1em % for paragraphs and for the first line of Pascal text @@ -351,8 +351,16 @@ \def\title{\expandafter\uppercase\expandafter{\jobname}} \def\topofcontents{\centerline{\titlefont\title}\vskip.7in \vfill} % this material will start the table of contents page -\def\startpdf{\ifpdf \ifpdflua\pdfcatalog{/PageMode /UseOutlines} - \else {\special{pdf: docview << /PageMode /UseOutlines >>}}\fi\fi} +\def\startpdf{\ifpdf\def\pagemode{/PageMode /UseOutlines} + \ifnum\contentspagenumber=0 \advance \pageno by -1 + \def\pagelabels{/PageLabels << /Nums [ 0 << /S/D/St 1 >> + \the\pageno << /P(Contents) >> ] >>} + \else \twodigits=\pageno \pageno=\contentspagenumber + \advance \pageno by 1 \advance \twodigits by -\pageno + \def\pagelabels{/PageLabels << /Nums [ 0 << /S/D/St \the\pageno >> + \the\twodigits << /S/D/St \contentspagenumber >> ] >>} \fi + \ifpdflua\pdfcatalog{\pagemode\space\pagelabels} + \else \special{pdf: docview << \pagemode\space\pagelabels >>}\fi\fi} \def\botofcontents{\vfill \centerline{\covernote}} % this material will end the table of contents page \def\covernote{} @@ -452,12 +460,12 @@ % \ifodd\pageno\else\titletrue\null\vfill\eject\fi % for duplex printers \rightskip 0pt \hyphenpenalty 50 \tolerance 200 \setpage \output={\normaloutput\page\lheader\rheader} - \titletrue % prepare to output the table of contents + \startpdf \titletrue % prepare to output the table of contents \pageno=\contentspagenumber \def\grouptitle{TABLE OF CONTENTS} \message{Table of contents:} \ifhint\HINThome\fi% Mark the Table of contents as home page - \topofcontents \startpdf + \topofcontents \line{\hfil Section\ifhint\else\hbox to3em{\hss Page}\fi}% No Page in HINT \let\Z=\contentsline \readcontents\relax % read the contents info |