diff options
author | Karl Berry <karl@freefriends.org> | 2023-03-28 23:48:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-03-28 23:48:46 +0000 |
commit | 578ea679c188fe248af9423bc350927353585fa5 (patch) | |
tree | c7f1d3378327feb12fefba9f0b0e484403f9c7a5 /Master/texmf-dist/tex/texinfo | |
parent | bde7f1eba64a74a6e8b2286bf4f9b6204d4cf8a5 (diff) |
tl-update-auto
git-svn-id: svn://tug.org/texlive/trunk@66701 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/texinfo')
-rw-r--r-- | Master/texmf-dist/tex/texinfo/texinfo.tex | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/texinfo/texinfo.tex b/Master/texmf-dist/tex/texinfo/texinfo.tex index 0b8b87c9592..c0a54919a7b 100644 --- a/Master/texmf-dist/tex/texinfo/texinfo.tex +++ b/Master/texmf-dist/tex/texinfo/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2023-03-21.06} +\def\texinfoversion{2023-03-27.21} % % Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc. % @@ -1102,27 +1102,33 @@ where each line of input produces a line of output.} % Output page labels information. % See PDF reference v.1.7 p.594, section 8.3.1. +% Page label ranges must be increasing. \ifpdf \def\pagelabels{% \def\title{0 << /P (T-) /S /D >>}% - \edef\roman{\the\romancount << /S /r >>}% - \edef\arabic{\the\arabiccount << /S /D >>}% % - % Page label ranges must be increasing. Remove any duplicates. - % (There is a slight chance of this being wrong if e.g. there is - % a @contents but no @titlepage, etc.) - % - \ifnum\romancount=0 \def\roman{}\fi - \ifnum\arabiccount=0 \def\title{}% - \else - \ifnum\romancount=\arabiccount \def\roman{}\fi - \fi - % - \ifnum\romancount<\arabiccount - \pdfcatalog{/PageLabels << /Nums [\title \roman \arabic ] >> }\relax + % support @contents at very end of document + \ifnum\contentsendcount=\pagecount + \ifnum\arabiccount<\romancount + \pdfcatalog{/PageLabels << /Nums + [\title + \the\arabiccount << /S /D >> + \the\romancount << /S /r >> + ] >> }\relax + \fi + % no contents in document + \else\ifnum\contentsendcount=0 + \pdfcatalog{/PageLabels << /Nums + [\title + \the\arabiccount << /S /D >> + ] >> }\relax \else - \pdfcatalog{/PageLabels << /Nums [\title \arabic \roman ] >> }\relax - \fi + \pdfcatalog{/PageLabels << /Nums + [\title + \the\romancount << /S /r >> + \the\contentsendcount << /S /D >> + ] >> }\relax + \fi\fi } \else \let\pagelabels\relax @@ -1131,6 +1137,8 @@ where each line of input produces a line of output.} \newcount\pagecount \pagecount=0 \newcount\romancount \romancount=0 \newcount\arabiccount \arabiccount=0 +\newcount\contentsendcount \contentsendcount=0 + \ifpdf \let\ptxadvancepageno\advancepageno \def\advancepageno{% @@ -6809,12 +6817,8 @@ might help (with 'rm \jobname.?? \jobname.??s')% % Get ready to use Arabic numerals again \def\contentsendroman{% \lastnegativepageno = \pageno - \global\pageno = \savepageno - % - % If \romancount > \arabiccount, the contents are at the end of the - % document. Otherwise, advance where the Arabic numerals start for - % the page numbers. - \ifnum\romancount>\arabiccount\else\global\arabiccount=\pagecount\fi + \global\pageno=1 + \contentsendcount = \pagecount } % Typeset the label for a chapter or appendix for the short contents. |