From f61e02799b254e7c3e9c16caf26bf4cd79c50928 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 30 May 2010 14:46:57 +0200 Subject: [PATCH] Respect "refid" attributes of reference nodes; this prevented references to labels in the same file. --- sphinx/writers/latex.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 5a599084d..eaca3e714 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -1027,6 +1027,8 @@ class LaTeXTranslator(nodes.NodeVisitor): def visit_reference(self, node): uri = node.get('refuri', '') + if not uri and node.get('refid'): + uri = '%' + self.curfilestack[-1] + '#' + node['refid'] if self.in_title or not uri: self.context.append('') elif uri.startswith('mailto:') or uri.startswith('http:') or \