From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s7DFPMQ2000367 for ; Wed, 13 Aug 2014 11:25:22 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s7DFPM4r015860; Wed, 13 Aug 2014 11:25:22 -0400 (EDT) Date: Wed, 13 Aug 2014 11:25:22 -0400 (EDT) Message-Id: <201408131525.s7DFPM4r015860@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Use for .Em and .Bf -emphasis. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Use for .Em and .Bf -emphasis. The vast majority of .Em in real-world manuals is stress emphasis, for which is the correct markup. Admittedly, there are some instances of .Em usage for alternate quality, for which would be a better match. Most of these are technical terms that neither allow semantic markup nor are keywords - for the latter, .Sy would be preferable. A typical example is that the shell breaks input into .Em words . Alternate voice or mood, which would also require , is almost absent from manuals. We cannot satisfy both stress emphasis and alternate quality, so pick the one that fits more often and looks less wrong when off. Patch from Guy Harris . ok joerg@ bentley@ Modified Files: -------------- mdocml: example.style.css html.c html.h mdoc_html.c style.css Revision Data ------------- Index: style.css =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/style.css,v retrieving revision 1.25 retrieving revision 1.26 diff -Lstyle.css -Lstyle.css -u -p -r1.25 -r1.26 --- style.css +++ style.css @@ -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. */ Index: html.h =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/html.h,v retrieving revision 1.51 retrieving revision 1.52 diff -Lhtml.h -Lhtml.h -u -p -r1.51 -r1.52 --- html.h +++ html.h @@ -50,6 +50,7 @@ enum htmltag { TAG_I, TAG_CODE, TAG_SMALL, + TAG_EM, TAG_MAX }; Index: html.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/html.c,v retrieving revision 1.160 retrieving revision 1.161 diff -Lhtml.c -Lhtml.c -u -p -r1.160 -r1.161 --- html.c +++ html.c @@ -74,6 +74,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] = { Index: mdoc_html.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_html.c,v retrieving revision 1.196 retrieving revision 1.197 diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.196 -r1.197 --- mdoc_html.c +++ mdoc_html.c @@ -1083,10 +1083,8 @@ 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); } @@ -1822,9 +1820,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"); @@ -1842,6 +1838,8 @@ 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) + print_otag(h, TAG_EM, 0, NULL); return(1); } Index: example.style.css =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/example.style.css,v retrieving revision 1.49 retrieving revision 1.50 diff -Lexample.style.css -Lexample.style.css -u -p -r1.49 -r1.50 --- example.style.css +++ example.style.css @@ -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). */ -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv