-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
direct use of WWPlot or TikZImage objects in image() #561
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the case of an array of WWPlot
or TikZImage
objects? I think the check should be done later in the method where an ARRAY
ref is checked for, and there is probably a need to take care to check for an immediate ref to a WWPlot
or TikZImage
object, as well as for WWPlot
or TikZImage
objects in an ARRAY
. Most likely the actual insertGraph
call should be inside the while(@image_list)
loop.
Edit: After looking at your other related pull request adding the alt attribute, I see that this is related to your comment there about deprecating the array usage.
I'm in the middle of your suggestions. I think I will wait on POD until the other PR is resolved. There would be conflicts there. Perhaps this is not an appropriate place to bring this up, but tikz image production is not working here in two (possibly related) ways. I don't mean because of this change. But I was working with it to test this, and I can't complete the test because of the tikz production not working. And I also wonder if it's moot with the tikz PR that you have open. (1) If I just do the documented example like:
There is no image. There is an image URL, but nothing is there. Do I need to look somewhere to make sure write permissions are what they ought to be for creating the image file? (2) Perhaps related. If I just try to save the result from
with these error messages:
Does anything strike you as familiar or otherwise understood with these issues I am having? |
Did you make the changes to /etc/ImageMagick-6/policy.xml noted in site.conf.dist? |
The comment starts on line 117 of that file. This is also on the release notes page. |
Note that if you are using my pull request #557 (and the defaults with svg) that isn't needed. |
Everything looks good. Yeah, resolving merge conflicts is an art of itself. |
One thing to note is that if my pull request #557 is merged, then this will need to check for the |
I figured it must be something like that. My hunch is I did everything I should have done for the production server moving to 2.16, but failed to review all of the site.conf changes on this development server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice simplifying code.
I did notice that I didn't have to change anything in the policy on image-magick. I seem to be running version 7. Also on my develop machine, it may have a different default policy. I'll have to check when upgrading my production machine.
When #559 is resolved, I will rebase this, handle any conflicts, and complete the suggestions here. |
a7ed592
to
78c9d7a
Compare
I updated POD to mention the argument can be a WWPlot or TikZImage. If #557 is resolved before this, I will change "TikZImage" to "PGtikz". |
I will take a look after dinner. If this is merged before #557 I will add the package name change there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this with both a single image, and a list of images. It works well.
Also, the documentation looks good. |
Three approvals and positive feedback in the discussion thread. It seems this one is ready to merge first, unless @drgrice1 has some technical reason to sequence in the other order. I think the release notes should mention the new syntax provide, and make the relevant Wiki page. |
The sequencing doesn't matter to me. |
I'm going to go ahead and merge this. We have 3 positive reviews. |
This makes it so if
$gr
is either a WWPlot or TikZImage object, then you can just do:image($gr,...)
instead of
image(insertGraph($gr),...)
(This is related to #560.)