bug-texinfo
[Top][All Lists]
Advanced

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

Re: address@hidden: [gnits] texinfo 4.0a pretest available]


From: Jan Nieuwenhuizen
Subject: Re: address@hidden: [gnits] texinfo 4.0a pretest available]
Date: 27 Dec 2000 21:52:42 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

address@hidden writes:

> I've made a very preliminary texinfo pretest available at:
> ftp://texinfo.org/texinfo/texinfo-4.0a.tar.gz

Here's a small set of fixes, some toc fixes for avoiding double
entries from @sub sections, and a toplevel external document reference
fix (two actually, one #if 0'd, choose yourself).

Otherwise, it looks fine,
thanks,
Jan.

--- ./makeinfo/toc.c.orig       Wed Dec 27 19:33:36 2000
+++ ./makeinfo/toc.c    Wed Dec 27 19:33:33 2000
@@ -235,8 +235,10 @@
           for (k = 0; k < (last_level-toc_entry_alist[i]->level); k++)
             fputs ("</ul>\n", fp);
         }
-
-      if (splitting)
+      /* No Top or double entries in toc */
+      if (splitting && strcasecmp (toc_entry_alist[i]->name, "Top")
+         && i && strcmp (toc_entry_alist[i]->name,
+                         toc_entry_alist[i-1]->name))
        {
          char *filename = nodename_to_filename (toc_entry_alist[i]->name);
          fprintf (fp, "<li><a href=\"%s\">%s</a>\n",
@@ -244,7 +246,7 @@
                   toc_entry_alist[i]->name);
          free (filename);
        }
-      else
+      else if (!splitting)
        fprintf (fp, "<li><a href=\"#%s</a>\n", toc_entry_alist[i]->name);
 
       last_level = toc_entry_alist[i]->level;
@@ -309,7 +311,10 @@
     {
       if ((toc_entry_alist[i])->level == 0)
         {
-         if (splitting)
+         /* No Top or double entries in toc */
+         if (splitting && strcasecmp (toc_entry_alist[i]->name, "Top")
+             && i && strcmp (toc_entry_alist[i]->name,
+                             toc_entry_alist[i-1]->name))
            {
              char *filename = nodename_to_filename (toc_entry_alist[i]->name);
              fprintf (fp, "<li><a href=\"%s\">%s</a>\n",
@@ -317,7 +322,7 @@
                   toc_entry_alist[i]->name);
              free (filename);
            }
-         else
+         else if (!splitting)
            {
              fputs ("<li>", fp);
              fprintf (fp, "<a href=\"#%s\n", toc_entry_alist[i]->name);
--- ./makeinfo/html.c.orig      Wed Dec 27 19:24:35 2000
+++ ./makeinfo/html.c   Wed Dec 27 21:48:27 2000
@@ -275,7 +275,17 @@
       p++;
       /* in the case of just (info-document), there will be nothing
          remaining, and we will refer to ../info-document/, which will
-         work fine. */
+         work fine. 
+       */
+      if (*p == '\0')
+        {
+#if 0
+         p = "index";
+#else
+         /* Otherwise, return here, otherwise we get `info-document/#.html' */
+         return filename;
+#endif
+        }
     }
 
   strcat (filename, p);


-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org




reply via email to

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