aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-01-05 12:03:05 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-01-05 12:03:05 -0800
commitc45ae571ccee3cd0e6aa11b3b43e8eaf6315386b (patch)
tree2481a6fb9c98a08f715300b34f5bfab1a24a579f /src/Text
parent2e0894554ce591488b7e0aebfaecf1fd7dc83c10 (diff)
downloadpandoc-c45ae571ccee3cd0e6aa11b3b43e8eaf6315386b.tar.gz
Changed --toc-level to --toc-depth.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Options.hs4
-rw-r--r--src/Text/Pandoc/Writers/EPUB.hs2
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs2
-rw-r--r--src/Text/Pandoc/Writers/RST.hs2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Options.hs b/src/Text/Pandoc/Options.hs
index e51d7d3f6..d0801da3f 100644
--- a/src/Text/Pandoc/Options.hs
+++ b/src/Text/Pandoc/Options.hs
@@ -238,7 +238,7 @@ data WriterOptions = WriterOptions
, writerEpubStylesheet :: Maybe String -- ^ EPUB stylesheet specified at command line
, writerEpubFonts :: [FilePath] -- ^ Paths to fonts to embed
, writerEpubChapterLevel :: Int -- ^ Header level for chapters (separate files)
- , writerTOCLevel :: Int -- ^ Number of levels to include in TOC
+ , writerTOCDepth :: Int -- ^ Number of levels to include in TOC
, writerReferenceODT :: Maybe FilePath -- ^ Path to reference ODT if specified
, writerReferenceDocx :: Maybe FilePath -- ^ Ptah to reference DOCX if specified
} deriving Show
@@ -278,7 +278,7 @@ instance Default WriterOptions where
, writerEpubStylesheet = Nothing
, writerEpubFonts = []
, writerEpubChapterLevel = 1
- , writerTOCLevel = 3
+ , writerTOCDepth = 3
, writerReferenceODT = Nothing
, writerReferenceDocx = Nothing
}
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs
index 9e97effeb..fc4df02b7 100644
--- a/src/Text/Pandoc/Writers/EPUB.hs
+++ b/src/Text/Pandoc/Writers/EPUB.hs
@@ -229,7 +229,7 @@ writeEPUB version opts doc@(Pandoc meta _) = do
-- toc.ncx
let secs = hierarchicalize blocks''
- let tocLevel = writerTOCLevel opts
+ let tocLevel = writerTOCDepth opts
let navPointNode :: (Int -> String -> String -> [Element] -> Element)
-> Shared.Element -> State Int Element
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index f93c168b7..0d4e37589 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -131,7 +131,7 @@ pandocToLaTeX options (Pandoc (Meta title authors date) blocks) = do
_ -> []
context = writerVariables options ++
[ ("toc", if writerTableOfContents options then "yes" else "")
- , ("toc-level", show (writerTOCLevel options -
+ , ("toc-depth", show (writerTOCDepth options -
if writerChapters options
then 1
else 0))
diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs
index ac4165116..a415c2de4 100644
--- a/src/Text/Pandoc/Writers/RST.hs
+++ b/src/Text/Pandoc/Writers/RST.hs
@@ -81,7 +81,7 @@ pandocToRST (Pandoc (Meta tit auth dat) blocks) = do
, ("title", render Nothing title)
, ("date", render colwidth date)
, ("toc", if writerTableOfContents opts then "yes" else "")
- , ("toc-level", show (writerTOCLevel opts)) ] ++
+ , ("toc-depth", show (writerTOCDepth opts)) ] ++
[ ("math", "yes") | hasMath ] ++
[ ("author", render colwidth a) | a <- authors ]
if writerStandalone opts