git.iko.soy/typeable/pandoc
on master help sign in
Fix duplicate frame classes in LaTeX/Beamer output.

Close #6107.

commitd9b1776336db06306562c4b5648716196261b548 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 3 Feb 2020, 08:52 (7 years ago) parent6371ec2
2 files changed+29−2
src/Text/Pandoc/Writers/LaTeX.hs+2−2 test/command/6107.md+27
src/Text/Pandoc/Writers/LaTeX.hs+2−2
@@ -501,8 +501,8 @@ blockToLaTeX (Div (identifier,"slide":dclasses,dkvs)
501501 hasCodeBlock _ = []
502502 let hasCode (Code _ _) = [True]
503503 hasCode _ = []
504− let classes = dclasses ++ hclasses
505− let kvs = dkvs ++ hkvs
504+ let classes = ordNub $ dclasses ++ hclasses
505+ let kvs = ordNub $ dkvs ++ hkvs
506506 let fragile = "fragile" `elem` classes ||
507507 not (null $ query hasCodeBlock bs ++ query hasCode bs)
508508 let frameoptions = ["allowdisplaybreaks", "allowframebreaks", "fragile",
test/command/6107.mdnew file+27
@@ -0,0 +1,27 @@
1+```
2+% pandoc -t beamer
3+---
4+title: A silly slide
5+subtitle: Look for the sequel!
6+---
7+
8+# A circus!
9+
10+## Another silly title
11+
12+Not much to do about nothing.
13+
14+## Epilogue {.standout}
15+^D
16+\hypertarget{a-circus}{%
17+\section{A circus!}\label{a-circus}}
18+
19+\begin{frame}{Another silly title}
20+\protect\hypertarget{another-silly-title}{}
21+Not much to do about nothing.
22+\end{frame}
23+
24+\begin{frame}[standout]{Epilogue}
25+\protect\hypertarget{epilogue}{}
26+\end{frame}
27+```