Closed jeffbl closed 8 months ago
The number of these "Interpret graphic with IMAGE" lines that gets added seems to correlate to number of graphics (i.e., graphics inserted with \includegraphics
command) in the document, that much I know so far, but I wasn't able to trigger this bug with another Overleaf document (using v0.4.0 of the extension). Will try to replicate or keep an eye on whether it shows up elsewhere on the web...
@rayanisran can you specify whether you have the test or production extension installed? I have test extension installed, but I don't know if the ones I just fixed in @Sabrina-Knappe 's paper came from me, or were already there.
@jeffbl I'm using the test extension.
I'm on those papers and also the Touching Faces paper, using the test extension on Opera, but I haven't noted anything wonky there...
Found an instance of Interpret graphic with IMAGE in my CV!!
I'll save a version of the code for you as well as the PDF
Amazing. What version of the extension (and was this with the test extension?) Just wondering if it's the same version as the one I had (v0.4.0).
It was the test extension! 0.4.53.
Here's hoping I didn't apply to any funding with that
I did some testing and it looks like the problem is in the processGraphics
function in buttons.js
. Although the function only looks for elements with the img
tag, there are hidden elements on an Overleaf document that have this tag but don't have an src
attribute, unlike standard images. A straightforward but hacky fix for now is to just check whether an src
attribute exists on the detected element and ignore processing ones that don't:
for (let image of images) {
if (!image.hasAttribute("src"))
continue;
...
This solved the issue for me, but I haven't checked whether the code impacts any screen readers/other sites.
Woah, Thanks for looking into it @rayanisran , This seems like a valid check. Please feel free to raise a PR.
We use overleaf for writing academic papers A couple of people working on two different papers (@rayanisran and @Sabrina-Knappe) have noticed the text "Interpret graphic with IMAGE" appearing in their documents, which is of course a big problem. @rayanisran points to this example:![image](https://github.com/Shared-Reality-Lab/IMAGE-browser/assets/2095406/3b412e69-802c-49f8-b450-a118e9a09fc2)
I don't know what is causing this, but if this happens in places other than overleaf, it is something we need to fix quickly.
@rayanisran @Sabrina-Knappe please add any additional details here!