From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s7CMiGJr006583 for ; Tue, 12 Aug 2014 18:44:16 -0400 (EDT) Received: from [10.0.1.3] (c-50-136-212-110.hsd1.ca.comcast.net [50.136.212.110]) (authenticated bits=0) by c.mail.sonic.net (8.14.9/8.14.9) with ESMTP id s7CMi7ha005187 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Tue, 12 Aug 2014 15:44:09 -0700 From: Guy Harris Content-Type: text/plain; charset=us-ascii Subject: Is there any reason not to use for items emphasized with .Em? Message-Id: <01237D5A-9F46-4047-83BF-A98CAB0C16E1@alum.mit.edu> Date: Tue, 12 Aug 2014 15:44:07 -0700 To: tech@mdocml.bsd.lv X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) X-Mailer: Apple Mail (2.1510) X-Sonic-CAuth: UmFuZG9tSVYnZYXyNel98XO+R2WdFzKos8qOB58bLSHb51HIAjDSiaS/Riq6S6dsDuLs6wdQ9vjfqMzzK40n0wv7+BOAVsba X-Sonic-ID: C;uJX4KnIi5BGJdt90oK8kYw== M;+J1BK3Ii5BGJdt90oK8kYw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by krisdoz.my.domain id s7CMiGJr006583 .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, here's a patch: diff -Nup ../mdocml-1.13.1/example.style.css ./example.style.css --- ../mdocml-1.13.1/example.style.css 2014-08-10 10:26:46.000000000 -0700 +++ ./example.style.css 2014-08-12 14:04:22.000000000 -0700 @@ -30,7 +30,7 @@ div.mandoc .list { } /* All Bl. */ 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). */ diff -Nup ../mdocml-1.13.1/html.c ./html.c --- ../mdocml-1.13.1/html.c 2014-08-10 10:26:46.000000000 -0700 +++ ./html.c 2014-08-12 14:04:22.000000000 -0700 @@ -76,6 +76,7 @@ static const struct htmldata htmltags[TA {"i", 0 }, /* TAG_I */ {"code", 0 }, /* TAG_CODE */ {"small", 0 }, /* TAG_SMALL */ + {"em", 0 }, /* TAG_EM */ }; static const char *const htmlattrs[ATTR_MAX] = { diff -Nup ../mdocml-1.13.1/html.h ./html.h --- ../mdocml-1.13.1/html.h 2014-08-10 10:26:46.000000000 -0700 +++ ./html.h 2014-08-12 14:04:22.000000000 -0700 @@ -50,6 +50,7 @@ enum htmltag { TAG_I, TAG_CODE, TAG_SMALL, + TAG_EM, TAG_MAX }; diff -Nup ../mdocml-1.13.1/mdoc_html.c ./mdoc_html.c --- ../mdocml-1.13.1/mdoc_html.c 2014-08-10 10:26:46.000000000 -0700 +++ ./mdoc_html.c 2014-08-12 15:40:03.000000000 -0700 @@ -1085,10 +1085,7 @@ mdoc_ex_pre(MDOC_ARGS) 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); } @@ -1824,9 +1821,7 @@ mdoc_bf_pre(MDOC_ARGS) 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"); @@ -1844,6 +1839,10 @@ mdoc_bf_pre(MDOC_ARGS) 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); } diff -Nup ../mdocml-1.13.1/style.css ./style.css --- ../mdocml-1.13.1/style.css 2014-08-10 10:26:46.000000000 -0700 +++ ./style.css 2014-08-12 14:04:22.000000000 -0700 @@ -34,7 +34,7 @@ td.head-rtitle { width: 10%; text-align: /* 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. */ -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv