AnkiSpace β Fix MathJax Brace Spacing
Anki addon that adds spaces between adjacent curly braces inside LaTeX/MathJax environments, preventing conflicts with Anki's cloze deletion syntax ({{c1::...}}).
The problem
When writing LaTeX in Anki, nested braces like \frac{{x}}{{y}} clash with Anki's cloze syntax β Anki sees {{ and }} as cloze markers rather than LaTeX grouping.
The fix
Click the { } button in the editor toolbar to fix all fields in the current note. The button appears in both the Add Note dialog and the Card Browser.
Transforms (inside LaTeX only):
| Before |
After |
{{ |
{ { |
}} |
} } |
Runs repeatedly until no adjacent braces remain (e.g. }}}} becomes } } } }).
Supported LaTeX delimiters: \(...\), \[...\], $...$, $$...$$
Examples
\(\frac{{x}}{{y}}\) β \(\frac{ {x} }{ {y} }\)
{{c1::\[\frac{2}{3}\]}} β unchanged (cloze preserved)
Configuration
Go to Tools β Add-ons β AnkiSpace β Config:
{
"enabled": true
}
Set enabled to false to disable the button without removing the addon.
Installation
Copy the ankispace folder into your Anki addons directory:
- Linux:
~/.local/share/Anki2/addons21/
- macOS:
~/Library/Application Support/Anki2/addons21/
- Windows:
%APPDATA%\Anki2\addons21\
Restart Anki.