Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the generated POD output from PGbasicmacros.pl. #2

Merged
merged 1 commit into from
Apr 13, 2021

Conversation

drgrice1
Copy link

This doesn't change the wording at all. It just changes the formatting of the generated html POD output.

Note: Don't use comments in POD. POD is not Perl code.

Here is what the POD looks like with the current code:

Macros for displaying images

    Usage:
    image($image, width => 100, height => 100, tex_size => 800, alt => 'alt text', extra_html_tags => 'style="border:solid black 1pt"');
    # where $image can be a local file path or URL
    # width and height are pixel counts for HTML display, while tex_size is per 1000 applied to linewidth (for example 800 leads to 0.8\linewidth)
    image([$image1,$image2], width => 100, height => 100, tex_size => 800, alt => ['alt text 1','alt text 2'], extra_html_tags => 'style="border:solid black 1pt"');
    image([$image1,$image2], width => 100, height => 100, tex_size => 800, alt => 'common alt text', extra_html_tags => 'style="border:solid black 1pt"');
    # this produces an array in array context and joins the elements with ' ' in scalar context

Here is what the POD looks like with these changes:

Macros for displaying images

Usage:

    image($image, width => 100, height => 100, tex_size => 800, alt => 'alt text', extra_html_tags => 'style="border:solid black 1pt"');

where $image can be a local file path or URL, width and height are pixel counts for HTML display, while tex_size is per 1000 applied to linewidth (for example 800 leads to 0.8\linewidth)

    image([$image1,$image2], width => 100, height => 100, tex_size => 800, alt => ['alt text 1','alt text 2'], extra_html_tags => 'style="border:solid black 1pt"');
    image([$image1,$image2], width => 100, height => 100, tex_size => 800, alt => 'common alt text', extra_html_tags => 'style="border:solid black 1pt"');

this produces an array in array context and joins the elements with ' ' in scalar context

Note:  Don't use comments in POD.  POD is not Perl code.
@Alex-Jordan Alex-Jordan merged commit 6082581 into Alex-Jordan:pgimagealttext Apr 13, 2021
@Alex-Jordan
Copy link
Owner

Thanks!

@drgrice1 drgrice1 deleted the image-pod-improve branch April 13, 2021 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants