Closes #1088: raise an "unsupported" error when trying to put a literal block in a footnote in latex

This commit is contained in:
Georg Brandl 2013-03-30 17:58:42 +01:00
parent 77d2a90f36
commit 41971a6617

View File

@ -1310,6 +1310,10 @@ class LaTeXTranslator(nodes.NodeVisitor):
pass
def visit_literal_block(self, node):
if self.in_footnote:
raise UnsupportedError('%s:%s: literal blocks in footnotes are '
'not supported by LaTeX' %
(self.curfilestack[-1], node.line))
self.verbatim = ''
def depart_literal_block(self, node):
code = self.verbatim.rstrip('\n')