texi2html-bug
[Top][All Lists]
Advanced

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

Re: [Texi2html-bug] path to @images with output dir and cwd!=texifiledir


From: Patrice Dumas
Subject: Re: [Texi2html-bug] path to @images with output dir and cwd!=texifiledir
Date: Wed, 13 Aug 2008 16:58:07 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Sun, Aug 10, 2008 at 05:41:31PM +0200, Reinhold Kainhofer wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Patrice,
> Another issue I'm encountering with path names: I have a file with 
>     @image{lily-flat-bw,,,png}
> Now, texi2html seems quite inconsistent with the path to the image if output 
> dir is used:
> 
> Case a) In "testdir/image_relative" run
>     texi2html --split=section --out=out-www/ texi2html_images.texi
> The img in out-www/texi2html_images.html will now be
>        <img src=".././lily-flat-bw.png" alt="png">
> which accidentaly works, but not as intended.

Why not as intended?

> Case b) Now, in "testdir", run 
>     texi2html --split=section --out=images_relative/out-www/  \
>         images_relative/texi2html_images.texi
> The img in images_relative/out-www/texi2html_images.html will be:
>        <img src="../images_relative/lily-flat-bw.png" alt="png">
> Obviously, the link is wrong.

This is a bug. Though I verified that the path from the document to the
working dir is right, I completly messed up the path afterwards. So 
strange. This should be fixed in cvs. Now it is 
src="../../images_relative/lily-flat-bw.png"
which is right (though maybe unnecessarily complicated).

> Case c) Now, in "testdir", run 
>     texi2html --split=section --out=images_relative/out-www/subdir/  \
>         images_relative/texi2html_images.texi
> The img in images_relative/out-www/subdir/texi2html_images.html will also be:
>        <img src="../images_relative/lily-flat-bw.png" alt="png">

Now it is
src="../../../images_relative/lily-flat-bw.png"

> For comparison: makeinfo --html in all cases generates 
>      <img src="lily-flat-bw.png" alt="png">
> i.e. the img file is in the same dir as the html file, which is what I would 
> expect, too.

> Since my original @image call didn't include any path information, shouldn't 
> the output also be without path information? 

It is not obvious. The image files are searched in directories 
relative to the manual directory, with -I taken into account. 
It is what makeinfo does (unless I am missing something) and I 
decided to mimic it in texi2html. But then the paths are wrong if the 
out file is not in the manual directory, so I decided to give the paths
corresponding with the detected image file, otherwise what is the point 
of detecting the image file paths?

Still it is unclear that it is right since I believe that in most
realistic cases of complex out directories, the image files
are to be moved to the directory too. So the image file paths at
document generation time are not relevant. I guess this is your use
case, typical of putting some doc on the web (I ran on this issue too).

This issue popped up on the bug-texinfo list, without a clear solution:

http://lists.gnu.org/archive/html/bug-texinfo/2007-05/msg00017.html

We  really need to draft a specification of what we want, as Karl said
and currently it is very unclear to me. Do you have a clear idea of what
should be the right behaviour?

(interestingly in this thread which is more than one year old I had
already noticed that the paths were broken!!).

--
Pat




reply via email to

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