From 6217623d0a8538a1fe3f65264267ff0f436b3e84 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 24 Mar 2013 21:02:06 -0700 Subject: Added syntax for "pauses" in beamer or reaveljs slide shows. This gives . . . a pause. --- src/Text/Pandoc/Writers/HTML.hs | 4 ++++ src/Text/Pandoc/Writers/LaTeX.hs | 6 ++++++ 2 files changed, 10 insertions(+) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 108d5450c..cdd34deae 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -426,6 +426,10 @@ blockToHtml opts (Para [Image txt (s,'f':'i':'g':':':tit)]) = do [nl opts, img, capt, nl opts] else H.div ! A.class_ "figure" $ mconcat [nl opts, img, capt, nl opts] +-- . . . indicates a pause in a slideshow +blockToHtml opts (Para [Str ".",Space,Str ".",Space,Str "."]) + | writerSlideVariant opts == RevealJsSlides = + blockToHtml opts (RawBlock "html" "
") blockToHtml opts (Para lst) = do contents <- inlineListToHtml opts lst return $ H.p contents diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 3ab107d68..a27644943 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -293,6 +293,12 @@ blockToLaTeX (Para [Image txt (src,'f':'i':'g':':':tit)]) = do img <- inlineToLaTeX (Image txt (src,tit)) return $ "\\begin{figure}[htbp]" $$ "\\centering" $$ img $$ capt $$ "\\end{figure}" +-- . . . indicates pause in beamer slides +blockToLaTeX (Para [Str ".",Space,Str ".",Space,Str "."]) = do + beamer <- writerBeamer `fmap` gets stOptions + if beamer + then blockToLaTeX (RawBlock "latex" "\\pause") + else inlineListToLaTeX [Str ".",Space,Str ".",Space,Str "."] blockToLaTeX (Para lst) = inlineListToLaTeX $ dropWhile isLineBreakOrSpace lst blockToLaTeX (BlockQuote lst) = do -- cgit v1.2.3