diff options
| author | Georg Brandl <georg@python.org> | 2008-12-28 19:44:54 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2008-12-28 19:44:54 +0100 |
| commit | 11b88fe2c82a283aa5a3c757c15942cdf658e2a1 (patch) | |
| tree | 50aed09c5f3461f6fbc68dc3cf0117f3e5f338d5 /sphinx/builders/latex.py | |
| parent | 4ed7be8db5c9dfa98d660472769c6f3818ae5d5a (diff) | |
| download | sphinx-11b88fe2c82a283aa5a3c757c15942cdf658e2a1.tar.gz | |
Due to popular demand, added a ``:doc:`` role which directly
links to another document without the need of creating a
label to which a ``:ref:`` could link to.
Diffstat (limited to 'sphinx/builders/latex.py')
| -rw-r--r-- | sphinx/builders/latex.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/builders/latex.py b/sphinx/builders/latex.py index 2301c7ac..2bcbc0d0 100644 --- a/sphinx/builders/latex.py +++ b/sphinx/builders/latex.py @@ -50,7 +50,7 @@ class LaTeXBuilder(Builder): if docname not in self.docnames: raise NoUri else: - return '' + return '%' + docname def init_document_data(self): preliminary_document_data = map(list, self.config.latex_documents) @@ -123,12 +123,13 @@ class LaTeXBuilder(Builder): self.warn('%s: toctree contains ref to nonexisting file %r' % (docname, includefile)) else: - sof = addnodes.start_of_file() + sof = addnodes.start_of_file(docname=includefile) sof.children = subtree.children newnodes.append(sof) toctreenode.parent.replace(toctreenode, newnodes) return tree tree = self.env.get_doctree(indexfile) + tree['docname'] = indexfile if toctree_only: # extract toctree nodes from the tree and put them in a fresh document new_tree = new_document('<latex output>') |
