Skip to content

Commit

Permalink
Merge branch 'texlive-trunk' r71402
Browse files Browse the repository at this point in the history
  • Loading branch information
t-tk committed Jun 2, 2024
2 parents 25f4404 + 06d02b0 commit 5cbf668
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions source/texk/web2c/cwebdir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2024-05-25 Andreas Scherer <https://ascherer.github.io>

* cwebacromac.tex: HiTeX has a three-page table-of-contents.
* texinputs/pdfwebtocfront.tex: Add \space in PDF code.

2024-05-25 Andreas Scherer <https://ascherer.github.io>

* texinputs/pdfwebtocfront.tex: More room for long ToCs.
Expand Down
7 changes: 4 additions & 3 deletions source/texk/web2c/cwebdir/cwebacromac.tex
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
\fi % end of LuaTeX->pdfTeX redirection macros

% Used in cwebmac.tex, pdfctwimac.tex, pdfproofmac.tex
\def\tocpages{1} % Most programs have one-page Table-of-Contents
\def\startpdf{\def\pagemode{/PageMode /UseOutlines}
\ifnum\contentspagenumber=0 \advance \pageno by -1
\def\pagelabels{/PageLabels << /Nums [ 0 << /S/D/St 1 >>
\ifnum\contentspagenumber=0 \advance \pageno by -\tocpages
\def\pagelabels{/PageLabels << /Nums [ 0 << /S/D/St \tocpages >>
\the\pageno << /P(Contents) >> ] >>}
\else \twodigits=\pageno \pageno=\contentspagenumber
\advance \pageno by 1 \advance \twodigits by -\pageno
\advance \pageno by \tocpages \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}
Expand Down
4 changes: 2 additions & 2 deletions source/texk/web2c/cwebdir/texinputs/pdfwebtocfront.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
\def\pagelabels{/PageLabels << /Nums [
\ifnum\contentspagenumber=0 0 << /P(Contents) >> \tocpages << /S/D/St 1 >>
\else 0 << /S/D/St \contentspagenumber >> \fi ] >> }
\def\startpdf{\ifpdf \ifpdflua\pdfcatalog{\pagemode \pagelabels}
\else {\special{pdf: docview << \pagemode \pagelabels >>}}\fi\fi}
\def\startpdf{\ifpdflua\pdfcatalog{\pagemode\space\pagelabels}
\else {\special{pdf: docview << \pagemode\space\pagelabels >>}}\fi}
% Redefine '\con' to be invoked before the first '\N' (starred section).
\let\ORGcon\con
\def\con{%
Expand Down

0 comments on commit 5cbf668

Please sign in to comment.