Commits

Georg Brandl committed dfda06b Merge

merge with 0.5

Comments (0)

Files changed (1)

sphinx/writers/latex.py

             for bi in self.bibitems:
                 # cite_key: underscores must not be escaped
                 cite_key = bi[0].replace(r"\_", "_")
-                self.body.append('\\bibitem[%s]{%s}{%s}\n' %
-                                 (bi[0], cite_key, bi[1]))
+                self.body.append('\\bibitem[%s]{%s}{\hypertarget{%s}{} %s}\n' %
+                                 (bi[0], cite_key, cite_key.lower(), bi[1]))
             self.body.append('\\end{thebibliography}\n')
             self.bibitems = []
 
 
     def visit_module(self, node):
         modname = node['modname']
+        self.body.append('\n\\hypertarget{module-%s}{}' %
+                         (modname.replace(' ','')))
         self.body.append('\n\\declaremodule[%s]{}{%s}' % (
             modname.replace('_', ''), self.encode(modname)))
         self.body.append('\n\\modulesynopsis{%s}' %