From 9be9bccfcfc2c46459b3da963bc59a37f841fe8a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 15 Jul 2010 19:01:00 -0700 Subject: Added --section-divs option. + Header identifiers now get attached to the headers, unless --section-divs is specified, in which case they are added to enclosing divs. By default, the divs are not added. + Resolves Issue #230, #239. --- src/pandoc.hs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/pandoc.hs') diff --git a/src/pandoc.hs b/src/pandoc.hs index 9546d6026..cd4d65aa5 100644 --- a/src/pandoc.hs +++ b/src/pandoc.hs @@ -142,6 +142,7 @@ data Opt = Opt , optVariables :: [(String,String)] -- ^ Template variables to set , optOutputFile :: String -- ^ Name of output file , optNumberSections :: Bool -- ^ Number sections in LaTeX + , optSectionDivs :: Bool -- ^ Put sections in div tags in HTML , optIncremental :: Bool -- ^ Use incremental lists in Slidy/S5 , optXeTeX :: Bool -- ^ Format latex for xetex , optSmart :: Bool -- ^ Use smart typography @@ -182,6 +183,7 @@ defaultOpts = Opt , optVariables = [] , optOutputFile = "-" -- "-" means stdout , optNumberSections = False + , optSectionDivs = False , optIncremental = False , optXeTeX = False , optSmart = False @@ -325,6 +327,11 @@ options = (\opt -> return opt { optNumberSections = True })) "" -- "Number sections in LaTeX" + , Option "" ["section-divs"] + (NoArg + (\opt -> return opt { optSectionDivs = True })) + "" -- "Put sections in div tags in HTML" + , Option "" ["no-wrap"] (NoArg (\opt -> return opt { optWrapText = False })) @@ -643,6 +650,7 @@ main = do , optTemplate = template , optOutputFile = outputFile , optNumberSections = numberSections + , optSectionDivs = sectionDivs , optIncremental = incremental , optXeTeX = xetex , optSmart = smart @@ -782,6 +790,7 @@ main = do writerXeTeX = xetex, writerIgnoreNotes = False, writerNumberSections = numberSections, + writerSectionDivs = sectionDivs, writerStrictMarkdown = strict, writerReferenceLinks = referenceLinks, writerWrapText = wrap, -- cgit v1.2.3