aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-11-16 19:01:53 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2019-11-16 19:01:53 -0800
commit1bf17a7c876fe5070d3bec0cc307c4d3686f3a15 (patch)
tree75ea72f67c2cb21616eeadfd663bb37058cb9994
parent0cea8df8ac1b1e76ad88c31813ba792053265627 (diff)
downloadpandoc-1bf17a7c876fe5070d3bec0cc307c4d3686f3a15.tar.gz
Ms writer: boldface definition terms in DefinitionLists.
Like LaTeX, ConTeXt.
-rw-r--r--src/Text/Pandoc/Writers/Ms.hs3
-rw-r--r--test/writer.ms34
2 files changed, 19 insertions, 18 deletions
diff --git a/src/Text/Pandoc/Writers/Ms.hs b/src/Text/Pandoc/Writers/Ms.hs
index 7e0a58134..b3f4fa1a0 100644
--- a/src/Text/Pandoc/Writers/Ms.hs
+++ b/src/Text/Pandoc/Writers/Ms.hs
@@ -308,7 +308,8 @@ definitionListItemToMs :: PandocMonad m
-> ([Inline],[[Block]])
-> MS m (Doc Text)
definitionListItemToMs opts (label, defs) = do
- labelText <- inlineListToMs' opts $ map breakToSpace label
+ labelText <- withFontFeature 'B' $
+ inlineListToMs' opts $ map breakToSpace label
contents <- if null defs
then return empty
else liftM vcat $ forM defs $ \blocks -> do
diff --git a/test/writer.ms b/test/writer.ms
index b589011b8..3c51aaf0d 100644
--- a/test/writer.ms
+++ b/test/writer.ms
@@ -445,55 +445,55 @@ Definition Lists
.pdfhref M "definition-lists"
.LP
Tight using spaces:
-.IP "apple"
+.IP "\f[B]apple\f[R]"
red fruit
.RS
.RE
-.IP "orange"
+.IP "\f[B]orange\f[R]"
orange fruit
.RS
.RE
-.IP "banana"
+.IP "\f[B]banana\f[R]"
yellow fruit
.RS
.RE
.LP
Tight using tabs:
-.IP "apple"
+.IP "\f[B]apple\f[R]"
red fruit
.RS
.RE
-.IP "orange"
+.IP "\f[B]orange\f[R]"
orange fruit
.RS
.RE
-.IP "banana"
+.IP "\f[B]banana\f[R]"
yellow fruit
.RS
.RE
.LP
Loose:
-.IP "apple"
+.IP "\f[B]apple\f[R]"
red fruit
.RS
.RE
-.IP "orange"
+.IP "\f[B]orange\f[R]"
orange fruit
.RS
.RE
-.IP "banana"
+.IP "\f[B]banana\f[R]"
yellow fruit
.RS
.RE
.LP
Multiple blocks with italics:
-.IP "\f[I]apple\f[R]"
+.IP "\f[B]\f[BI]apple\f[B]\f[R]"
red fruit
.RS
.PP
contains seeds, crisp, pleasant to taste
.RE
-.IP "\f[I]orange\f[R]"
+.IP "\f[B]\f[BI]orange\f[B]\f[R]"
orange fruit
.RS
.IP
@@ -509,14 +509,14 @@ orange block quote
.RE
.LP
Multiple definitions, tight:
-.IP "apple"
+.IP "\f[B]apple\f[R]"
red fruit
.RS
.RE
computer
.RS
.RE
-.IP "orange"
+.IP "\f[B]orange\f[R]"
orange fruit
.RS
.RE
@@ -525,14 +525,14 @@ bank
.RE
.LP
Multiple definitions, loose:
-.IP "apple"
+.IP "\f[B]apple\f[R]"
red fruit
.RS
.RE
computer
.RS
.RE
-.IP "orange"
+.IP "\f[B]orange\f[R]"
orange fruit
.RS
.RE
@@ -541,14 +541,14 @@ bank
.RE
.LP
Blank line after term, indented marker, alternate markers:
-.IP "apple"
+.IP "\f[B]apple\f[R]"
red fruit
.RS
.RE
computer
.RS
.RE
-.IP "orange"
+.IP "\f[B]orange\f[R]"
orange fruit
.RS
.IP " 1." 4