Re: Displaying images for html output

2020-11-29 Thread Patrice Dumas
On Sun, Nov 22, 2020 at 05:30:49PM +, Gavin Smith wrote:
> On Sun, Nov 22, 2020 at 06:14:33PM +0100, Patrice Dumas wrote:
> > > Also, what if the image files are out-of-date?
> > 
> > I think that we should not care about that case. As long as the file
> > exists, even if, for instance it is a broken link, we do nothing.
> 
> What's the rationale for this?  Why not check the file modification
> time and copy it if the file is newer than the file that is there
> already?

The idea is to do as least as possible to avoid 
* running into cross platform issues.  For instance looking at file 
  modification time, is it portable?  Does it make sense for every
  file system?
* doing something the user would not want, for instance if the user
  wants to substitute the file found by texi2any by another, or use 
  dangling symlinks.

> I imagine there could be a problem where someone edits the text of the
> manual and edits an image file with a diagram, runs texi2any, and expects
> the manual to be fully updated.

That's a risk too, but I am not sure that it weights more than the two
above.

-- 
Pat



Re: Displaying images for html output

2020-11-22 Thread Christopher Dimech


> Sent: Sunday, November 22, 2020 at 6:46 PM
> From: "Gavin Smith" 
> To: "Christopher Dimech" 
> Cc: "help-texinfo gnu" 
> Subject: Re: Displaying images for html output
>
> On Wed, Nov 18, 2020 at 09:47:09PM +, Gavin Smith wrote:
> > On Wed, Nov 18, 2020 at 10:15:40PM +0100, Christopher Dimech wrote:
> > > > > Thanks for sending the input and the output.  This problem only occurs
> > > > > when the image file is not found.  I've tried to fix it in commit
> > > > > e2d579377.
> > > >
> > > > Does it really! I have to check that out, give me a moment.
> > >
> > > No.  The file exists and I use the correct path relative to
> > > index.html. So the path is correct as far as html is concerned.
> >
> > As you said in another email the file name should be relative to
> > the Texinfo file for consistency with other output formats.
> >
> > I doubt that relative names beginning "../" were much considered
> > when @image was implemented (or even file names with directory parts
> > at all).
> >
> > I haven't thought of a clear answer for this issue yet.  I think that
> > for split output, the image files need to be copied into the output
> > directory and the file names should be given under that, not beginning
> > "../".  Alternatively, you could create a symbolic link to a directory
> > containing the image files under the output directory.
>
> Another idea which I didn't think of before is, when the file
> name begins ../, to transform this for split output by adding an
> additional ../ to the front.  Then the relative name would be correct
> for split output.  I don't support this idea, though: I think that
> it's wrong for file names for images to begin with ../ as these names
> are relative to the .texi input file, not for the HTML output files
> which could be copied away from the .texi input file to another location.

There exists the problem that for html, it is likely that one will use images 
with
reduced number of pixels, otherwise the image will be excessively large when 
compared
to the text.  This will produce a low resolution image when using dvi and pdf 
output.

> What could work, though, is just to strip all directories from the
> file name when outputing the  elements, as well as copying the
> image files into the output directory.  Then the output HTML manual
> would be complete.  This wouldn't work in case there were two
> image files ../a/foo.png and ../b/foo.png but in that case you should
> run texi2any -I .. and specify the names as a/foo.png and b/foo.png,
> which would cause a and b directories to be created in the output
> directory under the change we are considering.
>
>



Re: Displaying images for html output

2020-11-22 Thread Gavin Smith
On Wed, Nov 18, 2020 at 09:47:09PM +, Gavin Smith wrote:
> On Wed, Nov 18, 2020 at 10:15:40PM +0100, Christopher Dimech wrote:
> > > > Thanks for sending the input and the output.  This problem only occurs
> > > > when the image file is not found.  I've tried to fix it in commit
> > > > e2d579377.
> > >
> > > Does it really! I have to check that out, give me a moment.
> > 
> > No.  The file exists and I use the correct path relative to
> > index.html. So the path is correct as far as html is concerned.
> 
> As you said in another email the file name should be relative to
> the Texinfo file for consistency with other output formats.
> 
> I doubt that relative names beginning "../" were much considered
> when @image was implemented (or even file names with directory parts
> at all).
> 
> I haven't thought of a clear answer for this issue yet.  I think that
> for split output, the image files need to be copied into the output
> directory and the file names should be given under that, not beginning
> "../".  Alternatively, you could create a symbolic link to a directory
> containing the image files under the output directory.

Another idea which I didn't think of before is, when the file
name begins ../, to transform this for split output by adding an
additional ../ to the front.  Then the relative name would be correct
for split output.  I don't support this idea, though: I think that
it's wrong for file names for images to begin with ../ as these names
are relative to the .texi input file, not for the HTML output files
which could be copied away from the .texi input file to another location.

What could work, though, is just to strip all directories from the
file name when outputing the  elements, as well as copying the
image files into the output directory.  Then the output HTML manual
would be complete.  This wouldn't work in case there were two
image files ../a/foo.png and ../b/foo.png but in that case you should
run texi2any -I .. and specify the names as a/foo.png and b/foo.png,
which would cause a and b directories to be created in the output
directory under the change we are considering.




Re: Displaying images for html output

2020-11-22 Thread Gavin Smith
On Sun, Nov 22, 2020 at 06:14:33PM +0100, Patrice Dumas wrote:
> > Also, what if the image files are out-of-date?
> 
> I think that we should not care about that case. As long as the file
> exists, even if, for instance it is a broken link, we do nothing.

What's the rationale for this?  Why not check the file modification
time and copy it if the file is newer than the file that is there
already?

I imagine there could be a problem where someone edits the text of the
manual and edits an image file with a diagram, runs texi2any, and expects
the manual to be fully updated.



Re: Displaying images for html output

2020-11-22 Thread Patrice Dumas
On Sun, Nov 22, 2020 at 09:02:17AM +, Gavin Smith wrote:
> On Sun, Nov 22, 2020 at 12:46:35AM +0100, Patrice Dumas wrote:
> > I think that
> > the point is to copy the image file from where it is found to the
> > destination directory.
> 
> Could this break the build systems of any existing manuals that use images?
> Are there any manuals that we could check?

It could be possible to reach GNU maintainers for GNU manuals if needed
and also to post on gnu-system-discuss (though I am not 100% sure who 
reads this list).
 
> Also, what if the image files are out-of-date?

I think that we should not care about that case. As long as the file
exists, even if, for instance it is a broken link, we do nothing.

> I looked at the gendocs.sh script from gnulib, which would be one of
> the most usual ways for people to generate HTML manuals that they
> will upload to a website.  It does take care of copying images,
> copying them after running texi2any.  This should be harmless if it
> does it twice, just potentially slow if a manual has many images, but
> gendocs.sh could potentially be altered to check if the files already
> exist.

Indeed.

> It could be a benefit if texi2any does it instead of gendocs.sh, as there
> is this comment in gendocs.sh, at the copy_images function:
> 
> # copy_images OUTDIR HTML-FILE...
> # ---
> # Copy all the images needed by the HTML-FILEs into OUTDIR.
> # Look for them in . and the -I directories; this is simpler than what
> # makeinfo supports with -I, but hopefully it will suffice.

I think that this is indeed better if texi2any does it instead of an
emulation in gendocs.sh, less risks for confusion.

-- 
Pat



Re: Displaying images for html output

2020-11-22 Thread Christopher Dimech



> Sent: Sunday, November 22, 2020 at 10:02 AM
> From: "Gavin Smith" 
> To: "Patrice Dumas" , "Christopher Dimech" 
> , "help-texinfo gnu" 
> Subject: Re: Displaying images for html output
>
> On Sun, Nov 22, 2020 at 12:46:35AM +0100, Patrice Dumas wrote:
> > I think that
> > the point is to copy the image file from where it is found to the
> > destination directory.
>
> Could this break the build systems of any existing manuals that use images?
> Are there any manuals that we could check?
>
> Also, what if the image files are out-of-date?
>
> I looked at the gendocs.sh script from gnulib, which would be one of
> the most usual ways for people to generate HTML manuals that they
> will upload to a website.  It does take care of copying images,
> copying them after running texi2any.  This should be harmless if it
> does it twice, just potentially slow if a manual has many images, but
> gendocs.sh could potentially be altered to check if the files already
> exist.
>
> It could be a benefit if texi2any does it instead of gendocs.sh, as there
> is this comment in gendocs.sh, at the copy_images function:
>
> # copy_images OUTDIR HTML-FILE...
> # ---
> # Copy all the images needed by the HTML-FILEs into OUTDIR.
> # Look for them in . and the -I directories; this is simpler than what
> # makeinfo supports with -I, but hopefully it will suffice.
>
> I'm thinking that Texinfo's manual needs some images in it, for the dual
> benefit of testing, and of showing people reading the Texinfo manual that
> images actually are supported.  Some ideas:
>
> These could be a proper diagrams, instead of ASCII art:
>
> https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Tree-Structuring.html#Tree-Structuring
>
> https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Heading-Format.html
>
> Does Anybody want to create this?  We'd need at least a .png version,
> and optionally a .eps version for dvi output.  It should be in black
> and white or at least look good in greyscale.
>
> Some manual-related humour, if we could get permission from the author
> (the non-commercial licence is no good):  https://xkcd.com/1343/
>
> Maybe some photographs of old (historically important?) manuals (for
> software or otherwise), or of somebody reading a book while fixing
> something, to show the human side and importance of good documentation,
> if anybody has an idea for something appropriate.  Perhaps with a
> caption like "systems are useless unless users understand how to
> use them".

I can do that.

Regards
Christopher




Re: Displaying images for html output

2020-11-22 Thread Gavin Smith
On Sun, Nov 22, 2020 at 12:46:35AM +0100, Patrice Dumas wrote:
> I think that
> the point is to copy the image file from where it is found to the
> destination directory.

Could this break the build systems of any existing manuals that use images?
Are there any manuals that we could check?

Also, what if the image files are out-of-date?

I looked at the gendocs.sh script from gnulib, which would be one of
the most usual ways for people to generate HTML manuals that they
will upload to a website.  It does take care of copying images,
copying them after running texi2any.  This should be harmless if it
does it twice, just potentially slow if a manual has many images, but
gendocs.sh could potentially be altered to check if the files already
exist.

It could be a benefit if texi2any does it instead of gendocs.sh, as there
is this comment in gendocs.sh, at the copy_images function:

# copy_images OUTDIR HTML-FILE...
# ---
# Copy all the images needed by the HTML-FILEs into OUTDIR.
# Look for them in . and the -I directories; this is simpler than what
# makeinfo supports with -I, but hopefully it will suffice.

I'm thinking that Texinfo's manual needs some images in it, for the dual
benefit of testing, and of showing people reading the Texinfo manual that
images actually are supported.  Some ideas:

These could be a proper diagrams, instead of ASCII art:

https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Tree-Structuring.html#Tree-Structuring

https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Heading-Format.html

Does Anybody want to create this?  We'd need at least a .png version,
and optionally a .eps version for dvi output.  It should be in black
and white or at least look good in greyscale.

Some manual-related humour, if we could get permission from the author
(the non-commercial licence is no good):  https://xkcd.com/1343/

Maybe some photographs of old (historically important?) manuals (for
software or otherwise), or of somebody reading a book while fixing
something, to show the human side and importance of good documentation,
if anybody has an idea for something appropriate.  Perhaps with a
caption like "systems are useless unless users understand how to
use them".



Re: Displaying images for html output

2020-11-21 Thread Christopher Dimech



> Sent: Sunday, November 22, 2020 at 12:46 AM
> From: "Patrice Dumas" 
> To: "Gavin Smith" 
> Cc: "Christopher Dimech" , "help-texinfo gnu" 
> 
> Subject: Re: Displaying images for html output
>
> On Sat, Nov 21, 2020 at 05:20:00PM +, Gavin Smith wrote:
> > On Thu, Nov 19, 2020 at 10:11 PM Patrice Dumas  wrote:
> > > I think that if the path does not starts with . or .. or is an absolute
> > > path, it would make sense
> > > 1) to search in include directories (I think that the current directory
> > >   is always in front of of the search path)
> > > 2) to check if the directories and image file exist in the destination
> > >   directory and if not copy the file
> > >
> > > For point 2), there could be a customization variable to prevent the
> > > copy, that would be off in the default case, but can be turned on for
> > > the users who want backward compatibility or do something else by
> > > themselves, for instance use links.
> >
> > That sounds okay, as searching include directories matches what
> > happens with TeX. When you say "current directory" this should mean
> > the directory containing the Texinfo file, not the working directory
> > from which texi2any is run. (What to do when a file in a subdirectory
> > is @include'd and then references an image, I don't know.)

I got to handle that situation an a daily basis.  What I have found is
that the include file that references the image got to have a number of
Level Variables, so the texinfo can still get to the image.  I can share a
copy of the code so texinfo can get to the next level for complicated projects.
Shall we do it?  I have been pushing texinfo to the limit and the code would
certainly provide ideas so that texinfo could handle those instances adequately.

Regards
Christopher

> I think that it is the current directory, not the directory containing
> the Texinfo file, but I do not think that it matters much.  I think that
> the point is to copy the image file from where it is found to the
> destination directory.
>
> --
> Pat
>



Re: Displaying images for html output

2020-11-21 Thread Patrice Dumas
On Sat, Nov 21, 2020 at 05:20:00PM +, Gavin Smith wrote:
> On Thu, Nov 19, 2020 at 10:11 PM Patrice Dumas  wrote:
> > I think that if the path does not starts with . or .. or is an absolute
> > path, it would make sense
> > 1) to search in include directories (I think that the current directory
> >   is always in front of of the search path)
> > 2) to check if the directories and image file exist in the destination
> >   directory and if not copy the file
> >
> > For point 2), there could be a customization variable to prevent the
> > copy, that would be off in the default case, but can be turned on for
> > the users who want backward compatibility or do something else by
> > themselves, for instance use links.
> 
> That sounds okay, as searching include directories matches what
> happens with TeX. When you say "current directory" this should mean
> the directory containing the Texinfo file, not the working directory
> from which texi2any is run. (What to do when a file in a subdirectory
> is @include'd and then references an image, I don't know.)

I think that it is the current directory, not the directory containing
the Texinfo file, but I do not think that it matters much.  I think that
the point is to copy the image file from where it is found to the
destination directory.

-- 
Pat



Re: Displaying images for html output

2020-11-21 Thread Gavin Smith
On Thu, Nov 19, 2020 at 10:11 PM Patrice Dumas  wrote:
> I think that if the path does not starts with . or .. or is an absolute
> path, it would make sense
> 1) to search in include directories (I think that the current directory
>   is always in front of of the search path)
> 2) to check if the directories and image file exist in the destination
>   directory and if not copy the file
>
> For point 2), there could be a customization variable to prevent the
> copy, that would be off in the default case, but can be turned on for
> the users who want backward compatibility or do something else by
> themselves, for instance use links.

That sounds okay, as searching include directories matches what
happens with TeX. When you say "current directory" this should mean
the directory containing the Texinfo file, not the working directory
from which texi2any is run. (What to do when a file in a subdirectory
is @include'd and then references an image, I don't know.)



Re: Displaying images for html output

2020-11-19 Thread Patrice Dumas
On Wed, Nov 18, 2020 at 09:47:09PM +, Gavin Smith wrote:
> 
> I doubt that relative names beginning "../" were much considered
> when @image was implemented (or even file names with directory parts
> at all).
> 
> I haven't thought of a clear answer for this issue yet.  I think that
> for split output, the image files need to be copied into the output
> directory and the file names should be given under that, not beginning
> "../".  Alternatively, you could create a symbolic link to a directory
> containing the image files under the output directory.
> 
> It's odd that the include path should be searched for image files.
> This makes sense for TeX but not for other formats, as there is no
> search path for image files for HTML or Info.  It would only make sense
> if texi2any was going to copy the image files to the output location.

I think that if the path does not starts with . or .. or is an absolute
path, it would make sense
1) to search in include directories (I think that the current directory 
  is always in front of of the search path)
2) to check if the directories and image file exist in the destination 
  directory and if not copy the file

For point 2), there could be a customization variable to prevent the
copy, that would be off in the default case, but can be turned on for
the users who want backward compatibility or do something else by
themselves, for instance use links.

-- 
Pat



Re: Displaying images for html output

2020-11-19 Thread Christopher Dimech
> Sent: Thursday, November 19, 2020 at 11:10 PM
> From: "Patrice Dumas" 
> To: "Gavin Smith" 
> Cc: "Christopher Dimech" , "help-texinfo gnu" 
> 
> Subject: Re: Displaying images for html output
>
> On Wed, Nov 18, 2020 at 09:47:09PM +, Gavin Smith wrote:
> >
> > I doubt that relative names beginning "../" were much considered
> > when @image was implemented (or even file names with directory parts
> > at all).
> >
> > I haven't thought of a clear answer for this issue yet.  I think that
> > for split output, the image files need to be copied into the output
> > directory and the file names should be given under that, not beginning
> > "../".  Alternatively, you could create a symbolic link to a directory
> > containing the image files under the output directory.
> >
> > It's odd that the include path should be searched for image files.
> > This makes sense for TeX but not for other formats, as there is no
> > search path for image files for HTML or Info.  It would only make sense
> > if texi2any was going to copy the image files to the output location.
>
> I think that if the path does not starts with . or .. or is an absolute
> path, it would make sense
> 1) to search in include directories (I think that the current directory
>   is always in front of of the search path)
> 2) to check if the directories and image file exist in the destination
>   directory and if not copy the file
>
> For point 2), there could be a customization variable to prevent the
> copy, that would be off in the default case, but can be turned on for
> the users who want backward compatibility or do something else by
> themselves, for instance use links.

Yes, that would be very sensible.

> --
> Pat
>



Re: Displaying images for html output

2020-11-18 Thread Gavin Smith
On Wed, Nov 18, 2020 at 10:15:40PM +0100, Christopher Dimech wrote:
> > > Thanks for sending the input and the output.  This problem only occurs
> > > when the image file is not found.  I've tried to fix it in commit
> > > e2d579377.
> >
> > Does it really! I have to check that out, give me a moment.
> 
> No.  The file exists and I use the correct path relative to
> index.html. So the path is correct as far as html is concerned.

As you said in another email the file name should be relative to
the Texinfo file for consistency with other output formats.

I doubt that relative names beginning "../" were much considered
when @image was implemented (or even file names with directory parts
at all).

I haven't thought of a clear answer for this issue yet.  I think that
for split output, the image files need to be copied into the output
directory and the file names should be given under that, not beginning
"../".  Alternatively, you could create a symbolic link to a directory
containing the image files under the output directory.

It's odd that the include path should be searched for image files.
This makes sense for TeX but not for other formats, as there is no
search path for image files for HTML or Info.  It would only make sense
if texi2any was going to copy the image files to the output location.



Re: Displaying images for html output

2020-11-18 Thread Christopher Dimech
> Sent: Wednesday, November 18, 2020 at 9:52 PM
> From: "Christopher Dimech" 
> To: "Gavin Smith" 
> Cc: "help-texinfo gnu" 
> Subject: Re: Displaying images for html output
>
> > Sent: Wednesday, November 18, 2020 at 9:45 PM
> > From: "Gavin Smith" 
> > To: "Christopher Dimech" 
> > Cc: "help-texinfo gnu" 
> > Subject: Re: Displaying images for html output
> >
> > On Sun, Nov 15, 2020 at 08:11:19PM +0100, Christopher Dimech wrote:
> > > When using the following, the imape is displayed.
> > >
> > > @set dirhtml ../../Ideogr/Ch03b--Chmed
> > > @image{@value{dirhtml}/igc03--01--Sicl--CircAmRg,8cm,8cm,,png}
> > >
> > > However, one gets the following warning
> > >
> > > Ch03a--Chmed--html.texi:309: warning: @image file 
> > > `../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg'
> > > (for HTML) not found, using 
> > > `../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.png'
> > >
> > > --
> > >
> > > But suppose one changes the command to include .png as below
> > >
> > > @set dirhtml ../../Ideogr/Ch03b--Chmed
> > > @image{@value{dirhtml}/igc03--01--Sicl--CircAmRg,8cm,8cm,,.png}
> > >
> > > One will get
> > >
> > > Ch03a--Chmed--html.texi:309: warning: @image file 
> > > `../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg'
> > > (for HTML) not found, using 
> > > `../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg..png'
> > >
> > > And the image is not displayed.
> >
> > Thanks for sending the input and the output.  This problem only occurs
> > when the image file is not found.  I've tried to fix it in commit
> > e2d579377.
>
> Does it really! I have to check that out, give me a moment.

No.  The file exists and I use the correct path relative to
index.html. So the path is correct as far as html is concerned.

But the image is only displayed when using 'png' only.  Whereas
the correct syntax should be '.png', and this fails.



> Regards
> Christopher
>
>
>



Re: Displaying images for html output

2020-11-18 Thread Christopher Dimech
> Sent: Wednesday, November 18, 2020 at 9:45 PM
> From: "Gavin Smith" 
> To: "Christopher Dimech" 
> Cc: "help-texinfo gnu" 
> Subject: Re: Displaying images for html output
>
> On Sun, Nov 15, 2020 at 08:11:19PM +0100, Christopher Dimech wrote:
> > When using the following, the imape is displayed.
> >
> > @set dirhtml ../../Ideogr/Ch03b--Chmed
> > @image{@value{dirhtml}/igc03--01--Sicl--CircAmRg,8cm,8cm,,png}
> >
> > However, one gets the following warning
> >
> > Ch03a--Chmed--html.texi:309: warning: @image file 
> > `../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg'
> > (for HTML) not found, using 
> > `../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.png'
> >
> > --
> >
> > But suppose one changes the command to include .png as below
> >
> > @set dirhtml ../../Ideogr/Ch03b--Chmed
> > @image{@value{dirhtml}/igc03--01--Sicl--CircAmRg,8cm,8cm,,.png}
> >
> > One will get
> >
> > Ch03a--Chmed--html.texi:309: warning: @image file 
> > `../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg'
> > (for HTML) not found, using 
> > `../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg..png'
> >
> > And the image is not displayed.
>
> Thanks for sending the input and the output.  This problem only occurs
> when the image file is not found.  I've tried to fix it in commit
> e2d579377.

Does it really! I have to check that out, give me a moment.

Regards
Christopher




Re: Displaying images for html output

2020-11-18 Thread Christopher Dimech


Image Extension
===

> Yes, it is confirmed, as far as I can tell.

Thusly, @image must use ".png", also for html output to get the following to 
work

@image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,.png}

File Location
=

Regarding splitting the file location to use @value

E.g.

From
@image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,.png}

To

@set imgpath ../Ideogr/Ch03b--Chmed
@set imgname igc03--01--Sicl--CircAmRg
@image{@value{imgpath}/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,.png}
@image{@value{imgpath}/@value{imgname},8cm,8cm,AltText,.png}

This works for html output, but not for pdf.

Could these two things (File Extension, @value in file location)
be added to the TODO list for Texinfo?

Regards
Christopher


> Sent: Tuesday, November 17, 2020 at 2:35 PM
> From: "Patrice Dumas" 
> To: "Christopher Dimech" 
> Cc: "Gavin Smith" , "help-texinfo gnu" 
> 
> Subject: Re: Displaying images for html output
>
> On Tue, Nov 17, 2020 at 01:47:41PM +0100, Christopher Dimech wrote:
> > > > @image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,png}
> > > >
> > > > Furthermore, you cannot put ".png" as the fifth argument because for 
> > > > html that will
> > > > fail.  You have to put "png", without the period dot.
> > >
> > > This would be a bug if it is true.  The manual says to include the period:
> >
> > Have you confirmed the bug, Gavin, Patrice?
>
> Yes, it is confirmed, as far as I can tell.
>
> >
> >
> >
> > > Sent: Sunday, November 15, 2020 at 6:42 PM
> > > From: "Gavin Smith" 
> > > To: "Christopher Dimech" 
> > > Cc: "help-texinfo gnu" 
> > > Subject: Re: Displaying images for html output
> > >
> > > On Sun, Nov 15, 2020 at 05:12:13PM +0100, Christopher Dimech wrote:
> > > >
> > > > It is the fifth and I still get the Alt Text Attribute.
> > > >
> > > > The output was
> > > >
> > > > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg
> > > >
> > > > If I put
> > > >
> > > > @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,.png}
> > > >
> > > > I get AltText
> > > >
> > > > But now I have understood the problem,
> > > >
> > > > Although the file exists at 
> > > > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.png
> > > > because the html index file resides in a subdirectory generated by 
> > > > texi2any, the
> > > > code got to be changed to
> > > >
> > > > @image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,png}
> > > >
> > > > Furthermore, you cannot put ".png" as the fifth argument because for 
> > > > html that will
> > > > fail.  You have to put "png", without the period dot.
> > >
> > > This would be a bug if it is true.  The manual says to include the period:
> > >
> > >* For Info and HTML output, 'makeinfo' uses the optional fifth
> > >  argument EXTENSION to '@image' for the filename extension, if it is
> > >  specified and the file is found.  Any leading period should be
> > >  included in EXTENSION.  For example:
> > >
> > >   @image{foo.xpm}
> > >
> >
>



Re: Displaying images for html output

2020-11-17 Thread Christopher Dimech



> Sent: Tuesday, November 17, 2020 at 2:35 PM
> From: "Patrice Dumas" 
> To: "Christopher Dimech" 
> Cc: "Gavin Smith" , "help-texinfo gnu" 
> 
> Subject: Re: Displaying images for html output
>
> On Tue, Nov 17, 2020 at 01:47:41PM +0100, Christopher Dimech wrote:
> > > > @image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,png}
> > > >
> > > > Furthermore, you cannot put ".png" as the fifth argument because for 
> > > > html that will
> > > > fail.  You have to put "png", without the period dot.
> > >
> > > This would be a bug if it is true.  The manual says to include the period:
> >
> > Have you confirmed the bug, Gavin, Patrice?
>
> Yes, it is confirmed, as far as I can tell.

Would you be able to allow the path to the file to be set using the @set 
variable.
This works for html output, but not for texi2pdf.

With texi2pdf, I cannot have

@set imgpath ./USA
@image{@value{imgpath}/Grand-Canyon,5cm,5cm,AltText,.png}


> >
> >
> >
> > > Sent: Sunday, November 15, 2020 at 6:42 PM
> > > From: "Gavin Smith" 
> > > To: "Christopher Dimech" 
> > > Cc: "help-texinfo gnu" 
> > > Subject: Re: Displaying images for html output
> > >
> > > On Sun, Nov 15, 2020 at 05:12:13PM +0100, Christopher Dimech wrote:
> > > >
> > > > It is the fifth and I still get the Alt Text Attribute.
> > > >
> > > > The output was
> > > >
> > > > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg
> > > >
> > > > If I put
> > > >
> > > > @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,.png}
> > > >
> > > > I get AltText
> > > >
> > > > But now I have understood the problem,
> > > >
> > > > Although the file exists at 
> > > > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.png
> > > > because the html index file resides in a subdirectory generated by 
> > > > texi2any, the
> > > > code got to be changed to
> > > >
> > > > @image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,png}
> > > >
> > > > Furthermore, you cannot put ".png" as the fifth argument because for 
> > > > html that will
> > > > fail.  You have to put "png", without the period dot.
> > >
> > > This would be a bug if it is true.  The manual says to include the period:
> > >
> > >* For Info and HTML output, 'makeinfo' uses the optional fifth
> > >  argument EXTENSION to '@image' for the filename extension, if it is
> > >  specified and the file is found.  Any leading period should be
> > >  included in EXTENSION.  For example:
> > >
> > >   @image{foo.xpm}
> > >
> >
>



Re: Displaying images for html output

2020-11-17 Thread Patrice Dumas
On Tue, Nov 17, 2020 at 01:47:41PM +0100, Christopher Dimech wrote:
> > > @image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,png}
> > >
> > > Furthermore, you cannot put ".png" as the fifth argument because for html 
> > > that will
> > > fail.  You have to put "png", without the period dot.
> >
> > This would be a bug if it is true.  The manual says to include the period:
> 
> Have you confirmed the bug, Gavin, Patrice?

Yes, it is confirmed, as far as I can tell.

> 
> 
> 
> > Sent: Sunday, November 15, 2020 at 6:42 PM
> > From: "Gavin Smith" 
> > To: "Christopher Dimech" 
> > Cc: "help-texinfo gnu" 
> > Subject: Re: Displaying images for html output
> >
> > On Sun, Nov 15, 2020 at 05:12:13PM +0100, Christopher Dimech wrote:
> > >
> > > It is the fifth and I still get the Alt Text Attribute.
> > >
> > > The output was
> > >
> > > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg
> > >
> > > If I put
> > >
> > > @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,.png}
> > >
> > > I get AltText
> > >
> > > But now I have understood the problem,
> > >
> > > Although the file exists at 
> > > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.png
> > > because the html index file resides in a subdirectory generated by 
> > > texi2any, the
> > > code got to be changed to
> > >
> > > @image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,png}
> > >
> > > Furthermore, you cannot put ".png" as the fifth argument because for html 
> > > that will
> > > fail.  You have to put "png", without the period dot.
> >
> > This would be a bug if it is true.  The manual says to include the period:
> >
> >* For Info and HTML output, 'makeinfo' uses the optional fifth
> >  argument EXTENSION to '@image' for the filename extension, if it is
> >  specified and the file is found.  Any leading period should be
> >  included in EXTENSION.  For example:
> >
> >   @image{foo.xpm}
> >
> 



Re: Displaying images for html output

2020-11-17 Thread Christopher Dimech
> > @image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,png}
> >
> > Furthermore, you cannot put ".png" as the fifth argument because for html 
> > that will
> > fail.  You have to put "png", without the period dot.
>
> This would be a bug if it is true.  The manual says to include the period:

Have you confirmed the bug, Gavin, Patrice?



> Sent: Sunday, November 15, 2020 at 6:42 PM
> From: "Gavin Smith" 
> To: "Christopher Dimech" 
> Cc: "help-texinfo gnu" 
> Subject: Re: Displaying images for html output
>
> On Sun, Nov 15, 2020 at 05:12:13PM +0100, Christopher Dimech wrote:
> >
> > It is the fifth and I still get the Alt Text Attribute.
> >
> > The output was
> >
> > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg
> >
> > If I put
> >
> > @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,.png}
> >
> > I get AltText
> >
> > But now I have understood the problem,
> >
> > Although the file exists at 
> > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.png
> > because the html index file resides in a subdirectory generated by 
> > texi2any, the
> > code got to be changed to
> >
> > @image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,png}
> >
> > Furthermore, you cannot put ".png" as the fifth argument because for html 
> > that will
> > fail.  You have to put "png", without the period dot.
>
> This would be a bug if it is true.  The manual says to include the period:
>
>* For Info and HTML output, 'makeinfo' uses the optional fifth
>  argument EXTENSION to '@image' for the filename extension, if it is
>  specified and the file is found.  Any leading period should be
>  included in EXTENSION.  For example:
>
>   @image{foo.xpm}
>



Re: Displaying images for html output

2020-11-15 Thread Christopher Dimech


> Sent: Sunday, November 15, 2020 at 6:42 PM
> From: "Gavin Smith" 
> To: "Christopher Dimech" 
> Cc: "help-texinfo gnu" 
> Subject: Re: Displaying images for html output
>
> On Sun, Nov 15, 2020 at 05:12:13PM +0100, Christopher Dimech wrote:
> >
> > It is the fifth and I still get the Alt Text Attribute.
> >
> > The output was
> >
> > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg
> >
> > If I put
> >
> > @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,.png}
> >
> > I get AltText
> >
> > But now I have understood the problem,
> >
> > Although the file exists at 
> > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.png
> > because the html index file resides in a subdirectory generated by 
> > texi2any, the
> > code got to be changed to
> >
> > @image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,png}
> >
> > Furthermore, you cannot put ".png" as the fifth argument because for html 
> > that will
> > fail.  You have to put "png", without the period dot.
>
> This would be a bug if it is true.  The manual says to include the period:
>
>* For Info and HTML output, 'makeinfo' uses the optional fifth
>  argument EXTENSION to '@image' for the filename extension, if it is
>  specified and the file is found.  Any leading period should be
>  included in EXTENSION.  For example:
>
>   @image{foo.xpm}

So we should keep the leading period and fix the bug for the html case.



Re: Displaying images for html output

2020-11-15 Thread Gavin Smith
On Sun, Nov 15, 2020 at 05:12:13PM +0100, Christopher Dimech wrote:
> 
> It is the fifth and I still get the Alt Text Attribute.
> 
> The output was
> 
> ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg
> 
> If I put
> 
> @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,.png}
> 
> I get AltText
> 
> But now I have understood the problem,
> 
> Although the file exists at 
> ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.png
> because the html index file resides in a subdirectory generated by texi2any, 
> the
> code got to be changed to
> 
> @image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,png}
> 
> Furthermore, you cannot put ".png" as the fifth argument because for html 
> that will
> fail.  You have to put "png", without the period dot.

This would be a bug if it is true.  The manual says to include the period:

   * For Info and HTML output, 'makeinfo' uses the optional fifth
 argument EXTENSION to '@image' for the filename extension, if it is
 specified and the file is found.  Any leading period should be
 included in EXTENSION.  For example:

  @image{foo.xpm}



Re: Displaying images for html output

2020-11-15 Thread Patrice Dumas
On Sun, Nov 15, 2020 at 05:12:13PM +0100, Christopher Dimech wrote:
> 
> But now I have understood the problem,
> 
> Although the file exists at 
> ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.png
> because the html index file resides in a subdirectory generated by texi2any, 
> the
> code got to be changed to
> 
> @image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,png}
> 
> Furthermore, you cannot put ".png" as the fifth argument because for html 
> that will
> fail.  You have to put "png", without the period dot.

Actually this is problematic as it requires to put an extension and
there is an error message stating that the file was not found.

It probably should be documented that
* the file should be relative to the location where texi2any is called
  if it is a file starting with ., .. or there will be a message
* the file should be relative to the final directory to be found by 
  browsers.

Probably the way to go in the case of a split manual is to
* prepopulate the directory where the split manual will be with the 
  images. Can be in a subdirectory.
* use names in @image without leading ., like
  @image{images_subdir/my_image}
* call texi2any with a -I for the final directory, like
   texi2any --html -I my_manual my_manual.texi

Should it be documented?

-- 
Pat



Re: Displaying images for html output

2020-11-15 Thread Christopher Dimech


It is the fifth and I still get the Alt Text Attribute.

The output was

../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg

If I put

@image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,.png}

I get AltText

But now I have understood the problem,

Although the file exists at ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.png
because the html index file resides in a subdirectory generated by texi2any, the
code got to be changed to

@image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,png}

Furthermore, you cannot put ".png" as the fifth argument because for html that 
will
fail.  You have to put "png", without the period dot.


> Sent: Sunday, November 15, 2020 at 4:32 PM
> From: "Gavin Smith" 
> To: "Christopher Dimech" 
> Cc: "help-texinfo gnu" 
> Subject: Re: Displaying images for html output
>
> On Sun, Nov 15, 2020 at 03:00:21PM +0100, Christopher Dimech wrote:
> >
> > This is what I have inputted which for texi2pdf
> >
> > @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,12cm,,,.png}
> >
> > In html I simply get the print
> >
> > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg
> >
> > But the image is not being displayed.
>
> This some of the information that you needed to send.  According to the 
> manual,
>
> Here is the synopsis of the '@image' command:
>
>  @image{FILENAME[, WIDTH[, HEIGHT[, ALTTEXT[, EXTENSION}
>
> Your extension is the fourth argument when it needs to be the fifth:
>
> > @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,12cm.png}
>
> Although you didn't send the contents of the HTML output you got, the .png
> was probably output as an alt text attribute.
>



Re: Displaying images for html output

2020-11-15 Thread Gavin Smith
On Sun, Nov 15, 2020 at 03:00:21PM +0100, Christopher Dimech wrote:
> 
> This is what I have inputted which for texi2pdf
> 
> @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,12cm,,,.png}
> 
> In html I simply get the print
> 
> ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg
> 
> But the image is not being displayed.

This some of the information that you needed to send.  According to the manual,

Here is the synopsis of the '@image' command:

 @image{FILENAME[, WIDTH[, HEIGHT[, ALTTEXT[, EXTENSION}

Your extension is the fourth argument when it needs to be the fifth:

> @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,12cm.png}

Although you didn't send the contents of the HTML output you got, the .png
was probably output as an alt text attribute.



Re: Displaying images for html output

2020-11-15 Thread Christopher Dimech


This is what I have inputted which for texi2pdf

@image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,12cm,,,.png}

In html I simply get the print

../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg

But the image is not being displayed.

> Sent: Sunday, November 15, 2020 at 10:40 AM
> From: "Gavin Smith" 
> To: "Christopher Dimech" 
> Cc: "help-texinfo gnu" 
> Subject: Re: Displaying images for html output
>
> On Sun, Nov 15, 2020 at 12:40:05AM +0100, Christopher Dimech wrote:
> > What is the command for displaying images for html output.  When I use
> > @image, the image is only being displayed when using texi2pdf.
>
>
> Hello, have you consulted the documentation on the @image command?
>
> https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Image-Syntax.html
>
> Some advice on asking questions:
>
> https://stackoverflow.com/help/minimal-reproducible-example
> http://www.catb.org/~esr/faqs/smart-questions.html
>



Re: Displaying images for html output

2020-11-15 Thread Christopher Dimech
That's what I have done, but I cannot see the output in html.


> Sent: Sunday, November 15, 2020 at 10:40 AM
> From: "Gavin Smith" 
> To: "Christopher Dimech" 
> Cc: "help-texinfo gnu" 
> Subject: Re: Displaying images for html output
>
> On Sun, Nov 15, 2020 at 12:40:05AM +0100, Christopher Dimech wrote:
> > What is the command for displaying images for html output.  When I use
> > @image, the image is only being displayed when using texi2pdf.
>
>
> Hello, have you consulted the documentation on the @image command?
>
> https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Image-Syntax.html
>
> Some advice on asking questions:
>
> https://stackoverflow.com/help/minimal-reproducible-example
> http://www.catb.org/~esr/faqs/smart-questions.html
>



Re: Displaying images for html output

2020-11-15 Thread Patrice Dumas
On Sun, Nov 15, 2020 at 12:40:05AM +0100, Christopher Dimech wrote:
> What is the command for displaying images for html output.  When I use
> @image, the image is only being displayed when using texi2pdf.

It is @image.  It is documented here
https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Image-Syntax.html

You should have an error/warning message in html if the image file is
not found.

-- 
Pat



Re: Displaying images for html output

2020-11-15 Thread Gavin Smith
On Sun, Nov 15, 2020 at 12:40:05AM +0100, Christopher Dimech wrote:
> What is the command for displaying images for html output.  When I use
> @image, the image is only being displayed when using texi2pdf.


Hello, have you consulted the documentation on the @image command?

https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Image-Syntax.html

Some advice on asking questions:

https://stackoverflow.com/help/minimal-reproducible-example
http://www.catb.org/~esr/faqs/smart-questions.html



Displaying images for html output

2020-11-14 Thread Christopher Dimech
What is the command for displaying images for html output.  When I use
@image, the image is only being displayed when using texi2pdf.

Regards
Christopher