mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Change the form of the name given to each page of the PDF from "page.%d" to
"page.%dx"; this works around an acroread bug that causes targets not to be recognized if their name is a prefix of another target in the file.
This commit is contained in:
parent
d671e8fb87
commit
a88d681255
2 changed files with 2 additions and 2 deletions
|
@ -62,7 +62,7 @@
|
||||||
}
|
}
|
||||||
\def\@hyperfixhead{%
|
\def\@hyperfixhead{%
|
||||||
\let\H@old@thehead\@thehead
|
\let\H@old@thehead\@thehead
|
||||||
\gdef\@foo{\if@doing@page@targets\pdfdest name{page.\thepage} fit\fi}%
|
\gdef\@foo{\if@doing@page@targets\pdfdest name{page.\thepage x} fit\fi}%
|
||||||
\expandafter\ifx\expandafter\@empty\H@old@thehead
|
\expandafter\ifx\expandafter\@empty\H@old@thehead
|
||||||
\def\H@old@thehead{\hfil}\fi
|
\def\H@old@thehead{\hfil}\fi
|
||||||
\def\@thehead{\@foo\relax\H@old@thehead}%
|
\def\@thehead{\@foo\relax\H@old@thehead}%
|
||||||
|
|
|
@ -101,7 +101,7 @@ def write_toc(toc, fp):
|
||||||
|
|
||||||
def write_toc_entry(entry, fp, layer):
|
def write_toc_entry(entry, fp, layer):
|
||||||
stype, snum, title, pageno, toc = entry
|
stype, snum, title, pageno, toc = entry
|
||||||
s = "\\pdfoutline goto name{page.%d}" % pageno
|
s = "\\pdfoutline goto name{page.%dx}" % pageno
|
||||||
if toc:
|
if toc:
|
||||||
s = "%s count -%d" % (s, len(toc))
|
s = "%s count -%d" % (s, len(toc))
|
||||||
if snum:
|
if snum:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue