diff --git a/data/templates/default.ms b/data/templates/default.ms index acffb5f6a..f8175e97d 100644 --- a/data/templates/default.ms +++ b/data/templates/default.ms @@ -36,6 +36,8 @@ .nr FL \n[LL] .\" footnote point size .nr FPS (\n[PS] - 2000) +.\" color used for strikeout +.defcolor strikecolor rgb 0.7 0.7 0.7 .\" *************************************************************** .\" PDF metadata .mso pdfmark.tmac diff --git a/src/Text/Pandoc/Writers/Ms.hs b/src/Text/Pandoc/Writers/Ms.hs index 7d0c278a6..d5f323b5e 100644 --- a/src/Text/Pandoc/Writers/Ms.hs +++ b/src/Text/Pandoc/Writers/Ms.hs @@ -425,7 +425,9 @@ inlineToMs opts (Strong lst) = withFontFeature 'B' (inlineListToMs opts lst) inlineToMs opts (Strikeout lst) = do contents <- inlineListToMs opts lst - return $ text "[STRIKEOUT:" <> contents <> char ']' + -- we use grey color instead of strikeout, which seems quite + -- hard to do in groff for arbitrary bits of text + return $ text "\\m[strikecolor]" <> contents <> text "\\m[]" inlineToMs opts (Superscript lst) = do contents <- inlineListToMs opts lst return $ text "\\*{" <> contents <> text "\\*}" diff --git a/test/writer.ms b/test/writer.ms index 03512cbb4..0ce199fba 100644 --- a/test/writer.ms +++ b/test/writer.ms @@ -36,6 +36,8 @@ .nr FL \n[LL] .\" footnote point size .nr FPS (\n[PS] - 2000) +.\" color used for strikeout +.defcolor strikecolor rgb 0.2 0.2 0.2 .\" *************************************************************** .\" PDF metadata .mso pdfmark.tmac @@ -588,7 +590,7 @@ So is \f[B]\f[BI]this\f[B]\f[] word. This is code: \f[C]>\f[], \f[C]$\f[], \f[C]\\\f[], \f[C]\\$\f[], \f[C]<html>\f[]. .PP -[STRIKEOUT:This is \f[I]strikeout\f[].] +\m[strikecolor]This is \f[I]strikeout\f[].\m[] .PP Superscripts: a\*{bc\*}d a\*{\f[I]hello\f[]\*} a\*{hello\ there\*}. .PP