@@ -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 ->