@@ -571,23 +571,25 @@ bodyPartToBlocks (Tbl cap _ look (r:rs)) = do
571571 True | null rs -> (Nothing, [r])
572572 | otherwise -> (Just r, rs)
573573 False -> (Nothing, r:rs)
574+
575+ cells <- mapM rowToBlocksList rows
576+
577+ let width = case cells of
578+ r':_ -> length r'
579+ -- shouldn't happen
580+ [] -> 0
581+
574582 hdrCells <- case hdr of
575583 Just r' -> rowToBlocksList r'
576− Nothing -> return []
577−
578− cells <- mapM rowToBlocksList rows
584+ Nothing -> return $ replicate width mempty
579585
580− let size = case null hdrCells of
581− True -> length $ head cells
582− False -> length $ hdrCells
583− --
584586 -- The two following variables (horizontal column alignment and
585587 -- relative column widths) go to the default at the
586588 -- moment. Width information is in the TblGrid field of the Tbl,
587589 -- so should be possible. Alignment might be more difficult,
588590 -- since there doesn't seem to be a column entity in docx.
589− alignments = replicate size AlignDefault
590− widths = replicate size 0 :: [Double]
591+ let alignments = replicate width AlignDefault
592+ widths = replicate width 0 :: [Double]
591593
592594 return $ table caption (zip alignments widths) hdrCells cells
593595bodyPartToBlocks (OMathPara e) = do