ankitects / ankitects/anki

Cloze Deletion Immediately after \begin{aligned} in Equation Not Shown on Card

Open
#2,113 2 comments 0 reactions 0 assignees View on GitHub
editor
Dominant language
Rust
Stars
30.5k
Forks
3.2k
Avg merge
2d 8h
Merged PRs (30d)
60

Description

When a MathJax equation contains an `aligned` environment, if the first non-whitespace within the environment is a cloze deletion, then the deletion is not shown correctly. In the following example, the MathJax preview should show "[0]" on the first line, before the comma.

![image](https://user-images.githubusercontent.com/19618780/194683461-cbe4413a-ecfc-443b-a81a-83ad4e3503ba.png)

This isn't a problem only with the MathJax preview. The card does not show "[...]" on the first line either.
![image](https://user-images.githubusercontent.com/19618780/194683484-708ce495-c8d6-417c-9b3b-e2c1a7629b92.png)

Here is the code for the example note:
```
\[\left\{\begin{aligned}
{{c1::0}}, \\
{{c1::1}},
\end{aligned}\right.\]
```

I'm currently using Anki 2.1.55 Beta, but I've observed this problem on several previous versions of Anki.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.