* mandoc: After years of gnashing of teeth, i finally found a way to avoid
@ 2019-01-10 7:40 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-01-10 7:40 UTC (permalink / raw)
To: source
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 <dd>.
Note that margin-top on the <dt> doesn't work because it would put
a short <dt> lower than the <dd>; margin-bottom on the <dt> doesn't
work because it would put vertical space before the <dd> for a long
<dt>; and margin-top on the <dd> doesn't work because it would put
a short <dt> higher than the <dd>. Only margin-bottom on the <dd>
has none of these adverse effects.
2. Of course, margin-bottom on the <dd> fails to take care of the
vertical spacing before the first list element, so implement that
separately by margin-top on the <dl>.
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-01-10 7:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-10 7:40 mandoc: After years of gnashing of teeth, i finally found a way to avoid schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).