aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-02-03 08:52:07 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2020-02-03 08:52:07 -0800
commitd9b1776336db06306562c4b5648716196261b548 (patch)
treea16cf7242856670c1689b069a81089dc0021d259
parent6371ec241d63e0faf3a181aa4b08fb32ebb2eff1 (diff)
downloadpandoc-d9b1776336db06306562c4b5648716196261b548.tar.gz
Fix duplicate frame classes in LaTeX/Beamer output.
Close #6107.
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs4
-rw-r--r--test/command/6107.md27
2 files changed, 29 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 6155aec59..438b04bc7 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -501,8 +501,8 @@ blockToLaTeX (Div (identifier,"slide":dclasses,dkvs)
hasCodeBlock _ = []
let hasCode (Code _ _) = [True]
hasCode _ = []
- let classes = dclasses ++ hclasses
- let kvs = dkvs ++ hkvs
+ let classes = ordNub $ dclasses ++ hclasses
+ let kvs = ordNub $ dkvs ++ hkvs
let fragile = "fragile" `elem` classes ||
not (null $ query hasCodeBlock bs ++ query hasCode bs)
let frameoptions = ["allowdisplaybreaks", "allowframebreaks", "fragile",
diff --git a/test/command/6107.md b/test/command/6107.md
new file mode 100644
index 000000000..8444172ab
--- /dev/null
+++ b/test/command/6107.md
@@ -0,0 +1,27 @@
+```
+% pandoc -t beamer
+---
+title: A silly slide
+subtitle: Look for the sequel!
+---
+
+# A circus!
+
+## Another silly title
+
+Not much to do about nothing.
+
+## Epilogue {.standout}
+^D
+\hypertarget{a-circus}{%
+\section{A circus!}\label{a-circus}}
+
+\begin{frame}{Another silly title}
+\protect\hypertarget{another-silly-title}{}
+Not much to do about nothing.
+\end{frame}
+
+\begin{frame}[standout]{Epilogue}
+\protect\hypertarget{epilogue}{}
+\end{frame}
+```