In the LaTeX writer, do not raise an exception on too many section

levels, just use the "subparagraph" level for all of them.
This commit is contained in:
Georg Brandl 2009-04-28 20:31:00 +02:00
parent 124864ed27
commit cb86f75bab
2 changed files with 5 additions and 4 deletions

View File

@ -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.

View File

@ -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{')