You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
Anki client: AnkiDesktop Windows 10 2.1.44
Debug information
I have been playing with clozes, specifically for the ones inside MathJax. It works fine in the recipes cloze.hide and cloze.reveal, but cloze.show doesn't seem to use the field inactiveEllipser, as it keeps using HTML.
Method 1 (preferred method)
Basically, when a cloze is defined as inactive, it just injects HTML. I don't know if this is intentional. I am trying to use this with my math cards, and I'm having a bit of struggle. Thank you :)
I cannot upload files apparently, but this would be my closet setup.
/* cSpell:disable *//** USED */constelements=closet.template.anki.getQaChildNodes();constmemory=chooseMemory("closet__1");constfilterManager=closet.FilterManager.make(preset,memory.map);constoutput=[[elements,memory,filterManager]];consttexCloze={inactiveEllipser: ()=>String.raw`\left[\ldots\right]`,getfrontStylizer(){returnthis.backStylizer.toStylizer({mapper: (v)=>String.raw`\left[${v}\right]`});},frontEllipser: (tag)=>([tag.values[1]
? tag.values[1]
: String.raw`\ldots`]),backStylizer: closet.Stylizer.make({processor: v=>String.raw`{\color{cornflowerblue}{${v}}}`,}),backEllipser: (tag)=>([tag.values]),};/* here goes the setup - change it to fit your own needs */{globalThis.target=closet.browser.recipes.occlusionEditor()(filterManager.registrar);filterManager.install(/* TeX CLOZE */closet.flashcard.recipes.cloze.show({tagname: "txc",
...texCloze,}),closet.flashcard.recipes.cloze.reveal({tagname: "txch",
...texCloze,}),closet.flashcard.recipes.cloze.hide({tagname: "txcr",
...texCloze,}),);}
The text was updated successfully, but these errors were encountered:
Describe the bug
A clear and concise description of what the bug is.
Debug information
I have been playing with clozes, specifically for the ones inside MathJax. It works fine in the recipes
cloze.hide
andcloze.reveal
, butcloze.show
doesn't seem to use the fieldinactiveEllipser
, as it keeps using HTML.Method 1 (preferred method)
Basically, when a cloze is defined as inactive, it just injects HTML. I don't know if this is intentional. I am trying to use this with my math cards, and I'm having a bit of struggle. Thank you :)
I cannot upload files apparently, but this would be my closet setup.
The text was updated successfully, but these errors were encountered: