[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Re: formatting bugs in grohtml
From: |
Gaius Mulley |
Subject: |
[Groff] Re: formatting bugs in grohtml |
Date: |
Mon, 09 Sep 2002 15:40:11 +0100 |
> please look at the example man page below. Two problems:
>
> . The 'in trick fails miserably. Can you fix this? I think I've
> reported this already ages ago, but I forgot to insist :-)
Hi Werner,
here is a patch for the first of the two bugs reported. Also I've
tidied up the web page text position and fixed a very minor dependency
in doc/Makefile.in.
Thanks for reporting both bugs and reminding me about the first :-)
Gaius
--- groff-cvs/doc/webpage.ms Sun Sep 8 15:34:44 2002
+++ groff-html/doc/webpage.ms Mon Sep 9 12:58:22 2002
@@ -34,9 +34,9 @@
.HTML-IMAGE-LEFT
.PSPIC -L gnu.eps 2i 2i
.ie r ps4html \
-. nop \v'-0.75i'\h'2.0i'\s[100]\*[GNU] Troff\s0
+. nop \v'-0.66i'\h'2.0i'\s[100]\*[GNU] Troff\s0
.el \
-. nop \v'-0.75i'\h'2.0i'\s[60]\*[GNU] Troff\s0
+. nop \v'-0.66i'\h'2.0i'\s[60]\*[GNU] Troff\s0
.HTML-IMAGE-END
.
.HnS 1
--- groff-cvs/doc/Makefile.in Fri Sep 6 01:24:57 2002
+++ groff-html/doc/Makefile.in Mon Sep 9 12:50:06 2002
@@ -114,7 +114,7 @@
gnu.png: gnu.xpm
xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 | pnmtopng >$@
-webpage.html: webpage.ms gnu.png
+webpage.html: webpage.ms gnu.png gnu.eps
webpage.ps: gnu.eps
grnexmpl.ps: grnexmpl.me grnexmpl.g
--- groff-cvs/src/roff/troff/env.cc Fri Jul 19 10:32:03 2002
+++ groff-html/src/roff/troff/env.cc Mon Sep 9 14:40:02 2002
@@ -1383,7 +1383,8 @@
curenv->have_temporary_indent = 0;
curenv->prev_indent = curenv->indent;
curenv->indent = temp;
- curenv->add_html_tag(1, ".in", temp.to_units());
+ if (break_flag)
+ curenv->add_html_tag(1, ".in", temp.to_units());
tok.next();
}
--- groff-cvs/src/devices/grohtml/post-html.cc Thu Aug 22 12:58:50 2002
+++ groff-html/src/devices/grohtml/post-html.cc Mon Sep 9 15:23:15 2002
@@ -372,7 +372,6 @@
int is_eol (void);
int is_auto_img (void);
int is_br (void);
- int is_br_ni (void);
int is_in (void);
int is_po (void);
int is_ti (void);
@@ -696,19 +695,6 @@
{
return( is_a_tag() && ((strcmp ("html-tag:.br", text_string) == 0) ||
(strncmp("html-tag:.sp", text_string, 11) == 0) ||
- (strcmp ("html-tag:.ce", text_string) == 0) ||
- (strncmp ("html-tag:.in", text_string, 11) == 0)) );
-}
-
-/*
- * is_br_ni - returns TRUE if the glob is a tag containing a .br
- * or an implied .br, but not an .in
- */
-
-int text_glob::is_br_ni (void)
-{
- return( is_a_tag() && ((strcmp ("html-tag:.br", text_string) == 0) ||
- (strncmp("html-tag:.sp", text_string, 11) == 0) ||
(strcmp ("html-tag:.ce", text_string) == 0)) );
}
@@ -2239,7 +2225,7 @@
t->set_linelength(max_linelength);
t->add_indent(pageoffset);
- t->emit_table_header(need_space);
+ t->emit_table_header(FALSE);
}
table = t;
@@ -2841,11 +2827,11 @@
last = g;
found_col = FALSE;
}
- } else if (g->is_br_ni() || (nf && g->is_eol())) {
+ } else if (g->is_br() || (nf && g->is_eol())) {
do {
g = page_contents->glyphs.move_right_get_data();
nf = calc_nf(g, nf);
- } while ((g != NULL) && (g->is_br_ni() || (nf && g->is_eol())));
+ } while ((g != NULL) && (g->is_br() || (nf && g->is_eol())));
start_of_line = g;
seen_text = FALSE;
ncol = 0;
@@ -3580,12 +3566,9 @@
/*
* 'HTML: The definitive guide', O'Reilly, p47. advises against specifying
- * the dtd, so for the moment I'll leave this commented out.
- * If requested we could always emit it if a command line switch
- * was present.
- *
- * fputs("<!doctype html public \"-//IETF//DTD HTML 4.0//EN\">\n", stdout);
+ * the dtd.
*/
+ // fputs("<!doctype html public \"-//IETF//DTD HTML 4.0//EN\"
\"http://www.w3.org/TR/REC-html40/strict.dtd\">\n", stdout);
fputs("<html>\n", stdout);
fputs("<head>\n", stdout);
fputs("<meta name=\"generator\" content=\"groff -Thtml, see
www.gnu.org\">\n", stdout);
--- groff-cvs/src/devices/grohtml/html-text.cc Wed Aug 7 16:01:32 2002
+++ groff-html/src/devices/grohtml/html-text.cc Mon Sep 9 15:17:01 2002
@@ -220,7 +220,7 @@
} else {
out->nl();
out->simple_comment("INDENTATION");
- t->indent->begin(start_space);
+ t->indent->begin(FALSE);
start_space = FALSE;
issue_tag("<p", (char *)t->arg1);
}
@@ -232,7 +232,7 @@
case PRE_TAG: if (t->indent != NULL) {
out->nl();
out->simple_comment("INDENTATION");
- t->indent->begin(start_space);
+ t->indent->begin(FALSE);
start_space = FALSE;
}
out->enable_newlines(TRUE);