summaryrefslogtreecommitdiff
path: root/pandoc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-12-10 10:39:44 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-01-25 17:07:41 +0100
commitce1664cf2ba29c8b973d7a228744b43144c0859d (patch)
tree650c44c6476d64326b568e16c6238b9f5e7e5de6 /pandoc.hs
parent9570f59066c1e89500fcd8ab6ac6a401159ece27 (diff)
Simplified reference-docx/reference-odt to reference-doc.
* Text.Pandoc.Options.WriterOptions: removed writerReferenceDocx and writerReferenceODT, replaced them with writerReferenceDoc. This can hold either an ODT or a Docx. In this way, writerReferenceDoc is like writerTemplate, which can hold templates of different formats. [API change] * Removed `--reference-docx` and `--reference-odt` options. * Added `--reference-doc` option.
Diffstat (limited to 'pandoc.hs')
-rw-r--r--pandoc.hs25
1 files changed, 7 insertions, 18 deletions
diff --git a/pandoc.hs b/pandoc.hs
index f1a9aac05..f5d5e0da6 100644
--- a/pandoc.hs
+++ b/pandoc.hs
@@ -185,8 +185,7 @@ data Opt = Opt
, optHighlightStyle :: Style -- ^ Style to use for highlighted code
, optTopLevelDivision :: TopLevelDivision -- ^ Type of the top-level divisions
, optHTMLMathMethod :: HTMLMathMethod -- ^ Method to print HTML math
- , optReferenceODT :: Maybe FilePath -- ^ Path of reference.odt
- , optReferenceDocx :: Maybe FilePath -- ^ Path of reference.docx
+ , optReferenceDoc :: Maybe FilePath -- ^ Path of reference doc
, optEpubStylesheet :: Maybe String -- ^ EPUB stylesheet
, optEpubMetadata :: String -- ^ EPUB metadata
, optEpubFonts :: [FilePath] -- ^ EPUB fonts to embed
@@ -252,8 +251,7 @@ defaultOpts = Opt
, optHighlightStyle = pygments
, optTopLevelDivision = TopLevelDefault
, optHTMLMathMethod = PlainMath
- , optReferenceODT = Nothing
- , optReferenceDocx = Nothing
+ , optReferenceDoc = Nothing
, optEpubStylesheet = Nothing
, optEpubMetadata = ""
, optEpubFonts = []
@@ -708,19 +706,12 @@ options =
"URL")
"" -- "Link to CSS style sheet"
- , Option "" ["reference-odt"]
+ , Option "" ["reference-doc"]
(ReqArg
(\arg opt ->
- return opt { optReferenceODT = Just arg })
+ return opt { optReferenceDoc = Just arg })
"FILENAME")
- "" -- "Path of custom reference.odt"
-
- , Option "" ["reference-docx"]
- (ReqArg
- (\arg opt ->
- return opt { optReferenceDocx = Just arg })
- "FILENAME")
- "" -- "Path of custom reference.docx"
+ "" -- "Path of custom reference doc"
, Option "" ["epub-stylesheet"]
(ReqArg
@@ -1190,8 +1181,7 @@ convertWithOpts opts args = do
, optHighlightStyle = highlightStyle
, optTopLevelDivision = topLevelDivision
, optHTMLMathMethod = mathMethod'
- , optReferenceODT = referenceODT
- , optReferenceDocx = referenceDocx
+ , optReferenceDoc = referenceDoc
, optEpubStylesheet = epubStylesheet
, optEpubMetadata = epubMetadata
, optEpubFonts = epubFonts
@@ -1485,8 +1475,7 @@ convertWithOpts opts args = do
writerEpubFonts = epubFonts,
writerEpubChapterLevel = epubChapterLevel,
writerTOCDepth = epubTOCDepth,
- writerReferenceODT = referenceODT,
- writerReferenceDocx = referenceDocx,
+ writerReferenceDoc = referenceDoc,
writerMediaBag = media,
writerVerbose = verbose,
writerLaTeXArgs = latexEngineArgs