diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty index 9fa6d4ce1ab..d37682e5920 100644 --- a/Doc/texinputs/python.sty +++ b/Doc/texinputs/python.sty @@ -48,6 +48,14 @@ % \let\py@OldContentsline=\contentsline % + % Backward compatibility hack: pdfTeX 0.13 defined \pdfannotlink, + % but it changed to \pdfstartlink in 0.14. This let's us use either + % version and still get useful behavior. + % + \@ifundefined{pdfstartlink}{ + \let\pdfstartlink=\pdfannotlink + }{} + % % Macro that takes two args: the name to link to and the content of % the link. This takes care of the PDF magic, getting the colors % the same for each link, and avoids having lots of garbage all over