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 s7E0Vi08013477 for ; Wed, 13 Aug 2014 20:31:44 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s7E0VinZ007662; Wed, 13 Aug 2014 20:31:44 -0400 (EDT) Date: Wed, 13 Aug 2014 20:31:44 -0400 (EDT) Message-Id: <201408140031.s7E0VinZ007662@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: Revert previous, as requested by kristaps@. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Revert previous, as requested by kristaps@. The .Bf block can contain subblocks, so it has to render as an element that can contain flow content. But cannot contain flow content, only phrasing content. Rendering .Em and .Bf differently would by unfortunate, and closing out .Bf before subblocks and re-opening it afterwards would merely complicate both the C code of the program and the generated HTML code. Besides, converting .Em to semantic HTML markup would require some content to be put into and some into , but we cannot automatically distinguish which is which, so strictly speaking, we can't use semantic HTML here but have to fall back to physical markup. Wonders of HTML... 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.26 retrieving revision 1.27 diff -Lstyle.css -Lstyle.css -u -p -r1.26 -r1.27 --- style.css +++ style.css @@ -34,7 +34,7 @@ td.head-rtitle { width: 10%; text-align: /* General font modes. */ i { } /* Italic: BI, IB, I, (implicit). */ -em { font-style: italic; font-weight: normal; } /* Emphasis: Em, Bl -emphasis. */ +.emph { 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.52 retrieving revision 1.53 diff -Lhtml.h -Lhtml.h -u -p -r1.52 -r1.53 --- html.h +++ html.h @@ -50,7 +50,6 @@ 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.162 retrieving revision 1.163 diff -Lhtml.c -Lhtml.c -u -p -r1.162 -r1.163 --- html.c +++ html.c @@ -74,7 +74,6 @@ 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.197 retrieving revision 1.198 diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.197 -r1.198 --- mdoc_html.c +++ mdoc_html.c @@ -1083,8 +1083,10 @@ mdoc_ex_pre(MDOC_ARGS) static int mdoc_em_pre(MDOC_ARGS) { + struct htmlpair tag; - print_otag(h, TAG_EM, 0, NULL); + PAIR_CLASS_INIT(&tag, "emph"); + print_otag(h, TAG_SPAN, 1, &tag); return(1); } @@ -1820,7 +1822,9 @@ mdoc_bf_pre(MDOC_ARGS) else if (MDOC_BODY != n->type) return(1); - if (FONT_Sy == n->norm->Bf.font) + if (FONT_Em == n->norm->Bf.font) + PAIR_CLASS_INIT(&tag[0], "emph"); + else 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"); @@ -1838,8 +1842,6 @@ 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.50 retrieving revision 1.51 diff -Lexample.style.css -Lexample.style.css -u -p -r1.50 -r1.51 --- 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 em { font-style: italic; font-weight: normal; } /* Emphasis: Em, Bl -emphasis. */ +div.mandoc .emph { 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