diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-02-16 17:44:58 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-02-16 17:47:45 -0800 |
commit | 8dd00b93e2489b665aaa5503cef7d03ba8ad3a46 (patch) | |
tree | 24765fd71e4420cf354f2f6d8396f8dc960b0c23 /src | |
parent | eca8c6043b1759dc6e821eb541d801421127eb61 (diff) | |
download | pandoc-8dd00b93e2489b665aaa5503cef7d03ba8ad3a46.tar.gz |
LaTeX writer: Omit lists with no items.
Otherwise we get LaTeX errors.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 088f14940..3c700b936 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -346,6 +346,7 @@ blockToLaTeX (CodeBlock (_,classes,keyvalAttr) str) = do return (flush $ text h) blockToLaTeX (RawBlock "latex" x) = return $ text x blockToLaTeX (RawBlock _ _) = return empty +blockToLaTeX (BulletList []) = return empty -- otherwise latex error blockToLaTeX (BulletList lst) = do incremental <- gets stIncremental let inc = if incremental then "[<+->]" else "" @@ -355,6 +356,7 @@ blockToLaTeX (BulletList lst) = do else empty return $ text ("\\begin{itemize}" ++ inc) $$ spacing $$ vcat items $$ "\\end{itemize}" +blockToLaTeX (OrderedList _ []) = return empty -- otherwise latex error blockToLaTeX (OrderedList (start, numstyle, numdelim) lst) = do st <- get let inc = if stIncremental st then "[<+->]" else "" @@ -393,6 +395,7 @@ blockToLaTeX (OrderedList (start, numstyle, numdelim) lst) = do $$ spacing $$ vcat items $$ "\\end{enumerate}" +blockToLaTeX (DefinitionList []) = return empty blockToLaTeX (DefinitionList lst) = do incremental <- gets stIncremental let inc = if incremental then "[<+->]" else "" |