diff options
-rw-r--r-- | TODO | 6 | ||||
-rw-r--r-- | html.c | 4 | ||||
-rw-r--r-- | man_html.c | 4 | ||||
-rw-r--r-- | mandoc.css | 42 | ||||
-rw-r--r-- | mdoc_html.c | 65 |
5 files changed, 43 insertions, 78 deletions
@@ -379,12 +379,6 @@ are mere guesses, and some may be wrong. --- HTML issues -------------------------------------------------------- -- replace "li.It-dash:before" with "ul.Bl-dash > li:before" - and get rid of the class="It-dash" in the <li>, - and similarly for other blocks - John Gardner <gardnerjohng at gmail dot com> 23 Apr 2018 13:17:16 +1000 - loc ** exist ** algo * size ** imp ** - - duplicate names generate duplicate href="#..." anchor attributes possibly use "#..._<N>" suffixes? Jakub Klinkovsky <j dot l dot k at gmx dot com> 3 Oct 2017 21:23:36 +0200 @@ -187,6 +187,10 @@ print_gen_head(struct html *h) print_endline(h); print_text(h, "div.Pp { margin: 1ex 0ex; }"); print_endline(h); + print_text(h, "dl.Bl-diag "); + print_byte(h, '>'); + print_text(h, " dt { font-weight: bold; }"); + print_endline(h); print_text(h, "code.Nm, code.Fl, code.Cm, code.Ic, " "code.In, code.Fd, code.Fn,"); print_endline(h); @@ -525,7 +525,7 @@ man_IP_pre(MAN_ARGS) const struct roff_node *nn; if (n->type == ROFFT_BODY) { - print_otag(h, TAG_DD, "c", "It-tag"); + print_otag(h, TAG_DD, ""); return 1; } else if (n->type != ROFFT_HEAD) { print_otag(h, TAG_DL, "c", "Bl-tag"); @@ -534,7 +534,7 @@ man_IP_pre(MAN_ARGS) /* FIXME: width specification. */ - print_otag(h, TAG_DT, "c", "It-tag"); + print_otag(h, TAG_DT, ""); /* For IP, only print the first header element. */ @@ -72,42 +72,49 @@ div.D1 { margin-left: 5ex; } ul.Bl-bullet { list-style-type: disc; padding-left: 1em; } -li.It-bullet { } +ul.Bl-bullet > li { } ul.Bl-dash { list-style-type: none; padding-left: 0em; } -li.It-dash:before { +ul.Bl-dash > li:before { content: "\2014 "; } ul.Bl-item { list-style-type: none; padding-left: 0em; } -li.It-item { } +ul.Bl-item > li { } ul.Bl-compact > li { margin-top: 0ex; } ol.Bl-enum { padding-left: 2em; } -li.It-enum { } +ol.Bl-enum > li { } ol.Bl-compact > li { margin-top: 0ex; } dl.Bl-diag { } -dt.It-diag { } -dd.It-diag { margin-left: 0ex; } -b.It-diag { font-style: normal; } +dl.Bl-diag > dt { + font-style: normal; + font-weight: bold; } +dl.Bl-diag > dd { + margin-left: 0ex; } dl.Bl-hang { } -dt.It-hang { } -dd.It-hang { margin-left: 10.2ex; } +dl.Bl-hang > dt { } +dl.Bl-hang > dd { + margin-left: 10.2ex; } dl.Bl-inset { } -dt.It-inset { } -dd.It-inset { margin-left: 0ex; } +dl.Bl-inset > dt { } +dl.Bl-inset > dd { + margin-left: 0ex; } dl.Bl-ohang { } -dt.It-ohang { } -dd.It-ohang { margin-left: 0ex; } +dl.Bl-ohang > dt { } +dl.Bl-ohang > dd { + margin-left: 0ex; } dl.Bl-tag { margin-left: 10.2ex; } -dt.It-tag { float: left; +dl.Bl-tag > dt { + float: left; margin-top: 0ex; margin-left: -10.2ex; padding-right: 2ex; vertical-align: top; } -dd.It-tag { clear: right; +dl.Bl-tag > dd { + clear: right; width: 100%; margin-top: 0ex; margin-left: 0ex; @@ -117,8 +124,9 @@ dl.Bl-compact > dt { margin-top: 0ex; } table.Bl-column { } -tr.It-column { } -td.It-column { margin-top: 1em; } +table.Bl-column > tbody > tr { } +table.Bl-column > tbody > tr > td { + margin-top: 1em; } table.Bl-compact > tbody > tr > td { margin-top: 0ex; } diff --git a/mdoc_html.c b/mdoc_html.c index 37c34605..e0cf7416 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1,7 +1,7 @@ /* $Id$ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> - * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org> + * Copyright (c) 2014,2015,2016,2017,2018 Ingo Schwarze <schwarze@openbsd.org> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -668,7 +668,6 @@ mdoc_it_pre(MDOC_ARGS) { const struct roff_node *bl; struct tag *t; - const char *cattr; enum mdoc_list type; bl = n->parent; @@ -678,42 +677,6 @@ mdoc_it_pre(MDOC_ARGS) switch (type) { case LIST_bullet: - cattr = "It-bullet"; - break; - case LIST_dash: - case LIST_hyphen: - cattr = "It-dash"; - break; - case LIST_item: - cattr = "It-item"; - break; - case LIST_enum: - cattr = "It-enum"; - break; - case LIST_diag: - cattr = "It-diag"; - break; - case LIST_hang: - cattr = "It-hang"; - break; - case LIST_inset: - cattr = "It-inset"; - break; - case LIST_ohang: - cattr = "It-ohang"; - break; - case LIST_tag: - cattr = "It-tag"; - break; - case LIST_column: - cattr = "It-column"; - break; - default: - break; - } - - switch (type) { - case LIST_bullet: case LIST_dash: case LIST_hyphen: case LIST_item: @@ -722,7 +685,7 @@ mdoc_it_pre(MDOC_ARGS) case ROFFT_HEAD: return 0; case ROFFT_BODY: - print_otag(h, TAG_LI, "c", cattr); + print_otag(h, TAG_LI, ""); break; default: break; @@ -734,13 +697,10 @@ mdoc_it_pre(MDOC_ARGS) case LIST_ohang: switch (n->type) { case ROFFT_HEAD: - print_otag(h, TAG_DT, "c", cattr); - if (type == LIST_diag) - print_otag(h, TAG_B, "c", cattr); + print_otag(h, TAG_DT, ""); break; case ROFFT_BODY: - print_otag(h, TAG_DD, "csw*+l", cattr, - bl->norm->Bl.width); + print_otag(h, TAG_DD, "sw*+l", bl->norm->Bl.width); break; default: break; @@ -753,24 +713,23 @@ mdoc_it_pre(MDOC_ARGS) (n->parent->prev == NULL || n->parent->prev->body == NULL || n->parent->prev->body->child != NULL)) { - t = print_otag(h, TAG_DT, "csw*+-l", - cattr, bl->norm->Bl.width); + t = print_otag(h, TAG_DT, "sw*+-l", + bl->norm->Bl.width); print_text(h, "\\ "); print_tagq(h, t); - t = print_otag(h, TAG_DD, "c", cattr); + t = print_otag(h, TAG_DD, ""); print_text(h, "\\ "); print_tagq(h, t); } - print_otag(h, TAG_DT, "csw*+-l", cattr, - bl->norm->Bl.width); + print_otag(h, TAG_DT, "sw*+-l", bl->norm->Bl.width); break; case ROFFT_BODY: if (n->child == NULL) { - print_otag(h, TAG_DD, "css?", cattr, + print_otag(h, TAG_DD, "ss?", "width", "auto"); print_text(h, "\\ "); } else - print_otag(h, TAG_DD, "c", cattr); + print_otag(h, TAG_DD, ""); break; default: break; @@ -781,10 +740,10 @@ mdoc_it_pre(MDOC_ARGS) case ROFFT_HEAD: break; case ROFFT_BODY: - print_otag(h, TAG_TD, "c", cattr); + print_otag(h, TAG_TD, ""); break; default: - print_otag(h, TAG_TR, "c", cattr); + print_otag(h, TAG_TR, ""); } default: break; |