Anki Forums

Copy and paste formulae breaks mathjax

When pasting into mathjax blocks, the block becomes un-rendered texts. Even removing the pasted parts doesn’t fix the problem. This is best demonstrated using a video clip.

This can be fixed by copying the problematic block into a plain text editor, say Textastic, and then copying it back into Anki. I’m suspecting the issue is related how copy & paste in iOS preserve text styling as rich texts.

That’s a common issue. Here’s a quote from Damien (Anki developer) from 2018:

Copying & pasting it will paste the text formatting, which will prevent the text from being rendered - typing it manually should work

There’s no easy way to avoid that issue, you will have to type it out yourself.

P.S. Love the category theory :slight_smile:

2 Likes

Thanks for the confirmation. But I think there’s a workaround for this as I’ve seen it implemented in OmniOutliner:

Add a custom “Paste Plain” button in the pop-up menu which removes styling info and pastes as plain texts.

That would be a nice feature to have in the future. In the mean time, maybe the remove formatting button, or switching to HTML mode first with ‘</ >’ could be used to work around the problem?

1 Like

Thanks for the tips. Editing in html does seem to be a good workaround. But remove formatting doesn’t seem to do anything for this issue.