diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-07-18 23:05:48 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-07-18 23:06:22 -0700 |
commit | 465a4a66993eba9017faa950a9737ae1c5f68786 (patch) | |
tree | 59a185c0ff3b69c99e6578fa89240d39354f7fe6 | |
parent | 88281fa2ea323392a5400e706ad49de62964bf97 (diff) | |
download | pandoc-465a4a66993eba9017faa950a9737ae1c5f68786.tar.gz |
Slidy writer: create new slide at every level 1 header.
-rw-r--r-- | README | 8 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 5 |
2 files changed, 7 insertions, 6 deletions
@@ -1349,11 +1349,9 @@ directory. Using Slidy ----------- -If you use Slidy, things work a bit differently. Instead of -automatically chopping the document into sections on the level-1 -headers, you can choose how to segment the document into slides -yourself. Just insert a horizontal rule at each slide boundary. -For example: +If you use Slidy, things work a bit differently. As with S5, a new slide +will be created at every level 1 header. But you can also force a new +slide by inserting a horizontal rule. For example: % Eating Habits % John Doe diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index a0366006d..98e3045d3 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -105,8 +105,11 @@ pandocToHtml opts (Pandoc (Meta title' authors' date') blocks) = do toc <- if writerTableOfContents opts then tableOfContents opts sects else return Nothing - let cutUp (HorizontalRule : xs) = RawHtml "</div>\n<div class=\"slide\">\n" : + let cutUp (HorizontalRule : Header 1 ys : xs) = cutUp (Header 1 ys : xs) + cutUp (HorizontalRule : xs) = RawHtml "</div>\n<div class=\"slide\">\n" : cutUp xs + cutUp (Header 1 ys : xs) = RawHtml ("</div>\n<div class=\"slide title\">\n") : + Header 1 ys : cutUp xs cutUp (x:xs) = x : cutUp xs cutUp [] = [] blocks' <- liftM toHtmlFromList $ |