git.iko.soy/typeable/pandoc
on master help sign in
Ms writer: use light gray for strikeout.
ed6249bJohn MacFarlane
data/templates/default.ms+2
@@ -36,6 +36,8 @@
36.nr FL \n[LL]
36.nr FL \n[LL]
37.\" footnote point size
37.\" footnote point size
38.nr FPS (\n[PS] - 2000)
38.nr FPS (\n[PS] - 2000)
39+.\" color used for strikeout
40+.defcolor strikecolor rgb 0.7 0.7 0.7
39.\" ***************************************************************
41.\" ***************************************************************
40.\" PDF metadata
42.\" PDF metadata
41.mso pdfmark.tmac
43.mso pdfmark.tmac
src/Text/Pandoc/Writers/Ms.hs+3−1
@@ -425,7 +425,9 @@ inlineToMs opts (Strong lst) =
425 withFontFeature 'B' (inlineListToMs opts lst)
425 withFontFeature 'B' (inlineListToMs opts lst)
426inlineToMs opts (Strikeout lst) = do
426inlineToMs opts (Strikeout lst) = do
427 contents <- inlineListToMs opts lst
427 contents <- inlineListToMs opts lst
428+ -- we use grey color instead of strikeout, which seems quite
429+ -- hard to do in groff for arbitrary bits of text
428− return $ text "[STRIKEOUT:" <> contents <> char ']'
430+ return $ text "\\m[strikecolor]" <> contents <> text "\\m[]"
429inlineToMs opts (Superscript lst) = do
431inlineToMs opts (Superscript lst) = do
430 contents <- inlineListToMs opts lst
432 contents <- inlineListToMs opts lst
431 return $ text "\\*{" <> contents <> text "\\*}"
433 return $ text "\\*{" <> contents <> text "\\*}"
test/writer.ms+3−1
@@ -36,6 +36,8 @@
36.nr FL \n[LL]
36.nr FL \n[LL]
37.\" footnote point size
37.\" footnote point size
38.nr FPS (\n[PS] - 2000)
38.nr FPS (\n[PS] - 2000)
39+.\" color used for strikeout
40+.defcolor strikecolor rgb 0.2 0.2 0.2
39.\" ***************************************************************
41.\" ***************************************************************
40.\" PDF metadata
42.\" PDF metadata
41.mso pdfmark.tmac
43.mso pdfmark.tmac
@@ -588,7 +590,7 @@ So is \f[B]\f[BI]this\f[B]\f[] word.
588This is code: \f[C]>\f[], \f[C]$\f[], \f[C]\\\f[], \f[C]\\$\f[],
590This is code: \f[C]>\f[], \f[C]$\f[], \f[C]\\\f[], \f[C]\\$\f[],
589\f[C]<html>\f[].
591\f[C]<html>\f[].
590.PP
592.PP
591−[STRIKEOUT:This is \f[I]strikeout\f[].]
593+\m[strikecolor]This is \f[I]strikeout\f[].\m[]
592.PP
594.PP
593Superscripts: a\*{bc\*}d a\*{\f[I]hello\f[]\*} a\*{hello\ there\*}.
595Superscripts: a\*{bc\*}d a\*{\f[I]hello\f[]\*} a\*{hello\ there\*}.
594.PP
596.PP