Closed sandersantema closed 4 years ago
The "method 1" description was outdated. It is basically to ensure that you Closet is actually installed on that card type, which is definitely the case here.
I'm working on the MathJax support.
I just uploaded a new version v0.2.1
, which supports MathJax to my best efforts. You need to reinsert Closet using Asset Manager again however.
I had to take back most of the MathJax support I added, because how flimsy MathJax behaves on mobile. Calling MathJax.Hub.Queue
regularly crashed the pipeline, leaving the card in an unfinished (unrevealed) condition.
I will postpone the next attempt till after Anki updates to MathJax 3 which supports a more stable Promise API for synchronisation rather than building their own mechanisms. I have opened a PR for this.
Looks really good! If I desperately need mathjax anyways I'll probably just try the previous version out and otherwise I'll wait for more updates :)
I just updated to v0.2.3 which even works with MathJax of the current Anki version. There were actually some longstanding issues, which I simply never noticed, but are now fixed.
Fantastic! Thank you for the quick fixes.
Closet now seems to work with mathjax except for embedding mathjax into a closet cloze which renders the mathjax but doesn't render the cloze itself.
\(x^2\) [[c1::\(x^1\) hallo]]
will show as:
I'm using the latest anki beta, 2.1.36beta2
. Is this the expected behaviour?
I cannot recreate this after the update.
Are you sure you actually updated it. You also need to reinsert Closet using Asset Manager, as some of the code on the template itself changed.
If then it still misbehaves, you could upload the offending card in a deck again.
Are you sure you actually updated it. You also need to reinsert Closet using Asset Manager, as some of the code on the template itself changed.
I have indeed reinserted Closet, which solved all of the other ways in which mathjax + closet wasn't working except for having mathjax formulas in a closet cloze.
I have a suspicion it might be something about my local setup although I can reproduce this bug using a fresh anki profile and with the closet script inserted into the default basic cards.
Maybe it has something to do with one of my installed plugins?
You could try and start Anki while holding Shift, which will disable all add-ons temporarily. The template should still work however.
You could try and start Anki while holding Shift, which will disable all add-ons temporarily. The template should still work however.
Unfortunately still doesn't work, I'll try some other things and follow up if anything changes.
It seems like writing the template to a note type doesn't work anymore. Although it did seem to work a little while ago nothing gets written to the note now that I try.
UPDATE: Closet not being inserted was a mistake on my side, I didn't have enabled toggled on. However after correctly inserting the closet setup it's still not working with mathjax inside the clozes.
@sandersantema I have good news, I figured out the issue.
I will push out a fix possibly tomorrow. For now, you can fix the issue (and this may sound crazy...) by making the whole MathJax expression (including \(
to \)
) italic or bold.
@sandersantema I have good news, I figured out the issue. I will push out a fix possibly tomorrow. For now, you can fix the issue (and this may sound crazy...) by making the whole MathJax expression (including
\(
to\)
) italic or bold.
Very nice! Making the whole expression bold or italic does work, quite an amusing fix :) I look forward to start using closet a lot more, this issue was a blocker but now that it's resolved I can use it.
I'll close the issue for now, given that making the whole mathjax expression bold or italic works and it should work without if your fixes are merged.
I've uploaded a new version (v0.2.4) to AnkiWeb, which means you probably don't need to use the "italic"-trick anymore :)
Fixing commit: 80eb9c9333c639beda2bf04d37
Describe the bug Other than the generated mathjax formula itself a piece of light gray text is shown. As can be seen here:
Code used for note:
However after one review this grey text disappears:
The gray text only reappears when stopping the reviewer i.e. exiting to the browse window.
More weird stuff happens when I include a mathjax formula in the cloze:
Code used for note:
Debug information
Method 1
initCloset()
fails, this doesn't make a whole load of sense though given that clozes without mathjax are working just fine.Method 2
(The file has an added
.zip
extension) test.apkg.zip