diff options
-rw-r--r-- | example.style.css | 2 | ||||
-rw-r--r-- | html.c | 1 | ||||
-rw-r--r-- | html.h | 1 | ||||
-rw-r--r-- | mdoc_html.c | 10 | ||||
-rw-r--r-- | style.css | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/example.style.css b/example.style.css index 2cb2b632..08cccd2e 100644 --- a/example.style.css +++ b/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). */ @@ -74,7 +74,6 @@ static const struct htmldata htmltags[TAG_MAX] = { {"i", 0 }, /* TAG_I */ {"code", 0 }, /* TAG_CODE */ {"small", 0 }, /* TAG_SMALL */ - {"em", 0 }, /* TAG_EM */ }; static const char *const htmlattrs[ATTR_MAX] = { @@ -50,7 +50,6 @@ enum htmltag { TAG_I, TAG_CODE, TAG_SMALL, - TAG_EM, TAG_MAX }; diff --git a/mdoc_html.c b/mdoc_html.c index 86c48b24..5c26f7ea 100644 --- a/mdoc_html.c +++ b/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); } @@ -34,7 +34,7 @@ td.head-rtitle { width: 10%; text-align: right; } /* Document header: right-titl /* 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. */ |