Closed hssm closed 9 years ago
I've figured out at least part of the problem. Sometimes one of the Cloze deletions
will cause LaTeX compilation to fail, but when you click "Card" it only shows you the
picture or failure information for the card without any deletions applied. As a result,
some of the generated cards will display correctly in AnkiDroid and some won't, because
they weren't generated correctly in the first place. In fact, I'm not entirely sure
if the Cloze deletion pictures are even generated before you review them for the first
time in Anki.
Reported by paulbunc
on 2013-02-28 03:45:29
After additional experimentation, viewing each generated card in Anki and then syncing
only fixes the problem some of the time. Some cards display correctly in Anki but not
in AnkiDroid. Example:
[$$]{{c1::\text{Profit} }}=({{c2::P}}-{{c3::AC}})\times {{c4::Q}}=\left(\frac{ {{c5::TR}}
}{ {{c4::Q}} }-\frac{ {{c7::TC}} }{ {{c4::Q}} }\right)\times {{c4::Q}}[/$$]
c7 was up for review.
Oddly enough, adding this note to a new test deck ("Profit" has been changed to "Profitness"
so the cards don't conflict), reviewing each card on Anki, and then syncing enables
me to see the new cards in the test deck. After deleting and recreating the original
note it now displays correctly, but I've lost all the review data associated with it.
Even then, only some of the cards displayed correctly. I deleted it again, and this
time cleared unused media, checked the database, and did a full sync, and now they
all display correctly. I'm still not sure what caused the original problem, and I'd
prefer not to have to do this frequently.
Reported by paulbunc
on 2013-03-04 00:59:18
Reported by nicolas.raoul
on 2013-03-13 06:35:07
I think I've worked out what causes it, it's a combination of problems with Anki Desktop
- first, the images are not generated when adding a new note - they are only generated
for a given card when you review that card. This means that they won't display correctly
in AnkiDroid until you've seen them once in Anki and synced. Second, clicking "Card"
wasn't intended to generate all associated images for a note - it just generates enough
to show a sample card. Image generation is left to Unused Media, which is the third
problem: Unused Media does not correctly generate cards containing cloze deletions
within LaTeX blocks - it evaluates the LaTeX without performing the cloze substitutions,
so only one image is generated for each note and that image is generated incorrectly
(it contains cn:: all over the place, where n is an integer). Furthermore, Unused Media
identifies all the images generated by LaTeX blocks containing cloze deletions as unused,
so if you don't know that and tell it to delete unused media, then those images are
gone and you can't get them back until you review the cards on Anki Desktop again,
which (depending on the interval) could take weeks to months to years. As such, I currently
have no reason to believe that AnkiDroid or AnkiWeb are to blame. I've filed issues
for Anki Desktop for these issues and they've been accepted.
Reported by paulbunc
on 2013-03-13 13:06:30
I see this problem too. It happens as Anki get confused between the {} of Latex when
there are two of them (for instance, when you use \frac{}{}) and the {} of the cloze
itself.
Is there any fix?
Reported by omerros
on 2015-01-16 14:02:15
If someone could attach a sample deck that exhibits this issue I will take a look at
it. I'm doing some work right now on the bits that handle parsing cloze tags so it
could be related to (or even the same) issue here.
Reported by Houssam.Salem.Au
on 2015-01-17 07:29:32
Accepted
Great,
I just created a short example that demonstrates it clearly:
Sulfuric acid in water is {{c1::[$]H_2SO_{4_{(aq)}}[/$]}}
As you can see, the problem is that LaTeX requires '}}', but Anki parses this is the
end of the cloze.
If that's not clear I can easily create more samples.
Reported by omerros
on 2015-01-17 07:44:01
Actually, having read comment #5 I don't think this is an AnkiDroid problem but something
the desktop client needs to fix first. It's unrelated to the issue I thought this was,
so I'm going to leave it for now.
Reported by Houssam.Salem.Au
on 2015-01-17 07:49:06
WaitingForFeedback
The previous poster has already mentioned them being raised and accepted on the desktop
end of things.
Reported by Houssam.Salem.Au
on 2015-01-17 07:52:46
I wasn't able to find the relevant thread. Can you please share a link?
Reported by omerros
on 2015-01-17 07:54:39
https://anki.lighthouseapp.com/projects/100923/tickets/54-cant-cloze-latex-text-that-contains
Reported by Houssam.Salem.Au
on 2015-01-17 07:58:03
Thanks! I seem to have a silly question, it's a private project so it requires me to
login but I have no account. Is there a sign up page somewhere?
Reported by omerros
on 2015-01-18 09:28:20
I don't remember how I created my account. Maybe it was by invite. Anyway, there is
a section in the manual about this issue with a workaround for this exact problem:
http://ankisrs.net/docs/manual.html#latex-conflicts
Reported by Houssam.Salem.Au
on 2015-01-18 23:57:12
Great, thanks!
Reported by omerros
on 2015-01-19 09:10:31
Closing since we are consistent with Anki Desktop
Reported by perceptualchaos2
on 2015-06-04 02:25:50
Done
Originally reported on Google Code with ID 1696
Reported by
paulbunc
on 2013-02-26 03:28:45