diff --git a/CHANGES b/CHANGES index cf9f05580..864bb9929 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ 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. diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 37281fa9f..6eaabfb3e 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -383,10 +383,8 @@ class LaTeXTranslator(nodes.NodeVisitor): 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{')