develooper Front page | perl.perl5.porters | Postings from June 2022

Re: Pre-RFC: images in Pod

Thread Previous | Thread Next
From:
Dan Book
Date:
June 9, 2022 22:58
Subject:
Re: Pre-RFC: images in Pod
Message ID:
CABMkAVXsE_yJAMN9GY1m6YnQ2K=GUJ+JoFg0uOcZrS7qS4Skcw@mail.gmail.com
On Thu, Jun 9, 2022 at 6:25 PM Neil Bowers <neilb@neilb.org> wrote:

> Revisiting this after something of a gap … here’s the basic case:
>
> P<There can be only one|https://highlander.org/macleod.png>
>
> Q1: how should this be rendered if an image can’t be displayed? Someone
> commented that styling should be left to formatters, but I think podspec
> should propose a standard rendering as text.
>

This isn't up to the formatter, it should always render the equivalent of
the image tag. "can't be displayed" would be discovered when the browser
attempts to fetch the image and whatever normal behavior would occur.


> Q2: should we support non http URLs? For example a CPAN dist might want to
> bundle images for the doc (and have them turn up on MetaCPAN), and the Perl
> distribution might want to include images for diagrams: P<illustration of
> method resolution|images/mro.png>. That’s like to get hairy, so one option
> is to say that v1 just supports http URLs and worry about relative paths if
> there’s a call for it.
>

This seems like a common enough case to consider and was discussed before.
But the exact details would get hairy as you say. For example, would it be
relative to the root of the dist (which would work for metacpan, which
renders using the dist tarball) or relative to a sharedir (which would work
after installation, such as perldoc.perl.org and pod2html, but way too
complicated for the pod spec)?


>
> Seems sensible to allow optional dimensions with an additional parameter:
>
> P<There can be only one|https://highlander.org/macleod.png|640x480>
>
> Q3: I often just put just a width on images, so it should probably allow
> that. I.e. P<alt text|https://foo.com/bar.png|320>. Should any other
> format of dimensions be supported?
>

Optimizing for specifying width seems appropriate to me.

-Dan

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About