LaTeX writer: Omit lists with no items.
Otherwise we get LaTeX errors.
This commit is contained in:
parent
eca8c6043b
commit
8dd00b93e2
1 changed files with 3 additions and 0 deletions
|
@ -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 ""
|
||||
|
|
Loading…
Add table
Reference in a new issue