I've noticed that wrapping a Graphic[]
in Hyperlink[]
causes weird things to happen when using Inset[]
(which, in my case, is being automatically used by GraphicsGrid[]
and Text[]
). Here's a minimal-ish example where you great a white rectangle with a red border and a number in the middle. You then Inset[]
that into some arbitrary position and, this is the important part, specify the new size.
If the Graphics[]
object is embedded as-is, it works fine. If you instead try to embed Hyperlink[g]
, it just renders wrong. It's all cutoff.
g = Graphics[{White, EdgeForm[{Red, Thickness[Large]}],
Rectangle[{-1, -1}, {1, 1}], Inset[Style[1, Black, Bold]]}];
Inset[g, {1620, -180}, ImageScaled[{0.5`, 0.5`}], {360, 360}] //
Graphics;
Inset[Hyperlink[g, None], {1620, -180},
ImageScaled[{0.5`, 0.5`}], {360, 360}] // Graphics;
{%%%, %%, %}
The first image is the Graphics object itself, the second is the Inset[] results with just the graphics obejct, and the third is if I Hyperlink the graphics object. If I resize the Hyperlink-ed result enough, it eventually shows the border:
So I think what's happening is that the Hyperlink wrapper is causing the Graphics object to end up cropped, not scaled.
Can someone please see if they can reproduce this issue? If so, I'll try to report it as a bug.
HyperLink
around theInset
instead of on the inside. To accomplish this without access to the explicitInset
, you could potentially define a wrapperinnerlink
with the following upvalue:Inset[innerlink[x_, y_], z___] ^:= Hyperlink[Inset[x, z], y]
. Not sure if this works in general, though. $\endgroup$Hyperlink[Inset[...]]
produces a result in the exported PDF (I'm tyring to make a programmatic hyperlinked PDF year planner, so this is used to hyperlink from the date in a month calendar to that day's page later in the PDF) that doesn't work. No idea why it doesn't work, one would imagine that hyperlinking a higher level object should work better, but alas, here we are. Thanks for testing and confirming it isn't just me! I'll file a bug and update here accordingly if I get any response. $\endgroup$