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
Date: Thu, 10 Jan 2019 02:40:40 -0500 (EST) [thread overview]
Message-ID: <e3ee6f258812632b@fantadrom.bsd.lv> (raw)
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
reply other threads:[~2019-01-10 7:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e3ee6f258812632b@fantadrom.bsd.lv \
--to=schwarze@mandoc.bsd.lv \
--cc=source@mandoc.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).