diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-03-24 21:02:06 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-03-24 21:03:04 -0700 |
commit | 6217623d0a8538a1fe3f65264267ff0f436b3e84 (patch) | |
tree | 665d5c786bb6a6f5de94ba102ceb060f00d6f0af /src/Text | |
parent | f2f3c3301f0c78ad5e9038f2f32441a03c317579 (diff) | |
download | pandoc-6217623d0a8538a1fe3f65264267ff0f436b3e84.tar.gz |
Added syntax for "pauses" in beamer or reaveljs slide shows.
This gives
. . .
a pause.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 4 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 6 |
2 files changed, 10 insertions, 0 deletions
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" "<div class=\"fragment\" />") 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 |