Images are one of the most frequently requested features for Pod. There
was a proposal in the past[1] but it failed to achieve unanimous support
of the community, mainly because it was perceived as too complicated.
https://github.com/Perl/perl5/issues/18169
My proposal takes a different route. Images will be inputted using the
new formatting code, P<>, which stands for "Picture".
Compared to the previous proposal this has several advantages:
- It's much simpler, it doesn't require a YAML parser.
- Images can be embedded inline inside a paragraph.
- It plays well with the table syntax that I have proposed in the other
pre-RFC.
Of course, there are also some disadvantages. The syntax isn't
extensible; for example, it's impossible to specify the dimensions of
the image. In my opinion, this isn't a big loss.
Some examples:
P<https://example.com/image.jpg>
P<https://example.com/image.jpg|alt text>
L<P<https://example.com/image.jpg|this image is a link>|https://example.com>
P<data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAPBAMAAAAfXVIcAAAAMFBMVEWdDtesnV3g9aGo4gLH7FKz9giz5R6/6Tuy5RKkVpjz+9qwvEKgKcDQ722la4P////TI3mRAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAaUlEQVQI12P4////qlVAguH/f2djYyMQ43NoW2iwPpBx9XVo9OR+EOOAqACbPZChuufonNR+sJrQ0OB6EKMtLS0ZpPivGZCxHmSORVqaBdhA5bYMKzDji1lyPZjxv9kYYtf/L/ehDDAAACPTVSyPrPcdAAAAAElFTkSuQmCC>
was a proposal in the past[1] but it failed to achieve unanimous support
of the community, mainly because it was perceived as too complicated.
https://github.com/Perl/perl5/issues/18169
My proposal takes a different route. Images will be inputted using the
new formatting code, P<>, which stands for "Picture".
Compared to the previous proposal this has several advantages:
- It's much simpler, it doesn't require a YAML parser.
- Images can be embedded inline inside a paragraph.
- It plays well with the table syntax that I have proposed in the other
pre-RFC.
Of course, there are also some disadvantages. The syntax isn't
extensible; for example, it's impossible to specify the dimensions of
the image. In my opinion, this isn't a big loss.
Some examples:
P<https://example.com/image.jpg>
P<https://example.com/image.jpg|alt text>
L<P<https://example.com/image.jpg|this image is a link>|https://example.com>
P<data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAPBAMAAAAfXVIcAAAAMFBMVEWdDtesnV3g9aGo4gLH7FKz9giz5R6/6Tuy5RKkVpjz+9qwvEKgKcDQ722la4P////TI3mRAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAaUlEQVQI12P4////qlVAguH/f2djYyMQ43NoW2iwPpBx9XVo9OR+EOOAqACbPZChuufonNR+sJrQ0OB6EKMtLS0ZpPivGZCxHmSORVqaBdhA5bYMKzDji1lyPZjxv9kYYtf/L/ehDDAAACPTVSyPrPcdAAAAAElFTkSuQmCC>