@@ -902,13 +902,6 @@ main = do
902 (\_ -> throwIO e)
902 (\_ -> throwIO e)
903 else throwIO e)
903 else throwIO e)
905− let slideVariant = case writerName' of
907− "slidy" -> SlidySlides
908− "slideous" -> SlideousSlides
909− "dzslides" -> DZSlides
912 variables' <- case mathMethod of
905 variables' <- case mathMethod of
913 LaTeXMathML Nothing -> do
906 LaTeXMathML Nothing -> do
914 s <- readDataFile datadir $ "data" </> "LaTeXMathML.js"
907 s <- readDataFile datadir $ "data" </> "LaTeXMathML.js"
@@ -918,8 +911,8 @@ main = do
918 return $ ("mathml-script", s) : variables
911 return $ ("mathml-script", s) : variables
919 _ -> return variables
912 _ -> return variables
921− variables'' <- case slideVariant of
914+ variables'' <- case writerName' of
922− DZSlides -> do
915+ "dzslides" -> do
923 dztempl <- readDataFile datadir $ "dzslides" </> "template.html"
916 dztempl <- readDataFile datadir $ "dzslides" </> "template.html"
924 let dzcore = unlines $ dropWhile (not . isPrefixOf "<!-- {{{{ dzslides core")
917 let dzcore = unlines $ dropWhile (not . isPrefixOf "<!-- {{{{ dzslides core")
925 $ lines dztempl
918 $ lines dztempl
@@ -939,8 +932,7 @@ main = do
940 else takeDirectory (head sources)
933 else takeDirectory (head sources)
942− let startParserState =
935+ let startParserState = def{ stateParseRaw = parseRaw,
943− defaultParserState { stateParseRaw = parseRaw,
944 stateTabStop = tabStop,
936 stateTabStop = tabStop,
945 stateLiterateHaskell = "+lhs" `isSuffixOf` readerName' ||
937 stateLiterateHaskell = "+lhs" `isSuffixOf` readerName' ||
946 lhsExtension sources,
938 lhsExtension sources,
@@ -955,44 +947,41 @@ main = do
955 stateApplyMacros = not laTeXOutput
947 stateApplyMacros = not laTeXOutput
958− let writerOptions = defaultWriterOptions
959− { writerStandalone = standalone',
950+ let writerOptions = def { writerStandalone = standalone',
960− writerTemplate = templ,
951+ writerTemplate = templ,
961− writerVariables = variables'',
952+ writerVariables = variables'',
962− writerEPUBMetadata = epubMetadata,
953+ writerEPUBMetadata = epubMetadata,
963− writerTabStop = tabStop,
954+ writerTabStop = tabStop,
964− writerTableOfContents = toc &&
955+ writerTableOfContents = toc &&
965− writerName' /= "s5",
956+ writerName' /= "s5",
966− writerHTMLMathMethod = mathMethod,
957+ writerHTMLMathMethod = mathMethod,
967− writerSlideVariant = slideVariant,
968− writerIncremental = incremental,
958+ writerIncremental = incremental,
969− writerCiteMethod = citeMethod,
959+ writerCiteMethod = citeMethod,
970− writerBiblioFiles = reffiles,
960+ writerBiblioFiles = reffiles,
971− writerIgnoreNotes = False,
961+ writerIgnoreNotes = False,
972− writerNumberSections = numberSections,
962+ writerNumberSections = numberSections,
973− writerSectionDivs = sectionDivs,
963+ writerSectionDivs = sectionDivs,
974− writerStrictMarkdown = strict,
964+ writerStrictMarkdown = strict,
975− writerReferenceLinks = referenceLinks,
965+ writerReferenceLinks = referenceLinks,
976− writerWrapText = wrap,
966+ writerWrapText = wrap,
977− writerColumns = columns,
967+ writerColumns = columns,
978− writerLiterateHaskell = False,
968+ writerLiterateHaskell = False,
979− writerEmailObfuscation = if strict
969+ writerEmailObfuscation = if strict
980− then ReferenceObfuscation
970+ then ReferenceObfuscation
981− else obfuscationMethod,
971+ else obfuscationMethod,
982− writerIdentifierPrefix = idPrefix,
972+ writerIdentifierPrefix = idPrefix,
983− writerSourceDirectory = sourceDir,
973+ writerSourceDirectory = sourceDir,
984− writerUserDataDir = datadir,
974+ writerUserDataDir = datadir,
985− writerHtml5 = html5 ||
975+ writerHtml5 = html5,
986− slideVariant == DZSlides,
987− writerChapters = chapters,
976+ writerChapters = chapters,
988− writerListings = listings,
977+ writerListings = listings,
989− writerBeamer = False,
978+ writerBeamer = False,
990− writerSlideLevel = slideLevel,
979+ writerSlideLevel = slideLevel,
991− writerHighlight = highlight,
980+ writerHighlight = highlight,
992− writerHighlightStyle = highlightStyle,
981+ writerHighlightStyle = highlightStyle,
993− writerSetextHeaders = setextHeaders,
982+ writerSetextHeaders = setextHeaders,
994− writerTeXLigatures = texLigatures
983+ writerTeXLigatures = texLigatures
997 when (writerName' `elem` nonTextFormats&& outputFile == "-") $
986 when (writerName' `elem` nonTextFormats&& outputFile == "-") $
998 err 5 $ "Cannot write " ++ writerName' ++ " output to stdout.\n" ++
987 err 5 $ "Cannot write " ++ writerName' ++ " output to stdout.\n" ++