mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix empty cell in table header causes LaTeX error (#1574)
This commit is contained in:
parent
02f013aba5
commit
ee7e3cc078
@ -1061,6 +1061,9 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
self.remember_multirowcol[self.table.col] = node.get('morecols')
|
||||
self.table.col += node.get('morecols')
|
||||
if isinstance(node.parent.parent, nodes.thead):
|
||||
if len(node) == 1 and isinstance(node[0], nodes.paragraph) and node.astext() == '':
|
||||
pass
|
||||
else:
|
||||
self.body.append('\\textsf{\\relax ')
|
||||
context += '}'
|
||||
while self.remember_multirow.get(self.table.col + 1, 0):
|
||||
|
@ -187,6 +187,15 @@ Tables
|
||||
| 2 | Empty cells: | |
|
||||
+----+----------------+----+
|
||||
|
||||
.. table:: empty cell in table header
|
||||
|
||||
===== ======
|
||||
\
|
||||
===== ======
|
||||
1 2
|
||||
3 4
|
||||
===== ======
|
||||
|
||||
Tables with multirow and multicol:
|
||||
|
||||
.. only:: latex
|
||||
|
Loading…
Reference in New Issue
Block a user