Change color of cloze inside mathjax formula using Anki 2.1.57

I’m trying to color of a cloze inside a mathjax formula i.e. say we have the following card:

\(2 + 2 = {{c1::4}}\)

then I’d like [...] to be colored on the front of the card and 4 on the back.

Previously I had this setup using closet but now that clozes inside mathjax formula’s are possible with native clozes I switched to that. I’ve searched the forum but couldn’t find any way to do this, if there is a topic about it already please let me know.

On the back of the card this is already possible using \textcolor but this is not ideal.

As far as I’m aware Anki can’t do that, because color directives are not valid in all contexts inside MathJax.

Do you have any knowledge of how closet did it and if so do you still think it is relevant to the current state of anki mathjax? If it is still relevant I’ll see if I can find out anything about how closet did it.

Sorry, I have no experience with closet.

Where in the Anki code base would I find the code that replaces cloze deletions in MathJax equations?

cloze.rs

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.