@@ -213,13 +213,14 @@ blockToLaTeX (Header level lst) = do
213213 (False, 3) -> text "\\subsubsection" <> stuffing <> char '\n'
214214 _ -> txt <> char '\n'
215215blockToLaTeX (Table caption aligns widths heads rows) = do
216− headers <- tableRowToLaTeX heads
216+ headers <- if all null heads
217+ then return empty
218+ else liftM ($$ text "\\hline") $ tableRowToLaTeX heads
217219 captionText <- inlineListToLaTeX caption
218220 rows' <- mapM tableRowToLaTeX rows
219221 let colDescriptors = concat $ zipWith toColDescriptor widths aligns
220222 let tableBody = text ("\\begin{tabular}{" ++ colDescriptors ++ "}") $$
221− headers $$ text "\\hline" $$ vcat rows' $$
222− text "\\end{tabular}"
223+ headers $$ vcat rows' $$ text "\\end{tabular}"
223224 let centered txt = text "\\begin{center}" $$ txt $$ text "\\end{center}"
224225 modify $ \s -> s{ stTable = True }
225226 return $ if isEmpty captionText