From 0d810e92b557b0a09b1ab479b85ac238630f00a3 Mon Sep 17 00:00:00 2001 From: sorata <136738526+brishtibheja@users.noreply.github.com> Date: Tue, 24 Dec 2024 22:23:09 +0530 Subject: [PATCH 1/2] use mathjax to render equation --- src/math.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/math.md b/src/math.md index 6fae6d50..13517bef 100644 --- a/src/math.md +++ b/src/math.md @@ -25,12 +25,13 @@ To try it out: \(\sqrt{x}\) -4. If you click the Cards… button, you’ll see a preview of how the +4. Click the **Cards...** button. You’ll see a preview of how the equation will appear when the card is reviewed. + \\[\sqrt{x}\\] Anki’s MathJax support expects content in TeX format. If you’re not familiar with TeX formatting, please see [this cheatsheet](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference). -Please note that point 2 does not apply in Anki - Anki uses `\(` and +Please note that point 1 does not apply in Anki - Anki uses `\(` and `\)` for inline equations, and `\[` and `\]` for display equations. If you want to use newlines in a MathJax expression, please use From 59880e5976059ba8f180bc9da42da25479c879a5 Mon Sep 17 00:00:00 2001 From: sorata <136738526+brishtibheja@users.noreply.github.com> Date: Tue, 24 Dec 2024 22:47:28 +0530 Subject: [PATCH 2/2] explain how to customise mathjax --- src/math.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/math.md b/src/math.md index 13517bef..6c93aa1d 100644 --- a/src/math.md +++ b/src/math.md @@ -43,7 +43,23 @@ equations. Please see the 'chemical equations' section and the following sections for more information: -It is possible to [customize some settings](https://faqs.ankiweb.net/customizing-mathjax.html). +### Customize MathJax + +Anki's bundled MathJax support is loaded before card content, so if you wish to customise MathJax you'll have to do so in a specific way. An example is provided here. + +```javascript + +``` + +Note that Anki has special logic for cloze deletions that might not work if you change the standard delimiters for MathJax equations. ## LaTeX