summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog40
-rw-r--r--font/devhtml/DESC.proto2
-rw-r--r--src/devices/grohtml/html-table.cc45
-rw-r--r--src/devices/grops/grops.man2
-rw-r--r--src/devices/grops/ps.cc6
-rw-r--r--src/roff/troff/env.cc2
-rw-r--r--tmac/an-old.tmac36
-rw-r--r--tmac/html.tmac7
-rw-r--r--tmac/troffrc-end1
9 files changed, 94 insertions, 47 deletions
diff --git a/ChangeLog b/ChangeLog
index a8d3ed40..f4d5f8a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,43 @@
+2003-03-29 Werner LEMBERG <wl@gnu.org>
+
+ * src/roff/troff/env.cc (point_size): Fix emission of html tag.
+ Otherwise, the following code
+
+ .di xxx
+ .ps 10
+ a
+ .br
+ .di
+ x\*[xxx]
+
+ produces `x a' instead of `xa'. This is a temporary fix, disabling
+ font changes in diversions for -Thtml.
+
+ * tmac/an-old.tmac (TH, SH): Use `HTML-TAG-NS' instead of
+ `HTML-TAG'.
+ (an-do-tag-html): Merge with ...
+ (an-do-tag): This macro.
+ Change code slightly to circumvent grohtml bug.
+ * tmac/troffrc-end: Define dummy for HTML-TAG-NS.
+
+ * src/devices/grohtml/html-table.cc (html_table::emit_col,
+ html_table::is_gap): Round `width' properly.
+
+ * tmac/html.tmac: Provide some default layout parameters for
+ grohtml.
+
+ * font/devhtml/DESC.proto: Don't use discrete values for `sizes'
+ command.
+
+2003-03-28 Werner LEMBERG <wl@gnu.org>
+
+ src/devices/grops/ps.cc (ps_printer::do_import): Fix error message.
+
+2003-03-27 Werner LEMBERG <wl@gnu.org>
+
+ * tmac/an-old.tmac (BT): Don't call .tl if register `ps4html' is
+ defined.
+
2003-03-20 Werner LEMBERG <wl@gnu.org>
* src/roff/troff/env.cc (vertical_spacing): Allow zero value for
diff --git a/font/devhtml/DESC.proto b/font/devhtml/DESC.proto
index c3a53a2a..9a2fbe57 100644
--- a/font/devhtml/DESC.proto
+++ b/font/devhtml/DESC.proto
@@ -2,7 +2,7 @@ res 240
hor 24
vert 40
unitwidth 10
-sizes 6 8 10 12 14 16 18 0
+sizes 1-1000 0
fonts 9 R I B BI CR CI CB CBI S
tcommand
html
diff --git a/src/devices/grohtml/html-table.cc b/src/devices/grohtml/html-table.cc
index e7311e89..faf72fa8 100644
--- a/src/devices/grohtml/html-table.cc
+++ b/src/devices/grohtml/html-table.cc
@@ -1,5 +1,5 @@
// -*- C++ -*-
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
*
* Gaius Mulley (gaius@glam.ac.uk) wrote html-table.cc
*
@@ -379,28 +379,50 @@ void html_table::emit_col (int n)
// have we a gap?
if (last_col != NULL) {
if (is_gap(b))
- out->put_string("<td width=\"").put_number(is_gap(b)).put_string("%\"></td>").nl();
+ out->put_string("<td width=\"")
+ .put_number(is_gap(b))
+ .put_string("%\"></td>")
+ .nl();
b = b->next;
}
// move across to column n
while (b != c) {
- width = ((get_right(b) - b->left) * 100)/get_effective_linelength();
- out->put_string("<td width=\"").put_number(width).put_string("%\"></td>").nl();
+ width = ((get_right(b) - b->left)*100 + get_effective_linelength()/2)
+ / get_effective_linelength();
+ if (width)
+ out->put_string("<td width=\"")
+ .put_number(width)
+ .put_string("%\"></td>")
+ .nl();
// have we a gap?
if (is_gap(b))
- out->put_string("<td width=\"").put_number(is_gap(b)).put_string("%\"></td>").nl();
+ out->put_string("<td width=\"")
+ .put_number(is_gap(b))
+ .put_string("%\"></td>")
+ .nl();
b = b->next;
}
- width = ((get_right(b) - b->left) * 100)/get_effective_linelength();
+ width = ((get_right(b) - b->left)*100 + get_effective_linelength()/2)
+ / get_effective_linelength();
switch (b->alignment) {
-
- case 'C': out->put_string("<td width=\"").put_number(width).put_string("%\" align=center>").nl();
+ case 'C':
+ out->put_string("<td width=\"")
+ .put_number(width)
+ .put_string("%\" align=center>")
+ .nl();
break;
- case 'R': out->put_string("<td width=\"").put_number(width).put_string("%\" align=right>").nl();
+ case 'R':
+ out->put_string("<td width=\"")
+ .put_number(width)
+ .put_string("%\" align=right>")
+ .nl();
break;
default:
- out->put_string("<td width=\"").put_number(width).put_string("%\">").nl();
+ out->put_string("<td width=\"")
+ .put_number(width)
+ .put_string("%\">")
+ .nl();
}
// remember column, b
last_col = b;
@@ -600,7 +622,8 @@ int html_table::is_gap (cols *c)
if (c == NULL || c->right == 0 || c->next == NULL)
return 0;
else
- return (c->next->left - c->right)*100/get_effective_linelength();
+ return ((c->next->left - c->right)*100 + get_effective_linelength()/2)
+ / get_effective_linelength();
}
/*
diff --git a/src/devices/grops/grops.man b/src/devices/grops/grops.man
index 47186efa..e9f8f02a 100644
--- a/src/devices/grops/grops.man
+++ b/src/devices/grops/grops.man
@@ -944,7 +944,7 @@ and also a downloadable font called Garamond-Outline
which depends on Garamond
(typically it would be defined to copy Garamond's font dictionary,
and change the PaintType),
-then it is necessary for Garamond to be appear before Garamond-Outline
+then it is necessary for Garamond to appear before Garamond-Outline
in the PostScript document.
.
.B grops
diff --git a/src/devices/grops/ps.cc b/src/devices/grops/ps.cc
index e60d7fcf..4491d7de 100644
--- a/src/devices/grops/ps.cc
+++ b/src/devices/grops/ps.cc
@@ -1704,7 +1704,7 @@ void ps_printer::do_import(char *arg, const environment *env)
return;
}
if (*p != '\0') {
- error("superflous argument `%1' for X import command", p);
+ error("superfluous argument `%1' for X import command", p);
return;
}
int llx = parms[0];
@@ -1753,8 +1753,8 @@ void ps_printer::do_import(char *arg, const environment *env)
.put_symbol("PBEGIN");
rm.import_file(arg, out);
// do this here just in case application defines PEND
- out.put_symbol("end");
- out.put_symbol("PEND");
+ out.put_symbol("end")
+ .put_symbol("PEND");
}
void ps_printer::do_invis(char *, const environment *)
diff --git a/src/roff/troff/env.cc b/src/roff/troff/env.cc
index 14d571d6..9e094511 100644
--- a/src/roff/troff/env.cc
+++ b/src/roff/troff/env.cc
@@ -1164,7 +1164,7 @@ void point_size()
if (n <= 0)
n = 1;
curenv->set_size(n);
- curenv->add_html_tag(1, ".ps", n);
+ curenv->add_html_tag(0, ".ps", n);
}
else
curenv->set_size(0);
diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index dc886157..7100218c 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -95,7 +95,7 @@
.\" .TH title section extra1 extra2 extra3
.de1 TH
. if \\n[an-html] \{\
-. HTML-TAG ".tl"
+. HTML-TAG-NS ".tl"
\\$1
. \}
.
@@ -208,6 +208,8 @@
..
.
.de1 BT
+. if r ps4html \
+. return
. ie \\n[D] \{\
. if o .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
. if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]'
@@ -290,7 +292,7 @@
. fi
. in \\n[an-margin]u
. ti 0
-. HTML-TAG ".NH \\n[an-level]"
+. HTML-TAG-NS ".NH \\n[an-level]"
. it 1 an-trap
. nr an-no-space-flag 1
. nr an-break-flag 1
@@ -368,10 +370,10 @@
..
.
.de an-do-tag
-. nr an-div? 0
. br
-. ll
. di
+. nr an-div? 0
+. ll
. ie (\\n[dl] + \\n[an-tag-sep] > \\n[an-prevailing-indent]) \{\
. in \\n[an-margin]u
. ne (2v + 1u)
@@ -387,26 +389,8 @@
. ti -\\n[an-prevailing-indent]u
. chop an-div
. ne (1v + 1u)
-\\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c
-. \}
-..
-.
-.de an-do-tag-html
-. nr an-div? 0
-. br
-. ll
-. di
-. ie ((\\n[dl] + \\n[an-tag-sep]) > \\n[an-prevailing-indent]) \{\
-. in \\n[an-margin]u
-. an-div
-. in (\\n[an-margin]u + \\n[an-prevailing-indent]u + \\n[an-tag-sep]u)
-. \}
-. el \{\
-. in (\\n[an-margin]u + \\n[an-prevailing-indent]u + \\n[an-tag-sep]u)
-. ti \\n[an-margin]u
-. chop an-div
. HTML-TAG-NS ".col 1"
-\\*[an-div]\\h'|\\n[an-prevailing-indent]u'\\h'\\n[an-tag-sep]u'\c
+\\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c
. HTML-TAG-NS ".col 2"
. \}
..
@@ -591,11 +575,7 @@
.ds lq \(lq
.ds rq \(rq
.
-.ie \n[an-html] \{\
-. rm an-do-tag
-. als an-do-tag an-do-tag-html
-.\}
-.el \{\
+.if !\n[an-html] \{\
. if !rHY .nr HY 14
. hy \n[HY]
.\}
diff --git a/tmac/html.tmac b/tmac/html.tmac
index cd30c28d..0a3cf31b 100644
--- a/tmac/html.tmac
+++ b/tmac/html.tmac
@@ -708,6 +708,9 @@
.el \
. do mso cp1047.tmac
.
-.\" tell grohtml the page offset
-.po
+.\" tell grohtml some default parameter values
+.po \n[.o]u
+.ll \n[.l]u
+.ta \n[.tabs]
+.
.\" end of file, make sure this is the last line
diff --git a/tmac/troffrc-end b/tmac/troffrc-end
index 928c923d..1dba113c 100644
--- a/tmac/troffrc-end
+++ b/tmac/troffrc-end
@@ -14,6 +14,7 @@
.do if !d HTML-IMAGE-LEFT .do ds HTML-IMAGE-LEFT
.do if !d HTML-IMAGE-END .do ds HTML-IMAGE-END
.do if !d HTML-TAG .do ds HTML-TAG
+.do if !d HTML-TAG-NS .do ds HTML-TAG-NS
.do if !d HTML-DO-IMAGE .do ds HTML-DO-IMAGE
.
.\" Don't let blank lines creep in here.