From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: For -man -Thtml, ignore author-specified .HP widths because they
Date: Mon, 25 Jun 2018 08:01:49 -0500 (EST) [thread overview]
Message-ID: <f14ec8d6fd31e1b1@fantadrom.bsd.lv> (raw)
Log Message:
-----------
For -man -Thtml, ignore author-specified .HP widths because they
harm responsive design; use @media-dependent defaults instead.
Modified Files:
--------------
mandoc:
man_html.c
mandoc.css
Revision Data
-------------
Index: man_html.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/man_html.c,v
retrieving revision 1.150
retrieving revision 1.151
diff -Lman_html.c -Lman_html.c -u -p -r1.150 -r1.151
--- man_html.c
+++ man_html.c
@@ -557,24 +557,13 @@ man_IP_pre(MAN_ARGS)
static int
man_HP_pre(MAN_ARGS)
{
- struct roffsu sum, sui;
- const struct roff_node *np;
-
if (n->type == ROFFT_HEAD)
return 0;
- else if (n->type != ROFFT_BLOCK)
- return 1;
-
- np = n->head->child;
-
- if (np == NULL || !a2width(np, &sum))
- SCALE_HS_INIT(&sum, INDENT);
-
- sui.unit = sum.unit;
- sui.scale = -sum.scale;
- print_bvspace(h, n);
- print_otag(h, TAG_DIV, "csului", "Pp", &sum, &sui);
+ if (n->type == ROFFT_BLOCK) {
+ print_bvspace(h, n);
+ print_otag(h, TAG_DIV, "c", "HP");
+ }
return 1;
}
Index: mandoc.css
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mandoc.css,v
retrieving revision 1.33
retrieving revision 1.34
diff -Lmandoc.css -Lmandoc.css -u -p -r1.33 -r1.34
--- mandoc.css
+++ mandoc.css
@@ -153,6 +153,9 @@ table.Bl-compact > tbody > tr > td {
.eqn { }
.tbl { }
+.HP { margin-left: 3.8em;
+ text-indent: -3.8em; }
+
/* Semantic markup for command line utilities. */
table.Nm { }
@@ -245,4 +248,6 @@ dl.Bl-hang > dd {
dl.Bl-tag { margin-left: 2em; }
dl.Bl-tag > dt {
margin-left: -2em; }
+.HP { margin-left: 2em;
+ text-indent: -2em; }
}
--
To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv
reply other threads:[~2018-06-25 13:01 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=f14ec8d6fd31e1b1@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).