From ee032728830ed700e9843c3ebfc0854226a84010 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Fri, 16 Dec 2016 14:03:58 +0100
Subject: [PATCH] LaTeX writer: allow tables with empty cells to count as
 "plain."

This addresses a problem of too-wide tables when empty cells
are used.

Thanks to Joost Kremers for reporting the issue.
---
 src/Text/Pandoc/Writers/LaTeX.hs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 88be106fd..81109e111 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -640,6 +640,7 @@ tableRowToLaTeX header aligns widths cols = do
   let scaleFactor = 0.97 ** fromIntegral (length aligns)
   let isSimple [Plain _] = True
       isSimple [Para  _] = True
+      isSimple []        = True
       isSimple _         = False
   -- simple tables have to have simple cells:
   let widths' = if not (all isSimple cols)