From d9b1776336db06306562c4b5648716196261b548 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 3 Feb 2020 08:52:07 -0800 Subject: Fix duplicate frame classes in LaTeX/Beamer output. Close #6107. --- src/Text/Pandoc/Writers/LaTeX.hs | 4 ++-- test/command/6107.md | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 test/command/6107.md 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} +``` -- cgit v1.2.3