aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index f61c878e5..58a4c4d86 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -411,15 +411,15 @@ elementToBeamer slideLevel (Sec lvl _num (ident,classes,kvs) tit elts)
slideTitle <-
if tit == [Str "\0"] -- marker for hrule
then return []
- else
- if null ident
- then return $ latex "{" : tit ++ [latex "}"]
- else do
- ref <- toLabel ident
- return $ latex ("{%\n\\protect\\hypertarget{" ++
- ref ++ "}{%\n") : tit ++ [latex "}}"]
+ else return $ latex "{" : tit ++ [latex "}"]
+ ref <- toLabel ident
+ let slideAnchor = if null ident
+ then []
+ else [latex ("\n\\protect\\hypertarget{" ++
+ ref ++ "}{}")]
let slideStart = Para $
- RawInline "latex" ("\\begin{frame}" ++ options) : slideTitle
+ RawInline "latex" ("\\begin{frame}" ++ options) :
+ slideTitle ++ slideAnchor
let slideEnd = RawBlock "latex" "\\end{frame}"
-- now carve up slide into blocks if there are sections inside
bs <- concat `fmap` mapM (elementToBeamer slideLevel) elts