Commits

Georg Brandl committed c2f4f5e

Fix a linking problem in latex.

  • Participants
  • Parent commits 39fe4c0

Comments (0)

Files changed (1)

File sphinx/latexwriter.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}' % self.encode(node['synopsis']))