Commits

Georg Brandl committed 9ba927d

In the LaTeX writer, do not raise an exception on too many section
levels, just use the "subparagraph" level for all of them.

  • Participants
  • Parent commits ba64351

Comments (0)

Files changed (2)

 Release 0.6.2 (in development)
 ==============================
 
+* In the LaTeX writer, do not raise an exception on too many section
+  levels, just use the "subparagraph" level for all of them.
+
 * #145: Fix autodoc problem with automatic members that refuse to be
   getattr()'d from their parent.
 

File sphinx/writers/latex.py

             try:
                 self.body.append(r'\%s{' % self.sectionnames[self.sectionlevel])
             except IndexError:
-                raise UnsupportedError(
-                    '%s:%s: too many nesting section levels for '
-                    'LaTeX, at heading: %s' % (self.curfilestack[-1],
-                                               node.line or '', node.astext()))
+                # just use "subparagraph", it's not numbered anyway
+                self.body.append(r'\%s{' % self.sectionnames[-1])
             self.context.append('}\n')
         elif isinstance(parent, (nodes.topic, nodes.sidebar)):
             self.body.append(r'\textbf{')