(Message archief/2000/verstuurd:2401)
Sender: fred@appel.lilypond.org
To: karl@freefriends.org
Cc: bug-texinfo@gnu.org
Subject: Re: [karl@gnu.org: [gnits] texinfo 4.0a pretest available]
References: <200012231512.KAA19718@billohost.com>
Organization: Jan at Appel
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: 27 Dec 2000 21:52:42 +0100
In-Reply-To: karl@freefriends.org's message of "Sat, 23 Dec 2000 10:12:15 -0500"
Message-ID: <m3vgs537tx.fsf@appel.lilypond.org>
User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 84
Xref: appel.lilypond.org vers:2401

karl@freefriends.org 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 <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org

