diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-02-03 08:52:07 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-02-03 08:52:07 -0800 |
commit | d9b1776336db06306562c4b5648716196261b548 (patch) | |
tree | a16cf7242856670c1689b069a81089dc0021d259 | |
parent | 6371ec241d63e0faf3a181aa4b08fb32ebb2eff1 (diff) | |
download | pandoc-d9b1776336db06306562c4b5648716196261b548.tar.gz |
Fix duplicate frame classes in LaTeX/Beamer output.
Close #6107.
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 4 | ||||
-rw-r--r-- | test/command/6107.md | 27 |
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} +``` |