Comments (4)
Hi Vincent,
Thanks for the report. The issue could either be due to the way LaTeX is handled by Anki's templating engine, or caused by the JavaScript code used to remove the cloze markers in the original hint.
As this issue likely only facts a very small portion of the add-on's userbase, I don't have time to investigate it right now. However, if you get the chance yourself you could try messing around with the following lines in your OC card templates and see if you can get things to work properly:
var hint = document.querySelector('.fullhint>[id^="hint"]')
var html = hint.innerHTML.replace(/\[\[oc(\d+)::(.*?)(::(.*?))?\]\]/mg, "$2")
(If this is crucial to your workflow and you don't have time to look into it yourself I would also be happy to work on it against a small fee. In that case feel free to send me an email at ankiglutanimate[Îąt]gmail.com).
from cloze-overlapper.
Thank you for your reply.
I think the problem is that the LaTeX part generates an image and then the JavaScript code tries to remove the cloze markers from that image (which obviously won't work).
In order for it to work properly, the cloze markers would have to be removed before the image of the LaTeX part is generated. Therefore, I don't think that changing the lines in the card templates will help.
from cloze-overlapper.
Right, that's definitely it. With all of the recent porting efforts I was thinking in "Anki 2.1 mode" where MathJax is the preferable way to render LaTex.
In that case I'm afraid there isn't much I can do. It's possible to modify the card renderer and apply changes to the source text before it's passed on to the LaTeX compiler, I did so for Sequence Inserter. However, modifying the card rendering code is a very ugly affair and not portable across other platforms.
So perhaps the best way to handle this would be to set it aside until the add-on is 2.1 compatible and then look into making the hints work with MathJax.
from cloze-overlapper.
So perhaps the best way to handle this would be to set it aside until the add-in is 2.1 compatible and then look into making the hints work with MathJax.
Sounds good.
from cloze-overlapper.
Related Issues (20)
- Feature Request: Forwards and Backwards list traversal
- Feature Request: Allow for escaping of special characters in the "Original Text" field
- Feature Request: Longer lists via (1) linked lists or (2) drill down-lists
- Feature Request: (1) lists of lists + (2) fine-grained control over context cues
- Text does not wrap properly when overlapping clozes are placed on the same line
- Feature Request: more fine-grained control of sibling-spacing (Big Idea; please consider)
- Feature Request: tabular data
- Feature Request: Add option: Don't generate new cloze if less than N cards (ex: N=3) HOT 1
- Not working in 2.1.46 HOT 1
- Feature Request: Language Learning Integration
- Fixed
- ClozeOverlapper: feature request: synthesis & analysis
- addons21\109531687\editor.py:320:model is deprecated: please use 'note_type'
- Won't Install on â¨2.1.62
- multiple clozes created
- asking for the mnemonic with every card
- [Anki 23.10 Beta 2] SchedulerV3 HOT 3
- [Anki 23.10 beta 6] No module named 'PyQt5'
- Error when adding compiled addon to anki
- Trees
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ď¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloze-overlapper.