[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] Grohtml patch, bugs

From: Larry Kollar
Subject: [Groff] Grohtml patch, bugs
Date: Mon, 7 Jun 2004 16:55:46 -0400

The patch to html-table.cpp below replaces the "paragraph wrapped 
around the table" scheme to add spacing with a STYLE attribute. This 
isn't completely the Right Way to do it, which would be a CLASS 
attribute controlled by a styleshee, but I think it's an improvement.

Gaius, if you have the time/opportunity, could you download the tarball 
at and have a look at a 
couple of things?

  - fixhtml.sed cleans up some spacing issues that shouldn't need
    cleaning up. :-)

  - Author info is wrapped in an "INDENTATION" table so the
    author string is just right of center. I looked at s.tmac but I'm not sure
    what's causing it.

  - Macros creating the <dl> list are getting wrapped in paragraph tags.
    Is there any way to make that not happen?

  - Finally, footnote markers are getting wrapped like this:
    <small><small>1</small></small> instead of <sup>1</sup>

Lest I sound like I'm complaining overly much, I have to say I'm 
surprised at how well the HTML output works with a little one-time 
effort up front. It certainly looks better than the product of most 
graphical HTML editors.


Oh yeah, the patch (extract from cvs diff -u)...

Index: src/devices/grohtml/html-table.cpp
RCS file: /var/cvs/groff/src/devices/grohtml/html-table.cpp,v
retrieving revision 1.1
diff -u -r1.1 html-table.cpp
--- src/devices/grohtml/html-table.cpp  15 Apr 2003 15:13:21 -0000      
+++ src/devices/grohtml/html-table.cpp  7 Jun 2004 20:15:31 -0000
@@ -326,10 +326,16 @@
-    if (space)
-      out->put_string("<p>");
     start_space = space;
-    out->put_string("<table width=\"100%\" border=0 rules=\"none\" 
frame=\"void\"\n       cols=\"").put_number(n).put_string("\" 
cellspacing=\"0\" cellpadding=\"0\">").nl();
+    out->put_string("<table width=\"100%\"")
+        .put_string(" border=0 rules=\"none\" frame=\"void\"\n")
+        .put_string("       cols=\"")
+        .put_number(n)
+        .put_string("\" cellspacing=\"0\" cellpadding=\"0\"")
+        .put_string(start_space ? " style=\"margin-top: 8px; margin-
bottom: 8px\"" : "")
+        .put_string(">")
+        .nl();
     out->put_string("<tr valign=\"top\" align=\"left\">").nl();
@@ -470,8 +476,6 @@
   // out->put_string("linelength = ").put_number(linelength).nl();
-  if (start_space)
-    out->put_string("</p>");

reply via email to

[Prev in Thread] Current Thread [Next in Thread]