From cef883f8ae6f67463e1d7d0125acf2db5cdb62d8 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 30 Mar 2013 12:23:04 +0100 Subject: [PATCH] Closes #1132: Fix LaTeX table output for multi-row cells in the first column. --- CHANGES | 1 + sphinx/writers/latex.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 83e857cfa..1af69ca3d 100644 --- a/CHANGES +++ b/CHANGES @@ -158,6 +158,7 @@ Bugs fixed * Fix text writer not handling visit_legend for figure directive contents. * Fix text builder not respecting wide/fullwidth characters: title underline width, table layout width and text wrap width. +* #1132: Fix LaTeX table output for multi-row cells in the first column. * #1126: Fix double-hyphen to en-dash conversion in wrong places such as command-line option names in LaTeX. * #1117: Handle .pyx files in sphinx-apidoc. diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 0b64928d1..dba141054 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -759,10 +759,11 @@ class LaTeXTranslator(nodes.NodeVisitor): self.table.rowcount += 1 def visit_entry(self, node): - if self.remember_multirow.get(0, 0) > 1: - self.body.append(' & ') if self.table.col > 0: self.body.append(' & ') + elif self.remember_multirow.get(1, 0) > 1: + self.remember_multirow[1] -= 1 + self.body.append(' & ') self.table.col += 1 context = '' if 'morerows' in node: