No longer able to copy latex output

In previous versions of anki, it was possible to create latex equations which would render as images in the card. One could then copy these from a preview session.

At some point in the last year this functionality seems to have broken, and copying a latex-generated image (not mathjax) results in an empty clipboard. It is not obvious if it’s been done on purpose, though I’m assuming it’s more likely to be a bug, and it’s something that I used to rely on a lot, as it is by far the easiest and quickest method for creating a nice image of latex math for copying onto other things.

Does anyone know if this is a bug, if so how to report it, or any workarounds (e.g. is it possible to easily get the name of the file corresponding to that image?)

I know I can print screen, but that would be last resort for me (if it comes to that, I might as well compile proper latex on linux…)

Works for me.

I think this may be related (even if you’re not on Windows):
https://changes.ankiweb.net/#/known-issues?id=copy-amp-paste-problems-on-windows

1 Like

Thanks abdo. This doesn’t seem related to me unfortunately (at least as far as I can tell).

Out of curiosity, can you copy normal images? As in, if you drag an image from the preview window, do you see the image being dragged with the cursor? This is what used to happen for me whereas now the image does not seem to be something I can interact with. I thought it was specific to latex, but it turns out that it’s images in general …

Actually, I think you’re right.
Image dragging doesn’t work as expected. You have to select images the way you select text and then drag/copy them. Merely clicking on an image and dragging it won’t work (but this works on Web browsers for example).

The drag issue seems to be intentional:

Removing this line doesn’t seem to cause images to be deleted when dragging as documented though.

1 Like

@abdo: Excellent find abdo! Thanks!

My horrid workaround until now was to export the deck, unzip it, and inspect the media file to figure out which latex files were used in the user media folder. :weary:

I’ve tried it and it works as before, thank you so much!

@dae: If draggable images are no longer a problem, I would vote for their reinstatement by default :slight_smile: For me this fix had broken functionality I relied on (as I also use Anki cards for reference, not just for memorisation). Specifically, it broke my ability to easily generate and copy equation images over into documents (and mathjax output cannot be copied in the same way either).

It’s in 2.1.34.