@@ -83,13 +83,14 @@ pandocToRST (Pandoc meta blocks) = do
8383 let render' :: Doc -> Text
8484 render' = render colwidth
8585 let subtit = case lookupMeta "subtitle" meta of
86− Just (MetaBlocks [Plain xs]) -> xs
87− _ -> []
86+ Just (MetaBlocks [Plain xs]) -> xs
87+ Just (MetaInlines xs) -> xs
88+ _ -> []
8889 title <- titleToRST (docTitle meta) subtit
8990 metadata <- metaToJSON opts
9091 (fmap render' . blockListToRST)
9192 (fmap (stripEnd . render') . inlineListToRST)
92− $ B.deleteMeta "title" $ B.deleteMeta "subtitle" meta
93+ meta
9394 body <- blockListToRST' True $ case writerTemplate opts of
9495 Just _ -> normalizeHeadings 1 blocks
9596 Nothing -> blocks
@@ -105,7 +106,7 @@ pandocToRST (Pandoc meta blocks) = do
105106 $ defField "toc-depth" (show $ writerTOCDepth opts)
106107 $ defField "number-sections" (writerNumberSections opts)
107108 $ defField "math" hasMath
108− $ defField "title" (render Nothing title :: String)
109+ $ defField "titleblock" (render Nothing title :: String)
109110 $ defField "math" hasMath
110111 $ defField "rawtex" rawTeX metadata
111112 case writerTemplate opts of