aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--example.style.css8
-rw-r--r--html.c6
-rw-r--r--html.h3
-rw-r--r--man_html.c49
-rw-r--r--mdoc_html.c49
-rw-r--r--style.css4
6 files changed, 58 insertions, 61 deletions
diff --git a/example.style.css b/example.style.css
index b1a925ae..b54c0654 100644
--- a/example.style.css
+++ b/example.style.css
@@ -1,4 +1,4 @@
-/* $Id: example.style.css,v 1.51 2014/08/14 00:31:43 schwarze Exp $ */
+/* $Id: example.style.css,v 1.52 2014/09/27 09:20:03 kristaps Exp $ */
/*
* This is an example style-sheet provided for mandoc(1) and the -Thtml
* or -Txhtml output mode.
@@ -20,11 +20,11 @@ div.mandoc div.subsection { } /* Sub-sections (Ss, SS). */
div.mandoc table.synopsis { } /* SYNOPSIS section table. */
div.mandoc table.foot { } /* Document footer. */
div.mandoc td.foot-date { width: 50%; } /* Document footer: date. */
-div.mandoc td.foot-os { width: 50%; text-align: right; } /* Document footer: OS/source. */
+div.mandoc td.foot-os { width: 50%; } /* Document footer: OS/source. */
div.mandoc table.head { } /* Document header. */
div.mandoc td.head-ltitle { width: 10%; } /* Document header: left-title. */
-div.mandoc td.head-vol { width: 80%; text-align: center; } /* Document header: volume. */
-div.mandoc td.head-rtitle { width: 10%; text-align: right; } /* Document header: right-title. */
+div.mandoc td.head-vol { width: 80%; } /* Document header: volume. */
+div.mandoc td.head-rtitle { width: 10%; } /* Document header: right-title. */
div.mandoc .display { } /* All Bd, D1, Dl. */
div.mandoc .list { } /* All Bl. */
div.mandoc i { } /* Italic: BI, IB, I, (implicit). */
diff --git a/html.c b/html.c
index b7facda4..9a2e9d71 100644
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/* $Id: html.c,v 1.168 2014/09/27 09:13:39 kristaps Exp $ */
+/* $Id: html.c,v 1.169 2014/09/27 09:20:03 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -87,7 +87,6 @@ static const char *const htmlattrs[ATTR_MAX] = {
"style", /* ATTR_STYLE */
"width", /* ATTR_WIDTH */
"id", /* ATTR_ID */
- "align", /* ATTR_ALIGN */
"colspan", /* ATTR_COLSPAN */
"charset", /* ATTR_CHARSET */
};
@@ -202,7 +201,8 @@ print_gen_head(struct html *h)
*/
t = print_otag(h, TAG_STYLE, 0, NULL);
print_text(h, "table.head, table.foot { width: 100%; }\n"
- "td.head-rtitle, td.foot-os { text-align: right; }\n");
+ "td.head-rtitle, td.foot-os { text-align: right; }\n"
+ "td.head-vol { text-align: center; }\n");
print_tagq(h, t);
if (h->style) {
diff --git a/html.h b/html.h
index d85848e9..cf23cb1f 100644
--- a/html.h
+++ b/html.h
@@ -1,4 +1,4 @@
-/* $Id: html.h,v 1.58 2014/09/27 09:05:57 kristaps Exp $ */
+/* $Id: html.h,v 1.59 2014/09/27 09:20:03 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -64,7 +64,6 @@ enum htmlattr {
ATTR_STYLE,
ATTR_WIDTH,
ATTR_ID,
- ATTR_ALIGN,
ATTR_COLSPAN,
ATTR_CHARSET,
ATTR_MAX
diff --git a/man_html.c b/man_html.c
index dd9f13d6..fef0bb2c 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,4 +1,4 @@
-/* $Id: man_html.c,v 1.100 2014/09/27 09:13:39 kristaps Exp $ */
+/* $Id: man_html.c,v 1.101 2014/09/27 09:20:03 kristaps Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -299,7 +299,7 @@ a2width(const struct man_node *n, struct roffsu *su)
static void
man_root_pre(MAN_ARGS)
{
- struct htmlpair tag[2];
+ struct htmlpair tag;
struct tag *t, *tt;
char *title;
@@ -307,31 +307,30 @@ man_root_pre(MAN_ARGS)
assert(man->msec);
mandoc_asprintf(&title, "%s(%s)", man->title, man->msec);
- PAIR_CLASS_INIT(&tag[0], "head");
- t = print_otag(h, TAG_TABLE, 1, tag);
- PAIR_INIT(&tag[0], ATTR_WIDTH, "30%");
- print_otag(h, TAG_COL, 1, tag);
- print_otag(h, TAG_COL, 1, tag);
- print_otag(h, TAG_COL, 1, tag);
+ PAIR_CLASS_INIT(&tag, "head");
+ t = print_otag(h, TAG_TABLE, 1, &tag);
+ PAIR_INIT(&tag, ATTR_WIDTH, "30%");
+ print_otag(h, TAG_COL, 1, &tag);
+ print_otag(h, TAG_COL, 1, &tag);
+ print_otag(h, TAG_COL, 1, &tag);
print_otag(h, TAG_TBODY, 0, NULL);
tt = print_otag(h, TAG_TR, 0, NULL);
- PAIR_CLASS_INIT(&tag[0], "head-ltitle");
- print_otag(h, TAG_TD, 1, tag);
+ PAIR_CLASS_INIT(&tag, "head-ltitle");
+ print_otag(h, TAG_TD, 1, &tag);
print_text(h, title);
print_stagq(h, tt);
- PAIR_CLASS_INIT(&tag[0], "head-vol");
- PAIR_INIT(&tag[1], ATTR_ALIGN, "center");
- print_otag(h, TAG_TD, 2, tag);
+ PAIR_CLASS_INIT(&tag, "head-vol");
+ print_otag(h, TAG_TD, 1, &tag);
if (NULL != man->vol)
print_text(h, man->vol);
print_stagq(h, tt);
- PAIR_CLASS_INIT(&tag[0], "head-rtitle");
- print_otag(h, TAG_TD, 1, tag);
+ PAIR_CLASS_INIT(&tag, "head-rtitle");
+ print_otag(h, TAG_TD, 1, &tag);
print_text(h, title);
print_tagq(h, t);
free(title);
@@ -340,26 +339,26 @@ man_root_pre(MAN_ARGS)
static void
man_root_post(MAN_ARGS)
{
- struct htmlpair tag[2];
+ struct htmlpair tag;
struct tag *t, *tt;
- PAIR_CLASS_INIT(&tag[0], "foot");
- t = print_otag(h, TAG_TABLE, 1, tag);
- PAIR_INIT(&tag[0], ATTR_WIDTH, "50%");
- print_otag(h, TAG_COL, 1, tag);
- print_otag(h, TAG_COL, 1, tag);
+ PAIR_CLASS_INIT(&tag, "foot");
+ t = print_otag(h, TAG_TABLE, 1, &tag);
+ PAIR_INIT(&tag, ATTR_WIDTH, "50%");
+ print_otag(h, TAG_COL, 1, &tag);
+ print_otag(h, TAG_COL, 1, &tag);
tt = print_otag(h, TAG_TR, 0, NULL);
- PAIR_CLASS_INIT(&tag[0], "foot-date");
- print_otag(h, TAG_TD, 1, tag);
+ PAIR_CLASS_INIT(&tag, "foot-date");
+ print_otag(h, TAG_TD, 1, &tag);
assert(man->date);
print_text(h, man->date);
print_stagq(h, tt);
- PAIR_CLASS_INIT(&tag[0], "foot-os");
- print_otag(h, TAG_TD, 1, tag);
+ PAIR_CLASS_INIT(&tag, "foot-os");
+ print_otag(h, TAG_TD, 1, &tag);
if (man->source)
print_text(h, man->source);
diff --git a/mdoc_html.c b/mdoc_html.c
index 942fc83d..4dcc85bf 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.203 2014/09/27 09:13:39 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.204 2014/09/27 09:20:03 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -484,26 +484,26 @@ print_mdoc_node(MDOC_ARGS)
static void
mdoc_root_post(MDOC_ARGS)
{
- struct htmlpair tag[2];
+ struct htmlpair tag;
struct tag *t, *tt;
- PAIR_CLASS_INIT(&tag[0], "foot");
- t = print_otag(h, TAG_TABLE, 1, tag);
- PAIR_INIT(&tag[0], ATTR_WIDTH, "50%");
- print_otag(h, TAG_COL, 1, tag);
- print_otag(h, TAG_COL, 1, tag);
+ PAIR_CLASS_INIT(&tag, "foot");
+ t = print_otag(h, TAG_TABLE, 1, &tag);
+ PAIR_INIT(&tag, ATTR_WIDTH, "50%");
+ print_otag(h, TAG_COL, 1, &tag);
+ print_otag(h, TAG_COL, 1, &tag);
print_otag(h, TAG_TBODY, 0, NULL);
tt = print_otag(h, TAG_TR, 0, NULL);
- PAIR_CLASS_INIT(&tag[0], "foot-date");
- print_otag(h, TAG_TD, 1, tag);
+ PAIR_CLASS_INIT(&tag, "foot-date");
+ print_otag(h, TAG_TD, 1, &tag);
print_text(h, meta->date);
print_stagq(h, tt);
- PAIR_CLASS_INIT(&tag[0], "foot-os");
- print_otag(h, TAG_TD, 1, tag);
+ PAIR_CLASS_INIT(&tag, "foot-os");
+ print_otag(h, TAG_TD, 1, &tag);
print_text(h, meta->os);
print_tagq(h, t);
}
@@ -511,7 +511,7 @@ mdoc_root_post(MDOC_ARGS)
static int
mdoc_root_pre(MDOC_ARGS)
{
- struct htmlpair tag[2];
+ struct htmlpair tag;
struct tag *t, *tt;
char *volume, *title;
@@ -527,30 +527,29 @@ mdoc_root_pre(MDOC_ARGS)
mandoc_asprintf(&title, "%s(%s)",
meta->title, meta->msec);
- PAIR_CLASS_INIT(&tag[0], "head");
- t = print_otag(h, TAG_TABLE, 1, tag);
- PAIR_INIT(&tag[0], ATTR_WIDTH, "30%");
- print_otag(h, TAG_COL, 1, tag);
- print_otag(h, TAG_COL, 1, tag);
- print_otag(h, TAG_COL, 1, tag);
+ PAIR_CLASS_INIT(&tag, "head");
+ t = print_otag(h, TAG_TABLE, 1, &tag);
+ PAIR_INIT(&tag, ATTR_WIDTH, "30%");
+ print_otag(h, TAG_COL, 1, &tag);
+ print_otag(h, TAG_COL, 1, &tag);
+ print_otag(h, TAG_COL, 1, &tag);
print_otag(h, TAG_TBODY, 0, NULL);
tt = print_otag(h, TAG_TR, 0, NULL);
- PAIR_CLASS_INIT(&tag[0], "head-ltitle");
- print_otag(h, TAG_TD, 1, tag);
+ PAIR_CLASS_INIT(&tag, "head-ltitle");
+ print_otag(h, TAG_TD, 1, &tag);
print_text(h, title);
print_stagq(h, tt);
- PAIR_CLASS_INIT(&tag[0], "head-vol");
- PAIR_INIT(&tag[1], ATTR_ALIGN, "center");
- print_otag(h, TAG_TD, 2, tag);
+ PAIR_CLASS_INIT(&tag, "head-vol");
+ print_otag(h, TAG_TD, 1, &tag);
print_text(h, volume);
print_stagq(h, tt);
- PAIR_CLASS_INIT(&tag[0], "head-rtitle");
- print_otag(h, TAG_TD, 1, tag);
+ PAIR_CLASS_INIT(&tag, "head-rtitle");
+ print_otag(h, TAG_TD, 1, &tag);
print_text(h, title);
print_tagq(h, t);
diff --git a/style.css b/style.css
index 5779e98a..e122dc1b 100644
--- a/style.css
+++ b/style.css
@@ -1,4 +1,4 @@
-/* $Id: style.css,v 1.28 2014/09/27 09:13:39 kristaps Exp $ */
+/* $Id: style.css,v 1.29 2014/09/27 09:20:03 kristaps Exp $ */
/*
* This is an example style-sheet provided for mandoc(1) and the -Thtml
@@ -28,7 +28,7 @@ td.foot-date { width: 50%; } /* Document footer: date. */
td.foot-os { width: 50%; } /* Document footer: OS/source. */
table.head { font-size: smaller; margin-bottom: 1em; border-bottom: 1px dotted #dddddd; } /* Document header. */
td.head-ltitle { width: 10%; } /* Document header: left-title. */
-td.head-vol { width: 80%; text-align: center; } /* Document header: volume. */
+td.head-vol { width: 80%; } /* Document header: volume. */
td.head-rtitle { width: 10%; } /* Document header: right-title. */
/* General font modes. */