Commits

ral...@hp  committed fdd40af

fixes for modindex

  • Participants
  • Parent commits f8d5baa

Comments (0)

Files changed (3)

File doc/Makefile

 	@echo "To view the help collection:"
 	@echo "# assistant -collectionFile _build/qthelp/Sphinx.qhc"
 
+pdf:
+	mkdir -p _build/pdf _build/doctrees
+	$(SPHINXBUILD) -b pdf $(ALLSPHINXOPTS) _build/pdf
+
 latex:
 	mkdir -p _build/latex _build/doctrees
 	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
 # Put TODOs into the output.
 todo_include_todos = True
 
+# PDF options
+pdf_documents=[ ('builders', project, "%s %s Documentation" % (project, version), 'Georg Brandl') ]
+pdf_stylesheets=['sphinx']
+pdf_fit_mode='shrink'
+pdf_break_level=1
+pdf_use_index = True
+pdf_use_modindex = True
+pdf_use_coverpage = True
+
+
 
 # -- Extension interface -------------------------------------------------------
 

File sphinx/builders/pdf.py

             t=_('Global Module Index')
             t+='\n'+'='*len(t)+'\n'
             output.append(t)
-            
             for modname, collapse, cgroup, indent,\
                 fname, synops, pform, dep, stripped in modindexentries:
-                
                 if not modname: # A letter
                     output.append('.. cssclass:: heading4\n\n%s\n\n'%fname)
                 else: # A module
-                    output.append('`%s <%s>`_ '%(stripped or modname,fname))
-                    if pform and pform[0]:
-                        output[-1]+='*(%s)* '%', '.join(pform)
-                    if dep:
-                        output[-1]+='**%s** '%_('Deprecated')
-                    output[-1]+='*%s*'%synops
+                    if fname:
+                        output.append('`%s <%s>`_'%(stripped or modname,fname))
+                        if pform and pform[0]:
+                            output[-1]+='*(%s)*'%' '.join(pform)
+                        if synops:
+                            output[-1]+=', *%s*'%synops
+                        if dep:
+                            output[-1]+=' **%s**'%_('Deprecated')
+                output.append('')
             
             dt = docutils.core.publish_doctree('\n'.join(output))
             tree.append(pb_twoColumn)