Commits

Georg Brandl committed 0e49e99

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

Comments (0)

Files changed (1)

sphinx/writers/latex.py

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