diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-03-07 21:54:29 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-03-07 21:54:29 -0800 |
commit | 87875763c8ea81c07ad01972e3740c3f3cdbd0c0 (patch) | |
tree | e14f4497756f4fb930903a5392e17d3a55f9ea09 /src/Text/Pandoc/Writers | |
parent | 2ab83a56e60227339c8c0064988d1264606bfed0 (diff) | |
download | pandoc-87875763c8ea81c07ad01972e3740c3f3cdbd0c0.tar.gz |
Ms writer: fix definition lists so indent even when...
paragraph indent is set to 0 (as is the default).
Also ensure indent for display math that falls back
to TeX.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/Ms.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Ms.hs b/src/Text/Pandoc/Writers/Ms.hs index 42d6b932b..662d46618 100644 --- a/src/Text/Pandoc/Writers/Ms.hs +++ b/src/Text/Pandoc/Writers/Ms.hs @@ -321,8 +321,9 @@ definitionListItemToMs opts (label, defs) = do rest' <- liftM vcat $ mapM (\item -> blockToMs opts item) rest first' <- blockToMs opts first - return $ first' $$ literal ".RS" $$ rest' $$ literal ".RE" - return $ nowrap (literal ".IP " <> doubleQuotes labelText) $$ contents + return $ first' $$ literal ".RS 3" $$ rest' $$ literal ".RE" + return $ nowrap (literal ".IP " <> doubleQuotes labelText <> " 3") $$ + contents -- | Convert list of Pandoc block elements to ms. blockListToMs :: PandocMonad m @@ -400,7 +401,7 @@ inlineToMs opts (Math DisplayMath str) = do case res of Left il -> do contents <- inlineToMs opts il - return $ cr <> literal ".RS" $$ contents $$ literal ".RE" + return $ cr <> literal ".RS 3" $$ contents $$ literal ".RE" Right r -> return $ cr <> literal ".EQ" $$ literal r $$ literal ".EN" <> cr inlineToMs _ il@(RawInline f str) |