From 4f43a1d250287e8d89ee5cd3c8b020ea6fe83758 Mon Sep 17 00:00:00 2001 From: stalmon <35015406+stalmon@users.noreply.github.com> Date: Tue, 2 Jan 2018 01:14:36 +0100 Subject: Removed redundant subtitle in title subtitle is allready used to create a subtitle for the document appending the subtitle to the main title leads to double subtitle in the document --- src/Text/Pandoc/Writers/Docx.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index e4240ca4f..88caccdf7 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -763,9 +763,7 @@ makeTOC _ = return [] -- OpenXML elements (the main document and footnotes). writeOpenXML :: (PandocMonad m) => WriterOptions -> Pandoc -> WS m ([Element], [Element],[Element]) writeOpenXML opts (Pandoc meta blocks) = do - let tit = docTitle meta ++ case lookupMeta "subtitle" meta of - Just (MetaBlocks [Plain xs]) -> LineBreak : xs - _ -> [] + let tit = docTitle meta let auths = docAuthors meta let dat = docDate meta let abstract' = case lookupMeta "abstract" meta of -- cgit v1.2.3 From 053a1dcd102c5198267734ce140fff3aa9c08bac Mon Sep 17 00:00:00 2001 From: Sebastian Talmon <35015406+stalmon@users.noreply.github.com> Date: Tue, 2 Jan 2018 09:43:04 +0100 Subject: firstRow table definition compatibility for Word 2016 Word 2016 seems to use a default value of "1" for table headers, if there is no firstRow definition (although a default value of 0 is documented), so all tables get the first Row formatted as header. Setting the parameter to 0 if the table has no header row fixes this for Word 2016 --- src/Text/Pandoc/Writers/Docx.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 88caccdf7..ac8bef003 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -981,7 +981,7 @@ blockToOpenXML' opts (Table caption aligns widths headers rows) = do ( mknode "w:tblPr" [] ( mknode "w:tblStyle" [("w:val","Table")] () : mknode "w:tblW" [("w:type", "pct"), ("w:w", show rowwidth)] () : - mknode "w:tblLook" [("w:firstRow","1") | hasHeader ] () : + mknode "w:tblLook" [("w:firstRow",if hasHeader then "1" else "0") ] () : [ mknode "w:tblCaption" [("w:val", captionStr)] () | not (null caption) ] ) : mknode "w:tblGrid" [] -- cgit v1.2.3