git.iko.soy/typeable/pandoc
on master help sign in
Added `--epub-subdirectory` option.

This specifies the subdirectory in the OCF container that holds the EPUB specific content. Closes #3720.

commit24d215acf584a52ad3ea3a9a3f97c751d26e08a4 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 22 Jun 2017, 12:01 (9 years ago) parent379b99f
2 files changed+16
MANUAL.txt+6 src/Text/Pandoc/App.hs+10
MANUAL.txt+6
@@ -977,6 +977,12 @@ Options affecting specific writers
977977 documents with few level 1 headers, one might want to use a chapter
978978 level of 2 or 3.
979979
980+`--epub-subdirectory=`*DIRNAME*
981+
982+: Specify the subdirectory in the OCF container that is to hold
983+ the EPUB-specific contents. The default is `EPUB`. To put
984+ the EPUB contents in the top level, use an empty string.
985+
980986`--latex-engine=pdflatex`|`lualatex`|`xelatex`
981987
982988: Use the specified LaTeX engine when producing PDF output.
src/Text/Pandoc/App.hs+10
@@ -355,6 +355,7 @@ convertWithOpts opts = do
355355 writerSlideLevel = optSlideLevel opts,
356356 writerHighlightStyle = highlightStyle,
357357 writerSetextHeaders = optSetextHeaders opts,
358+ writerEpubSubdirectory = optEpubSubdirectory opts,
358359 writerEpubMetadata = epubMetadata,
359360 writerEpubFonts = optEpubFonts opts,
360361 writerEpubChapterLevel = optEpubChapterLevel opts,
@@ -553,6 +554,7 @@ data Opt = Opt
553554 , optHTMLMathMethod :: HTMLMathMethod -- ^ Method to print HTML math
554555 , optAbbreviations :: Maybe FilePath -- ^ Path to abbrevs file
555556 , optReferenceDoc :: Maybe FilePath -- ^ Path of reference doc
557+ , optEpubSubdirectory :: String -- ^ EPUB subdir in OCF container
556558 , optEpubMetadata :: Maybe FilePath -- ^ EPUB metadata
557559 , optEpubFonts :: [FilePath] -- ^ EPUB fonts to embed
558560 , optEpubChapterLevel :: Int -- ^ Header level at which to split chapters
@@ -628,6 +630,7 @@ defaultOpts = Opt
628630 , optHTMLMathMethod = PlainMath
629631 , optAbbreviations = Nothing
630632 , optReferenceDoc = Nothing
633+ , optEpubSubdirectory = "EPUB"
631634 , optEpubMetadata = Nothing
632635 , optEpubFonts = []
633636 , optEpubChapterLevel = 1
@@ -1243,6 +1246,13 @@ options =
12431246 "FILE")
12441247 "" -- "Path of custom reference doc"
12451248
1249+ , Option "" ["epub-subdirectory"]
1250+ (ReqArg
1251+ (\arg opt ->
1252+ return opt { optEpubSubdirectory = arg })
1253+ "DIRNAME")
1254+ "" -- "Name of subdirectory for epub content in OCF container"
1255+
12461256 , Option "" ["epub-cover-image"]
12471257 (ReqArg
12481258 (\arg opt ->