From dcf080aa0e011de37a154e9e8a97dd7546a4a1b1 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 10 Mar 2013 16:58:01 +0000 Subject: Add \s for 'strong' text, i.e. bold rather than italics. I've missed this a couple of times in Halibut markup recently (in particular, it's handy to have a typographical distinction between 'this term is emphasised because it's new' and 'this term is emphasised because I want you to pay attention to it'), so here's an implementation, basically parallel to \e. One slight oddity is that strong text in headings will not be distinguished in some output formats, since they already use bolded text for their headings. [originally from svn r9772] --- bk_man.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bk_man.c') diff --git a/bk_man.c b/bk_man.c index 44f159f..45eb511 100644 --- a/bk_man.c +++ b/bk_man.c @@ -590,14 +590,17 @@ static int man_rdaddwc(rdstringc *rs, word *text, word *end, case word_Normal: case word_Emph: + case word_Strong: case word_Code: case word_WeakCode: case word_WhiteSpace: case word_EmphSpace: + case word_StrongSpace: case word_CodeSpace: case word_WkCodeSpace: case word_Quote: case word_EmphQuote: + case word_StrongQuote: case word_CodeQuote: case word_WkCodeQuote: assert(text->type != word_CodeQuote && @@ -607,6 +610,10 @@ static int man_rdaddwc(rdstringc *rs, word *text, word *end, (attraux(text->aux) == attr_First || attraux(text->aux) == attr_Only)) { quote_props = man_rdaddctrl(rs, "\\fI", quote_props, conf, state); + } else if (towordstyle(text->type) == word_Strong && + (attraux(text->aux) == attr_First || + attraux(text->aux) == attr_Only)) { + quote_props = man_rdaddctrl(rs, "\\fB", quote_props, conf, state); } else if ((towordstyle(text->type) == word_Code || towordstyle(text->type) == word_WeakCode) && (attraux(text->aux) == attr_First || -- cgit v1.1