mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2707: output more compact `*{N}{p{...}}
` notation
This commit is contained in:
parent
303f163b0a
commit
8e45f54d07
@ -1052,9 +1052,9 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
self.body.append(self.table.colspec)
|
||||
else:
|
||||
if self.table.has_problematic:
|
||||
colspec = ('p{\\dimexpr(\\linewidth-\\arrayrulewidth)/%d'
|
||||
'-2\\tabcolsep-\\arrayrulewidth\\relax}|' % \
|
||||
self.table.colcount) * self.table.colcount
|
||||
colspec = ('*{%d}{p{\\dimexpr(\\linewidth-\\arrayrulewidth)/%d'
|
||||
'-2\\tabcolsep-\\arrayrulewidth\\relax}|}' % \
|
||||
(self.table.colcount, self.table.colcount))
|
||||
self.body.append('{|' + colspec + '}\n')
|
||||
elif self.table.longtable:
|
||||
self.body.append('{|' + ('l|' * self.table.colcount) + '}\n')
|
||||
|
Loading…
Reference in New Issue
Block a user