aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs5
-rw-r--r--test/command/5072.md14
2 files changed, 17 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 480c97356..57ef589e3 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -709,7 +709,7 @@ blockToLaTeX (BulletList lst) = do
blockToLaTeX (OrderedList _ []) = return empty -- otherwise latex error
blockToLaTeX (OrderedList (start, numstyle, numdelim) lst) = do
st <- get
- let inc = if stIncremental st then "[<+->]" else ""
+ let inc = if stBeamer st && stIncremental st then "[<+->]" else ""
let oldlevel = stOLLevel st
put $ st {stOLLevel = oldlevel + 1}
items <- mapM listItemToLaTeX lst
@@ -759,7 +759,8 @@ blockToLaTeX (OrderedList (start, numstyle, numdelim) lst) = do
blockToLaTeX (DefinitionList []) = return empty
blockToLaTeX (DefinitionList lst) = do
incremental <- gets stIncremental
- let inc = if incremental then "[<+->]" else ""
+ beamer <- gets stBeamer
+ let inc = if beamer && incremental then "[<+->]" else ""
items <- mapM defListItemToLaTeX lst
let spacing = if all isTightList (map snd lst)
then text "\\tightlist"
diff --git a/test/command/5072.md b/test/command/5072.md
new file mode 100644
index 000000000..414022a80
--- /dev/null
+++ b/test/command/5072.md
@@ -0,0 +1,14 @@
+```
+% pandoc -t latex -i
+1. one
+2. two
+^D
+\begin{enumerate}
+\def\labelenumi{\arabic{enumi}.}
+\tightlist
+\item
+ one
+\item
+ two
+\end{enumerate}
+```