source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Align `-offset indent' and `D1' by forcing BLOCKQUOTE to have a
Date: Thu, 18 Aug 2011 05:16:01 -0400 (EDT)	[thread overview]
Message-ID: <201108180916.p7I9G1TR001659@krisdoz.my.domain> (raw)

Log Message:
-----------
Align `-offset indent' and `D1' by forcing BLOCKQUOTE to have a 5ex
margin.  This is dubious: the HTML4 spec specifically says that
BLOCKQUOTE shouldn't be abused for indentation, which is exactly what we
do.  However, `D1' needs indentation and it's the only way to force text
browsers to do so.  Alternatives?

Also remove the unused HALFINDENT defines while here.

Modified Files:
--------------
    mdocml:
        example.style.css
        man_html.c
        mdoc_html.c
        style.css

Revision Data
-------------
Index: style.css
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/style.css,v
retrieving revision 1.23
retrieving revision 1.24
diff -Lstyle.css -Lstyle.css -u -p -r1.23 -r1.24
--- style.css
+++ style.css
@@ -16,7 +16,7 @@ h2		{ margin-bottom: 1ex; font-size: 105
 table		{ width: 100%; margin-top: 0ex; margin-bottom: 0ex; } /* All tables. */
 td		{ vertical-align: top; } /* All table cells. */
 p		{ } /* Paragraph: Pp, Lp. */
-blockquote	{ margin-top: 0ex; margin-bottom: 0ex; } /* D1. */
+blockquote	{ margin-left: 5ex; margin-top: 0ex; margin-bottom: 0ex; } /* D1. */
 div.section	{ margin-bottom: 2ex; margin-left: 5ex; } /* Sections (Sh, SH). */
 div.subsection	{ } /* Sub-sections (Ss, SS). */
 table.synopsis	{ } /* SYNOPSIS section table. */
Index: man_html.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_html.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -Lman_html.c -Lman_html.c -u -p -r1.80 -r1.81
--- man_html.c
+++ man_html.c
@@ -36,7 +36,6 @@
 /* FIXME: have PD set the default vspace width. */
 
 #define	INDENT		  5
-#define	HALFINDENT	  3
 
 #define	MAN_ARGS	  const struct man_meta *m, \
 			  const struct man_node *n, \
Index: mdoc_html.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_html.c,v
retrieving revision 1.176
retrieving revision 1.177
diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.176 -r1.177
--- mdoc_html.c
+++ mdoc_html.c
@@ -34,7 +34,6 @@
 #include "main.h"
 
 #define	INDENT		 5
-#define	HALFINDENT	 3
 
 #define	MDOC_ARGS	  const struct mdoc_meta *m, \
 			  const struct mdoc_node *n, \
@@ -353,10 +352,8 @@ a2offs(const char *p, struct roffsu *su)
 		SCALE_HS_INIT(su, INDENT);
 	else if (0 == strcmp(p, "indent-two"))
 		SCALE_HS_INIT(su, INDENT * 2);
-	else if ( ! a2roffsu(p, su, SCALE_MAX)) {
-		su->unit = SCALE_BU;
-		su->scale = html_strlen(p);
-	}
+	else if ( ! a2roffsu(p, su, SCALE_MAX))
+		SCALE_HS_INIT(su, html_strlen(p));
 }
 
 
Index: example.style.css
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/example.style.css,v
retrieving revision 1.44
retrieving revision 1.45
diff -Lexample.style.css -Lexample.style.css -u -p -r1.44 -r1.45
--- example.style.css
+++ example.style.css
@@ -16,7 +16,7 @@ h2		{ margin-bottom: 0ex; font-size: inh
 table		{ width: 100%; margin-top: 0ex; margin-bottom: 0ex; } /* All tables. */
 td		{ vertical-align: top; } /* All table cells. */
 p		{ } /* Paragraph: Pp, Lp. */
-blockquote	{ margin-top: 0ex; margin-bottom: 0ex; } /* D1. */
+blockquote	{ margin-left: 5ex; margin-top: 0ex; margin-bottom: 0ex; } /* D1. */
 div.section	{ margin-bottom: 2ex; margin-left: 5ex; } /* Sections (Sh, SH). */
 div.subsection	{ } /* Sub-sections (Ss, SS). */
 table.synopsis	{ } /* SYNOPSIS section table. */
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

                 reply	other threads:[~2011-08-18  9:16 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=201108180916.p7I9G1TR001659@krisdoz.my.domain \
    --to=kristaps@mdocml.bsd.lv \
    --cc=source@mdocml.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).