From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id bbf71317 for ; Thu, 10 Jan 2019 02:40:40 -0500 (EST) Date: Thu, 10 Jan 2019 02:40:40 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: After years of gnashing of teeth, i finally found a way to avoid X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: Log Message: ----------- After years of gnashing of teeth, i finally found a way to avoid having to write empty list elements for non-compact .Bl -tag lists: 1. Add margin-bottom to the
. Note that margin-top on the
doesn't work because it would put a short
lower than the
; margin-bottom on the
doesn't work because it would put vertical space before the
for a long
; and margin-top on the
doesn't work because it would put a short
higher than the
. Only margin-bottom on the
has none of these adverse effects. 2. Of course, margin-bottom on the
fails to take care of the vertical spacing before the first list element, so implement that separately by margin-top on the
. 3. For .Bl -tag -compact, reset both to zero. Modified Files: -------------- mandoc: mandoc.css mdoc_html.c Revision Data ------------- Index: mandoc.css =================================================================== RCS file: /home/cvs/mandoc/mandoc/mandoc.css,v retrieving revision 1.42 retrieving revision 1.43 diff -Lmandoc.css -Lmandoc.css -u -p -r1.42 -r1.43 --- mandoc.css +++ mandoc.css @@ -119,7 +119,8 @@ td.foot-os { text-align: right; } .Bl-ohang > dt { } .Bl-ohang > dd { margin-left: 0em; } -.Bl-tag { margin-left: 5.5em; } +.Bl-tag { margin-top: 0.6em; + margin-left: 5.5em; } .Bl-tag > dt { float: left; margin-top: 0em; @@ -131,8 +132,12 @@ td.foot-os { text-align: right; } width: 100%; margin-top: 0em; margin-left: 0em; + margin-bottom: 0.6em; vertical-align: top; overflow: auto; } +.Bl-compact { margin-top: 0em; } +.Bl-compact > dd { + margin-bottom: 0em; } .Bl-compact > dt { margin-top: 0em; } Index: mdoc_html.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/mdoc_html.c,v retrieving revision 1.323 retrieving revision 1.324 diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.323 -r1.324 --- mdoc_html.c +++ mdoc_html.c @@ -741,7 +741,6 @@ static int mdoc_it_pre(MDOC_ARGS) { const struct roff_node *bl; - struct tag *t; enum mdoc_list type; bl = n->parent; @@ -783,17 +782,6 @@ mdoc_it_pre(MDOC_ARGS) case LIST_tag: switch (n->type) { case ROFFT_HEAD: - if (h->style != NULL && !bl->norm->Bl.comp && - (n->parent->prev == NULL || - n->parent->prev->body == NULL || - n->parent->prev->body->child != NULL)) { - t = print_otag(h, TAG_DT, ""); - print_text(h, "\\ "); - print_tagq(h, t); - t = print_otag(h, TAG_DD, ""); - print_text(h, "\\ "); - print_tagq(h, t); - } print_otag(h, TAG_DT, ""); break; case ROFFT_BODY: -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv