bug-texinfo
[Top][All Lists]
Advanced

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

Re: bad relative urls in texinfo-4.0f


From: Eli Zaretskii
Subject: Re: bad relative urls in texinfo-4.0f
Date: Fri, 01 Feb 2002 11:34:55 +0200

> Date: Thu, 31 Jan 2002 17:07:01 -0800
> From: Per Bothner <address@hidden>
> 
> > You know that when you process the @node line, but not when you process 
> > the @xref command.  Especially if it's a forward reference, let alone a 
> > reference to another document (which might not even exist yet).  This is 
> > _the_ most important reason for adding those anchors.  I don't see any 
> > way to solve this complication without having the anchors.
> 
> How about a compromise:  Use the #foo anchors for cross-references, but
> leave them out for Next, Prev, and menus, assuming you know are
> generating at least one node for the referenced node.

Sorry, I don't see the difference between Next/Prev and menus on the
one hand, and cross-references on the other.  They are all references
to other nodes, and so suffer from the same problem: when you
generate the link, you don't know whether the target of the link will
be alone on its file.  This is especially true for menus and Next
links, which are almost _always_ processed *before* the nodes they
point to (assuming the author wrote the Texinfo source in the usual
depth-first manner).

Am I missing something?

> Besides, if the option is split-by-node, or no-split, there is never a
> need to use the anchors.

This I don't understand at all.  If you use --no-split, you _must_
have anchors, otherwise clicking on Next will get you to the beginning
of the file, i.e. to the TOC.  IIRC, Texinfo 4.0, which only supported
the no-split mode, always produced anchors.

As for split-by-node, which is the default in the current pretests,
we could avoid the anchors only if we knew that each file has exactly
one node.  But this is impossible to ensure, due to possible clashes
between file names produced from different nodes.  This is the whole
issue we were discussing all along in this thread, right?

> >>Who cares about slow-down?
> > I do.
> 
> Compiling texinfo to html is not done interactively, and it is
> plenty fast enough as it is.  Adding an extra pass *if* it seems
> neceaarily should be ok.

It will always be necessary, and it will roughly double the running
time.  (You need to scan all the files, gather all the references,
and fix those which refer to nodes that are first on their files.)

> > As I mentioned above, you see these #Foo things in lots of HTML 
> > documents.  It's not that Texinfo is the only one.
> 
> Yes, but most other documents don't use #Foo to refer to the top
> or entirety of the document.

It should be possible to give up the anchors for the first node on
each file.  The problem is to know, for any given node, whether it is
the first on its file or not.



reply via email to

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