diff Doc/texinputs/python.sty @ 22320:dc6054e5b642 2.2

pdfTeX 0.13 and 0.14 do not agree on the name of the macro, and I will not change the installed version on either of the machines I use to format the docs. Instead, use a compatibility hack to support both versions. This is also better for external users of the Python styles.
author Fred Drake <fdrake@acm.org>
date Sat, 16 Mar 2002 04:52:55 +0000
parents cc788b3b21b6
children 810c14f24373 66e85a732ddd
line wrap: on
line diff
--- a/Doc/texinputs/python.sty	Fri Mar 15 23:18:05 2002 +0000
+++ b/Doc/texinputs/python.sty	Sat Mar 16 04:52:55 2002 +0000
@@ -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