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

 
 

patch #8202: Install images into infodir.

Submitter:  None
Submitted:  Mon 07 Oct 2013 08:16:08 PM UTC
   
 
Category:  Core : new feature Priority:  3 - Low
Status:  Wont Do Privacy:  Public
Assigned to:  None Originator Email:  -email is unavailable-
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 18 Jan 2020 12:20:55 PM UTC, comment #18: 

Review for Octave 6.

No interest for 6 years.

Closing item.

Kai Torben Ohlhus <siko1056>
Group Member
Wed 23 Oct 2013 06:28:01 PM UTC, 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 23 Oct 2013 04:32:50 PM UTC, 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 Lilge <ttl>
Group Member
Wed 23 Oct 2013 12:06:30 AM UTC, 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


$ apt-file search -x "^/usr/share/info.*\.png"
[...]
gnutls-doc: /usr/share/info/gnutls-logo.png
[...]
libidn11-dev: /usr/share/info/libidn-components.png


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>
Group Member
Tue 22 Oct 2013 11:42:00 PM UTC, 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>
Group administrator
Tue 22 Oct 2013 11:22:49 PM UTC, comment #13: 

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

Rik <rik5>
Group administrator
Sat 19 Oct 2013 07:18:30 AM UTC, 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 Lilge <ttl>
Group Member
Sat 19 Oct 2013 06:39:54 AM UTC, 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 Lilge <ttl>
Group Member
Fri 18 Oct 2013 11:55:05 PM UTC, 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>
Group Member
Fri 18 Oct 2013 11:37:15 PM UTC, 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).

Anonymous
Fri 18 Oct 2013 11:07:19 PM UTC, 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>
Group Member
Fri 18 Oct 2013 10:59:41 PM UTC, 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.)

Anonymous
Fri 18 Oct 2013 10:57:40 PM UTC, 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>
Group Member
Fri 18 Oct 2013 09:20:40 PM UTC, 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>
Group Member
Fri 18 Oct 2013 09:19:06 PM UTC, 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>
Group Member
Fri 18 Oct 2013 08:52:11 PM UTC, 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 octave.info 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 Lilge <ttl>
Group Member
Fri 18 Oct 2013 01:49:25 PM UTC, 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)

E.g.,

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

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

Anonymous
Fri 18 Oct 2013 02:37:40 AM UTC, 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>
Group Member
Mon 07 Oct 2013 08:16:08 PM UTC, 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/Makefile.am (imagesdir)

  (images_DATA): New variables.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #29415:  doc_browser_images.patch added by ttl (2KiB - 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
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by ruediger (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-01-25 mtmiller Carbon-CopyRemoved 80942 -
    2020-01-18 siko1056 CategoryNone Core : new feature
        Priority5 - Normal 3 - Low
        StatusNeed Info Wont Do
        Open/ClosedOpen Closed
    2013-10-19 ttl Attached File- Added doc_browser_images.patch, #29415
    2013-10-18 mtmiller StatusNone Need Info
    2013-10-07 None Attached File- Added images-info.patch, #29310

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code