From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from a.mail.sonic.net (a.mail.sonic.net [64.142.16.245]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id qBL0ULkS022241 for ; Thu, 20 Dec 2012 19:30:21 -0500 (EST) Received: from [10.0.1.3] ([66.201.46.179]) (authenticated bits=0) by a.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id qBL0UFJh017103 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Thu, 20 Dec 2012 16:30:15 -0800 From: Guy Harris Content-Type: multipart/mixed; boundary="Apple-Mail=_F57D5C39-0112-46FB-8459-27D339047D20" Subject: Is there any reason not to use for items emphasized with .Em? Message-Id: Date: Thu, 20 Dec 2012 16:30:13 -0800 To: tech@mdocml.bsd.lv X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) X-Mailer: Apple Mail (2.1499) --Apple-Mail=_F57D5C39-0112-46FB-8459-27D339047D20 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii .Em is documented in the groff_mdoc man page as Emphasis Macro Text may be stressed or emphasized with the `.Em' macro. The usual = font for emphasis is italic. That sounds like the HTML tag - the HTML 4.01 spec says EM: Indicates emphasis. ... The presentation of phrase elements depends on the user agent. = Generally, visual user agents present EM text in italics and STRONG text = in bold font. Speech synthesizer user agents may change the synthesis = parameters, such as volume, pitch and rate accordingly. Is there any reason not to use that tag for text emphasized with .Em? If not, see the attached patch. (BTW, is there anonymous CVS access to the source repository? I got the = top-of-trunk source with a pile of curl calls from the cvsweb site, but = that's kind of a pain.) --Apple-Mail=_F57D5C39-0112-46FB-8459-27D339047D20 Content-Disposition: attachment; filename=patch Content-Type: application/octet-stream; name="patch" Content-Transfer-Encoding: 7bit --- example.style.css.dist 2012-12-18 19:40:25.000000000 -0800 +++ example.style.css 2012-12-20 16:25:33.000000000 -0800 @@ -30,7 +30,7 @@ div.mandoc i { } /* Italic: BI, IB, I, (implicit). */ div.mandoc b { } /* Bold: SB, BI, IB, BR, RB, B, (implicit). */ div.mandoc small { } /* Small: SB, SM. */ -div.mandoc .emph { font-style: italic; font-weight: normal; } /* Emphasis: Em, Bl -emphasis. */ +div.mandoc em { font-style: italic; font-weight: normal; } /* Emphasis: Em, Bl -emphasis. */ div.mandoc .symb { font-style: normal; font-weight: bold; } /* Symbolic: Sy, Ms, Bf -symbolic. */ div.mandoc .lit { font-style: normal; font-weight: normal; font-family: monospace; } /* Literal: Dl, Li, Ql, Bf -literal, Bl -literal, Bl -unfilled. */ div.mandoc i.addr { font-weight: normal; } /* Address (Ad). */ --- html.c.dist 2012-12-18 19:40:27.000000000 -0800 +++ html.c 2012-12-20 14:40:51.000000000 -0800 @@ -75,6 +75,7 @@ {"i", 0 }, /* TAG_I */ {"code", 0 }, /* TAG_CODE */ {"small", 0 }, /* TAG_SMALL */ + {"em", 0 }, /* TAG_EM */ }; static const char *const htmlattrs[ATTR_MAX] = { --- html.h.dist 2012-12-18 19:40:27.000000000 -0800 +++ html.h 2012-12-20 14:41:05.000000000 -0800 @@ -50,6 +50,7 @@ TAG_I, TAG_CODE, TAG_SMALL, + TAG_EM, TAG_MAX }; --- mdoc_html.c.dist 2012-12-18 19:40:51.000000000 -0800 +++ mdoc_html.c 2012-12-20 16:26:52.000000000 -0800 @@ -1112,10 +1112,7 @@ static int mdoc_em_pre(MDOC_ARGS) { - struct htmlpair tag; - - PAIR_CLASS_INIT(&tag, "emph"); - print_otag(h, TAG_SPAN, 1, &tag); + print_otag(h, TAG_EM, 0, NULL); return(1); } @@ -1892,9 +1889,7 @@ else if (MDOC_BODY != n->type) return(1); - if (FONT_Em == n->norm->Bf.font) - PAIR_CLASS_INIT(&tag[0], "emph"); - else if (FONT_Sy == n->norm->Bf.font) + if (FONT_Sy == n->norm->Bf.font) PAIR_CLASS_INIT(&tag[0], "symb"); else if (FONT_Li == n->norm->Bf.font) PAIR_CLASS_INIT(&tag[0], "lit"); @@ -1912,6 +1907,10 @@ bufcat_su(h, "margin-left", &su); PAIR_STYLE_INIT(&tag[1], h); print_otag(h, TAG_DIV, 2, tag); + if (FONT_Em == n->norm->Bf.font) { + /* Tag this with . */ + print_otag(h, TAG_EM, 0, NULL); + } return(1); } --- style.css.dist 2012-12-18 19:41:01.000000000 -0800 +++ style.css 2012-12-20 16:24:17.000000000 -0800 @@ -34,7 +34,7 @@ /* General font modes. */ i { } /* Italic: BI, IB, I, (implicit). */ -.emph { font-style: italic; font-weight: normal; } /* Emphasis: Em, Bl -emphasis. */ +em { font-style: italic; font-weight: normal; } /* Emphasis: Em, Bl -emphasis. */ b { } /* Bold: SB, BI, IB, BR, RB, B, (implicit). */ .symb { font-style: normal; font-weight: bold; } /* Symbolic: Sy, Ms, Bf -symbolic. */ small { } /* Small: SB, SM. */ --Apple-Mail=_F57D5C39-0112-46FB-8459-27D339047D20-- -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv