aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-08-18 09:16:01 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-08-18 09:16:01 +0000
commit0592e18f12cd052071f1a3b6ced15bbf5d294224 (patch)
treeed588fd3ca6261d5eeed403ef93f666bd4bb9707
parent2255d868c1b152d143051be882758d3b55357300 (diff)
downloadmandoc-0592e18f12cd052071f1a3b6ced15bbf5d294224.tar.gz
mandoc-0592e18f12cd052071f1a3b6ced15bbf5d294224.tar.zst
mandoc-0592e18f12cd052071f1a3b6ced15bbf5d294224.zip
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.
-rw-r--r--example.style.css4
-rw-r--r--man_html.c3
-rw-r--r--mdoc_html.c9
-rw-r--r--style.css4
4 files changed, 8 insertions, 12 deletions
diff --git a/example.style.css b/example.style.css
index e4c560d6..c80b929b 100644
--- a/example.style.css
+++ b/example.style.css
@@ -1,4 +1,4 @@
-/* $Id: example.style.css,v 1.44 2011/08/18 09:02:22 kristaps Exp $ */
+/* $Id: example.style.css,v 1.45 2011/08/18 09:16:01 kristaps Exp $ */
/*
* This is an example style-sheet provided for mandoc(1) and the -Thtml
@@ -16,7 +16,7 @@ h2 { margin-bottom: 0ex; font-size: inherit; margin-left: -2ex; } /* Sub-sectio
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. */
diff --git a/man_html.c b/man_html.c
index 026364ae..db6b1f90 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,4 +1,4 @@
-/* $Id: man_html.c,v 1.80 2011/07/23 22:57:13 kristaps Exp $ */
+/* $Id: man_html.c,v 1.81 2011/08/18 09:16:01 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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, \
diff --git a/mdoc_html.c b/mdoc_html.c
index 56a0adcf..f33a438b 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.176 2011/08/18 09:02:22 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.177 2011/08/18 09:16:01 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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));
}
diff --git a/style.css b/style.css
index 443865bf..576cfee1 100644
--- a/style.css
+++ b/style.css
@@ -1,4 +1,4 @@
-/* $Id: style.css,v 1.23 2011/08/18 09:02:22 kristaps Exp $ */
+/* $Id: style.css,v 1.24 2011/08/18 09:16:01 kristaps Exp $ */
/*
* This is an example style-sheet provided for mandoc(1) and the -Thtml
@@ -16,7 +16,7 @@ h2 { margin-bottom: 1ex; font-size: 105%; margin-left: -2ex; } /* Sub-section h
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. */