From df7e93dcf1a2341e694e1fdead5cb0dc220c3d48 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 23 Nov 2008 12:22:43 +0100 Subject: [PATCH] Fix latex markup for line blocks in tables. --- CHANGES | 2 ++ sphinx/latexwriter.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index a2f6f4407..23ea5daa4 100644 --- a/CHANGES +++ b/CHANGES @@ -163,6 +163,8 @@ Bugs fixed * Fix small problems in HTML help index generation. +* Fix LaTeX output for line blocks in tables. + * Fix "illegal unit" error when using pixel image widths/heights. * Support table captions in LaTeX output. diff --git a/sphinx/latexwriter.py b/sphinx/latexwriter.py index 6d19b4ac1..5c74e256f 100644 --- a/sphinx/latexwriter.py +++ b/sphinx/latexwriter.py @@ -1038,7 +1038,10 @@ class LaTeXTranslator(nodes.NodeVisitor): # no output in this line -- add a nonbreaking space, else the # \\ command will give an error self.body.append('~') - self.body.append('\\\\\n') + if self.table is not None: + self.body.append('\\newline\n') + else: + self.body.append('\\\\\n') def visit_block_quote(self, node): # If the block quote contains a single object and that object