First, I have no idea if this patch is correct or should ever be
applied to mainline explode.c.  It makes the LDS scriptures in plucker
format from ldspda.com MUCH nicer in html.  So I figured if I put it
here, maybe others could find it even if it shouldn't get included.

The main problem I had with exploding these documents is footnootes.
For example, if the document contained the phrase "a man" with
footnote "a" on the word man, the html would look like "aaman" with an
anchor tag around "aman".  That's hard to read, especially when there
are LOTS of footnotes.

This patch adds a space and superscripts (<sup> tag) the footnote.

The lack of space around the font change seems to be a generic
problem, either with explode or the particular docs I'm using.  But I
couldn't quickly find a general solution for it.

I don't know the plucker format well enough to know if this is correct
or generally applicable, or, more importantly how it affects the
pluckability (what the plucker doc would look like if the resulting
html were plucked) but it works for me.

FWIW,
Barry Roberts
--- explode.c.orig      2004-05-06 08:24:50.339778520 -0600
+++ explode.c   2004-05-02 23:40:55.000000000 -0600
@@ -1251,7 +1251,7 @@
                         else if (bytes && (fclen == 4)) {
                             AddRecord (record_id);
                             real_record_id = GetPageID (record_id);
-                            fprintf (fp, "<a href=\"r%d.html#r%dpara%d\">",
+                            fprintf (fp, " <a href=\"r%d.html#r%dpara%d\">",
                                      real_record_id, record_id,
                                      (ptr[2] << 8) + ptr[3]);
                             current_link = TRUE;
@@ -1296,6 +1296,9 @@
                         else if (current_font == 8) {
                             fprintf (fp, "</tt>");
                         }
+                        else if (current_font == 11) {
+                          fprintf (fp, "</sup>");
+                        }
 
                         if (*ptr == 1) {
                             fprintf (fp, "<h1>");
@@ -1321,6 +1324,9 @@
                         else if (*ptr == 8) {
                             fprintf (fp, "<tt>");
                         }
+                        else if (*ptr == 11) {
+                          fprintf (fp, "<sup>");
+                        }
 
                         current_font = *ptr;
                     }

Reply via email to