LaTeX reader: fix inconsistent column widths.
This fixes a bug whereby column widths for the body were different from widths for the header in some tables. Closes #4238.
This commit is contained in:
parent
49007ded7b
commit
c5ba3b8ee3
1 changed files with 2 additions and 2 deletions
|
@ -749,9 +749,9 @@ tableRowToLaTeX header aligns widths cols = do
|
|||
isSimple [] = True
|
||||
isSimple _ = False
|
||||
-- simple tables have to have simple cells:
|
||||
let widths' = if not (all isSimple cols)
|
||||
let widths' = if all (== 0) widths && not (all isSimple cols)
|
||||
then replicate (length aligns)
|
||||
(0.97 / fromIntegral (length aligns))
|
||||
(scaleFactor / fromIntegral (length aligns))
|
||||
else map (scaleFactor *) widths
|
||||
cells <- mapM (tableCellToLaTeX header) $ zip3 widths' aligns cols
|
||||
return $ hsep (intersperse "&" cells) <> "\\tabularnewline"
|
||||
|
|
Loading…
Add table
Reference in a new issue