Subject: bug#73425: 31.0.50; Support images in HTML versions of ELPA package manuals

From: Eli Zaretskii <[email-masked]>
Date: Mon, 23 Sep 2024 15:03:35 +0300

> From: Philip Kaludercic <[email-masked]>
> Cc: [email-masked],  [email-masked], "Stefan Monnier"
>  <[email-masked]>
> Date: Mon, 23 Sep 2024 10:48:41 +0000
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Then the image files should be in the same directory (or in its
> > images/ subdirectory, but that would need to be coordinated with the
> > package developers).
> 
> Right, and we can facilitate this by allowing package specifications to
> annotate where images are found.
> 
> > How do we generate these HTML files from the Texinfo sources?
> 
> Basically by executing,
> 
> --8<---------------cut here---------------start------------->8---
> makeinfo --no-split [input-name] -o [output-name] --html --css-ref=[css-url]
> --8<---------------cut here---------------end--------------->8---
> 
> >> plus the manual under https://elpa.gnu.org/packages/doc/[package name]
> >
> > So we have the HTML docs in two places?  Why two?  And why do I see
> > both https://elpa.gnu.org/packages/doc/compat.html and
> > https://elpa.gnu.org/packages/doc/compat/compat.html?
> 
> I am not sure, my suspicion is some kind of historical backwards
> compatibility.  I have CC'ed Stefan who might know more.
> 
> > In any case, what I propose is to have the image files right near the
> > HTML files which reference them.
> 
> That would make sense.

OK, so we agree.  I guess what's left is to somehow make sure this all
does indeed happen?

> >> >> Do you know if TeXinfo has an option to inline images?  If the
> >> >> "makeinfo" command could somehow generate data: urls when exporting
> >> >> images, then this could be very easily solved.
> >> >
> >> > This is already supported, for a long time, both in Info and HTML
> >> > formats (and in other formats as well; see the node "Image Syntax" in
> >> > the Texinfo manual.
> >> 
> >> I did take a look at that node, but I couldn't find anything that would
> >> help me.
> >
> > ??? What are you looking for that is not there?
> 
> Some kind of --embed flag, that would inline images.  So instead of
> generating
> 
>   <img src="/path/to/image.png" />
> 
> makeinfo could produce
> 
>   <img src="data:image/png;base64,iVBORw0KGgoAAAANS..."

Ah, apologies for my misunderstanding.  No, such inlining is not
supported by Texinfo for HTML, AFAIK, they only support external image
files for HTML.  (DVI and PDF outputs do embed the image, I believe.)