LaTeX writer: don't emit [<+->] unless beamer output,

even if `writerIncremental` is True.

See #5072.
This commit is contained in:
John MacFarlane 2018-11-12 09:33:19 -08:00
parent 5bc38a741b
commit 52a57a5362
2 changed files with 17 additions and 2 deletions

View file

@ -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"

14
test/command/5072.md Normal file
View file

@ -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}
```