]> granicus.if.org Git - python/commitdiff
pdfTeX 0.13 and 0.14 do not agree on the name of the macro, and I will not
authorFred Drake <fdrake@acm.org>
Sat, 16 Mar 2002 04:52:36 +0000 (04:52 +0000)
committerFred Drake <fdrake@acm.org>
Sat, 16 Mar 2002 04:52:36 +0000 (04:52 +0000)
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.

Doc/texinputs/python.sty

index 9fa6d4ce1ab81d12083e2fa0dd4aa5e3a60b7145..d37682e5920de7c5c8b152b2dbf9a010dbdc36de 100644 (file)
   %
   \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