merge with stable

This commit is contained in:
Georg Brandl 2011-10-23 23:04:39 +02:00
commit fa3db9e209
2 changed files with 7 additions and 6 deletions

View File

@ -2,7 +2,7 @@
* doctools.js * doctools.js
* ~~~~~~~~~~~ * ~~~~~~~~~~~
* *
* Sphinx JavaScript utilties for all documentation. * Sphinx JavaScript utilities for all documentation.
* *
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details. * :license: BSD, see LICENSE for details.

View File

@ -744,13 +744,13 @@ class LaTeXTranslator(nodes.NodeVisitor):
if self.table.col > 0: if self.table.col > 0:
self.body.append(' & ') self.body.append(' & ')
self.table.col += 1 self.table.col += 1
self.context.append('') context = ''
if 'morerows' in node: if 'morerows' in node:
self.body.append(' \multirow{') self.body.append(' \multirow{')
self.previous_spanning_row = 1 self.previous_spanning_row = 1
self.body.append(str(node.get('morerows') + 1)) self.body.append(str(node.get('morerows') + 1))
self.body.append('}{*}{') self.body.append('}{*}{')
self.context.append('}') context += '}'
self.remember_multirow[self.table.col] = node.get('morerows') + 1 self.remember_multirow[self.table.col] = node.get('morerows') + 1
if 'morecols' in node: if 'morecols' in node:
self.body.append(' \multicolumn{') self.body.append(' \multicolumn{')
@ -759,13 +759,14 @@ class LaTeXTranslator(nodes.NodeVisitor):
self.body.append('}{|l|}{') self.body.append('}{|l|}{')
else: else:
self.body.append('}{l|}{') self.body.append('}{l|}{')
self.context.append('}') context += '}'
if isinstance(node.parent.parent, nodes.thead): if isinstance(node.parent.parent, nodes.thead):
self.body.append('\\textbf{') self.body.append('\\textbf{')
self.context.append('}') context += '}'
if self.remember_multirow.get(self.table.col + 1, 0) > 1: if self.remember_multirow.get(self.table.col + 1, 0) > 1:
self.remember_multirow[self.table.col + 1] -= 1 self.remember_multirow[self.table.col + 1] -= 1
self.context.append(' & ') context += ' & '
self.context.append(context)
def depart_entry(self, node): def depart_entry(self, node):
self.body.append(self.context.pop()) # header self.body.append(self.context.pop()) # header