Commits

Anonymous committed daf8afd

option pdf_use_index

Comments (0)

Files changed (1)

sphinx/builders/pdf.py

             langmod = languages.get_language(self.config.language[:2])
         else:
             langmod = languages.get_language('en')
-        # Add index at the end of the document
-
-        genindex = self.env.create_index(self)
-        pb,index_nodes=genindex_nodes(genindex)
-        tree.append(pb)
-        tree.append(index_nodes)
+            
+        if self.config.pdf_use_index:
+            # Add index at the end of the document
+            genindex = self.env.create_index(self)
+            pb,index_nodes=genindex_nodes(genindex)
+            tree.append(pb)
+            tree.append(index_nodes)
 
         # Generate Contents topic manually