From 4d1f66a8a16aaa01ba3a7c2342182c0c8619c361 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 24 Jul 2015 16:30:48 +0200 Subject: [PATCH] Closes #1871: fix for latex writer with multirow and 1-column tables. --- sphinx/writers/latex.py | 1 + tests/root/markup.txt | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 2d08d4cfdd..71e3508551 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -874,6 +874,7 @@ class LaTeXTranslator(nodes.NodeVisitor): self.body.append('\\\\\n') if any(self.remember_multirow.values()): linestart = 1 + col = self.table.colcount for col in range(1, self.table.col + 1): if self.remember_multirow.get(col): if linestart != col: diff --git a/tests/root/markup.txt b/tests/root/markup.txt index de1bcaecb2..9e8c6bc863 100644 --- a/tests/root/markup.txt +++ b/tests/root/markup.txt @@ -187,7 +187,7 @@ Tables | 2 | Empty cells: | | +----+----------------+----+ -Table with multirow and multicol: +Tables with multirow and multicol: .. only:: latex @@ -199,6 +199,12 @@ Table with multirow and multicol: | x | multi-column cell | x | +----+---------------------+----+ + +----+ + | 1 | + + + + | | + +----+ + Figures -------