summaryrefslogtreecommitdiffstats
path: root/man_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2011-10-09 22:10:53 +0000
committerIngo Schwarze <schwarze@openbsd.org>2011-10-09 22:10:53 +0000
commit14297a71223fc5ff079a17f339ddbf603eaca3bf (patch)
tree61a5348244d62a4abb46ed155bc58f9a5f24ab60 /man_html.c
parentf8c77ebc9cfb18899e0979444a400bc386212579 (diff)
downloadmandoc-14297a71223fc5ff079a17f339ddbf603eaca3bf.tar.gz
Always print <table> column widths in -T[x]html;
if desired, they can be overridden in the CSS file. Suggested by kristaps@, and i always like to simplify code.
Diffstat (limited to 'man_html.c')
-rw-r--r--man_html.c52
1 files changed, 17 insertions, 35 deletions
diff --git a/man_html.c b/man_html.c
index 050bc84a..f02201da 100644
--- a/man_html.c
+++ b/man_html.c
@@ -309,15 +309,12 @@ man_root_pre(MAN_ARGS)
PAIR_SUMMARY_INIT(&tag[0], "Document Header");
PAIR_CLASS_INIT(&tag[1], "head");
- if (NULL == h->style) {
- PAIR_INIT(&tag[2], ATTR_WIDTH, "100%");
- t = print_otag(h, TAG_TABLE, 3, 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);
- } else
- t = print_otag(h, TAG_TABLE, 2, tag);
+ PAIR_INIT(&tag[2], ATTR_WIDTH, "100%");
+ t = print_otag(h, TAG_TABLE, 3, 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);
print_otag(h, TAG_TBODY, 0, NULL);
@@ -325,27 +322,18 @@ man_root_pre(MAN_ARGS)
PAIR_CLASS_INIT(&tag[0], "head-ltitle");
print_otag(h, TAG_TD, 1, tag);
-
print_text(h, title);
print_stagq(h, tt);
PAIR_CLASS_INIT(&tag[0], "head-vol");
- if (NULL == h->style) {
- PAIR_INIT(&tag[1], ATTR_ALIGN, "center");
- print_otag(h, TAG_TD, 2, tag);
- } else
- print_otag(h, TAG_TD, 1, tag);
-
+ PAIR_INIT(&tag[1], ATTR_ALIGN, "center");
+ print_otag(h, TAG_TD, 2, tag);
print_text(h, b);
print_stagq(h, tt);
PAIR_CLASS_INIT(&tag[0], "head-rtitle");
- if (NULL == h->style) {
- PAIR_INIT(&tag[1], ATTR_ALIGN, "right");
- print_otag(h, TAG_TD, 2, tag);
- } else
- print_otag(h, TAG_TD, 1, tag);
-
+ PAIR_INIT(&tag[1], ATTR_ALIGN, "right");
+ print_otag(h, TAG_TD, 2, tag);
print_text(h, title);
print_tagq(h, t);
}
@@ -360,14 +348,11 @@ man_root_post(MAN_ARGS)
PAIR_SUMMARY_INIT(&tag[0], "Document Footer");
PAIR_CLASS_INIT(&tag[1], "foot");
- if (NULL == h->style) {
- PAIR_INIT(&tag[2], ATTR_WIDTH, "100%");
- t = print_otag(h, TAG_TABLE, 3, tag);
- PAIR_INIT(&tag[0], ATTR_WIDTH, "50%");
- print_otag(h, TAG_COL, 1, tag);
- print_otag(h, TAG_COL, 1, tag);
- } else
- t = print_otag(h, TAG_TABLE, 2, tag);
+ PAIR_INIT(&tag[2], ATTR_WIDTH, "100%");
+ t = print_otag(h, TAG_TABLE, 3, tag);
+ PAIR_INIT(&tag[0], 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);
@@ -378,11 +363,8 @@ man_root_post(MAN_ARGS)
print_stagq(h, tt);
PAIR_CLASS_INIT(&tag[0], "foot-os");
- if (NULL == h->style) {
- PAIR_INIT(&tag[1], ATTR_ALIGN, "right");
- print_otag(h, TAG_TD, 2, tag);
- } else
- print_otag(h, TAG_TD, 1, tag);
+ PAIR_INIT(&tag[1], ATTR_ALIGN, "right");
+ print_otag(h, TAG_TD, 2, tag);
if (m->source)
print_text(h, m->source);