Closed taliesinb closed 3 years ago
@daneelsan Can we confirm this fixes the issue on Linux before we merge this?
$ uname -a
Linux arch 5.9.11-arch2-1 #1 SMP PREEMPT Sat, 28 Nov 2020 02:07:22 +0000 x86_64 GNU/Linux
Thanks for testing @aokellermann !
But now I'm confused -- so you were using Linux and it rendered correctly before I introduced this fix, but not after? Now we need to understand why your Linux install rasterized the cell labels but @daneelsan did not -- perhaps he can run uname -a
as well.
In any case, I've made a small tweak --so @aokellermann do you mind running again? Also, can you paste screenshots of the behavior after setting $EnableLabelRasterizationWorkaround = False
and $EnableLabelRasterizationWorkaround = True
? Thanks so much!
@taliesinb
master:
your branch:
@taliesinb @aokellermann
$ uname -a
Linux pop-os 5.8.0-7630-generic #32~1605108853~20.04~8bcf10e-Ubuntu SMP Wed Nov 11 22:42:16 UTC x86_64 x86_64 x86_64 GNU/Linux
I had to reinstall the OS in my PC as I had some horrible issue. The label now appears in when I'm in the master branch:
There seems to be a cropping issue but the label is working (again in master
branch).
Running @aokellermann examples:
master
:
branch
:
I feel bad that it works now but I swear the label was not appearing before...
@daneelsan Are you sure cropping issue is on master? I get that exact issue but only when I use this branch.
Double-checked and yes, in master.
Have you tried with "RasterizeInput" -> False
?
@daneelsan, can you include the prior cells with the input so that we can try to reproduce?
RandomHypergraph[10] // HypergraphPlot
RasterizePreviousInputOutputAndExportToMarkdown["Test.png", "DryRun" -> True, "RasterizeInput" -> False]
I cannot reproduce the cropping issue on a Mac. I'm wondering if some of the hard-coded size constants need to be different on Linux.
I can however reproduce the cropping issue on Windows:
With "RasterizeInput" -> False
master:
this branch:
$EnableLabelRasterizationWorkaround=True
from this branch fixes the cropping on Windows as well.
Ok, it seems like things are inconsistent enough and strange enough between platforms that I cannot use Rasterize[Notebook[...]]
to do anything, and need to resort to creating the complete image myself using my previous ImageColumn
code. I will try to do this some time this week.
Closing for now due to inactivity. Can be reopened in the future if there are any updates.
This branch introduces
$EnableLabelRasterizationWorkaround
, which defaults to True on Linux, and which manually attaches cell labels in the right places. It is not 100% pixel accurate compared to the normal behavior on macOS, but I don't think should be a goal -- the underlying bug needs to be fixed upstream.Example shown below (the setting of
$EnableLabelRasterizationWorkaround
is so you can toggle the effect on your platform to see it do its thing, which should appear to be nothing on macOS and to make the labels appear correctly on Linux).This change is