Georg Brandl avatar Georg Brandl committed 009c988

Add file attribute to appendix nodes.

Comments (0)

Files changed (1)


             self.titles.append((docname, entry[2]))
     def write(self, *ignored):
-        # first, assemble the "appendix" docs that are in every PDF
-        appendices = []
-        for fname in self.config.latex_appendices:
-            appendices.append(self.env.get_doctree(fname))
         docwriter = LaTeXWriter(self)
         docsettings = OptionParser(
   "processing " + targetname + "... ", nonl=1)
             doctree = self.assemble_doctree(docname, toctree_only,
-                appendices=(docclass == 'manual') and appendices or [])
+                appendices=((docclass == 'manual') and
+                            self.config.latex_appendices or []))
   "writing... ", nonl=1)
             doctree.settings = docsettings
                 new_sect += node
             tree = new_tree
         largetree = process_tree(indexfile, tree)
-        largetree.extend(appendices)
         largetree['file'] = indexfile
+        for docname in appendices:
+            appendix = self.env.get_doctree(docname)
+            appendix['file'] = docname
+            largetree.append(appendix)"resolving references...")
         self.env.resolve_references(largetree, indexfile, self)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.