patchGNU Octave - Patches: patch #8202, Install images into infodir.


patch #8202: Install images into infodir.

Submitted by:  None
Submitted on:  Mon Oct 7 20:16:08 2013  
Category: NonePriority: 5 - Normal
Status: Need InfoPrivacy: Public
Assigned to: NoneOriginator Email: -unavailable-
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Wed Oct 23 18:28:01 2013, comment #17:

The "$(PACKAGE_NAME)-"prefix seems to be the current way of doing it. However the other packages only ship one image. So maybe using a subdirectory might be a good idea. But it might not be what packagers expect. Since we are somewhat pioneers here we should probably choose a method which makes the most sense. Even if it might cause some initial rage from the packagers.

RĂ¼diger Sonderfeld <ruediger>
Wed Oct 23 16:32:50 2013, comment #16:

In reply to comment #14:

The patch for the doc browser could be adapted that the relative path "octave/VERSION/" is added to "src=" in the img-tag.

Torsten <ttl>
Project Member
Wed Oct 23 00:06:30 2013, comment #15:

I'm new to this feature, but on my debian system it seems that the gnutls-doc and libidn11-dev packages both install png images in $infodir, for example

Note that files have something like "$(PACKAGE_NAME)-" as a prefix added to each image. I assume that means the texinfo will have to be told that that is the image name.

Mike Miller <mtmiller>
Project Administrator
Tue Oct 22 23:42:00 2013, comment #14:

Do the image files have to be installed in $infodir? Is that the expected/recommended location, and are other projects doing this? Can they be installed in a subdirectory like $infodir/octave/VERSION?

John W. Eaton <jwe>
Project Administrator
Tue Oct 22 23:22:49 2013, comment #13:

Do we want to apply this patch before the 3.8 release?

Rik <rik5>
Project Administrator
Sat Oct 19 07:18:30 2013, comment #12:

Attached the patch that enables images in the gui's doc browser for testing. It only works for now if the images are copied into the info directory in use.

(file #29415)

Torsten <ttl>
Project Member
Sat Oct 19 06:39:54 2013, comment #11:

Mike, I agree that it would be better to directly use a format that directly supports images like html. I would like to use the qt-assistent for that but did not find a way to automatically generate the necessary files from the doc files.

At the moment the image tags in the info files are detected and removed before converting the text into html. If we decide to install the images into the info dir it only requires few changes to convert the image tag into the related html image tag instead.

I will also check how complex it would be to reorganize the viewer for directly displaying the html files of the manual.

Torsten <ttl>
Project Member
Fri Oct 18 23:55:05 2013, comment #10:

These are all good points, maybe I am living in the past also :)

Your other patch may indeed fix the ascii printing issue for the plots that don't have text mode equivalents, that could be a good thing.

Mike Miller <mtmiller>
Project Administrator
Fri Oct 18 23:37:15 2013, comment #9:

There are only ascii equivalents for very few images. Most images are replaced by "Image unavailable in text mode.". fig:spmatrix is an exception because sparseimages.m contains a special case for it (printsparse). My -ddumb print patch could help here. But that should be discussed in my other patch submission.

It seems that many packages (including octave until this patch or something similar is accepted) still treat texinfo as a format which can't handle images. However this is a wrong assumption. It might have been true in the past and it is still true for info(1). But at least Emacs is quite capable of displaying images in info files. I don't see why we should squander those capabilities. And Emacs doesn't seem to be an uncommon way to use octave (and thus read the documentation).

Fri Oct 18 23:07:19 2013, comment #8:

Well there actually already are ascii equivalents for all of the images in the manual, whether they are currently in @ifnotinfo blocks or not.

If I do "info octave" and search for fig:spmatrix I can see the text version of the plot.

I do see that there are a very few packages that are installing png images into /usr/share/info. That really strikes me as odd, sorry.

Anyway, I'd like jwe or someone else who's been doing this longer than me to weigh in on what we want our info manual to look like, what the intent is with embedded plot images, why are some in @ifnotinfo blocks and others are not, etc.

Mike Miller <mtmiller>
Project Administrator
Fri Oct 18 22:59:41 2013, comment #7:

> Also, I don't think it's a good idea in general to install any files other than .info into the infodir install path. It's not very polite to users and packagers who expect only certain types of files to be installed in certain directories.

Other packages, such as gnutls and libidn, are already installing images into the info-path. So packagers should already know how to handle it. Maybe due to the large amount of images we should either prefix them or install them in an `octave-images' subdirectory.

> I would much rather see a patch that simply wraps the 10 remaining images in @ifnotinfo blocks, I think that's more consistent with what our manual is providing.

At least Emacs' info viewer seems capable of handling images and I don't see a reason why we should cripple the info document artificially.

(With my `-ddumb' (#8203) patch we could even provide an ascii variant for terminal info viewers.)

Fri Oct 18 22:57:40 2013, comment #6:

One more followup: there are 29 instances of @image in the Octave texinfo source files. There are only 10 "image src" matches in the Octave info format documentation.

I would much rather see a patch that simply wraps the 10 remaining images in @ifnotinfo blocks, I think that's more consistent with what our manual is providing.

Mike Miller <mtmiller>
Project Administrator
Fri Oct 18 21:20:40 2013, comment #5:

I assumed that all figures were already in @ifnotinfo blocks in the manual, so I was surprised to see that there are even any references to plot images in the info format manual at all.

Mike Miller <mtmiller>
Project Administrator
Fri Oct 18 21:19:06 2013, comment #4:

I'm not sure that that's a good thing.

First, this patch submission was simply about adding images to the install directory so that a third-party info browser that happens to be able to load images would find them, not related to the GUI.

Now, Torsten, you're saying that the GUI renders info docs into HTML at run-time and you want to display images in that rendering? Did you know that there are certain differences between the info docs and the HTML docs, using the @ifinfo / @ifnotinfo tags in the texinfo source for example? Last time I looked it seemed that a lot of figures are not being generated into the info format of the manual. I assumed this was what we wanted.

Also, I don't think it's a good idea in general to install any files other than .info into the infodir install path. It's not very polite to users and packagers who expect only certain types of files to be installed in certain directories. There is already an install-html make target available for installing the full HTML manual format, as I mentioned on another bug report recently. Can we make the GUI look for either the HTML format manual or the info docs as a fallback?

Mike Miller <mtmiller>
Project Administrator
Fri Oct 18 20:52:11 2013, comment #3:

Actually the info browser of the gui displays html-format in which the info files are converted. I am working on a patch that enables showing the figures.

With the patch the images are copied into the info dir during install. When starting octave with run-octave the info-dir used is source-dir/doc/interpreter and the are found here. The images however are copied into build-dir/doc/interpreter which is not used and where no info-files are generated.

Torsten <ttl>
Project Member
Fri Oct 18 13:49:25 2013, comment #2:

The infor format contains links to the images. But since they are not shipped with the info manual they can't be found and the text is displayed even if the viewer could display images (E.g., the Emacs info viewer)


^@^H[image src="plot.png" text="
| Image unavailable in text mode. |

By installing the image files in the info directory the info viewer can find and display them.

Fri Oct 18 02:37:40 2013, comment #1:

The info format of the Octave manual does not include the figures, though. Does installing the images into the info directory actually do anything different with our manual?

Mike Miller <mtmiller>
Project Administrator
Mon Oct 7 20:16:08 2013, original submission:

Some info viewers, such as GNU Emacs, support images in *.info files.
Therefore it makes sense to ship images with the text info manuals.

  • doc/interpreter/ (imagesdir)

(images_DATA): New variables.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #29415:  doc_browser_images.patch added by ttl (2kB - text/x-diff)
file #29310:  images-info.patch added by None (1018B - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by ruediger (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by ttl (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat Oct 19 07:18:30 2013ttlAttached File-=>Added doc_browser_images.patch, #29415
    Fri Oct 18 02:37:40 2013mtmillerStatusNone=>Need Info
    Mon Oct 7 20:16:08 2013NoneAttached File-=>Added images-info.patch, #29310

    Back to the top

    Powered by Savane 3.1-cleanup1