diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-03-13 10:02:08 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-03-13 10:03:51 -0700 |
commit | 17725a0661dabd8d8b9203adbe08fe9e4c6780fe (patch) | |
tree | d710a78941784ec8294e90a75953b48e121601d2 /src/Text/Pandoc | |
parent | f921b388699dc870d5190c55904d9732e9770874 (diff) | |
download | pandoc-17725a0661dabd8d8b9203adbe08fe9e4c6780fe.tar.gz |
Beamer: put hyperlink after `\begin{frame}`.
and not in the title. If it's in the title, then we get
a titlebar on slides with the `plain` attribute, when
the id is non-null. This fixes a regression from 1.9.x.
Closes #4307.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 16 |
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 |