From 482a2e50798481f484267bdcfb7b305ea7bd7971 Mon Sep 17 00:00:00 2001 From: "Laurent P. René de Cotret" Date: Sat, 15 Aug 2020 14:40:10 -0400 Subject: [Latex Reader] Fixing issues with \multirow and \multicolumn table cells (#6608) * Added test to replicate (#6596) * Table cell reader not consuming spaces correctly (#6596) * Prevented wrong nesting of \multicolumn and \multirow table cells (#6603) * Parse empty table cells (#6603) * Support full prototype for multirow macro (#6603) Closes #6603 --- test/Tests/Readers/LaTeX.hs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/Tests/Readers/LaTeX.hs b/test/Tests/Readers/LaTeX.hs index a8d969659..87074e990 100644 --- a/test/Tests/Readers/LaTeX.hs +++ b/test/Tests/Readers/LaTeX.hs @@ -157,17 +157,26 @@ tests = [ testGroup "tokenization" ] , "Table with multirow item" =: T.unlines ["\\begin{tabular}{c}" - ,"\\multirow{2}{c}{One}\\\\Two\\\\" + ,"\\multirow{2}{5em}{One}\\\\Two\\\\" ,"\\end{tabular}" ] =?> table' [AlignCenter] - [ Row nullAttr [ cell AlignCenter (RowSpan 2) (ColSpan 1) (plain "One") ] + [ Row nullAttr [ cell AlignDefault (RowSpan 2) (ColSpan 1) (plain "One") ] + , Row nullAttr [ simpleCell (plain "Two") ] + ] + , "Table with multirow item using full prototype" =: + T.unlines ["\\begin{tabular}{c}" + ,"\\multirow[c]{2}[3]{5em}[1in]{One}\\\\Two\\\\" + ,"\\end{tabular}" + ] =?> + table' [AlignCenter] + [ Row nullAttr [ cell AlignDefault (RowSpan 2) (ColSpan 1) (plain "One") ] , Row nullAttr [ simpleCell (plain "Two") ] ] , "Table with nested multirow/multicolumn item" =: T.unlines [ "\\begin{tabular}{c c c}" - , "\\multirow{2}{c}{\\multicolumn{2}{c}{One}}&Two\\\\" - , "Three\\\\" + , "\\multicolumn{2}{c}{\\multirow{2}{5em}{One}}&Two\\\\" + , "& & Three\\\\" , "Four&Five&Six\\\\" , "\\end{tabular}" ] =?> -- cgit v1.2.3